Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@red-bean.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb@sourceware.org
Subject: Re: Stepping over longjmp presumably broken for glibc
Date: Tue, 27 Dec 2005 04:24:00 -0000	[thread overview]
Message-ID: <8f2776cb0512262024n39deb5e9q64ab62c48652e336@mail.gmail.com> (raw)
In-Reply-To: <ur7808mft.fsf@gnu.org>

On 12/25/05, Eli Zaretskii <eliz@gnu.org> wrote:
> My point was that we already depend on all kinds of ad-hoc knowledge
> of the ABI and the runtime, so adding one more dependency would not
> hurt too much, although I'd applaud to changes to do that without any
> such dependencies.

I think Daniel's intent was to solicit ideas, indicating what sort of
ideas he prefers.  It sounds like you agree with his preference, but
don't have any qualifying ideas.  Daniel's posts don't give me the
impression that he minds using ad-hoc information when there's no
alternative.

Here's my (non-qualifying because it relies on help from the runtime)
idea: can't we use Dwarf CFI here?  That is, treat longjmp as a weird
function whose CFI indicates that it unwinds to the setjmp.  The
DW_CFA_val_expression operator, new in the released Dwarf 3 spec,
allows CFI to use an arbitrary expression to compute the saved value
of the register; we can apply that to the return address column just
as well as anything else.  In the case Daniel described, the
expression would use DW_OP_xor (probably the first use ever of that
opcode!).

Dwarf 3 Draft 9.7, Section 6.4.1:
...
The register rules are:
...
val_expression(E) The previous value of this register is the value
produced by executing the DWARF expression E.

Section 6.4.2:
...
21. DW_CFA_val_expression

    The DW_CFA_val_expression instruction takes two operands: an
unsigned LEB128 value representing a register number, and a
DW_FORM_block value representing a DWARF expression. The required
action is to change the rule for the register indicated by the
register number to be a val_expression(E) rule where E is the DWARF
expression. That is, the DWARF expression computes the value of the
given register. The value of the CFA is pushed on the DWARF evaluation
stack prior to execution of the DWARF expression.

The DW_OP_call2, DW_OP_call4, DW_OP_call_ref and
DW_OP_push_object_address DWARF operators (see Section 2.5.1) cannot
be used in such a DWARF expression.


  reply	other threads:[~2005-12-27  4:24 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-22 21:17 Daniel Jacobowitz
2005-12-23  3:32 ` Jim Blandy
2005-12-23  8:25 ` Eli Zaretskii
2005-12-23 13:20   ` Daniel Jacobowitz
2005-12-23 15:16     ` Eli Zaretskii
2005-12-23 15:20       ` Daniel Jacobowitz
2005-12-23 17:07         ` Eli Zaretskii
2005-12-23 17:09           ` Daniel Jacobowitz
2005-12-23 17:46             ` Eli Zaretskii
2005-12-23 18:01               ` Simon Richter
2005-12-24 11:59                 ` Eli Zaretskii
2005-12-24 16:23               ` Daniel Jacobowitz
2005-12-24 16:36                 ` Eli Zaretskii
2005-12-24 16:59                   ` Daniel Jacobowitz
2005-12-26  4:06                   ` Jim Blandy
2005-12-26  5:19                     ` Eli Zaretskii
2005-12-27  4:24                       ` Jim Blandy [this message]
2005-12-30  2:38                         ` Daniel Jacobowitz
2005-12-30  9:32                           ` Mark Kettenis
2005-12-30 16:25                             ` Daniel Jacobowitz
2006-01-02  5:25                               ` Jim Blandy
2006-01-06 19:43                                 ` Daniel Jacobowitz
2006-01-06 20:28                                   ` Jim Blandy
2006-01-06 20:36                                     ` Daniel Jacobowitz
2006-01-06 20:53                                       ` Jim Blandy
2006-01-06 21:27                                       ` Mark Kettenis
2006-01-06 21:28                                         ` 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=8f2776cb0512262024n39deb5e9q64ab62c48652e336@mail.gmail.com \
    --to=jimb@red-bean.com \
    --cc=eliz@gnu.org \
    --cc=gdb@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