diff options
Diffstat (limited to 'gdb/config/nm-linux.h')
-rw-r--r-- | gdb/config/nm-linux.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gdb/config/nm-linux.h b/gdb/config/nm-linux.h index 9805306..9b22582 100644 --- a/gdb/config/nm-linux.h +++ b/gdb/config/nm-linux.h @@ -37,14 +37,25 @@ struct objfile; +/* Hook to look at new objfiles (shared libraries) */ extern void linuxthreads_new_objfile PARAMS ((struct objfile *objfile)); -#define target_new_objfile(OBJFILE) linuxthreads_new_objfile (OBJFILE) +/* Method to print a human-readable thread description */ extern char * linuxthreads_pid_to_str PARAMS ((int pid)); -#define target_pid_to_str(PID) linuxthreads_pid_to_str (PID) extern int linuxthreads_prepare_to_proceed PARAMS ((int step)); #define PREPARE_TO_PROCEED(select_it) linuxthreads_prepare_to_proceed (1) + +/* Defined to make stepping-over-breakpoints be thread-atomic. */ +#define USE_THREAD_STEP_NEEDED 1 + +/* 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 TIDGET(PID) (((PID) & 0x7fffffff) >> 16) +#define MERGEPID(PID, TID) (((PID) & 0xffff) | ((TID) << 16)) + |