diff options
author | Kevin Buettner <kevinb@redhat.com> | 2001-05-04 04:15:33 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2001-05-04 04:15:33 +0000 |
commit | 39f770628a4eaf018fec8d55684bf2ec16ada9cc (patch) | |
tree | 69027cfb7df2ecc521ab2cc1d25a7dd6cbe56632 /gdb/config | |
parent | b1af961c8433821f61dd1849cff9eb9a8bb974e8 (diff) | |
download | gdb-39f770628a4eaf018fec8d55684bf2ec16ada9cc.zip gdb-39f770628a4eaf018fec8d55684bf2ec16ada9cc.tar.gz gdb-39f770628a4eaf018fec8d55684bf2ec16ada9cc.tar.bz2 |
Phase 1 of the ptid_t changes.
Diffstat (limited to 'gdb/config')
-rw-r--r-- | gdb/config/alpha/nm-linux.h | 4 | ||||
-rw-r--r-- | gdb/config/arm/nm-linux.h | 4 | ||||
-rw-r--r-- | gdb/config/h8500/tm-h8500.h | 4 | ||||
-rw-r--r-- | gdb/config/i386/nm-i386sol2.h | 10 | ||||
-rw-r--r-- | gdb/config/i386/nm-linux.h | 4 | ||||
-rw-r--r-- | gdb/config/i386/nm-ptx4.h | 2 | ||||
-rw-r--r-- | gdb/config/i386/nm-symmetry.h | 2 | ||||
-rw-r--r-- | gdb/config/i386/tm-cygwin.h | 2 | ||||
-rw-r--r-- | gdb/config/i386/tm-i386sco5.h | 6 | ||||
-rw-r--r-- | gdb/config/i386/tm-i386sol2.h | 3 | ||||
-rw-r--r-- | gdb/config/i386/tm-i386v42mp.h | 3 | ||||
-rw-r--r-- | gdb/config/ia64/nm-linux.h | 17 | ||||
-rw-r--r-- | gdb/config/m68k/nm-hp300bsd.h | 2 | ||||
-rw-r--r-- | gdb/config/mips/nm-irix4.h | 10 | ||||
-rw-r--r-- | gdb/config/mips/nm-irix5.h | 10 | ||||
-rw-r--r-- | gdb/config/nm-linux.h | 5 | ||||
-rw-r--r-- | gdb/config/nm-lynx.h | 5 | ||||
-rw-r--r-- | gdb/config/pa/nm-hppah.h | 14 | ||||
-rw-r--r-- | gdb/config/pa/tm-hppa.h | 6 | ||||
-rw-r--r-- | gdb/config/powerpc/nm-linux.h | 4 | ||||
-rw-r--r-- | gdb/config/rs6000/nm-rs6000.h | 4 | ||||
-rw-r--r-- | gdb/config/sparc/nm-sun4sol2.h | 10 | ||||
-rw-r--r-- | gdb/config/sparc/tm-sun4sol2.h | 3 |
23 files changed, 70 insertions, 64 deletions
diff --git a/gdb/config/alpha/nm-linux.h b/gdb/config/alpha/nm-linux.h index d50d977..2cb2db6 100644 --- a/gdb/config/alpha/nm-linux.h +++ b/gdb/config/alpha/nm-linux.h @@ -74,8 +74,8 @@ extern int lin_lwp_prepare_to_proceed (void); #undef PREPARE_TO_PROCEED #define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed () -extern void lin_lwp_attach_lwp (int pid, int verbose); -#define ATTACH_LWP(pid, verbose) lin_lwp_attach_lwp ((pid), (verbose)) +extern void lin_lwp_attach_lwp (ptid_t pid, int verbose); +#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose)) #include <signal.h> diff --git a/gdb/config/arm/nm-linux.h b/gdb/config/arm/nm-linux.h index 3de162e..ce4e5ff 100644 --- a/gdb/config/arm/nm-linux.h +++ b/gdb/config/arm/nm-linux.h @@ -38,8 +38,8 @@ extern int lin_lwp_prepare_to_proceed (void); #undef PREPARE_TO_PROCEED #define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed () -extern void lin_lwp_attach_lwp (int pid, int verbose); -#define ATTACH_LWP(pid, verbose) lin_lwp_attach_lwp ((pid), (verbose)) +extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose); +#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose)) #include <signal.h> diff --git a/gdb/config/h8500/tm-h8500.h b/gdb/config/h8500/tm-h8500.h index 846401b..f040680 100644 --- a/gdb/config/h8500/tm-h8500.h +++ b/gdb/config/h8500/tm-h8500.h @@ -283,8 +283,8 @@ extern void h8500_write_sp (CORE_ADDR); extern CORE_ADDR h8500_read_fp (void); extern void h8500_write_fp (CORE_ADDR); -extern CORE_ADDR h8500_read_pc (int); -extern void h8500_write_pc (CORE_ADDR, int); +extern CORE_ADDR h8500_read_pc (ptid_t); +extern void h8500_write_pc (CORE_ADDR, ptid_t); #define TARGET_READ_SP() h8500_read_sp() #define TARGET_WRITE_SP(x) h8500_write_sp(x) diff --git a/gdb/config/i386/nm-i386sol2.h b/gdb/config/i386/nm-i386sol2.h index 68e890d..0e6b3ef 100644 --- a/gdb/config/i386/nm-i386sol2.h +++ b/gdb/config/i386/nm-i386sol2.h @@ -44,17 +44,17 @@ step anyway. */ #define CANNOT_STEP_HW_WATCHPOINTS -extern int procfs_stopped_by_watchpoint (int); +extern int procfs_stopped_by_watchpoint (ptid_t); #define STOPPED_BY_WATCHPOINT(W) \ - procfs_stopped_by_watchpoint(inferior_pid) + procfs_stopped_by_watchpoint(inferior_ptid) /* Use these macros for watchpoint insertion/deletion. */ /* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */ -extern int procfs_set_watchpoint (int, CORE_ADDR, int, int, int); +extern int procfs_set_watchpoint (ptid_t, CORE_ADDR, int, int, int); #define target_insert_watchpoint(ADDR, LEN, TYPE) \ - procfs_set_watchpoint (inferior_pid, ADDR, LEN, TYPE, 1) + procfs_set_watchpoint (inferior_ptid, ADDR, LEN, TYPE, 1) #define target_remove_watchpoint(ADDR, LEN, TYPE) \ - procfs_set_watchpoint (inferior_pid, ADDR, 0, 0, 0) + procfs_set_watchpoint (inferior_ptid, ADDR, 0, 0, 0) #endif /* NEW_PROC_API */ diff --git a/gdb/config/i386/nm-linux.h b/gdb/config/i386/nm-linux.h index dcdbc03..1ba216b 100644 --- a/gdb/config/i386/nm-linux.h +++ b/gdb/config/i386/nm-linux.h @@ -90,8 +90,8 @@ extern int lin_lwp_prepare_to_proceed (void); #undef PREPARE_TO_PROCEED #define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed () -extern void lin_lwp_attach_lwp (int pid, int verbose); -#define ATTACH_LWP(pid, verbose) lin_lwp_attach_lwp ((pid), (verbose)) +extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose); +#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose)) #include <signal.h> diff --git a/gdb/config/i386/nm-ptx4.h b/gdb/config/i386/nm-ptx4.h index 2f0d2da..32b76d2 100644 --- a/gdb/config/i386/nm-ptx4.h +++ b/gdb/config/i386/nm-ptx4.h @@ -42,7 +42,7 @@ #define CHILD_WAIT struct target_waitstatus; -extern int child_wait (int, struct target_waitstatus *); +extern ptid_t child_wait (ptid_t, struct target_waitstatus *); /* * ptx does attach as of ptx version 2.1. Prior to that, the interface diff --git a/gdb/config/i386/nm-symmetry.h b/gdb/config/i386/nm-symmetry.h index da9ed81..a589a3d 100644 --- a/gdb/config/i386/nm-symmetry.h +++ b/gdb/config/i386/nm-symmetry.h @@ -32,7 +32,7 @@ #ifdef _SEQUENT_ #define CHILD_WAIT -extern int child_wait (int, struct target_waitstatus *); +extern ptid_t child_wait (ptid_t, struct target_waitstatus *); #endif /* This is the amount to subtract from u.u_ar0 diff --git a/gdb/config/i386/tm-cygwin.h b/gdb/config/i386/tm-cygwin.h index b66e3c7..287b8e0 100644 --- a/gdb/config/i386/tm-cygwin.h +++ b/gdb/config/i386/tm-cygwin.h @@ -38,7 +38,7 @@ extern CORE_ADDR skip_trampoline_code (CORE_ADDR pc, char *name); #define ADD_SHARED_SYMBOL_FILES dll_symbol_command struct target_ops; -char *cygwin_pid_to_str (int pid); +char *cygwin_pid_to_str (ptid_t ptid); void child_solib_add (char *, int, struct target_ops *); char *child_solib_loaded_library_pathname(int); void child_clear_solibs (void); diff --git a/gdb/config/i386/tm-i386sco5.h b/gdb/config/i386/tm-i386sco5.h index 0fcf177..e4cb014 100644 --- a/gdb/config/i386/tm-i386sco5.h +++ b/gdb/config/i386/tm-i386sco5.h @@ -52,12 +52,12 @@ #define HAVE_STEPPABLE_WATCHPOINT #define STOPPED_BY_WATCHPOINT(W) \ - i386_stopped_by_watchpoint (inferior_pid) + i386_stopped_by_watchpoint (PIDGET (inferior_ptid)) #define target_insert_watchpoint(addr, len, type) \ - i386_insert_watchpoint (inferior_pid, addr, len, type) + i386_insert_watchpoint (PIDGET (inferior_ptid), addr, len, type) #define target_remove_watchpoint(addr, len, type) \ - i386_remove_watchpoint (inferior_pid, addr, len) + i386_remove_watchpoint (PIDGET (inferior_ptid), addr, len) #endif /* ifndef TM_I386SCO5_H */ diff --git a/gdb/config/i386/tm-i386sol2.h b/gdb/config/i386/tm-i386sol2.h index 50d869d..f3ebcd9 100644 --- a/gdb/config/i386/tm-i386sol2.h +++ b/gdb/config/i386/tm-i386sol2.h @@ -54,7 +54,8 @@ extern char *sunpro_static_transform_name (char *); /* Macros to extract process id and thread id from a composite pid/tid. Allocate lower 16 bits for process id, next 15 bits for thread id, and one bit for a flag to indicate a user thread vs. a kernel thread. */ -#define PIDGET(PID) (((PID) & 0xffff)) +#define PIDGET0(PID) (((PID) & 0xffff)) +#define PIDGET(PID) ((PIDGET0 (PID) == 0xffff) ? -1 : PIDGET0 (PID)) #define TIDGET(PID) (((PID) & 0x7fffffff) >> 16) #define MERGEPID(PID, TID) (((PID) & 0xffff) | ((TID) << 16)) diff --git a/gdb/config/i386/tm-i386v42mp.h b/gdb/config/i386/tm-i386v42mp.h index e6588e4..e70bc4d 100644 --- a/gdb/config/i386/tm-i386v42mp.h +++ b/gdb/config/i386/tm-i386v42mp.h @@ -43,7 +43,8 @@ #define PIDBITS 16 /* Return the process id stored in composite PID. */ -#define PIDGET(PID) (((PID) & ((1 << PIDBITS) - 1))) +#define PIDGET0(PID) (((PID) & ((1 << PIDBITS) - 1))) +#define PIDGET(PID) ((PIDGET0 (PID) == ((1 << PIDBITS) -1)) ? -1 : PIDGET0 (PID)) /* Return the thread or lwp id stored in composite PID. */ #define TIDGET(PID) (((PID) & 0x3fffffff) >> PIDBITS) diff --git a/gdb/config/ia64/nm-linux.h b/gdb/config/ia64/nm-linux.h index 232db3c..3d55b36 100644 --- a/gdb/config/ia64/nm-linux.h +++ b/gdb/config/ia64/nm-linux.h @@ -63,17 +63,18 @@ extern int ia64_register_u_addr(int, int); #define HAVE_STEPPABLE_WATCHPOINT 1 #define STOPPED_BY_WATCHPOINT(W) \ - ia64_linux_stopped_by_watchpoint (inferior_pid) -extern CORE_ADDR ia64_linux_stopped_by_watchpoint (int); + ia64_linux_stopped_by_watchpoint (inferior_ptid) +extern CORE_ADDR ia64_linux_stopped_by_watchpoint (ptid_t ptid); #define target_insert_watchpoint(addr, len, type) \ - ia64_linux_insert_watchpoint (inferior_pid, addr, len, type) -extern int ia64_linux_insert_watchpoint (int pid, CORE_ADDR addr, + ia64_linux_insert_watchpoint (inferior_ptid, addr, len, type) +extern int ia64_linux_insert_watchpoint (ptid_t ptid, CORE_ADDR addr, int len, int rw); #define target_remove_watchpoint(addr, len, type) \ - ia64_linux_remove_watchpoint (inferior_pid, addr, len) -extern int ia64_linux_remove_watchpoint (int pid, CORE_ADDR addr, int len); + ia64_linux_remove_watchpoint (inferior_ptid, addr, len) +extern int ia64_linux_remove_watchpoint (ptid_t ptid, CORE_ADDR addr, + int len); /* FIXME: kettenis/2000-09-03: This should be moved to ../nm-linux.h once we have converted all Linux targets to use the new threads @@ -83,8 +84,8 @@ extern int lin_lwp_prepare_to_proceed (void); #undef PREPARE_TO_PROCEED #define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed () -extern void lin_lwp_attach_lwp (int pid, int verbose); -#define ATTACH_LWP(pid, verbose) lin_lwp_attach_lwp ((pid), (verbose)) +extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose); +#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose)) #include <signal.h> diff --git a/gdb/config/m68k/nm-hp300bsd.h b/gdb/config/m68k/nm-hp300bsd.h index 2e1b69e..e0f7a11 100644 --- a/gdb/config/m68k/nm-hp300bsd.h +++ b/gdb/config/m68k/nm-hp300bsd.h @@ -40,7 +40,7 @@ /* U_REGS_OFFSET is the offset of the registers within the u area for ptrace purposes. */ #define U_REGS_OFFSET \ - ptrace (PT_READ_U, inferior_pid, \ + ptrace (PT_READ_U, PIDGET (inferior_ptid), \ (PTRACE_ARG3_TYPE) \ (offsetof (struct user, u_kproc.kp_proc.p_md.md_regs)), 0) \ - USRSTACK diff --git a/gdb/config/mips/nm-irix4.h b/gdb/config/mips/nm-irix4.h index 894d33f..9c02eb3 100644 --- a/gdb/config/mips/nm-irix4.h +++ b/gdb/config/mips/nm-irix4.h @@ -51,17 +51,17 @@ GDB to step over the watchpoint. */ #define STOPPED_BY_WATCHPOINT(W) \ - procfs_stopped_by_watchpoint(inferior_pid) -extern int procfs_stopped_by_watchpoint (int); + procfs_stopped_by_watchpoint(inferior_ptid) +extern int procfs_stopped_by_watchpoint (ptid_t); #define HAVE_NONSTEPPABLE_WATCHPOINT /* Use these macros for watchpoint insertion/deletion. */ /* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */ #define target_insert_watchpoint(ADDR, LEN, TYPE) \ - procfs_set_watchpoint (inferior_pid, ADDR, LEN, TYPE, 0) + procfs_set_watchpoint (inferior_ptid, ADDR, LEN, TYPE, 0) #define target_remove_watchpoint(ADDR, LEN, TYPE) \ - procfs_set_watchpoint (inferior_pid, ADDR, 0, 0, 0) -extern int procfs_set_watchpoint (int, CORE_ADDR, int, int, int); + procfs_set_watchpoint (inferior_ptid, ADDR, 0, 0, 0) +extern int procfs_set_watchpoint (ptid_t, CORE_ADDR, int, int, int); #define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(SIZE) 1 diff --git a/gdb/config/mips/nm-irix5.h b/gdb/config/mips/nm-irix5.h index 1b22e17..bed3144 100644 --- a/gdb/config/mips/nm-irix5.h +++ b/gdb/config/mips/nm-irix5.h @@ -31,17 +31,17 @@ GDB to step over the watchpoint. */ #define STOPPED_BY_WATCHPOINT(W) \ - procfs_stopped_by_watchpoint(inferior_pid) -extern int procfs_stopped_by_watchpoint (int); + procfs_stopped_by_watchpoint(inferior_ptid) +extern int procfs_stopped_by_watchpoint (ptid_t); #define HAVE_NONSTEPPABLE_WATCHPOINT /* Use these macros for watchpoint insertion/deletion. */ /* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */ #define target_insert_watchpoint(ADDR, LEN, TYPE) \ - procfs_set_watchpoint (inferior_pid, ADDR, LEN, TYPE, 0) + procfs_set_watchpoint (inferior_ptid, ADDR, LEN, TYPE, 0) #define target_remove_watchpoint(ADDR, LEN, TYPE) \ - procfs_set_watchpoint (inferior_pid, ADDR, 0, 0, 0) -extern int procfs_set_watchpoint (int, CORE_ADDR, int, int, int); + procfs_set_watchpoint (inferior_ptid, ADDR, 0, 0, 0) +extern int procfs_set_watchpoint (ptid_t, CORE_ADDR, int, int, int); #define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(SIZE) 1 diff --git a/gdb/config/nm-linux.h b/gdb/config/nm-linux.h index 131fd50..19d6857 100644 --- a/gdb/config/nm-linux.h +++ b/gdb/config/nm-linux.h @@ -41,7 +41,7 @@ struct objfile; extern void linuxthreads_new_objfile (struct objfile *objfile); /* Method to print a human-readable thread description */ -extern char *linuxthreads_pid_to_str (int pid); +extern char *linuxthreads_pid_to_str (ptid_t ptid); extern int linuxthreads_prepare_to_proceed (int step); #define PREPARE_TO_PROCEED(select_it) linuxthreads_prepare_to_proceed (1) @@ -52,7 +52,8 @@ extern int linuxthreads_prepare_to_proceed (int step); /* Macros to extract process id and thread id from a composite pid/tid. Allocate lower 19 bits for process id, next 12 bits for thread id, and one bit for a flag to indicate a user thread vs. a kernel thread. */ -#define PIDGET(PID) (((PID) & 0xffff)) +#define PIDGET0(PID) (((PID) & 0xffff)) +#define PIDGET(PID) ((PIDGET0 (PID) == 0xffff) ? -1 : PIDGET0 (PID)) #define TIDGET(PID) (((PID) & 0x7fffffff) >> 16) #define MERGEPID(PID, TID) (((PID) & 0xffff) | ((TID) << 16)) diff --git a/gdb/config/nm-lynx.h b/gdb/config/nm-lynx.h index 034d2a0..1cd2bd1 100644 --- a/gdb/config/nm-lynx.h +++ b/gdb/config/nm-lynx.h @@ -71,7 +71,8 @@ #include "target.h" -extern int child_wait (int pid, struct target_waitstatus *status); +extern ptid_t child_wait (ptid_t ptid, + struct target_waitstatus *status); /* Lynx needs a special definition of this so that we can print out the pid and thread number seperately. */ @@ -79,6 +80,6 @@ extern int child_wait (int pid, struct target_waitstatus *status); /* override child_pid_to_str in inftarg.c */ #define CHILD_PID_TO_STR -extern char *lynx_pid_to_str (int pid); +extern char *lynx_pid_to_str (ptid_t ptid); #endif /* NM_LYNX_H */ diff --git a/gdb/config/pa/nm-hppah.h b/gdb/config/pa/nm-hppah.h index f03a52b..4894a04 100644 --- a/gdb/config/pa/nm-hppah.h +++ b/gdb/config/pa/nm-hppah.h @@ -219,21 +219,21 @@ extern void hppa_disable_page_protection_events (int); /* Use these macros for watchpoint insertion/deletion. */ #define target_insert_watchpoint(addr, len, type) \ - hppa_insert_hw_watchpoint (inferior_pid, addr, (LONGEST)(len), type) + hppa_insert_hw_watchpoint (PIDGET (inferior_ptid), addr, (LONGEST)(len), type) #define target_remove_watchpoint(addr, len, type) \ - hppa_remove_hw_watchpoint (inferior_pid, addr, (LONGEST)(len), type) + hppa_remove_hw_watchpoint (PIDGET (inferior_ptid), addr, (LONGEST)(len), type) /* We call our k-thread processes "threads", rather * than processes. So we need a new way to print * the string. Code is in hppah-nat.c. */ -extern char *child_pid_to_str (pid_t); +extern char *child_pid_to_str (ptid_t); -#define target_tid_to_str( pid ) \ - hppa_tid_to_str( pid ) -extern char *hppa_tid_to_str (pid_t); +#define target_tid_to_str( ptid ) \ + hppa_tid_to_str( ptid ) +extern char *hppa_tid_to_str (ptid_t); /* For this, ID can be either a process or thread ID, and the function will describe it appropriately, returning the description as a printable @@ -244,7 +244,7 @@ extern char *hppa_tid_to_str (pid_t); */ #define target_pid_or_tid_to_str(ID) \ hppa_pid_or_tid_to_str (ID) -extern char *hppa_pid_or_tid_to_str (pid_t); +extern char *hppa_pid_or_tid_to_str (ptid_t); /* This is used when handling events caused by a call to vfork(). On ptrace- based HP-UXs, when you resume the vforked child, the parent automagically diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h index 4067ed3..65b2bbf 100644 --- a/gdb/config/pa/tm-hppa.h +++ b/gdb/config/pa/tm-hppa.h @@ -767,12 +767,12 @@ extern CORE_ADDR skip_trampoline_code (CORE_ADDR, char *); #endif #define TARGET_READ_PC(pid) target_read_pc (pid) -extern CORE_ADDR target_read_pc (int); +extern CORE_ADDR target_read_pc (ptid_t); #define TARGET_WRITE_PC(v,pid) target_write_pc (v,pid) -extern void target_write_pc (CORE_ADDR, int); +extern void target_write_pc (CORE_ADDR, ptid_t); -#define TARGET_READ_FP() target_read_fp (inferior_pid) +#define TARGET_READ_FP() target_read_fp (PIDGET (inferior_ptid)) extern CORE_ADDR target_read_fp (int); /* For a number of horrible reasons we may have to adjust the location diff --git a/gdb/config/powerpc/nm-linux.h b/gdb/config/powerpc/nm-linux.h index b0e8a2b..f37c58c 100644 --- a/gdb/config/powerpc/nm-linux.h +++ b/gdb/config/powerpc/nm-linux.h @@ -45,8 +45,8 @@ extern int lin_lwp_prepare_to_proceed (void); #undef PREPARE_TO_PROCEED #define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed () -extern void lin_lwp_attach_lwp (int pid, int verbose); -#define ATTACH_LWP(pid, verbose) lin_lwp_attach_lwp ((pid), (verbose)) +extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose); +#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose)) #include <signal.h> diff --git a/gdb/config/rs6000/nm-rs6000.h b/gdb/config/rs6000/nm-rs6000.h index e4ee51c..441b381 100644 --- a/gdb/config/rs6000/nm-rs6000.h +++ b/gdb/config/rs6000/nm-rs6000.h @@ -44,9 +44,9 @@ and figure out where the shared libraries have got to. */ #define SOLIB_ADD(a, b, c) \ - if (inferior_pid) \ + if (PIDGET (inferior_ptid)) \ /* Attach to process. */ \ - xcoff_relocate_symtab (inferior_pid); \ + xcoff_relocate_symtab (PIDGET (inferior_ptid)); \ else \ /* Core file. */ \ xcoff_relocate_core (c); diff --git a/gdb/config/sparc/nm-sun4sol2.h b/gdb/config/sparc/nm-sun4sol2.h index 51b5471..adc8231 100644 --- a/gdb/config/sparc/nm-sun4sol2.h +++ b/gdb/config/sparc/nm-sun4sol2.h @@ -53,17 +53,17 @@ It will *NOT* be necessary for GDB to step over the watchpoint. */ #define HAVE_CONTINUABLE_WATCHPOINT -extern int procfs_stopped_by_watchpoint (int); +extern int procfs_stopped_by_watchpoint (ptid_t); #define STOPPED_BY_WATCHPOINT(W) \ - procfs_stopped_by_watchpoint(inferior_pid) + procfs_stopped_by_watchpoint(inferior_ptid) /* Use these macros for watchpoint insertion/deletion. */ /* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */ -extern int procfs_set_watchpoint (int, CORE_ADDR, int, int, int); +extern int procfs_set_watchpoint (ptid_t, CORE_ADDR, int, int, int); #define target_insert_watchpoint(ADDR, LEN, TYPE) \ - procfs_set_watchpoint (inferior_pid, ADDR, LEN, TYPE, 1) + procfs_set_watchpoint (inferior_ptid, ADDR, LEN, TYPE, 1) #define target_remove_watchpoint(ADDR, LEN, TYPE) \ - procfs_set_watchpoint (inferior_pid, ADDR, 0, 0, 0) + procfs_set_watchpoint (inferior_ptid, ADDR, 0, 0, 0) #endif /* NEW_PROC_API */ diff --git a/gdb/config/sparc/tm-sun4sol2.h b/gdb/config/sparc/tm-sun4sol2.h index 7642fe3..09f36bb 100644 --- a/gdb/config/sparc/tm-sun4sol2.h +++ b/gdb/config/sparc/tm-sun4sol2.h @@ -82,6 +82,7 @@ extern char *sunpro_static_transform_name (char *); #define HANDLE_SVR4_EXEC_EMULATORS /* Macros to extract process id and thread id from a composite pid/tid */ -#define PIDGET(PID) (((PID) & 0xffff)) +#define PIDGET0(PID) (((PID) & 0xffff)) +#define PIDGET(PID) ((PIDGET0 (PID) == 0xffff) ? -1 : PIDGET0 (PID)) #define TIDGET(PID) (((PID) & 0x7fffffff) >> 16) #define MERGEPID(PID, TID) (((PID) & 0xffff) | ((TID) << 16)) |