public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [testsuite patch] Fix testsuite regression by: Do not skip prologue for asm (.S) files
@ 2015-06-29 16:37 Jan Kratochvil
  2015-07-10  8:43 ` Yao Qi
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kratochvil @ 2015-06-29 16:37 UTC (permalink / raw)
  To: gdb-patches

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

Hi,

I have somehow missed gdb.asm/asm-source.exp PASS->FAIL even on x86_64.

It has no longer valid assumption that "break" breaks after the prologue even
in assembler.  So I have changed this assumption of the testfile.

Tested it FAIL->PASSes on x86_64, ppc64 and s390x.

OK for check-in?


Jan

[-- Attachment #2: 2 --]
[-- Type: text/plain, Size: 1677 bytes --]

gdb/testsuite/
2015-06-29  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gdb.asm/asm-source.exp (f at main): Stop at gdbasm_enter.
	(n at main): New.
	* gdb.asm/asmsrc1.s: Add comment "mark: main enter".

diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
index 8854af0..14a0f85 100644
--- a/gdb/testsuite/gdb.asm/asm-source.exp
+++ b/gdb/testsuite/gdb.asm/asm-source.exp
@@ -275,6 +275,7 @@ if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } {
 }
 
 # Collect some line numbers.
+set line_enter      [expr [gdb_get_line_number "main enter" "asmsrc1.s"] + 1]
 set line_main       [expr [gdb_get_line_number "main start" "asmsrc1.s"] + 1]
 set line_call_foo2  [expr [gdb_get_line_number "call foo2"  "asmsrc1.s"] + 1]
 set line_search_comment [expr [gdb_get_line_number "search" "asmsrc1.s"] + 1]
@@ -298,7 +299,10 @@ if ![runto_main] then {
 }
 
 # Execute the `f' command and see if the result includes source info.
-gdb_test "f" "asmsrc1\[.\]s:$line_main.*several_nops" "f at main"
+gdb_test "f" "asmsrc1\[.\]s:$line_enter.*gdbasm_enter" "f at main"
+
+# Execute the `n' command.
+gdb_test "n" "$line_main\[ 	\]*.*several_nops" "n at main"
 
 # See if we properly `next' over a macro with several insns.
 gdb_test "n" "$line_call_foo2\[ 	\]*.*foo2" "next over macro"
diff --git a/gdb/testsuite/gdb.asm/asmsrc1.s b/gdb/testsuite/gdb.asm/asmsrc1.s
index 8235205..ddf8790 100644
--- a/gdb/testsuite/gdb.asm/asmsrc1.s
+++ b/gdb/testsuite/gdb.asm/asmsrc1.s
@@ -34,6 +34,7 @@
 
 	.global main
 	gdbasm_declare main
+	comment "mark: main enter"
 	gdbasm_enter
 
 	comment "Call a macro that consists of several lines of assembler code."

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [testsuite patch] Fix testsuite regression by: Do not skip prologue for asm (.S) files
  2015-06-29 16:37 [testsuite patch] Fix testsuite regression by: Do not skip prologue for asm (.S) files Jan Kratochvil
@ 2015-07-10  8:43 ` Yao Qi
  2015-07-10 11:47   ` Jan Kratochvil
  2015-07-10 13:07   ` [testsuite commit] " Jan Kratochvil
  0 siblings, 2 replies; 6+ messages in thread
From: Yao Qi @ 2015-07-10  8:43 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches

Jan Kratochvil <jan.kratochvil@redhat.com> writes:

> OK for check-in?
>

Yes, it is OK.

>
> Jan
> gdb/testsuite/
> 2015-06-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
>
> 	* gdb.asm/asm-source.exp (f at main): Stop at gdbasm_enter.
> 	(n at main): New.
> 	* gdb.asm/asmsrc1.s: Add comment "mark: main enter".

What does "f at main" and "n at main" in parenthesises mean here?

-- 
Yao (齐尧)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [testsuite patch] Fix testsuite regression by: Do not skip prologue for asm (.S) files
  2015-07-10  8:43 ` Yao Qi
@ 2015-07-10 11:47   ` Jan Kratochvil
  2015-07-10 14:32     ` Yao Qi
  2015-07-10 13:07   ` [testsuite commit] " Jan Kratochvil
  1 sibling, 1 reply; 6+ messages in thread
From: Jan Kratochvil @ 2015-07-10 11:47 UTC (permalink / raw)
  To: Yao Qi; +Cc: gdb-patches

On Fri, 10 Jul 2015 10:43:24 +0200, Yao Qi wrote:
> Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> > 	* gdb.asm/asm-source.exp (f at main): Stop at gdbasm_enter.
> > 	(n at main): New.
> > 	* gdb.asm/asmsrc1.s: Add comment "mark: main enter".
> 
> What does "f at main" and "n at main" in parenthesises mean here?

Names of the testcases involved, it was always written this way for whatever
reason, unless it has changed:

+gdb_test "f" "asmsrc1\[.\]s:$line_enter.*gdbasm_enter" "f at main"
+
+# Execute the `n' command.
+gdb_test "n" "$line_main\[     \]*.*several_nops" "n at main"

So I guess it is still OK for check-in with this ChangeLog.


Thanks,
Jan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [testsuite commit] [testsuite patch] Fix testsuite regression by: Do not skip prologue for asm (.S) files
  2015-07-10  8:43 ` Yao Qi
  2015-07-10 11:47   ` Jan Kratochvil
@ 2015-07-10 13:07   ` Jan Kratochvil
  1 sibling, 0 replies; 6+ messages in thread
From: Jan Kratochvil @ 2015-07-10 13:07 UTC (permalink / raw)
  To: Yao Qi; +Cc: gdb-patches

On Fri, 10 Jul 2015 10:43:24 +0200, Yao Qi wrote:
> Yes, it is OK.

Checked in:
	218a5a11a07268228484af88666739852ba36552
And for 7.10:
	8746ea769d67bf186d582d892cf37da42bc95ea9


Thanks,
Jan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [testsuite patch] Fix testsuite regression by: Do not skip prologue for asm (.S) files
  2015-07-10 11:47   ` Jan Kratochvil
@ 2015-07-10 14:32     ` Yao Qi
  2015-07-10 14:49       ` Jan Kratochvil
  0 siblings, 1 reply; 6+ messages in thread
From: Yao Qi @ 2015-07-10 14:32 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Yao Qi, gdb-patches

Jan Kratochvil <jan.kratochvil@redhat.com> writes:

> Names of the testcases involved, it was always written this way for whatever
> reason, unless it has changed:
>
> +gdb_test "f" "asmsrc1\[.\]s:$line_enter.*gdbasm_enter" "f at main"
> +
> +# Execute the `n' command.
> +gdb_test "n" "$line_main\[     \]*.*several_nops" "n at main"

I don't know such convention of writing changelog entry for .exp changes.
We usually put the proc or variable name into the parenthesis, like,

        * gdb.foo/bar.exp (proc_name): XXXX

Is it documented somewhere?

-- 
Yao (齐尧)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [testsuite patch] Fix testsuite regression by: Do not skip prologue for asm (.S) files
  2015-07-10 14:32     ` Yao Qi
@ 2015-07-10 14:49       ` Jan Kratochvil
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Kratochvil @ 2015-07-10 14:49 UTC (permalink / raw)
  To: Yao Qi; +Cc: gdb-patches

On Fri, 10 Jul 2015 16:32:39 +0200, Yao Qi wrote:
> I don't know such convention of writing changelog entry for .exp changes.
> We usually put the proc or variable name into the parenthesis, like,
> 
>         * gdb.foo/bar.exp (proc_name): XXXX

That also happenes/ed.


> Is it documented somewhere?

I do not know, in GDB I always follow past practices (which are not always
good):
2011-05-20  Pierre Muller  <muller@ics.u-strasbg.fr>
[...]
        * gdb.base/default.exp (show convenience): Use double
	                        ^^^^^^^^^^^^^^^^
        quote pattern for regular expressions.
[...]
2011-01-09  Andreas Schwab  <schwab@linux-m68k.org>

        * gdb.threads/tls.exp ("info address me"): Fix expected output.
	                        ^^^^^^^^^^^^^^^

Somehow I think the intention of the ChangeLog entries is to identify where
the change happened, so both test case name or subroutine name is appropriate,
depending on what matches better.  At least I saw it so before.


Jan

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-07-10 14:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-29 16:37 [testsuite patch] Fix testsuite regression by: Do not skip prologue for asm (.S) files Jan Kratochvil
2015-07-10  8:43 ` Yao Qi
2015-07-10 11:47   ` Jan Kratochvil
2015-07-10 14:32     ` Yao Qi
2015-07-10 14:49       ` Jan Kratochvil
2015-07-10 13:07   ` [testsuite commit] " Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).