aboutsummaryrefslogtreecommitdiff
path: root/gdb/features/sparc
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2024-10-04 19:24:32 +0100
committerAndrew Burgess <aburgess@redhat.com>2024-10-10 17:36:21 +0100
commitcb5997da94752f35bbbc38fe5b1eedc307b0731c (patch)
treee012f73fa4cf578208e924f2d42450d4be11d955 /gdb/features/sparc
parent9c13221eaf486d6c140f6202f836d80e2a8a69fe (diff)
downloadbinutils-cb5997da94752f35bbbc38fe5b1eedc307b0731c.zip
binutils-cb5997da94752f35bbbc38fe5b1eedc307b0731c.tar.gz
binutils-cb5997da94752f35bbbc38fe5b1eedc307b0731c.tar.bz2
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 <tom@tromey.com> Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/features/sparc')
-rw-r--r--gdb/features/sparc/sparc32-solaris.c2
-rw-r--r--gdb/features/sparc/sparc64-solaris.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/gdb/features/sparc/sparc32-solaris.c b/gdb/features/sparc/sparc32-solaris.c
index dce9685..ce57aba 100644
--- a/gdb/features/sparc/sparc32-solaris.c
+++ b/gdb/features/sparc/sparc32-solaris.c
@@ -11,7 +11,7 @@ initialize_tdesc_sparc32_solaris (void)
target_desc_up result = allocate_target_description ();
set_tdesc_architecture (result.get (), bfd_scan_arch ("sparc"));
- set_tdesc_osabi (result.get (), osabi_from_tdesc_string ("Solaris"));
+ set_tdesc_osabi (result.get (), "Solaris");
struct tdesc_feature *feature;
diff --git a/gdb/features/sparc/sparc64-solaris.c b/gdb/features/sparc/sparc64-solaris.c
index d030df6..92cc88c 100644
--- a/gdb/features/sparc/sparc64-solaris.c
+++ b/gdb/features/sparc/sparc64-solaris.c
@@ -11,7 +11,7 @@ initialize_tdesc_sparc64_solaris (void)
target_desc_up result = allocate_target_description ();
set_tdesc_architecture (result.get (), bfd_scan_arch ("sparc:v9"));
- set_tdesc_osabi (result.get (), osabi_from_tdesc_string ("Solaris"));
+ set_tdesc_osabi (result.get (), "Solaris");
struct tdesc_feature *feature;