From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2800 invoked by alias); 5 Apr 2013 13:03:12 -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 2775 invoked by uid 89); 5 Apr 2013 13:03:12 -0000 X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,MISSING_HEADERS,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,TW_CN,TW_EG autolearn=no version=3.3.1 Received: from na3sys009aob106.obsmtp.com (HELO na3sys009aog106.obsmtp.com) (74.125.149.76) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 05 Apr 2013 13:03:07 +0000 Received: from mx20.qnx.com ([72.1.200.103]) (using TLSv1) by na3sys009aob106.postini.com ([74.125.148.12]) with SMTP ID DSNKUV7LiWxEN983YXplkbqhR6kozRnAVxoW@postini.com; Fri, 05 Apr 2013 06:03:07 PDT Received: by mx20.qnx.com (Postfix, from userid 500) id C805E20E53; Fri, 5 Apr 2013 09:03:02 -0400 (EDT) Received: from exhts.ott.qnx.com (exch1 [10.222.2.137]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx20.qnx.com (Postfix) with ESMTPS id CC35A20A8B; Fri, 5 Apr 2013 09:03:01 -0400 (EDT) Received: from [10.222.96.215] (10.222.2.5) by EXCH1.ott.qnx.com (10.222.2.137) with Microsoft SMTP Server id 14.2.318.4; Fri, 5 Apr 2013 09:03:01 -0400 Message-ID: <515ECAD9.60607@qnx.com> Date: Fri, 05 Apr 2013 13:25:00 -0000 From: Aleksandar Ristovski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 Newsgroups: gmane.comp.gdb.patches CC: Jan Kratochvil , "gdb-patches@sourceware.org" Subject: Re: [patch 3/6] Create empty common/linux-maps.[ch] References: <51278984.3070208@qnx.com> <20130310210810.GD21130@host2.jankratochvil.net> <514C56C7.6010600@qnx.com> In-Reply-To: <514C56C7.6010600@qnx.com> Content-Type: multipart/mixed; boundary="------------060703000108000001020606" X-Virus-Found: No X-SW-Source: 2013-04/txt/msg00119.txt.bz2 --------------060703000108000001020606 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 581 Rebased to master e96bd93d436e464a532a7e1161e1d201c9fc50c7 On 13-03-22 09:04 AM, Aleksandar Ristovski wrote: > As per the subject... > > > * Makefile.in (HFILES_NO_SRCDIR); Add common/linux-maps.h. > (linux-maps.o): New. > * common/linux-maps.c: New file. > * common/linux-maps.h: New file. > * config/i386/linux.mh (NATDEPFILES): Add linux-maps.o. > * config/i386/linux64.m (NATDEPFILES): Add linux-maps.o. > * gdbserver/Makefile.in (linux-maps.o): New. > * gdbserver/configure.srv (srv_tgtobj): Add linux-maps.o. > > --- > Aleksandar > --------------060703000108000001020606 Content-Type: text/x-patch; name="0003-Create-empty-common-linux-maps.-ch.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0003-Create-empty-common-linux-maps.-ch.patch" Content-length: 14733 >From 8e669398ba8fc885551cbf4920f03b99cf96a16c Mon Sep 17 00:00:00 2001 From: Aleksandar Ristovski Date: Wed, 27 Mar 2013 09:40:24 -0400 Subject: [PATCH 3/8] Create empty common/linux-maps.[ch] * Makefile.in (HFILES_NO_SRCDIR); Add common/linux-maps.h. (linux-maps.o): New. * common/linux-maps.c: New file. * common/linux-maps.h: New file. * config/i386/linux.mh (NATDEPFILES): Add linux-maps.o. * config/i386/linux64.m (NATDEPFILES): Add linux-maps.o. * gdbserver/Makefile.in (linux-maps.o): New. * gdbserver/configure.srv (srv_tgtobj): Add linux-maps.o. --- gdb/Makefile.in | 6 +++- gdb/common/linux-maps.c | 25 ++++++++++++++ gdb/common/linux-maps.h | 22 ++++++++++++ gdb/config/i386/linux.mh | 2 +- gdb/config/i386/linux64.mh | 2 +- gdb/gdbserver/Makefile.in | 3 ++ gdb/gdbserver/configure.srv | 79 ++++++++++++++++++++++++++++++++----------- 7 files changed, 117 insertions(+), 22 deletions(-) create mode 100644 gdb/common/linux-maps.c create mode 100644 gdb/common/linux-maps.h diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 47b4338..8b1bca6 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -772,7 +772,7 @@ LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c HFILES_NO_SRCDIR = \ common/gdb_signals.h common/gdb_thread_db.h common/gdb_vecs.h \ -common/i386-xstate.h common/linux-ptrace.h \ +common/i386-xstate.h common/linux-maps.h common/linux-ptrace.h \ proc-utils.h aarch64-tdep.h arm-tdep.h ax-gdb.h ppcfbsd-tdep.h \ ppcnbsd-tdep.h cli-out.h gdb_expat.h breakpoint.h infcall.h obsd-tdep.h \ exec.h m32r-tdep.h osabi.h gdbcore.h solib-som.h amd64bsd-nat.h \ @@ -1948,6 +1948,10 @@ format.o: ${srcdir}/common/format.c $(COMPILE) $(srcdir)/common/format.c $(POSTCOMPILE) +linux-maps.o: ${srcdir}/common/linux-maps.c + $(COMPILE) $(srcdir)/common/linux-maps.c + $(POSTCOMPILE) + linux-osdata.o: ${srcdir}/common/linux-osdata.c $(COMPILE) $(srcdir)/common/linux-osdata.c $(POSTCOMPILE) diff --git a/gdb/common/linux-maps.c b/gdb/common/linux-maps.c new file mode 100644 index 0000000..efb0875 --- /dev/null +++ b/gdb/common/linux-maps.c @@ -0,0 +1,25 @@ +/* Linux-specific memory maps manipulation routines. + Copyright (C) 2013 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 "linux-maps.h" diff --git a/gdb/common/linux-maps.h b/gdb/common/linux-maps.h new file mode 100644 index 0000000..da426e5 --- /dev/null +++ b/gdb/common/linux-maps.h @@ -0,0 +1,22 @@ +/* Linux-specific memory maps manipulation routines. + Copyright (C) 2013 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/config/i386/linux.mh b/gdb/config/i386/linux.mh index 7c64e83..e34f1dc 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 NAT_CDEPS = $(srcdir)/proc-service.list diff --git a/gdb/config/i386/linux64.mh b/gdb/config/i386/linux64.mh index 8d782c1..78ecf30 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 NAT_FILE= config/nm-linux.h diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index 08db2cc..37d11a2 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in @@ -512,6 +512,9 @@ ax.o: ax.c signals.o: ../common/signals.c $(COMPILE) $< $(POSTCOMPILE) +linux-maps.o: ../common/linux-maps.c + $(COMPILE) $< + $(POSTCOMPILE) linux-procfs.o: ../common/linux-procfs.c $(COMPILE) $< $(POSTCOMPILE) diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv index 271a0fe..4de099b 100644 --- a/gdb/gdbserver/configure.srv +++ b/gdb/gdbserver/configure.srv @@ -46,6 +46,7 @@ case "${target}" in srv_regobj="aarch64.o aarch64-without-fpu.o" srv_tgtobj="linux-aarch64-low.o" srv_tgtobj="${srv_tgtobj} linux-low.o" + srv_tgtobj="${srv_tgtobj} linux-maps.o" srv_tgtobj="${srv_tgtobj} linux-osdata.o" srv_tgtobj="${srv_tgtobj} linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o" @@ -61,7 +62,9 @@ case "${target}" in srv_regobj="${srv_regobj} arm-with-vfpv2.o" srv_regobj="${srv_regobj} arm-with-vfpv3.o" srv_regobj="${srv_regobj} arm-with-neon.o" - srv_tgtobj="linux-low.o linux-osdata.o linux-arm-low.o linux-procfs.o" + srv_tgtobj="linux-low.o linux-maps.o linux-osdata.o" + srv_tgtobj="${srv_tgtobj} linux-arm-low.o" + srv_tgtobj="${srv_tgtobj} linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o" srv_xmlfiles="arm-with-iwmmxt.xml" srv_xmlfiles="${srv_xmlfiles} arm-with-vfpv2.xml" @@ -84,19 +87,25 @@ case "${target}" in srv_mingwce=yes ;; bfin-*-*linux*) srv_regobj=reg-bfin.o - srv_tgtobj="linux-low.o linux-osdata.o linux-bfin-low.o linux-procfs.o" + srv_tgtobj="linux-low.o linux-maps.o linux-osdata.o" + srv_tgtobj="${srv_tgtobj} linux-bfin-low.o" + srv_tgtobj="${srv_tgtobj} linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o" srv_linux_usrregs=yes srv_linux_thread_db=yes ;; crisv32-*-linux*) srv_regobj=reg-crisv32.o - srv_tgtobj="linux-low.o linux-osdata.o linux-crisv32-low.o linux-procfs.o" + srv_tgtobj="linux-low.o linux-maps.o linux-osdata.o" + srv_tgtobj="${srv_tgtobj} linux-crisv32-low.o" + srv_tgtobj="${srv_tgtobj} linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o" srv_linux_regsets=yes srv_linux_thread_db=yes ;; cris-*-linux*) srv_regobj=reg-cris.o - srv_tgtobj="linux-low.o linux-osdata.o linux-cris-low.o linux-procfs.o" + srv_tgtobj="linux-low.o linux-maps.o linux-osdata.o" + srv_tgtobj="${srv_tgtobj} linux-cris-low.o" + srv_tgtobj="${srv_tgtobj} linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o" srv_linux_usrregs=yes srv_linux_thread_db=yes @@ -111,7 +120,10 @@ case "${target}" in srv_regobj="$srv_regobj $srv_amd64_linux_regobj" srv_xmlfiles="${srv_xmlfiles} $srv_amd64_linux_xmlfiles" fi - srv_tgtobj="linux-low.o linux-osdata.o linux-x86-low.o i386-low.o i387-fp.o linux-procfs.o" + srv_tgtobj="linux-low.o linux-maps.o linux-osdata.o" + srv_tgtobj="${srv_tgtobj} linux-x86-low.o" + srv_tgtobj="${srv_tgtobj} i386-low.o i387-fp.o" + srv_tgtobj="${srv_tgtobj} linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o linux-btrace.o" srv_linux_usrregs=yes srv_linux_regsets=yes @@ -147,12 +159,16 @@ case "${target}" in srv_qnx="yes" ;; ia64-*-linux*) srv_regobj=reg-ia64.o - srv_tgtobj="linux-low.o linux-osdata.o linux-ia64-low.o linux-procfs.o" + srv_tgtobj="linux-low.o linux-maps.o linux-osdata.o" + srv_tgtobj="${srv_tgtobj} linux-ia64-low.o" + srv_tgtobj="${srv_tgtobj} linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o" srv_linux_usrregs=yes ;; m32r*-*-linux*) srv_regobj=reg-m32r.o - srv_tgtobj="linux-low.o linux-osdata.o linux-m32r-low.o linux-procfs.o" + srv_tgtobj="linux-low.o linux-maps.o linux-osdata.o" + srv_tgtobj="${srv_tgtobj} linux-m32r-low.o" + srv_tgtobj="${srv_tgtobj} linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o" srv_linux_usrregs=yes srv_linux_thread_db=yes @@ -162,7 +178,9 @@ case "${target}" in else srv_regobj=reg-m68k.o fi - srv_tgtobj="linux-low.o linux-osdata.o linux-m68k-low.o linux-procfs.o" + srv_tgtobj="linux-low.o linux-maps.o linux-osdata.o" + srv_tgtobj="${srv_tgtobj} linux-m68k-low.o" + srv_tgtobj="${srv_tgtobj} linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o" srv_linux_usrregs=yes srv_linux_regsets=yes @@ -173,7 +191,9 @@ case "${target}" in else srv_regobj=reg-m68k.o fi - srv_tgtobj="linux-low.o linux-osdata.o linux-m68k-low.o linux-procfs.o" + srv_tgtobj="linux-low.o linux-maps.o linux-osdata.o" + srv_tgtobj="${srv_tgtobj} linux-m68k-low.o" + srv_tgtobj="${srv_tgtobj} linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o" srv_linux_usrregs=yes srv_linux_regsets=yes @@ -183,7 +203,10 @@ case "${target}" in srv_regobj="${srv_regobj} mips-dsp-linux.o" srv_regobj="${srv_regobj} mips64-linux.o" srv_regobj="${srv_regobj} mips64-dsp-linux.o" - srv_tgtobj="linux-low.o linux-osdata.o linux-mips-low.o linux-procfs.o" + srv_tgtobj="linux-low.o linux-maps.o" + srv_tgtobj="${srv_tgtobj} linux-osdata.o" + srv_tgtobj="${srv_tgtobj} linux-mips-low.o" + srv_tgtobj="${srv_tgtobj} linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o" srv_xmlfiles="mips-linux.xml" srv_xmlfiles="${srv_xmlfiles} mips-dsp-linux.xml" @@ -216,7 +239,9 @@ case "${target}" in srv_regobj="${srv_regobj} powerpc-isa205-64l.o" srv_regobj="${srv_regobj} powerpc-isa205-altivec64l.o" srv_regobj="${srv_regobj} powerpc-isa205-vsx64l.o" - srv_tgtobj="linux-low.o linux-osdata.o linux-ppc-low.o linux-procfs.o" + srv_tgtobj="linux-low.o linux-maps.o linux-osdata.o" + srv_tgtobj="${srv_tgtobj} linux-ppc-low.o" + srv_tgtobj="${srv_tgtobj} linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o" srv_xmlfiles="rs6000/powerpc-32l.xml" srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-altivec32l.xml" @@ -262,7 +287,9 @@ case "${target}" in srv_regobj="${srv_regobj} s390x-linux64.o" srv_regobj="${srv_regobj} s390x-linux64v1.o" srv_regobj="${srv_regobj} s390x-linux64v2.o" - srv_tgtobj="linux-low.o linux-osdata.o linux-s390-low.o linux-procfs.o" + srv_tgtobj="linux-low.o linux-maps.o linux-osdata.o" + srv_tgtobj="${srv_tgtobj} linux-s390-low.o" + srv_tgtobj="${srv_tgtobj} linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o" srv_xmlfiles="s390-linux32.xml" srv_xmlfiles="${srv_xmlfiles} s390-linux32v1.xml" @@ -283,14 +310,18 @@ case "${target}" in srv_linux_thread_db=yes ;; sh*-*-linux*) srv_regobj=reg-sh.o - srv_tgtobj="linux-low.o linux-osdata.o linux-sh-low.o linux-procfs.o" + srv_tgtobj="linux-low.o linux-maps.o linux-osdata.o" + srv_tgtobj="${srv_tgtobj} linux-sh-low.o" + srv_tgtobj="${srv_tgtobj} linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o" srv_linux_usrregs=yes srv_linux_regsets=yes srv_linux_thread_db=yes ;; sparc*-*-linux*) srv_regobj=reg-sparc64.o - srv_tgtobj="linux-low.o linux-osdata.o linux-sparc-low.o linux-procfs.o" + srv_tgtobj="linux-low.o linux-maps.o linux-osdata.o" + srv_tgtobj="${srv_tgtobj} linux-sparc-low.o" + srv_tgtobj="${srv_tgtobj} linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o" srv_linux_regsets=yes srv_linux_thread_db=yes @@ -307,15 +338,20 @@ case "${target}" in srv_xmlfiles="${srv_xmlfiles} tic6x-core.xml" srv_xmlfiles="${srv_xmlfiles} tic6x-gp.xml" srv_xmlfiles="${srv_xmlfiles} tic6x-c6xp.xml" - srv_tgtobj="linux-low.o linux-osdata.o linux-tic6x-low.o linux-procfs.o" + srv_tgtobj="linux-low.o linux-maps.o linux-osdata.o" + srv_tgtobj="${srv_tgtobj} linux-tic6x-low.o" + srv_tgtobj="${srv_tgtobj} linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o" srv_linux_regsets=yes srv_linux_usrregs=yes srv_linux_thread_db=yes ;; x86_64-*-linux*) srv_regobj="$srv_amd64_linux_regobj $srv_i386_linux_regobj" - srv_tgtobj="linux-low.o linux-osdata.o linux-x86-low.o i386-low.o i387-fp.o linux-procfs.o" - srv_tgtobj="${srv_tgtobj} linux-ptrace.o linux-btrace.o" + srv_tgtobj="linux-low.o linux-maps.o linux-osdata.o" + srv_tgtobj="${srv_tgtobj} linux-x86-low.o i386-low.o" + srv_tgtobj="${srv_tgtobj} i387-fp.o linux-procfs.o" + srv_tgtobj="${srv_tgtobj} linux-ptrace.o" + srv_tgtobj="${srv_tgtobj} linux-btrace.o" srv_xmlfiles="$srv_i386_linux_xmlfiles $srv_amd64_linux_xmlfiles" srv_linux_usrregs=yes # This is for i386 progs. srv_linux_regsets=yes @@ -334,13 +370,18 @@ case "${target}" in ;; xtensa*-*-linux*) srv_regobj=reg-xtensa.o - srv_tgtobj="linux-low.o linux-osdata.o linux-xtensa-low.o linux-procfs.o" + srv_tgtobj="linux-low.o linux-maps.o linux-osdata.o" + srv_tgtobj="${srv_tgtobj} linux-xtensa-low.o" + srv_tgtobj="${srv_tgtobj} linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o" srv_linux_regsets=yes ;; tilegx-*-linux*) srv_regobj=reg-tilegx.o srv_regobj="${srv_regobj} reg-tilegx32.o" - srv_tgtobj="linux-low.o linux-tile-low.o linux-osdata.o linux-procfs.o" + srv_tgtobj="linux-low.o linux-maps.o" + srv_tgtobj="${srv_tgtobj} linux-tile-low.o" + srv_tgtobj="${srv_tgtobj} linux-osdata.o" + srv_tgtobj="${srv_tgtobj} linux-procfs.o" srv_tgtobj="${srv_tgtobj} linux-ptrace.o" srv_linux_regsets=yes srv_linux_thread_db=yes -- 1.7.10.4 --------------060703000108000001020606--