[PATCH 1/2] Use -fno-asynchronous-unwind-tables if C program is compiled without debug info on x86

Yao Qi qiyaoltc@gmail.com
Wed Apr 20 08:38:00 GMT 2016


Pedro Alves <palves@redhat.com> writes:

> No sure about this.  This is an ABI change on x86_64 -- the x86_64 ABI
> requires eh_frame.

This is because people want to unwind frames without using frame
pointer register  (registers are very limited on x86), so different
tools, like glibc's backtrace and libunwind, can use eh_frame to unwind
correctly.  Then, ABI requires eh_frame.

GDB is different, because it can still rely on the prologue unwinder if
no debug info.  On the other hand, GDB prologue unwinder should be
tested in case that no debug info is produced by compiler.  We just use
-fno-asynchronous-unwind-tables to produce binaries to exercise GDB, so
I don't worry about ABI incompliance.

>
> Should we instead add a new "nounwind" option, and a few
> prologue-unwinder-specific tests?

We don't know how prologue unwinder is used in each test case with
option "nodebug", so  I am afraid we need to add "nounwind" to every
test case where option "nodebug" is used.

-- 
Yao (齐尧)



More information about the Gdb-patches mailing list