From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5503 invoked by alias); 27 Jul 2013 20:13:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 5493 invoked by uid 89); 27 Jul 2013 20:13:30 -0000 X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RDNS_NONE,SPF_PASS autolearn=no version=3.3.1 Received: from Unknown (HELO mail-wg0-f46.google.com) (74.125.82.46) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sat, 27 Jul 2013 20:13:29 +0000 Received: by mail-wg0-f46.google.com with SMTP id k13so3748112wgh.1 for ; Sat, 27 Jul 2013 13:13:20 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.194.121.132 with SMTP id lk4mr38704641wjb.25.1374956000891; Sat, 27 Jul 2013 13:13:20 -0700 (PDT) Received: by 10.216.92.195 with HTTP; Sat, 27 Jul 2013 13:13:20 -0700 (PDT) Date: Sat, 27 Jul 2013 20:13:00 -0000 Message-ID: Subject: [PATCH/AARCH64] Fix hardware break points From: Andrew Pinski To: "gdb-patches@sourceware.org" Content-Type: multipart/mixed; boundary=089e012292da03d89804e283e498 X-Virus-Found: No X-SW-Source: 2013-07/txt/msg00665.txt.bz2 --089e012292da03d89804e283e498 Content-Type: text/plain; charset=UTF-8 Content-length: 552 I noticed after a fork, gdb would fail with the following message: Unexpected error setting hardware debug registers This is because it was trying to setup hardware breakpoint debug registers but it was passing to ptrace garbage for the registers as they were not zero'd out. This fixes the problem by zeroing out the regs variable and now debugging after a fork works on aarch64. OK? Built and tested on aarch64-linux-gnu with no regressions. Thanks, Andrew Pinski ChangeLog: * aarch64-linux-nat.c (aarch64_linux_set_debug_regs): Zero out regs. --089e012292da03d89804e283e498 Content-Type: text/plain; charset=US-ASCII; name="fixfork.diff.txt" Content-Disposition: attachment; filename="fixfork.diff.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hjn9a4y20 Content-length: 834 PyAuYWFyY2g2NC1saW51eC1uYXQuYy5zd3AKSW5kZXg6IGFhcmNoNjQtbGlu dXgtbmF0LmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTogL2N2 cy9zcmMvc3JjL2dkYi9hYXJjaDY0LWxpbnV4LW5hdC5jLHYKcmV0cmlldmlu ZyByZXZpc2lvbiAxLjQKZGlmZiAtdSAtcCAtcjEuNCBhYXJjaDY0LWxpbnV4 LW5hdC5jCi0tLSBhYXJjaDY0LWxpbnV4LW5hdC5jCTE0IEZlYiAyMDEzIDEz OjUwOjMwIC0wMDAwCTEuNAorKysgYWFyY2g2NC1saW51eC1uYXQuYwkyNyBK dWwgMjAxMyAyMDoxMjozOSAtMDAwMApAQCAtMzEyLDYgKzMxMiw3IEBAIGFh cmNoNjRfbGludXhfc2V0X2RlYnVnX3JlZ3MgKGNvbnN0IHN0cnUKICAgY29u c3QgQ09SRV9BRERSICphZGRyOwogICBjb25zdCB1bnNpZ25lZCBpbnQgKmN0 cmw7CiAKKyAgbWVtc2V0ICgmcmVncywgMCwgc2l6ZShyZWdzKSk7CiAgIGlv di5pb3ZfYmFzZSA9ICZyZWdzOwogICBpb3YuaW92X2xlbiA9IHNpemVvZiAo cmVncyk7CiAgIGNvdW50ID0gd2F0Y2hwb2ludCA/IGFhcmNoNjRfbnVtX3dw X3JlZ3MgOiBhYXJjaDY0X251bV9icF9yZWdzOwo= --089e012292da03d89804e283e498--