This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Introduce utility function find_inferior_ptid
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: simon dot marchi at ericsson dot com, gdb-patches at sourceware dot org
- Date: Sat, 13 Dec 2014 18:36:46 -0500
- Subject: Re: [PATCH] Introduce utility function find_inferior_ptid
- Authentication-results: sourceware.org; auth=none
- References: <1418412193-6259-1-git-send-email-simon dot marchi at ericsson dot com> <20141213144058 dot GI5457 at adacore dot com> <548CBBBC dot 1090909 at polymtl dot ca>
> Oops, it's a very good thing you made me test the patch again, because
> there is an horrible, obvious mistake in:
>
> struct inferior *
> find_inferior_ptid (ptid_t ptid) {
> return find_inferior_ptid (ptid);
So obvious, and yet I missed it...
> No significant changes before/after the patch in the regression suite
> on amd64 linux.
>
> gdb/ChangeLog:
>
> * inferior.c (find_inferior_ptid): New function.
> * inferior.h (find_inferior_ptid): New declaration.
> * ada-tasks.c (ada_get_task_number): Use find_inferior_ptid.
> * corelow.c (core_pid_to_str): Same.
> * darwin-nat.c (darwin_resume): Same.
> * infrun.c (fetch_inferior_event): Same.
> (get_inferior_stop_soon): Same.
> (handle_inferior_event): Same.
> (handle_signal_stop): Same.
> * linux-nat.c (resume_lwp): Same.
> (stop_wait_callback): Same.
> * mi/mi-interp.c (mi_new_thread): Same.
> (mi_thread_exit): Same.
> * proc-service.c (ps_pglobal_lookup): Same.
> * record-btrace.c (record_btrace_step_thread): Same.
> * remote-sim.c (gdbsim_close_inferior): Same.
> (gdbsim_resume): Same.
> (gdbsim_stop): Same.
> * sol2-tdep.c (sol2_core_pid_to_str): Same.
> * target.c (memory_xfer_partial_1): Same.
> (default_thread_address_space): Same.
> * thread.c (thread_change_ptid): Same.
> (switch_to_thread): Same.
> (do_restore_current_thread_cleanup): Same.
I re-scanned the patch, and it still looks OK to me. Give it
indeed the weekend in case a good soul looks it over as well,
but otherwise, go ahead, and push on Monday.
Thank you,
--
Joel