[PATCH] libdw: Don't free uninitialized Dwarf_Abbrev_Hash's of "fake" CUs.

2019-10-31 Thread Jonathon Anderson
fake_{loc,loclists,addr}_cu are Dwarf_CUs that are created separate from all the others, so their contents are minimal and mostly initialized by a calloc. On dwarf_end however, they are freed through the same code path as all the others, so they call DAH_free like all the others. This changes that

Re: [PATCH] libdw: Don't free uninitialized Dwarf_Abbrev_Hash's of "fake" CUs.

2019-10-31 Thread Mark Wielaard
Hi Jonathon, On Wed, Oct 30, 2019 at 09:29:02PM -0500, Jonathon Anderson wrote: > fake_{loc,loclists,addr}_cu are Dwarf_CUs that are created separate from > all the others, so their contents are minimal and mostly initialized by > a calloc. On dwarf_end however, they are freed through the same cod

Re: [PATCH 3/5] libdwfl: add interface for attaching to/detaching from threads

2019-10-31 Thread Omar Sandoval
On Thu, Oct 31, 2019 at 05:21:17PM +0100, Mark Wielaard wrote: > On Wed, 2019-10-30 at 16:49 -0700, Omar Sandoval wrote: > > On Wed, Oct 30, 2019 at 01:47:52PM +0100, Mark Wielaard wrote: > > > Also, if we would adopt dwfl_attach_thread then I think it should take > > > a Dwfl_Thread object not a p

Re: [PATCH 5/5] libdwfl: add interface for evaluating DWARF expressions in a frame

2019-10-31 Thread Mark Wielaard
On Wed, 2019-10-30 at 16:59 -0700, Omar Sandoval wrote: > On Wed, Oct 30, 2019 at 02:23:06PM +0100, Mark Wielaard wrote: > > Having some examples/testcases would also show how/where to get the > > DWARF expressions to use with this new function. > > Sounds good, I'll put some examples/test cases t

Re: [PATCH 4/5] libdwfl: cache Dwfl_Module and Dwarf_Frame for Dwfl_Frame

2019-10-31 Thread Mark Wielaard
On Wed, 2019-10-30 at 16:55 -0700, Omar Sandoval wrote: > On Wed, Oct 30, 2019 at 02:04:42PM +0100, Mark Wielaard wrote: > > Hi Omar, > > > > On Mon, 2019-10-07 at 02:05 -0700, Omar Sandoval wrote: > > > The next change will need to have the Dwarf_Frame readily available, so > > > rather than find

Re: [PATCH 3/5] libdwfl: add interface for attaching to/detaching from threads

2019-10-31 Thread Mark Wielaard
On Wed, 2019-10-30 at 16:49 -0700, Omar Sandoval wrote: > On Wed, Oct 30, 2019 at 01:47:52PM +0100, Mark Wielaard wrote: > > Also, if we would adopt dwfl_attach_thread then I think it should take > > a Dwfl_Thread object not a pid/tid as argument. > > In that case, we'd probably want to expose the

Re: patch 0/2 debuginfod submission

2019-10-31 Thread Mark Wielaard
Hi Frank, On Wed, 2019-10-30 at 14:11 -0400, Frank Ch. Eigler wrote: > Revised code to look like this (libdwfl/find-debuginfo.c): > > 00404 /* NB: this is slightly thread-unsafe */ > 00405 static __typeof__ (debuginfod_find_debuginfo) > *fp_debuginfod_find_debuginfo; > 00406 > 00407