Re: Can dwarf_getscopes{,_die} performance be improved?

2020-06-15 Thread Josh Stone via Elfutils-devel
On 6/13/20 10:40 AM, Milian Wolff wrote: > Has anyone an idea on how to to post-process the DWARF data to optimize the > lookup of inlined frames? SystemTap implements its own cache for repeated lookups -- see dwflpp::get_die_parents().

Re: Difference between dwarf_getscopes and dwarf_getscopes_die

2020-06-15 Thread Josh Stone via Elfutils-devel
On 6/13/20 10:34 AM, Milian Wolff wrote: > Hey all, > > can someone explain me the difference between dwarf_getscopes and > dwarf_getscopes_die? Ideally, this should then be added to the documentation > too. dwarf_getscopes_die just follows the DWARF structure of direct DIE parents, whereas dwa

failed reading "Smallest x86 ELF Hello World"

2017-09-28 Thread Josh Stone
>From http://timelessname.com/elfbin/ Elfutils completely fails to read the file: $ eu-readelf --version eu-readelf (elfutils) 0.169 Copyright [...] $ eu-readelf -a hello eu-readelf: failed reading 'hello': invalid file descriptor It's not clear that we should care, since that page even says it'

Re: [PATCH] strip: Add --keep-section=SECTION and --remove-section=SECTION.

2017-07-14 Thread Josh Stone
On 07/14/2017 08:28 AM, Mark Wielaard wrote: > Adds two new output options: > > --keep-section=SECTION Keep the named section. SECTION is an extended > wildcard pattern. May be given more than once. I tried this with rust libraries (eu-strip --keep-section=.rustc), an

Re: [PATCH] Avoid signed/unsigned comparison

2017-04-27 Thread Josh Stone
On 04/27/2017 11:24 AM, Mark Wielaard wrote: > On Thu, Apr 20, 2017 at 04:40:30PM +0200, Ulf Hermann wrote: >> Some compilers implicitly cast the result of uint_fast16_t * >> uint_fast16_t to something signed and then complain about the >> comparison to (unsigned) size_t. > > Really? That is allow

Re: dwarf_line_srcfileno

2017-03-31 Thread Josh Stone
On 03/30/2017 04:09 PM, SASHA NICOLAS DA ROCHA PINHEIRO wrote: > Hey all, what is the equivalent function to dwarf_line_srcfileno in lbdw?? I don't think libdw has an equivalent. Can you explain what you need it for?

Re: Group section

2017-03-21 Thread Josh Stone
On 03/21/2017 12:38 PM, SASHA NICOLAS DA ROCHA PINHEIRO wrote: > > Hi Josh > I am getting error on the following code, and it looks like to be related to > group sections. What is the error? > As you can see I changed the dwarf_elf_init to dwarf_begin_elf, but passed > NULL on the third parame

Re: Compilation Unit name

2017-03-17 Thread Josh Stone
On 03/17/2017 10:18 AM, SASHA NICOLAS DA ROCHA PINHEIRO wrote: > I did not find the reference about the argument named > next_cu_header_offset (below I pasted the respective functions > signatures). Anyway, name orthography apart, what is being used in > Dyninst with libdwarf is exactly the value o

Re: Compilation Unit name

2017-03-16 Thread Josh Stone
Stick to plain text, not HTML, if you want to reach the list. On 03/16/2017 03:44 PM, SASHA NICOLAS DA ROCHA PINHEIRO wrote: > I had that before, and it didn't work, then I empirically changed to > next_cu_off because it contained the same offset I was supposed to get > when I compared to the libd

Re: Compilation Unit name

2017-03-16 Thread Josh Stone
On 03/16/2017 03:03 PM, SASHA NICOLAS DA ROCHA PINHEIRO wrote: > /* Iterate over the compilation-unit headers. */ > size_t cu_header_size; > for(Dwarf_Off cu_off = 0, next_cu_off; > dwarf_nextcu(dbg, cu_off, &next_cu_off, &cu_header_size, > NULL, NULL, NULL) == 0; >