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]

Aw: Using C++ code inside gdb


> 
> 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


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