BUG: add_thread_silent()->switch_to_thread(minus_one_ptid) is wrong

Oleg Nesterov oleg@redhat.com
Mon Jul 19 13:44:00 GMT 2010


Hi.

I am trying to change ugdb.c to multiprocess mode, and now
I hit another bug in gdb.

	(gdb) target extended-remote /proc/ugdb
	(gdb) attach 980
	(gdb) info threads

results in

	thread.c:880: internal-error: switch_to_thread: Assertion `inf != NULL' failed.

Once again, I didn't see this problem in !multiprocess mode.

The immediate reason is clear, add_thread_silent() calls
switch_to_thread(minus_one_ptid), and find_inferior_pid(-1)
obviously fails. I guess add_thread_silent() is buggy and
should be fixed in any case.

But it is not clear to me what provokes this bug, gdb works
with gdbserver but not with /proc/ugdb.

Still investigaing...

Oleg.



More information about the Archer mailing list