public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* gdb error while running preprocessed file in gcc directory.
@ 2022-03-08 10:53 Krishna Narayanan
  2022-03-08 22:04 ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: Krishna Narayanan @ 2022-03-08 10:53 UTC (permalink / raw)
  To: gdb

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-08 22:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-08 10:53 gdb error while running preprocessed file in gcc directory Krishna Narayanan
2022-03-08 22:04 ` Tom Tromey

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