This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/2] Use -fno-asynchronous-unwind-tables if C program is compiled without debug info on x86
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Wed, 20 Apr 2016 09:37:35 +0100
- Subject: Re: [PATCH 1/2] Use -fno-asynchronous-unwind-tables if C program is compiled without debug info on x86
- Authentication-results: sourceware.org; auth=none
- References: <1461052220-10149-1-git-send-email-yao dot qi at linaro dot org> <1461052220-10149-2-git-send-email-yao dot qi at linaro dot org> <57163425 dot 1070505 at redhat dot com>
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 (éå)