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: RFA [PATCH v3] Implement 'catch syscall' for gdbserver


Hello Philippe,

you may want to update the wiki [1] page about your progress wrt local/remote feature parity.

A minor comment below.

[1] https://sourceware.org/gdb/wiki/LocalRemoteFeatureParity

 -Sanimir

> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org] On Behalf
> Of Philippe Waroquiers
> Sent: Saturday, September 21, 2013 10:55 PM
> To: gdb-patches@sourceware.org
> Subject: RFA [PATCH v3] Implement 'catch syscall' for gdbserver
> 
> Index: gdbserver/linux-low.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbserver/linux-low.c,v
> retrieving revision 1.248
> diff -u -p -r1.248 linux-low.c
> --- gdbserver/linux-low.c	5 Sep 2013 20:45:39 -0000	1.248
> +++ gdbserver/linux-low.c	21 Sep 2013 20:38:15 -0000
> @@ -74,6 +74,11 @@
>  #define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
>  #endif
> 
> +/* Unlike other extended result codes, WSTOPSIG (status) on
> +   PTRACE_O_TRACESYSGOOD syscall events doesn't return SIGTRAP, but
> +   instead SIGTRAP with bit 7 set.  */
> +#define SYSCALL_SIGTRAP (SIGTRAP | 0x80)
> +
>  /* This is the kernel's hard limit.  Not to be confused with
>     SIGRTMIN.  */
>  #ifndef __SIGRTMIN
> @@ -481,6 +486,36 @@ get_pc (struct lwp_info *lwp)
>    return pc;
>  }
> 
> +/* This function should only be called if LWP got a SIGTRAP_SYSCALL.
> +   Fill *SYSNO with the syscall nr trapped.  Fill *SYSRET with the
> +   return code.  */
> +
> +static void
> +get_syscall_trapinfo (struct lwp_info *lwp, int *sysno, int *sysret)
> +{
> +  struct thread_info *saved_inferior;
> +  struct regcache *regcache;
> +
> +  if (the_low_target.get_syscall_trapinfo == NULL)
> +    {
> +      *sysno = 0;
> +      *sysret = 0;
> +      return;
> +    }
>
Is it sufficient to assign sysno/sysret to 0 to indicate missing 'catch syscall'
functionality? Both values seem legal to me.

Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052

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