This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Passing piped commands as argument to gdb


On Mon, 22 Dec 2014 15:43:00 +0100, Mahmood N wrote:
> What you wrote, and what I tested results in the execution of the program
> under gdb. So it start and run the program. Now, I want to first set
> a breakpoint then run the program under gdb.

OK, sorry.


> $ g++ -g -ggdb -o dir-pred dir-pred.cpp
> $ rm pipe
> $ mknod pipe p
> $ bzcat file.bz2 > pipe &
> [1] 18321
> $ gdb
> GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6)
> (gdb) break dir-pred.cpp:26
> No symbol table is loaded.  Use the "file" command.
> Make breakpoint pending on future shared library load? (y or [n])

When running just plain "gdb" you need to do what it says to you, that is:

(gdb) file ./run_prog
(gdb) break dir-pred.cpp:26
 - There will be no question due to the "file" command above.
(gdb) run <pipe 6


Regards,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]