From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: gdb-patches@sourceware.org
Subject: [rfc] Relax "printf" function name check in annota* test cases
Date: Thu, 15 May 2008 00:37:00 -0000 [thread overview]
Message-ID: <200805142136.m4ELaM2F018037@d12av02.megacenter.de.ibm.com> (raw)
Hello,
this patch fixes the last regression after Alan's patch was applied:
some sub-tests of annota1.exp and annota3.exp are now failing because
when stopped at the "printf" breakpoint, the current function is not
called printf, but printf@plt.
I've seen similar issues with printf@GLIBC_... on other platforms as
well; as it is hard to predict how the symbol will be called exactly,
I'd suggest to simply accept printf@... as well. This is really
unrelated to what the annota tests are intended to test anyway.
Any objections to me checking in the following patch?
Tested on powerpc-linux and powerpc64-linux, fixes 4 FAILs.
Bye,
Ulrich
ChangeLog:
* gdb.base/annota1.exp: Accept printf@... in place of printf.
* gdb.base/annota3.exp: Likewise.
diff -urNp gdb-orig/gdb/testsuite/gdb.base/annota1.exp gdb-head/gdb/testsuite/gdb.base/annota1.exp
--- gdb-orig/gdb/testsuite/gdb.base/annota1.exp 2008-05-14 20:49:29.315943000 +0200
+++ gdb-head/gdb/testsuite/gdb.base/annota1.exp 2008-05-14 20:50:12.816352130 +0200
@@ -241,7 +241,7 @@ gdb_expect {
#
set pat_begin "\r\n\032\032post-prompt\r\nContinuing.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n"
set pat_adjust "warning: Breakpoint 3 address previously adjusted from $hex to $hex.\r\n"
-set pat_end "\r\n\032\032breakpoint 3\r\n\r\nBreakpoint 3, \r\n\032\032frame-begin 0 $hex\r\n\r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*.*\032\032frame-function-name\r\n.*printf\r\n\032\032frame-args\r\n.*\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$"
+set pat_end "\r\n\032\032breakpoint 3\r\n\r\nBreakpoint 3, \r\n\032\032frame-begin 0 $hex\r\n\r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*.*\032\032frame-function-name\r\n.*printf(@.*)?\r\n\032\032frame-args\r\n.*\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$"
gdb_test_multiple "continue" "continue to printf" {
-re "${pat_begin}($pat_adjust)?$pat_end" {
@@ -256,7 +256,7 @@ gdb_test_multiple "continue" "continue t
# annotate-frame-address
# annotate-frame-address-end
#
-set pat_begin "\r\n\032\032post-prompt\r\n\r\n\032\032frame-begin 0 $hex\r\n.0 \r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*\032\032frame-function-name\r\n.*printf\r\n\032\032frame-args\r\n \\(.*frame-end\r\n\r\n\032\032frame-begin 1 $hex\r\n.1 \r\n\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n"
+set pat_begin "\r\n\032\032post-prompt\r\n\r\n\032\032frame-begin 0 $hex\r\n.0 \r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*\032\032frame-function-name\r\n.*printf(@.*)?\r\n\032\032frame-args\r\n \\(.*frame-end\r\n\r\n\032\032frame-begin 1 $hex\r\n.1 \r\n\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n"
set pat_end "\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032frame-end\r\n(\r\n\032\032frame-begin .*\r\n\r\n\032\032frame-end\r\n)*$gdb_prompt$"
send_gdb "backtrace\n"
gdb_expect {
diff -urNp gdb-orig/gdb/testsuite/gdb.base/annota3.exp gdb-head/gdb/testsuite/gdb.base/annota3.exp
--- gdb-orig/gdb/testsuite/gdb.base/annota3.exp 2008-05-14 20:49:29.320943000 +0200
+++ gdb-head/gdb/testsuite/gdb.base/annota3.exp 2008-05-14 21:01:18.207924022 +0200
@@ -227,7 +227,7 @@ gdb_expect_list "continue to printf" "$g
send_gdb "backtrace\n"
gdb_expect_list "backtrace from shlibrary" "$gdb_prompt$" {
"\r\n\032\032post-prompt\r\n"
- "#0 .* .*printf \[^\r\n\]*\r\n"
+ "#0 .* .*printf(@\[^ ]*)? \[^\r\n\]*\r\n"
"#1 .* main \[^\r\n\]*\r\n"
}
@@ -267,7 +267,7 @@ if [target_info exists gdb,nosignals] {
gdb_expect_list "backtrace @ signal handler" "$gdb_prompt$" {
"#0 +handle_USR1 \[^\r\n\]+\r\n"
"#1 +.signal handler called.\r\n"
- "#2 .* .*printf \[^\r\n\]+\r\n"
+ "#2 .* .*printf(@\[^ \]*)? \[^\r\n\]+\r\n"
"#3 .* main \[^\r\n\]+\r\n"
}
}
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next reply other threads:[~2008-05-14 21:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-15 0:37 Ulrich Weigand [this message]
2008-05-15 0:45 ` Daniel Jacobowitz
2008-05-15 0:54 ` Ulrich Weigand
2008-05-15 12:09 ` Daniel Jacobowitz
2008-05-16 15:27 ` Ulrich Weigand
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=200805142136.m4ELaM2F018037@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
/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