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
0
votes
0 answers

.eh_frame FDE - where can the field "initial location" / address range be found/resolved?

When reading about sections like .eh_frame and .debug_frame in the DWARF standard it says that in Frame Description Entries (FDE) there is a field that's called: address_range (target address) The number of bytes of program instructions described by…
Simon Farre
  • 71
  • 1
  • 6
0
votes
0 answers

Static Linking: Merging Binaries with Common Symbols

we have a collection of (C and C++11) code that gets compiled multiple times, producing distinct static libraries whose symbols conflict with each other. For various reasons, we are unable to change the way the source is organized/namespaced. An…
0
votes
0 answers

Is there a way to extract the uuid from a dSYM on linux?

Is there a way to extract the uuid from a dSYM on linux? And specifically on CentOS if it's possible. I tried to use dwarfdump, mediainfo, exiftool, llvm-dwarfdump, and I Couldn't extract it. dwarfdump commands results without output. llvm-dwarfdump…
avrmglkp
  • 1
  • 3
0
votes
0 answers

How to Inspecting and modifying variables in runtime using dwarf with GDB

Is the a possible way to read and modify the variable of C++ program in runtime without breakpoints using dwarf file with GDB? I tried it but it look possible with breakpoints but i do not have to do it in that way because with simple reading is…
0
votes
1 answer

What should I do to enable DWARF on a new backend in LLVM?

I am learning LLVM and trying to write a backend for a specific target architecture. When I compile a hello-world with clang -g, the result of llvm-dwarfdump --verify is as follows. I traced the process of llvm-dwarfdump with gdb and it looks like…
user17435489
0
votes
1 answer

DWARF output differs between compiler versions

I compile an ELF file including debug info and then read the debug-info back and parse it to get a list of all variables (global variables and class variables) in the RAM. This already works with the older version of the compiler, but with the newer…
Martin
  • 11
  • 1
0
votes
3 answers

Where is the location information in a dwarf file for a var declared as extern?

I am wondering how the location information of a variable is presented in a dwarf-file (a file with debug symbols), when the variable is declared as extern. A very simple example to illustrate my question: simple.c: #include extern int…
DeadCat
  • 29
  • 4
0
votes
1 answer

gdb doesn't support DWARF 5 macro sections?

#include #define A "hello world\n" void main() { printf(A); } $ gcc -gdwarf-4 -g3 a.c \ && gdb -ex 'set confirm off' \ -ex 'break main' \ -ex 'run' \ -ex 'p A' \ -ex q \ a.out ... Breakpoint 1, main…
x-yuri
  • 16,722
  • 15
  • 114
  • 161
0
votes
0 answers

how to build linux kernel with `allyesconfig` and debug information

I want to build a linux kernel with as many C source files as possible for testing, so I use make allyesconfig at first. Meanwhile I need debug info, so I tried some ways to add it: make menuconfig and open the debuginfo option. modify the…
Absoler
  • 1
  • 1
0
votes
0 answers

How do get this attribute (DW_AT_data_member_location) value ? The libdwarf version is 0.5.0.thanks

How do get this attribute (DW_AT_data_member_location) value ?The libdwarf version is 0.5.0 I look at the information, some say that this function(dwarf_loclist_n()) is used, but I did not find this function in version 0.5.0 I used such steps and…
lovestack
  • 1
  • 3
0
votes
0 answers

LLVM11 debug info is different from LLVM8 debug info when running the same compilation command

The C source code is as following. #include "fdlibm.h" #include #ifdef __STDC__ double ldexp(double value, int exp) #else double ldexp(value, exp) double value; int exp; #endif { if(!finite(value)||value==0.0) return…
shu
  • 31
  • 2
0
votes
0 answers

systemtap fails to determine souce filenames and line numbers, although gdb finds them

I am running systemtap 4.7 on Centos 8 with a 4.18 kernel and using GCC 8.5.0 When I have systemtap produce a user-code backtrace, it never manages to find the filenames and line numbers for my source functions, despite there being a full .debuginfo…
swestrup
  • 4,079
  • 3
  • 22
  • 33
0
votes
0 answers

why are multiple line numbers mapped to the same starting address in .debug_line?

It's ./drivers/net/virtio_net.c in linux kernel 6.0.0 and compiled to virtio_net.o with optimization -O2 and debuginfo(dwarf4). The readelf --debug-dump=decodedline drivers/net/virtio_net.o shows: drivers/net/virtio_net.c: virtio_net.c …
Absoler
  • 1
  • 1
0
votes
0 answers

IDA Remote Linux Debugger

Hello/ During Linux debugging, almost after each line, IDA outputs lines of the type to the console: "Looking for GNU DWARF file at "/usr/lib/debug/.build-id/a4/c98c0c7c7803311fbd918df8fb08db852cef3d.debug"... no." "Looking for GNU DWARF file at…
TossSky
  • 1
  • 1
0
votes
0 answers

Use variable length array in a struct?

With llvm-ir (text) I know how to use llvm.dbg.declare, !DISubrange, etc to create a variable length array that gdb can understand However, I do not know how to do this in a struct. The problem is DISubrange. If the struct is a variable on the stack…