From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106364 invoked by alias); 28 May 2015 14:20:40 -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 106152 invoked by uid 89); 28 May 2015 14:20:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f52.google.com Received: from mail-pa0-f52.google.com (HELO mail-pa0-f52.google.com) (209.85.220.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 28 May 2015 14:20:23 +0000 Received: by pabru16 with SMTP id ru16so24665816pab.1 for ; Thu, 28 May 2015 07:20:21 -0700 (PDT) X-Received: by 10.70.47.68 with SMTP id b4mr5967553pdn.33.1432822821609; Thu, 28 May 2015 07:20:21 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id dd3sm2587101pad.45.2015.05.28.07.20.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 May 2015 07:20:20 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH 0/6] Use PTRACE_GETREGSET and PTRACE_SETREGSET in arm-linux-nat.c Date: Thu, 28 May 2015 14:20:00 -0000 Message-Id: <1432822816-32327-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00685.txt.bz2 This patch series is to let GDB arm-linux-nat.c use ptrace commands PTRACE_GETREGSET and PTRACE_SETREGSET if linux kernel supports. Patch #1 and #2 are factoring out macros and variables into more common files. Patch #3 checks whether PTRACE_GETREGSET is supported by linux kernel. Patch #4 - #6 use PTRACE_{G,S}ETREGSET ptrace commands to fetch and store general purpose registers, FP registers and VFP registers. The whole test series are tested on x86_64-linux and arm-linux (with PTRACE_GETREGSET and without PTRACE_GETREGSET kernel support respectively). After these patches, arm-linux-nat.c is similar to aarch64-linux-nat.c in the aspect of fetching and storing registers. It paves the way for multi-arch support in aarch64 gdb (aarch64 gdb can do native debugging for arm program), which is the motivation of this patch series. *** BLURB HERE *** Yao Qi (6): Move PTRACE_GETREGSET and PTRACE_SETREGSET to nat/linux-ptrace.h Move have_ptrace_getregset to linux-nat.c Check whether kernel supports PTRACE_GETREGSET Fetch and store GP registers by PTRACE_{G,S}ETREGSET Fetch and store FP registers by PTRACE_{G,S}ETREGSET Fetch and store VFP registers by PTRACE_{G,S}ETREGSET gdb/amd64-linux-nat.c | 1 + gdb/arm-linux-nat.c | 211 +++++++++++++++++++++++++++++++++++++---- gdb/gdbserver/linux-s390-low.c | 8 -- gdb/gdbserver/linux-x86-low.c | 9 -- gdb/i386-linux-nat.c | 1 + gdb/linux-nat.c | 3 + gdb/linux-nat.h | 3 + gdb/nat/linux-ptrace.h | 8 ++ gdb/s390-linux-nat.c | 9 +- gdb/x86-linux-nat.c | 3 +- gdb/x86-linux-nat.h | 10 -- 11 files changed, 212 insertions(+), 54 deletions(-) -- 1.9.1