aboutsummaryrefslogtreecommitdiff
path: root/gdb/guile
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-10-12 08:40:34 -0600
committerTom Tromey <tromey@adacore.com>2022-10-31 12:47:36 -0600
commit4881fcd7c13056b0ee03c170bf54bb7f7a176051 (patch)
tree6e47e6650293f97e7b6da0963b6bb17a3781105c /gdb/guile
parentbc45f5366eaf4e93cfd675a07a8cc5bb5522b184 (diff)
downloadgdb-4881fcd7c13056b0ee03c170bf54bb7f7a176051.zip
gdb-4881fcd7c13056b0ee03c170bf54bb7f7a176051.tar.gz
gdb-4881fcd7c13056b0ee03c170bf54bb7f7a176051.tar.bz2
Add missing TYPE_CODE_* constants to Python
A user noticed that TYPE_CODE_FIXED_POINT was not exported by the gdb Python layer. This patch fixes the bug, and prevents future occurences of this type of bug.
Diffstat (limited to 'gdb/guile')
-rw-r--r--gdb/guile/scm-type.c35
1 files changed, 6 insertions, 29 deletions
diff --git a/gdb/guile/scm-type.c b/gdb/guile/scm-type.c
index 68a5b91..050501a 100644
--- a/gdb/guile/scm-type.c
+++ b/gdb/guile/scm-type.c
@@ -1297,35 +1297,12 @@ gdbscm_lookup_type (SCM name_scm, SCM rest)
static const scheme_integer_constant type_integer_constants[] =
{
-#define X(SYM) { #SYM, SYM }
- X (TYPE_CODE_BITSTRING),
- X (TYPE_CODE_PTR),
- X (TYPE_CODE_ARRAY),
- X (TYPE_CODE_STRUCT),
- X (TYPE_CODE_UNION),
- X (TYPE_CODE_ENUM),
- X (TYPE_CODE_FLAGS),
- X (TYPE_CODE_FUNC),
- X (TYPE_CODE_INT),
- X (TYPE_CODE_FLT),
- X (TYPE_CODE_VOID),
- X (TYPE_CODE_SET),
- X (TYPE_CODE_RANGE),
- X (TYPE_CODE_STRING),
- X (TYPE_CODE_ERROR),
- X (TYPE_CODE_METHOD),
- X (TYPE_CODE_METHODPTR),
- X (TYPE_CODE_MEMBERPTR),
- X (TYPE_CODE_REF),
- X (TYPE_CODE_RVALUE_REF),
- X (TYPE_CODE_CHAR),
- X (TYPE_CODE_BOOL),
- X (TYPE_CODE_COMPLEX),
- X (TYPE_CODE_TYPEDEF),
- X (TYPE_CODE_NAMESPACE),
- X (TYPE_CODE_DECFLOAT),
- X (TYPE_CODE_INTERNAL_FUNCTION),
-#undef X
+ /* This is kept for backward compatibility. */
+ { "TYPE_CODE_BITSTRING", -1 },
+
+#define OP(SYM) { #SYM, SYM },
+#include "type-codes.def"
+#undef OP
END_INTEGER_CONSTANTS
};