aboutsummaryrefslogtreecommitdiff
path: root/gdb/lin-thread.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2000-03-24 21:07:17 +0000
committerKevin Buettner <kevinb@redhat.com>2000-03-24 21:07:17 +0000
commita91f7ea9baf74ec6527944b0b69c23c9c9b238bd (patch)
treef418f6dff7d98135ffe76da65bc5d1889a21d5de /gdb/lin-thread.c
parentcd6f9321da2eabff87a5aec26dd4fb8cb4803043 (diff)
downloadgdb-a91f7ea9baf74ec6527944b0b69c23c9c9b238bd.zip
gdb-a91f7ea9baf74ec6527944b0b69c23c9c9b238bd.tar.gz
gdb-a91f7ea9baf74ec6527944b0b69c23c9c9b238bd.tar.bz2
Don't do compile time comparison of TARGET_PTR_BIT and TARGET_INT_BIT.
Diffstat (limited to 'gdb/lin-thread.c')
-rw-r--r--gdb/lin-thread.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/gdb/lin-thread.c b/gdb/lin-thread.c
index a4f388de..de530f6 100644
--- a/gdb/lin-thread.c
+++ b/gdb/lin-thread.c
@@ -658,21 +658,19 @@ init_thread_db_library ()
static struct cleanup *
save_inferior_pid (void)
{
-#if TARGET_PTR_BIT > TARGET_INT_BIT
- return make_cleanup (restore_inferior_pid, (void *) ((long) inferior_pid));
-#else
- return make_cleanup (restore_inferior_pid, (void *) inferior_pid);
-#endif
+ int *saved_pid_ptr;
+
+ saved_pid_ptr = xmalloc (sizeof (int));
+ *saved_pid_ptr = inferior_pid;
+ return make_cleanup (restore_inferior_pid, saved_pid_ptr);
}
static void
-restore_inferior_pid (void *saved_pid)
+restore_inferior_pid (void *arg)
{
-#if TARGET_PTR_BIT > TARGET_INT_BIT
- inferior_pid = (int) ((long) saved_pid);
-#else
- inferior_pid = (int) saved_pid;
-#endif
+ int *saved_pid_ptr = arg;
+ inferior_pid = *saved_pid_ptr;
+ free (arg);
}
/*