public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/29468] New: GDB test gdb.base/ctf-constvars.exp fails.
@ 2022-08-10 20:30 cel at us dot ibm.com
  2022-09-20 15:43 ` [Bug gdb/29468] " vries at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: cel at us dot ibm.com @ 2022-08-10 20:30 UTC (permalink / raw)
  To: gdb-prs

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-10-12 16:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-10 20:30 [Bug gdb/29468] New: GDB test gdb.base/ctf-constvars.exp fails cel at us dot ibm.com
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

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