public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Krishna Narayanan via Gdb <gdb@sourceware.org>
Subject: Re: gdb error while running preprocessed file in gcc directory.
Date: Tue, 08 Mar 2022 15:04:27 -0700	[thread overview]
Message-ID: <875yoo2j9w.fsf@tromey.com> (raw)
In-Reply-To: <CABhGnjvC5JAVZpihUX_mV1wNMMzgK-vn_LG08iPS_qVxyzRfNQ@mail.gmail.com> (Krishna Narayanan via Gdb's message of "Tue, 8 Mar 2022 16:23:28 +0530")

>>>>> 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

      reply	other threads:[~2022-03-08 22:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08 10:53 Krishna Narayanan
2022-03-08 22:04 ` Tom Tromey [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875yoo2j9w.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).