This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Rename current_inferior as current_thread in gdbserver
- From: Pedro Alves <palves at redhat dot com>
- To: Gary Benson <gbenson at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 16 Sep 2014 10:34:47 +0100
- Subject: Re: [PATCH] Rename current_inferior as current_thread in gdbserver
- Authentication-results: sourceware.org; auth=none
- References: <1410345589-29648-1-git-send-email-gbenson at redhat dot com>
OK, but note:
On 09/10/2014 11:39 AM, Gary Benson wrote:
> gdb/gdbserver/ChangeLog:
>
> * inferiors.h (current_inferior): Renamed as...
> (current_thread): New variable. All uses updated.
> * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
> (maybe_move_out_of_jump_pad): Likewise.
> (cancel_breakpoint): Likewise.
> (linux_low_filter_event): Likewise.
> (wait_for_sigstop): Likewise.
> (linux_resume_one_lwp): Likewise.
> (need_step_over_p): Likewise.
> (start_step_over): Likewise.
> (linux_stabilize_threads): Renamed save_inferior as saved_thread.
> * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
> * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
> and save_inferior as saved_thread.
> * regcache.c (get_thread_regcache): Renamed saved_inferior as
> saved_thread.
> (regcache_invalidate_thread): Likewise.
> * remote-utils.c (prepare_resume_reply): Likewise.
> * thread-db.c (thread_db_get_tls_address): Likewise.
> (disable_thread_event_reporting): Likewise.
> (remove_thread_event_breakpoints): Likewise.
> * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
> as saved_thread.
> ---
> gdb/gdbserver/ChangeLog | 26 +++++
> gdb/gdbserver/gdbthread.h | 2 +-
> gdb/gdbserver/inferiors.c | 12 +-
> gdb/gdbserver/inferiors.h | 4 +-
> gdb/gdbserver/linux-aarch64-low.c | 6 +-
> gdb/gdbserver/linux-arm-low.c | 14 ++--
> gdb/gdbserver/linux-cris-low.c | 2 +-
> gdb/gdbserver/linux-crisv32-low.c | 10 +-
> gdb/gdbserver/linux-low.c | 210 ++++++++++++++++++------------------
> gdb/gdbserver/linux-mips-low.c | 10 +-
> gdb/gdbserver/linux-nios2-low.c | 2 +-
> gdb/gdbserver/linux-s390-low.c | 2 +-
> gdb/gdbserver/linux-sparc-low.c | 2 +-
> gdb/gdbserver/linux-tile-low.c | 2 +-
> gdb/gdbserver/linux-x86-low.c | 22 ++--
> gdb/gdbserver/lynx-low.c | 16 ++--
> gdb/gdbserver/mem-break.c | 6 +-
> gdb/gdbserver/nto-low.c | 20 ++--
> gdb/gdbserver/proc-service.c | 14 ++--
> gdb/gdbserver/regcache.c | 14 ++--
> gdb/gdbserver/remote-utils.c | 14 ++--
> gdb/gdbserver/server.c | 24 ++--
> gdb/gdbserver/target.c | 4 +-
> gdb/gdbserver/tdesc.c | 2 +-
> gdb/gdbserver/thread-db.c | 22 ++--
> gdb/gdbserver/tracepoint.c | 14 ++--
> gdb/gdbserver/win32-low.c | 12 +-
> 27 files changed, 257 insertions(+), 231 deletions(-)
The ChangeLog appears incomplete.
> --- a/gdb/gdbserver/target.c
> +++ b/gdb/gdbserver/target.c
> @@ -34,9 +34,9 @@ set_desired_inferior (int use_general)
^^^^^^^^^^^^^^^^^^^^
It'd be good to rename that function too, along with the comments
in the callers. Either now or as follow up.
> found = find_thread_ptid (cont_thread);
>
> if (found == NULL)
> - current_inferior = get_first_thread ();
> + current_thread = get_first_thread ();
> else
> - current_inferior = found;
> + current_thread = found;
> }
>
Thanks,
Pedro Alves