public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Sasha Da Rocha Pinheiro <darochapinhe@wisc.edu>
To: "elfutils-devel@sourceware.org" <elfutils-devel@sourceware.org>,
	"Mark Wielaard" <mark@klomp.org>
Subject: dwarf_begin_elf() won't create handle without .debug_* sections
Date: Wed, 23 May 2018 20:09:00 -0000	[thread overview]
Message-ID: <BN6PR06MB29321014595D1F091196FBACA66B0@BN6PR06MB2932.namprd06.prod.outlook.com> (raw)

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





             reply	other threads:[~2018-05-23 20:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-23 20:09 Sasha Da Rocha Pinheiro [this message]
2018-05-24 16:28 ` Mark Wielaard
2018-05-30 17:32   ` Sasha Da Rocha Pinheiro
2018-06-01 11:10     ` Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BN6PR06MB29321014595D1F091196FBACA66B0@BN6PR06MB2932.namprd06.prod.outlook.com \
    --to=darochapinhe@wisc.edu \
    --cc=elfutils-devel@sourceware.org \
    --cc=mark@klomp.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).