Questions tagged [addr2line]

addr2line translates program addresses into file names and line numbers.

43 questions
1
vote
0 answers

BFD unknown command when using gaddr2line

I'm trying to use gaddr2line to print a prettier version of backtrace symbols. I'm just getting the addresses from backtrace() then feeding them to gaddr2line by executing it using popen. Using addr2line under linux works fine, but for some reason…
PseudoPsyche
  • 4,332
  • 5
  • 37
  • 58
1
vote
1 answer

Why addr2line is not able to resolve certain address to function names?

I have backtraces obtained from executing the command dumpheap -n . I have to convert these address to function names and line numbers to make these backtraces meaningful. I used addr2line to convert these addresses to function names.…
Naresh Kumar
  • 277
  • 4
  • 18
1
vote
1 answer

How do I use addr2line for Android?

My code (a game using AndEngine with PhysicsBox2DExtension on Android) is crashing and it has been suggested that I use addr2line, but I have absolutely not idea how to do it and the many "tutorials" I've looked at are extraordinarily vague. Perhaps…
rphello101
  • 1,671
  • 5
  • 31
  • 59
0
votes
1 answer

Get source location for address at runtime using debug information

In my C program, I have an instruction pointer that points to some address in virtual memory, e.g., a function pointer. I would like to map this address to the corresponding source location (file path, line number) using the debug information in the…
PEAR
  • 685
  • 3
  • 10
  • 20
0
votes
0 answers

How to get line number for native crash in Android?

I have a native library and a backtrace from internal crash reporting tool that provides me exact addresses where the crash has occurred. I used addr2line tool and found that it was our own native library where crash is occurring. However, I am just…
Embydextrous
  • 1,611
  • 1
  • 12
  • 20
0
votes
0 answers

How to covert the address from KCOV output to filename:lineno using addr2line?

I want to use KCOV (code coverage for fuzzing) in the Linux kernel to record the coverage of certain system calls. I have enabled the corresponding kernel configs started with the code example in the documentation: #include #include…
Jeffrey
  • 59
  • 1
  • 5
0
votes
0 answers

why line number in .debug_line shows 0?

Why I'm seeing so many 0 Line number addresses in recently file compiled by clang? like the result from llvm-dwarfdump below: Address Line Column File ISA Discriminator Flags ------------------ ------ ------ ------ --- -------------…
joey jiao
  • 1
  • 1
0
votes
1 answer

how to get line numbers same as lldb using atos/addr2line/llvm-symbolizer/lldb image lookup --address

I want to programmatically convert backtrace stack addresses (eg obtained from backtrace_symbols/libunwind) to file:line:column. I'm on OSX but doubt this makes a difference. All of these give wrong line number (line 11) for the call to…
timotheecour
  • 3,104
  • 3
  • 26
  • 29
0
votes
1 answer

addr2line with archive files

I am trying to use addr2line with a archive file libdpdk.a I have a backtrace: backtrace returned: 7 0: 0x46fd05 ./build/ip_pipeline(bt+0x25) [0x46fd05] 1: 0x42a163 ./build/ip_pipeline() [0x42a163] 2: 0x46ff21 ./build/ip_pipeline(rte_eal_init+0x171)…
Haswell
  • 1,573
  • 1
  • 18
  • 45
0
votes
1 answer

How to get function names from profile addresses?

I am putting together a performance profiler in Linux and I am having trouble mapping the collected stack trace information to function names. I am currently calling addr2line as follows from my post processing code FILE* pipe = popen("addr2line…
Krishna
  • 145
  • 1
  • 11
0
votes
1 answer

Making sense of the addr2line message with C++ STL

I have been having this rare segfault, and while debugging it, I managed to get the following output from addr2line program. void std::string::_S_copy_chars<__gnu_cxx::__normal_iterator
Sharath
  • 1,627
  • 2
  • 18
  • 34
0
votes
1 answer

GCC. Generate limited debug info

Is there a way to force gcc to generate only subset of full debug info that will be sufficient for addr2line utility? Or any way to strip unneeded? I've tried $ objcopy --only-keep-debug --remove-section=.debug_loc --remove-section=.debug_aranges…
Sergio
  • 8,099
  • 2
  • 26
  • 52
0
votes
1 answer

Get current execution path from within C library

I'm writing a logger library in C and am currently trying to get better backtrace output by using addr2line. In order to do so, I need to be able to get the path of the current executable. At the moment I am just concerned about linux, but will be…
PseudoPsyche
  • 4,332
  • 5
  • 37
  • 58
1 2
3