diff options
author | sanjoyd <sanjoyd> | 2013-01-17 14:11:22 +0000 |
---|---|---|
committer | sanjoyd <sanjoyd> | 2013-01-17 14:11:22 +0000 |
commit | b41ba489533d5a2d89369be9ac1002c53f503eef (patch) | |
tree | 38ae3b828dc416165abd49e835ed691ddb21901e /gdb/jit.c | |
parent | 469590970fadf16e815186edaea6d7be775a668b (diff) | |
download | gdb-b41ba489533d5a2d89369be9ac1002c53f503eef.tar.gz |
PR gdb/14550
* jit.c (finalize_symtab): Ensure that only the global block has a
NULL superblock.
Diffstat (limited to 'gdb/jit.c')
-rw-r--r-- | gdb/jit.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gdb/jit.c b/gdb/jit.c index a930f74b324..f542f9ebdf9 100644 --- a/gdb/jit.c +++ b/gdb/jit.c @@ -724,8 +724,18 @@ finalize_symtab (struct gdb_symtab *stab, struct objfile *objfile) gdb_block_iter = gdb_block_iter->next) { if (gdb_block_iter->parent != NULL) - BLOCK_SUPERBLOCK (gdb_block_iter->real_block) = - gdb_block_iter->parent->real_block; + { + /* If the plugin specifically mentioned a parent block, we + use that. */ + BLOCK_SUPERBLOCK (gdb_block_iter->real_block) = + gdb_block_iter->parent->real_block; + } + else + { + /* And if not, we set a default parent block. */ + BLOCK_SUPERBLOCK (gdb_block_iter->real_block) = + BLOCKVECTOR_BLOCK (symtab->blockvector, STATIC_BLOCK); + } } /* Free memory. */ |