This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
redirecting output
- From: Per Fransson <fransson at cs dot lth dot se>
- To: gdb mailing list <gdb at sources dot redhat dot com>
- Date: Mon, 25 Nov 2002 01:29:00 +0100 (CET)
- Subject: redirecting output
Hi,
I'm trying to log a whole lot of program counter values during the
execution of a program using GDB on sparc (solaris-2.8). I'm doing it with
a command file like this one:
b <point early in the program>
run
si
si
si
.
.
'bout a million si's
.
.
.
si
si
q
Then I run it like this:
% 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?
Thanks in advance
Per