summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
82eabd4)
match "FOO". This allows 'break Foo' to work when Foo is
a mangled C++ function. (See comment before function.)
+Wed Sep 2 20:45:31 1992 Per Bothner (bothner@rtl.cygnus.com)
+
+ * utils.c (strcmp_iw): Add a hack to allow "FOO(ARGS)" to
+ match "FOO". This allows 'break Foo' to work when Foo is
+ a mangled C++ function. (See comment before function.)
+
Wed Sep 2 13:45:27 1992 John Gilmore (gnu@cygnus.com)
* config/rs6000.mh (MH_CFLAGS): Circumvent IBM <rpc/rpc.h> bug,
Wed Sep 2 13:45:27 1992 John Gilmore (gnu@cygnus.com)
* config/rs6000.mh (MH_CFLAGS): Circumvent IBM <rpc/rpc.h> bug,
+ wrap_here (""); /* Flush any buffered output */
+ fflush (stdout);
va_start (args);
ctlstr = va_arg (args, char *);
vfprintf_filtered (stdout, ctlstr, args);
va_start (args);
ctlstr = va_arg (args, char *);
vfprintf_filtered (stdout, ctlstr, args);
fprintf_filtered (va_alist)
va_dcl
{
fprintf_filtered (va_alist)
va_dcl
{
FILE *stream;
char *format;
FILE *stream;
char *format;
+
+ va_start (args);
+ stream = va_arg (args, FILE *);
+ format = va_arg (args, char *);
+
+ /* This won't blow up if the restrictions described above are
+ followed. */
+ vfprintf_filtered (stream, format, args);
+ va_end (args);
+}
+
+/* Like fprintf_filtered, but prints it's result indent.
+ Called as fprintfi_filtered (spaces, format, arg1, arg2, ...); */
+
+/* VARARGS */
+void
+fprintfi_filtered (va_alist)
+ va_dcl
+{
+ int spaces;
+ FILE *stream;
+ char *format;
+ spaces = va_arg (args, int);
stream = va_arg (args, FILE *);
format = va_arg (args, char *);
stream = va_arg (args, FILE *);
format = va_arg (args, char *);
+ print_spaces_filtered (spaces, stream);
/* This won't blow up if the restrictions described above are
followed. */
/* This won't blow up if the restrictions described above are
followed. */
+/* Like printf_filtered, but prints it's result indented.
+ Called as printfi_filtered (spaces, format, arg1, arg2, ...); */
+
+/* VARARGS */
+void
+printfi_filtered (va_alist)
+ va_dcl
+{
+ va_list args;
+ int spaces;
+ char *format;
+
+ va_start (args);
+ spaces = va_arg (args, int);
+ format = va_arg (args, char *);
+ print_spaces_filtered (spaces, stdout);
+ vfprintf_filtered (stdout, format, args);
+ va_end (args);
+}
+
/* Do a strcmp() type operation on STRING1 and STRING2, ignoring any
differences in whitespace. Returns 0 if they match, non-zero if they
/* Do a strcmp() type operation on STRING1 and STRING2, ignoring any
differences in whitespace. Returns 0 if they match, non-zero if they
- don't (slightly different than strcmp()'s range of return values). */
+ don't (slightly different than strcmp()'s range of return values).
+
+ As an extra hack, string1=="FOO(ARGS)" matches string2=="FOO".
+ This "feature" is useful for demangle_and_match(), which is used
+ when searching for matching C++ function names (such as if the
+ user types 'break FOO', where FOO is a mangled C++ function). */
strcmp_iw (string1, string2)
const char *string1;
const char *string2;
strcmp_iw (string1, string2)
const char *string1;
const char *string2;
- return (!((*string1 == '\0') && (*string2 == '\0')));
+ return (*string1 != '\0' && *string1 != '(') || (*string2 != '\0');
}
/* Demangle NAME and compare the result with LOOKFOR, ignoring any differences
}
/* Demangle NAME and compare the result with LOOKFOR, ignoring any differences