From c8979ae4fbcc2b84b4192d0596597c3352fa430b Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Tue, 16 Jul 2024 23:52:00 -0400 Subject: gdb: make lookup_minimal_symbol objf and sfile parameters optional Most calls to lookup_minimal_symbol don't pass a value for sfile and objf. Make these parameters optional (have a default value of nullptr). And since passing a value to `objf` is much more common than passing a value to `sfile`, swap the order so `objf` comes first, to avoid having to pass a nullptr value to `sfile` when wanting to pass a value to `objf`. Change-Id: I8e9cc6b942e593bec640f9dfd30f62786b0f5a27 Reviewed-by: Keith Seitz Approved-By: Andrew Burgess --- gdb/ada-lang.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/ada-lang.c') diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index e0f895c..972c756 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -806,7 +806,7 @@ ada_main_name () that string, then most probably the main procedure is not written in Ada. */ bound_minimal_symbol msym - = lookup_minimal_symbol (ADA_MAIN_PROGRAM_SYMBOL_NAME, NULL, NULL); + = lookup_minimal_symbol (ADA_MAIN_PROGRAM_SYMBOL_NAME); if (msym.minsym != NULL) { @@ -11696,7 +11696,7 @@ ada_has_this_exception_support (const struct exception_support_info *einfo) the catchpoint message, and is also used when trying to catch a specific exception). We do not handle this case for now. */ bound_minimal_symbol msym - = lookup_minimal_symbol (einfo->catch_exception_sym, NULL, NULL); + = lookup_minimal_symbol (einfo->catch_exception_sym); if (msym.minsym && msym.minsym->type () != mst_solib_trampoline) error (_("Your Ada runtime appears to be missing some debugging " @@ -11716,7 +11716,7 @@ ada_has_this_exception_support (const struct exception_support_info *einfo) if (sym == NULL) { bound_minimal_symbol msym - = lookup_minimal_symbol (einfo->catch_handlers_sym, NULL, NULL); + = lookup_minimal_symbol (einfo->catch_handlers_sym); if (msym.minsym && msym.minsym->type () != mst_solib_trampoline) error (_("Your Ada runtime appears to be missing some debugging " -- cgit v1.1