This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC/TileGX] fix longjmp bug


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]