PR gdb/14550
authorSanjoy Das <sanjoyd@sourceware.org>
Thu, 17 Jan 2013 14:11:27 +0000 (14:11 +0000)
committerSanjoy Das <sanjoyd@sourceware.org>
Thu, 17 Jan 2013 14:11:27 +0000 (14:11 +0000)
 * jit.c (finalize_symtab): Ensure that only the global block has a
   NULL superblock.

gdb/ChangeLog
gdb/jit.c

index d9db2b5c9d37f918e9a9117e5309627931eb9275..9a29599199e718b14ab5984e4dcbf2eb923096d1 100644 (file)
@@ -1,3 +1,10 @@
+2012-01-17  Sanjoy Das <sanjoy@playingwithpointers.com>
+
+       PR gdb/14550
+
+       * jit.c (finalize_symtab): Ensure that only the global block has a
+       NULL superblock.
+
 2013-01-17  Pedro Alves  <palves@redhat.com>
 
        * acinclude.m4: Include ../config/plugins.m4,
index a930f74b3243509374a707eb829590fec667432d..f542f9ebdf9cdac03263d47195464df9f4bdaf0e 100644 (file)
--- 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.  */
This page took 0.026973 seconds and 4 git commands to generate.