aboutsummaryrefslogtreecommitdiff
path: root/gdb/sol-thread.c
diff options
context:
space:
mode:
authorFernando Nasser <fnasser@redhat.com>1999-01-19 20:45:31 +0000
committerFernando Nasser <fnasser@redhat.com>1999-01-19 20:45:31 +0000
commitba4d67c2bff4b9d754ace1c0854c0bcfd04d000e (patch)
treea5273daf3a0bc854ef138eef264389cd455425e8 /gdb/sol-thread.c
parentd5abf0a4e6495a15031ed3bf049fa26e2b387be1 (diff)
downloadgdb-ba4d67c2bff4b9d754ace1c0854c0bcfd04d000e.zip
gdb-ba4d67c2bff4b9d754ace1c0854c0bcfd04d000e.tar.gz
gdb-ba4d67c2bff4b9d754ace1c0854c0bcfd04d000e.tar.bz2
1999-01-19 Fernando Nasser <fnasser@totem.to.cygnus.com>
* sol-thread.c abug-rom.c cpu32bug-rom.c dbug-rom.c m32r-rom.c mac-nat.c mon960-rom.c op50-rom.c ppc-bdm.c remote-adapt.c remote-array.c remote-bug.c remote-e7000.c remote-eb.c remote-es.c remote-est.c remote-hms.c remote-mm.c remote-nindy.c remote-nrom.c remote-os9k.c remote-rdp.c remote-sds.c remote-sim.c remote-st.c remote-udi.c rom68k-rom.c sh3-rom.c sparcl-tdep.c sparclet-rom.c v850ice.c win32-nat.c: cosmetic changes to conform to coding standards.
Diffstat (limited to 'gdb/sol-thread.c')
-rw-r--r--gdb/sol-thread.c42
1 files changed, 27 insertions, 15 deletions
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index e0568c2..3fe6268 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -64,6 +64,9 @@ extern struct target_ops sol_core_ops; /* Forward declaration */
/* place to store core_ops before we overwrite it */
static struct target_ops orig_core_ops;
+struct target_ops sol_thread_ops;
+struct target_ops sol_core_ops;
+
extern int procfs_suppress_run;
extern struct target_ops procfs_ops; /* target vector for procfs.c */
extern struct target_ops core_ops; /* target vector for corelow.c */
@@ -113,6 +116,9 @@ static int lwp_to_thread PARAMS ((int lwp));
static int sol_thread_alive PARAMS ((int pid));
static void sol_core_close PARAMS ((int quitting));
+static void init_sol_thread_ops PARAMS ((void));
+static void init_sol_core_ops PARAMS ((void));
+
#define THREAD_FLAG 0x80000000
#define is_thread(ARG) (((ARG) & THREAD_FLAG) != 0)
#define is_lwp(ARG) (((ARG) & THREAD_FLAG) == 0)
@@ -1506,21 +1512,9 @@ ignore (addr, contents)
}
-struct target_ops sol_thread_ops;
-struct target_ops sol_core_ops;
-
-/* we suppress the call to add_target of core_ops in corelow because
- if there are two targets in the stratum core_stratum, find_core_target
- won't know which one to return. see corelow.c for an additonal
- comment on coreops_suppress_target. */
-int coreops_suppress_target = 1;
-
-void
-_initialize_sol_thread ()
+static void
+init_sol_thread_ops ()
{
- void *dlhandle;
-
- /* Initialize sol_thread_ops */
sol_thread_ops.to_shortname = "solaris-threads";
sol_thread_ops.to_longname = "Solaris threads and pthread.";
sol_thread_ops.to_doc = "Solaris threads and pthread support.";
@@ -1561,8 +1555,12 @@ _initialize_sol_thread ()
sol_thread_ops.to_sections = 0;
sol_thread_ops.to_sections_end = 0;
sol_thread_ops.to_magic = OPS_MAGIC;
+}
+
- /* Initialize sol_core_ops */
+static void
+init_sol_core_ops ()
+{
sol_core_ops.to_shortname = "solaris-core";
sol_core_ops.to_longname = "Solaris core threads and pthread.";
sol_core_ops.to_doc = "Solaris threads and pthread support for core files.";
@@ -1598,7 +1596,21 @@ _initialize_sol_thread ()
sol_core_ops.to_sections = 0;
sol_core_ops.to_sections_end = 0;
sol_core_ops.to_magic = OPS_MAGIC;
+}
+
+/* we suppress the call to add_target of core_ops in corelow because
+ if there are two targets in the stratum core_stratum, find_core_target
+ won't know which one to return. see corelow.c for an additonal
+ comment on coreops_suppress_target. */
+int coreops_suppress_target = 1;
+
+void
+_initialize_sol_thread ()
+{
+ void *dlhandle;
+ init_sol_thread_ops ();
+ init_sol_core_ops ();
dlhandle = dlopen ("libthread_db.so.1", RTLD_NOW);
if (!dlhandle)