c++gdbtombstone

how to get the info via the address of library(so) when in gdb


The process has crashed and grave(tombstone) been generated. It was triggered by signal 6(SIGABRT). And the backtrace is shallow:

signal 6 (SIGABRT), code 0 (?), fault addr --------
    r0 00000000  r1 000008b5  r2 00000006  r3 000008b5
    r4 00000006  r5 00000002  r6 2b094be4  r7 0000010c
    r8 00000038  r9 00000002  sl 2c653680  fp 2c653c98
    ip 2c655920  sp 2c653560  lr 2af9ecf4  pc 2af9d8d4  cpsr 20000010
backtrace:
    #00  pc 0002c8d4  /lib/libc.so.6 (raise+60)
    #01  pc ffffffff  <'unknown'>

in the stack, find the trace about the suspected library and also in the thread, transfer the address via the maps. To get more info about the symbols with the tool address2line. While the symbol may be in the .data section. The output like this:

$d
crtstuff.c:?

Then I want to get the info via the address of near the accident point from the library(so) in the runtime by gdb. Whether it feasible? If yes, how to do it?


Solution

  • how to do it?

    I think you are looking for (gdb) info symbol 0x123456