Skip to content

[Bug] FileNotFoundError: Missing file file #911

@hacker-jerry

Description

@hacker-jerry

GEF+GDB version

GEF version: latest
GDB version: GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1

Operating System

ubuntu20.04_x86_64(docker on mac m1)

Describe the issue you encountered

root@f30a4d73922f:/home/pwn# gdb
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 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 "x86_64-linux-gnu".
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".
Traceback (most recent call last):
  File "/root/.gdbinit-gef.py", line 10878, in <module>
    reset()
  File "/root/.gdbinit-gef.py", line 190, in reset
    gef.setup()
  File "/root/.gdbinit-gef.py", line 10809, in setup
    self.reinitialize_managers()
  File "/root/.gdbinit-gef.py", line 10804, in reinitialize_managers
    self.session = GefSessionManager()
  File "/root/.gdbinit-gef.py", line 10454, in __init__
    self.constants[constant] = which(constant)
  File "/root/.gdbinit-gef.py", line 1810, in which
    raise FileNotFoundError(f"Missing file `{program}`")
FileNotFoundError: Missing file `file`

When I start gdb, gef cannot load properly. I tried peda, it works. But the error message of gef makes me puzzle. What is the meaning of missing file? Which file?

Thx.

Do you read the docs and look at previously closed issues/PRs for similar cases?

Yes

Architecture impacted

  • X86
  • X64
  • ARM
  • ARM64
  • MIPS
  • MIPS64
  • PPC
  • PPC64
  • RISCV

Describe your issue. Without a proper reproduction step-by-step, your issue will be ignored.

Provide a step-by-step to reproduce your issue.

I clone repo gef, and echo "source /home/pwn/gef/gef.py" >> ~/.gdbinit.

Then I start gdb and get that error message.

Minimalist test case

Use this field for a minimal code to compile and spot the issue:

// compile with gcc -fPIE -pic -o my_issue.out my_issue.c
int main(){ return 0; }

You can also provide a Dockerfile if you prefer

Additional context?

  • Screenshots
  • Callstack
  • Coredumps
  • If possible and useful, please upload the binary

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions