[GCC 4.8.1] Which section to emit, .eh_frame or .debug_section?

2014-02-13 Thread Ramana
Hi,

For C++ applications, on PPC, gcc v4.8.1 is generating the call frame
information in the .eh_frame section by default.

Could you please tell me why .eh_frame is being generated instead of
.debug_frame?
Also, the dwarf4 standard does not describe .eh_frame section. I
understand that by default gcc v4.8.1 emits dwarf4 debug information.

Thanks,
Venkata Ramanaiah N


Re: [GCC 4.8.1] Which section to emit, .eh_frame or .debug_section?

2014-02-13 Thread Jakub Jelinek
On Thu, Feb 13, 2014 at 05:24:53PM +0530, Ramana wrote:
 For C++ applications, on PPC, gcc v4.8.1 is generating the call frame
 information in the .eh_frame section by default.
 
 Could you please tell me why .eh_frame is being generated instead of
 .debug_frame?

Because .eh_frame is the same data .debug_frame contains, just more compact
and usable also for unwinding and backtrace purposes, not just debugging.
It doesn't make sense to emit both.

Jakub


Re: [GCC 4.8.1] Which section to emit, .eh_frame or .debug_section?

2014-02-13 Thread Ramana
On Thu, Feb 13, 2014 at 5:29 PM, Jakub Jelinek ja...@redhat.com wrote:
 On Thu, Feb 13, 2014 at 05:24:53PM +0530, Ramana wrote:
 For C++ applications, on PPC, gcc v4.8.1 is generating the call frame
 information in the .eh_frame section by default.

 Could you please tell me why .eh_frame is being generated instead of
 .debug_frame?

 Because .eh_frame is the same data .debug_frame contains, just more compact
 and usable also for unwinding and backtrace purposes, not just debugging.
 It doesn't make sense to emit both.

 Jakub
Ok.

But there is no mention of .eh_frame in dwarf4 standard. Any dwarf4
compliant debugger would look for only .debug_frame or shouldn't it?

Regards,
Venkata Ramanaiah N