This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: What to do with threads?
- From: Quality Quorum <qqi at theworld dot com>
- To: Andrew Cagney <ac131313 at redhat dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Mon, 3 Feb 2003 11:58:56 -0500
- Subject: Re: What to do with threads?
On Sun, 2 Feb 2003, Andrew Cagney wrote:
> Hello,
>
> To put it simply, how can one fix this:
>
> static CORE_ADDR
> d10v_read_pc (ptid_t ptid)
> {
> ....
> read_register (PC_REGNUM);
> ....
> }
>
> There are problems at many levels. Off the top of my head:
>
> - ptid can identify a thread and/or a LWP
> - there sometimes isn't even a thread and/or a LWP
> - the selected and current thread both fight over the same global data
> structures
> - long long term, an objective is to have gdb debug multiple processes /
> ISAs
> - so long term that it is probably funny, an objective is to have gdb
> debugging multiple targets
>
> I think we've fought the frame battle and won (the casualties will take
> ages to recover mind :-), the thread battle, I think, is next.
Again, the battle would much easier if we will refactor to C++ ASAP.
>
> Andrew
>
Thanks,
Aleksey