[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] target/m68k: add monitor.c
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PATCH] target/m68k: add monitor.c |
Date: |
Thu, 21 Dec 2017 08:57:34 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
Le 20/12/2017 à 21:54, Philippe Mathieu-Daudé a écrit :
> On Wed, Dec 20, 2017 at 5:35 PM, Laurent Vivier <address@hidden> wrote:
>> This allows to use registers content in the monitor.
>>
>> Example:
>>
>> BEFORE:
>> (qemu) print $d0
>> unknown register
>>
>> AFTER:
>> (qemu) print $d0
>> 0
>> (qemu) print $sr
>> 0x2000
>> (qemu) x/10i $pc
>> 0x40010a2a: movew %sr,%d0
>> 0x40010a2c: oril #1792,%d0
>> 0x40010a32: movew %d0,%sr
>> 0x40010a34: movel %a0@,%d0
>> 0x40010a36: btst #3,%d0
>> 0x40010a3a: beqs 0x40010a26
>> 0x40010a3c: movew %sr,%d0
>> 0x40010a3e: andil #63743,%d0
>> 0x40010a44: movew %d0,%sr
>> 0x40010a46: rts
>>
>> Signed-off-by: Laurent Vivier <address@hidden>
>> ---
>> target/m68k/Makefile.objs | 1 +
>> target/m68k/monitor.c | 55
>> +++++++++++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 56 insertions(+)
>> create mode 100644 target/m68k/monitor.c
>>
>> diff --git a/target/m68k/Makefile.objs b/target/m68k/Makefile.objs
>> index 39141ab93d..d143f20270 100644
>> --- a/target/m68k/Makefile.objs
>> +++ b/target/m68k/Makefile.objs
>> @@ -1,3 +1,4 @@
>> obj-y += m68k-semi.o
>> obj-y += translate.o op_helper.o helper.o cpu.o fpu_helper.o
>> obj-y += gdbstub.o
>> +obj-$(CONFIG_SOFTMMU) += monitor.o
>> diff --git a/target/m68k/monitor.c b/target/m68k/monitor.c
>> new file mode 100644
>> index 0000000000..03d037ccab
>> --- /dev/null
>> +++ b/target/m68k/monitor.c
>> @@ -0,0 +1,55 @@
>> +/*
>> + * QEMU monitor
>> + *
>> + * Copyright (c) 2003-2004 Fabrice Bellard
>> + *
>> + * Permission is hereby granted, free of charge, to any person obtaining a
>> copy
>> + * of this software and associated documentation files (the "Software"), to
>> deal
>> + * in the Software without restriction, including without limitation the
>> rights
>> + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
>> + * copies of the Software, and to permit persons to whom the Software is
>> + * furnished to do so, subject to the following conditions:
>> + *
>> + * The above copyright notice and this permission notice shall be included
>> in
>> + * all copies or substantial portions of the Software.
>> + *
>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
>> OR
>> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
>> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
>> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
>> OTHER
>> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>> FROM,
>> + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
>> + * THE SOFTWARE.
>> + */
>> +#include "qemu/osdep.h"
>> +#include "cpu.h"
>> +#include "monitor/hmp-target.h"
>> +
>> +const MonitorDef monitor_defs[] = {
>
> adding 'static':
ok
> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Thanks,
Laurent