public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: "Gustavo, Luis" <luis_gustavo@mentor.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC stub-side break conditions 1/5] Documentation bits
Date: Thu, 12 Jan 2012 19:54:00 -0000	[thread overview]
Message-ID: <4F0F37F0.1000006@redhat.com> (raw)
In-Reply-To: <4F072A67.3030202@mentor.com>

On 01/06/2012 05:07 PM, Luis Machado wrote:
> On 01/06/2012 02:22 PM, Pedro Alves wrote:
>> On 01/05/2012 02:56 PM, Luis Machado wrote:
>>> +@item @code{conditional-breakpoints-packet}
>>> +@tab @code{Z0 and Z1}
>>> +@tab @code{Support for stub-side breakpoint condition evaluation}
>>>   @end multitable
>>
>> What about watchpoints, and other Z packets?
> I wasn't going to touch them for now, but i suppose they can be easily extended later on.

If you handled them now, we'd avoid a new qSupported feature later on.  :-)

>>>   @node Remote Stub
>>> @@ -34149,7 +34206,7 @@ avoid potential problems with duplicate
>>>   be implemented in an idempotent way.}
>>>
>>>   @item z0,@var{addr},@var{kind}
>>> -@itemx Z0,@var{addr},@var{kind}
>>> +@itemx Z0,@var{addr},@var{kind};@r{[};@var{cond expr}@r{]}@dots{}
>>>   @cindex @samp{z0} packet
>>
>> That seems to renders as ‘Z0,addr,kind;[;cond expr]...’
> Not right, i'll fix it in the next iteration after clearing the packet format issue.
> 
>>
>> Hmm.  If we're reusing/extending Z packets, then I'd rather this doesn't
>> make it hard to support future extensions to the packet (e.g., thread specific
>> breakpoints), while at the same time _not_ supporting stub-side
>> condition evaluation.  So imagine that I'll add a new thread-id (pPID.TID)
>> field to this packet, and I will specify an empty condition.   How will the
>> result look like?
>>
>>   Z0,addr,kind;;pPID.TID
>>
>> ?
>>
>> Wouldn't it be better something like:
>>
>>  Z0,addr,kind,cond_expr_list,other_future_extensionsÂ’
>>
>> and cond_expr_list being a ;-separated list?
> 
> Makes sense. The problem is that each conditional expression is of the form "size,expr". 

Where does the ',' requisite come from?  Can't we use something else (e.g. ':' or '.')?
What happens if we have a field in the future that wants a ';' ?  We run out of
separator characters.  :-)

> That's why i used a different marker to signal the beginning of an extension area.
> 
> We could name each extension with a marker (cond, thread_id, itset etc...). Would it be too much overhead in the packet? Like the following.

Might make sense, no strong opinion.

> Z0,addr,kind,cond=size0,expr0;size1,expr1;...;sizen,exprn,itset=<itset>,foo=<foo>...
> 
> Something that comes to mind regarding adding multiple extensions to these packets is the packet size limitation. We may have to add "continuation" packets if the extensions get too numerous. If that happens, it probably wouldn't be wise to rely on specific field ordering.
> 

      reply	other threads:[~2012-01-12 19:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-05 14:56 Luis Machado
2012-01-06  2:19 ` Yao Qi
2012-01-06  2:55   ` Stan Shebs
2012-01-06  6:35     ` Joel Brobecker
2012-01-06  8:30 ` Eli Zaretskii
2012-01-06 13:49   ` Luis Machado
2012-01-06 16:00     ` Eli Zaretskii
2012-01-06 16:22 ` Pedro Alves
2012-01-06 17:08   ` Luis Machado
2012-01-12 19:54     ` Pedro Alves [this message]

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=4F0F37F0.1000006@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=luis_gustavo@mentor.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).