This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 01/13 v2] Introduce current_lwp_ptid


Gary Benson writes:
 > This commit introduces a new function, current_lwp_ptid, that
 > shared Linux code can use to obtain the ptid of the current
 > lightweight process.
 > 
 > gdb/ChangeLog:
 > 
 > 	* nat/linux-nat.h (current_lwp_ptid): New declaration.
 > 	* linux-nat.c (current_lwp_ptid): New function.
 > 	* x86-linux-nat.c: Include nat/linux-nat.h.
 > 	(x86_linux_dr_get_addr): Use current_lwp_ptid.
 > 	(x86_linux_dr_get_control): Likewise.
 > 	(x86_linux_dr_get_status): Likewise.
 > 	(x86_linux_dr_set_control): Likewise.
 > 	(x86_linux_dr_set_addr): Likewise.
 > 
 > gdb/gdbserver/ChangeLog:
 > 
 > 	* linux-low.c (current_lwp_ptid): New function.
 > 	* linux-x86-low.c: Include nat/linux-nat.h.
 > 	(x86_dr_low_get_addr): Use current_lwp_ptid.
 > 	(x86_dr_low_get_control): Likewise.
 > 	(x86_dr_low_get_status): Likewise.
 > ---
 >  gdb/ChangeLog                 |   11 +++++++++++
 >  gdb/gdbserver/ChangeLog       |    8 ++++++++
 >  gdb/gdbserver/linux-low.c     |    8 ++++++++
 >  gdb/gdbserver/linux-x86-low.c |   13 ++++---------
 >  gdb/linux-nat.c               |    9 +++++++++
 >  gdb/nat/linux-nat.h           |    5 +++++
 >  gdb/x86-linux-nat.c           |   11 ++++++-----
 >  7 files changed, 51 insertions(+), 14 deletions(-)
 > 
 > diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
 > index 8776670..6e1ed8a 100644
 > --- a/gdb/gdbserver/linux-low.c
 > +++ b/gdb/gdbserver/linux-low.c
 > @@ -6035,6 +6035,14 @@ linux_low_read_btrace (struct btrace_target_info *tinfo, struct buffer *buffer,
 >  }
 >  #endif /* HAVE_LINUX_BTRACE */
 >  
 > +/* See common/common-inferior.h.  */
 > +
 > +ptid_t
 > +current_lwp_ptid (void)
 > +{
 > +  return ptid_of (current_thread);
 > +}
 > +

Hi.

Nit I just noticed.  s,common/common-inferior.h,nat/linux-nat.h,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]