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 : Multi-thread debug doesn't work with me :(


Hi Daniel,

Thanks for your quick answer!
Here is the output of my debug session.
I use gdb 6.4.0.20051202-cvs because I use Insight (graphical debugger), and the latest version of Insight uses this version.

********************
$ /bin/arm-linux-uclibc-gdb -b 9600 CAM/am.01.00.00.0002.WW00/appman/deliver/appman.sym
GNU gdb 6.4.0.20051202-cvs
Copyright 2005 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-cygwin --target=arm-linux-uclibc"...
(gdb) set solib-search-path /cygdrive/d/KitCOBRA/CAM/am.01.00.00.0002.WW00/deliver/lib:/kitlib
(gdb) target remote /dev/com1
Remote debugging using /dev/com1
0x40067a9c in ?? ()
(gdb) sharedlibrary
Symbols already loaded for /lib/libpthread.so.0
Symbols already loaded for /lib/libc.so.0
Symbols already loaded for /lib/libgcc_s.so.1
Symbols already loaded for /lib/libdl.so.0
Symbols already loaded for /cygdrive/d/KitCOBRA/CAM/am.01.00.00.0002.WW00/deliver/lib/libecr.so.1
Symbols already loaded for /cygdrive/d/KitCOBRA/CAM/am.01.00.00.0002.WW00/deliver/lib/libam.so.1
Symbols already loaded for /kitlib/libcap.so.1
Symbols already loaded for /kitlib/libdbcomp.so.0
Symbols already loaded for /kitlib/libgui.so.0
Symbols already loaded for /kitlib/libgencom.so.0
Symbols already loaded for /kitlib/libos.so.0
Symbols already loaded for /kitlib/libxml.so.0
Symbols already loaded for /kitlib/libtag.so.0
Symbols already loaded for /kitlib/libgdbm.so.2
Symbols already loaded for /kitlib/libsecstd.so.0
Symbols already loaded for /lib/ld-uClibc.so.0
(gdb) b keyb
keybGetAmount                                     keybWaitPressed(KEYB_WAIT_STRUCT*)
keybGetAmount(KEY_TYPE*)                          keybWaitPressed(KEYB_WAIT_STRUCT*)::__FUNCTION__
keybWaitPressed                                   keybtask.cpp
(gdb) b keybtask.cpp:226
Breakpoint 1 at 0x400b4574: file ../core/source/keybtask.cpp, line 226.
(gdb) continue
Continuing.
[New thread 1026]
[Switching to thread 1026]

Breakpoint 1, KeybExecuteService (f_wService=0, f_pMin=0x3dba0) at ../core/source/keybtask.cpp:226
226     ../core/source/keybtask.cpp: No such file or directory.
        in ../core/source/keybtask.cpp
(gdb) list
221     in ../core/source/keybtask.cpp
(gdb) p f_
f_pMin      f_wService
(gdb) p f_wService
$1 = 0
(gdb) n
[New thread 3076]

************************
Here, I press n for next, but it is like if the application continues.
I stay stucked until I press control-C:
************************
Program received signal SIGINT, Interrupt.
[Switching to thread 3076]
0x40068474 in nanosleep () from /lib/libc.so.0
(gdb) Quit
(gdb) l
221     in ../core/source/keybtask.cpp
(gdb) s
Single stepping until exit from function nanosleep,
which has no line number information.
0x40018250 in nanosleep () from /lib/libpthread.so.0

************************
I press multiple times control-C:
************************
(gdb)
Single stepping until exit from function nanosleep,
which has no line number information.
0x4012ee80 in OS_TaskSuspendSelf () from /kitlib/libos.so.0
(gdb) Quit
(gdb)
Single stepping until exit from function OS_TaskSuspendSelf,
which has no line number information.

Program received signal SIGINT, Interrupt.
0x4012ee90 in OS_TaskSuspendSelf () from /kitlib/libos.so.0
(gdb) Quit
(gdb)
Single stepping until exit from function OS_TaskSuspendSelf,
which has no line number information.

Program received signal SIGINT, Interrupt.
0x4012ee90 in OS_TaskSuspendSelf () from /kitlib/libos.so.0
(gdb) Quit
(gdb)
Single stepping until exit from function OS_TaskSuspendSelf,
which has no line number information.
ManUnblock (fTask=4) at ../core/source/taskapi.cpp:346
346     ../core/source/taskapi.cpp: No such file or directory.
        in ../core/source/taskapi.cpp
(gdb) Quit



So now, I'm able to print values of variables, and the debugger knows where it is.
But it seems it cannot read the source file containg the code where I put the breakpoint:
it gaves me the error  "../core/source/taskapi.cpp: No such file or directory."
This file is a part of a shared library that is linked with my application (libam.so)
I don't understand why it gave me this error, because the symbols are loaded and I don't move the library from the place it was generated.

Anyway, the result is the same: when I step in after my breakpoint, the debugger don't give me back the hand and the application continue its execution.
When I press continue, the result is the same.

Do you have an idea on where it comes?
Thanks by advance


Matthieu HAMEAU




----- Message d'origine ----
De : Daniel Jacobowitz <drow@false.org>
à : Matt HAMEAU <mhameau@yahoo.fr>
Cc : gdb@sourceware.org
Envoyà le : Mardi, 29 AoÃt 2006, 3h49mn 39s
Objet : Re: Multi-thread debug doesn't work with me :(

On Tue, Aug 29, 2006 at 01:47:27PM +0000, Matt HAMEAU wrote:
> But, when I try to debug a process that create multiple pthreads, I cannot get into those threads and the debugger crashes:
> - I connect to the board
> - I set up a breakpoint in a function that will be executed by one of the thread (created by pthread_create)
> - I launch the remote debug
> - when the thread reaches the breakpoint, the debugger stops
> - debugger is lost, it is impossible to have any information on the current line of the code or on any variables

Please be more specific.  What happens?

> - I "continue" the debug: the debugger crashes.

Ditto.  We can only respond to precise bug reports.

> $ arm-linux-uclibc-gdb.exe --version
> GNU gdb 6.3
> Copyright 2004 Free Software Foundation, Inc.

You might want to try GDB 6.5.  Also, have you set up a solib prefix?

-- 
Daniel Jacobowitz
CodeSourcery




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