Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Dmitry Samersoff <dms@samersoff.net>
Cc: Hui Zhu <teawater@gmail.com>, "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: How to write native (i.e. C/C++) plugin for gdb?
Date: Tue, 24 Dec 2013 14:47:00 -0000	[thread overview]
Message-ID: <20131224144704.GJ4558@adacore.com> (raw)
In-Reply-To: <52B9966B.8050104@samersoff.net>

> 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


  reply	other threads:[~2013-12-24 14:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-24 12:31 Dmitry Samersoff
2013-12-24 13:16 ` Hui Zhu
2013-12-24 14:13   ` Dmitry Samersoff
2013-12-24 14:47     ` Joel Brobecker [this message]
2013-12-25 15:32       ` Dmitry Samersoff
2013-12-25 16:51         ` Dmitry Samersoff
2013-12-26 22:55           ` Doug Evans
2013-12-27 14:15             ` Dmitry Samersoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131224144704.GJ4558@adacore.com \
    --to=brobecker@adacore.com \
    --cc=dms@samersoff.net \
    --cc=gdb@sourceware.org \
    --cc=teawater@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox