From patchwork Wed Mar 19 22:30:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 178 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx22.g.dreamhost.com (caibbdcaabij.dreamhost.com [208.113.200.189]) by wilcox.dreamhost.com (Postfix) with ESMTP id D447436010F for ; Wed, 19 Mar 2014 15:31:39 -0700 (PDT) Received: by homiemail-mx22.g.dreamhost.com (Postfix, from userid 14314964) id 9196D4F86E25; Wed, 19 Mar 2014 15:31:39 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx22.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx22.g.dreamhost.com (Postfix) with ESMTPS id 732CC4F6E610 for ; Wed, 19 Mar 2014 15:31:39 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:from:to:cc:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=hDPSCtt+A5F2vnwMMfKqj0aBr3zvlPhuEncZJLYdLQo tSpwv4LrLtnx5nXQbP2GK2q5Yf/gdG3PQF4OPs4fbuKPWcv2XWqwwCx3F3G5C7tF Yu7e5jdxDeFIZZ7uYeWNdxh/4XkSB8U3BPcBUXV62DLcYtmszq51Tqfg12UOrYGI = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:from:to:cc:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; s=default; bh=LqUOZwV8HlqxMYtNnVaoJwvPirI=; b=Z4+AIXVOwPKDvWdvl PBWPFRMOYzrtfjvx3U3lucsRDW6WuohHzJ487lbxXEyuNYJ1cfggFjwGd+AuXKB0 QiMBNec9eF999DZomZcjELnkPqXWbZEHcg8OCCSDODLgfE4mFGt9VpkXVOIc+WeX kzYwoJZ5lXYptRyyPDfl2Yd3ps= Received: (qmail 19554 invoked by alias); 19 Mar 2014 22:31:21 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 19374 invoked by uid 89); 19 Mar 2014 22:31:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Mar 2014 22:31:00 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2JMUs7j015895 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 19 Mar 2014 18:30:54 -0400 Received: from host1.jankratochvil.net (ovpn-116-22.ams2.redhat.com [10.36.116.22]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s2JMUq3Y019550; Wed, 19 Mar 2014 18:30:52 -0400 Subject: [PATCH v5 3/8] Create empty common/linux-maps.[ch] and common/target-utils.[ch] From: Jan Kratochvil To: gdb-patches@sourceware.org Cc: Aleksandar Ristovski Date: Wed, 19 Mar 2014 23:30:51 +0100 Message-ID: <20140319223051.14668.31544.stgit@host1.jankratochvil.net> In-Reply-To: <20140319223004.14668.20989.stgit@host1.jankratochvil.net> References: <20140319223004.14668.20989.stgit@host1.jankratochvil.net> User-Agent: StGit/0.17-dirty MIME-Version: 1.0 X-IsSubscribed: yes X-DH-Original-To: gdb@patchwork.siddhesh.in Hi, prepare new files for later move. Jan gdb/ 2014-02-26 Aleksandar Ristovski . */ + +#ifdef GDBSERVER +#include "server.h" +#else +#include "defs.h" +#endif + +#include "linux-maps.h" diff --git a/gdb/common/linux-maps.h b/gdb/common/linux-maps.h new file mode 100644 index 0000000..ebf6f37 --- /dev/null +++ b/gdb/common/linux-maps.h @@ -0,0 +1,22 @@ +/* Linux-specific memory maps manipulation routines. + Copyright (C) 2014 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef COMMON_LINUX_MAPS_H +#define COMMON_LINUX_MAPS_H + +#endif /* COMMON_LINUX_MAPS_H */ diff --git a/gdb/common/target-utils.c b/gdb/common/target-utils.c new file mode 100644 index 0000000..308996d --- /dev/null +++ b/gdb/common/target-utils.c @@ -0,0 +1,26 @@ +/* Utility target functions for GDB, and GDBserver. + + Copyright (C) 2014 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef GDBSERVER +#include "server.h" +#else +#include "defs.h" +#endif + +#include "target-utils.h" diff --git a/gdb/common/target-utils.h b/gdb/common/target-utils.h new file mode 100644 index 0000000..db33ec8 --- /dev/null +++ b/gdb/common/target-utils.h @@ -0,0 +1,23 @@ +/* Utility target functions for GDB, and GDBserver. + + Copyright (C) 2014 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef COMMON_TARGET_UTILS_H +#define COMMON_TARGET_UTILS_H + +#endif /* COMMON_TARGET_UTILS_H */ diff --git a/gdb/config/i386/linux.mh b/gdb/config/i386/linux.mh index 10a2584..55dd3df 100644 --- a/gdb/config/i386/linux.mh +++ b/gdb/config/i386/linux.mh @@ -3,7 +3,7 @@ NAT_FILE= config/nm-linux.h NATDEPFILES= inf-ptrace.o fork-child.o \ i386-nat.o i386-linux-nat.o \ - proc-service.o linux-thread-db.o \ + proc-service.o linux-thread-db.o linux-maps.o \ linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o linux-ptrace.o \ linux-btrace.o linux-waitpid.o NAT_CDEPS = $(srcdir)/proc-service.list diff --git a/gdb/config/i386/linux64.mh b/gdb/config/i386/linux64.mh index 686c363..6b2943d 100644 --- a/gdb/config/i386/linux64.mh +++ b/gdb/config/i386/linux64.mh @@ -1,7 +1,7 @@ # Host: GNU/Linux x86-64 NATDEPFILES= inf-ptrace.o fork-child.o \ i386-nat.o amd64-nat.o amd64-linux-nat.o \ - linux-nat.o linux-osdata.o \ + linux-maps.o linux-nat.o linux-osdata.o \ proc-service.o linux-thread-db.o linux-fork.o \ linux-procfs.o linux-ptrace.o linux-btrace.o \ linux-waitpid.o diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index 663deb6..7d267f7 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in @@ -177,7 +177,8 @@ OBS = agent.o ax.o inferiors.o regcache.o remote-utils.o server.o signals.o \ target.o waitstatus.o utils.o debug.o version.o vec.o gdb_vecs.o \ mem-break.o hostio.o event-loop.o tracepoint.o xml-utils.o \ common-utils.o ptid.o buffer.o format.o filestuff.o dll.o notif.o \ - tdesc.o print-utils.o rsp-low.o $(XML_BUILTIN) $(DEPFILES) $(LIBOBJS) + tdesc.o print-utils.o rsp-low.o target-utils.o \ + $(XML_BUILTIN) $(DEPFILES) $(LIBOBJS) GDBREPLAY_OBS = gdbreplay.o version.o GDBSERVER_LIBS = @GDBSERVER_LIBS@ XM_CLIBS = @LIBS@ @@ -486,6 +487,9 @@ ax.o: ax.c signals.o: ../common/signals.c $(COMPILE) $< $(POSTCOMPILE) +linux-maps.o: ../common/linux-maps.c + $(COMPILE) $< + $(POSTCOMPILE) print-utils.o: ../common/print-utils.c $(COMPILE) $< $(POSTCOMPILE) @@ -498,6 +502,9 @@ linux-procfs.o: ../common/linux-procfs.c linux-ptrace.o: ../common/linux-ptrace.c $(COMPILE) $< $(POSTCOMPILE) +target-utils.o: ../common/target-utils.c + $(COMPILE) $< + $(POSTCOMPILE) common-utils.o: ../common/common-utils.c $(COMPILE) $< $(POSTCOMPILE) diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv index f4e6154..e4f7aa6 100644 --- a/gdb/gdbserver/configure.srv +++ b/gdb/gdbserver/configure.srv @@ -42,7 +42,7 @@ srv_amd64_linux_xmlfiles="i386/amd64-linux.xml i386/amd64-avx-linux.xml i386/64b # Linux object files. This is so we don't have to repeat # these files over and over again. -srv_linux_obj="linux-low.o linux-osdata.o linux-procfs.o linux-ptrace.o linux-waitpid.o" +srv_linux_obj="linux-low.o linux-osdata.o linux-procfs.o linux-maps.o linux-ptrace.o linux-waitpid.o" # Input is taken from the "${target}" variable.