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: [Patch] Add mips*-linux* catch syscall support.


On Fri, Jan 21, 2011 at 11:47:40AM -0800, David Daney wrote:
> Index: gdb/mips-linux-tdep.c
> ===================================================================
> @@ -1206,6 +1207,40 @@ mips_linux_syscall_next_pc (struct frame
>  
>    return pc + 4;
>  }
> +/* Return the current system call's number present in the
> +   v0 register.  When the function fails, it returns -1.  */
> +static LONGEST
> +mips_linux_get_syscall_number (struct gdbarch *gdbarch,
> +                              ptid_t ptid)
> +{
> +  buf = (gdb_byte *) xmalloc (regsize * sizeof (gdb_byte));

Why not just use alloca or XALLOCAVEC here?

-Nathan


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