This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: break-interp.exp, and attaching with no file loaded
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Fri, 27 Jan 2012 23:52:52 +0100
- Subject: Re: break-interp.exp, and attaching with no file loaded
- References: <4F22FCF2.7050504@redhat.com>
Hi Pedro,
On Fri, 27 Jan 2012 20:37:22 +0100, Pedro Alves wrote:
> The testfile contains tests where gdb attaches to a process without
> loading a file, and so with extend-remote gdbserver, given that gdb can't figure
> out automatically what was the executable, things fall apart.
But this is a bug of the extended mode. It should be fixed in the future.
> Jan, is there a reason the test can't be changed to always have gdb load the
> executable?
But it is a different bug than what break-interp.exp is testing so I am fine
with this change.
> --- a/gdb/testsuite/gdb.base/break-interp.exp
> +++ b/gdb/testsuite/gdb.base/break-interp.exp
[...]
> @@ -336,7 +340,8 @@ proc test_attach {file displacement {relink_args ""}} {
> }
>
> if {$relink_args == ""} {
> - test_attach_gdb "" $pid $displacement "attach"
> + global exec
> + test_attach_gdb $exec $pid $displacement "attach"
if {$file != ""} in test_attach_gdb is now redundant and should be removed.
> } else {
> # These could be rather passed as arguments.
> global exec interp_saved interp
> @@ -447,6 +452,8 @@ proc test_ld {file ifmain trynosym displacement} {
> # Test no (error) message has been printed by `exec-file'.
> set escapedfile [string_to_regexp $file]
> gdb_test "exec-file $file" "exec-file $escapedfile" "load"
> + # Needs abstraction
Missing final dot (.) of the comment.
> + gdb_test "set remote exec-file $file" "exec-file $escapedfile" "remote load"
>
> if $ifmain {
> reach "_dl_debug_state" run $displacement
OK this way.
Thanks, the extended mode runs great,
Jan