This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [commit/AIX] Debugger is crashing when debugging program
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Joel Brobecker <brobecker at adacore dot com>
- Date: Sun, 15 Mar 2009 19:58:36 +0000
- Subject: Re: [commit/AIX] Debugger is crashing when debugging program
- References: <20090315194428.GA9576@adacore.com>
On Sunday 15 March 2009 19:44:28, Joel Brobecker wrote:
> static int
> aix_thread_thread_alive (struct target_ops *ops, ptid_t ptid)
> {
> + struct target_ops *beneath = find_target_beneath (¤t_target);
> +
> if (!PD_TID (ptid))
> - return base_target.to_thread_alive (ops, ptid);
> + return beneath->to_thread_alive (beneath, ptid);
>
> @@ -1698,9 +1693,10 @@ static char *
> aix_thread_pid_to_str (struct target_ops *ops, ptid_t ptid)
> {
> static char *ret = NULL;
> + struct target_ops *beneath = find_target_beneath (¤t_target);
I'm curious, why ¤t_target here instead of 'ops'? This will call
aix_thread_thread_alive and aix_thread_pid_to_str two times, as
current_target.beneath == aix_thread.
--
Pedro Alves