Re: A question about gdb script

Daniel Jacobowitz
2009-11-25T15:12:03Z

On Wed, Nov 25, 2009 at 04:42:54PM +0800, Hui Zhu wrote:
> 1. If I want get the gdb_record.xxx file of each record cycle. It's
> still hard to me. Because if I add "record save" to commands, each
> time it will save record entry to same file.
> Does gdb have some way to handle it? like:
> $a=1
> record save $a
> $a++

Not directly, but you can do this using Python scripting.

> 2. Sometime, I want just record a function, I want:
> b functon_name
> commands
> silent
> record
> finish
> #Maybe we can record save in this line, this is first question.
> record stop
> end
> But when I really do it. I found that gdb stop running after finish.
>
> Could you help me with them?

This is a known limitation of breakpoint commands. It's very
difficult.

--
Daniel Jacobowitz
CodeSourcery