Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC] Wording of "catch syscall <number>" warning
@ 2009-09-25  0:31 Doug Evans
  2009-09-25  1:49 ` Joel Brobecker
  2009-09-25  1:57 ` Sérgio Durigan Júnior
  0 siblings, 2 replies; 21+ messages in thread
From: Doug Evans @ 2009-09-25  0:31 UTC (permalink / raw)
  To: gdb-patches, sergiodj

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  <dje@google.com>

	* breakpoint.c (catch_syscall_split_args): Use a different warning
	for "catch syscall <number>" 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
 	{



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2009-10-31  6:02 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-25  0:31 [RFC] Wording of "catch syscall <number>" warning Doug Evans
2009-09-25  1:49 ` Joel Brobecker
2009-09-25  2:02   ` Sérgio Durigan Júnior
2009-09-25  2:20     ` Joel Brobecker
2009-09-25  2:38       ` Sérgio Durigan Júnior
2009-09-25  5:35         ` Doug Evans
2009-09-25 15:30           ` Joel Brobecker
2009-09-25 15:45           ` Tom Tromey
2009-09-25 16:07             ` Joel Brobecker
2009-09-25 16:50               ` Sérgio Durigan Júnior
2009-09-25  1:57 ` Sérgio Durigan Júnior
2009-09-25 15:45   ` Tom Tromey
2009-09-25 16:50     ` Sérgio Durigan Júnior
2009-09-25 19:39     ` Sérgio Durigan Júnior
2009-09-25 20:15       ` Doug Evans
2009-09-26 19:18         ` Sérgio Durigan Júnior
2009-09-26 23:34         ` Sérgio Durigan Júnior
2009-09-28  5:09           ` Doug Evans
2009-10-03  3:19             ` Sérgio Durigan Júnior
2009-10-31  6:02               ` Sérgio Durigan Júnior
2009-09-25 23:00       ` Sérgio Durigan Júnior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox