public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug breakpoints/26546] [pie] Setting breakpoint on missing label sets breakpoint at offset 0 in NULL section
Date: Fri, 28 Aug 2020 11:33:08 +0000	[thread overview]
Message-ID: <bug-26546-4717-l00fwxoRKe@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-26546-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=26546

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Tentative patch:
...
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 0ac8533263..b37f7e7a2f 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -21447,10 +21447,12 @@ new_symbol (struct die_info *die, struct type *t
ype, struct dwarf2_cu *cu,
              addr = attr->value_as_address ();
              addr = gdbarch_adjust_dwarf2_addr (gdbarch, addr + baseaddr);
              SET_SYMBOL_VALUE_ADDRESS (sym, addr);
+             SYMBOL_ACLASS_INDEX (sym) = LOC_LABEL;
            }
+         else
+           SYMBOL_ACLASS_INDEX (sym) = LOC_OPTIMIZED_OUT;
          SYMBOL_TYPE (sym) = objfile_type (objfile)->builtin_core_addr;
          SYMBOL_DOMAIN (sym) = LABEL_DOMAIN;
-         SYMBOL_ACLASS_INDEX (sym) = LOC_LABEL;
          add_symbol_to_list (sym, cu->list_in_scope);
          break;
        case DW_TAG_subprogram:
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  reply	other threads:[~2020-08-28 11:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28 10:27 [Bug breakpoints/26546] New: " vries at gcc dot gnu.org
2020-08-28 11:33 ` vries at gcc dot gnu.org [this message]
2020-09-03 10:30 ` [Bug breakpoints/26546] " cvs-commit at gcc dot gnu.org
2020-09-03 10:31 ` vries at gcc dot gnu.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-26546-4717-l00fwxoRKe@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: link
Be 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).