]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: make use of set_tdesc_osabi overload in features/ files
authorAndrew Burgess <aburgess@redhat.com>
Fri, 4 Oct 2024 18:24:32 +0000 (19:24 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Thu, 10 Oct 2024 16:36:21 +0000 (17:36 +0100)
commitcb5997da94752f35bbbc38fe5b1eedc307b0731c
treee012f73fa4cf578208e924f2d42450d4be11d955
parent9c13221eaf486d6c140f6202f836d80e2a8a69fe
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>
gdb/features/mips-dsp-linux.c
gdb/features/mips-linux.c
gdb/features/or1k-linux.c
gdb/features/sparc/sparc32-solaris.c
gdb/features/sparc/sparc64-solaris.c
gdb/target-descriptions.c