This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] Use /tmp for gdbserver testing
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 25 Mar 2005 15:43:50 -0500
- Subject: [commit] Use /tmp for gdbserver testing
I've had this lying around for a while. Right now we use remote_download
without a destination file. This means that DejaGNU defaults to the
"current directory" (which on a remote system generally means the user's
home directory). This messes up multiple simultaneous test runs and is
generally messy.
Future improvements might be to support a user-configurable tempdir,
and to clean up better when we're done with the file on the remote system.
This patch is a monotonic improvement over the current status quo.
Tested using gdbserver on i386-linux and arm-linux, and committed
(to HEAD and csl-arm-20050325-branch).
--
Daniel Jacobowitz
CodeSourcery, LLC
2005-03-25 Daniel Jacobowitz <dan@codesourcery.com>
* lib/mi-support.exp (mi_gdb_load): Use /tmp for gdbserver
downloads.
* config/gdbserver.exp (gdb_load): Likewise.
Index: gdb/testsuite/lib/mi-support.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v
retrieving revision 1.25
diff -u -p -r1.25 mi-support.exp
--- gdb/testsuite/lib/mi-support.exp 14 Mar 2005 15:42:52 -0000 1.25
+++ gdb/testsuite/lib/mi-support.exp 25 Mar 2005 20:36:35 -0000
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -439,7 +439,7 @@ proc mi_gdb_load { arg } {
if { ! [info exists last_mi_remote_file] } {
if [is_remote target] {
- set last_mi_remote_file [remote_download target $arg]
+ set last_mi_remote_file [remote_download target $arg /tmp/[file tail $arg].[pid]]
} else {
set last_mi_remote_file $last_mi_gdb_file
}
Index: gdb/testsuite/config/gdbserver.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/config/gdbserver.exp,v
retrieving revision 1.8
diff -u -p -r1.8 gdbserver.exp
--- gdb/testsuite/config/gdbserver.exp 6 Oct 2004 22:51:00 -0000 1.8
+++ gdb/testsuite/config/gdbserver.exp 25 Mar 2005 20:36:35 -0000
@@ -2,7 +2,7 @@
# ie. a debug agent running as a native process on the same or
# a different host.
-# Copyright 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -201,7 +201,7 @@ proc gdb_load { arg } {
if { ! [info exists server_exec] } {
if [is_remote target] {
- set server_exec [remote_download target $host_exec]
+ set server_exec [remote_download target $host_exec /tmp/[file tail $host_exec].[pid]]
} else {
set server_exec $host_exec
}