public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "marian.buschsieweke at ovgu dot de" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/30431] segfault when inspecting remote variable Date: Tue, 09 May 2023 16:53:52 +0000 [thread overview] Message-ID: <bug-30431-4717-UVDNWQcCgi@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-30431-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=30431 --- Comment #3 from Marian Buschsieweke <marian.buschsieweke at ovgu dot de> --- btw, the obvious "fix" seems to work here: --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -752,15 +752,15 @@ obj_section = bmsym.minsym->obj_section (bmsym.objfile); /* Relocate address, unless there is no section or the variable is a TLS variable. */ - if (obj_section == NULL - || (obj_section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0) + if (obj_section == NULL || + (obj_section->the_bfd_section && (obj_section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0)) addr = bmsym.minsym->value_raw_address (); else addr = bmsym.value_address (); if (overlay_debugging) addr = symbol_overlayed_address (addr, obj_section); /* Determine address of TLS variable. */ - if (obj_section + if (obj_section && obj_section->the_bfd_section && (obj_section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0) addr = target_translate_tls_address (obj_section->objfile, addr); } I'm not sure if obj_section->the_bfd_section being NULL was just forgotten to be taken into account, or if this is rather a symptom of some deeper issue. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2023-05-09 16:53 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-05-08 21:05 [Bug gdb/30431] New: " marian.buschsieweke at ovgu dot de 2023-05-09 15:01 ` [Bug gdb/30431] " tromey at sourceware dot org 2023-05-09 15:59 ` marian.buschsieweke at ovgu dot de 2023-05-09 16:53 ` marian.buschsieweke at ovgu dot de [this message] 2023-06-02 7:19 ` marian.buschsieweke at posteo dot net 2023-06-02 15:06 ` tromey at sourceware dot org 2023-06-03 18:28 ` marian.buschsieweke at posteo dot net 2023-06-03 18:29 ` marian.buschsieweke at posteo dot net 2023-06-03 20:31 ` tromey at sourceware dot org 2023-06-03 21:33 ` marian.buschsieweke at posteo dot net 2023-06-03 21:35 ` marian.buschsieweke at posteo dot net 2023-06-04 17:25 ` tromey at sourceware dot org 2023-06-04 20:19 ` marian.buschsieweke at posteo dot net 2023-06-20 21:20 ` tromey at sourceware dot org 2023-06-20 21:21 ` tromey at sourceware dot org 2023-07-10 17:19 ` cvs-commit at gcc dot gnu.org 2023-07-10 17:19 ` 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-30431-4717-UVDNWQcCgi@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).