[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/4] gdbstub: Use cpu_set_pc helper
From: |
Peter Crosthwaite |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/4] gdbstub: Use cpu_set_pc helper |
Date: |
Tue, 23 Jun 2015 19:50:36 -0700 |
On Mon, Jun 22, 2015 at 10:31 AM, Andreas Färber <address@hidden> wrote:
> Am 16.06.2015 um 07:46 schrieb Peter Crosthwaite:
>> Use the cpu_set_pc helper which will take care of CPUClass retrieval
>> for us.
>>
>> Signed-off-by: Peter Crosthwaite <address@hidden>
>> ---
>> gdbstub.c | 5 +----
>> 1 file changed, 1 insertion(+), 4 deletions(-)
>>
>> diff --git a/gdbstub.c b/gdbstub.c
>> index 75563db..ceb60ac 100644
>> --- a/gdbstub.c
>> +++ b/gdbstub.c
>> @@ -754,12 +754,9 @@ static void gdb_breakpoint_remove_all(void)
>> static void gdb_set_cpu_pc(GDBState *s, target_ulong pc)
>> {
>> CPUState *cpu = s->c_cpu;
>> - CPUClass *cc = CPU_GET_CLASS(cpu);
>>
>> cpu_synchronize_state(cpu);
>> - if (cc->set_pc) {
>> - cc->set_pc(cpu, pc);
>> - }
>> + cpu_set_pc(cpu, pc, NULL);
>
> I believe this argument will probably go away; otherwise this should've
> been &error_abort or something instead of NULL.
>
I'm not sure. As I don't see what is catching the case of a gdb 'c'
packet for a CPU that doesn't implement set_pc. I'd rather preserve
the existing behaviour, and have the qom wrapper do nothing if it is
not implemented.
Regards,
Peter
> Regards,
> Andreas
>
>> }
>>
>> static CPUState *find_cpu(uint32_t thread_id)
>>
>
>
> --
> SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB
> 21284 (AG Nürnberg)
>
- [Qemu-devel] [PATCH v2 0/4] qom-cpu: Wrap set_pc hook and use in bootloaders, Peter Crosthwaite, 2015/06/16
- [Qemu-devel] [PATCH v2 1/4] qom: cpu: Add wrapper to the set-pc hook, Peter Crosthwaite, 2015/06/16
- [Qemu-devel] [PATCH v2 2/4] gdbstub: Use cpu_set_pc helper, Peter Crosthwaite, 2015/06/16
- Re: [Qemu-devel] [PATCH v2 2/4] gdbstub: Use cpu_set_pc helper, Andreas Färber, 2015/06/22
- Re: [Qemu-devel] [PATCH v2 2/4] gdbstub: Use cpu_set_pc helper,
Peter Crosthwaite <=
- Re: [Qemu-devel] [PATCH v2 2/4] gdbstub: Use cpu_set_pc helper, Peter Maydell, 2015/06/24
- Re: [Qemu-devel] [PATCH v2 2/4] gdbstub: Use cpu_set_pc helper, Peter Crosthwaite, 2015/06/24
- Re: [Qemu-devel] [PATCH v2 2/4] gdbstub: Use cpu_set_pc helper, Andreas Färber, 2015/06/24
- Re: [Qemu-devel] [PATCH v2 2/4] gdbstub: Use cpu_set_pc helper, Peter Crosthwaite, 2015/06/24
- Re: [Qemu-devel] [PATCH v2 2/4] gdbstub: Use cpu_set_pc helper, Peter Maydell, 2015/06/24
[Qemu-devel] [PATCH v2 3/4] arm: boot: Use cpu_set_pc, Peter Crosthwaite, 2015/06/16
[Qemu-devel] [PATCH v2 4/4] microblaze: boot: Use cpu_set_pc, Peter Crosthwaite, 2015/06/16