Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: PATCH: Add xmlRegisters= to qsupported query
Date: Sun, 28 Mar 2010 22:56:00 -0000	[thread overview]
Message-ID: <6dc9ffc81003281556n51481a8cv45a11b6924a15dd6@mail.gmail.com> (raw)
In-Reply-To: <201003282226.54606.pedro@codesourcery.com>

On Sun, Mar 28, 2010 at 2:26 PM, Pedro Alves <pedro@codesourcery.com> wrote:
> On Sunday 28 March 2010 21:52:07, H.J. Lu wrote:
>>        const char *qsupported = gdbarch_qsupported (target_gdbarch);
>> -      if (qsupported)
>> +      if (qsupported || remote_support_xml)
>>         {
>> -         char *q;
>> +         char *q, *x;
>> +         char *p = NULL;
>> +         const char *m;
>> +
>>           if (rs->extended)
>> -           q = concat ("qSupported:multiprocess+;", qsupported, NULL);
>> +           m = "multiprocess+;";
>>           else
>> -           q = concat ("qSupported:", qsupported, NULL);
>> +           m = "";
>> +
>> +         if (remote_support_xml)
>> +           {
>> +             if (qsupported)
>> +               p = concat ("xmlRegisters=", remote_support_xml,
>> +                           ";", NULL);
>> +             else
>> +               p = concat ("xmlRegisters=", remote_support_xml, NULL);
>> +             x = p;
>> +           }
>> +         else
>> +           x = "";
>> +
>> +         q = concat ("qSupported:", m, x,
>> +                     qsupported ? qsupported : "",
>> +                     NULL);
>>           putpkt (q);
>> +         if (p)
>> +           xfree (p);
>>           xfree (q);
>
> There's some hair here for handling gdbarch_qsupported, but,
> is it going to end up used at all?  It isn't used today.

I added it to prepare for AVX support. But I don't need it anymore
since I will use xmlRegisters=.

> [personaly, I'd try to write the above in a way that avoids all
> this if/then/if/then/else/else nesting everytime a few
> qSupported feature is added.]
>

I can try something.

-- 
H.J.


  reply	other threads:[~2010-03-28 22:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-28 20:48 H.J. Lu
2010-03-28 20:52 ` H.J. Lu
2010-03-28 21:27   ` Pedro Alves
2010-03-28 22:56     ` H.J. Lu [this message]
2010-03-28 23:48     ` H.J. Lu
2010-03-28 23:46   ` H.J. Lu
2010-03-29  6:40     ` Eli Zaretskii
2010-03-29 14:13       ` H.J. Lu
2010-03-29 14:32         ` Eli Zaretskii
2010-03-29 14:47           ` H.J. Lu
2010-03-29 14:55     ` H.J. Lu
2010-03-29 16:19       ` H.J. Lu
2010-03-29 17:49         ` Mark Kettenis
2010-03-29 18:02         ` H.J. Lu
2010-03-30 13:55           ` Pedro Alves
2010-03-30 14:58           ` H.J. Lu
2010-03-30 15:09             ` 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=6dc9ffc81003281556n51481a8cv45a11b6924a15dd6@mail.gmail.com \
    --to=hjl.tools@gmail.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