Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: Jakub Jelinek <jakub@redhat.com>
Cc: Mark Kettenis <kettenis@gnu.org>,
	gdb-patches@sources.redhat.com, ezannoni@redhat.com,
	cagney@gnu.org
Subject: Re: [rfa] Attach vsyscall support for GNU/Linux
Date: Tue, 26 Oct 2004 02:51:00 -0000	[thread overview]
Message-ID: <200410260251.i9Q2pQbc004556@magilla.sf.frob.com> (raw)
In-Reply-To: Daniel Jacobowitz's message of  Sunday, 24 October 2004 19:16:36 -0400 <20041024231636.GA21927@nevyn.them.org>

I'm punting this to Jakub as the person more knowledgeable about how the
unwind info is used for exception handling in glibc.

> I just don't think this problem is solvable within the existing CFI.
> I don't know whether it is solvable by extending DWARF.  Just to make
> sure I'm on the right page, I'll recap one instance of why GDB needs to
> know it's found a signal handler.
> 
> Here's __kernel_rt_sigreturn (starts at 0xffffe440).
> ffffe43f:       90                      nop
> ffffe440:       b8 ad 00 00 00          mov    $0xad,%eax
> ffffe445:       cd 80                   int    $0x80
> 
> Here's the unwind information:
> 000000c4 00000044 00000084 FDE cie=00000044 pc=ffffe43f..ffffe447
>   DW_CFA_def_cfa_expression (DW_OP_breg4: 188; DW_OP_deref)
>   DW_CFA_expression: r0 (DW_OP_breg4: 204)
>   DW_CFA_expression: r1 (DW_OP_breg4: 200)
>   DW_CFA_expression: r2 (DW_OP_breg4: 196)
>   DW_CFA_expression: r3 (DW_OP_breg4: 192)
>   DW_CFA_expression: r5 (DW_OP_breg4: 184)
>   DW_CFA_expression: r6 (DW_OP_breg4: 180)
>   DW_CFA_expression: r7 (DW_OP_breg4: 176)
>   DW_CFA_expression: r8 (DW_OP_breg4: 216)
>   DW_CFA_nop
> 
> This is accurate.  It correctly locates the saved values of all
> registers.  However, this is the frame_address_in_block problem; if the
> first instruction of a function generates a synchronous signal, then
> the restored value of r8 (the PC) will point to the first byte of the
> function.  GDB will use the unwind information for the previous
> function.
> 
> I bet you could reproduce the corresponding problem by an extremely
> signal-heavy stress test using NPTL and asynchronous cancellation.
> Roland, am I missing something?  Won't we go off into never-never land
> if we're at the first instruction of a function call when a signal is
> received and we try to do a forced unwind?


  parent reply	other threads:[~2004-10-26  2:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-24 18:53 Daniel Jacobowitz
2004-10-24 20:55 ` Mark Kettenis
2004-10-24 23:16   ` Daniel Jacobowitz
2004-10-25 22:12     ` Mark Kettenis
2004-10-25 22:46       ` Andrew Cagney
2004-11-01 22:13         ` Mark Kettenis
2004-11-02 14:28           ` Andrew Cagney
2004-11-01 16:15       ` Daniel Jacobowitz
2004-11-01 20:45         ` Mark Kettenis
2004-11-01 22:32           ` Daniel Jacobowitz
2004-11-02 14:29             ` Andrew Cagney
2004-11-07 21:35               ` Daniel Jacobowitz
2004-11-08 16:40                 ` Andrew Cagney
2004-11-05 23:42           ` Daniel Jacobowitz
2004-11-07 17:36             ` Mark Kettenis
2004-11-07 21:18               ` Daniel Jacobowitz
2004-11-07 21:34                 ` Mark Kettenis
2004-10-25 22:54     ` Andrew Cagney
2004-10-26  2:51     ` Roland McGrath [this message]
2004-10-26  8:17       ` Jakub Jelinek
2004-10-26 13:27         ` Daniel Jacobowitz

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=200410260251.i9Q2pQbc004556@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=drow@false.org \
    --cc=jakub@redhat.com \
    /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