From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@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 22:31:00 -0000 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00467.txt.bz2 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.