LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Gdb script to traverse a binary tree (https://www.linuxquestions.org/questions/programming-9/gdb-script-to-traverse-a-binary-tree-725341/)

michelle_ 05-12-2009 12:45 AM

Gdb script to traverse a binary tree
 
Hi,
Can anyone give me pointers to writing a gdb script to traverse a binary tree in a core file?
I have the pointer to the root of the tree in the core.

Thanks

ta0kira 05-12-2009 09:09 PM

Maybe it would be easier to write a bash script to interact with gdb. I haven't done anything in-depth with gdb, but I'm sure you can show the data structure and it's left/right values, then sed the pointer from that output, etc.
Kevin Barry


All times are GMT -5. The time now is 08:07 PM.