This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix http://sourceware.org/bugzilla/show_bug.cgi?id=14550
- From: Sanjoy Das <sanjoy at playingwithpointers dot com>
- To: gdb-patches at sourceware dot org
- Cc: Sanjoy Das <sanjoy at playingwithpointers dot com>
- Date: Mon, 10 Sep 2012 22:17:34 +0530
- Subject: Re: [PATCH] Fix http://sourceware.org/bugzilla/show_bug.cgi?id=14550
- References: <1346949585-8535-1-git-send-email-sanjoy@playingwithpointers.com>
Ping! Any comment on this?
On Thu, Sep 6, 2012 at 10:09 PM, Sanjoy Das
<sanjoy@playingwithpointers.com> wrote:
> The JIT reader interface is currently broken -- gdb segfaults on backtracing through JITted frames. This patch fixes the issue.
>
> --
> Sanjoy
>
> ---
> gdb/ChangeLog | 7 +++++++
> gdb/jit.c | 14 ++++++++++++--
> 2 files changed, 19 insertions(+), 2 deletions(-)
>
> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
> index 05b3142..48e2631 100644
> --- a/gdb/ChangeLog
> +++ b/gdb/ChangeLog
> @@ -1,3 +1,10 @@
> +2012-09-06 Sanjoy Das <sanjoy@playingwithpointers.com>
> +
> + PR gdb/14550
> +
> + * jit.c (finalize_symtab): Ensure that only the global block has a
> + NULL superblock.
> +
> 2012-09-02 Khoo Yit Phang <khooyp@cs.umd.edu>
>
> Do not enable -lmcheck by default when Python is enabled with
> diff --git a/gdb/jit.c b/gdb/jit.c
> index 9e8f295..2f9d426 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. */
> --
> 1.7.10.4
>
--
Sanjoy Das
http://playingwithpointers.com