* redirecting output
@ 2002-11-24 16:29 Per Fransson
2002-11-24 22:24 ` Eli Zaretskii
2002-11-27 13:25 ` Ben Elliston
0 siblings, 2 replies; 3+ messages in thread
From: Per Fransson @ 2002-11-24 16:29 UTC (permalink / raw)
To: gdb mailing list
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: redirecting output
2002-11-24 16:29 redirecting output Per Fransson
@ 2002-11-24 22:24 ` Eli Zaretskii
2002-11-27 13:25 ` Ben Elliston
1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2002-11-24 22:24 UTC (permalink / raw)
To: Per Fransson; +Cc: gdb mailing list
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: redirecting output
2002-11-24 16:29 redirecting output Per Fransson
2002-11-24 22:24 ` Eli Zaretskii
@ 2002-11-27 13:25 ` Ben Elliston
1 sibling, 0 replies; 3+ messages in thread
From: Ben Elliston @ 2002-11-27 13:25 UTC (permalink / raw)
To: gdb
>>>>> "Per" == Per Fransson <fransson@cs.lth.se> writes:
Per> b <point early in the program>
Per> run
Per> si
Per> si
Per> si
Per> .
Per> .
Per> 'bout a million si's
Per> .
Per> .
Per> .
Per> si
Per> si
Per> q
BTW, it is not necessary to print about a million si'.s You can run
"si" inside a while loop. From memory, the while loop will terminate
when the program terminates.
Ben
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-11-27 21:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-24 16:29 redirecting output Per Fransson
2002-11-24 22:24 ` Eli Zaretskii
2002-11-27 13:25 ` Ben Elliston
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox