Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [lttng-dev] Broken patch for a wrapping libdl
@ 2013-11-04 16:55 Matthew Khouzam
  2013-11-05  8:27 ` Woegerer, Paul
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Khouzam @ 2013-11-04 16:55 UTC (permalink / raw)


Hello tracing arch-wizards,

I was working a bit on a trace with the cyg_profile stuff, and an issue
that would arise is when you dynamically lync a library, you don't have
it's name in the symbol tables of the executable, so you cannot nm it to
have something human readable in the callstack.

The easy solution is to wrap libdl, that way you get the handle of the
lib i dlopen, and from that you get the function name in dlsym, it also
handles seamlessly if a lib is closed, and another would replace the
addresses used.

The only problem is, it doesn't work and I don't have time to get it
working (in the short term).

I am posting this beginning idea to see if it generates any
interest/solutions.

Hope this works out,

Matthew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-libdl-wrapper.patch
Type: text/x-patch
Size: 6888 bytes
Desc: not available
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20131104/f5e30952/attachment-0001.bin>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [lttng-dev] Broken patch for a wrapping libdl
  2013-11-04 16:55 [lttng-dev] Broken patch for a wrapping libdl Matthew Khouzam
@ 2013-11-05  8:27 ` Woegerer, Paul
  0 siblings, 0 replies; 2+ messages in thread
From: Woegerer, Paul @ 2013-11-05  8:27 UTC (permalink / raw)


Hi Matthew,

I have a working solution for that (also based on LD_PRELOADing) as part
of my base address tracing stuff.
I'm going submit the whole patch series next week (hopefully).

Best,
Paul

On 11/04/2013 05:55 PM, Matthew Khouzam wrote:
> Hello tracing arch-wizards,
>
> I was working a bit on a trace with the cyg_profile stuff, and an issue
> that would arise is when you dynamically lync a library, you don't have
> it's name in the symbol tables of the executable, so you cannot nm it to
> have something human readable in the callstack.
>
> The easy solution is to wrap libdl, that way you get the handle of the
> lib i dlopen, and from that you get the function name in dlsym, it also
> handles seamlessly if a lib is closed, and another would replace the
> addresses used.
>
> The only problem is, it doesn't work and I don't have time to get it
> working (in the short term).
>
> I am posting this beginning idea to see if it generates any
> interest/solutions.
>
> Hope this works out,
>
> Matthew
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


-- 
Paul Woegerer, SW Development Engineer
Sourcery Analyzer <http://go.mentor.com/sourceryanalyzer>
Mentor Graphics, Embedded Software Division




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-05  8:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-04 16:55 [lttng-dev] Broken patch for a wrapping libdl Matthew Khouzam
2013-11-05  8:27 ` Woegerer, Paul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox