This is the mail archive of the
mailing list for the GDB project.
Re: syscall backtraces on arm-linux-gnu
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Fri, 7 Aug 2009 12:22:49 -0400
- Subject: Re: syscall backtraces on arm-linux-gnu
- References: <20090805160852.GA25684@radix50.net> <20090807154949.GC28041@radix50.net>
On Fri, Aug 07, 2009 at 05:49:49PM +0200, Baurzhan Ismagulov wrote:
> It turned out that select is implemented in assembly in glibc, so no CFI
> is provided and gdb falls back to prologue analysis. The following hack
> fixes the use case for me:
The right answer is to somehow get CFI for this. My preferred
solution is to teach gas how to generate DWARF-2 CFI from the ARM
EH directives (the functions in glibc are already annotated).
Worst case, someone can write the necessary DWARF by hand using
> @@ -988,8 +990,6 @@ arm_scan_prologue (struct frame_info *th
> - else if ((insn & 0xf0000000) != 0xe0000000)
> - break; /* Condition not true, exit early */
> else if ((insn & 0xfe200000) == 0xe8200000) /* ldm? */
> break; /* Don't scan past a block load */
Skipping a jump during scanning is definitely not safe. That means
GDB's got no idea whether following instructions - pushes and stack
adjusts included - were executed.
You won't see much in the way of testsuite changes with this, because
the testsuite runs (A) with DWARF CFI from the compiler, and (B)
mostly without optimization.