diff options
author | Tom de Vries <tdevries@suse.de> | 2022-06-01 19:29:40 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2022-06-01 19:29:40 +0200 |
commit | fc18b1c5afd77960b221d81f382de5c9cf5e75d9 (patch) | |
tree | b6a939c3f2d3b47bc5f92f5971b6b49468fd9f5f /gdb/osabi.h | |
parent | 80fa4b2a606763e71c4b599fa88288f554a0ea5b (diff) | |
download | gdb-fc18b1c5afd77960b221d81f382de5c9cf5e75d9.zip gdb-fc18b1c5afd77960b221d81f382de5c9cf5e75d9.tar.gz gdb-fc18b1c5afd77960b221d81f382de5c9cf5e75d9.tar.bz2 |
[gdb] Fix warning in foreach_arch selftests
When running the selftests, I run into:
...
$ gdb -q -batch -ex "maint selftest"
...
Running selftest execute_cfa_program::aarch64:ilp32.
warning: A handler for the OS ABI "GNU/Linux" is not built into this
configuration of GDB. Attempting to continue with the default aarch64:ilp32
settings.
...
and likewise for execute_cfa_program::i8086 and
execute_cfa_program::ia64-elf32.
The warning can easily be reproduced outside the selftests by doing:
...
$ gdb -q -batch -ex "set arch aarch64:ilp32"
...
and can be prevented by first doing "set osabi none".
Fix the warning by setting osabi to none while doing selftests that iterate
over all architectures.
Tested on x86_64-linux.
Diffstat (limited to 'gdb/osabi.h')
-rw-r--r-- | gdb/osabi.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/osabi.h b/gdb/osabi.h index be01673..3737a77 100644 --- a/gdb/osabi.h +++ b/gdb/osabi.h @@ -50,6 +50,13 @@ enum gdb_osabi GDB_OSABI_INVALID /* keep this last */ }; +enum gdb_osabi_mode +{ + osabi_auto, + osabi_default, + osabi_user +}; + /* Register an OS ABI sniffer. Each arch/flavour may have more than one sniffer. This is used to e.g. differentiate one OS's a.out from another. The first sniffer to return something other than @@ -89,4 +96,10 @@ const char *osabi_triplet_regexp (enum gdb_osabi osabi); void generic_elf_osabi_sniff_abi_tag_sections (bfd *, asection *, enum gdb_osabi *); +/* Set osabi to MODE/OSABI. */ +extern void set_osabi (enum gdb_osabi_mode mode, enum gdb_osabi osabi); + +/* Return current osabi setting in MODE/OSABI. */ +extern void get_osabi (enum gdb_osabi_mode &mode, enum gdb_osabi &osabi); + #endif /* OSABI_H */ |