diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2022-01-27 22:06:47 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2022-02-06 16:03:46 -0500 |
commit | d9743061f92738a6c3f311d640e614a5a2f01b1e (patch) | |
tree | 526c9f1911ab21c38bcee992174f7a7457bba773 /gdb/python | |
parent | 7b3ecc7555438f05dda657d0ed6a43ee71a3901d (diff) | |
download | gdb-d9743061f92738a6c3f311d640e614a5a2f01b1e.zip gdb-d9743061f92738a6c3f311d640e614a5a2f01b1e.tar.gz gdb-d9743061f92738a6c3f311d640e614a5a2f01b1e.tar.bz2 |
gdb: remove SYMBOL_IS_ARGUMENT macro
Add a getter and a setter for whether a symbol is an argument. Remove
the corresponding macro and adjust all callers.
Change-Id: I71b4f0465f3dfd2ed8b9e140bd3f7d5eb8d9ee81
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/py-framefilter.c | 4 | ||||
-rw-r--r-- | gdb/python/py-symbol.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c index 70fec4a..e6eb1ec 100644 --- a/gdb/python/py-framefilter.c +++ b/gdb/python/py-framefilter.c @@ -191,9 +191,9 @@ mi_should_print (struct symbol *sym, enum mi_print_types type) case LOC_REGISTER: /* register */ case LOC_COMPUTED: /* computed location */ if (type == MI_PRINT_LOCALS) - print_me = ! SYMBOL_IS_ARGUMENT (sym); + print_me = ! sym->is_argument (); else - print_me = SYMBOL_IS_ARGUMENT (sym); + print_me = sym->is_argument (); } return print_me; } diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c index 7084743..c756870 100644 --- a/gdb/python/py-symbol.c +++ b/gdb/python/py-symbol.c @@ -141,7 +141,7 @@ sympy_is_argument (PyObject *self, void *closure) SYMPY_REQUIRE_VALID (self, symbol); - return PyBool_FromLong (SYMBOL_IS_ARGUMENT (symbol)); + return PyBool_FromLong (symbol->is_argument ()); } static PyObject * @@ -180,7 +180,7 @@ sympy_is_variable (PyObject *self, void *closure) theclass = symbol->aclass (); - return PyBool_FromLong (!SYMBOL_IS_ARGUMENT (symbol) + return PyBool_FromLong (!symbol->is_argument () && (theclass == LOC_LOCAL || theclass == LOC_REGISTER || theclass == LOC_STATIC || theclass == LOC_COMPUTED || theclass == LOC_OPTIMIZED_OUT)); |