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

Dmitry Samersoff <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Joel,

Thank you for the response.

I found this patch
https://sourceware.org/ml/gdb-patches/2012-05/msg00500.html - many
thanks to Abhijit.

1. What is the reason to keep it off main trunk? Is there a chance to
have it changed?

2. What API is available from within a plugin? i.e. how I can access
coredump memory?

- -Dmitry

On 2013-12-24 18:47, Joel Brobecker wrote:
>> 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?
> 


- -- 
Dmitry Samersoff
Saint Petersburg, Russia, http://devnull.samersoff.net
* There will come soft rains  ...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSuvqWAAoJEHEy08c4gIABMUQH/AiXTuX8BWuzG+Vm19EOSHlb
2EuBEpo633nBTgUlKIj99ePfuh5jRwZ5R0/pBmM/Ue4ytCJWTu0iQl5OU3RQ81BT
U9lFccSUW9oBnrfCqAZWQLss2sX1eL+9JjCduu47rKa4mLMaiJ0kxRml7IAT42Lo
h9j2QZSBcmEd5nA0VITU1meeIoU+KPhVe/UpNu1e3g/0EBgTnZbZ6iBbzqh+QhiY
lzR4g3KtNpI7mz4DvJ8O7+xNbSeh5sU2zWWG/EbETQHkp/Xt/AbChnSY5udFe1oS
lT87bTgh3cqWnTJVWa6UMI98K+RwIFVvxNQ3pIkuFFUh7HwEo+ubJL5xQT0Pn8Y=
=Ql5e
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.