public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cel at us dot ibm.com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/29468] New: GDB test gdb.base/ctf-constvars.exp fails.
Date: Wed, 10 Aug 2022 20:30:26 +0000	[thread overview]
Message-ID: <bug-29468-4717@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 29468
           Summary: GDB test gdb.base/ctf-constvars.exp fails.
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: cel at us dot ibm.com
  Target Milestone: ---

The gdb test gdb.base/ctf-constvars.exp fails with gcc (GCC) 12.1.1 20220507
(Red Hat 12.1.1-1)

The test is for the new CTF debug support in gdb/gcc.

In discussing the issue with the test author, they indicate that the issue may
be with ld.  

When the test is run with the command:

 make check RUNTESTFLAGS='GDB=/home/carll/bin/gdb gdb.base/ctf-constvars.exp  '
> out

two files are generated in gdb/testsuite/outputs/gdb.base/ctf-constvars, they
are ctf-constvars0.o  and ctf-constvars.  If you check for the CFT information
in the files using:

objdump --ctf ctf-constvars > ctf-constvars.dump
objdump --ctf ctf-constvars0.o > ctf-constvars0.o.dump

you will find a section "Variables".  in ctf-constvars0.o.dump the section
contains values, i.e.

  Variables:
    caveat -> 0x7: (kind 11) const char *volatile (size 0x8) (aligned at 0x8)
-> 0x5: (kind 3) const char * (size 0x8) (aligned at 0x8) -> 0x2: (kind 12)
const char (size 0x1) (aligned at 0x1) -> 0x1: (kind 1) char (format 0x2) (size
0x1) (aligned at 0x1)
    cavern -> 0x3c: (kind 12) const volatile char *const (size 0x8) (aligned at
0x8) -> 0x3b: (kind 3) const volatile char * (size 0x8) (aligned at 0x8) ->
0x4: (kind 12) const volatile char (size 0x1) (aligned at 0x1) -> 0x3: (kind
11) volatile char (size 0x1) (aligned at 0x1) -> 0x1: (kind 1) char (format
0x2) (size 0x1) (aligned at 0x1)

 etc.

However in the final binary, ctf-constvars.dump all you see is:

  Function objects:

  Variables:

  Types:
    0x1: (kind 1) char (format 0x2) (size 0x1) (aligned at 0x1)
  etc.

Basically, the Variables section is blank in the final binary output. 
Apparently, the ld tool didn't include the data as expected.

The result of all this is the gdb test fails as it can't find the needed debug
information.

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

             reply	other threads:[~2022-08-10 20:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10 20:30 cel at us dot ibm.com [this message]
2022-09-20 15:43 ` [Bug gdb/29468] " vries at gcc dot gnu.org
2022-09-27 15:34 ` vries at gcc dot gnu.org
2022-10-12 15:18 ` [Bug testsuite/29468] " vries at gcc dot gnu.org
2022-10-12 15:39 ` cel at us dot ibm.com
2022-10-12 15:55 ` vries at gcc dot gnu.org
2022-10-12 15:56 ` vries at gcc dot gnu.org
2022-10-12 16:06 ` cel at us dot ibm.com
2022-10-12 16:09 ` vries at gcc dot gnu.org

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-29468-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).