c - how to export all the files path from the debug symbols -
i'm using gcc -g compile.
in gdb, use "info sources" list files path (c, cpp, h, etc..)
now want export result file.
one solution turn on gdb logging "set logging on" it's not want:
- i need type "enter" export results,
- there "," @ end of lines
- i want automatically after compilation
edit
one solution be:
#!/bin/sh gdb -batch -ex "info sources" the_executable > /tmp/list_sources.txt sed -i -e 's/, /\r\n/g' /tmp/list_sources.txt grep -e '^\/' /tmp/list_sources.txt > list_sources.txt
you can run gdb in batch mode:
gdb -batch -ex "info sources" your_program > info_sources.txt
Comments
Post a Comment