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: [commit/AIX] Debugger is crashing when debugging program


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 (&current_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 (&current_target);

I'm curious, why &current_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


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