aboutsummaryrefslogtreecommitdiff
path: root/gdb/jit.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-06-13 21:16:49 +0000
committerTom Tromey <tromey@redhat.com>2012-06-13 21:16:49 +0000
commit2535757a2b980a4def5059ad2f663f98ee49d564 (patch)
treedb7e4ced862a2581c41397be3641e4aec40f2a5b /gdb/jit.c
parent5a83521a3c976ef2a38d49894e33e088df13d1a8 (diff)
downloadgdb-2535757a2b980a4def5059ad2f663f98ee49d564.zip
gdb-2535757a2b980a4def5059ad2f663f98ee49d564.tar.gz
gdb-2535757a2b980a4def5059ad2f663f98ee49d564.tar.bz2
2012-06-13 Kaushik Srenevasan <kaushik@twitter.com>
* jit.c (finalize_symtab): Set function's return type to 'void' by default.
Diffstat (limited to 'gdb/jit.c')
-rw-r--r--gdb/jit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/jit.c b/gdb/jit.c
index f172e41..568d17b 100644
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -660,6 +660,10 @@ finalize_symtab (struct gdb_symtab *stab, struct objfile *objfile)
struct block *new_block = allocate_block (&objfile->objfile_obstack);
struct symbol *block_name = obstack_alloc (&objfile->objfile_obstack,
sizeof (struct symbol));
+ struct type *block_type = arch_type (get_objfile_arch (objfile),
+ TYPE_CODE_VOID,
+ 1,
+ "void");
BLOCK_DICT (new_block) = dict_create_linear (&objfile->objfile_obstack,
NULL);
@@ -672,6 +676,7 @@ finalize_symtab (struct gdb_symtab *stab, struct objfile *objfile)
SYMBOL_DOMAIN (block_name) = VAR_DOMAIN;
SYMBOL_CLASS (block_name) = LOC_BLOCK;
SYMBOL_SYMTAB (block_name) = symtab;
+ SYMBOL_TYPE (block_name) = lookup_function_type (block_type);
SYMBOL_BLOCK_VALUE (block_name) = new_block;
block_name->ginfo.name = obsavestring (gdb_block_iter->name,