diff options
author | Sanjoy Das <sanjoyd@sourceware.org> | 2013-01-17 14:11:27 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoyd@sourceware.org> | 2013-01-17 14:11:27 +0000 |
commit | db334a01640a2f0e927e824d0d9f5d83d18d942d (patch) | |
tree | 54df24e3866e5b87694789905a29d7ef80fb2d3d /gdb/jit.c | |
parent | 7d928dac62ff39c745635b275faaa4a618bb6743 (diff) | |
download | gdb-db334a01640a2f0e927e824d0d9f5d83d18d942d.zip gdb-db334a01640a2f0e927e824d0d9f5d83d18d942d.tar.gz gdb-db334a01640a2f0e927e824d0d9f5d83d18d942d.tar.bz2 |
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
@@ -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. */ |