On Tue, Mar 15, 2011 at 11:28, Marco Boni <mb.b...@gmail.com> wrote: > I would like to have some hints on how to implement new options in the QEMU > monitor. > > In particular, I would like to add an instruction counter, so that I can > press CTRL+ALT+2 and type something like "instruction_counter", and get the > number of instructions that have been executed so far.
You should have a look at the "-icount" command line option and its implementation. > Is there any code practice to follow? Yes, there are some requirements on the Wiki : http://wiki.qemu.org/Contribute/SubmitAPatch >Which source files should I put my > hands on? have a look at monitor.c and the hmp-command.hx to add simply a new command. -- Vincent