Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Stan Shebs <stanshebs@earthlink.net>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] dynamic printf
Date: Wed, 16 May 2012 22:25:00 -0000	[thread overview]
Message-ID: <4FB4293B.9030303@earthlink.net> (raw)
In-Reply-To: <4FB4137C.6000107@redhat.com>

On 5/16/12 1:52 PM, Pedro Alves wrote:
> On 05/16/2012 09:46 PM, Stan Shebs wrote:
>
>>> I thought this approach would break "next"ing over a dprintf location.
>> Indeed, thus this part of the introduction to this patch: :-)
>>
>> "... Joel previously noted a problem with the "continue" in the command list, which is
>> that stepping/nexting over a dprintf becomes a continue instead (this is a problem for
>> general breakpoint command lists as well).  I tinkered with bpstats a bit, but didn't
>> come up with a good solution.
> This is normally handled by the bpstat saying "don't stop".    Doesn't that work
> for this?  Why?
>

Basically if you set bs->stop to 0, command lists don't get run.  It's a 
little convoluted, because the code does go into bpstat_do_actions, but 
nothing happens there because the copy of b->commands to bs->commands in 
bpstat_stop_status only happens if bs->stop.

That's why I'm thinking of a special command / pseudo-command for the 
command list; we don't necessarily want to say that we haven't stopped, 
because that meaning is typically reserved for "yes we hit the trap, but 
pretend it never happened".  Instead, we want the effect of hitting the 
breakpoint, and then go back to making progress on whichever command we 
were doing.  An alternative is to make bs->stop a three-state, but that 
seems like a really bad idea for an area of code that is already rather 
funky.

Stan


  reply	other threads:[~2012-05-16 22:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-08  6:27 Stan Shebs
2012-05-08  7:50 ` Yao Qi
2012-05-14 15:54   ` Stan Shebs
2012-05-15  4:10     ` [commit] Fix spu-tdep.c build regression [Re: [PATCH v2] dynamic printf] Jan Kratochvil
2012-05-15 10:24       ` Jim Meyering
2012-05-15 13:10     ` [commit] testsuite: gdb.base/dprintf.exp PR 12649 race " Jan Kratochvil
2012-05-15 13:34       ` Joel Brobecker
2012-05-15 13:37         ` [commit#2] " Jan Kratochvil
2012-05-16 20:17     ` [PATCH v2] dynamic printf Tom Tromey
2012-05-16 20:46       ` Stan Shebs
2012-05-16 20:52         ` Pedro Alves
2012-05-16 22:25           ` Stan Shebs [this message]
2012-05-17  1:56             ` Tom Tromey
2012-05-18 15:38               ` Pedro Alves
2012-05-16 20:53         ` Pedro Alves
2012-05-16 21:06         ` Tom Tromey

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=4FB4293B.9030303@earthlink.net \
    --to=stanshebs@earthlink.net \
    --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