This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to make unwind info always present?


> Hello,
> 
> we are thinking of changing the debug setup for s390 to always use
> DWARF-2 frame data for stack unwinding (e.g. backtraces).

x86_64 already does that and it is implemented as
-fasynchronous-unwind-tables.  THat makes unwind info to be always emit
and makes it always complete (ie turns out optimization that makes it
valid only on function call boundary that may throw)

You may also look at x86_64 GDB as it is AFAIK the only GDB port
supporting dwarf2 at the moment.
> 
> This has two main advantages:
> 
> - we are currently maintaining an explicit stack frame back-chain
>   pointer, which causes (measurable) run-time overhead for no other
>   purpose but to enable debugging.  With DWARF-2 info, there would
>   be no run-time overhead.
> 
> - with the introduction of prolog scheduling, our gdb backend has
>   serious problems trying to figure out where the prolog ends and
>   all variables are set up; this makes debugging with current gdb
>   and gcc quite awkward.  DWARF-2 frame info would solve this.
> 
> My question is now how to best set up gcc so as to always generate
> this info.  Are there other platforms that use a similar approach?
> 
> Is it possible to avoid duplication of this data if DWARF-2 frame
> info is also needed for exception handling?
At the moment we still emit both for x86-64.  GDB accepts eighter one,
so perhaps just suppresing the output of .debug_frame would be enought.

Honza
> 
> 
> Mit freundlichen Gruessen / Best Regards
> 
> Ulrich Weigand
> 
> --
>   Dr. Ulrich Weigand
>   Linux for S/390 Design & Development
>   IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
>   Phone: +49-7031/16-3727   ---   Email: Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]