This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap 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: [Query] Re: dwarf unwinder (only works on i386/x86_64)


> I was trying to contrast the ".eh_frame" vs ".debug_frame" 
> specifications for keeping track of stack backtraces. Both appear rather 
> similar wrt information they maintain.

.debug_frame format is that specified in the formal DWARF standard.
.eh_frame format is a slight variant of that format, optimized for being
used by a process itself without address fixups.  (It is used by C++
exception handling, the backtrace() function, and so forth.)

> The Exception header ".eh_frame" section seems to be present in vmlinux 
> even when kernel is compiled without debuginfo.

This depends on lots of details of the kernel build that vary across
versions and machines.  In today's kernels, it is not usually there.

> i. what gcc flags cause this section to be compiled ?

-funwind-tables and similar options.

> ii. This section seemingly appears to be a better bet than DWARF to base 
> the unwinder on--- because a ".debug_frame" based unwinder might not be 
> useful in case of a kernel complied without debuginfo.

It is a somewhat hairy subject.  But in short, this is not so in current
kernels.  That is not entirely apropos, because it's only the situation for
the kernel, and there are also user binaries to consider.  There it is an
even more complex subject.  The overall answer is that the answer is complex,
but potentially both sections are involved.


Thanks,
Roland


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