Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Return argv0-symlink.exp early if gdb can't load symlink
@ 2014-04-02  8:46 Yao Qi
  2014-04-02  8:59 ` Yao Qi
  0 siblings, 1 reply; 11+ messages in thread
From: Yao Qi @ 2014-04-02  8:46 UTC (permalink / raw)
  To: gdb-patches

We run argv0-symlink.exp on mingw32 host, and see the following error
in gdb.log

(gdb) file argv0-symlink-filelink^M
"argv0-symlink-filelink": not in executable format: File format not recognized
(gdb) ERROR: Couldn't load argv0-symlink-filelink into arm-none-eabi-gdb.

the rest of the test don't have to run.

This patch expands clean_restart so that we can check the return value
of gdb_load.  Return if return value of gdb_load isn't zero.

Note that originally I added a unsupported statement to mention that
symlink is not supported, but perror in gdb_file_cmd changes it to
unresolved, so I remove that unsupported statement.

gdb/testsuite:

2014-04-02  Yao Qi  <yao@codesourcery.com>

	* gdb.base/argv0-symlink.exp: Return early if GDB can't load
	symlink successfully.
---
 gdb/testsuite/gdb.base/argv0-symlink.exp |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/gdb/testsuite/gdb.base/argv0-symlink.exp b/gdb/testsuite/gdb.base/argv0-symlink.exp
index 0e0202d..5e16b00 100644
--- a/gdb/testsuite/gdb.base/argv0-symlink.exp
+++ b/gdb/testsuite/gdb.base/argv0-symlink.exp
@@ -29,7 +29,14 @@ if {[lindex $status 0] != 0} {
     return 0
 }
 
-clean_restart "$filelink"
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+if { [gdb_load [standard_output_file ${filelink}]] != 0 } {
+    # GDB can't load symlink successfully, skip it.
+    return 0
+}
 
 if ![runto_main] {
     untested "could not run to main"
-- 
1.7.7.6


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-04-10 13:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-02  8:46 [PATCH] Return argv0-symlink.exp early if gdb can't load symlink Yao Qi
2014-04-02  8:59 ` Yao Qi
2014-04-02 10:47   ` Pedro Alves
2014-04-02 14:06     ` Yao Qi
2014-04-02 16:44       ` Pedro Alves
2014-04-02 16:47       ` Eli Zaretskii
2014-04-10 13:19         ` Yao Qi
2014-04-02 16:14   ` Eli Zaretskii
2014-04-02 16:54     ` Pedro Alves
2014-04-02 17:20       ` Eli Zaretskii
2014-04-03 12:12         ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox