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
11
votes
1 answer

ld warning: stack subl instruction is too different from dwarf stack size on OS X

recently we started getting this warning on our OS X build. ld: warning: could not create compact unwind for __Z10createMenuv: stack subl instruction is too different from dwarf stack size ld: warning: could not create compact unwind for…
Igor Skochinsky
  • 24,629
  • 2
  • 72
  • 109
10
votes
1 answer

Extract global variables from a.out file

Edit (updated question) I have a simple C program: // it is not important to know what the code does you may skip the code main.c #include unsigned int AppCtr; unsigned char AppFlag; int SOME_LARGE_VARIABLE; static void …
Tono Nam
  • 34,064
  • 78
  • 298
  • 470
10
votes
1 answer

How to get mach-o uuid of a running process?

to get UUID on mac i can use dwarfdump -u path/to/compile/executable also i can get UUID with simple crash in 'Binary Images' section Is the way to get UUID without crash on ios device?
Maxim Kholyavkin
  • 4,463
  • 2
  • 37
  • 82
9
votes
1 answer

What causes failure to unwind in a DWARF perf call stack?

In backtraces produced by perf record --call-graph dwarf and printed by perf script, I am consistently getting wrong addresses for maybe 5% of call stacks, i.e. unwinding fails. One example is my_bin 770395 705462.825887: 3560360 cycles: …
nnnmmm
  • 7,964
  • 4
  • 22
  • 41
9
votes
1 answer

GCC 4.8 inserts version 4 in a compilation unit header even with -gdwarf-2

I compiled an application with GCC 4.8 and I'm trying to debug it on an older system that does not have GDB 7.5+ (which supposedly added support for DWARF-4). Upgrading GDB on that system is not an option. I can't debug it because GDB outputs the…
MuchToLearn
  • 339
  • 3
  • 12
8
votes
1 answer

Getting calling conventions from DWARF info

I am trying to get information about calling conventions from DWARF info. More specific, I want to get which registers / stack locations are used to pass arguments to functions. My problem is that I am getting somehow wrong information in some cases…
7
votes
2 answers

Reading DWARF file in Mac OSX

Can anybody help me writing a program which can read DWARF files and gives me the file name, line number and function name details.
user100074
7
votes
1 answer

Could NOT find ZSTD (missing: ZSTD_LIBRARY ZSTD_INCLUDE_DIR)

I had an issue while installing headptrack with CMake when running cmake -DCMAKE_BUILD_TYPE=Release .. in heaptrack/build -- Could NOT find ZSTD (missing: ZSTD_LIBRARY ZSTD_INCLUDE_DIR) CMake Error at 3rdparty/libbacktrace/CMakeLists.txt:160…
Hugo Sohm
  • 2,872
  • 4
  • 23
  • 40
7
votes
3 answers

In gdb my variable shows as , how can I find its value?

In gdb how can I discover the value of a variable which displays as optimized out? Presumably the value is being stored in a register, how can I find out which one? Given this simple program (copied from the website named below). #include…
WorldGeek
  • 71
  • 1
  • 2
7
votes
2 answers

How to get the function name of a C function pointer

I have the following problem: when I get a backtrace in C using the backtrace(3) function the symbols returned the name of the functions is easily determinable with the dwarf library and dladdr(3). The problem is that if I have a simple function…
terminus
  • 13,745
  • 8
  • 34
  • 37
7
votes
1 answer

Converting debug symbols from DWARF to PDB

Is there a way to convert the debugging information from binutils' DWARF format (as emitted by GCC on Cygwin, for example) to Microsoft PDB (as consumed by Visual Studio)?
Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
7
votes
1 answer

From where does gdb take the code lines?

When I compile a program with -g and get a core dump I can use gdb to read the executable and the core dump to debug the situation the program run into before it crashed. One of the features gdb offers is the list option, it is possible to list the…
e271p314
  • 3,841
  • 7
  • 36
  • 61
7
votes
1 answer

How can I use gdb to debug code assembled using yasm?

I've got code assembling using yasm, and linking into my C++ program, but I can't set breakpoints in gdb on symbols from the assembly language file. The command lines probably aren't terribly illuminating, but here we go: "g++" -ftemplate-depth-128…
Tom Seddon
  • 2,648
  • 1
  • 19
  • 28
7
votes
1 answer

/usr/bin/ld: Dwarf Error

I'm trying to compile a complex application with nvcc, and a need to change the compiler from mpic++ to g++, since that I'm having this error: /usr/bin/ld: Dwarf Error: found dwarf version '3', this reader only handles version 2 information. What is…
RSFalcon7
  • 2,241
  • 6
  • 34
  • 55
6
votes
2 answers

What is in the .dSYM directories created by cmake with the makefile generator on macos?

I'm using CMake on MacOS to generate Makefiles for my C++ project. When I build a target (say, test/AsyncTest), I get that target, plus a test/AsyncTest.dSYM/ directory that contains the…
Eric Niebler
  • 5,927
  • 2
  • 29
  • 43
1
2
3
19 20