This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to write native (i.e. C/C++) plugin for gdb?


> I need to implement scenario like one below:
> 
> (gdb) load-plugin  libgdbjvm.so
> (gdb) attach PID
> (gdb) jvm show loaded-classes
> (gdb) jvm show java-threads
> (gdb) jvm show code-cache

Maybe you could add some routines in your program that are solely
intended for debugging purposes, and then define commands that
call those routines. Off hand, that's the only way I can think of.
Otherwise, interface the C++ stuff you need from Python - if necessary,
export some stuff to C?

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]