This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=364ca42e71dfdce3f34e97ef028f7e3d5b5d880e

commit 364ca42e71dfdce3f34e97ef028f7e3d5b5d880e
Author: Yao Qi <yao.qi@linaro.org>
Date:   Fri Dec 9 09:51:20 2016 +0000

    Compile gdb.perf/skip-prologue.c with and without debug info
    
    gdb.perf/skip-prologue.exp is intended to measure the performance of
    skipping prologue with prologue analysis by setting breakpoints.
    However, if program is compiled with debug info, GDB is smart to
    skip prologue by line table from debug info, so prologue analysis
    is not exercised at all.
    
    This patch adds a parameter COMPILE to specify compiling with
    debug information, otherwise, it is compiled without debug
    information.
    
    gdb/testsuite:
    
    2016-12-09  Yao Qi  <yao.qi@linaro.org>
    
    	* gdb.perf/skip-prologue.exp: Add parameter COMPILE.

Diff:
---
 gdb/testsuite/ChangeLog                  | 4 ++++
 gdb/testsuite/gdb.perf/skip-prologue.exp | 9 ++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

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
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]