public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "ahajkova at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/30340] New: gdb.base/watchpoint-unaligned.exp produces TCL error
Date: Wed, 12 Apr 2023 20:57:07 +0000	[thread overview]
Message-ID: <bug-30340-4717@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=30340

            Bug ID: 30340
           Summary: gdb.base/watchpoint-unaligned.exp produces TCL error
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: ahajkova at redhat dot com
  Target Milestone: ---

Created attachment 14818
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14818&action=edit
patch

When running gdb.base/watchpoint-unaligned.exp at aarch64 - Ampere Altra with
Fedora 39:

I'm getting TCL error:
root/build/gdb/gdb version  14.0.50.20230411-git -nw -nx -q -iex "set height 0"
-iex "set width 0" -data-directory /root/build/gdb/data-directory 

ERROR: -------------------------------------------
ERROR: in testcase
/root/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
ERROR:  can't read "wpoffset_to_wpnum(1)": no such element in array
ERROR:  tcl error code TCL READ VARNAME
ERROR:  tcl error info:
can't read "wpoffset_to_wpnum(1)": no such element in array
    while executing
"list -re "\r\nCould not insert hardware watchpoint .*\r\n$gdb_prompt $" {     
}       -re "$rwatch_exp $wpoffset_to_wpnum(1):.*alue = .*\r\n$gdb_prompt $" { 
..."
    ("uplevel" body line 1)
    invoked from within
"uplevel list $subst_code"
    (procedure "gdb_test_multiple" line 77)
    invoked from within
"gdb_test_multiple $test $test {
        -re "\r\nCould not insert hardware watchpoint .*\r\n$gdb_prompt $" {
        }
        -re "$rwatch_exp $wpoffset_to_wpnum(1):.*alu..."
    ("foreach" body line 24)
    invoked from within
"foreach wpcount {4 7} {
    array set wpoffset_to_wpnum {}
    for {set wpoffset 1} {$wpoffset <= $wpcount} {incr wpoffset} {
        set test "$rwatch data...."
    (file
"/root/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint-unaligned.exp"
line 101)
    invoked from within
"source
/root/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint-unaligned.exp"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 source
/root/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint-unaligned.exp"
    invoked from within
"catch "uplevel #0 source $test_file_name" msg"
--------------------------------------------------
                === gdb Summary ===

# of expected passes            142
# of unexpected failures        537
# of unresolved testcases       1
# of paths in test names        1
# of duplicate test names       16
/root/build/gdb/gdb version  14.0.50.20230411-git -nw -nx -q -iex "set height
0" -iex "set width 0" -data-directory /root/build/gdb/data-directory 

ERROR: -------------------------------------------
ERROR: in testcase
/root/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
ERROR:  can't read "wpoffset_to_wpnum(1)": no such element in array
ERROR:  tcl error code TCL READ VARNAME
ERROR:  tcl error info:
can't read "wpoffset_to_wpnum(1)": no such element in array
    while executing
"list -re "\r\nCould not insert hardware watchpoint .*\r\n$gdb_prompt $" {     
}       -re "$rwatch_exp $wpoffset_to_wpnum(1):.*alue = .*\r\n$gdb_prompt $" { 
..."
    ("uplevel" body line 1)
    invoked from within
"uplevel list $subst_code"
    (procedure "gdb_test_multiple" line 77)
    invoked from within
"gdb_test_multiple $test $test {
        -re "\r\nCould not insert hardware watchpoint .*\r\n$gdb_prompt $" {
        }
        -re "$rwatch_exp $wpoffset_to_wpnum(1):.*alu..."
    ("foreach" body line 24)
    invoked from within
"foreach wpcount {4 7} {
    array set wpoffset_to_wpnum {}
    for {set wpoffset 1} {$wpoffset <= $wpcount} {incr wpoffset} {
        set test "$rwatch data...."
    (file
"/root/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint-unaligned.exp"
line 101)
    invoked from within
"source
/root/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint-unaligned.exp"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 source
/root/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint-unaligned.exp"
    invoked from within
"catch "uplevel #0 source $test_file_name" msg"
--------------------------------------------------
make[2]: *** [Makefile:226: do-check-single] Error 1

Attached patch fixes the TCL problem for me - but the test itself still fails:
                === gdb Summary ===

# of expected passes            142
# of unexpected failures        546
# of known failures             1
# of duplicate test names       16

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2023-04-12 20:57 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-12 20:57 ahajkova at redhat dot com [this message]
2023-04-13  7:47 ` [Bug gdb/30340] " luis.machado at arm dot com
2023-04-13 13:28 ` luis.machado at arm dot com
2023-04-13 13:52 ` ahajkova at redhat dot com
2023-04-13 14:01 ` luis.machado at arm dot com
2023-04-13 17:39 ` ahajkova at redhat dot com
2023-04-13 17:39 ` ahajkova at redhat dot com
2023-04-13 17:41 ` ahajkova at redhat dot com
2023-04-14  9:55 ` luis.machado at arm dot com
2023-04-14  9:56 ` luis.machado at arm dot com
2023-04-14 10:55 ` ahajkova at redhat dot com
2023-04-14 12:09 ` luis.machado at arm dot com
2023-04-14 13:58 ` luis.machado at arm dot com
2023-04-14 15:03 ` ahajkova at redhat dot com
2023-04-14 16:31 ` luis.machado at arm dot com
2023-04-14 19:00 ` ahajkova at redhat dot com
2023-04-17  8:25 ` luis.machado at arm dot com
2023-04-17  8:25 ` luis.machado at arm dot com
2023-04-17  9:16 ` ahajkova at redhat dot com
2023-04-17  9:25 ` ahajkova at redhat dot com
2023-04-17  9:32 ` luis.machado at arm dot com
2023-04-17  9:33 ` [Bug gdb/30340] [gdb/aarch64] gdb doesn't handle unknown debug architecture versions gracefully (TCL errors on gdb.base/watchpoint-unaligned.exp with KVM) luis.machado at arm dot com
2023-04-17 13:33 ` ahajkova at redhat dot com
2023-04-18  7:59 ` luis.machado at arm dot com
2023-04-18 11:47 ` [Bug tdep/30340] " luis.machado at arm dot com
2023-04-18 13:27 ` luis.machado at arm dot com
2023-04-18 13:28 ` luis.machado at arm dot com
2023-04-18 19:59 ` ahajkova at redhat dot com
2023-04-18 20:05 ` ahajkova at redhat dot com
2023-05-02  9:38 ` aburgess at redhat dot com
2023-05-02  9:41 ` aburgess at redhat dot com
2023-05-02 20:51 ` cvs-commit at gcc dot gnu.org
2023-05-09 10:01 ` luis.machado at arm dot com
2023-05-09 10:01 ` luis.machado at arm dot com
2023-05-15 10:02 ` aburgess at redhat dot com
2023-07-05 14:28 ` brobecker at gnat dot com
2023-07-05 14:28 ` brobecker at gnat dot com
2023-07-05 14:31 ` luis.machado at arm dot com

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=bug-30340-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).