public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Set section index when setting a symbol's block
@ 2023-02-08 16:46 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2023-02-08 16:46 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5abbfa982215a5bcd2bf2c0b92cbb005464dc927
commit 5abbfa982215a5bcd2bf2c0b92cbb005464dc927
Author: Tom Tromey <tromey@adacore.com>
Date: Fri Jan 13 09:17:27 2023 -0700
Set section index when setting a symbol's block
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.
Diff:
---
gdb/buildsym.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index d82c7672f7c..8dbb327f0eb 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -245,6 +245,7 @@ buildsym_compunit::finish_block_internal
struct type *ftype = symbol->type ();
struct mdict_iterator miter;
symbol->set_value_block (block);
+ symbol->set_section_index (SECT_OFF_TEXT (m_objfile));
block->set_function (symbol);
if (ftype->num_fields () <= 0)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-08 16:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-08 16:46 [binutils-gdb] Set section index when setting a symbol's block Tom Tromey
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).