Re: kgdb for mainline kernel: core-lite [patch 1/3]

George Anzinger
2004-03-08T22:21:59Z

Andrew Morton wrote:
> "Amit S. Kale" <amitkale@emsyssoft.com> wrote:
>
>>>Let me just make sure we're taking about the same thing here. Are you
>>>saying that with kgdb-lite, `info threads' is completely missing, or does
>>>it just not work correctly with threads (as opposed to heavyweight
>>>processes)?
>>
>>info threads shows a list of threads. Heavy/light weight processes doesn't
>>matter. Thread frame shown is incorrect.
>
>
> It is? I haven't noticed any problems with it here. George recently
> changed it to also display the process name in the gdb output, which is
> valuable.
>
>
>>I looked at i386 dependent code again. Following code in it is incorrect. I
>>never noticed it because this code is rarely used in full version of kgdb:
>>
>>+void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct
>>*p)
>
>
> There is no such function in the stub in -mm kernels.
>
>
>>Present threads support code changes calling convention of do_IRQ. Most
>>believe that to be an absolute no.
>
>
> I see no such change in George's stub, unless I'm missing something again.

Amit and I went after the problem in rather different ways...
>
>
>>Since you consider it a must-have, I'll check whether above changes suggested
>>by me make info threads listing correct in most cases.
>
>
> The only problem I have with it is that sometimes after listing all threads
> the debugger can lose control of the target and will start complaining
> about communication errors. I assume the target has died. This happens
> very rarely. Usually when you're about to find the bug ;)

Yeah, you won't believe how much work it took to detect that ;)

--
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