Re: [PATCH] tests: Add an explicit -fasynchronous-unwind-tables for deleted-lib.so.

2014-12-13 Thread Jan Kratochvil
On Fri, 12 Dec 2014 21:55:31 +0100, Mark Wielaard wrote: > Some systems don't add a PT_GNU_EH_FRAME segment by default, but the > deleted test depends on it so that it can get at the .eh_frame_hdr table > through the phdrs from the remote memory ELF image. Request one explicitly > with -fasynchrono

Re: [PATCH 1/3] libdw: Make srclines use a stable sort

2014-12-13 Thread Mark Wielaard
On Thu, Dec 11, 2014 at 05:34:06PM -0800, Josh Stone wrote: > 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, a

Re: [PATCH] libdw: Fix __libdw_form_val_len endp pointer.

2014-12-13 Thread Josh Stone
On 12/12/2014 07:54 AM, Mark Wielaard wrote: > @@ -513,6 +515,7 @@ __libdw_form_val_len (Dwarf *dbg, struct Dwarf_CU *cu, >uint8_t len = form_lengths[form]; >if (len != 0) > { > + const const unsigned char *endp = cu->endp; > len &= 0x7f; /* Mask to allow 0x80 ->

Re: [PATCH 0/3] Make line searching more predictable

2014-12-13 Thread Josh Stone
On 12/11/2014 05:23 PM, Josh Stone wrote: > 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

Re: [PATCH 2/3] libdwfl: Search for the last matching address in lines

2014-12-13 Thread Josh Stone
On 12/13/2014 11:42 AM, Mark Wielaard wrote: > On Thu, Dec 11, 2014 at 05:23:36PM -0800, Josh Stone wrote: >> 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. >>

[PATCH] libdwfl: Make sure elf_getdata_rawchunk size_t doesn't overflow find_dynsym.

2014-12-13 Thread Mark Wielaard
Signed-off-by: Mark Wielaard --- libdwfl/ChangeLog | 5 + libdwfl/dwfl_module_getdwarf.c | 10 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 66e642f..99d555f 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/Chan

Re: [PATCH 3/3] tests: Test addr2line -i with lexical blocks present

2014-12-13 Thread Mark Wielaard
On Thu, Dec 11, 2014 at 05:23:37PM -0800, Josh Stone wrote: > 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. > > +2014-12-11 Josh Stone > + > + * run-addr2lin

Re: [PATCH 2/3] libdwfl: Search for the last matching address in lines

2014-12-13 Thread Mark Wielaard
On Thu, Dec 11, 2014 at 05:23:36PM -0800, Josh Stone wrote: > 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. > > +2014-12-11 Josh Stone > + > + * dwfl_modu

Re: [PATCH 1/3] libdw: Make srclines use a stable sort

2014-12-13 Thread Mark Wielaard
On Thu, Dec 11, 2014 at 05:23:35PM -0800, Josh Stone wrote: > This adds a sequence number to the linked-list entries, so the original > order can break ties in sorting, making this a stable sort. > > +2014-12-11 Josh Stone > + > + * dwarf_getsrclines.c (struct linelist): Add sequence. > +