From cb5997da94752f35bbbc38fe5b1eedc307b0731c Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Fri, 4 Oct 2024 19:24:32 +0100 Subject: gdb: make use of set_tdesc_osabi overload in features/ files There are two versions of the set_tdesc_osabi function in GDB: void set_tdesc_osabi (struct target_desc *target_desc, const char *name) { set_tdesc_osabi (target_desc, osabi_from_tdesc_string (name)); } void set_tdesc_osabi (struct target_desc *target_desc, enum gdb_osabi osabi) { target_desc->osabi = osabi; } In the gdb/features/ files we call the second of these functions, like this: set_tdesc_osabi (result.get (), osabi_from_tdesc_string ("GNU/Linux")); This can be replaced with a call to the first set_tdesc_osabi function, so lets do that. I think that this makes the features/ code slightly simpler and easier to understand. There should be no user visible changes after this commit. Approved-By: Tom Tromey Approved-By: Simon Marchi --- gdb/features/or1k-linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/features/or1k-linux.c') diff --git a/gdb/features/or1k-linux.c b/gdb/features/or1k-linux.c index 2473145..551b38f 100644 --- a/gdb/features/or1k-linux.c +++ b/gdb/features/or1k-linux.c @@ -11,7 +11,7 @@ initialize_tdesc_or1k_linux (void) target_desc_up result = allocate_target_description (); set_tdesc_architecture (result.get (), bfd_scan_arch ("or1k")); - set_tdesc_osabi (result.get (), osabi_from_tdesc_string ("GNU/Linux")); + set_tdesc_osabi (result.get (), "GNU/Linux"); struct tdesc_feature *feature; -- cgit v1.1