This is the mail archive of the gdb@sources.redhat.com 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: qL and qf remote packets [Re: [Kgdb-bugreport] Re: [discuss]kgdb-x86_64-1.6 for kernel 2.4.23]


Andrew Cagney wrote:
On Tue, Dec 30, 2003 at 06:11:29PM +0530, Amit S. Kale wrote:

While q[s/f] packet itself doesn't have pid wrap-around problem, I can't figure out what will happen to gdb's database of threads in following scenario.

1. GDB adds a thread with id 1500 to thread database.
2. It finds that the thread has died later.
3. Does it delete the thread from its database?
4. It again finds a thread with id 1500 becase of wrapping around of pid. If it has completely forgotten about previous thread in its dabase, there shouldn't be any problem.



Indeed, there won't be any problem. I believe that even if thread 1500 exists, and then dies and restarts between breakpoints, GDB still won't get confused.


The user might (eventually). They aren't going to be notified of thread create/delete events. Also, it could leave around per-thread breakpoings no longer applicable to that thread.

I think this might be more of a problem in user land. In the kernel, first it is rare to reuse a pid, but still, if it is reused, it is expected. To help the user we also use the thread info command to insert the tasks name in the info thread command.



-- George Anzinger george@mvista.com High-res-timers: http://sourceforge.net/projects/high-res-timers/ Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml


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