LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to obtain debug information from a section!!!!! (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-obtain-debug-information-from-a-section-679960/)

webquinty 10-30-2008 03:11 AM

How to obtain debug information from a section!!!!!
 
Hello,

If I compile a program. with -g option, I can use gdb (or DDD) to debug my program, and gdb obtain all debug information that need it.

Now, my question is if it is possible to use the same process in my own program??. In other words, Can I use a similar process that use GDB in my own program to obtain debug information???

I suppose that GDB use some library to do this works.

Best regards.

pinniped 10-30-2008 04:10 AM

Do you mean you want to create a debugger of sorts? Anyone can do it - you just have to spend many hours reading the gcc documentation so that you can parse the symbol tables and debugging info. "ddd" took a shortcut of sorts by invoking gdb.

webquinty 10-30-2008 04:23 AM

Quote:

Originally Posted by pinniped (Post 3325913)
Do you mean you want to create a debugger of sorts? Anyone can do it - you just have to spend many hours reading the gcc documentation so that you can parse the symbol tables and debugging info. "ddd" took a shortcut of sorts by invoking gdb.

Hello,

Then, it is more easy to invoke gdb commands from my own program like DDD.
Well , I'll search more information about how DDD do it.

Thanks.


All times are GMT -5. The time now is 12:03 AM.