From: Daniel Jacobowitz <daniel.jacobowitz@gmail.com>
To: Kaushik Srenevasan <kaushik@twitter.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Fix GDB crash while trying to display the return type of a JIT frame.
Date: Tue, 05 Jun 2012 14:14:00 -0000 [thread overview]
Message-ID: <CAN9gPaFRTvJkxxDxUWbNS7yiNP9xV02gWH3bPmq3c3GTRPavgQ@mail.gmail.com> (raw)
In-Reply-To: <87vcj624dl.fsf@garudatw.twitter.com>
On Mon, Jun 4, 2012 at 4:45 PM, Kaushik Srenevasan <kaushik@twitter.com> wrote:
> This patch fixes GDB crashes due to missing function return type on
> JIT reader symbols.
The approach makes sense.
> 2012-06-04 Kaushik Srenevasan <kaushik@twitter.com>
>
> * jit.c (finalize_symtab): Set function's return type to 'void'
> by default.
Nit: second line should line up with the asterisk, not further in.
>
> 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"));
Nits: watch out for the coding style, particularly space before open
paren and 80 column limit.
> SYMBOL_BLOCK_VALUE (block_name) = new_block;
>
> block_name->ginfo.name = obsavestring (gdb_block_iter->name,
--
Thanks,
Daniel
next prev parent reply other threads:[~2012-06-05 14:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-04 20:47 Kaushik Srenevasan
2012-06-05 14:14 ` Daniel Jacobowitz [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAN9gPaFRTvJkxxDxUWbNS7yiNP9xV02gWH3bPmq3c3GTRPavgQ@mail.gmail.com \
--to=daniel.jacobowitz@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=kaushik@twitter.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox