BTW, I want to point out this change in compare_lines:
> - return (*p1)->addr - (*p2)->addr;
[...]
> + if (line1->addr != line2->addr)
> +return (line1->addr < line2->addr) ? -1 : 1;
Since addr is 64-bit unsigned, and comparison functions return int, it
is possible for the difference to be
This set changes dwarf_getsrclines into a stable sort, adjusts the binary
search in dwfl_module_getsrc to pick the last match, and finally adds a test
for earlier addr2line fixes.
---
libdw/ChangeLog | 7
libdw/dwarf_getsrclines.c | 52 +--
This test is for the fix in commit aecdf2670c02, but it was hampered by
unlucky sorting of line records. With the new stable sort, the test now
gets the desired line numbers.
Signed-off-by: Josh Stone
---
tests/ChangeLog | 8 +
tests/Makefile.am | 4 ++-
This adds a sequence number to the linked-list entries, so the original
order can break ties in sorting, making this a stable sort.
Signed-off-by: Josh Stone
---
libdw/ChangeLog | 7 +++
libdw/dwarf_getsrclines.c | 52 ---
2 files change
Now that libdw's srclines use a stable sort, we can reliably choose the
*last* matching line record for a given address, which should be the
innermost where inlines are concerned.
Signed-off-by: Josh Stone
---
libdwfl/ChangeLog| 5 +
libdwfl/dwfl_module_getsrc.c | 51 +++
On 12/11/2014 03:05 PM, Mark Wielaard wrote:
> While rebasing my work on top of Josh attrabbrev reading speedups
> I noticed a typo/thinko in my form_val_len bound checking patch.
>
> We should check against the die->cu->endp, not the abbrev endp.
In that case, I don't think you need endp as a pa
An invalid or trucated debug info/type section could cause the cu endp
to point beyond the end of section data.
Signed-off-by: Mark Wielaard
---
libdw/ChangeLog | 4
libdw/libdw_findcu.c | 6 ++
2 files changed, 10 insertions(+)
diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index
While rebasing my work on top of Josh attrabbrev reading speedups
I noticed a typo/thinko in my form_val_len bound checking patch.
We should check against the die->cu->endp, not the abbrev endp.
Signed-off-by: Mark Wielaard
---
libdw/ChangeLog| 6 ++
libdw/dwarf_child.c| 2 +-
l
On 12/10/2014 11:41 AM, Josh Stone wrote:
> As previously discussed, these patches fix the function names for addr2line.
> For addr2line -i, it now walks as many scopes as necessary to find the
> containing function, instead of assuming it's the next scope. Also, addr2line
> now prefers linkage_na
On 12/10/2014 06:48 PM, Josh Stone wrote:
> While looking at performance for Mark's form-len patch, I found a few areas
> that I felt could be cleaned up a bit.
>
> 1. die->abbrev initialization was duplicated in a few places.
> 2. dwarf_hasattr needn't look at the die at all, just abbrev.
> 3. CU
Signed-off-by: Mark Wielaard
---
src/ChangeLog | 5 +
src/readelf.c | 11 +--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 0ae7e46..cc6bf13 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
2014-12-11 Mark Wielaar
Signed-off-by: Mark Wielaard
---
src/ChangeLog | 5 +
src/readelf.c | 7 ---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 456e5a4..0ae7e46 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-11 Mark Wielaard
+
+
The ELF64 case didn't check for overflow and accidentially used the 32bit
Shdr size.
Signed-off-by: Mark Wielaard
---
libelf/ChangeLog | 4
libelf/elf_begin.c | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index e4c5849..cf168e
Don't allow entries or size to overflow the parent file size.
Signed-off-by: Mark Wielaard
---
libelf/ChangeLog | 6 ++
libelf/elf_begin.c | 15 ---
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index 4860530..e4c5849 10064
On Sun, 2014-12-07 at 23:46 +0100, Mark Wielaard wrote:
> print_cfa_program might call print_ops with zero offset size. We don't
> need (and don't know) the DWARF offset size in that case. DW_OP_call_ref
> and DW_OP_GNU_implicit_pointer need to know the offset size because they
> reference a DIE. B
On Sun, 2014-12-07 at 23:46 +0100, Mark Wielaard wrote:
> 2014-12-07 Mark Wielaard
>
> + * readelf.c (print_debug_line_section): max_ops_per_instr cannot
> + be zero.
I pushed this to master.
On Sun, 2014-12-07 at 23:45 +0100, Mark Wielaard wrote:
> In relocate_section we check relocation sections don't overlap any of the
> ELF headers. We should check against the actually used ehsize, shentsize
> and phentsize. Not the possibly bogus values in the file ehdr itself.
>
> 2014-12-07 Mar
On Sun, 2014-12-07 at 23:45 +0100, Mark Wielaard wrote:
> This really is just a robustify patch in case section zero got the
> wrong section flags set. In that case __libdwfl_relocate_value might
> call dwfl_offline_section_address which might assert (because it isn't
> prepared to handle section z
On Tue, 2014-12-09 at 18:44 -0800, Josh Stone wrote:
> Ok, well my former optimizations went into 0.158. Here are some quick
> runs of "varlocs -k >/dev/null" on kernel-3.17.4-301.fc21.x86_64:
>
> 0.157 96.00user 0.12system 1:36.08elapsed
> 0.158 70.22user 0.12system 1:10.32elapsed
> 0.159 71.40u
On Wed, 2014-12-10 at 18:48 -0800, Josh Stone wrote:
> Rather than looking up section data every time, we can simply save the
> range of each CU as pointers in Dwarf_CU.
>
> 2014-12-10 Josh Stone
> + * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
> + * libdw_findcu.c (__libdw_in
On Wed, 2014-12-10 at 18:48 -0800, Josh Stone wrote:
> To just check the presence of an attribute, we only need to look at the
> abbreviation data. This optimization avoids reading over die data at all,
> except possibly just to get the abbrev code.
>
> 2014-12-10 Josh Stone
> + * dwarf_ha
On Wed, 2014-12-10 at 18:48 -0800, Josh Stone wrote:
> Add a new internal function, __libdw_dieabbrev, which deals with checking
> a die for an abbrev, and setting it as needed.
>
> +2014-12-10 Josh Stone
> +
> + * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function.
> + * dwar
On Wed, 2014-12-10 at 18:48 -0800, Josh Stone wrote:
> These patches get me back down to about 71s for "varlocs -k
> >/dev/null". :)
Nice! But I am sure I'll take some of that speedup away again when I
finish my checked leb128 work :) Your cleanups will actually help with
that. I'll rebase my work
Hi Josh,
On Wed, 2014-12-10 at 11:41 -0800, Josh Stone wrote:
> 2014-12-10 Josh Stone
>
> - * addr2line.c (handle_address): Find the proper inline parents.
> + * addr2line.c (get_diename): New, get linkage_name or name.
> + * addr2line.c (print_dwarf_function): Use get_diename.
On Wed, 2014-12-10 at 11:41 -0800, Josh Stone wrote:
> The function which contains an inline might not be the immediate next
> die scope. For instance, there may be a lexical scope in between.
> Instead, iterate the remaining scopes until an appropriate tag is found.
>
> +2014-12-10 Josh Stone
25 matches
Mail list logo