I have a x86 development machine and developing kernel module for mips. I wanted to disassemble a routine to find problems with the module.
So my question is
“Can I disassemble it on x86 machine or I will have to get a MIPS development machine ?”
I tried it, but it disassembles in x86 instruction set.
You basically need some form of cross compilation. A cross compiler would allow you to compile on a host machine (x86 in your case) for a target machine (MIPS in your case). So you would be able to generate MIPS binaries from your x86 machine. Moreover, you would also get all the other tools associated to the compiler, such as
objdump. Here you have a guide on how to build a cross compiler for GCC.Assuming you are using
objdumpto disassemble a binary, you may not need to build a cross compiler.objdumpbelongs to binutils and it may be possible to just compile binutils for using MIPS as the target (I have never tried to create a cross-platform build of binutils, so I am not 100% sure).EDIT: I just read the title again, and realized that you are using
gdb. In that case I believe you would need to create a full cross compiler, and create a cross-platform version ofgdb.