]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/python/py-symbol.c
gdb/python: hoist common invalid object repr code into py-utils.c
[thirdparty/binutils-gdb.git] / gdb / python / py-symbol.c
index 99724cfc95b8d972aa4819045a1b363c8283b21b..014442bf147438481f293e41bb18408eb449975f 100644 (file)
@@ -385,7 +385,7 @@ sympy_repr (PyObject *self)
 {
   const auto symbol = symbol_object_to_symbol (self);
   if (symbol == nullptr)
-    return PyUnicode_FromFormat ("<%s (invalid)>", Py_TYPE (self)->tp_name);
+    return gdb_py_invalid_object_repr (self);
 
   return PyUnicode_FromFormat ("<%s print_name=%s>", Py_TYPE (self)->tp_name,
                               symbol->print_name ());