public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Carl Love <cel@us.ibm.com>
To: Tom Tromey <tromey@adacore.com>,
	Carl Love via Gdb-patches <gdb-patches@sourceware.org>
Cc: Ulrich.Weigand@de.ibm.com, cel@us.ibm.com
Subject: RE: [PATCH] gdb.ada/mi_var_access.exp
Date: Fri, 11 Aug 2023 10:14:24 -0700	[thread overview]
Message-ID: <9ba870d323b0d30ec36d4c3865ed937770d268ba.camel@us.ibm.com> (raw)
In-Reply-To: <87fs4p1tes.fsf@tromey.com>

Tom:
On Fri, 2023-08-11 at 09:38 -0600, Tom Tromey wrote:
> > > > > > "Carl" == Carl Love via Gdb-patches <
> > > > > > gdb-patches@sourceware.org> writes:
> 
> Carl> The following patch fixes two failures on PowerPC.  The test
> expects
> Carl> the value of NUMCHILD to always be 1 but on PowerPC it is 2.
> 
> What is the extra child?
> Seeing the MI output here might be informative.
> 
I see I have a typo above.  The test is expecting 1, but it is 0 on
PowerPC, not 2 as stated above.

(gdb) 
Expecting: ^(-var-create A_String_Access \* A_String_Access[^M
]+)?((\^done,name="A_String_Access",numchild="1",.*|\^error,msg="Value out of range.".*)[
]+[(]gdb[)] 
[ ]*)
-var-create A_String_Access * A_String_Access
^done,name="A_String_Access",numchild="0",value="0x0",type="pck.string_access",thread-id="1",has_more="0"
(gdb) 
FAIL: gdb.ada/mi_var_access.exp: Create varobj (unexpected output)


I have looked thru the log file for other places where numchild is
printed.  There is one other place which is after the second test
failure that the patch fixes.  In this case we get the expected value
of numchild:

(gdb) 
Expecting: ^(-var-update A_String_Access[
]+)?(\^done,changelist=\[\{name="A_String_Access",in_scope="true",type_changed="false",has_more="0"\}\][
]+[(]gdb[)] 
[ ]*)
-var-update A_String_Access
^done,changelist=[{name="A_String_Access",in_scope="true",type_changed="true",new_type="pck.string_access",new_num_children="1",has_more="0"}]
(gdb) 
FAIL: gdb.ada/mi_var_access.exp: update at stop 2 (unexpected output)

Expecting: ^(-var-list-children A_String_Access[]+)?(\^done,numchild="1",children=\[child=\{name="A_String_Access\.A_String_Access\.all",exp="A_String_Access\.all",numchild="3",type="array \(3 \.\. 5\) of character",thread-id="1"\}\],has_more="0"[
]+[(]gdb[)] 
[ ]*)
-var-list-children A_String_Access
^done,numchild="1",children=[child={name="A_String_Access.A_String_Access.all",exp="A_String_Access.all",numchild="3",type="array (3 .. 5) of character",thread-id="1"}],has_more="0"
(gdb) 
PASS: gdb.ada/mi_var_access.exp: list children at stop 2

In this case, the numchild value argrees with the expected output. 

                               Carl 





  reply	other threads:[~2023-08-11 17:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10 19:26 Carl Love
2023-08-11 15:38 ` Tom Tromey
2023-08-11 17:14   ` Carl Love [this message]
2023-08-11 20:35     ` Tom Tromey

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=9ba870d323b0d30ec36d4c3865ed937770d268ba.camel@us.ibm.com \
    --to=cel@us.ibm.com \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.com \
    /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).