[1/3] Compile gdb.perf/skip-prologue.c with and without debug info

Message ID 20161209095533.GD13661@E107787-LIN
State New, archived
Headers

Commit Message

Yao Qi Dec. 9, 2016, 9:55 a.m. UTC
  On 16-12-07 12:24:25, Luis Machado wrote:
> >+
> >+    if { [gdb_compile "$srcdir/$subdir/$srcfile" ${binfile} executable $opts] != "" } {
> 
> 
> Maybe add an untested call here saying "failed to compile"? Just a nit.

Sure, fixed in the patch below.
  

Patch

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index e63f2b7..d905df3 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@ 
+2016-12-09  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.perf/skip-prologue.exp: Add parameter COMPILE.
+
 2016-12-02  Luis Machado  <lgustavo@codesourcery.com>
 
 	* gdb.base/maint.exp: Use gdb_test instead of gdb_test_multiple when
diff --git a/gdb/testsuite/gdb.perf/skip-prologue.exp b/gdb/testsuite/gdb.perf/skip-prologue.exp
index 2c4aad4..f31f697 100644
--- a/gdb/testsuite/gdb.perf/skip-prologue.exp
+++ b/gdb/testsuite/gdb.perf/skip-prologue.exp
@@ -37,7 +37,14 @@  if ![info exists SKIP_PROLOGUE_COUNT] {
 PerfTest::assemble {
     global srcdir subdir srcfile binfile
 
-    if { [gdb_compile "$srcdir/$subdir/$srcfile" ${binfile} executable {debug}] != "" } {
+    if [info exists COMPILE] {
+	set opts {debug}
+    } else {
+	set opts {nodebug}
+    }
+
+    if { [gdb_compile "$srcdir/$subdir/$srcfile" ${binfile} executable $opts] != "" } {
+	untested "failed to compile"
 	return -1
     }