From: Pedro Alves <palves@redhat.com>
To: Antoine Tremblay <antoine.tremblay@ericsson.com>,
gdb-patches@sourceware.org
Subject: Re: [PATCH v3 1/5] Add the target_ops needed for software breakpoints in GDBServer.
Date: Wed, 21 Oct 2015 11:22:00 -0000 [thread overview]
Message-ID: <56277491.6070807@redhat.com> (raw)
In-Reply-To: <1445359685-2589-2-git-send-email-antoine.tremblay@ericsson.com>
On 10/20/2015 05:48 PM, Antoine Tremblay wrote:
> --- a/gdb/gdbserver/linux-low.h
> +++ b/gdb/gdbserver/linux-low.h
> @@ -141,8 +141,17 @@ struct linux_target_ops
>
> CORE_ADDR (*get_pc) (struct regcache *regcache);
> void (*set_pc) (struct regcache *regcache, CORE_ADDR newpc);
> - const unsigned char *breakpoint;
> - int breakpoint_len;
> +
> + /* Return the breakpoint kind for this target based on PC. The PCPTR is
> + adjusted to the real memory location in case a flag (e.g., the Thumb bit on
> + ARM) was present in the PC. */
Spurious double space before "was present".
> + int (*breakpoint_kind_from_pc) (CORE_ADDR *pcptr);
> +
> + /* Return the software breakpoint from KIND. KIND can have target
> + specific meaning like the z0 kind parameter.
It's more usual to talk in terms of the "insert" packet. That is,
write uppercase Z0.
> --- a/gdb/gdbserver/target.h
> +++ b/gdb/gdbserver/target.h
> @@ -441,6 +441,16 @@ struct target_ops
> readlink(2). */
> ssize_t (*multifs_readlink) (int pid, const char *filename,
> char *buf, size_t bufsiz);
> +
> + /* Return the breakpoint kind for this target based on PC. The PCPTR is
> + adjusted to the real memory location in case a flag (e.g., the Thumb bit on
> + ARM) was present in the PC. */
> + int (*breakpoint_kind_from_pc) (CORE_ADDR *pcptr);
> +
> + /* Return the software breakpoint from KIND. KIND can have target
> + specific meaning like the z0 kind parameter.
> + SIZE is set to the software breakpoint's length in memory. */
> + const gdb_byte *(*sw_breakpoint_from_kind) (int kind, int *size);
Ditto.
I think the linux-low.h comments should just say "See target.h for details."
or some such, avoiding the duplication (and the forgetting to update
linux-low.h when target.h next changes).
Otherwise LGTM.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2015-10-21 11:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-20 16:48 [PATCH v3 0/5] Software breakpoints support for ARM linux " Antoine Tremblay
2015-10-20 16:48 ` [PATCH v3 1/5] Add the target_ops needed for software breakpoints " Antoine Tremblay
2015-10-21 11:22 ` Pedro Alves [this message]
2015-10-20 16:48 ` [PATCH v3 5/5] Support software breakpoints for ARM linux " Antoine Tremblay
2015-10-21 13:12 ` Pedro Alves
2015-10-20 16:49 ` [PATCH v3 4/5] Refactor the breakpoint definitions in linux-arm-low.c Antoine Tremblay
2015-10-21 13:04 ` Pedro Alves
2015-10-20 16:49 ` [PATCH v3 2/5] Support breakpoint kinds for software breakpoints in GDBServer Antoine Tremblay
2015-10-21 11:49 ` Pedro Alves
2015-10-21 14:19 ` Antoine Tremblay
2015-10-21 14:23 ` Pedro Alves
2015-10-21 14:41 ` Antoine Tremblay
2015-10-22 15:17 ` Ulrich Weigand
2015-10-22 15:54 ` Antoine Tremblay
2015-10-20 16:55 ` [PATCH v3 3/5] Implement breakpoint_kind_from_pc and sw_breakpoint_from_kind for ARM " Antoine Tremblay
2015-10-21 12:04 ` Pedro Alves
2015-10-21 13:34 ` [PATCH v3 0/5] Software breakpoints support for ARM linux " Pedro Alves
2015-10-21 18:44 ` Yao Qi
2015-10-21 19:31 ` Antoine Tremblay
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=56277491.6070807@redhat.com \
--to=palves@redhat.com \
--cc=antoine.tremblay@ericsson.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