I want to send gdb command (like "backtrace", "b *0xAAAAAAA", "i b", ...) from IDA debugger to gdbserver over gdb remote debugging and receive result and print it to output view of IDA, can I do it? Anyone have tried it before?
I found that function "SendDbgCommand" in IDA help
Send arbitrary command to the debugger engine. Returns: the command output.
Note: this function is available for the following debuggers: windbg, gdb, bochs
string SendDbgCommand(string cmd);
But when i tried it, in idc script or idapython script, it didn't work!
- i used ida 6.1 remote GDB debugger and my remote machine is Ubuntu, run command
gdbserver --multi localhost:12345
as normal remote debugging session and everything is alright
now, i want to use other gdb commands (like above) beside operators provided by ida GUI
- i tried idapython script from: https://code.google.com/p/idapython/source/browse/trunk/Scripts/DbgCmd.py?r=344 but it didn't work, when execute SendDbgCommand, it return IDC_FAILURE
if s.startswith("IDC_FAILURE"): raise Exception, "Debugger command is available only when the debugger is active!"
- i also tried use SendDbgCommand in idc script but i didn't work too, it returns 0
Anyone can help me please? Thank you so much!