From patchwork Thu Apr 9 21:15:26 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: 185323 Delivered-To: patch@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp2320631ilr; Thu, 9 Apr 2020 14:17:37 -0700 (PDT) X-Google-Smtp-Source: APiQypKgVvKjkY8ZayT4tol14r2Vi3LwXHFb///uhERjUPuXUDrsqzurYZnizpkrHAQa+tadMLTl X-Received: by 2002:a37:428a:: with SMTP id p132mr920362qka.267.1586467057556; Thu, 09 Apr 2020 14:17:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586467057; cv=none; d=google.com; s=arc-20160816; b=qc9Sg81jfPGEcqFWtrBavtpY4Z++KBGSQPhFAVCFtP3+klQINhTN50q4V7dGUuUdZR sOvRoYmOxL5Nrf9ExnD1Y7BtBZCaiicJn4VDAAC+RsCm6LzNey7wGNRGvlJ29TN9kuAm xaHIpS4AOdEjxYgOO2WHvnDpyDCxhjXohBKIXDuHL5s8AJ6dCpKJxs4oSim38s2jA739 h5stM8IFMkrdyUxcgYa/CLpaeKm/Ro7KGEDHXus/lZgEEuL0TtT27ywahLp3D23wcUDI K4mXHrDBrf7/2zCWiHlqcZRgPDGS2HwlaXQYQ1i6HI/fVkSLuEpU0O05phoh8tO8tYAK DOVw== 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=3Vwwp+7FgPCuWIPWypnjEryUlzyp/CqPviLpa6fHhzs=; b=jVMzeAljEDsWlKuh3eWJcwBCW1IpX5mScdES6gyhDYdRIZZtZFxXF4oEM7l5Z9VGsJ Az9V9okdSgl+PgSsJL1CUokSNk27zFxC1UePYKd3CPa8Mv1lAga90X9YD2vyLb4H4Bu0 BlCwR3tq9JgwXBYk6qNyMjb0/h1lQ5kBcxGTaFKj3KdAFAsx06jNQ0LO5uCSzsF9vR3H AhS/UlZrgNxMQBcNlMRvWJQjGqhF1NOiGJPWn1yi+nM6pIx6q9kT73Egc7m2W1Jj8Cgf 9JHLSuOZdJJJGv5rcdBTkRfgBQ06xb6Ygp6pcBC1B8EtHIUqZPbX/aNQ/R/43AchL07q o+iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QLTcE4Jh; 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 o8si6375889qvu.87.2020.04.09.14.17.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Apr 2020 14:17:37 -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=QLTcE4Jh; 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]:55588 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMeYL-0003P1-0M for patch@linaro.org; Thu, 09 Apr 2020 17:17:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42370) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMeWV-00028P-Kh for qemu-devel@nongnu.org; Thu, 09 Apr 2020 17:15:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jMeWU-0005m5-H7 for qemu-devel@nongnu.org; Thu, 09 Apr 2020 17:15:43 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:44954) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jMeWU-0005jw-BT for qemu-devel@nongnu.org; Thu, 09 Apr 2020 17:15:42 -0400 Received: by mail-wr1-x42b.google.com with SMTP id c15so13649342wro.11 for ; Thu, 09 Apr 2020 14:15:42 -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=3Vwwp+7FgPCuWIPWypnjEryUlzyp/CqPviLpa6fHhzs=; b=QLTcE4JhzphXKShNK4RN0Od/VFN09fkzpUqPAb+/skkecwnvkFLqeNWzN+ccJm+722 YBvnCpNbt8NT/baiYiMS2xMmlkbLLAENVQc2DUsJAPcF9q0UeAlos1j9QU9KHGFZ12Mp GP4r3d7ETBDH4TgcqqR2fyIC2OqVaMaVjOfg2RfduY0JLeUcrVtucQoHo0GtE6KuiAnN g7UljjawR0D8vLtThFNraHMNfn1tUuzlwxMhS9rDclGFzjC4WKL/yePErkx1LOxAEmlx 1ehVHPlQn1as3H8OO2kpP/E5Ckh6JDUxghN3lf3xGnMWlDKbrAdSleBJlNDKjYpSPYKV nFFw== 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=3Vwwp+7FgPCuWIPWypnjEryUlzyp/CqPviLpa6fHhzs=; b=c84DVYDUROJTmwen+fx2yH9ZYc0vLYtTlaKMDaMVvJ+isqy6xbEm1a93ieEwmXIFE9 dDCOjSs/aNmgaZ5Frd+2SbUn4Ysu/zZymYRMDOKuzvEzd2z3BQdzqDyYHCnAgvUeFlSs BQeWB1WnEpQkmYwelh1yNntE9S18uJ5g9aLrDaronEvqMj8mjEZ/9byYfGXGu8MYoY9P voeyxOx6lmH9rZBxouS7ih9BQAMRWzfgySar8Swiu5Gt4wNB7re7zr4X4tsUfmQIfMDr XmpM9YIpq8iCSpLBMytP9gEeicyk8BUChT82QY5AejVDXLS5bbr1ny5W/0XzgEsGX/Tc ufqQ== X-Gm-Message-State: AGi0PuZmmjHl537XeQ0QWiOicsbCWkNDI56PgE0t73rkgpeGkd0bH1WI QFMqtPwC6wtFv8PhRbzTChnC43DxRc4= X-Received: by 2002:a5d:69ce:: with SMTP id s14mr1075308wrw.413.1586466941366; Thu, 09 Apr 2020 14:15:41 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 127sm5440743wmd.38.2020.04.09.14.15.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2020 14:15:35 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C14B21FF96; Thu, 9 Apr 2020 22:15:30 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 08/11] target/m68k/helper: Fix m68k_fpu_gdb_get_reg() use of GByteArray Date: Thu, 9 Apr 2020 22:15:26 +0100 Message-Id: <20200409211529.5269-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200409211529.5269-1-alex.bennee@linaro.org> References: <20200409211529.5269-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::42b 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?= , =?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 Message-Id: <20200409172509.4078-1-philmd@redhat.com> --- target/m68k/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 Reviewed-by: Richard Henderson 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) {