Aw: Using C++ code inside gdb
"Klaus Rudolph" <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <trinity-a6c327d7-3c17-4ad4-90d9-d0aca0d72c07-1444309529343@3capp-gmx-bs23> |
> > 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