Re: Passing piped commands as argument to gdb

Jan Kratochvil <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.