Don't do compile time comparison of TARGET_PTR_BIT and TARGET_INT_BIT.
This commit is contained in:
parent
cd6f9321da
commit
a91f7ea9ba
3 changed files with 25 additions and 24 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2000-03-24 Kevin Buettner <kevinb@redhat.com>
|
||||||
|
|
||||||
|
* linux-thread.c, lin-thread.c (save_inferior_pid,
|
||||||
|
restore_inferior_pid): Don't do compile time comparison
|
||||||
|
of TARGET_PTR_BIT and TARGET_INT_BIT.
|
||||||
|
|
||||||
Thu Mar 23 13:18:26 2000 Philippe De Muyter <phdm@macqel.be>
|
Thu Mar 23 13:18:26 2000 Philippe De Muyter <phdm@macqel.be>
|
||||||
|
|
||||||
* m68k-tdep.c (P_LINKL_FP, P_LINKW_FP): Macros renamed from P_LINK_L
|
* m68k-tdep.c (P_LINKL_FP, P_LINKW_FP): Macros renamed from P_LINK_L
|
||||||
|
|
|
@ -658,21 +658,19 @@ init_thread_db_library ()
|
||||||
static struct cleanup *
|
static struct cleanup *
|
||||||
save_inferior_pid (void)
|
save_inferior_pid (void)
|
||||||
{
|
{
|
||||||
#if TARGET_PTR_BIT > TARGET_INT_BIT
|
int *saved_pid_ptr;
|
||||||
return make_cleanup (restore_inferior_pid, (void *) ((long) inferior_pid));
|
|
||||||
#else
|
saved_pid_ptr = xmalloc (sizeof (int));
|
||||||
return make_cleanup (restore_inferior_pid, (void *) inferior_pid);
|
*saved_pid_ptr = inferior_pid;
|
||||||
#endif
|
return make_cleanup (restore_inferior_pid, saved_pid_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
restore_inferior_pid (void *saved_pid)
|
restore_inferior_pid (void *arg)
|
||||||
{
|
{
|
||||||
#if TARGET_PTR_BIT > TARGET_INT_BIT
|
int *saved_pid_ptr = arg;
|
||||||
inferior_pid = (int) ((long) saved_pid);
|
inferior_pid = *saved_pid_ptr;
|
||||||
#else
|
free (arg);
|
||||||
inferior_pid = (int) saved_pid;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -378,25 +378,22 @@ linuxthreads_find_trap (pid, stop)
|
||||||
|
|
||||||
/* Cleanup stub for save_inferior_pid. */
|
/* Cleanup stub for save_inferior_pid. */
|
||||||
static void
|
static void
|
||||||
restore_inferior_pid (arg)
|
restore_inferior_pid (void *arg)
|
||||||
void *arg;
|
|
||||||
{
|
{
|
||||||
#if TARGET_PTR_BIT > TARGET_INT_BIT
|
int *saved_pid_ptr = arg;
|
||||||
inferior_pid = (int) ((long) arg);
|
inferior_pid = *saved_pid_ptr;
|
||||||
#else
|
free (arg);
|
||||||
inferior_pid = (int) arg;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Register a cleanup to restore the value of inferior_pid. */
|
/* Register a cleanup to restore the value of inferior_pid. */
|
||||||
static struct cleanup *
|
static struct cleanup *
|
||||||
save_inferior_pid ()
|
save_inferior_pid (void)
|
||||||
{
|
{
|
||||||
#if TARGET_PTR_BIT > TARGET_INT_BIT
|
int *saved_pid_ptr;
|
||||||
return make_cleanup (restore_inferior_pid, (void *) ((long) inferior_pid));
|
|
||||||
#else
|
saved_pid_ptr = xmalloc (sizeof (int));
|
||||||
return make_cleanup (restore_inferior_pid, (void *) inferior_pid);
|
*saved_pid_ptr = inferior_pid;
|
||||||
#endif
|
return make_cleanup (restore_inferior_pid, saved_pid_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue