From patchwork Tue Apr 14 20:06:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 185440 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp1832900ilf; Tue, 14 Apr 2020 13:08:45 -0700 (PDT) X-Google-Smtp-Source: APiQypJ/RVRW7TNKwv0hz/4I3+hZ9kbguqmaxonGfJLYQx8wRTtCi+W3b/bxoL26Q9NElPee0oYc X-Received: by 2002:ad4:5a01:: with SMTP id ei1mr1789218qvb.63.1586894925438; Tue, 14 Apr 2020 13:08:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586894925; cv=none; d=google.com; s=arc-20160816; b=ac78Bw21E/3YQl4/TWD/N+06Xmph+0+M/w+Fzgc/fKHvo+zdH4dP7hUvl7oIygecHQ LSBuSLSxfOliOQ4ax3zfL2zT+5xp4UWBOEoaODTY9ZhCnDy3+zLExrtIqminWh19/06J 7xEpTVa6EPhzf8yqTSAO4xe8pI/RWQ6lk0PTpVA8V0J6nZpDFYogXMN99gXINwXw7LZC WDjlv+4nrTjqebguiyReOoclhuVbyj5xKCBSRTb/alAhRRwlDRVja8zKYXnHFTAIcKU1 Tlv9q47H32UOsGj+BpUizolCcfmTX9EtfJifbG4LPQgVJS47Uiv7lyqAuM+3/6KKpatM 9zaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=+h4qF34NYYCpNnzawIFaWBfnQi1AWYOeOfS8Oq1wtAU=; b=usVUx28G5ob7Eluyo9vb7OrCgnYhjvVV3uw1TgoDirptuHEhOXrdGn6RaVavQCKfIV 1cdV8ZCOk+RczkjWFOGkl0vwQzjUq/yoojR5RZO8PlLROIuRkuB2jDGdjn9TXl30NS/y UvdiVlQ1DHSStJQX5KqKbF6s1n4gBcBMQSvgOGv3sjhZ32d0c8KmOzqeTXDfx/YSKKNC uskiqeQaQI/I/Ft+0KbrCYoAzK6lkxU/zaBwU0hnJnJIAoLZhfvJn1tOe5R+LA6tpGjC 0wOcEJR6x2lreMywl10evP5xs1ac23nKhpECFqGD3dxU1cBAnSCXnr8W2qpBkkACmD9R 2kMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=f1fjPHNH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q9si8637712qkn.374.2020.04.14.13.08.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Apr 2020 13:08:45 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=f1fjPHNH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:38392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jORrQ-0001CR-Rc for patch@linaro.org; Tue, 14 Apr 2020 16:08:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44595) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jORpe-0006Et-UW for qemu-devel@nongnu.org; Tue, 14 Apr 2020 16:06:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jORpd-00061w-Si for qemu-devel@nongnu.org; Tue, 14 Apr 2020 16:06:54 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:33193) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jORpc-0005zw-Dx for qemu-devel@nongnu.org; Tue, 14 Apr 2020 16:06:53 -0400 Received: by mail-wr1-x42c.google.com with SMTP id a25so16027305wrd.0 for ; Tue, 14 Apr 2020 13:06:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+h4qF34NYYCpNnzawIFaWBfnQi1AWYOeOfS8Oq1wtAU=; b=f1fjPHNHeO6rBOZGjTKY+PgSL6eLEcjGILOtdR0k3GHYzmpRjCOh56QA1C7sSz2pue KR8STw3ri3yZp/eM9FKs88g/KYL8FLhqckZFTcKsKRM04Dj2u4Ts5Vbg4CtVdgTqYFcn q6xQiKgP8wuSWcBV3gZ2u6sebhhFi2iRH2u48a2z1At46fwxCCZw2nH6+tOu/v+jSskn gLLyY77aOeZ2Tk0atiBGxUJ1hp6o92LLgEZEHL48ta9+MRdMDAyemjh31r7kXCR1JBm5 uXgtI0+y3WjVPKEGuLCHKaIYuZ8h6rjMxlVnnwmcvTeD43GhuKLna+mAPPQId3FYCLmL SS7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+h4qF34NYYCpNnzawIFaWBfnQi1AWYOeOfS8Oq1wtAU=; b=dAGujLH3RMEimKKgiTI9F+c9b1nLyqST/8ibTcjEyvPhHa1x6h93b0EtZnGQ89aFqf eaePwtZMcOfvu7FJStuQikkkNZaT0MwSy1swXl+krPEvlM43aHZGPvnQ1nksIOUnR/Tg UqPnoIqIRNM3oM6KjurLyhZBoRvIsnpElORUpFBTn4fYjlCJg569u0HjoAhPmL3QmUEx zkUwyvY0BZj9tY6Jdag5JV6c697WaYQ2eRqq8jisLvFlY/2XUQVLyl+lwRgaogKW7Jvc zZuTQtKr7Edz3dDW8khJqr1wblENdMFsNJcmYWm6sJ8+PtMyvz5M7qIyWco1Atky8PG5 jMZQ== X-Gm-Message-State: AGi0PuaLNYgJuzslCErzhduOqvNIw08Z4foiPYRIE+L7St5ncC4URqBz UJOFTJiZMG3AlefSik3qwoFg2A== X-Received: by 2002:adf:82b1:: with SMTP id 46mr18098277wrc.44.1586894810142; Tue, 14 Apr 2020 13:06:50 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u16sm20153720wro.23.2020.04.14.13.06.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 13:06:44 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 2ABF91FF99; Tue, 14 Apr 2020 21:06:33 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 10/17] target/m68k/helper: Fix m68k_fpu_gdb_get_reg() use of GByteArray Date: Tue, 14 Apr 2020 21:06:24 +0100 Message-Id: <20200414200631.12799-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200414200631.12799-1-alex.bennee@linaro.org> References: <20200414200631.12799-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42c X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Peter Xu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Since a010bdbe719 the gdbstub API takes a GByteArray*. Unfortunately we forgot to update the gdb_get_reg*() calls. Do it now. Fixes: a010bdbe719 ("extend GByteArray to read register helpers") Reported-by: Peter Xu Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Reviewed-by: Peter Xu Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20200409172509.4078-1-philmd@redhat.com> --- target/m68k/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/target/m68k/helper.c b/target/m68k/helper.c index 014657c6372..cad40838956 100644 --- a/target/m68k/helper.c +++ b/target/m68k/helper.c @@ -109,8 +109,8 @@ static int m68k_fpu_gdb_get_reg(CPUM68KState *env, GByteArray *mem_buf, int n) { if (n < 8) { int len = gdb_get_reg16(mem_buf, env->fregs[n].l.upper); - len += gdb_get_reg16(mem_buf + len, 0); - len += gdb_get_reg64(mem_buf + len, env->fregs[n].l.lower); + len += gdb_get_reg16(mem_buf, 0); + len += gdb_get_reg64(mem_buf, env->fregs[n].l.lower); return len; } switch (n) {