Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sourceware.org
Subject: Re: syscall backtraces on arm-linux-gnu
Date: Fri, 07 Aug 2009 17:22:00 -0000	[thread overview]
Message-ID: <20090807162249.GA18641@caradoc.them.org> (raw)
In-Reply-To: <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
.byte directives.

> @@ -988,8 +990,6 @@ arm_scan_prologue (struct frame_info *th
>  			     regs[fp_start_reg++]);
>  	    }
>  	}
> -      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 */
>        else

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.

-- 
Daniel Jacobowitz
CodeSourcery


      reply	other threads:[~2009-08-07 16:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090805160852.GA25684@radix50.net>
2009-08-07 16:07 ` Baurzhan Ismagulov
2009-08-07 17:22   ` Daniel Jacobowitz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090807162249.GA18641@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox