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] |
There is a patch for Thread Support for remote debug with use gdbserver (for x86 target only). There is created on GDB_5_0 with remote symbol lookup support (check in ~/src/gdb/remote.c file) WARNING: I don't known how this patch work with current gdb, we still use gdb_5_0 with remote symbol lookup. This version of gdbserver not properly work when we dynamic add or delete thread, we need wait for all thread are created - from this point we can use work with multi-thread. Support new request : qC - current thread query qP - thread info qL - thread list query Hg - set general thread P - write single register X - write memory bin Z - add BW point (software breakpoint ONLY) z - remove BW point (software breakpoint ONLY) zz - remove All BW point (software breakpoint ONLY) qSymbol - form host to target Initialize Thread support after GDB send this request qSymbol - form target to host remote symbol lookup BELLOW is simply Makefile for create image (WE MUST STATIC LINK libpthread into our image) mjk: mjk.o gcc -v -o mjk -Wall -g mjk.o /usr/lib/libpthread.a mjk.o: mjk.c gcc -v -Wall -g -c mjk.c clean: rm -f mjk core rm -f mjk.o *~ HOW WORK with thread and gdbserver: TARGET SIDE: gdbserver [IP:PORT]|[serial port] <image_name> <image_parameters> HOST SIDE: 1) run gdb (if we use window we need open console window) 2) "target remote [IP:PORT]|[serial port id]" 3) "symbol <image_name_with_symbols>" 4) "break main" 5) "continue" 6) "break xxx" - xxx mean we need set break in out code after ALL THRERAD ARE CREATED,, if we need wait I add "sleep(30)" in source code and set break after this sleep. ---------------------------------------------------------------------------- ---------- Michal Korbel - Software engineer Intel Technology Poland Sp. z o.o.; ul. Slowackiego 173; 80-298 Gdansk tel. +48 58 34-81-726; fax: +48 58 34-81-505; mobile:+48 603-203-142 ---------------------------------------------------------------------------- ---------- -----Original Message----- From: Quality Quorum [mailto:qqi@theworld.com] Sent: Friday, February 01, 2002 6:43 PM To: Dan Kegel Cc: Korbel, Michal; gdb@sources.redhat.com Subject: Re: Thread Support for remote debugging On Fri, 1 Feb 2002, Dan Kegel wrote: > Cool. Can you post a patch, or an archive of your sources? > I'd like to link to it from http://www.kegel.com/linux/gdbserver.html > - Dan > > "Korbel, Michal" wrote: > > > > I was use source for gdbserver based on GDB 5.0, > > but I was add protocol support based on Quality Quorum source code > > (multithread and zbreak packet support) > > and move part of multithread support from GDB 5.0 core into gdbserver code. > > There are some bugs, but looks and work quite good. > > The most importent is: " we can start debug after all thread are created", > > there are problems with adding or deleting thread in internal thread list. Great to hear this, however, I would like to warn everybody (as an original developer) that there are some protocol issues to be fixed still, before serous advance could be achieved. There is also an issue of clearly formulating goals - in my view remote debugging has to provide the same functionality as local one. BTW, is it possible to set up mailing list to discuss this topic specifically ? Thanks, Aleksey ---------------------------------------------------------------------------- ---------- Michal Korbel - Software engineer Intel Technology Poland Sp. z o.o.; ul. Slowackiego 173; 80-298 Gdansk tel. +48 58 34-81-726; fax: +48 58 34-81-505; mobile:+48 603-203-142 ---------------------------------------------------------------------------- ----------
Attachment:
gdbserver.txt.gz
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |