From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1619E3858D32; Fri, 31 Mar 2023 16:27:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1619E3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680280063; bh=NxLO7LSah2u9v2HEWWQXNRSzd8wyZZhu6KNSvAhlx4I=; h=From:To:Subject:Date:From; b=RPMxcu3PzA2zrDY0w8bL4yfVk5BAJ9R6bgLme+u6zM7xE940S0vW5z2QepMm2C2zx 2yRzmxL6nXWtazydTlBShb5LLwcbuV3yUm2WGmCgKs+fHsZy0CtaczmdtmcvpBM/Sa 9YLzT77vSLjBqB2YYcOLSVcnLS/LiZCaPrfbHSyk= From: "hluaw at connect dot ust.hk" To: gdb-prs@sourceware.org Subject: [Bug gdb/30296] New: GDB showing for struct members that are clearly not. Date: Fri, 31 Mar 2023 16:27:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hluaw at connect dot ust.hk X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30296 Bug ID: 30296 Summary: GDB showing 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] =3D {0x5C253C716A15F506LL, 0x5C253C716A15F506LL, 0x5C253C716A15F506LL, 0x5C253C716A15F506LL}; b =3D 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 =3D l_126[0]; (gdb) p l_126 $1 =3D {6639779683436459270, , , } (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]. --=20 You are receiving this mail because: You are on the CC list for the bug.=