> -----Original Message----- > From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org] On Behalf > Of Philippe Waroquiers > Sent: Monday, September 23, 2013 09:33 PM > To: Agovic, Sanimir > Cc: gdb-patches@sourceware.org > Subject: RE: RFA [PATCH v3] Implement 'catch syscall' for gdbserver > > On Mon, 2013-09-23 at 11:50 +0000, Agovic, Sanimir wrote: > > Hello Philippe, > > > > > > + 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. > The idea is that will be used in case the user forces the use of the > QCatchSyscalls packet. So, I think it is better to return "valid" (but > not used) values : I do not think there is a syscall nr 0. > gdb -batch -ex 'set architecture i386:x86-64' -ex 'catch syscall 0' The target architecture is assumed to be i386:x86-64 Catchpoint 1 (syscall 'read' [0]) I just wanted to make sure that we do not report any false syscalls. Thus I checked syscall 0 in gdb on amd64 which is mapped to 'read'. -Sanimir 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 &j!z޶Nzb֫rnr