From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21214 invoked by alias); 25 Sep 2009 00:31:23 -0000 Received: (qmail 21202 invoked by uid 22791); 25 Sep 2009 00:31:21 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 25 Sep 2009 00:31:16 +0000 Received: from spaceape24.eur.corp.google.com (spaceape24.eur.corp.google.com [172.28.16.76]) by smtp-out.google.com with ESMTP id n8P0VBqd021141; Thu, 24 Sep 2009 17:31:11 -0700 Received: from ruffy.mtv.corp.google.com (ruffy.mtv.corp.google.com [172.18.118.116]) by spaceape24.eur.corp.google.com with ESMTP id n8P0V8ix030196; Thu, 24 Sep 2009 17:31:08 -0700 Received: by ruffy.mtv.corp.google.com (Postfix, from userid 67641) id 87780843AC; Thu, 24 Sep 2009 17:31:07 -0700 (PDT) To: gdb-patches@sourceware.org, sergiodj@linux.vnet.ibm.com Subject: [RFC] Wording of "catch syscall " warning Message-Id: <20090925003107.87780843AC@ruffy.mtv.corp.google.com> Date: Fri, 25 Sep 2009 00:31:00 -0000 From: dje@google.com (Doug Evans) X-System-Of-Record: true 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-09/txt/msg00767.txt.bz2 Hi. The current wording of this warning feels clumsy if syscall names are unavailable. It implies there are known syscalls, when there is not. I'll leave this for a few days and then check it in if there are no objections. One alternative is to not print the warning at all if system call names are unavailable. 2009-09-24 Doug Evans * breakpoint.c (catch_syscall_split_args): Use a different warning for "catch syscall " when syscall names are unavailable. Index: breakpoint.c =================================================================== RCS file: /cvs/src/src/gdb/breakpoint.c,v retrieving revision 1.419 diff -u -p -r1.419 breakpoint.c --- breakpoint.c 15 Sep 2009 03:30:04 -0000 1.419 +++ breakpoint.c 25 Sep 2009 00:22:31 -0000 @@ -7486,9 +7486,16 @@ catch_syscall_split_args (char *arg) /* We can issue just a warning, but still create the catchpoint. This is because, even not knowing the syscall name that this number represents, we can still try to catch the syscall - number. */ - warning (_("The number '%d' does not represent a known syscall."), - syscall_number); + number. If system call names are unavailable, use a different + wording though. */ + { + if (get_syscall_names () != NULL) + warning (_("The number '%d' does not represent a known syscall."), + syscall_number); + else + warning (_("Syscall names are unavailable, assuming '%d' is valid."), + syscall_number); + } } else {