From a7092d3091f1d8c389dbdc01a8554c0ac915d8a5 Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Sun, 18 Jul 2004 19:29:38 +0000 Subject: [PATCH] Correct the mess I made by committing from the wrong tree. Most notably, this restores some of the contents in thread_db.h as well as David Xu's copyright notice. This also fixes the includes in the MD libpthread files which Scott tried to provide a quick fix for. Pointy hat: marcel --- lib/libthread_db/arch/alpha/libpthread_md.c | 8 +--- lib/libthread_db/arch/amd64/libpthread_md.c | 3 ++ lib/libthread_db/arch/ia64/libpthread_md.c | 8 +--- lib/libthread_db/arch/sparc64/libpthread_md.c | 8 +--- lib/libthread_db/thread_db.h | 39 ++++++++++++------- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/lib/libthread_db/arch/alpha/libpthread_md.c b/lib/libthread_db/arch/alpha/libpthread_md.c index 6d15c91e23a7..7553ed117eae 100644 --- a/lib/libthread_db/arch/alpha/libpthread_md.c +++ b/lib/libthread_db/arch/alpha/libpthread_md.c @@ -27,12 +27,8 @@ #include __FBSDID("$FreeBSD$"); -#include -#include -#include -#include - -#include "libpthread_db.h" +#include +#include void pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc) diff --git a/lib/libthread_db/arch/amd64/libpthread_md.c b/lib/libthread_db/arch/amd64/libpthread_md.c index 49593875932a..7553ed117eae 100644 --- a/lib/libthread_db/arch/amd64/libpthread_md.c +++ b/lib/libthread_db/arch/amd64/libpthread_md.c @@ -27,6 +27,9 @@ #include __FBSDID("$FreeBSD$"); +#include +#include + void pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc) { diff --git a/lib/libthread_db/arch/ia64/libpthread_md.c b/lib/libthread_db/arch/ia64/libpthread_md.c index 6d15c91e23a7..7553ed117eae 100644 --- a/lib/libthread_db/arch/ia64/libpthread_md.c +++ b/lib/libthread_db/arch/ia64/libpthread_md.c @@ -27,12 +27,8 @@ #include __FBSDID("$FreeBSD$"); -#include -#include -#include -#include - -#include "libpthread_db.h" +#include +#include void pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc) diff --git a/lib/libthread_db/arch/sparc64/libpthread_md.c b/lib/libthread_db/arch/sparc64/libpthread_md.c index 6d15c91e23a7..7553ed117eae 100644 --- a/lib/libthread_db/arch/sparc64/libpthread_md.c +++ b/lib/libthread_db/arch/sparc64/libpthread_md.c @@ -27,12 +27,8 @@ #include __FBSDID("$FreeBSD$"); -#include -#include -#include -#include - -#include "libpthread_db.h" +#include +#include void pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc) diff --git a/lib/libthread_db/thread_db.h b/lib/libthread_db/thread_db.h index ec0baafb7467..eaad92178aa5 100644 --- a/lib/libthread_db/thread_db.h +++ b/lib/libthread_db/thread_db.h @@ -1,4 +1,5 @@ /* + * Copyright (c) 2004 David Xu * Copyright (c) 2004 Marcel Moolenaar * All rights reserved. * @@ -71,8 +72,20 @@ typedef struct { typedef enum { TD_EVENT_NONE = 0, - TD_CREATE = 0x0001, - TD_DEATH = 0x0002, + TD_CATCHSIG = 0x0001, + TD_CONCURRENCY= 0x0002, + TD_CREATE = 0x0004, + TD_DEATH = 0x0008, + TD_IDLE = 0x0010, + TD_LOCK_TRY = 0x0020, + TD_PREEMPT = 0x0040, + TD_PRI_INHERIT= 0x0080, + TD_READY = 0x0100, + TD_REAP = 0x0200, + TD_SLEEP = 0x0400, + TD_SWITCHFROM = 0x0800, + TD_SWITCHTO = 0x1000, + TD_TIMEOUT = 0x2000, TD_ALL_EVENTS = ~0 } td_thr_events_e; @@ -87,10 +100,17 @@ typedef struct { typedef unsigned int td_thr_events_t; -/* XXX can't be it... */ +typedef enum { + NOTIFY_BPT, /* User inserted breakpoint. */ + NOTIFY_AUTOBPT, /* Automatic breakpoint. */ + NOTIFY_SYSCALL /* Invocation of system call. */ +} td_notify_e; + typedef struct { + td_notify_e type; union { psaddr_t bptaddr; + int syscallno; } u; } td_notify_t; @@ -151,18 +171,7 @@ typedef enum TD_THR_USER } td_thr_type_e; -typedef int thread_key_t; - -#if 0 -typedef struct td_thrinfo_t { - unsigned int ti_user_flags; - psaddr_t ti_pc; - psaddr_t ti_sp; - short ti_flags; - uchar_t ti_preemptflag; - uchar_t ti_pirecflag; -}; -#endif +typedef pthread_key_t thread_key_t; typedef struct { const td_thragent_t *ti_ta_p;