diff options
author | Andrew Burgess <aburgess@redhat.com> | 2024-10-04 19:24:32 +0100 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2024-10-10 17:36:21 +0100 |
commit | cb5997da94752f35bbbc38fe5b1eedc307b0731c (patch) | |
tree | e012f73fa4cf578208e924f2d42450d4be11d955 /gdb/features/mips-dsp-linux.c | |
parent | 9c13221eaf486d6c140f6202f836d80e2a8a69fe (diff) | |
download | binutils-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/mips-dsp-linux.c')
-rw-r--r-- | gdb/features/mips-dsp-linux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/features/mips-dsp-linux.c b/gdb/features/mips-dsp-linux.c index d8e4028..17d30aa 100644 --- a/gdb/features/mips-dsp-linux.c +++ b/gdb/features/mips-dsp-linux.c @@ -11,7 +11,7 @@ initialize_tdesc_mips_dsp_linux (void) target_desc_up result = allocate_target_description (); set_tdesc_architecture (result.get (), bfd_scan_arch ("mips")); - set_tdesc_osabi (result.get (), osabi_from_tdesc_string ("GNU/Linux")); + set_tdesc_osabi (result.get (), "GNU/Linux"); struct tdesc_feature *feature; |