This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: redirecting output
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- To: Per Fransson <fransson at cs dot lth dot se>
- Cc: gdb mailing list <gdb at sources dot redhat dot com>
- Date: Mon, 25 Nov 2002 08:24:20 +0200 (IST)
- Subject: Re: redirecting output
On Mon, 25 Nov 2002, Per Fransson wrote:
> % gdb a.out --command=command_file > pc_log
>
>
> Unfortunately it doesn't seem to work. Somehow the execution gets
> corrupted. The 'pc_log' file deviates from what I get by just letting gdb
> print to stdout like this (they come to different concusions at some
> conditional branch):
>
> % gdb a.out --command=command_file
>
>
> I find this very puzzling. Can someone tell me what's going on? And,
> better yet, how I can get the pc log I'm looking for?
The best technique as of now is to use the `script' command (assuming you
are on a Posix host) or some work-alike.
Adding a feature you would like to have is a long-standing TODO item in
GDB development.