I am running GDB in "mi interpreter" mode and I am using user defined hooks to detect events such as stop,quit etc.
Whenever the event occurs the hook will print some information which are redirected to a different log file.
Another application will read the contents from this log file and process it.
I have written a hook to detect GDB exit, as illustrated:
define hook-quit
set logging file D:\log\task.log
set logging on
print "GDB end detected"
set logging off
end
In GDB's console mode, the above hook executes successfully when GDB exits.
However in GDB's "mi interpreter mode", the hook fails to execute.
Is there any alternative hook (or any method) for detecting GDB exit in "mi interpreter mode".
Tested Environment:
Windows 7
Toolchain: arm-none-eabi (command: arm-none-eabi-gdb.exe --interpreter=mi D:\test.elf)