summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJoseph Myers <jsm@polyomino.org.uk>2009-04-22 19:46:19 +0000
committerJoseph Myers <jsm@polyomino.org.uk>2009-04-22 19:46:19 +0000
commit17c2b4e526b5c17d4c93e289db9de1817b63a72e (patch)
tree8b1a82cec940efd0635107a75b23c5e8dae16c7b /gdb
parent7d75d19418e5a4a67fc4d11d3b4fcad32d9368c8 (diff)
downloadgdb-17c2b4e526b5c17d4c93e289db9de1817b63a72e.tar.gz
* lib/gdb.exp (get_compiler_info): Use -E -o in remote-host case.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/lib/gdb.exp12
2 files changed, 15 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index ddac7cad2c1..1bb8743c8a8 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-22 Joseph Myers <joseph@codesourcery.com>
+
+ * lib/gdb.exp (get_compiler_info): Use -E -o in remote-host case.
+
2009-04-15 Tom Tromey <tromey@redhat.com>
* gdb.base/charset.exp: Add regression test.
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 8b8e7c6d6bb..6f7c35154c5 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1539,7 +1539,17 @@ proc get_compiler_info {binfile args} {
# Run $ifile through the right preprocessor.
# Toggle gdb.log to keep the compiler output out of the log.
log_file
- set cppout [ gdb_compile "${ifile}" "" preprocess [list "$args" quiet] ]
+ if [is_remote host] {
+ # We have to use -E and -o together, despite the comments
+ # above, because of how DejaGnu handles remote host testing.
+ set ppout "$outdir/compiler.i"
+ gdb_compile "${ifile}" "$ppout" preprocess [list "$args" quiet]
+ set file [open $ppout r]
+ set cppout [read $file]
+ close $file
+ } else {
+ set cppout [ gdb_compile "${ifile}" "" preprocess [list "$args" quiet] ]
+ }
log_file -a "$outdir/$tool.log"
# Eval the output.