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


On Tuesday, September 24 2013, Sanimir Agovic wrote:

>> > 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'.

Thanks for catching that.  I guess I had to solve the same problem for
the native "catch syscall".  If you look at the UNKNOWN_SYSCALL define
(it's on gdbarch.h), you'll see that I have chosen the value of -1.  I
guess you could use the same trick, Philippe.  WDYT?

-- 
Sergio


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