[4/6] Set section index when setting a symbol's block
Commit Message
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(+)
@@ -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)