This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
dwarf_begin_elf() won't create handle without .debug_* sections
- From: Sasha Da Rocha Pinheiro <darochapinhe at wisc dot edu>
- To: "elfutils-devel at sourceware dot org" <elfutils-devel at sourceware dot org>, "Mark Wielaard" <mark at klomp dot org>
- Date: Wed, 23 May 2018 20:09:06 +0000
- Subject: dwarf_begin_elf() won't create handle without .debug_* sections
- Accept-language: en-US, pt-BR
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Hi all,
I have some binaries that do not have .debug_* sections but have .eh_frame and .gcc_except_table.
Looking at:
https://sourceware.org/git/?p=elfutils.git;a=blob;f=libdw/dwarf_begin_elf.c;hb=144b73c49acf3ed894e4635aedb9b0d1208ade2e#l50
it seems that dwarf_begin_elf() will not create a Dwarf handle for this file. Am I correct?
So, the functions
dwarf_cfi_addrframe,
dwarf_frame_info,
dwarf_frame_cfa, and
dwarf_frame_register
will get info from .debug_frame while dwarf_next_cfi can get info either from .debug_frame or .gcc_except_table, but without some abstractions?
Since
/* Opaque type representing a CFI section found in a DWARF or ELF file. */
typedef struct Dwarf_CFI_s Dwarf_CFI;
can we say Dwarf_CFI is only about .debug_frame? Even though dwarf_next_cfi uses Dwarf_CFI_Entry but not Dwarf_CFI?
I know .eh_frame has slightly different format from .debug_frame, and it's not defined by the DWARF specification but LSB, so is it the reason why this is kinda confusing?
Regards,
Sasha