public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Revert "gdb: fix possible uninitialised variable use" Date: Tue, 26 Mar 2024 18:58:48 +0000 (GMT) [thread overview] Message-ID: <20240326185848.EF3EA3858417@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c17389078ae2a2a4f6aade6bfbabbf3a41d28f14 commit c17389078ae2a2a4f6aade6bfbabbf3a41d28f14 Author: Andrew Burgess <aburgess@redhat.com> Date: Tue Mar 26 18:50:58 2024 +0000 Revert "gdb: fix possible uninitialised variable use" This reverts commit 24df37a10f8773ad5db07dc000f694d6405e3a36. Diff: --- gdb/i386-linux-tdep.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index 2e84384306d..ed1442236e8 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -700,15 +700,17 @@ i386_linux_core_read_description (struct gdbarch *gdbarch, x86_xsave_layout layout; uint64_t xcr0 = i386_linux_core_read_xsave_info (abfd, layout); - if (xcr0 == 0) - { - if (bfd_get_section_by_name (abfd, ".reg-xfp") != nullptr) - xcr0 = X86_XSTATE_SSE_MASK; - else - xcr0 = X86_XSTATE_X87_MASK; - } + const struct target_desc *tdesc; + if (xcr0 != 0) + tdesc = i386_linux_read_description (xcr0); - return i386_linux_read_description (xcr0); + if (tdesc != NULL) + return tdesc; + + if (bfd_get_section_by_name (abfd, ".reg-xfp") != NULL) + return i386_linux_read_description (X86_XSTATE_SSE_MASK); + else + return i386_linux_read_description (X86_XSTATE_X87_MASK); } /* Similar to i386_supply_fpregset, but use XSAVE extended state. */
reply other threads:[~2024-03-26 18:58 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240326185848.EF3EA3858417@sourceware.org \ --to=aburgess@sourceware.org \ --cc=gdb-cvs@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).