public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* GCC, GDB v6 and -fomit-frame-pointer
@ 2003-10-09  9:51 Alex Hornby
  2003-10-09 12:39 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Hornby @ 2003-10-09  9:51 UTC (permalink / raw)
  To: gcc


Does the new DWARF2 call frame in gdb 6.0 support mean programs compiled 
with GCC and -fomit-frame-pointer can now be debugged? That would be 
great as -fomit-frame-pointer provides quite a performance boost on x86.

Assuming this is possible, what GCC and binutils versions would be 
needed to take advantage of this?

Cheers,
Alex.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GCC, GDB v6 and -fomit-frame-pointer
  2003-10-09  9:51 GCC, GDB v6 and -fomit-frame-pointer Alex Hornby
@ 2003-10-09 12:39 ` Daniel Jacobowitz
  2003-10-09 12:42   ` Jakub Jelinek
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2003-10-09 12:39 UTC (permalink / raw)
  To: Alex Hornby; +Cc: gcc

On Thu, Oct 09, 2003 at 10:43:22AM +0100, Alex Hornby wrote:
> 
> Does the new DWARF2 call frame in gdb 6.0 support mean programs compiled 
> with GCC and -fomit-frame-pointer can now be debugged? That would be 
> great as -fomit-frame-pointer provides quite a performance boost on x86.
> 
> Assuming this is possible, what GCC and binutils versions would be 
> needed to take advantage of this?

In general yes.  Backtraces should work.  Ultra-accurate argument and
local variable printing requires -fvar-tracking in GCC so it's a little
flaky now, but unwinding should be fine.

Anything recent.  I think 3.2, 3.3 are fine.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GCC, GDB v6 and -fomit-frame-pointer
  2003-10-09 12:39 ` Daniel Jacobowitz
@ 2003-10-09 12:42   ` Jakub Jelinek
  2003-10-09 12:55     ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Jelinek @ 2003-10-09 12:42 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Alex Hornby, gcc

On Thu, Oct 09, 2003 at 08:33:00AM -0400, Daniel Jacobowitz wrote:
> On Thu, Oct 09, 2003 at 10:43:22AM +0100, Alex Hornby wrote:
> > 
> > Does the new DWARF2 call frame in gdb 6.0 support mean programs compiled 
> > with GCC and -fomit-frame-pointer can now be debugged? That would be 
> > great as -fomit-frame-pointer provides quite a performance boost on x86.
> > 
> > Assuming this is possible, what GCC and binutils versions would be 
> > needed to take advantage of this?
> 
> In general yes.  Backtraces should work.  Ultra-accurate argument and
> local variable printing requires -fvar-tracking in GCC so it's a little
> flaky now, but unwinding should be fine.
> 
> Anything recent.  I think 3.2, 3.3 are fine.

Even without CFI info? With the exception of IA-64/AMD64, GCC doesn't
generate unwind info by default, only when -fasynchronous-unwind-tables.

	Jakub

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GCC, GDB v6 and -fomit-frame-pointer
  2003-10-09 12:42   ` Jakub Jelinek
@ 2003-10-09 12:55     ` Daniel Jacobowitz
  2003-10-09 18:00       ` Jakub Jelinek
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2003-10-09 12:55 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Alex Hornby, gcc

On Thu, Oct 09, 2003 at 12:36:08PM +0200, Jakub Jelinek wrote:
> On Thu, Oct 09, 2003 at 08:33:00AM -0400, Daniel Jacobowitz wrote:
> > On Thu, Oct 09, 2003 at 10:43:22AM +0100, Alex Hornby wrote:
> > > 
> > > Does the new DWARF2 call frame in gdb 6.0 support mean programs compiled 
> > > with GCC and -fomit-frame-pointer can now be debugged? That would be 
> > > great as -fomit-frame-pointer provides quite a performance boost on x86.
> > > 
> > > Assuming this is possible, what GCC and binutils versions would be 
> > > needed to take advantage of this?
> > 
> > In general yes.  Backtraces should work.  Ultra-accurate argument and
> > local variable printing requires -fvar-tracking in GCC so it's a little
> > flaky now, but unwinding should be fine.
> > 
> > Anything recent.  I think 3.2, 3.3 are fine.
> 
> Even without CFI info? With the exception of IA-64/AMD64, GCC doesn't
> generate unwind info by default, only when -fasynchronous-unwind-tables.

Sorry, unstated assumption.  This only works if you build with
debugging information.  GDB parses both .eh_frame and .debug_frame, and
all the necessary CFI should be in .debug_frame with -gdwarf-2.

If debugging info bothers you, use objcopy --add-gnu-debuglink :)

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GCC, GDB v6 and -fomit-frame-pointer
  2003-10-09 12:55     ` Daniel Jacobowitz
@ 2003-10-09 18:00       ` Jakub Jelinek
  0 siblings, 0 replies; 5+ messages in thread
From: Jakub Jelinek @ 2003-10-09 18:00 UTC (permalink / raw)
  To: Alex Hornby, gcc

On Thu, Oct 09, 2003 at 08:42:08AM -0400, Daniel Jacobowitz wrote:
> > Even without CFI info? With the exception of IA-64/AMD64, GCC doesn't
> > generate unwind info by default, only when -fasynchronous-unwind-tables.
> 
> Sorry, unstated assumption.  This only works if you build with
> debugging information.  GDB parses both .eh_frame and .debug_frame, and
> all the necessary CFI should be in .debug_frame with -gdwarf-2.
> 
> If debugging info bothers you, use objcopy --add-gnu-debuglink :)

Ok, true. Now just stuff like backtrace (3) or libSegFault.so will be
very upset about -fo-f-p (and there .debug_frame doesn't help, only
.eh_frame could).

	Jakub

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-10-09 17:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-09  9:51 GCC, GDB v6 and -fomit-frame-pointer Alex Hornby
2003-10-09 12:39 ` Daniel Jacobowitz
2003-10-09 12:42   ` Jakub Jelinek
2003-10-09 12:55     ` Daniel Jacobowitz
2003-10-09 18:00       ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).