public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [testsuite patch] Fix gdb.gdb/selftest.exp for C++-O2-g-built GDB
@ 2016-07-16 13:14 Jan Kratochvil
  2016-07-18  8:06 ` Yao Qi
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Kratochvil @ 2016-07-16 13:14 UTC (permalink / raw)
  To: gdb-patches

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

Hi,

tested on Fedora 24 x86_64 after:
	./configure; make
That is: CFLAGS='-g -O2' CXXFLAGS='-g -O2'

OK for check-in?


Jan

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

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

	* gdb.gdb/selftest.exp (do_steps_and_nexts): Add "next over TRY" and
	"step into captured_main (args)".
	(test_with_self): Add "captured_main (args);" case.

diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
index af0026c..2cdd5c1 100644
--- a/gdb/testsuite/gdb.gdb/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
@@ -116,6 +116,14 @@ proc do_steps_and_nexts {} {
 		set description "next over lim_at_start initialization"
 		set command "next"
 	    }
+	    -re ".*TRY.*$gdb_prompt $" {
+		set description "next over TRY"
+		set command "next"
+	    }
+	    -re ".*captured_main \\(args\\);.*$gdb_prompt $" {
+		set description "step into captured_main (args)"
+		set command "step"
+	    }
 	    -re ".*count . 0x3.*$gdb_prompt $" {
 		set description "next over conditional stack alignment code 1"
 		set command "next"
@@ -330,6 +338,13 @@ proc test_with_self { executable } {
 	-re "Starting program.*Breakpoint \[0-9\]+,.*captured_main .data.*$gdb_prompt $" {
 	    xfail "$description (line numbers scrambled?)"
 	}
+	-re "captured_main \\(args\\);\r\n$gdb_prompt $" {
+	    gdb_test_multiple "step" "$description" {
+		-re "captured_main .data.* at .*main.c:.*$gdb_prompt $" {
+		    pass "$description"
+		}
+	    }
+	}
 	-re "vfork: No more processes.*$gdb_prompt $" {
 	    fail "$description (out of virtual memory)"
 	    set timeout $oldtimeout

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

end of thread, other threads:[~2016-07-20 14:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-16 13:14 [testsuite patch] Fix gdb.gdb/selftest.exp for C++-O2-g-built GDB Jan Kratochvil
2016-07-18  8:06 ` Yao Qi
2016-07-18  8:18   ` Jan Kratochvil
2016-07-18  9:45     ` Yao Qi
2016-07-18 11:40       ` Jan Kratochvil
2016-07-19  9:47         ` Yao Qi
2016-07-20 14:29           ` [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).