From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Mahmood N <nt_mahmood@yahoo.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: Passing piped commands as argument to gdb
Date: Mon, 22 Dec 2014 14:46:00 -0000 [thread overview]
Message-ID: <20141222144636.GA19648@host2.jankratochvil.net> (raw)
In-Reply-To: <993728742.194204.1419259380485.JavaMail.yahoo@jws106122.mail.bf1.yahoo.com>
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
next prev parent reply other threads:[~2014-12-22 14:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-22 10:09 Mahmood N
2014-12-22 10:16 ` Jan Kratochvil
2014-12-22 10:40 ` Mahmood N
2014-12-22 13:55 ` Jan Kratochvil
2014-12-22 14:43 ` Mahmood N
2014-12-22 14:46 ` Jan Kratochvil [this message]
2014-12-22 17:20 ` Mahmood N
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141222144636.GA19648@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb@sourceware.org \
--cc=nt_mahmood@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox