From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 23F9D3858CDA; Thu, 6 Apr 2023 06:13:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 23F9D3858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680761624; bh=0rn/SGeqBjJ86287fZzaSFKZJwrHTLfs9JvE2XronKs=; h=From:To:Subject:Date:From; b=OMZgTy2RX5w7C+CbbTgJ7njj8AB3IGORCwGWBYP4OTZbO2bivmzIn8p7GK3OWCFXd osBgMTIhm8F6THP4wPGYsk4ced6hlrPzDP191KlxQfsx87LnLh0ykNn9xOPnEwdUpR tCG9i/WiHsYiFGgAotH37X0Eohysu+3uJXWAov9g= From: "hluaw at connect dot ust.hk" To: gdb-prs@sourceware.org Subject: [Bug gdb/30319] New: GDB shows "Incompatible DWARF Stack" when it's actually compatible Date: Thu, 06 Apr 2023 06:13:43 +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: 13.1 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=3D30319 Bug ID: 30319 Summary: GDB shows "Incompatible DWARF Stack" when it's actually compatible Product: gdb Version: 13.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: hluaw at connect dot ust.hk Target Milestone: --- Given the following code: #include "stdint.h" int a, b =3D 9067; volatile uint16_t *c =3D (volatile uint16_t*)&b; int *d =3D &a; int func_1() { uint16_t e[7][2][8]; uint32_t f =3D 37455; int32_t l_146; a =3D 0; l_146 =3D *c * f; *d =3D e[3][1][5]; return l_146; } int main() { func_1(); return 0; } Compiled with clang 15.0.7 and -O1 -g. For l_146, the following DWARF is generated. (gdb) info addr l_146 Symbol "l_146" is multi-location: Range 0x555555554674-0x55555555467b: a complex DWARF expression: 0: DW_OP_breg0 0 [$rax] 2: DW_OP_constu 65535 6: DW_OP_and 7: DW_OP_convert 12: DW_OP_convert 17: DW_OP_constu 37455 21: DW_OP_mul 22: DW_OP_stack_value (gdb) p l_146 Incompatible types on DWARF stack GDB complaining that this DWARF expression is invalid since on DW_OP_mul, b= ut this DWARF is in fact valid since it performs a explicit conversion, and DW_OP_constu 37455 is automatically unsigned. --=20 You are receiving this mail because: You are on the CC list for the bug.=