public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/30296] New: GDB showing <synthetic pointer> for struct members that are clearly not.
@ 2023-03-31 16:27 hluaw at connect dot ust.hk
  2023-03-31 16:56 ` [Bug gdb/30296] " tromey at sourceware dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: hluaw at connect dot ust.hk @ 2023-03-31 16:27 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 30296
           Summary: GDB showing <synthetic pointer> for struct members
                    that are clearly not.
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: hluaw at connect dot ust.hk
  Target Milestone: ---

Code:
#include "stdint.h"
int a, b;
volatile int c;
int16_t func_3();
int16_t func_3() {
  int64_t l_126[4] = {0x5C253C716A15F506LL, 0x5C253C716A15F506LL,
                      0x5C253C716A15F506LL, 0x5C253C716A15F506LL};
  b = l_126[0];
  return c;
}
int main() { func_3(); }


Compile:
$ clang -O1 -g r.c
$ clang -v
  clang version 15.0.7
  Target: x86_64-pc-linux-gnu
  Thread model: posix
  InstalledDir: /usr/lib/llvm/15/bin
  Configuration file: /etc/clang/clang.cfg
  System configuration file directory: /etc/clang
  Selected GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/11
  Candidate multilib: .;@m64
  Candidate multilib: 32;@m32
  Selected multilib: .;@m64

GDB Behavior:
(gdb) b func_3
Breakpoint 1 at 0x1130: func_3. (2 locations)
(gdb) r
Starting program: /home/john/documents/debugger-bugs/struct_syn/reduce/a.out
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Breakpoint 1, func_3 () at r.c:8
8         b = l_126[0];
(gdb) p l_126
$1 = {6639779683436459270, <synthetic pointer>, <synthetic pointer>, <synthetic
pointer>}
(gdb) info addr l_126
Symbol "l_126" is a complex DWARF expression:
     0: DW_OP_constu 6639779683436459270
    10: DW_OP_stack_value
    [8-byte piece].

-- 
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:[~2023-05-11 21:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-31 16:27 [Bug gdb/30296] New: GDB showing <synthetic pointer> for struct members that are clearly not hluaw at connect dot ust.hk
2023-03-31 16:56 ` [Bug gdb/30296] " tromey at sourceware dot org
2023-03-31 17:03 ` tromey at sourceware dot org
2023-04-20 22:23 ` tromey at sourceware dot org
2023-04-21  0:33 ` tromey at sourceware dot org
2023-04-21 12:20 ` tromey at sourceware dot org
2023-04-21 23:28 ` tromey at sourceware dot org
2023-05-11 21:48 ` cvs-commit at gcc dot gnu.org
2023-05-11 21:49 ` tromey at sourceware dot 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).