diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2021-11-21 22:26:24 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2022-02-06 16:03:46 -0500 |
commit | 66d7f48f8045adf266046df7ceb84161d5678cfa (patch) | |
tree | 473af71237afd358293f506901cdb13372d8dd72 /gdb/python | |
parent | d1eebf9a6f02786eb0d5f6b961b8d692d23e77b1 (diff) | |
download | binutils-gdb-66d7f48f8045adf266046df7ceb84161d5678cfa.tar.gz |
gdb: remove SYMBOL_CLASS macro, add getter
Change-Id: I83211d5a47efc0564386e5b5ea4a29c00b1fd46a
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/py-framefilter.c | 2 | ||||
-rw-r--r-- | gdb/python/py-symbol.c | 10 | ||||
-rw-r--r-- | gdb/python/py-type.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c index 708fcc535e2..70fec4aad5d 100644 --- a/gdb/python/py-framefilter.c +++ b/gdb/python/py-framefilter.c @@ -169,7 +169,7 @@ mi_should_print (struct symbol *sym, enum mi_print_types type) { int print_me = 0; - switch (SYMBOL_CLASS (sym)) + switch (sym->aclass ()) { default: case LOC_UNDEF: /* catches errors */ diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c index f636f5119a1..fe62809c19b 100644 --- a/gdb/python/py-symbol.c +++ b/gdb/python/py-symbol.c @@ -131,7 +131,7 @@ sympy_get_addr_class (PyObject *self, void *closure) SYMPY_REQUIRE_VALID (self, symbol); - return gdb_py_object_from_longest (SYMBOL_CLASS (symbol)).release (); + return gdb_py_object_from_longest (symbol->aclass ()).release (); } static PyObject * @@ -152,7 +152,7 @@ sympy_is_constant (PyObject *self, void *closure) SYMPY_REQUIRE_VALID (self, symbol); - theclass = SYMBOL_CLASS (symbol); + theclass = symbol->aclass (); return PyBool_FromLong (theclass == LOC_CONST || theclass == LOC_CONST_BYTES); } @@ -165,7 +165,7 @@ sympy_is_function (PyObject *self, void *closure) SYMPY_REQUIRE_VALID (self, symbol); - theclass = SYMBOL_CLASS (symbol); + theclass = symbol->aclass (); return PyBool_FromLong (theclass == LOC_BLOCK); } @@ -178,7 +178,7 @@ sympy_is_variable (PyObject *self, void *closure) SYMPY_REQUIRE_VALID (self, symbol); - theclass = SYMBOL_CLASS (symbol); + theclass = symbol->aclass (); return PyBool_FromLong (!SYMBOL_IS_ARGUMENT (symbol) && (theclass == LOC_LOCAL || theclass == LOC_REGISTER @@ -260,7 +260,7 @@ sympy_value (PyObject *self, PyObject *args) } SYMPY_REQUIRE_VALID (self, symbol); - if (SYMBOL_CLASS (symbol) == LOC_TYPEDEF) + if (symbol->aclass () == LOC_TYPEDEF) { PyErr_SetString (PyExc_TypeError, "cannot get the value of a typedef"); return NULL; diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c index e71e635ecdf..6ab551a8520 100644 --- a/gdb/python/py-type.c +++ b/gdb/python/py-type.c @@ -997,9 +997,9 @@ typy_template_argument (PyObject *self, PyObject *args) } sym = TYPE_TEMPLATE_ARGUMENT (type, argno); - if (SYMBOL_CLASS (sym) == LOC_TYPEDEF) + if (sym->aclass () == LOC_TYPEDEF) return type_to_type_object (SYMBOL_TYPE (sym)); - else if (SYMBOL_CLASS (sym) == LOC_OPTIMIZED_OUT) + else if (sym->aclass () == LOC_OPTIMIZED_OUT) { PyErr_Format (PyExc_RuntimeError, _("Template argument is optimized out")); |