Recent

Author Topic: Resolving stacktrace  (Read 2064 times)

BeniBela

  • Hero Member
  • *****
  • Posts: 905
    • homepage
Resolving stacktrace
« on: December 03, 2017, 10:03:33 pm »
I am still trying to find my crash from the last post, and now I cannot even resolve the stacktrace anymore.

What would prevent gdb/addr2line from resolving a stacktrace?

The appstore gives two numbers. 00000000000e686c and  00000000000e5ba8

But gdb and addr2line says they are nowhere:
Code: [Select]
arm-linux-androideabi-addr2line -e    liblclapp.unstripped.arm.so  0x00000000000e686c 0x00000000000e5ba8
/home/theo/hg/programs/internet/VideLibri/android/videlibriandroid.pas:31
/home/theo/hg/programs/internet/VideLibri/android/videlibriandroid.pas:31


GNU gdb (GDB; openSUSE Tumbleweed) 8.0.1
Reading symbols from liblclapp.unstripped.arm.so...done.
(gdb) disassemble /rm *0xe686c
No function contains specified address.
(gdb) disassemble /rm *0xe5ba8
No function contains specified address.



But from the last time, I know they are in inheritsfrom/fpc_do_is. And GDB does know that, too, when asked for the function:

Code: [Select]
(gdb) disassemble /rm SYSTEM$_$TOBJECT_$__$$_INHERITSFROM$TCLASS$$BOOLEAN
Dump of assembler code for function SYSTEM$_$TOBJECT_$__$$_INHERITSFROM$TCLASS$$BOOLEAN:
   0x000e6860 <+0>:     00 00 51 e3     cmp     r1, #0
   0x000e6864 <+4>:     0e 00 00 0a     beq     0xe68a4 <SYSTEM$_$TOBJECT_$__$$_INHERITSFROM$TCLASS$$BOOLEAN+68>
   0x000e6868 <+8>:     05 00 00 ea     b       0xe6884 <SYSTEM$_$TOBJECT_$__$$_INHERITSFROM$TCLASS$$BOOLEAN+36>
   0x000e686c <+12>:    08 20 90 e5     ldr     r2, [r0, #8]
   0x000e6870 <+16>:    00 00 52 e3     cmp     r2, #0
   0x000e6874 <+20>:    08 20 90 15     ldrne   r2, [r0, #8]
   0x000e6878 <+24>:    00 20 92 15     ldrne   r2, [r2]
   0x000e687c <+28>:    00 20 a0 03     moveq   r2, #0
   0x000e6880 <+32>:    02 00 a0 e1     mov     r0, r2
   0x000e6884 <+36>:    00 00 50 e3     cmp     r0, #0
   0x000e6888 <+40>:    01 00 00 0a     beq     0xe6894 <SYSTEM$_$TOBJECT_$__$$_INHERITSFROM$TCLASS$$BOOLEAN+52>
   0x000e688c <+44>:    01 00 50 e1     cmp     r0, r1
   0x000e6890 <+48>:    f5 ff ff 1a     bne     0xe686c <SYSTEM$_$TOBJECT_$__$$_INHERITSFROM$TCLASS$$BOOLEAN+12>
   0x000e6894 <+52>:    01 00 50 e1     cmp     r0, r1
   0x000e6898 <+56>:    01 00 a0 03     moveq   r0, #1
   0x000e689c <+60>:    00 00 a0 13     movne   r0, #0
   0x000e68a0 <+64>:    00 00 00 ea     b       0xe68a8 <SYSTEM$_$TOBJECT_$__$$_INHERITSFROM$TCLASS$$BOOLEAN+72>
   0x000e68a4 <+68>:    00 00 a0 e3     mov     r0, #0
   0x000e68a8 <+72>:    1e ff 2f e1     bx      lr
End of assembler dump.
(gdb) disassemble /rm fpc_do_is
Dump of assembler code for function fpc_do_is:
   0x000e5b88 <+0>:     08 40 2d e9     push    {r3, lr}
   0x000e5b8c <+4>:     00 20 a0 e1     mov     r2, r0
   0x000e5b90 <+8>:     00 00 51 e3     cmp     r1, #0
   0x000e5b94 <+12>:    07 00 00 0a     beq     0xe5bb8 <fpc_do_is+48>
   0x000e5b98 <+16>:    00 00 52 e3     cmp     r2, #0
   0x000e5b9c <+20>:    05 00 00 0a     beq     0xe5bb8 <fpc_do_is+48>
   0x000e5ba0 <+24>:    00 00 91 e5     ldr     r0, [r1]
   0x000e5ba4 <+28>:    02 10 a0 e1     mov     r1, r2
   0x000e5ba8 <+32>:    2c 03 00 eb     bl      0xe6860 <SYSTEM$_$TOBJECT_$__$$_INHERITSFROM$TCLASS$$BOOLEAN>
   0x000e5bac <+36>:    00 00 50 e3     cmp     r0, #0
   0x000e5bb0 <+40>:    01 00 a0 13     movne   r0, #1
   0x000e5bb4 <+44>:    00 00 00 1a     bne     0xe5bbc <fpc_do_is+52>
   0x000e5bb8 <+48>:    00 00 a0 e3     mov     r0, #0
   0x000e5bbc <+52>:    08 80 bd e8     pop     {r3, pc}
End of assembler dump.

How can it forget what at the address is, when it knows that the function is at that address?

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Resolving stacktrace
« Reply #1 on: December 04, 2017, 07:02:37 pm »
Never used Android and may be this is a stupid question but, are you sure that you compiled with debug information (if it is available)?
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

BeniBela

  • Hero Member
  • *****
  • Posts: 905
    • homepage
Re: Resolving stacktrace
« Reply #2 on: December 25, 2017, 07:23:47 pm »
Never used Android and may be this is a stupid question but, are you sure that you compiled with debug information (if it is available)?

It has to have debug information, since disassemble /rm SYSTEM$_$TOBJECT_$__$$_INHERITSFROM$TCLASS$$BOOLEAN worked


 

TinyPortal © 2005-2018