This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC/TileGX] fix longjmp bug
- From: Pedro Alves <palves at redhat dot com>
- To: Jiong Wang <jiwang at tilera dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 01 Mar 2013 10:31:07 +0000
- Subject: Re: [RFC/TileGX] fix longjmp bug
- References: <51307BBA.3090202@tilera.com>
Thanks.
> gdb/ChangeLog:
>
> * tilegx-tdep.c (tilegx_get_longjmp_target): New function.
> (tilegx_gdbarch_init): Install it.
>
OK with the issues pointed out below fixed.
> +/* This is the implementation of gdbarch method get_longjmp_target. */
> +
> +static int
> +tilegx_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
> +{
> + struct gdbarch *gdbarch = get_frame_arch (frame);
> + enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
> + CORE_ADDR jb_addr;
> + char buf[8];
s/char/gdb_byte/.
> +
> + jb_addr = get_frame_register_unsigned (frame, TILEGX_R0_REGNUM);
> +
> + /* TileGX jmp_buf contains 32 elements of type __uint_reg_t which
> + is size of 8bytes, the return address is stored in the 25th slot. */
Grammar:
/* TileGX's jmp_buf contains 32 elements of type __uint_reg_t which
has a size of 8 bytes. The return address is stored in the 25th
slot. */
> + if (target_read_memory (jb_addr + 25 * 8, buf, 8))
should be single space ---------------^
OK with these issues fixed.
--
Pedro Alves