[arm] Fix regression by Do not skip prologue for asm (.S) files

Message ID 1436261990-20094-1-git-send-email-yao.qi@linaro.org
State New, archived
Headers

Commit Message

Yao Qi July 7, 2015, 9:39 a.m. UTC
  Patch "Do not skip prologue for asm (.S) files" [1] changes GDB's
behaviour on which test gdb.arch/thumb-singlestep.exp depends, so
it causes the fail below:

 (gdb) si^M
 37              blx     foo^M
 (gdb) FAIL: gdb.arch/thumb-singlestep.exp: step into foo

the test assumes the program will stop at the instruction after "push"
but it doesn't.  The fix to this fail is to do one more single step.
I'll push it in.

[1] https://sourceware.org/ml/gdb-patches/2015-06/msg00561.html

gdb/testsuite:

2015-07-07  Yao Qi  <yao.qi@linaro.org>

	* gdb.arch/thumb-singlestep.exp: Do one more single step.
---
 gdb/testsuite/ChangeLog                     | 4 ++++
 gdb/testsuite/gdb.arch/thumb-singlestep.exp | 3 +++
 2 files changed, 7 insertions(+)
  

Comments

Yao Qi Dec. 2, 2015, 9:36 a.m. UTC | #1
Yao Qi <qiyaoltc@gmail.com> writes:

> Patch "Do not skip prologue for asm (.S) files" [1] changes GDB's
> behaviour on which test gdb.arch/thumb-singlestep.exp depends, so
> it causes the fail below:
>
>  (gdb) si^M
>  37              blx     foo^M
>  (gdb) FAIL: gdb.arch/thumb-singlestep.exp: step into foo
>
> the test assumes the program will stop at the instruction after "push"
> but it doesn't.  The fix to this fail is to do one more single step.
> I'll push it in.
>
> [1] https://sourceware.org/ml/gdb-patches/2015-06/msg00561.html
>
> gdb/testsuite:
>
> 2015-07-07  Yao Qi  <yao.qi@linaro.org>
>
> 	* gdb.arch/thumb-singlestep.exp: Do one more single step.

I pushed it to gdb-7.10 branch too.  Since it is a test case fix, I
didn't create a PR in bugzilla for it.
  
Joel Brobecker Dec. 6, 2015, 2:22 p.m. UTC | #2
> > 2015-07-07  Yao Qi  <yao.qi@linaro.org>
> >
> > 	* gdb.arch/thumb-singlestep.exp: Do one more single step.
> 
> I pushed it to gdb-7.10 branch too.  Since it is a test case fix, I
> didn't create a PR in bugzilla for it.

FTR, that works. The purpose of the PR is to have a link back to
a user-visible change. Since it's in the testsuite, it's not something
a normal user would notice between 7.10 and 7.10.1.
  

Patch

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 0a90fa9..2a63301 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@ 
+2015-07-07  Yao Qi  <yao.qi@linaro.org>
+
+	* gdb.arch/thumb-singlestep.exp: Do one more single step.
+
 2015-06-30  Martin Galvan  <martin.galvan@tallertechnologies.com>
 
 	* lib/gdb.exp (test_class_help): Remove the unneeded escaping of
diff --git a/gdb/testsuite/gdb.arch/thumb-singlestep.exp b/gdb/testsuite/gdb.arch/thumb-singlestep.exp
index 07adaaf..e7a865f 100644
--- a/gdb/testsuite/gdb.arch/thumb-singlestep.exp
+++ b/gdb/testsuite/gdb.arch/thumb-singlestep.exp
@@ -34,5 +34,8 @@  if ![runto_main] then {
     return -1
 }
 
+# GDB doesn't skip prologue for asm files, so do one single step to
+# pass instruction "push".
+gdb_test "si" "blx	foo.*" "single step"
 gdb_test "si" "foo \\(\\) at .*${srcfile}.*mov r0,#42.*" "step into foo"