+typedef unsigned long long ULONGEST;
+
+/* The ptid struct is a collection of the various "ids" necessary
+ for identifying the inferior. This consists of the process id
+ (pid), thread id (tid), and other fields necessary for uniquely
+ identifying the inferior process/thread being debugged. When
+ manipulating ptids, the constructors, accessors, and predicate
+ declared in server.h should be used. These are as follows:
+
+ ptid_build - Make a new ptid from a pid, lwp, and tid.
+ pid_to_ptid - Make a new ptid from just a pid.
+ ptid_get_pid - Fetch the pid component of a ptid.
+ ptid_get_lwp - Fetch the lwp component of a ptid.
+ ptid_get_tid - Fetch the tid component of a ptid.
+ ptid_equal - Test to see if two ptids are equal.
+
+ Please do NOT access the struct ptid members directly (except, of
+ course, in the implementation of the above ptid manipulation
+ functions). */
+
+struct ptid
+ {
+ /* Process id */
+ int pid;
+
+ /* Lightweight process id */
+ long lwp;
+
+ /* Thread id */
+ long tid;
+ };
+
+typedef struct ptid ptid_t;
+
+/* The -1 ptid, often used to indicate either an error condition or a
+ "don't care" condition, i.e, "run all threads". */
+extern ptid_t minus_one_ptid;
+
+/* The null or zero ptid, often used to indicate no process. */
+extern ptid_t null_ptid;
+
+/* Attempt to find and return an existing ptid with the given PID,
+ LWP, and TID components. If none exists, create a new one and
+ return that. */
+ptid_t ptid_build (int pid, long lwp, long tid);
+
+/* Create a ptid from just a pid. */
+ptid_t pid_to_ptid (int pid);
+
+/* Fetch the pid (process id) component from a ptid. */
+int ptid_get_pid (ptid_t ptid);
+
+/* Fetch the lwp (lightweight process) component from a ptid. */
+long ptid_get_lwp (ptid_t ptid);
+
+/* Fetch the tid (thread id) component from a ptid. */
+long ptid_get_tid (ptid_t ptid);
+
+/* Compare two ptids to see if they are equal. */
+extern int ptid_equal (ptid_t p1, ptid_t p2);
+
+/* Return true if this ptid represents a process id. */
+extern int ptid_is_pid (ptid_t ptid);
+
+/* Generic information for tracking a list of ``inferiors'' - threads,
+ processes, etc. */
+struct inferior_list
+{
+ struct inferior_list_entry *head;
+ struct inferior_list_entry *tail;
+};
+struct inferior_list_entry
+{
+ ptid_t id;
+ struct inferior_list_entry *next;
+};
+
+/* Opaque type for user-visible threads. */
+struct thread_info;
+
+struct dll_info
+{
+ struct inferior_list_entry entry;
+ char *name;
+ CORE_ADDR base_addr;
+};
+
+struct sym_cache;
+struct breakpoint;
+struct process_info_private;
+
+struct process_info
+{
+ struct inferior_list_entry head;
+
+ int attached;
+
+ /* The symbol cache. */
+ struct sym_cache *symbol_cache;
+
+ /* If this flag has been set, assume symbol cache misses are
+ failures. */
+ int all_symbols_looked_up;
+
+ /* The list of memory breakpoints. */
+ struct breakpoint *breakpoints;
+
+ /* Private target data. */
+ struct process_info_private *private;
+};
+
+/* Return a pointer to the process that corresponds to the current
+ thread (current_inferior). It is an error to call this if there is
+ no current thread selected. */
+
+struct process_info *current_process (void);
+struct process_info *get_thread_process (struct thread_info *);
+