public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "boudewijn83 at gmail dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug breakpoints/31481] Certain instructions load the wrong RIP-relative memory after setting a breakpoint Date: Sat, 16 Mar 2024 11:54:15 +0000 [thread overview] Message-ID: <bug-31481-4717-jQUb9sXK0I@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-31481-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=31481 --- Comment #4 from Boudewijn <boudewijn83 at gmail dot com> --- Created attachment 15409 --> https://sourceware.org/bugzilla/attachment.cgi?id=15409&action=edit Proposed patch, fixes #28999 and #31481 There's actually no need for an extra lookup table. All (E)VEX prefixed instructions share the same two properties: - the (explicit part of the) opcode is only 1 byte - they all have a ModRM byte, except VZEROALL/VZEROUPPER So when there's an (E)VEX prefix it suffices to test for VZEROALL/VZEROUPPER (opcode 0x77): if (vex2 or vex3 or evex) { details->opcode_len = 1; need_modrm = (*insn != 0x77); } else { use the legacy has_modrm tables } I've attached a patch that implements this. PS: I've tested VEX2/VEX3, but don't have an AVX-512 capable CPU so I'm not able to test the EVEX handling. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2024-03-16 11:54 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-14 1:55 [Bug breakpoints/31481] New: " boudewijn83 at gmail dot com 2024-03-14 13:01 ` [Bug breakpoints/31481] " tromey at sourceware dot org 2024-03-14 16:35 ` boudewijn83 at gmail dot com 2024-03-14 20:29 ` tromey at sourceware dot org 2024-03-14 22:43 ` sam at gentoo dot org 2024-03-16 11:54 ` boudewijn83 at gmail dot com [this message] 2024-03-16 17:39 ` tromey at sourceware dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-31481-4717-jQUb9sXK0I@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).