Hi Eli, On Saturday 05 September 2009, Eli Zaretskii wrote: > > From: Sérgio_Durigan_Júnior > > Date: Fri, 4 Sep 2009 16:00:53 -0300 > > > > At last but not least, here is the patch that updates the build system, > > testcase and documentation parts of GDB. > > Thanks. I do have some comments, though (sorry). No problem. > > +* GDB now has the new command `catch syscall'. It can be used to > > +catch when the inferior calls a system call, or when the system call > > +returns. Also, you can specify which system calls you would like GDB > > +to catch (or issue only a `catch syscall' without arguments, which will > > +make GDB catch every system call). For instance, if you would like to > > +catch the system call close, you would issue a: > > + > > + (gdb) catch syscall close > > + > > +Then, when the program is running again, GDB will keep track of all > > +the system calls the inferior is calling, and will stop the execution > > +if the system call called or returned is equal to the system call > > +that you asked it to catch (note that if you did not provide any system > > +call, then GDB would stop on any system call). After stopping the > > +inferior, GDB will print something like: > > + > > + Catchpoint 1 (call to syscall 'close'), > > + 0xb7ff831d in ?? () from /lib/ld-linux.so.2 > > + > > +It indicates that the correct system call was caught. If you choose > > +to continue the execution of the inferior from this point, then you > > +should see GDB catching the return of this system call, like that: > > + > > + Catchpoint 1 (returned from syscall 'close'), > > + 0xb7ff831d in ?? () from /lib/ld-linux.so.2 > > + > > +This feature is available with a native GDB running on the Linux Kernel, > > +under the following architectures: x86, x86_64, PowerPC and PowerPC64. > > This is okay, but much too long for a NEWS entry. I suggest the > following shorter variant, which is similar to other NEWS entries: > > catch syscall [NAME(S) | NUMBER(S)] > Catch system calls. Arguments, which should be names of system > calls or their numbers, mean catch only those syscalls. Without > arguments, every syscall will be caught. When the inferior issues > any of the specified syscalls, GDB will stop and announce the system > call, both when it is called and when its call returns. This > feature is currently available with a native GDB running on the > Linux Kernel, under the following architectures: x86, x86_64, > PowerPC and PowerPC64. > > Also, please put this entry in the "New commands" section of NEWS. Ok, done. Please, take a look at this now. Regards, -- Sérgio Durigan Júnior Linux on Power Toolchain - Software Engineer Linux Technology Center - LTC IBM Brazil