This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 5/6] linux-nat: Add function lwp_is_stepping
Hi Andreas,
Patch is good to me. One nit below ...
On Thu, Sep 15, 2016 at 1:01 PM, Andreas Arnez <arnez@linux.vnet.ibm.com> wrote:
> Add the function lwp_is_stepping which indicates whether the given LWP
> is currently single-stepping. This is a common interface, usable from
> native GDB as well as from gdbserver.
"single-stepping" in hardware or software? I know it is hardware single
step.
>
> +/* Return nonzero if we are single-stepping this LWP. */
> +
> +extern int lwp_is_stepping (struct lwp_info *lwp);
> +
> #endif /* LINUX_NAT_H */
in gdbserver,
struct lwp_info
{
....
/* If this flag is set, the last continue operation at the ptrace
level on this process was a single-step. */
int stepping;
in gdb,
struct lwp_info
{
...
/* Non-zero if we were stepping this LWP. */
int step;
Looks the comments in gdbservers is better than the comments in
gdb. lwp_is_stepping, as an api, should be documented clearly.
Something like,
/* Return nonzero if we are single-stepping this LWP at the
ptrace level. */
--
Yao (齐尧)