gdb error while running preprocessed file in gcc directory.

Krishna Narayanan via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CABhGnjvC5JAVZpihUX_mV1wNMMzgK-vn_LG08iPS_qVxyzRfNQ@mail.gmail.com>
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.
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.