Re: [RFC] thread apply commands change selected frame

Daniel Jacobowitz
2007-01-31T14:54:17Z

On Wed, Jan 31, 2007 at 09:58:02AM +0100, Denis PILAT wrote:
> I propose a new implementation that does not change the old behavior of
> gdb with respect to the printing of the last frame in case we changed of
> thread during "thread apply" command execution.
>
> This implementation does not make any regression in the testsuite for a
> i386-linux target.
> To me the part that prints the stack frame at the end of execution of
> "thread apply" could be entirely removed but this will imply some
> changes in the testsuite. I can do that it's up to you.

Thanks. I don't have any opinion on this - for now, let's just leave
it the way it was.

> +# Go into the thread_function to check that a simple "thread apply"
> +# does not change the selected frame.
> +gdb_test "step" "thread_function.*"
> +gdb_test "up"
> +gdb_test "thread apply all print 1"
> +gdb_test "down" "#0.*thread_function.*" "Thread apply must not change the selected frame"

The default name for a test is the command, if you don't specify a
name. These are pretty generic commands, but test names are supposed
to be unique within a .exp file. I would recommend giving them names
(and probably checking their output, at least a little, too...).

--
Daniel Jacobowitz
CodeSourcery