From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2208 invoked by alias); 25 Apr 2009 09:27:11 -0000 Received: (qmail 2190 invoked by uid 22791); 25 Apr 2009 09:27:09 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout7.012.net.il (HELO mtaout7.012.net.il) (84.95.2.19) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 25 Apr 2009 09:27:02 +0000 Received: from conversion-daemon.i-mtaout7.012.net.il by i-mtaout7.012.net.il (HyperSendmail v2007.08) id <0KIN00G00GFLVH00@i-mtaout7.012.net.il> for gdb-patches@sourceware.org; Sat, 25 Apr 2009 12:26:59 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.175.232]) by i-mtaout7.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KIN00L54GWUDT00@i-mtaout7.012.net.il>; Sat, 25 Apr 2009 12:26:54 +0300 (IDT) Date: Sat, 25 Apr 2009 09:27:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH 1/3] catch syscall -- try 5 -- Source code modifications In-reply-to: <1240446784.2000.85.camel@miki> To: =?ISO-8859-1?Q?S=E9rgio?= Durigan =?ISO-8859-1?Q?J=FAnior?= Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83mya5f5i7.fsf@gnu.org> References: <1240446784.2000.85.camel@miki> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00705.txt.bz2 > From: =?ISO-8859-1?Q?S=E9rgio?= Durigan =?ISO-8859-1?Q?J=FAnior?= > Date: Wed, 22 Apr 2009 21:33:03 -0300 > > Here goes the source-code modifications. Thanks. I have a few minor comments: > (any_syscall_count, syscalls_counts, > total_syscalls_count): New variables to keep track of requested > syscall catchpoints. The GNU Coding Standards specify the following formatting of log entries with long lists that don't fit on a single line: (any_syscall_count, syscalls_counts) (total_syscalls_count): New variables to keep track of requested syscall catchpoints. IOW, close the parens and re-open them on the next line. > +/* We keep a count of the number of times the user has requested a > + particular syscall to be tracked, and pass this information to the > + target. This lets capable targets implement filtering directly. */ Could you please expand the last sentence in this comment? What kind of filtering we are talking here about? I'm worried that someone who might be willing to implement such filtering on a ``capable target'' won't understand how to go about that. > + add_catch_command ("syscall", _("\ > +Catch system calls.\n\ > +With an argument, catch only that syscall."), I think we should tell in the doc string of this command something about the format of the argument(s). > + /* If we are catching this specific syscall number, then we > + should update the target_status to reflect which event > + has occurred. But if this syscall is not to caught, ^^^^^^^^^^^^^ "not to be caught" > + This is needed so that GDB doesn't get confused when > + the program is re-run'ed and no syscalls were caught > + in the first run. */ I think "re-ran" is better than "re-run'ed". More importantly, I don't understand why GDB would be confused by this sequence of events, so perhaps you could expand the comment. > + /* Handle GNU/Linux's extended waitstatus for trace events. > + It is necessary to check if WSTOPSIG is signaling a that ^ This "a" should be either removed or replaced by something else.