This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
[RFA] Don't talk about ptrace when there's none
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [RFA] Don't talk about ptrace when there's none
- From: Eli Zaretskii <eliz at gnu dot org>
- Date: Thu, 6 Apr 2000 08:16:41 -0400
- Reply-to: Eli Zaretskii <eliz at is dot elta dot co dot il>
When GDB cannot insert breakpoints or watchpoints, it prints an error
messages that can confuse users of the DJGPP version (since there's no
ptrace, and no ``other processes'' either).
To fix this, I would like to check in the following patches:
2000-04-05 Eli Zaretskii <eliz@is.elta.co.il>
* infrun.c (proceed) [__DJGPP__]: Don't talk about ptrace. Make
the error message be clear on single-process systems.
(normal_stop): Likewise.
--- gdb/infrun.c~1 Sat Apr 1 19:41:12 2000
+++ gdb/infrun.c Wed Apr 5 20:15:04 2000
@@ -1044,9 +1044,13 @@
int temp = insert_breakpoints ();
if (temp)
{
+#ifndef __DJGPP__
print_sys_errmsg ("ptrace", temp);
+#endif
error ("Cannot insert breakpoints.\n\
-The same program may be running in another process.");
+The same program may be running in another process,\n\
+or you may have requested too many hardware\n\
+breakpoints and/or watchpoints\n.");
}
breakpoints_inserted = 1;
@@ -3384,9 +3388,13 @@
if (breakpoints_failed)
{
target_terminal_ours_for_output ();
+#ifndef __DJGPP__
print_sys_errmsg ("ptrace", breakpoints_failed);
+#endif
printf_filtered ("Stopped; cannot insert breakpoints.\n\
-The same program may be running in another process.\n");
+The same program may be running in another process,\n\
+or you may have requested too many hardware breakpoints\n\
+and/or watchpoints.\n");
}
if (target_has_execution && breakpoints_inserted)