tags:

views:

60

answers:

2

I am currently trying to make use of gdb to disassemble an exe, and from my home, I start the application like such:

gdb "c:\file.exe"

And gdb starts and loads that file automatically.

Now the problem is that from where I am atm, the command prompt is disabled and thus I cannot run the terminal window with the filename as the argument.

The only thing I think can do atm is open the gdb.exe file directly and then load the exe with a command or something, from gdb itself.

Is there a command I can use to load the exe to debug from within the application itself rather than passing it as an argument?

(gdb) <some command> "c:\file.exe"
+4  A: 

(gdb)file c:\file.exe

Arkaitz Jimenez
+1 Excellent, exactly what I was looking for
Andreas Grech
+1  A: 

To start debugging it , use the file command, as @Arkaitz Jimenez said

If your file.exe is a running process, you can use the attach command

Tom
+1 Thanks for the mentioned of the `attach` command
Andreas Grech