From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQ38z-0001PU-AW for qemu-devel@nongnu.org; Wed, 20 Jul 2016 21:51:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQ38x-0004aR-3T for qemu-devel@nongnu.org; Wed, 20 Jul 2016 21:51:20 -0400 Date: Thu, 21 Jul 2016 11:48:27 +1000 From: David Gibson Message-ID: <20160721014827.GA31439@voom.fritz.box> References: <1468990980-4598-1-git-send-email-andrew.smirnov@gmail.com> <1468990980-4598-10-git-send-email-andrew.smirnov@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7AUc2qLy4jB3hD7Z" Content-Disposition: inline In-Reply-To: <1468990980-4598-10-git-send-email-andrew.smirnov@gmail.com> Subject: Re: [Qemu-devel] [PATCH v3 09/10] gdbstub: Convert target_memory_rw_debug to use MemoryAccessType List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrey Smirnov Cc: qemu-devel@nongnu.org, Peter Maydell , qemu-ppc@nongnu.org, qemu-arm@nongnu.org, kvm@vger.kernel.org --7AUc2qLy4jB3hD7Z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 19, 2016 at 10:02:59PM -0700, Andrey Smirnov wrote: > Convert target_memory_rw_debug to use MemoryAccessType as to follow > similar conversion of cpu_memory_rw_debug. >=20 > Signed-off-by: Andrey Smirnov Reviewed-by: David Gibson > --- > gdbstub.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) >=20 > diff --git a/gdbstub.c b/gdbstub.c > index 9c4cbe4..c215672 100644 > --- a/gdbstub.c > +++ b/gdbstub.c > @@ -44,15 +44,17 @@ > #endif > =20 > static inline int target_memory_rw_debug(CPUState *cpu, target_ulong add= r, > - uint8_t *buf, int len, bool is_= write) > + uint8_t *buf, int len, > + MemoryAccessType access_type) > { > CPUClass *cc =3D CPU_GET_CLASS(cpu); > =20 > if (cc->memory_rw_debug) { > + const bool is_write =3D (access_type =3D=3D MEM_DATA_STORE); > return cc->memory_rw_debug(cpu, addr, buf, len, is_write); > } > - return cpu_memory_rw_debug(cpu, addr, buf, len, > - is_write ? MEM_DATA_STORE : MEM_DATA_LOAD= ); > + > + return cpu_memory_rw_debug(cpu, addr, buf, len, access_type); > } > =20 > enum { > @@ -966,7 +968,8 @@ static int gdb_handle_packet(GDBState *s, const char = *line_buf) > break; > } > =20 > - if (target_memory_rw_debug(s->g_cpu, addr, mem_buf, len, false) = !=3D 0) { > + if (target_memory_rw_debug(s->g_cpu, addr, mem_buf, > + len, MEM_DATA_LOAD) !=3D 0) { > put_packet (s, "E14"); > } else { > memtohex(buf, mem_buf, len); > @@ -988,7 +991,7 @@ static int gdb_handle_packet(GDBState *s, const char = *line_buf) > } > hextomem(mem_buf, p, len); > if (target_memory_rw_debug(s->g_cpu, addr, mem_buf, len, > - true) !=3D 0) { > + MEM_DATA_STORE) !=3D 0) { > put_packet(s, "E14"); > } else { > put_packet(s, "OK"); --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --7AUc2qLy4jB3hD7Z Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXkCnqAAoJEGw4ysog2bOSC3kQAN9loyq6QKd1mCcZSkT5JMct CcrCtfYqRm3KiVc2+kOZSW5oLjTv3I8ulFCnJk6g85k9WndmZSYcc8ID7htTdqXh z3dk1zPKZwkPRvitmc73kgOv1CQ5c1ZhnP6XjFqf7ksCXace3uZNr3OBBO10+Q9H wyZxiQ3k2J0uW/fuZntBy69oL89QQ+5MwIPFUYUhOa500vLkDD5Yvd9fMy350QwX nVvJhKlskaIVhfJQJdDDevyMtWW2/DzYgMASaTZvhjdwUcWWnqUlkW5BPCBYHanQ R7/YyrXVVSKJs85UYBQK6NuH6/8CbG6DkpigFNYoG9aBd5DcfA2/ni01VVQ6JSNz J2R9jC/qDyPEtRqpaMdkkZTrZNVcJxBppWUW54I2h2SDWKgSEANyA/QAzJ/Crmo8 gBYO0oNroIF6ibCmvvGlaJqxmRJXrP94Jl664EUHjluuRbpECnXn2VIxVVZjUwlf hdxV05EOZ9NrWtIK2byGFuzrCyZHoiZBnLao3ndzHj6ZQrNXr0l7UL3dA+8XjdEE Ab2vKsiRwJjVSZq4gBG8dxomBXV1H2liuMHViv5qUX29taELQzQnx+MealkJlgvm AWe0mjsgMq/qM+7ab1NNOnWWjs/Gu3Prk2My3qvp8svlwhMiYgm91d9Q7kbVIg2h CdTU8PLWeuZRun0RBfj1 =E9Ey -----END PGP SIGNATURE----- --7AUc2qLy4jB3hD7Z--