This is the mail archive of the gdb@sourceware.org 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]

Re: attach gdbserver to itself


Daniel Jacobowitz wrote:
On Wed, Jan 24, 2007 at 08:48:05PM +0800, Bin Chen wrote:
But if I start program by gdbserver :9988 program, it can catch the error. What is the difference? How can I revise my code to make above code has same effect like starting the program by gdbserver?

It should work fine. You need to explain exactly what happens, what
commands you use, and what output you get.
Thanks for your quick reply!
Yes, it should :) I just run

target remote board:9988
bt

The source code is large, so I can't paste all the code here. I am looking for anyone has similar case...

binch@binary-ubuntu:~/work/Project/code/app_engine/APWifiCtrl$ arm_v4t_le-gdb src/wifictrld -x cmd
GNU gdb 6.0 (MontaVista 6.0-11.0.6.0401382 2004-10-08)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=armv4tl-hardhat-linux"...
0x4002c8f0 in ?? ()
(gdb) bt
#0 0x4002c8f0 in wait () from /home/binch/work/Project/image/src/docimage/lib/libpthread.so.0
#1 0x0000d680 in segv_handler(int) (no=11) at wifictrld.cpp:88
#2 0x4002b570 in pthread_barrierattr_setpshared () from /home/binch/work/Project/image/src/docimage/lib/libpthread.so.0
#3 0x0000d680 in segv_handler(int) (no=-1) at wifictrld.cpp:88
Previous frame inner to this frame (corrupt stack?)
(gdb) quit
The program is running. Exit anyway? (y or n) y


I also show my cxxflags:

arm_v4t_le-g++ -o wifictrld.o -c -g wifictrld.cpp -O0 -g -pipe -fPIC -fno-rtti -fno-exceptions -mapcs-32 -march=armv5te -mtune=arm9e -DAPDebug=1 -DDBGLOG=1 -DBGTIME=1 -DEXT_RELEASE=0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]