Openmoko Bug #1890: gdb problems (single stepping and debug symbol table)
Openmoko Public Trac
bugs at docs.openmoko.org
Thu Aug 28 14:32:31 CEST 2008
#1890: gdb problems (single stepping and debug symbol table)
----------------------+-----------------------------------------------------
Reporter: h.koenig | Owner: openmoko-devel
Type: defect | Status: new
Priority: normal | Milestone:
Component: unknown | Version:
Severity: normal | Keywords:
Blockedby: | Reproducible:
Blocking: |
----------------------+-----------------------------------------------------
trying to debug Xglamo I have (at least) two problems with gdb (Om 2008.8
+ zecke-dev) :
1)
using instruction stepping (si) doesn't seem to work for
instruction "bxcc lr" -- the program just "continues" in free run.
for "bx lr" gdb stops at address lr as expected.
btw: where can I find some (gnu) arm assembler docs/tutorial
which mention and explain bxcc (and the other opcodes;) ?
working example with "bx lr":
0x000fdfa4 in ?? ()
1: x/i $pc 0xfdfa4: bx lr
(gdb) print/x $lr
$2 = 0xf5be4
(gdb) si
0x000f5be4 in GetTimeInMillis ()
1: x/i $pc 0xf5be4 <GetTimeInMillis+44>: add r0, r4, r0
voila..
non-working example with "bxcc lr":
0x401f88b0 in gettimeofday () from /lib/libc.so.6
1: x/i $pc 0x401f88b0 <gettimeofday+16>: cmn r0, #4096 ;
0x1000
(gdb) si
0x401f88b4 in gettimeofday () from /lib/libc.so.6
1: x/i $pc 0x401f88b4 <gettimeofday+20>: bxcc lr
(gdb) p/x $lr
$3 = 0xf5bcc
(gdb) si
Breakpoint 2, 0x000f5bcc in GetTimeInMillis ()
1: x/i $pc 0xf5bcc <GetTimeInMillis+20>: mov r3, #1000 ;
0x3e8
(gdb)
without that breakpoint #2 at address 0xf5bcc gdb wouldn't have stopped
:-(
btw: address 0x000fdfa4 in the 1st example is in __divsi3, one
of the many "invisible" symbols (only ~350 out of 3314 symbols
show up in gdb for Xglamo)
nm .debug/Xglamo | sort | grep ^000f
...
000fdef0 T __aeabi_idiv
000fdef0 T __divsi3
000fe01c T __aeabi_idivmod
this is my other big gdb problem:
2)
gdb doesn't show/use all symbols in the debug symbol image. e.g. for
symbols starting with "w" only 6 out of 12 symbols can be used:
(gdb) b W<TAB>
WantFontInfo WellKnownConnections WindowTable
WriteToClient Write_CVT Write_CVT_Stretched
(gdb)
but:
harald om > nm .debug/Xglamo | grep -i " t w" | sort +2 | wc
12 36 359
harald om > nm .debug/Xglamo | grep -i " t w" | sort +2
000ed7f8 T WaitForSomething
0001ef3c T WakeupHandler
000245e8 T WalkTree
00024a18 t WindowExtents
0003d5f8 T WindowHasNewCursor
0003fe68 T WindowsRestructured
0003bb64 T WriteEventsToClient
000462d8 T WriteSConnSetupPrefix
000478d8 T WriteSConnectionInfo
000ae73c t WriteSwappedPortNotifyEvent
000ae698 t WriteSwappedVideoNotifyEvent
000f297c T WriteToClient
more examples on devel-list "Subject: Xglamo loops and hangs..."
any help or insights ?
thanks!
--
Ticket URL: <https://docs.openmoko.org/trac/ticket/1890>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
More information about the buglog
mailing list