From patchwork Thu Sep 12 15:38:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 20008 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 49BDA26B56 for ; Thu, 12 Sep 2013 15:38:38 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id l13sf7646663qcy.9 for ; Thu, 12 Sep 2013 08:38:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:date:from:user-agent :mime-version:to:cc:subject:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=lhhJD10J7B5rpuPRik/eAu7SoQTrC9Zir3hKvSks/PU=; b=XLpp0AVgDI+RbPOpapQjV53b60QOTnM/lZPRYeG/nwE9rBYoe4TxHW5R5gCqrn/wpm yIQwkd3N9Hi4BtyEamTNFFAhFg0vmHR2ITFAwiA2aAqEP1GFTGoMwtOxcx5V0MHkSRrL TOvij4p9vpBbwEHH12pxcAgXjIUo8PP83Cv5eOwqidwaEvNHSIOEhZLebgryymh1hK02 3LYp/iB0CttppyWSS0DMlxMKgU/NiEqCHDL76DUxalhQeRlSA4p/o9RnkYfgwoogL6Qx gNSl6aeqkDu7WJGuwbajAV2/sLZgqgm+lCjpXoC6nXCwg7sBzt91XW1w3DWPGn1wfDM0 2IiA== X-Gm-Message-State: ALoCoQlyJeoMqM8Wt9fcVg3p+Wl1Kpq0Slfz8kASGVeBG9MFkWycAO3kCH0YrD0usd5Y6Ixa1qrJ X-Received: by 10.236.163.67 with SMTP id z43mr2995920yhk.27.1379000317327; Thu, 12 Sep 2013 08:38:37 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.128.229 with SMTP id nr5ls164475qeb.94.gmail; Thu, 12 Sep 2013 08:38:37 -0700 (PDT) X-Received: by 10.58.28.147 with SMTP id b19mr1600381veh.27.1379000317076; Thu, 12 Sep 2013 08:38:37 -0700 (PDT) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by mx.google.com with ESMTPS id vv9si1421258vec.43.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Sep 2013 08:38:37 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.50; Received: by mail-vb0-f50.google.com with SMTP id x14so7662674vbb.9 for ; Thu, 12 Sep 2013 08:38:37 -0700 (PDT) X-Received: by 10.52.113.99 with SMTP id ix3mr2225072vdb.22.1379000316992; Thu, 12 Sep 2013 08:38:36 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp27686vcz; Thu, 12 Sep 2013 08:38:36 -0700 (PDT) X-Received: by 10.204.226.135 with SMTP id iw7mr7284479bkb.4.1379000315939; Thu, 12 Sep 2013 08:38:35 -0700 (PDT) Received: from mail-bk0-f48.google.com (mail-bk0-f48.google.com [209.85.214.48]) by mx.google.com with ESMTPS id nm9si670113bkb.321.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Sep 2013 08:38:35 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.214.48 is neither permitted nor denied by best guess record for domain of will.newton@linaro.org) client-ip=209.85.214.48; Received: by mail-bk0-f48.google.com with SMTP id my13so4253504bkb.35 for ; Thu, 12 Sep 2013 08:38:35 -0700 (PDT) X-Received: by 10.205.22.71 with SMTP id qv7mr7224640bkb.20.1379000314933; Thu, 12 Sep 2013 08:38:34 -0700 (PDT) Received: from localhost.localdomain (cpc6-seac21-2-0-cust453.7-2.cable.virginmedia.com. [82.1.113.198]) by mx.google.com with ESMTPSA id b6sm1445309bko.16.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 12 Sep 2013 08:38:33 -0700 (PDT) Message-ID: <5231DFF8.3030203@linaro.org> Date: Thu, 12 Sep 2013 16:38:32 +0100 From: Will Newton User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 MIME-Version: 1.0 To: gdb-patches@sourceware.org CC: patches@linaro.org Subject: [PATCH] gdbserver, aarch64: Zero out regs in aarch64_linux_set_debug_regs. X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: will.newton@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Apply the same fix that was applied to aarch64-linux-nat.c. 2013-09-12 Will Newton * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero out regs. --- gdb/gdbserver/linux-aarch64-low.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c index e37f602..93246b3 100644 --- a/gdb/gdbserver/linux-aarch64-low.c +++ b/gdb/gdbserver/linux-aarch64-low.c @@ -600,6 +600,7 @@ aarch64_linux_set_debug_regs (const struct aarch64_debug_reg_state *state, const CORE_ADDR *addr; const unsigned int *ctrl; + memset (®s, 0, sizeof (regs)); iov.iov_base = ®s; iov.iov_len = sizeof (regs); count = watchpoint ? aarch64_num_wp_regs : aarch64_num_bp_regs;