aboutsummaryrefslogtreecommitdiff
path: root/gdb/sol-thread.c
diff options
context:
space:
mode:
authorFelix Lee <flee@cygnus>1998-10-14 01:15:01 +0000
committerFelix Lee <flee@cygnus>1998-10-14 01:15:01 +0000
commit37f58dce035aab53cedc36c2bd250b3432848265 (patch)
tree22bcf1afbf2a735b601e89167a1bb405877d4c28 /gdb/sol-thread.c
parentad3b8c4a1a37dc966ddbcc687dcf78ec1f80022f (diff)
downloadgdb-37f58dce035aab53cedc36c2bd250b3432848265.zip
gdb-37f58dce035aab53cedc36c2bd250b3432848265.tar.gz
gdb-37f58dce035aab53cedc36c2bd250b3432848265.tar.bz2
* sol-thread.c (ps_pstop, etc): simple test for proc_service.h
version didn't work for sol2.6; pushed it to autoconf. * configure.in (gdb_cv_proc_service_is_old): new test. * acconfig.h (PROC_SERVICE_IS_OLD): new define. * configure, config.in: regenerate.
Diffstat (limited to 'gdb/sol-thread.c')
-rw-r--r--gdb/sol-thread.c44
1 files changed, 25 insertions, 19 deletions
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index 58b0814..ca20bde 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -956,28 +956,34 @@ sol_thread_stop ()
/* These routines implement the lower half of the thread_db interface. Ie: the
ps_* routines. */
-/* Old versions of proc_service.h (1.3 94/10/27) have
- prototypes that look like
- (const struct ps_prochandle *, ...)
- while newer versions use
- (struct ps_prochandle *, ...)
- and other such minor variations.
-
- Someday, we might need to discover this in configure.in,
- but the #ifdef below seems to be sufficient for now. */
-
-#ifdef PS_OBJ_EXEC
-typedef struct ps_prochandle* gdb_ps_prochandle_t;
-typedef void* gdb_ps_read_buf_t;
-typedef const void* gdb_ps_write_buf_t;
-typedef size_t gdb_ps_size_t;
-#else
-typedef const struct ps_prochandle* gdb_ps_prochandle_t;
-typedef char* gdb_ps_read_buf_t;
-typedef char* gdb_ps_write_buf_t;
+/* Various versions of <proc_service.h> have slightly
+ different function prototypes. In particular, we have
+
+ NEWER OLDER
+ struct ps_prochandle * const struct ps_prochandle *
+ void* char*
+ const void* char*
+ int size_t
+
+ Which one you have depends on solaris version and what
+ patches you've applied. On the theory that there are
+ only two major variants, we have configure check the
+ prototype of ps_pdwrite (), and use that info to make
+ appropriate typedefs here. */
+
+#ifdef PROC_SERVICE_IS_OLD
+typedef const struct ps_prochandle * gdb_ps_prochandle_t;
+typedef char * gdb_ps_read_buf_t;
+typedef char * gdb_ps_write_buf_t;
typedef int gdb_ps_size_t;
+#else
+typedef struct ps_prochandle * gdb_ps_prochandle_t;
+typedef void * gdb_ps_read_buf_t;
+typedef const void * gdb_ps_write_buf_t;
+typedef size_t gdb_ps_size_t;
#endif
+
/* The next four routines are called by thread_db to tell us to stop and stop
a particular process or lwp. Since GDB ensures that these are all stopped
by the time we call anything in thread_db, these routines need to do