gdb error while running preprocessed file in gcc directory.

Tom Tromey tom@tromey.com
Tue Mar 8 22:04:27 GMT 2022


>>>>> Krishna Narayanan via Gdb <gdb@sourceware.org> writes:

> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File "/home/krishna/latest/gcc/../../gcc-11.2.0/gcc/gdbhooks.py",
> line 152, in <module>
>     tree_code_dict = gdb.types.make_enum_dict(gdb.lookup_type('enum tree_code'))
> gdb.error: No enum type named tree_code.
> .gdbinit:15: Error in sourced command file:
> Error while executing Python code.
> I would be grateful if you could help me to resolve this error.Can you
> please guide me where I went wrong?

It sounds to me like maybe gcc was modified but the gdb-related python
code that is part of gcc was not updated.

Or, possibly you have compiled without debuginfo and so the type cannot
be found.

The only way to know is dig through the source and/or your build tree.

Tom


More information about the Gdb mailing list