public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Krishna Narayanan <krishnanarayanan132002@gmail.com>
To: gdb@sourceware.org
Subject: gdb error while running preprocessed file in gcc directory.
Date: Tue, 8 Mar 2022 16:23:28 +0530	[thread overview]
Message-ID: <CABhGnjvC5JAVZpihUX_mV1wNMMzgK-vn_LG08iPS_qVxyzRfNQ@mail.gmail.com> (raw)

Hello,
I am Krishna Narayanan,second year undergraduate interested in
compiler related domain.I am trying to run a preprocessed file .i with
the command "gcc 93432.i -wrapper gdb,--arg" which gives me the below
warning and then a fix to remove this warning by setting an
add-auto-load-safe-path,as given I added the said path in the .gdbinit
in the home directory but that instead gave me a gdb error.I am not
able to resolve this issue,I am doing this on the gcc 11.2.0 build.

warning: File "/home/krishna/latest/gcc/.gdbinit" auto-loading has
been declined by your `auto-load safe-path' set to
"$debugdir:$datadir/auto-load".
To enable execution of this file add
    add-auto-load-safe-path /home/krishna/latest/gcc/.gdbinit
line to your configuration file "/home/krishna/.gdbinit".
To completely disable this security protection add
    set auto-load safe-path /
line to your configuration file "/home/krishna/.gdbinit".

On adding the add-auto-load-safe-path in the home directory(.gdbinit)
,it gives me this below error after running the same command in the
gcc build directory "gcc 93432.i -wrapper gdb,--arg"

Breakpoint 1 at 0x5b024b
Breakpoint 2 at 0x12a7db0
Breakpoint 3 at 0x579050
Breakpoint 4 at 0x578580
File tree.h will be skipped when stepping.
File is-a.h will be skipped when stepping.
File line-map.h will be skipped when stepping.
File timevar.h will be skipped when stepping.
Function rtx_expr_list::next will be skipped when stepping.
Function rtx_expr_list::element will be skipped when stepping.
Function rtx_insn_list::next will be skipped when stepping.
Function rtx_insn_list::insn will be skipped when stepping.
Function rtx_sequence::len will be skipped when stepping.
Function rtx_sequence::element will be skipped when stepping.
Function rtx_sequence::insn will be skipped when stepping.
Function INSN_UID will be skipped when stepping.
Function PREV_INSN will be skipped when stepping.
Function SET_PREV_INSN will be skipped when stepping.
Function NEXT_INSN will be skipped when stepping.
Function SET_NEXT_INSN will be skipped when stepping.
Function BLOCK_FOR_INSN will be skipped when stepping.
Function PATTERN will be skipped when stepping.
Function INSN_LOCATION will be skipped when stepping.
Function INSN_HAS_LOCATION will be skipped when stepping.
Function JUMP_LABEL_AS_INSN will be skipped when stepping.
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?
Thanks,
Krishna Narayanan.

             reply	other threads:[~2022-03-08 10:53 UTC|newest]

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

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=CABhGnjvC5JAVZpihUX_mV1wNMMzgK-vn_LG08iPS_qVxyzRfNQ@mail.gmail.com \
    --to=krishnanarayanan132002@gmail.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).