From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6880 invoked by alias); 23 Aug 2011 13:51:43 -0000 Received: (qmail 6870 invoked by uid 22791); 23 Aug 2011 13:51:38 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,TW_OC X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 23 Aug 2011 13:51:17 +0000 Received: (qmail 11104 invoked from network); 23 Aug 2011 13:51:16 -0000 Received: from unknown (HELO ?192.168.0.101?) (lgustavo@127.0.0.2) by mail.codesourcery.com with ESMTPA; 23 Aug 2011 13:51:16 -0000 Message-ID: <4E53B052.8030006@codesourcery.com> Date: Tue, 23 Aug 2011 13:51:00 -0000 From: Luis Machado Reply-To: lgustavo@codesourcery.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: gdb-patches@sourceware.org, Pedro Alves Subject: [PATCH] Move common linux procfs code to common/ Content-Type: multipart/mixed; boundary="------------030702030802090704040104" 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 X-SW-Source: 2011-08/txt/msg00418.txt.bz2 This is a multi-part message in MIME format. --------------030702030802090704040104 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 325 Hi, This patch moves the linux procfs-related function "linux_proc_get_tgid" to the common subdirectory so GDBServer can use it as well, avoiding duplicated code. This is a preparation for the next GDBServer patch i will submit shortly. If there are no objections, i will check it in at the end of the day. Thanks Luis --------------030702030802090704040104 Content-Type: text/x-patch; name="proc-common.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="proc-common.diff" Content-length: 20984 2011-08-23 Luis Machado GDB * linux-nat.h (linux_proc_get_tgid): Remove declaration. * linux-nat.c: Include linux-procfs.h. (linux_proc_get_tgid): Move to ... * common/linux-procfs.c: ... here. New file. * common/linux-procfs.h: New file. * linux-thread-db.c: Include linux-procfs.h. * Makefile.in: Update dependencies. * config/alpha/alpha-linux.mh: Add linux-procfs.o dependency. * config/arm/linux.mh: Likewise. * config/i386/linux.mh: Likewise. * config/i386/linux64.mh: Likewise. * config/ia64/linux.mh: Likewise. * config/m32r/linux.mh: Likewise. * config/m68k/linux.mh: Likewise. * config/mips/linux.mh: Likewise. * config/pa/linux.mh: Likewise. * config/pa/linux.mh: Likewise. * config/powerpc/linux.mh: Likewise. * config/powerpc/ppc64-linux.mh: Likewise. * config/powerpc/spu-linux.mh: Likewise. * config/sparc/linux.mh: Likewise. * config/sparc/linux64.mh: Likewise. * config/xtensa/linux.mh: Likewise. GDBServer * Makefile.in: Update dependencies. * configure.srv: Add linux-procfs.o dependencies. --- /dev/null 2011-08-11 23:19:47.809763003 -0300 +++ gdb/common/linux-procfs.c 2011-08-23 10:49:50.545049000 -0300 @@ -0,0 +1,55 @@ +/* Linux-specific PROCFS manipulation routines. + Copyright (C) 2009, 2010, 2011 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" +#include "gdb_string.h" +#endif + +#include "linux-procfs.h" + +/* Return the TGID of LWPID from /proc/pid/status. Returns -1 if not + found. */ + +int +linux_proc_get_tgid (int lwpid) +{ + FILE *status_file; + char buf[100]; + int tgid = -1; + + snprintf (buf, sizeof (buf), "/proc/%d/status", (int) lwpid); + status_file = fopen (buf, "r"); + if (status_file != NULL) + { + while (fgets (buf, sizeof (buf), status_file)) + { + if (strncmp (buf, "Tgid:", 5) == 0) + { + tgid = strtoul (buf + strlen ("Tgid:"), NULL, 10); + break; + } + } + + fclose (status_file); + } + + return tgid; +} --- .pc/proc-common.diff/gdb/linux-nat.c 2011-08-23 10:38:52.325049000 -0300 +++ gdb/linux-nat.c 2011-08-23 10:49:50.549049000 -0300 @@ -31,6 +31,7 @@ #include #include "linux-nat.h" #include "linux-ptrace.h" +#include "linux-procfs.h" #include "linux-fork.h" #include "gdbthread.h" #include "gdbcmd.h" @@ -1285,34 +1286,6 @@ exit_lwp (struct lwp_info *lp) delete_lwp (lp->ptid); } -/* Return an lwp's tgid, found in `/proc/PID/status'. */ - -int -linux_proc_get_tgid (int lwpid) -{ - FILE *status_file; - char buf[100]; - int tgid = -1; - - snprintf (buf, sizeof (buf), "/proc/%d/status", (int) lwpid); - status_file = fopen (buf, "r"); - if (status_file != NULL) - { - while (fgets (buf, sizeof (buf), status_file)) - { - if (strncmp (buf, "Tgid:", 5) == 0) - { - tgid = strtoul (buf + strlen ("Tgid:"), NULL, 10); - break; - } - } - - fclose (status_file); - } - - return tgid; -} - /* Detect `T (stopped)' in `/proc/PID/status'. Other states including `T (tracing stop)' are reported as false. */ --- .pc/proc-common.diff/gdb/Makefile.in 2011-08-23 10:38:52.337049000 -0300 +++ gdb/Makefile.in 2011-08-23 10:49:50.553049000 -0300 @@ -1959,6 +1959,10 @@ linux-osdata.o: ${srcdir}/common/linux-o $(COMPILE) $(srcdir)/common/linux-osdata.c $(POSTCOMPILE) +linux-procfs.o: $(srcdir)/common/linux-procfs.c + $(COMPILE) $(srcdir)/common/linux-procfs.c + $(POSTCOMPILE) + # # gdb/tui/ dependencies # --- /dev/null 2011-08-11 23:19:47.809763003 -0300 +++ gdb/common/linux-procfs.h 2011-08-23 10:49:50.553049000 -0300 @@ -0,0 +1,29 @@ +/* Linux-specific PROCFS manipulation routines. + Copyright (C) 2011 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_PROCFS_H +#define COMMON_LINUX_PROCFS_H + +#include + +/* Return the TGID of LWPID from /proc/pid/status. Returns -1 if not + found. */ + +extern int linux_proc_get_tgid (int lwpid); + +#endif /* COMMON_LINUX_PROCFS_H */ --- .pc/proc-common.diff/gdb/gdbserver/Makefile.in 2011-08-23 10:38:52.101049000 -0300 +++ gdb/gdbserver/Makefile.in 2011-08-23 10:49:50.553049000 -0300 @@ -354,6 +354,8 @@ linux_ptrace_h = $(srcdir)/../common/lin gdb_thread_db_h = $(srcdir)/../common/gdb_thread_db.h +linux_procfs_h = $(srcdir)/../common/linux-procfs.h + lynx_low_h = $(srcdir)/lynx-low.h $(srcdir)/server.h nto_low_h = $(srcdir)/nto-low.h @@ -405,6 +407,9 @@ gdbreplay.o: gdbreplay.c config.h signals.o: ../common/signals.c $(server_h) $(signals_def) $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER +linux-procfs.o: ../common/linux-procfs.c $(server_h) + $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER + common-utils.o: ../common/common-utils.c $(server_h) $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER @@ -443,7 +448,8 @@ i386-low.o: i386-low.c $(i386_low_h) $(s i387-fp.o: i387-fp.c $(server_h) -linux-low.o: linux-low.c $(linux_low_h) $(linux_ptrace_h) $(server_h) $(linux_osdata_h) +linux-low.o: linux-low.c $(linux_low_h) $(linux_ptrace_h) $(linux_procfs_h) \ + $(server_h) $(linux_osdata_h) $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< @USE_THREAD_DB@ linux-arm-low.o: linux-arm-low.c $(linux_low_h) $(server_h) \ --- .pc/proc-common.diff/gdb/linux-nat.h 2011-08-23 10:38:52.113049000 -0300 +++ gdb/linux-nat.h 2011-08-23 10:49:50.553049000 -0300 @@ -125,10 +125,6 @@ extern void lin_thread_get_thread_signal void linux_proc_pending_signals (int pid, sigset_t *pending, sigset_t *blocked, sigset_t *ignored); -/* Return the TGID of LWPID from /proc/pid/status. Returns -1 if not - found. */ -extern int linux_proc_get_tgid (int lwpid); - /* linux-nat functions for handling fork events. */ extern void linux_enable_event_reporting (ptid_t ptid); --- .pc/proc-common.diff/gdb/linux-thread-db.c 2011-08-23 10:38:52.349049000 -0300 +++ gdb/linux-thread-db.c 2011-08-23 10:49:50.553049000 -0300 @@ -40,6 +40,7 @@ #include "gdbcore.h" #include "observer.h" #include "linux-nat.h" +#include "linux-procfs.h" #include --- .pc/proc-common.diff/gdb/config/alpha/alpha-linux.mh 2011-08-23 10:38:52.229049000 -0300 +++ gdb/config/alpha/alpha-linux.mh 2011-08-23 10:49:50.557049000 -0300 @@ -2,7 +2,7 @@ NAT_FILE= config/nm-linux.h NATDEPFILES= inf-ptrace.o corelow.o alpha-linux-nat.o \ fork-child.o proc-service.o linux-thread-db.o \ - linux-nat.o linux-osdata.o linux-fork.o + linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o NAT_CDEPS = $(srcdir)/proc-service.list # The dynamically loaded libthread_db needs access to symbols in the --- .pc/proc-common.diff/gdb/config/arm/linux.mh 2011-08-23 10:38:52.245049000 -0300 +++ gdb/config/arm/linux.mh 2011-08-23 10:49:50.557049000 -0300 @@ -3,7 +3,7 @@ NAT_FILE= config/nm-linux.h NATDEPFILES= inf-ptrace.o fork-child.o arm-linux-nat.o \ proc-service.o linux-thread-db.o \ - linux-nat.o linux-osdata.o linux-fork.o + linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o NAT_CDEPS = $(srcdir)/proc-service.list LOADLIBES= -ldl $(RDYNAMIC) --- .pc/proc-common.diff/gdb/config/i386/linux.mh 2011-08-23 10:38:52.141049000 -0300 +++ gdb/config/i386/linux.mh 2011-08-23 10:49:50.557049000 -0300 @@ -4,7 +4,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 \ - linux-nat.o linux-osdata.o linux-fork.o + linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o NAT_CDEPS = $(srcdir)/proc-service.list # The dynamically loaded libthread_db needs access to symbols in the --- .pc/proc-common.diff/gdb/config/i386/linux64.mh 2011-08-23 10:38:52.125049000 -0300 +++ gdb/config/i386/linux64.mh 2011-08-23 10:49:50.557049000 -0300 @@ -2,7 +2,8 @@ NATDEPFILES= inf-ptrace.o fork-child.o \ i386-nat.o amd64-nat.o amd64-linux-nat.o \ linux-nat.o linux-osdata.o \ - proc-service.o linux-thread-db.o linux-fork.o + proc-service.o linux-thread-db.o linux-fork.o \ + linux-procfs.o NAT_FILE= config/nm-linux.h NAT_CDEPS = $(srcdir)/proc-service.list --- .pc/proc-common.diff/gdb/config/ia64/linux.mh 2011-08-23 10:38:52.285049000 -0300 +++ gdb/config/ia64/linux.mh 2011-08-23 10:49:50.557049000 -0300 @@ -4,7 +4,8 @@ NAT_FILE= config/nm-linux.h NATDEPFILES= inf-ptrace.o fork-child.o corelow.o \ core-regset.o ia64-linux-nat.o \ proc-service.o linux-thread-db.o \ - linux-nat.o linux-osdata.o linux-fork.o + linux-nat.o linux-osdata.o linux-fork.o \ + linux-procfs.o NAT_CDEPS = $(srcdir)/proc-service.list LOADLIBES = -ldl $(RDYNAMIC) --- .pc/proc-common.diff/gdb/config/m32r/linux.mh 2011-08-23 10:38:52.313049000 -0300 +++ gdb/config/m32r/linux.mh 2011-08-23 10:49:50.561049000 -0300 @@ -3,7 +3,7 @@ NAT_FILE= config/nm-linux.h NATDEPFILES= inf-ptrace.o fork-child.o corelow.o \ m32r-linux-nat.o proc-service.o linux-thread-db.o \ - linux-nat.o linux-osdata.o linux-fork.o + linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o NAT_CDEPS = $(srcdir)/proc-service.list LOADLIBES= -ldl $(RDYNAMIC) --- .pc/proc-common.diff/gdb/config/m68k/linux.mh 2011-08-23 10:38:52.217049000 -0300 +++ gdb/config/m68k/linux.mh 2011-08-23 10:49:50.561049000 -0300 @@ -4,7 +4,7 @@ NAT_FILE= config/nm-linux.h NATDEPFILES= inf-ptrace.o fork-child.o \ corelow.o m68klinux-nat.o \ proc-service.o linux-thread-db.o \ - linux-nat.o linux-osdata.o linux-fork.o + linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o NAT_CDEPS = $(srcdir)/proc-service.list # The dynamically loaded libthread_db needs access to symbols in the --- .pc/proc-common.diff/gdb/config/mips/linux.mh 2011-08-23 10:38:52.297049000 -0300 +++ gdb/config/mips/linux.mh 2011-08-23 10:49:50.561049000 -0300 @@ -2,7 +2,8 @@ NAT_FILE= config/nm-linux.h NATDEPFILES= inf-ptrace.o fork-child.o mips-linux-nat.o \ linux-thread-db.o proc-service.o \ - linux-nat.o linux-osdata.o linux-fork.o + linux-nat.o linux-osdata.o linux-fork.o \ + linux-procfs.o NAT_CDEPS = $(srcdir)/proc-service.list LOADLIBES = -ldl $(RDYNAMIC) --- .pc/proc-common.diff/gdb/config/pa/linux.mh 2011-08-23 10:38:52.257049000 -0300 +++ gdb/config/pa/linux.mh 2011-08-23 10:49:50.561049000 -0300 @@ -2,7 +2,8 @@ NAT_FILE= config/nm-linux.h NATDEPFILES= inf-ptrace.o fork-child.o corelow.o \ hppa-linux-nat.o proc-service.o linux-thread-db.o \ - linux-nat.o linux-osdata.o linux-fork.o + linux-nat.o linux-osdata.o linux-fork.o \ + linux-procfs.o NAT_CDEPS = $(srcdir)/proc-service.list LOADLIBES = -ldl $(RDYNAMIC) --- .pc/proc-common.diff/gdb/config/powerpc/linux.mh 2011-08-23 10:38:52.177049000 -0300 +++ gdb/config/powerpc/linux.mh 2011-08-23 10:49:50.561049000 -0300 @@ -5,7 +5,7 @@ XM_CLIBS= NAT_FILE= config/nm-linux.h NATDEPFILES= inf-ptrace.o fork-child.o \ ppc-linux-nat.o proc-service.o linux-thread-db.o \ - linux-nat.o linux-osdata.o linux-fork.o + linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o NAT_CDEPS = $(srcdir)/proc-service.list LOADLIBES = -ldl $(RDYNAMIC) --- .pc/proc-common.diff/gdb/config/powerpc/ppc64-linux.mh 2011-08-23 10:38:52.153049000 -0300 +++ gdb/config/powerpc/ppc64-linux.mh 2011-08-23 10:49:50.561049000 -0300 @@ -5,7 +5,7 @@ XM_CLIBS= NAT_FILE= config/nm-linux.h NATDEPFILES= inf-ptrace.o fork-child.o \ ppc-linux-nat.o proc-service.o linux-thread-db.o \ - linux-nat.o linux-osdata.o linux-fork.o + linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o NAT_CDEPS = $(srcdir)/proc-service.list # The PowerPC has severe limitations on TOC size, and uses them even --- .pc/proc-common.diff/gdb/config/powerpc/spu-linux.mh 2011-08-23 10:38:52.165049000 -0300 +++ gdb/config/powerpc/spu-linux.mh 2011-08-23 10:49:50.561049000 -0300 @@ -3,5 +3,6 @@ # This implements a 'pseudo-native' GDB running on the # PPU side of the Cell BE and debugging the SPU side. -NATDEPFILES = spu-linux-nat.o fork-child.o inf-ptrace.o +NATDEPFILES = spu-linux-nat.o fork-child.o inf-ptrace.o \ + linux-procfs.o --- .pc/proc-common.diff/gdb/config/sparc/linux.mh 2011-08-23 10:38:52.201049000 -0300 +++ gdb/config/sparc/linux.mh 2011-08-23 10:49:50.565049000 -0300 @@ -3,7 +3,8 @@ NAT_FILE= config/nm-linux.h NATDEPFILES= sparc-nat.o sparc-linux-nat.o \ corelow.o core-regset.o fork-child.o inf-ptrace.o \ proc-service.o linux-thread-db.o \ - linux-nat.o linux-osdata.o linux-fork.o + linux-nat.o linux-osdata.o linux-fork.o \ + linux-procfs.o NAT_CDEPS = $(srcdir)/proc-service.list # The dynamically loaded libthread_db needs access to symbols in the --- .pc/proc-common.diff/gdb/config/sparc/linux64.mh 2011-08-23 10:38:52.189049000 -0300 +++ gdb/config/sparc/linux64.mh 2011-08-23 10:49:50.565049000 -0300 @@ -4,7 +4,8 @@ NATDEPFILES= sparc-nat.o sparc64-nat.o s corelow.o core-regset.o \ fork-child.o inf-ptrace.o \ proc-service.o linux-thread-db.o \ - linux-nat.o linux-osdata.o linux-fork.o + linux-nat.o linux-osdata.o linux-fork.o \ + linux-procfs.o NAT_CDEPS = $(srcdir)/proc-service.list # The dynamically loaded libthread_db needs access to symbols in the --- .pc/proc-common.diff/gdb/config/xtensa/linux.mh 2011-08-23 10:38:52.269049000 -0300 +++ gdb/config/xtensa/linux.mh 2011-08-23 10:49:50.565049000 -0300 @@ -4,7 +4,7 @@ NAT_FILE= config/nm-linux.h NATDEPFILES= inf-ptrace.o fork-child.o xtensa-linux-nat.o \ linux-thread-db.o proc-service.o \ - linux-nat.o linux-osdata.o linux-fork.o + linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o NAT_CDEPS = $(srcdir)/proc-service.list LOADLIBES = -ldl $(RDYNAMIC) --- .pc/proc-common.diff/gdb/gdbserver/configure.srv 2011-08-23 10:38:52.089049000 -0300 +++ gdb/gdbserver/configure.srv 2011-08-23 10:49:50.565049000 -0300 @@ -46,7 +46,7 @@ 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" + srv_tgtobj="linux-low.o linux-osdata.o linux-arm-low.o linux-procfs.o" srv_xmlfiles="arm-with-iwmmxt.xml" srv_xmlfiles="${srv_xmlfiles} arm-with-vfpv2.xml" srv_xmlfiles="${srv_xmlfiles} arm-with-vfpv3.xml" @@ -68,17 +68,17 @@ 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" + srv_tgtobj="linux-low.o linux-osdata.o linux-bfin-low.o linux-procfs.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" + srv_tgtobj="linux-low.o linux-osdata.o linux-crisv32-low.o linux-procfs.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" + srv_tgtobj="linux-low.o linux-osdata.o linux-cris-low.o linux-procfs.o" srv_linux_usrregs=yes srv_linux_thread_db=yes ;; @@ -92,7 +92,7 @@ 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" + srv_tgtobj="linux-low.o linux-osdata.o linux-x86-low.o i386-low.o i387-fp.o linux-procfs.o" srv_linux_usrregs=yes srv_linux_regsets=yes srv_linux_thread_db=yes @@ -123,11 +123,11 @@ 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" + srv_tgtobj="linux-low.o linux-osdata.o linux-ia64-low.o linux-procfs.o" srv_linux_usrregs=yes ;; m32r*-*-linux*) srv_regobj=reg-m32r.o - srv_tgtobj="linux-low.o linux-osdata.o linux-m32r-low.o" + srv_tgtobj="linux-low.o linux-osdata.o linux-m32r-low.o linux-procfs.o" srv_linux_usrregs=yes srv_linux_thread_db=yes ;; @@ -136,7 +136,7 @@ case "${target}" in else srv_regobj=reg-m68k.o fi - srv_tgtobj="linux-low.o linux-osdata.o linux-m68k-low.o" + srv_tgtobj="linux-low.o linux-osdata.o linux-m68k-low.o linux-procfs.o" srv_linux_usrregs=yes srv_linux_regsets=yes srv_linux_thread_db=yes @@ -146,13 +146,13 @@ case "${target}" in else srv_regobj=reg-m68k.o fi - srv_tgtobj="linux-low.o linux-osdata.o linux-m68k-low.o" + srv_tgtobj="linux-low.o linux-osdata.o linux-m68k-low.o linux-procfs.o" srv_linux_usrregs=yes srv_linux_regsets=yes srv_linux_thread_db=yes ;; mips*-*-linux*) srv_regobj="mips-linux.o mips64-linux.o" - srv_tgtobj="linux-low.o linux-osdata.o linux-mips-low.o" + srv_tgtobj="linux-low.o linux-osdata.o linux-mips-low.o linux-procfs.o" srv_xmlfiles="mips-linux.xml" srv_xmlfiles="${srv_xmlfiles} mips-cpu.xml" srv_xmlfiles="${srv_xmlfiles} mips-cp0.xml" @@ -180,7 +180,7 @@ 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" + srv_tgtobj="linux-low.o linux-osdata.o linux-ppc-low.o linux-procfs.o" srv_xmlfiles="rs6000/powerpc-32l.xml" srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-altivec32l.xml" srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-cell32l.xml" @@ -216,7 +216,7 @@ case "${target}" in s390*-*-linux*) srv_regobj="s390-linux32.o" srv_regobj="${srv_regobj} s390-linux64.o" srv_regobj="${srv_regobj} s390x-linux64.o" - srv_tgtobj="linux-low.o linux-osdata.o linux-s390-low.o" + srv_tgtobj="linux-low.o linux-osdata.o linux-s390-low.o linux-procfs.o" srv_xmlfiles="s390-linux32.xml" srv_xmlfiles="${srv_xmlfiles} s390-linux64.xml" srv_xmlfiles="${srv_xmlfiles} s390x-linux64.xml" @@ -230,13 +230,13 @@ 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" + srv_tgtobj="linux-low.o linux-osdata.o linux-sh-low.o linux-procfs.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" + srv_tgtobj="linux-low.o linux-osdata.o linux-sparc-low.o linux-procfs.o" srv_linux_regsets=yes srv_linux_thread_db=yes ;; @@ -252,13 +252,13 @@ 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" + srv_tgtobj="linux-low.o linux-osdata.o linux-tic6x-low.o linux-procfs.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" + srv_tgtobj="linux-low.o linux-osdata.o linux-x86-low.o i386-low.o i387-fp.o linux-procfs.o" srv_xmlfiles="$srv_i386_linux_xmlfiles $srv_amd64_linux_xmlfiles" srv_linux_usrregs=yes # This is for i386 progs. srv_linux_regsets=yes @@ -272,7 +272,7 @@ case "${target}" in ;; xtensa*-*-linux*) srv_regobj=reg-xtensa.o - srv_tgtobj="linux-low.o linux-osdata.o linux-xtensa-low.o" + srv_tgtobj="linux-low.o linux-osdata.o linux-xtensa-low.o linux-procfs.o" srv_linux_regsets=yes ;; *) echo "Error: target not supported by gdbserver." --------------030702030802090704040104--