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

How can I change the debug path included in the DWARF info of a binary by the compiler

GCC includes the path to the source file that was used to generate an object file in its DWARF debug information (when compiled with -g). However, GDB's search rules mean that I have to use the lesser-known set subsitute-path if I moved the…
5
votes
1 answer

In assembly code, how .cfi directive works?

[assembly code] main: .LFB0: .cfi_startproc pushl %ebp .cfi_def_cfa_offset 8 .cfi_offset 5, -8 movl %esp, %ebp .cfi_def_cfa_register 5 andl $-16, %esp subl $32, %esp movl $5, 20(%esp) movl $3,…
casamia
  • 619
  • 1
  • 10
  • 19
5
votes
0 answers

Error with new unit test target: error: No such file or directory - old dSYM file cannot be overwritten

I just added a brand new unit test target to my project and am getting the following error: error: No such file or directory - old dSYM file cannot be overwritten: old: …
JonahGabriel
  • 3,066
  • 2
  • 18
  • 28
5
votes
1 answer

How to get more fine-grained row/col debug info from clang?

I am writing software that does some rather complex static analysis and dynamic tracing of other programs. This program uses a lot of static DWARF information to assist in the tracing, including line/column info from the .debug_line DWARF section.…
bddicken
  • 1,412
  • 1
  • 15
  • 16
5
votes
1 answer

how to decode .dSYM file to explicit DWARF format?

DWARF is a debugging information format. The .dSYM file generated by Xcode contain the DWARF debugging information. The Question is : how to decode the .dSYM file to get the human-readable DWARF information, which should like below.
leavez
  • 2,119
  • 2
  • 27
  • 36
5
votes
1 answer

How to inspect the variables of user space functions in systemtap?

I met a problem when inspecting the local variables of user space application in systemtap. I write a test.c like this: #include int func(int *p, int val) { printf("p=%p val=%d\n", p, val); return 1; } int main() { …
5
votes
4 answers

Need a C structure parser

Lets say I have a file system.h in which I have the following structures typedef struct Foo { int count; uint32 world; Temp id; } Foo; typedef struct Temp { uint64 id; } Temp; Foo bar; Now I need a macro, something like DUMP_STRUCT(bar),…
viji
  • 2,706
  • 5
  • 28
  • 34
4
votes
3 answers

Xcode warnings: could not open OSO file

I upgraded the ffmpeg dylibs in my Xcode project to a new version and now I get all these warnings in the Xcode console window when I run my app. Any ideas why I'm getting these? Thanks in advance! Here's an abbreviated version, but you'll get the…
simon.d
  • 2,471
  • 3
  • 33
  • 51
4
votes
1 answer

Change DWARF elf format in IAR ARM V8 compiler

In our development, we switched from IAR ARM V7.40 to IAR ARM V8.40 We are using the python package pyelftools for postprocessing of the debug information. Unfortunately, this seems to be broken now, as the V8-compiler seems to use DWARF4 syntax,…
meddle0106
  • 1,292
  • 1
  • 11
  • 22
4
votes
1 answer

Debug symbols in NASM (once more)

This question has been asked several times on StackOverflow but I tried all the answers and I still cannot get NASM to include DWARF debugging symbols. I am using NASM 2.13.02 under Ubuntu 18.04 64-bit. I am not sure if I am still missing…
user14222280
4
votes
1 answer

Find location of global variable in elf file

I want to write a c++ program that can find the location of a global variable. Here is the relevant readelf ... <1><98>: Abbrev Number: 7 (DW_TAG_variable) <99> DW_AT_name : (indirect string, offset: 0x32): sbox_bit <9d> …
Arcane
  • 43
  • 4
4
votes
1 answer

No debug info / source code with LLDB on OSX

I'm not able to see source code in lldb, despite trying to the advice of LLDB not showing source code I've boiled this down to a simple C++17 program that is compiled with the following command. I'm running on OSX with clang 7.0.1 that I've compiled…
Kulluk007
  • 902
  • 2
  • 10
  • 24
4
votes
0 answers

Is DWARF5 supported or experimental in GCC 8?

I asked this question on the gcc-help mailing list, but received no reply, so I'm trying here instead: The GCC 7 release notes state that "Version 5 of the DWARF debugging information standard is supported":…
acm
  • 12,183
  • 5
  • 39
  • 68
4
votes
2 answers

Dwarf offsets and shared objects vs executables

OK, I've used the Linux Dwarf ldw library to convert backtrace_symbols output to source code and line numbers but I've hit a snag. backtrace_symbols gives offsets in memory from which I subtract the base address (obtained using dladdr()) before…
Papadeltasierra
  • 233
  • 1
  • 9
4
votes
0 answers

What exception handling model does the Clang x64 Windows compiler use?

I've just downloaded the 3.7.1 LLVM for Windows x64 (from here), and I was wondering if the clang++ inside this uses SEH exception handling or SJLJ, or something else? In particular, I believe SEH is the best on Windows for dealing with C++…
user62177541
  • 368
  • 3
  • 14