• Home
  • History
  • Annotate
  • only in /dalvik/tools/gdbjithelper/
NameDateSize

..14-Feb-20134 KiB

Android.mk14-Feb-2013791

gdbjithelper.c14-Feb-20133.1 KiB

README.txt14-Feb-20131.8 KiB

README.txt

1Step 1
2
3If you see a native crash in the bugreport and the PC/LR are pointing to the
4code cache address range*, copy them into codePC and codeLR in gdbjithelper.c,
5respectively.
6
7*Caveats: debuggerd doesn't know the range of code cache. So apply this tool if
8the crashing address is not contained by any shared library.
9
10       #00  pc 463ba204
11       #01  lr 463ba1c9  <unknown>
12
13code around pc:
14463ba1e4 4300e119 4284aa7a f927f7b7 40112268
15463ba1f4 419da7f8 00002000 01000100 00080000
16463ba204 4191debc 01010000 4284aa74 68b00054
17463ba214 045cf205 cc016468 0718f2a5 d0102800
18463ba224 4c13c701 a20aa108 efb0f775 e008e010
19
20code around lr:
21463ba1a8 42e19e58 f2050050 cc01045c 0718f2a5
22463ba1b8 d00f2800 4c13c701 a20aa108 efe4f775
23463ba1c8 e007e010 29006bf8 6e77dc01 a10347b8
24463ba1d8 ef60f775 6db1480b 1c2d4788 4300e119
25463ba1e8 4284aa7a f927f7b7 40112268 419da7f8
26
27
28Step 2
29
30Push $OUT/EXECUTABLES/gdbjithelper_intermediates/LINKED/gdbjithelper to
31/system/bin on the device or emulator
32
33
34Step 3
35
36Debug the executable as usual:
37
38adb forward tcp:5039 tcp:5039
39adb shell gdbserver :5039 /system/bin/gdbjithelper &
40arm-eabi-gdb $OUT/symbols/system/bin/gdbjithelper
41(gdb) tar r :5039
42Remote debugging using :5039
43Remote debugging from host 127.0.0.1
44gdb: Unable to get location for thread creation breakpoint: requested event is not supported
45__dl__start () at bionic/linker/arch/arm/begin.S:35
4635      mov r0, sp
47gdb: Unable to get location for thread creation breakpoint: requested event is not supported
48Current language:  auto; currently asm
49(gdb) c
50Continuing.
51[New Thread 596]
52codePC[0]: 0x4300e119
53codePC[1]: 0x4284aa7a
54         :
55
56
57Step 4
58
59Hit ctrl-C
60
61Issue the following command to see code around PC
62x /20i (char *) &codePC+1
63
64Issue the following command to see code around LR
65x /20i (char *) &codeLR+1
66