From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7E25738708EC; Sat, 9 Jan 2021 19:43:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E25738708EC From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug compile/25575] Compile command crashes or fails with AVX registers and -O2 Date: Sat, 09 Jan 2021 19:43:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: compile X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot org 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: cc Message-ID: In-Reply-To: References: 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2021 19:43:47 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25575 Tom Tromey changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at sourceware dot o= rg --- Comment #1 from Tom Tromey --- The problem here seems to me that the DWARF expression for 'x' references register 207, but up in generate_c_for_variable_locations: gdb::unique_xmalloc_ptr registers_used (XCNEWVEC (unsigned char, gdbarch_num_regs (gdbarch))); and (top-gdb) p gdbarch_num_regs(gdbarch) $6 =3D 155 So this is also an invalid memory access as well I think. Digging a bit deeper I see that ymm0 is apparently a pseudo-register. So, I think there are a couple of problems here. One is that the DWARF-lowering code should probably translate to gdb register numbers. But, to do this, we'd also have to handle pseudos. But, I don't think there's a way to translate pseudo-registers to their underlying GDB registers. I guess this can be done in an ad hoc way by the tdep code. Not sure how to approach this. Maybe the whole thing could be rephrased in terms of regsets? --=20 You are receiving this mail because: You are on the CC list for the bug.=