Re: [Qemu-devel] [PATCH v1 2/2] gdbstub: don't fail on vCont; C04:0; c packets

2017-05-31 Thread Greg Kurz
On Wed, 31 May 2017 19:40:46 +0200 Claudio Imbrenda wrote: > On Wed, 31 May 2017 19:06:29 +0200 > Greg Kurz wrote: > > > On Wed, 31 May 2017 18:51:06 +0200 > > Claudio Imbrenda wrote: > > [...] > > > > > > > > > >

Re: [Qemu-devel] [PATCH v1 2/2] gdbstub: don't fail on vCont; C04:0; c packets

2017-05-31 Thread Alex Bennée
Claudio Imbrenda writes: > On Wed, 31 May 2017 19:06:29 +0200 > Greg Kurz wrote: > >> On Wed, 31 May 2017 18:51:06 +0200 >> Claudio Imbrenda wrote: >> [...] >> > > > >> > > > This is strange. cpu_index() is defined as:

Re: [Qemu-devel] [PATCH v1 2/2] gdbstub: don't fail on vCont; C04:0; c packets

2017-05-31 Thread Claudio Imbrenda
On Wed, 31 May 2017 19:06:29 +0200 Greg Kurz wrote: > On Wed, 31 May 2017 18:51:06 +0200 > Claudio Imbrenda wrote: > [...] > > > > > > > > This is strange. cpu_index() is defined as: > > > > > > > > static inline int cpu_index(CPUState *cpu) > > >

Re: [Qemu-devel] [PATCH v1 2/2] gdbstub: don't fail on vCont; C04:0; c packets

2017-05-31 Thread Alex Bennée
Claudio Imbrenda writes: > On Wed, 31 May 2017 18:33:24 +0200 > Greg Kurz wrote: > >> On Wed, 31 May 2017 18:17:37 +0200 >> Claudio Imbrenda wrote: >> >> > On Wed, 31 May 2017 16:09:33 +0100 >> > Alex Bennée

Re: [Qemu-devel] [PATCH v1 2/2] gdbstub: don't fail on vCont; C04:0; c packets

2017-05-31 Thread Greg Kurz
On Wed, 31 May 2017 18:51:06 +0200 Claudio Imbrenda wrote: [...] > > > > > > This is strange. cpu_index() is defined as: > > > > > > static inline int cpu_index(CPUState *cpu) > > > { > > > #if defined(CONFIG_USER_ONLY) > > > return cpu->host_tid; > > > #else >

Re: [Qemu-devel] [PATCH v1 2/2] gdbstub: don't fail on vCont; C04:0; c packets

2017-05-31 Thread Claudio Imbrenda
On Wed, 31 May 2017 18:33:24 +0200 Greg Kurz wrote: > On Wed, 31 May 2017 18:17:37 +0200 > Claudio Imbrenda wrote: > > > On Wed, 31 May 2017 16:09:33 +0100 > > Alex Bennée wrote: > > > > > The thread-id of 0 means any CPU

Re: [Qemu-devel] [PATCH v1 2/2] gdbstub: don't fail on vCont; C04:0; c packets

2017-05-31 Thread Greg Kurz
On Wed, 31 May 2017 18:17:37 +0200 Claudio Imbrenda wrote: > On Wed, 31 May 2017 16:09:33 +0100 > Alex Bennée wrote: > > > The thread-id of 0 means any CPU but we then ignore the fact we find > > the first_cpu in this case who can have an

Re: [Qemu-devel] [PATCH v1 2/2] gdbstub: don't fail on vCont; C04:0; c packets

2017-05-31 Thread Alex Bennée
Greg Kurz writes: > On Wed, 31 May 2017 16:09:33 +0100 > Alex Bennée wrote: > >> The thread-id of 0 means any CPU but we then ignore the fact we find >> the first_cpu in this case who can have an index of 0. Instead of > > The index can never be 0 in

Re: [Qemu-devel] [PATCH v1 2/2] gdbstub: don't fail on vCont; C04:0; c packets

2017-05-31 Thread Alex Bennée
Claudio Imbrenda writes: > On Wed, 31 May 2017 16:09:33 +0100 > Alex Bennée wrote: > >> The thread-id of 0 means any CPU but we then ignore the fact we find >> the first_cpu in this case who can have an index of 0. Instead of >> bailing out

Re: [Qemu-devel] [PATCH v1 2/2] gdbstub: don't fail on vCont; C04:0; c packets

2017-05-31 Thread Claudio Imbrenda
On Wed, 31 May 2017 16:09:33 +0100 Alex Bennée wrote: > The thread-id of 0 means any CPU but we then ignore the fact we find > the first_cpu in this case who can have an index of 0. Instead of > bailing out just test if we have managed to match up thread-id to a > CPU. >

Re: [Qemu-devel] [PATCH v1 2/2] gdbstub: don't fail on vCont; C04:0; c packets

2017-05-31 Thread Greg Kurz
On Wed, 31 May 2017 16:09:33 +0100 Alex Bennée wrote: > The thread-id of 0 means any CPU but we then ignore the fact we find > the first_cpu in this case who can have an index of 0. Instead of The index can never be 0 in system mode actually, but you're right that this

[Qemu-devel] [PATCH v1 2/2] gdbstub: don't fail on vCont; C04:0; c packets

2017-05-31 Thread Alex Bennée
The thread-id of 0 means any CPU but we then ignore the fact we find the first_cpu in this case who can have an index of 0. Instead of bailing out just test if we have managed to match up thread-id to a CPU. Otherwise you get: gdb_handle_packet: command='vCont;C04:0;c' put_packet: reply='E22'