eteran / edb-debugger

edb is a cross-platform AArch32/x86/x86-64 debugger.
GNU General Public License v2.0
2.68k stars 322 forks source link

Failed to open and attach to process: execv() failed: Exec format error. #804

Closed MikeTheScriptKid closed 3 years ago

MikeTheScriptKid commented 3 years ago

I'm getting this error when trying to open my .exe file and I can't find any solution for it. Does anybody know how to fix this?

Screenshot 2021-05-08 04:42:56

10110111 commented 3 years ago

Looks like this FAQ entry.

lotation commented 3 years ago

I have the same isse and I've just compiled it with gcc on Arch Linux

eteran commented 3 years ago

@lotation Are you trying to open a Windows executable? As answered above, this is not supported.

lotation commented 3 years ago

No, I'm not. As I said, I built the program and linked the executable entirely on Arch Linux using gcc, this is what I usually run when debugging with gdb:

as --32 -gstabs -o es1.o es1.s
ld -m elf_i386 -o es1 es1.o

PS: I installed edb-debugger using the AUR git package

Some info: image image

10110111 commented 3 years ago

Does your program start if run without EDB? How exactly do you run it via EDB? What does file es1 command tell about the program?

lotation commented 3 years ago

Ok, turns out I was trying to debug the object file, not the executable ;P I'm sorry to have bothered you since it has nothing to do with edb

eteran commented 3 years ago

No worries, glad you got it figured out!