Questions tagged [dwarf]

DWARF is a file format for representing debugging information.

The DWARF format is used to represent information needed for source-level debugging of programs.

The DWARF format is designed to be processor architecture and operating system independent, and supports debugging of programs written in procedural languages like C, C++, FORTRAN, Ada, Java, Modula2 and Pascal.

DWARF is widely used in modern proprietary and open-source operating systems, for example, Linux, Android, BlackBerry OS 10 and others.

288 questions
114
votes
11 answers

How to disassemble one single function using objdump?

I've got a binary installed on my system, and would like to look at the disassembly of a given function. Preferrably using objdump, but other solutions would be acceptable as well. From this questions I've learned that I might be able to disassemble…
MvG
  • 57,380
  • 22
  • 148
  • 276
73
votes
2 answers

GAS: Explanation of .cfi_def_cfa_offset

I would like an explanation for the values used with the .cfi_def_cfa_offset directives in assembly generated by GCC. I know vaguely that the .cfi directives are involved in call frames and stack unwinding, but I would like a more detailed…
void-pointer
  • 14,247
  • 11
  • 43
  • 61
56
votes
5 answers

What's the difference between DWARF and DWARF with dSYM file?

XCode supports those 2 values for this Build Setting: Build Settings > Build Options > Debug Information Format. Could anybody explain the differences?
Lio
  • 4,225
  • 4
  • 33
  • 40
29
votes
1 answer

readelf -s does not output full variable names

I need to get the global symbols from a compiled c program file. What I use is the linux command readelf -s filePath when I use that command this is what I get: I draw a blue rectangle to show that variable names do not get displayed correctly.…
Tono Nam
  • 34,064
  • 78
  • 298
  • 470
28
votes
3 answers

Dwarf Error: wrong version in compilation unit header (is 4, should be 2)

A shared object was built on RedHat Linux and while all the code was compiled with debug, the debugger (gdb) refused to load the symbols and issued an error as in: ... GNU gdb Fedora (6.8-37.el5) ... This GDB was configured as…
Dror Harari
  • 3,076
  • 2
  • 27
  • 25
26
votes
4 answers

Library to read ELF file DWARF debug information

Any recommendations for a good cross-platform library for reading ELF file debug information in DWARF format? I'd like to read the DWARF debug info in a Python program.
Craig McQueen
  • 41,871
  • 30
  • 130
  • 181
18
votes
2 answers

Check DWARF version of compilation unit

all, is there a tool to check DWARF version of file? Something like this: $ dwarf_tool binary_name 4
usamytch
  • 373
  • 1
  • 5
  • 13
16
votes
4 answers

where/how does Apples GCC store DWARF inside an executable

Where/how does Apples GCC store DWARF inside an executable? I compiled a binary via gcc -gdwarf-2 (Apples GCC). However, neither objdump -g nor objdump -h does show me any debug information. Also libbfd does not find any debug information. (I asked…
Albert
  • 65,406
  • 61
  • 242
  • 386
15
votes
3 answers

How to find DWARF_DSYM_FOLDER_PATH and DWARF_DSYM_FILE_NAME in xcode 9.3

I am using the Crashlytics in order to report the crash occurs in the iOS app. Here, I want to know how to find the path of these below dwarf folder and file in xcode: DWARF_DSYM_FOLDER_PATH DWARF_DSYM_FILE_NAME
jazzbpn
  • 6,441
  • 16
  • 63
  • 99
14
votes
2 answers

Local variable location from DWARF info in ARM

I have a C program in file delay.c: void delay(int num) { volatile int i; for(i=0; i
LostBenjamin
  • 195
  • 1
  • 8
14
votes
0 answers

Is there a simple DWARF CFI represenation for functions that set up a conventional frame pointer?

I'm programming in a mix of C, C++ and assembly and I'd like to get reliable backtraces from any part of the code. This mostly works fine for the C and C++ code since I can generate debugging info with -g, which for modern x86 compilers and…
BeeOnRope
  • 60,350
  • 16
  • 207
  • 386
14
votes
6 answers

atos and dwarfdump won't symbolicate my address

I received a crash report via AirBrake.io that isn't symbolicated. Since the crash report is not in exactly the same format as an Apple crashlog I can't just drop it on XCode as usual, so I took the exact same build from my XCode archive tried to…
Mac_Cain13
  • 3,611
  • 2
  • 24
  • 38
13
votes
3 answers

Gcc 4.8 DWARF4 vs DWARF2

GCC 4.8 supports DWARF4. I'm wondering what is the difference between DWARF4 and DWARF2 from user point of view. Lets look at it from GDB point of view. Is there any difference for users when you switch to DWARF4? I have found a Dwarf Home Page,…
CyberGuy
  • 2,783
  • 1
  • 21
  • 31
12
votes
1 answer

What to do with "DWARF error: section .debug_info is larger than its filesize!"?

Looking for ways to see generated assembler of a specific function in my binary (an .so to be exact), just as I can see similar on Compiler Explorer, I found How to disassemble one single function using objdump? and based on answers there (and also…
Adam Badura
  • 5,069
  • 1
  • 35
  • 70
12
votes
6 answers

Analizing MIPS binaries: is there a Python library for parsing binary data?

I'm working on a utility which needs to resolve hex addresses to a symbolic function name and source code line number within a binary. The utility will run on Linux on x86, though the binaries it analyzes will be for a MIPS-based embedded system.…
DGentry
  • 16,111
  • 8
  • 50
  • 66
1
2 3
19 20