[PATCH 05/11] gdbserver: remove get_thread_process
Aktemur, Tankut Baris
tankut.baris.aktemur@intel.com
Fri Nov 8 12:09:20 GMT 2024
On Thursday, November 7, 2024 7:27 PM, Simon Marchi wrote:
> Remove the `get_thread_process` function, use `thread_info::process`
> instead.
>
> In `server.cc`, use `current_process ()` instead of going through the
> current thread.
>
> Change-Id: Ifc61d65852e392d154b854a45d45df584ab3922e
> ---
...
> @@ -4139,7 +4134,7 @@ linux_process_target::resume_one_lwp_throw (lwp_info *lwp, int step,
> step = single_step (lwp);
> }
>
> - if (proc->tdesc != NULL && low_supports_breakpoints ())
> + if (thread->process ()->tdesc != NULL && low_supports_breakpoints ())
Now that this line is being touched, it might be worth changing NULL
to nullptr.
> {
> struct regcache *regcache = get_thread_regcache (current_thread, 1);
>
> @@ -4393,11 +4388,10 @@ linux_process_target::thread_needs_step_over (thread_info *thread)
> {
> struct lwp_info *lwp = get_thread_lwp (thread);
> CORE_ADDR pc;
> - struct process_info *proc = get_thread_process (thread);
>
> /* GDBserver is skipping the extra traps from the wrapper program,
> don't have to do step over. */
> - if (proc->tdesc == NULL)
> + if (thread->process ()->tdesc == NULL)
Same here.
Reviewed-By: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Thanks
-Baris
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
More information about the Gdb-patches
mailing list