Re: gdb error while running preprocessed file in gcc directory.

Tom Tromey <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
>>>>> Krishna Narayanan via Gdb <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.