This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Move common linux procfs code to common/
- From: Luis Machado <lgustavo at codesourcery dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 24 Aug 2011 09:23:01 -0300
- Subject: Re: [PATCH] Move common linux procfs code to common/
- References: <4E53B052.8030006@codesourcery.com> <201108231858.31512.pedro@codesourcery.com>
- Reply-to: lgustavo at codesourcery dot com
On 08/23/2011 02:58 PM, Pedro Alves wrote:
On Tuesday 23 August 2011 14:51:14, Luis Machado wrote:
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.
Saying "pre-approved by Foo offlist" is more usual in such cases.
FAOD, this is okay.
On Tuesday 23 August 2011 14:51:14, Luis Machado wrote:
-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@
Ah, this should be part of the other patch, not this one. linux-low.c was
not changed in this patch. Please move this hunk to the other patch
before committing.
Thanks, i've checked the following patch in.
2011-08-24 Luis Machado <lgustavo@codesourcery.com>
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
* configure.srv: Add linux-procfs.o dependencies.
--- /dev/null 2011-08-11 23:19:47.809763003 -0300
+++ gdb/common/linux-procfs.c 2011-08-24 09:19:22.345049000 -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 <http://www.gnu.org/licenses/>. */
+
+#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-24 09:19:18.553049000 -0300
+++ gdb/linux-nat.c 2011-08-24 09:19:22.369049000 -0300
@@ -31,6 +31,7 @@
#include <sys/ptrace.h>
#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-24 09:19:18.569049000 -0300
+++ gdb/Makefile.in 2011-08-24 09:19:22.389049000 -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-24 09:19:22.393049000 -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 <http://www.gnu.org/licenses/>. */
+
+#ifndef COMMON_LINUX_PROCFS_H
+#define COMMON_LINUX_PROCFS_H
+
+#include <unistd.h>
+
+/* 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/linux-nat.h 2011-08-24 09:19:17.457049000 -0300
+++ gdb/linux-nat.h 2011-08-24 09:19:22.405049000 -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-24 09:19:18.625049000 -0300
+++ gdb/linux-thread-db.c 2011-08-24 09:19:22.433049000 -0300
@@ -40,6 +40,7 @@
#include "gdbcore.h"
#include "observer.h"
#include "linux-nat.h"
+#include "linux-procfs.h"
#include <signal.h>
--- .pc/proc-common.diff/gdb/config/alpha/alpha-linux.mh 2011-08-24 09:19:18.049049000 -0300
+++ gdb/config/alpha/alpha-linux.mh 2011-08-24 09:19:22.441049000 -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-24 09:19:18.165049000 -0300
+++ gdb/config/arm/linux.mh 2011-08-24 09:19:22.445049000 -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-24 09:19:17.645049000 -0300
+++ gdb/config/i386/linux.mh 2011-08-24 09:19:22.453049000 -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-24 09:19:17.473049000 -0300
+++ gdb/config/i386/linux64.mh 2011-08-24 09:19:22.461049000 -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-24 09:19:18.477049000 -0300
+++ gdb/config/ia64/linux.mh 2011-08-24 09:19:22.469049000 -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-24 09:19:18.541049000 -0300
+++ gdb/config/m32r/linux.mh 2011-08-24 09:19:22.497049000 -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-24 09:19:17.921049000 -0300
+++ gdb/config/m68k/linux.mh 2011-08-24 09:19:22.533049000 -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-24 09:19:18.509049000 -0300
+++ gdb/config/mips/linux.mh 2011-08-24 09:19:22.541049000 -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-24 09:19:18.313049000 -0300
+++ gdb/config/pa/linux.mh 2011-08-24 09:19:22.549049000 -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-24 09:19:17.865049000 -0300
+++ gdb/config/powerpc/linux.mh 2011-08-24 09:19:22.557049000 -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-24 09:19:17.673049000 -0300
+++ gdb/config/powerpc/ppc64-linux.mh 2011-08-24 09:19:22.565049000 -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-24 09:19:17.725049000 -0300
+++ gdb/config/powerpc/spu-linux.mh 2011-08-24 09:19:22.573049000 -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-24 09:19:17.905049000 -0300
+++ gdb/config/sparc/linux.mh 2011-08-24 09:19:22.581049000 -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-24 09:19:17.893049000 -0300
+++ gdb/config/sparc/linux64.mh 2011-08-24 09:19:22.589049000 -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-24 09:19:18.465049000 -0300
+++ gdb/config/xtensa/linux.mh 2011-08-24 09:19:22.617049000 -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-24 09:19:17.393049000 -0300
+++ gdb/gdbserver/configure.srv 2011-08-24 09:19:22.625049000 -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."