[Gammaray-interest] New plugin idea: Event inspector

Milian Wolff milian.wolff at kdab.com
Tue Sep 19 10:46:49 CEST 2017


On Dienstag, 19. September 2017 10:39:45 CEST Christian Gagneraud wrote:
> On 19 September 2017 at 17:11, Christian Gagneraud <chgans at gmail.com> wrote:
> > On 18 September 2017 at 14:52, Christian Gagneraud <chgans at gmail.com> 
wrote:
> >> On 18 September 2017 at 08:25, Milian Wolff <milian.wolff at kdab.com>
> >> wrote:
> >> [...]
> >> 
> >>>> I'm reading this right [1] now, it's called "Cheating the ELF -
> >>>> Subversive Dynamic Linking to Libraries".
> >>>> AFAIU, he's talking about manipulation of the PLT of an ELF image.
> >>>> Which is, I think, what i would like to achieve: replace a symbol with
> >>>> another one of my choice, and still be able to call the original
> >>>> symbol.
> >>>> Now, this does not seem easy....
> >>> 
> >>> You can have a look at the heaptrack injector code, which does just
> >>> that.
> >> 
> >> Yes, it is very interesting indeed, thanks for the pointer!
> > 
> > Using this technique i was able to subsitute Qt's dynamic symbols (eg,
> > qt_startup_hook) in a simple Qt application.
> > And i now understand what this QtCore.dyn file is all about! ;)
> > 
> > Using the Loadable program segment, i can as well wrap any Qt function
> > used by the program (QObject::EventFilter, ...).
> 
> Hi Milian,
> 
> This makes me think that heaptrack doesn't track memory related
> symbols directly imported by the program itself. It does track only
> malloc/free made by loaded shared objects.... Am I missing something?
> 
> Due to
> https://github.com/KDE/heaptrack/blob/master/src/track/heaptrack_inject.cpp
> #L269

What is a "malloc/free symbol directly imported by the program itself"?

-- 
Milian Wolff | milian.wolff at kdab.com | Senior Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts




More information about the Gammaray-interest mailing list