Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Stan Shebs <stan@codesourcery.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Make tracepoints into breakpoints
Date: Mon, 30 Mar 2009 23:01:00 -0000	[thread overview]
Message-ID: <49D145DF.4040603@codesourcery.com> (raw)
In-Reply-To: <20090330220709.GC9472@adacore.com>

Joel Brobecker wrote:
> On Mon, Mar 30, 2009 at 11:23:06AM -0700, Stan Shebs wrote:
>   
>> Joel Brobecker wrote:
>>     
>>>> *************** bpstat_what (bpstat bs)
>>>> *** 3324,3329 ****
>>>> --- 3358,3367 ----
>>>>   	  bs_class = bp_silent;
>>>>   	  retval.call_dummy = 1;
>>>>   	  break;
>>>> + + 	case bp_tracepoint:
>>>> + 	  /* (should never occur, complain about it) */
>>>> + 	  continue;
>>>>   	}
>>>>         current_action = table[(int) bs_class][(int) current_action];
>>>>       }
>>>>     
>>>>         
>>> This hunk looks really strange... Out of place?
>>>       
>
> First of all, I apologize of this comment, since I realize now
> that it was incorrect. I was completely confused because of the tabs
> that made it look like you were putting a continue that would kill
> the code just right after. If I had read the hunk more carefully,
> I would have realized it was a '}', not a '{'!
>   
Heh, it was a little strange-looking!
>   
>> I was waffling on whether to make explicit errors for the impossible  
>> cases. I suppose there should be, one can imagine a buggy target  
>> mistakenly stopping and reporting back at a tracepoint.
>>     
>
> Oh... I did not realize that this could actually happen if we had
> a buggy target. Perhaps an error to help diagnose any problem, or
> a complaint if we want to recover nicely from target errors? Just
> some thoughts - I'm also fine if we prefer to recover silently.
>
>   
After looking at the execution flow some more, I decided to go with 
internal_error - bpstat_what is really a "computational" routine that 
needs to have meaningful bpstats going in - there's not a "makes no 
sense" alternative. So we'll expect higher-level infrun.c code to deal 
with tracepoints being reported back unexpectedly. (That code hasn't 
been written yet, but I'm sure I'll have a need for it soon. :-) )

Stan


  reply	other threads:[~2009-03-30 22:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-27 19:57 Stan Shebs
2009-03-28  9:07 ` Eli Zaretskii
2009-03-30 16:10   ` Stan Shebs
2009-03-28 18:11 ` Eli Zaretskii
2009-03-30 15:44 ` Joel Brobecker
2009-03-30 16:56   ` Joel Brobecker
2009-03-30 18:29   ` Stan Shebs
2009-03-30 22:21     ` Joel Brobecker
2009-03-30 23:01       ` Stan Shebs [this message]
2009-03-30 22:07   ` Stan Shebs

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=49D145DF.4040603@codesourcery.com \
    --to=stan@codesourcery.com \
    --cc=brobecker@adacore.com \
    --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