aboutsummaryrefslogtreecommitdiff
path: root/gdb/exceptions.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-06-27 11:06:04 -0600
committerTom Tromey <tom@tromey.com>2021-07-30 08:42:39 -0600
commit785e5700ce4bda469e323d1dc7eeae9d86980c79 (patch)
treea16c1cce4eec5f386703f3587a2c26a020c5a494 /gdb/exceptions.c
parentfb6262e8534e0148a4a424e9e5138159af19faf1 (diff)
downloadgdb-785e5700ce4bda469e323d1dc7eeae9d86980c79.zip
gdb-785e5700ce4bda469e323d1dc7eeae9d86980c79.tar.gz
gdb-785e5700ce4bda469e323d1dc7eeae9d86980c79.tar.bz2
Replace exception_print_same with operator!=
I noticed that exception_print_same is only used in a single spot, and it seemed to be better as an operator!= method attached to gdb_exception. Regression tested on x86-64 Fedora 34.
Diffstat (limited to 'gdb/exceptions.c')
-rw-r--r--gdb/exceptions.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/gdb/exceptions.c b/gdb/exceptions.c
index 32db6fe..5245b7c 100644
--- a/gdb/exceptions.c
+++ b/gdb/exceptions.c
@@ -133,17 +133,3 @@ exception_fprintf (struct ui_file *file, const struct gdb_exception &e,
print_exception (file, e);
}
}
-
-/* See exceptions.h. */
-
-int
-exception_print_same (const struct gdb_exception &e1,
- const struct gdb_exception &e2)
-{
- const char *msg1 = e1.message == nullptr ? "" : e1.what ();
- const char *msg2 = e2.message == nullptr ? "" : e2.what ();
-
- return (e1.reason == e2.reason
- && e1.error == e2.error
- && strcmp (msg1, msg2) == 0);
-}