2008-01-14 22:55:37 Does GDB support attaching to process for catching process information?
new kernel (CHINA)
Message: 49575 Does GDB support attaching to process for catching process information? If so, How I do ?
QuoteReplyEditDelete
2008-01-14 23:23:22 Re: Does GDB support attaching to process for catching process information?
Mike Frysinger (UNITED STATES)
Message: 49576 please review the man page for gdbserver ... it explains the syntax, as does `gdbserver --help`
QuoteReplyEditDelete
2008-01-14 23:58:10 Re: Does GDB support attaching to process for catching process information?
new kernel (CHINA)
Message: 49578
Hi Mike ,
Can I use blackfin GDB's <tt>attach</tt> command to attach to a running process ?
QuoteReplyEditDelete
2008-01-15 01:23:30 Re: Does GDB support attaching to process for catching process information?
Mike Frysinger (UNITED STATES)
Message: 49579 that is what the documentation says
QuoteReplyEditDelete
2008-01-15 04:45:38 Re: Does GDB support attaching to process for catching process information?
new kernel (CHINA)
Message: 49582
Hi Mike ,
As the documention explains , the attach command syntax is : attatch pid , but I want to attach to the running remote process in the blackfin target board . Therefore ,has any approach to realize it ?
Thanks .
QuoteReplyEditDelete
2008-01-15 05:07:47 Re: Does GDB support attaching to process for catching process information?
Mike Frysinger (UNITED STATES)
Message: 49583 i really dont understand what the problem is
gdbserver runs *on the board*
you want to attach to a process *on the board*
so, follow the documentation and execute gdbserver on the board like normal
if you need help with remote debugging, please consult the wiki page:
http://docs.blackfin.uclinux.org/doku.php?id=debuggers
QuoteReplyEditDelete
2008-01-16 22:21:52 Re: Does GDB support attaching to process for catching process information?
new kernel (CHINA)
Message: 49703
Sorry, I can't explain my problem clearly. I develop my application with mulit-thread mechanism on blackfin platform. Of course , I m used to find the debugs out through gdb-server ,but sometimes I want to observe my application 's status after running a long times sush as 1 week , 2 weeks and so on, but gdb-server can't continue running if I detach Host GDB and I can't debug my application again which runs for a long time through host-gdb. Do you have good suggestion ?
QuoteReplyEditDelete
2008-01-16 23:15:49 Re: Does GDB support attaching to process for catching process information?
Robin Getz (UNITED STATES)
Message: 49706 I think you have been explaining things clearly.
I think Mike has been answering as well as he can.
Go read the man page for gdbserver. It should say something like:
gdbserver tty --attach PID
Did you try that?
QuoteReplyEditDelete
2008-01-17 04:35:28 Re: Does GDB support attaching to process for catching process information?
new kernel (CHINA)
Message: 49721
Hi Robin,
root> gdbserver localhost:3456 Test
Process Test created; pid = 97
Listening on port 3456
I can debug my Test program through gdbserver normally.
There is a problem in gdbserver with attach command :
target board:
root:~> gdbserver localhost:3456 --attach 98
Attached; pid = 98
Listening on port 3456
Remote debugging from host 172.26.10.50
Cannot attach to process 98: Operation not permitted (1)
root!~>
host:
(gdb) target remote 172.26.10.235:3456
Remote debugging using 172.26.10.235:3456
0x00218380 in __libc_nanosleep (req=<value optimized out>, rem=0x0)
at libc/sysdeps/linux/common/nanosleep.c:15
15 libc/sysdeps/linux/common/nanosleep.c: No such file or directory.
in libc/sysdeps/linux/common/nanosleep.c
Ignoring packet error, continuing...
Current language: auto; currently c
(gdb)