From: Sanjoy Das Date: Thu, 17 Jan 2013 14:11:27 +0000 (+0000) Subject: PR gdb/14550 X-Git-Tag: sid-snapshot-20130201~173 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db334a01640a2f0e927e824d0d9f5d83d18d942d;p=external%2Fbinutils.git PR gdb/14550 * jit.c (finalize_symtab): Ensure that only the global block has a NULL superblock. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d9db2b5..9a29599 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2012-01-17 Sanjoy Das + + PR gdb/14550 + + * jit.c (finalize_symtab): Ensure that only the global block has a + NULL superblock. + 2013-01-17 Pedro Alves * acinclude.m4: Include ../config/plugins.m4, diff --git a/gdb/jit.c b/gdb/jit.c index a930f74..f542f9e 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. */