Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Klaus Rudolph" <lts-rudolph@gmx.de>
To: Ashutosh <ashutoshpal2006@gmail.com>
Cc: gdb@sourceware.org
Subject: Aw: Using C++ code inside gdb
Date: Thu, 08 Oct 2015 13:05:00 -0000	[thread overview]
Message-ID: <trinity-a6c327d7-3c17-4ad4-90d9-d0aca0d72c07-1444309529343@3capp-gmx-bs23> (raw)
In-Reply-To: <CADHm+ztUrxkStMRgqTFTnz+d02jHT5wTCmJH3qwUQximA5x+Kg@mail.gmail.com>


> 
> I plan to add a standalone module inside gdb code that contains
> information about the memories in the target, but want to organize it
> in the form of a C++ class. My question is: Has anybody earlier tried
> adding C++ code to gdb code-base and how easy it would be to do so?
> Any guidelines?
> 

You can call every function/method with "print funcName" from gdb command line. So if you add your debug code to your executable you should be able 
to run every function from your debug extension. You must take care that your debug code is not optimized out because
you have no calls from your application to the debug code itself. So you do not need any changes to the debugger or gdbserver
itself.

But maybe I have a misunderstanding from your question...

Regards
 Klaus


  reply	other threads:[~2015-10-08 13:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-08 10:57 Ashutosh
2015-10-08 13:05 ` Klaus Rudolph [this message]
2015-10-09  3:20   ` Ashutosh
2015-10-09  4:29     ` Duane Ellis
2015-10-09  6:08       ` Ashutosh
2015-10-09  9:41         ` Pedro Alves
2015-10-09 10:00           ` vijay nag
2015-10-09 10:06             ` Pedro Alves
2015-10-10 21:32           ` Mike Frysinger
2015-10-11  8:57             ` Mike Frysinger
2015-10-11 14:23               ` Joel Brobecker

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=trinity-a6c327d7-3c17-4ad4-90d9-d0aca0d72c07-1444309529343@3capp-gmx-bs23 \
    --to=lts-rudolph@gmx.de \
    --cc=ashutoshpal2006@gmail.com \
    --cc=gdb@sourceware.org \
    /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