Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Aleksandar Ristovski <aristovski@qnx.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch] gdbserver: Add support for Z0/Z1 packets
Date: Fri, 19 Jun 2009 07:08:00 -0000	[thread overview]
Message-ID: <e394668d0906190008t100eeec0y669c12f458e9c725@mail.gmail.com> (raw)
In-Reply-To: <h19h0q$u4m$1@ger.gmane.org>

On Tue, Jun 16, 2009 at 6:31 PM, Aleksandar Ristovski<aristovski@qnx.com> wrote:
> Aleksandar Ristovski wrote:
>>
>> Hello,
>>
>> This adds support for Z0 and Z1 (and z0 and z1) packets.
>>
>
> I apologize, the patch should be this one. Change log corrected as well.
>
> --
> Aleksandar Ristovski
> QNX Software Systems
>
>
> ChangeLog:
>
> * target.h (insert_breakpoint, remove_breakpoint): New target functions.
> * server.c (process_serial_event): 'Z' and 'z' packet - add support
> for [Zz]0 and [Zz]1 - software and hardware breakpoints.
> * linux-low.c (linux_target_ops): Add new fields.
> * spu-low.c (spu_target_ops): Likewise.
> * win32-low.c (win32_target_ops): Likewise.

Hi.

Minor nits (fwiw):

Inserting the insert_breakpoint/remove_breakpoint fields *between* the
stopped_by_watchpoint/stopped_data_address fields is odd.
Can they go before insert_watchpoint?

I think the code in server.c that watches for 0/1/2/3/4 should use a switch.

The code previously caught invalid values (e.g. type == '5'), but you
accidentally removed that (IIUC).

The code in server.c does this:

+           if (the_target->insert_watchpoint == NULL)
+             {
+               /* No watchpoint support or not a watchpoint command;
+                  unrecognized either way.  */
+               own_buf[0] = '\0';
+               res = 1;
+             }

and later does this:

+       if (res == 0)
+         write_ok (own_buf);
+       else if (res == 1)
+         /* Unsupported.  */
+         own_buf[0] = '\0';
+       else
+         write_enn (own_buf);

How about just setting res = 1 in the first code snippet above?
[This appears for both 'z' and 'Z' packets.]


  reply	other threads:[~2009-06-19  7:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-17  1:20 Aleksandar Ristovski
2009-06-17  1:35 ` Aleksandar Ristovski
2009-06-19  7:08   ` Doug Evans [this message]
2009-06-19 13:56     ` Aleksandar Ristovski
2009-06-20 22:01       ` Pedro Alves
2009-06-22 19:39         ` Aleksandar Ristovski
2009-06-22 22:46           ` Pedro Alves
2009-06-23 15:18             ` Aleksandar Ristovski
2009-06-23 15:59               ` Pedro Alves
2009-06-23 16:57                 ` Aleksandar Ristovski
2009-06-24 18:51                 ` Aleksandar Ristovski
2009-06-24 19:01                   ` Doug Evans
2009-06-24 19:04                     ` Aleksandar Ristovski
2009-06-24 19:10                       ` Doug Evans
2009-06-24 19:10                   ` Pedro Alves
2009-06-24 19:20                     ` Aleksandar Ristovski
2009-06-24 19:28                       ` Pedro Alves
2009-06-24 19:25                     ` Aleksandar Ristovski
2009-06-25 22:18                       ` 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=e394668d0906190008t100eeec0y669c12f458e9c725@mail.gmail.com \
    --to=dje@google.com \
    --cc=aristovski@qnx.com \
    --cc=gdb-patches@sources.redhat.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