From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 835 invoked by alias); 30 May 2013 12:13:41 -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 824 invoked by uid 89); 30 May 2013 12:13:41 -0000 X-Spam-SWARE-Status: No, score=-7.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 30 May 2013 12:13:39 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4UCDcGm002541 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 30 May 2013 08:13:38 -0400 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r4UCDbXx008228 for ; Thu, 30 May 2013 08:13:37 -0400 Subject: [PATCH 00/22 v3] [GDBserver] Multi-process + multi-arch To: gdb-patches@sourceware.org From: Pedro Alves Date: Thu, 30 May 2013 12:13:00 -0000 Message-ID: <20130530121335.15047.12654.stgit@brno.lan> User-Agent: StGit/0.16 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-SW-Source: 2013-05/txt/msg01057.txt.bz2 History: v3: constify target_desc pointers throughout. make globals output my regdat.sh static. v2: Rebased on current mainline. Adjust new ports. v1: Initial post For convenience, the whole series is also found at https://github.com/palves/gdb/commits/multi-process-multi-arch-v3 git://github.com/palves/gdb.git multi-process-multi-arch-v3 Since http://sourceware.org/ml/gdb-patches/2012-11/msg00228.html, GDB is prepared to handle the case of debugging programs of different architectures (gdbarch's) simultaneously. However, GDBserver still isn't. A simple example is debugging both a 32-bit and a 64-bit program simultaneously on x86_64 (think following forks, and 32-bit and/or 64-bit children being spawned), though more complicated examples could be multi-core setups with processors on the same target (e.g., x86_64 + ARM isn't uncommon these days). The previous time I had posted this a year ago (v1), I had tested all that I could find a machine to test on. GDBserver hasn't changed that much since, and most patches applied cleanly, so I skipped the very time consuming retesting of non-x86 ports this time. For v2/v3, I re-checked things still build with a set of cross compilers though (indicated in each individual patch). A few archs were cross-compile tested only even back in v1 (for I have no access to some archs), and a few are still not tested at all, so it's quite possible that I broke them. We're still early enough in the release cycle that I'm not much concerned with port breakage, as any necessary fix should be trivial. The first patch does the core work, and adjusts the GNU/Linux x86/x86_64 port to interface changes. The build is then broken for all other ports after patch 1. All the subsequent patches then fix each port one by one. In order to try to keep the tree building at all revisions, all GDBserver patches will be consolidated into a single CVS commit; I've kept them separate to ease development, testing, and review. The x86 port was the one that had the most conflicts when rebasing to current mainline. I ended up doing things a little bit differently here and there. Since I first posted this, GDBserver gained a few new ports -- Nios2, Aarch64 and TILE-Gx. I adjusted them on v2. I plan to push this in soon, before yet another port comes along. :-) --- Pedro Alves (22): [GDBserver] Multi-process + multi-arch: core + GNU/Linux x86* [GDBserver] Multi-process + multi-arch: GNU/Linux IA64 [GDBserver] Multi-process + multi-arch: GNU/Linux SPARC [GDBserver] Multi-process + multi-arch: GNU/Linux PowerPC [GDBserver] Multi-process + multi-arch: GNU/Linux S/390 [GDBserver] Multi-process + multi-arch: GNU/Linux MIPS [GDBserver] Multi-process + multi-arch: GNU/Linux ARM [GDBserver] Multi-process + multi-arch: GNU/Linux m68k [GDBserver] Multi-process + multi-arch: GNU/Linux SH [GDBserver] Multi-process + multi-arch: GNU/Linux Blackfin [GDBserver] Multi-process + multi-arch: GNU/Linux CRIS [GDBserver] Multi-process + multi-arch: GNU/Linux CRISv32 [GDBserver] Multi-process + multi-arch: GNU/Linux M32R [GDBserver] Multi-process + multi-arch: GNU/Linux TI C6x [GDBserver] Multi-process + multi-arch: GNU/Linux Xtensa [GDBserver] Multi-process + multi-arch: GNU/Linux Nios 2 [GDBserver] Multi-process + multi-arch: GNU/Linux Aarch64 [GDBserver] Multi-process + multi-arch: GNU/Linux TILE-Gx [GDBserver] Multi-process + multi-arch: SPU [GDBserver] Multi-process + multi-arch: Windows [GDBserver] Multi-process + multi-arch: LynxOS [GDBserver] Multi-process + multi-arch: QNX NTO gdb/gdbserver/Makefile.in | 7 - gdb/gdbserver/ax.c | 2 gdb/gdbserver/i387-fp.c | 34 ++- gdb/gdbserver/i387-fp.h | 2 gdb/gdbserver/inferiors.c | 1 gdb/gdbserver/linux-aarch64-low.c | 43 +++ gdb/gdbserver/linux-amd64-ipa.c | 6 gdb/gdbserver/linux-arm-low.c | 91 +++++-- gdb/gdbserver/linux-bfin-low.c | 38 +++ gdb/gdbserver/linux-cris-low.c | 37 +++ gdb/gdbserver/linux-crisv32-low.c | 52 ++++ gdb/gdbserver/linux-i386-ipa.c | 2 gdb/gdbserver/linux-ia64-low.c | 44 +++ gdb/gdbserver/linux-low.c | 217 ++++++++++------- gdb/gdbserver/linux-low.h | 72 +++++- gdb/gdbserver/linux-m32r-low.c | 37 +++ gdb/gdbserver/linux-m68k-low.c | 50 ++++ gdb/gdbserver/linux-mips-low.c | 193 +++++++++++---- gdb/gdbserver/linux-nios2-low.c | 43 +++ gdb/gdbserver/linux-ppc-low.c | 181 +++++++++++--- gdb/gdbserver/linux-s390-low.c | 195 ++++++++++++--- gdb/gdbserver/linux-sh-low.c | 49 +++- gdb/gdbserver/linux-sparc-low.c | 60 ++++- gdb/gdbserver/linux-tic6x-low.c | 73 +++++- gdb/gdbserver/linux-tile-low.c | 48 +++- gdb/gdbserver/linux-x86-low.c | 467 ++++++++++++++++++++++++------------- gdb/gdbserver/linux-xtensa-low.c | 61 ++++- gdb/gdbserver/lynx-i386-low.c | 2 gdb/gdbserver/lynx-low.c | 3 gdb/gdbserver/lynx-low.h | 4 gdb/gdbserver/lynx-ppc-low.c | 2 gdb/gdbserver/nto-low.c | 6 gdb/gdbserver/nto-low.h | 6 gdb/gdbserver/nto-x86-low.c | 2 gdb/gdbserver/proc-service.c | 10 - gdb/gdbserver/regcache.c | 235 ++++++++++--------- gdb/gdbserver/regcache.h | 33 ++- gdb/gdbserver/remote-utils.c | 9 - gdb/gdbserver/server.c | 25 +- gdb/gdbserver/server.h | 6 gdb/gdbserver/spu-low.c | 10 + gdb/gdbserver/tdesc.c | 66 +++++ gdb/gdbserver/tdesc.h | 64 +++++ gdb/gdbserver/tracepoint.c | 35 ++- gdb/gdbserver/win32-arm-low.c | 11 + gdb/gdbserver/win32-i386-low.c | 8 - gdb/gdbserver/win32-low.c | 10 - gdb/gdbserver/win32-low.h | 6 48 files changed, 1957 insertions(+), 701 deletions(-) create mode 100644 gdb/gdbserver/tdesc.c create mode 100644 gdb/gdbserver/tdesc.h -- Pedro Alves