반응형

Content: solution of riscv64-unknown-elf-gdb path error
Updates: 2024.09.09
 

문제 상황 Problem Case

❯ /usr/local/bin/riscv64-unknown-elf-gdb kernel/kernel
GNU gdb (GDB) 10.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-pc-linux-gnu --target=riscv64-unknown-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from kernel/kernel...
warning: File "/{xv6-riscv PATH}/.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 /{xv6-riscv PATH}/.gdbinit
line to your configuration file "/{HOME_PATH}/.gdbinit".
To completely disable this security protection add
        set auto-load safe-path /
line to your configuration file "/{HOME_PATH}/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
--Type <RET> for more, q to quit, c to continue without paging--
        info "(gdb)Auto-loading safe path"

 

Solution

  1. $ make qemu-gdb $ /usr/local/bin/riscv64-unknown-elf-gdb kernel/kernel 모두 종료
  2. $ vi /{HOME_PATH}/.gdbinit
  3. add-auto-load-safe-path /{xv6-riscv PATH}/.gdbinit > add in .gdbinit file

위 게시물은 Markdown으로 작성하였습니다
도움이 되셨다면 공감 꾸욱 눌러주세요👍

반응형

+ Recent posts