gdb 8.3.1 on OSX Catalina "not in executable format: file format not recognized"

Viewed 446

I try to debug this file

and got error

not in executable format: file format not recognized

the 'file' command output

canary: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, 
interpreter /lib/ld-linux.so.2, BuildID[sha1]=377711637c79e57303ff92f946500aed1b42c73a, for 
GNU/Linux 3.2.0, not stripped`

the other answer seem not working for me.

2 Answers

The ELF binary executable format is standard in Linux and other Unixes. It is not compatible with macOS, which uses the Mach-O binary format.

Whatever you are attempting to analyze must be recompiled into a Mach-O binary.

Related