This is the mail archive of the
mailing list for the Archer project.
Re: gdbstub initial code, another approach
On Wed, 28 Jul 2010 20:17:02 +0200, Oleg Nesterov wrote:
> - the testing was very limited. I played with it about
> an hour and didn't find any problems, vut that is all.
> Btw, gdb crashes very often right after
> (gdb) set target-async on
> (gdb) set non-stop
> (gdb) file mt-program
> (gdb) target extended-remote :port
> (gdb) attach its_pid
> I didn't even try to investigate (this doesn't happen when
> it works with the real gdbserver). Just retry, gdb is buggy.
Trying it with both /bin/sleep and a threaded testcase and I never got a crash
(kernel-184.108.40.206-147.fc13.x86_64 as both host and KVM guest OS).
$ killall gdbstub;~/redhat/threadit&p=$!;~/redhat/gdbstub &>~/redhat/out&sleep 0.1;./gdb -nx -ex 'set target-async on' -ex 'set non-stop' -ex "file $HOME/redhat/threadit" -ex 'target extended-remote :2000' -ex "attach $p" -ex 'set confirm no';kill $p;
gdbstub: no process killed
GNU gdb (GDB) 220.127.116.1100802-cvs
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /home/jkratoch/redhat/threadit...done.
Remote debugging using :2000
Attached to process 22822
[New Thread 22822.22822]
[New Thread 22822.22825]
Reading symbols from /lib64/libpthread.so.0...Reading symbols from /usr/lib/debug/lib64/libpthread-2.12.so.debug...done.
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /lib64/libc.so.6...Reading symbols from /usr/lib/debug/lib64/libc-2.12.so.debug...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from /usr/lib/debug/lib64/ld-2.12.so.debug...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
0x00007fead8db6fbd in pthread_join (threadid=140646633633552, thread_return=0x0) at pthread_join.c:89
89 lll_wait_tid (pd->tid);
[Thread 22822.22825] #2 stopped.
0x00007fead8ad6a6d in nanosleep () at ../sysdeps/unix/syscall-template.S:82
82 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
Current language: auto
The current source language is "auto; currently asm".
2 Thread 22822.22825 0x00007fead8ad6a6d in nanosleep () at ../sysdeps/unix/syscall-template.S:82
* 1 Thread 22822.22822 0x00007fead8db6fbd in pthread_join (threadid=140646633633552, thread_return=0x0) at pthread_join.c:89
+ Done ~/redhat/gdbstub &>~/redhat/out
+ Terminated ~/redhat/threadit