Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Fix GDB crash while trying to display the return type of a JIT frame.
@ 2012-06-04 20:47 Kaushik Srenevasan
  2012-06-05 14:14 ` Daniel Jacobowitz
  2012-06-05 15:38 ` Pedro Alves
  0 siblings, 2 replies; 6+ messages in thread
From: Kaushik Srenevasan @ 2012-06-04 20:47 UTC (permalink / raw)
  To: gdb-patches

This patch fixes GDB crashes due to missing function return type on
JIT reader symbols.

See http://sourceware.org/ml/gdb/2012-05/msg00126.html for the
original discussion.

   -Kaushik

2012-06-04  Kaushik Srenevasan  <kaushik@twitter.com>

	* jit.c (finalize_symtab): Set function's return type to 'void'
          by default.

diff --git a/gdb/jit.c b/gdb/jit.c
index f172e41..7bd4a27 100644
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -672,6 +672,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(arch_type(target_gdbarch, TYPE_CODE_VOID, 1, "void"));
       SYMBOL_BLOCK_VALUE (block_name) = new_block;
 
       block_name->ginfo.name = obsavestring (gdb_block_iter->name,


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-06-13 21:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-04 20:47 Fix GDB crash while trying to display the return type of a JIT frame Kaushik Srenevasan
2012-06-05 14:14 ` Daniel Jacobowitz
2012-06-05 21:16   ` Kaushik Srenevasan
2012-06-13 21:16     ` Tom Tromey
2012-06-13 21:52       ` Kaushik Srenevasan
2012-06-05 15:38 ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox