From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D6AA63850403; Tue, 18 May 2021 10:24:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6AA63850403 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug guile/26533] FAIL: gdb.guile/scm-type.exp: lang_c: test_fields: cast to array with two arguments Date: Tue, 18 May 2021 10:24:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: guile X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2021 10:24:15 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26533 --- Comment #11 from Tom de Vries --- I ported the test-case to the command line (hopefully, that'll be easier to debug). Using this python script to ignore errors: ... $ cat ignore-errors.py=20 class IgnoreErrorsCommand (gdb.Command): """Execute a single command, ignoring all errors. Only one-line commands are supported. This is primarily useful in scripts.""" def __init__ (self): super (IgnoreErrorsCommand, self).__init__ ("ignore-errors", gdb.COMMAND_OBSCURE, # FIXME... gdb.COMPLETE_COMMAND) def invoke (self, arg, from_tty): try: gdb.execute (arg, from_tty) except: pass IgnoreErrorsCommand () ... and this command file: ... $ cat cmd.gdb source ignore-errors.py set height 0 set width 0 dir dir /home/vries/gdb_versions/devel/src/gdb/testsuite/gdb.guile file /home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.guile/scm-ty= pe/scm-type guile (display "test\n") delete breakpoints info breakpoints break -qualified main run=20 guile (define (print x) (format #t "=3D ~A" x) (newline)) guile (define (raw-print x) (format #t "=3D ~S" x) (newline)) guile (use-modules (gdb)) guile (use-modules (gdb iterator)) break 88 continue guile (print (length (type-fields (value-type (parse-and-eval "ts"))))) print st guile (define st (history-ref 0)) guile (define st-type (value-type st)) guile (define fields (type-fields st-type)) guile (print (length fields)) guile (print (field-name (car fields))) guile (print (field-name (cadr fields))) guile (print (field-name (type-field st-type "a"))) guile (print (type-has-field? st-type "b")) guile (print (type-has-field? st-type "nosuch")) guile (print (type-num-fields (value-type st))) guile (define fi (make-field-iterator st-type)) guile (print (iterator-map field-bitpos fi)) ignore-errors guile (print (make-field-iterator (field-type (type-field st-= type "a")))) print ar guile (define ar (history-ref 0)) guile (define ar0 (value-subscript ar 0)) guile (print (value-cast ar0 (type-array (value-type ar0) 1))) guile (print (value-cast ar0 (type-array (value-type ar0) 0 1))) ... And this command line: ... $ gdb -q -batch outputs/gdb.guile/scm-type/scm-type -x cmd.gdb ... When run like so in conjunction with stress -c 5: ... $ for n in $(seq 100); do gdb -q -batch outputs/gdb.guile/scm-type/scm-type= -x cmd.gdb; echo $?; done 2>&1 | tee LOG ... I get: ... $ grep wrong -i LOG ERROR: In procedure gdbscm_type_array: Wrong type argument in position 1 (expecting gdb:type): # ERROR: In procedure gdbscm_type_array: Wrong type argument in position 1 (expecting gdb:type): # ERROR: In procedure gdbscm_type_array: Wrong type argument in position 1 (expecting gdb:type): # ERROR: In procedure gdbscm_type_array: Wrong type argument in position 1 (expecting gdb:type): # ... --=20 You are receiving this mail because: You are on the CC list for the bug.=