public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tromey@adacore.com>
Cc: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Make gdb.ada/ptype_tagged_param.exp pass
Date: Fri, 27 Jan 2023 10:56:54 -0500	[thread overview]
Message-ID: <ab3893f6-f781-6332-d9c5-cb71ebd99788@simark.ca> (raw)
In-Reply-To: <87r0vgqd77.fsf@tromey.com>

On 1/27/23 09:11, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
> 
> Simon> Woops, I hit a FAIL here.  I think the $has_runtime_debug_info condition
> Simon> is backwards
> 
> I can check in a patch to flip this if you think that will help.  I have
> no way to test it, though.  I tried installing and removing the relevant
> debuginfo packages on my machine, but the test works either way for me.

So, the current code is:


 50     -re -wrap $nodebug {
 51         if {$has_runtime_debug_info} {
 52             kfail "no debug info" $gdb_test_name
 53         } else {
 54             fail $gdb_test_name
 55         }
 56     }

This says: if we receive the wrong output, and we have GNAT debug info,
this is expected.  I think it's wrong, it should be: if we receive the
wrong output and we _don't_ have debug info, this is expected.

I see this on Ubuntu 22.04, with the gnat-11 package installed.  Without
libgnat-11-dbgsym, I get:

(gdb) ptype s
type = <ref> tagged record
    x: integer;
    y: integer;
end record
(gdb) FAIL: gdb.ada/ptype_tagged_param.exp: ptype s

And with libgnat-11-dbgsym installed:

type = <ref> new pck.shape with record
    r: integer;
end record
(gdb) PASS: gdb.ada/ptype_tagged_param.exp: ptype s

If I flip the condition to what I think makes more sense, the former
(without libgnat-11-dbgsym) case becomes:

type = <ref> tagged record
    x: integer;
    y: integer;
end record
(gdb) KFAIL: gdb.ada/ptype_tagged_param.exp: ptype s (PRMS: no debug info)

And the "with libgnat-11-dbgsym" case still passes fine, since it
outputs the right thing.

Simon

  reply	other threads:[~2023-01-27 15:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19 16:31 Tom Tromey
2023-01-20 17:00 ` Simon Marchi
2023-01-20 17:05   ` Tom Tromey
2023-01-27  5:58     ` Simon Marchi
2023-01-27 14:11       ` Tom Tromey
2023-01-27 15:56         ` Simon Marchi [this message]
2023-01-27 17:24           ` 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=ab3893f6-f781-6332-d9c5-cb71ebd99788@simark.ca \
    --to=simark@simark.ca \
    --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).