Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: 3/5 - Rework stepping over longjmp support
Date: Mon, 07 Apr 2008 19:43:00 -0000	[thread overview]
Message-ID: <m3iqytvg55.fsf@fleche.redhat.com> (raw)
In-Reply-To: <200804070331.14538.pedro@codesourcery.com> (Pedro Alves's message of "Mon\, 7 Apr 2008 03\:31\:14 +0100")

>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:

Pedro> The longjmp inside hidden_longjmp is going to land inside
Pedro> hidden_longjmp.  GDB could ignore it leave the step-resume
Pedro> breakpoint at the return of hidden_longjmp and pretend
Pedro> that longjmp was never seen.  Think of stepping over a function
Pedro> in gdb's sources, and an exception being thrown and caught all
Pedro> somewhere inner to the function you're stepping.  I've
Pedro> implemented a prototype patch that does this.  Does anyone
Pedro> else think that behaviour is useful?

I do.  Speaking as a user, this is the behavior I expect.  That is, if
I 'next' over a function call (and assuming the "easy" case -- no user
breakpoints or watchpoints or the like), anything that happens during
that function call should be invisible to me.  And, in my view, the
inferior should stop at the "next" instruction after the function
call; if that is in an outer frame, then I want to stop there.

Ideally, of course, all this should happen for exceptions in c++ and
java as well :-).  FWIW the c++ case is more important to me ... but
I'm rather fascinated by this patch series because I didn't know this
code even existed, and it makes handling exceptions seem more
possible.

Pedro> (I'm aware that any
Pedro> smartness we add can be defeated by longjmp changing stacks,
Pedro> or stuff like debugging coroutines implemented with set/longjmp,
Pedro> but those feel like rare enough that a smart mode could be
Pedro> the default and useful most of (almost-all) the times.)

As long as folks doing unusual stuff like this can cope for
themselves, I think your proposed behavior is preferable.

Tom


  reply	other threads:[~2008-04-07 15:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-07  2:34 Pedro Alves
2008-04-07 19:43 ` Tom Tromey [this message]
2008-04-14 18:57 ` Daniel Jacobowitz
2008-04-25 18:29   ` Pedro Alves
2008-05-02 14:41     ` Daniel Jacobowitz
2008-05-04 19:59       ` Pedro Alves
2008-05-05 19:23         ` Pedro Alves

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=m3iqytvg55.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.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