aboutsummaryrefslogtreecommitdiff
path: root/gdb/config
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1996-05-06 21:27:37 +0000
committerStu Grossman <grossman@cygnus>1996-05-06 21:27:37 +0000
commit8fc2b4170d265de393242b325b4ff76f51c52555 (patch)
treee19352114da659be8fbb01723a2acb00e8384597 /gdb/config
parent1ed0c0e75db12ea291a4bfef18fc6e59243ba52a (diff)
downloadgdb-8fc2b4170d265de393242b325b4ff76f51c52555.zip
gdb-8fc2b4170d265de393242b325b4ff76f51c52555.tar.gz
gdb-8fc2b4170d265de393242b325b4ff76f51c52555.tar.bz2
* fork-child.c (fork_inferior), inferior.h: init_trace_fun now
returns a possibly modified pid. * inftarg.c (ptrace_him): Now returns pid; * m3-nat.c (m3_trace_him): Now returns pid; * infcmd.c (run_command): Minor cleanup. * infrun.c (wait_for_inferior): Add another check for one_stepped near where we read the pc to avoid erroneously setting random_signal for multi-threaded support. * procfs.c: Add support for Solaris LWPs. Remove def of LOSING_POLL. Many cleanups... Several workarounds for Solaris lossage. System call entry and exit are now handled by dynamically registered handlers. * (syscallname): Don't barf when handed an unknown syscall number. * (info_proc_syscalls): Ditto. * sol-thread.c: New file. Implements Solaris thread support. * symfile.c (symbol_file_add): Add call to target_new_objfile to notify target-dependent code about new symbol tables. * (clear_symtab_users): Call target_new_objfile to notify it of the removal of all symbol tables. * target.c (push_target): Make sure that to_close is non-zero before calling it. * target.h (target_new_objfile): Provide default. * config/alpha/nm-osf2.h: Define LOSING_POLL because this version of OSF can't hack using poll with /proc. * config/sparc/nm-sun4sol2.h (target_new_objfile): Define to be sol-thread-new-objfile. * config/sparc/sun4sol2.mh: Add sol-thread.o to NATDEFFILES, and add libthread_db.so.1 to NAT_CLIBS. * config/sparc/tm-sun4sol2.h: Define PIDGET, TIDGET, and target_pid_to_str.
Diffstat (limited to 'gdb/config')
-rw-r--r--gdb/config/sparc/nm-sun4sol2.h8
-rw-r--r--gdb/config/sparc/sun4sol2.mh3
-rw-r--r--gdb/config/sparc/tm-sun4sol2.h7
3 files changed, 17 insertions, 1 deletions
diff --git a/gdb/config/sparc/nm-sun4sol2.h b/gdb/config/sparc/nm-sun4sol2.h
index f3cfe6b..9fb58e0 100644
--- a/gdb/config/sparc/nm-sun4sol2.h
+++ b/gdb/config/sparc/nm-sun4sol2.h
@@ -28,3 +28,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Solaris PSRVADDR support does not seem to include a place for nPC. */
#define PRSVADDR_BROKEN
+
+#ifdef __STDC__
+struct objfile;
+#endif
+
+#define target_new_objfile(OBJFILE) sol_thread_new_objfile (OBJFILE)
+
+void sol_thread_new_objfile PARAMS ((struct objfile *objfile));
diff --git a/gdb/config/sparc/sun4sol2.mh b/gdb/config/sparc/sun4sol2.mh
index b24ce9f..5390b5b 100644
--- a/gdb/config/sparc/sun4sol2.mh
+++ b/gdb/config/sparc/sun4sol2.mh
@@ -5,7 +5,8 @@ XDEPFILES= ser-tcp.o
XM_CLIBS= -lsocket -lnsl
NAT_FILE= nm-sun4sol2.h
-NATDEPFILES= corelow.o core-sol2.o solib.o procfs.o fork-child.o
+NATDEPFILES= corelow.o core-sol2.o solib.o procfs.o fork-child.o sol-thread.o
+NAT_CLIBS= /lib/libthread_db.so.1
# SVR4 comes standard with terminfo, and in some implementations, the
# old termcap descriptions are incomplete. So ensure that we use the
diff --git a/gdb/config/sparc/tm-sun4sol2.h b/gdb/config/sparc/tm-sun4sol2.h
index 77aaf18..49afbab 100644
--- a/gdb/config/sparc/tm-sun4sol2.h
+++ b/gdb/config/sparc/tm-sun4sol2.h
@@ -71,3 +71,10 @@ extern char *sunpro_static_transform_name PARAMS ((char *));
/* Enable handling of shared libraries for a.out executables. */
#define HANDLE_SVR4_EXEC_EMULATORS
+
+/* Macros to extract process id and thread id from a composite pid/tid */
+#define PIDGET(pid) ((pid) & 0xffff)
+#define TIDGET(pid) (((pid) >> 16) & 0xffff)
+
+extern char *solaris_pid_to_str PARAMS ((int pid));
+#define target_pid_to_str(PID) solaris_pid_to_str (PID)