public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH 4/6] Set section index when setting a symbol's block
Date: Wed, 18 Jan 2023 08:30:23 -0700	[thread overview]
Message-ID: <20230118153025.342512-5-tromey@adacore.com> (raw)
In-Reply-To: <20230118153025.342512-1-tromey@adacore.com>

When a symbol's block is set, the block has the runtime section offset
applied.  So, it seems to me that the symbol implicitly is in the same
section as the block.  Therefore, this patch sets the symbol's section
index at this same spot.
---
 gdb/buildsym.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 8c61223b1a0..fa55699b40e 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -247,6 +247,7 @@ buildsym_compunit::finish_block_internal
       struct type *ftype = symbol->type ();
       struct mdict_iterator miter;
       symbol->set_value_block (block);
+      symbol->set_section_index (m_section_index);
       block->set_function (symbol);
 
       if (ftype->num_fields () <= 0)
-- 
2.38.1


  parent reply	other threads:[~2023-01-18 15:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-18 15:30 [PATCH 0/6] Change how symbol section indices are set Tom Tromey
2023-01-18 15:30 ` [PATCH 1/6] Use default section indexes in fixup_symbol_section Tom Tromey
2023-01-18 17:19   ` Simon Marchi
2023-01-18 19:13     ` Tom Tromey
2023-01-18 15:30 ` [PATCH 2/6] Set section indices when symbols are made Tom Tromey
2023-01-18 21:43   ` Simon Marchi
2023-01-18 22:00     ` Tom Tromey
2023-01-18 15:30 ` [PATCH 3/6] Pass section index to start_compunit_symtab Tom Tromey
2023-01-18 21:55   ` Simon Marchi
2023-01-18 22:02     ` Tom Tromey
2023-01-18 22:06       ` Simon Marchi
2023-01-19 13:36         ` Tom Tromey
2023-02-08 16:28           ` Tom Tromey
2023-01-18 15:30 ` Tom Tromey [this message]
2023-01-18 15:30 ` [PATCH 5/6] Remove most calls to fixup_symbol_section Tom Tromey
2023-01-18 15:30 ` [PATCH 6/6] Merge fixup_section and fixup_symbol_section Tom Tromey
2023-02-08 16:28 ` [PATCH 0/6] Change how symbol section indices are set Tom Tromey

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=20230118153025.342512-5-tromey@adacore.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@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).