aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/python.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2021-09-15 13:34:14 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2021-10-22 13:42:49 +0100
commit8b87fbe6bb5f682fef889630664884ea8e7d6444 (patch)
treec6e54c9f2311f10a9195ffb80f059eb26899ddfd /gdb/python/python.c
parent431be556b0bdd0733dedec2368d8d6a72cacea72 (diff)
downloadbinutils-8b87fbe6bb5f682fef889630664884ea8e7d6444.zip
binutils-8b87fbe6bb5f682fef889630664884ea8e7d6444.tar.gz
binutils-8b87fbe6bb5f682fef889630664884ea8e7d6444.tar.bz2
gdb/python: new gdb.architecture_names function
Add a new function to the Python API, gdb.architecture_names(). This function returns a list containing all of the supported architecture names within the current build of GDB. The values returned in this list are all of the possible values that can be returned from gdb.Architecture.name().
Diffstat (limited to 'gdb/python/python.c')
-rw-r--r--gdb/python/python.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c
index 44ec4b7..5b1c295 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -2324,6 +2324,10 @@ Set the value of the convenience variable $NAME." },
Register a TUI window constructor." },
#endif /* TUI */
+ { "architecture_names", gdbpy_all_architecture_names, METH_NOARGS,
+ "architecture_names () -> List.\n\
+Return a list of all the architecture names GDB understands." },
+
{NULL, NULL, 0, NULL}
};