Here is an updated patch, rebased after some basic code cleaning in gdb-mi.el. OK for master?