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

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

c# SetCompatibleTextRenderingDefault must be called before the first -