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] Remove some hard-coded stuff in tests


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

commit 2898689ba3a36451779ec526e14783c2aba9316b
Author: Yao Qi <yao.qi@linaro.org>
Date:   Thu Mar 26 08:29:48 2015 +0000

    Remove some hard-coded stuff in tests
    
    There are some hard-coded stuff in .s files, such as .int 0 and
    address offset, which isn't portable.  This patch is to replace
    ".int 0" with nop and address offset with labels.
    
    gdb/testsuite:
    
    2015-03-26  Yao Qi  <yao.qi@linaro.org>
    
    	* gdb.linespec/break-asm-file0.s (func2): Use nop instead of
    	.int 0.
    	(func): Likewise.  Add .Lfunc_1 label.
    	Use .Lfunc_1 label.
    	* gdb.linespec/break-asm-file1.s (func3): Use nop instead of
    	.int 0.
    	(func): Likewise.
    	Use .Lfunc_1 label.

Diff:
---
 gdb/testsuite/ChangeLog                      | 11 +++++++++++
 gdb/testsuite/gdb.linespec/break-asm-file0.s | 11 ++++++-----
 gdb/testsuite/gdb.linespec/break-asm-file1.s | 11 ++++++-----
 3 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 00d05f0..e9a53a6 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,16 @@
 2015-03-26  Yao Qi  <yao.qi@linaro.org>
 
+	* gdb.linespec/break-asm-file0.s (func2): Use nop instead of
+	.int 0.
+	(func): Likewise.  Add .Lfunc_1 label.
+	Use .Lfunc_1 label.
+	* gdb.linespec/break-asm-file1.s (func3): Use nop instead of
+	.int 0.
+	(func): Likewise.
+	Use .Lfunc_1 label.
+
+2015-03-26  Yao Qi  <yao.qi@linaro.org>
+
 	* gdb.linespec/break-asm-file.exp: Don't call prepare_for_testing.
 	Call gdb_compile instead to compile each .s files without debug
 	information.
diff --git a/gdb/testsuite/gdb.linespec/break-asm-file0.s b/gdb/testsuite/gdb.linespec/break-asm-file0.s
index 9c9fa2e..42c4213 100644
--- a/gdb/testsuite/gdb.linespec/break-asm-file0.s
+++ b/gdb/testsuite/gdb.linespec/break-asm-file0.s
@@ -24,8 +24,8 @@ _func2:
 	.type func2, %function
 func2:
 .Lbegin_func2:
-	.int 0
-	.int 0
+	nop
+	nop
 .Lend_func2:
 	.size func2, .-func2
 	.globl _func
@@ -35,8 +35,9 @@ _func:
 func:
 .Lbegin_func:
 	.file 1 "a/break-asm-file0.s"
-	.int 0
-	.int 0
+	nop
+.Lfunc_1:
+	nop
 .Lend_func:
 	.size func, .-func
 .Lend_text1:
@@ -199,7 +200,7 @@ func:
 	.byte		0	/* DW_LNE_set_address */
 	.uleb128	5
 	.byte		2
-	.4byte		.Lbegin_func+2
+	.4byte		.Lfunc_1
 
 	.byte		3	/* DW_LNS_advance_line */
 	.sleb128	1	/* ... to 8 */
diff --git a/gdb/testsuite/gdb.linespec/break-asm-file1.s b/gdb/testsuite/gdb.linespec/break-asm-file1.s
index 0f327b2..a1e7a42 100644
--- a/gdb/testsuite/gdb.linespec/break-asm-file1.s
+++ b/gdb/testsuite/gdb.linespec/break-asm-file1.s
@@ -23,16 +23,17 @@ _func3:
 	.type func3, %function
 func3:
 .Lbegin_func3:
-	.int 0
-	.int 0
+	nop
+	nop
 .Lend_func3:
 	.size func3, .-func3
 _func:
 	.type func, %function
 func:
 .Lbegin_func:
-	.int 0
-	.int 0
+	nop
+.Lfunc_1:
+	nop
 .Lend_func:
 	.size func, .-func
 .Lend_text1:
@@ -225,7 +226,7 @@ func:
 	.byte		0	/* DW_LNE_set_address */
 	.uleb128	5
 	.byte		2
-	.4byte		.Lbegin_func+1
+	.4byte		.Lfunc_1
 
 	.byte		3	/* DW_LNS_advance_line */
 	.sleb128	1	/* ... to 8 */


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