Skip to contentSkip to conversation

Addming new options to the QEMU monitor

Qemu-devel Marco Boni 2 participants 2 messages Mar 15, 2011

lore
Share & tools
lore

Marco Boni

author
#0 lore raw

Hi.
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.

Is there any code practice to follow? Which source files should I put my hands on?

Thank you very much in advance for your help....

m

Signature · 13 lines
Marco Boni
	
Information Engineering Department
University of Siena
Room 223
Via Roma, 56
53100 Siena
ITALY

Office: +39 0577 234850 (1085)
Mobile: +39 335 607 9353
Email: [email protected]
Skype: m.boni
#1 lore raw
Quoted 6 lines · Marco Boni

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.

Quoted 1 line

Is there any code practice to follow?

Yes, there are some requirements on the Wiki :
http://wiki.qemu.org/Contribute/SubmitAPatch

Quoted 2 lines

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.

Signature · 1 line
Vincent