public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Simon Marchi <simark@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: initialize "correct" variable in gdb.cp/cpexprs.exp.tcl Date: Thu, 26 Jan 2023 20:54:01 +0000 (GMT) [thread overview] Message-ID: <20230126205401.3D9453858D28@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4707199bd760f26cbc32614dd9f7c6ed7d2efdda commit 4707199bd760f26cbc32614dd9f7c6ed7d2efdda Author: Simon Marchi <simon.marchi@efficios.com> Date: Thu Jan 26 15:46:51 2023 -0500 gdb/testsuite: initialize "correct" variable in gdb.cp/cpexprs.exp.tcl Due to a GDB bug (visible when building with -D_GLIBCXX_DEBUG), GDB crashes somewhere in the middle of gdb.cp/cpexprs.exp, and thus fails to read the string, at gdb.cp/cpexprs.exp.tcl:725. The "correct" variable doesn't get set, and I then see this TCL error: ERROR: can't read "correct": no such variable Avoid the TCL error by initializing the "correct" variable to a dummy value. Change-Id: I828968d9b2d105ef47f8da2ef598aa16a518c059 Diff: --- gdb/testsuite/gdb.cp/cpexprs.exp.tcl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdb/testsuite/gdb.cp/cpexprs.exp.tcl b/gdb/testsuite/gdb.cp/cpexprs.exp.tcl index 3df149bf6a3..462cf16dcd1 100644 --- a/gdb/testsuite/gdb.cp/cpexprs.exp.tcl +++ b/gdb/testsuite/gdb.cp/cpexprs.exp.tcl @@ -722,6 +722,8 @@ foreach name [get_functions list] { # Test c/v gets recognized even without quoting. foreach cv {{} { const} { volatile} { const volatile}} { set test "p 'CV::m(int)$cv'" + set correct dummy_value + gdb_test_multiple $test $test { -re "( = {.*} 0x\[0-9a-f\]+ <CV::m.*>)\r\n$gdb_prompt $" { # = {void (CV * const, CV::t)} 0x400944 <CV::m(int)>
reply other threads:[~2023-01-26 20:54 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230126205401.3D9453858D28@sourceware.org \ --to=simark@sourceware.org \ --cc=gdb-cvs@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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).