Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [commit] [testsuite patch] Fix recent GCC FAIL: gdb.arch/i386-signal.exp
Date: Wed, 05 Oct 2016 19:59:00 -0000	[thread overview]
Message-ID: <20161005195924.GA22631@host1.jankratochvil.net> (raw)
In-Reply-To: <CAH=s-PNO4knGKK-1R+sOHGN7GO=3zsZBdpoA+fRiFjypx4UreQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

On Wed, 05 Oct 2016 10:15:08 +0200, Yao Qi wrote:
> We need the first chunk "($hex in )?main" because the unwind pc may point
> to the first instruction of a source line or the non-first instruction
> of a line.
> Either is possible.   It doesn't matter that "callq  setup" and
> "mov    $0x0,%eax" are mapped to the same line or not.
> 
> Change in gdb.arch/i386-signal.exp is good to me, but change
> in gdb.arch/i386-signal.c is not necessary.

Checked in.


Jan

[-- Attachment #2: Type: message/rfc822, Size: 2251 bytes --]

From: Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: [PATCH] testsuite: Fix recent GCC FAIL: gdb.arch/i386-signal.exp
Date: Wed, 5 Oct 2016 21:56:46 +0200

gcc-6.2.1-2.fc24.x86_64

(gdb) backtrace 10^M
(gdb) FAIL: gdb.arch/i386-signal.exp: backtrace 10

(gdb) disas/s
Dump of assembler code for function main:
.../gdb/testsuite/gdb.arch/i386-signal.c:
30      {
   0x000000000040057f <+0>:     push   %rbp
   0x0000000000400580 <+1>:     mov    %rsp,%rbp
31        setup ();
   0x0000000000400583 <+4>:     callq  0x400590 <setup>
=> 0x0000000000400588 <+9>:     mov    $0x0,%eax
32      }
   0x000000000040058d <+14>:    pop    %rbp
   0x000000000040058e <+15>:    retq
End of assembler dump.

The .exp patch is an obvious typo fix I think.  The regex was written to
accept "ADDR in main" and I find it OK as checking .debug_line validity is not
the purpose of this testfile.

gcc-4.8.5-11.el7.x86_64 did not put the 'mov $0x0,%eax' instruction there at
all so there was no problem with .debug_line.

gdb/testsuite/ChangeLog
2016-10-05  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gdb.arch/i386-signal.exp (backtrace 10): Fix #2 typo.
---
 gdb/testsuite/ChangeLog                | 4 ++++
 gdb/testsuite/gdb.arch/i386-signal.exp | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 537ca8c..cbea3b2 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2016-10-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.arch/i386-signal.exp (backtrace 10): Fix #2 typo.
+
 2016-10-05  Yao Qi  <yao.qi@linaro.org>
 
 	* lib/gdb.exp (support_complex_tests): Return zero if
diff --git a/gdb/testsuite/gdb.arch/i386-signal.exp b/gdb/testsuite/gdb.arch/i386-signal.exp
index 276b7c0..51a3a25 100644
--- a/gdb/testsuite/gdb.arch/i386-signal.exp
+++ b/gdb/testsuite/gdb.arch/i386-signal.exp
@@ -35,6 +35,6 @@ gdb_load ${binfile}
 
 runto func
 gdb_test "backtrace 10" \
-    "#0  ($hex in )?func.*\r\n#1  <signal handler called>\r\n#2  ($hex in)?main.*"
+    "#0  ($hex in )?func.*\r\n#1  <signal handler called>\r\n#2  ($hex in )?main.*"
 
 gdb_test "finish" "Run till exit from \#0  func.*<signal handler called>"
-- 
2.7.4

      reply	other threads:[~2016-10-05 19:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-03 20:35 Jan Kratochvil
2016-10-04 16:08 ` Yao Qi
2016-10-04 16:19   ` Jan Kratochvil
2016-10-04 16:39     ` Jan Kratochvil
2016-10-05  8:15       ` Yao Qi
2016-10-05 19:59         ` Jan Kratochvil [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161005195924.GA22631@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox