This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [Patch] Add mips*-linux* catch syscall support.
- From: Nathan Froyd <froydnj at codesourcery dot com>
- To: David Daney <ddaney at caviumnetworks dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 22 Jan 2011 07:06:00 -0800
- Subject: Re: [Patch] Add mips*-linux* catch syscall support.
- References: <4D39E2DC.6060907@caviumnetworks.com>
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