summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2008-07-31 16:26:58 +0000
committermarcel <marcel@FreeBSD.org>2008-07-31 16:26:58 +0000
commit26ada4b390d67732f86ca80952574ba039eecdf5 (patch)
treebc4d0d376ef98a729ddcb08d34eb51a832da3aec /lib
parent10a841cbfb0cea3932ca2727dc675944e91b7f3c (diff)
downloadFreeBSD-src-26ada4b390d67732f86ca80952574ba039eecdf5.zip
FreeBSD-src-26ada4b390d67732f86ca80952574ba039eecdf5.tar.gz
Cleanup for WARNS 3.
Diffstat (limited to 'lib')
-rw-r--r--lib/libthread_db/Makefile2
-rw-r--r--lib/libthread_db/arch/amd64/libpthread_md.c3
-rw-r--r--lib/libthread_db/arch/arm/libpthread_md.c3
-rw-r--r--lib/libthread_db/arch/i386/libpthread_md.c5
-rw-r--r--lib/libthread_db/arch/ia64/libpthread_md.c3
-rw-r--r--lib/libthread_db/arch/powerpc/libpthread_md.c3
-rw-r--r--lib/libthread_db/arch/sparc64/libpthread_md.c3
-rw-r--r--lib/libthread_db/libpthread_db.c4
-rw-r--r--lib/libthread_db/libpthread_db.h13
9 files changed, 23 insertions, 16 deletions
diff --git a/lib/libthread_db/Makefile b/lib/libthread_db/Makefile
index e08bb0d..8e16333 100644
--- a/lib/libthread_db/Makefile
+++ b/lib/libthread_db/Makefile
@@ -9,7 +9,7 @@ SRCS+= libpthread_md.c
SRCS+= libpthread_db.c
SRCS+= libthr_db.c
INCS= thread_db.h
-WARNS?= 2
+WARNS?= 3
CFLAGS+=-I. -I${.CURDIR}
SYM_MAPS+=${.CURDIR}/Symbol.map
diff --git a/lib/libthread_db/arch/amd64/libpthread_md.c b/lib/libthread_db/arch/amd64/libpthread_md.c
index 2a635c6..646d36d 100644
--- a/lib/libthread_db/arch/amd64/libpthread_md.c
+++ b/lib/libthread_db/arch/amd64/libpthread_md.c
@@ -30,8 +30,11 @@ __FBSDID("$FreeBSD$");
#include <sys/procfs.h>
#include <string.h>
+#include <thread_db.h>
#include <ucontext.h>
+#include "libpthread_db.h"
+
void
pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc)
{
diff --git a/lib/libthread_db/arch/arm/libpthread_md.c b/lib/libthread_db/arch/arm/libpthread_md.c
index 88a804f..74d21b4 100644
--- a/lib/libthread_db/arch/arm/libpthread_md.c
+++ b/lib/libthread_db/arch/arm/libpthread_md.c
@@ -27,9 +27,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <string.h>
#include <sys/types.h>
-#include <proc_service.h>
+#include <string.h>
#include <thread_db.h>
#include "libpthread_db.h"
diff --git a/lib/libthread_db/arch/i386/libpthread_md.c b/lib/libthread_db/arch/i386/libpthread_md.c
index dc14e60..d41865f 100644
--- a/lib/libthread_db/arch/i386/libpthread_md.c
+++ b/lib/libthread_db/arch/i386/libpthread_md.c
@@ -27,11 +27,10 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <string.h>
#include <sys/types.h>
-#include <proc_service.h>
-#include <thread_db.h>
#include <machine/npx.h>
+#include <string.h>
+#include <thread_db.h>
#include "libpthread_db.h"
diff --git a/lib/libthread_db/arch/ia64/libpthread_md.c b/lib/libthread_db/arch/ia64/libpthread_md.c
index 7553ed1..3e85102 100644
--- a/lib/libthread_db/arch/ia64/libpthread_md.c
+++ b/lib/libthread_db/arch/ia64/libpthread_md.c
@@ -28,8 +28,11 @@
__FBSDID("$FreeBSD$");
#include <sys/procfs.h>
+#include <thread_db.h>
#include <ucontext.h>
+#include "libpthread_db.h"
+
void
pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc)
{
diff --git a/lib/libthread_db/arch/powerpc/libpthread_md.c b/lib/libthread_db/arch/powerpc/libpthread_md.c
index 955cc8e..b5cccb5 100644
--- a/lib/libthread_db/arch/powerpc/libpthread_md.c
+++ b/lib/libthread_db/arch/powerpc/libpthread_md.c
@@ -27,9 +27,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <string.h>
#include <sys/types.h>
-#include <proc_service.h>
+#include <string.h>
#include <thread_db.h>
#include "libpthread_db.h"
diff --git a/lib/libthread_db/arch/sparc64/libpthread_md.c b/lib/libthread_db/arch/sparc64/libpthread_md.c
index 7553ed1..3e85102 100644
--- a/lib/libthread_db/arch/sparc64/libpthread_md.c
+++ b/lib/libthread_db/arch/sparc64/libpthread_md.c
@@ -28,8 +28,11 @@
__FBSDID("$FreeBSD$");
#include <sys/procfs.h>
+#include <thread_db.h>
#include <ucontext.h>
+#include "libpthread_db.h"
+
void
pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc)
{
diff --git a/lib/libthread_db/libpthread_db.c b/lib/libthread_db/libpthread_db.c
index 527cd85..2757dfb 100644
--- a/lib/libthread_db/libpthread_db.c
+++ b/lib/libthread_db/libpthread_db.c
@@ -70,7 +70,7 @@ ps2td(int c)
}
static long
-pt_map_thread(const td_thragent_t *const_ta, psaddr_t pt, int type)
+pt_map_thread(const td_thragent_t *const_ta, psaddr_t pt, enum pt_type type)
{
td_thragent_t *ta = __DECONST(td_thragent_t *, const_ta);
struct pt_map *new;
@@ -1073,7 +1073,7 @@ pt_validate(const td_thrhandle_t *th)
return (TD_OK);
}
-td_err_e
+static td_err_e
pt_thr_tls_get_addr(const td_thrhandle_t *th, psaddr_t _linkmap, size_t offset,
psaddr_t *address)
{
diff --git a/lib/libthread_db/libpthread_db.h b/lib/libthread_db/libpthread_db.h
index 188da48..44c5de6 100644
--- a/lib/libthread_db/libpthread_db.h
+++ b/lib/libthread_db/libpthread_db.h
@@ -34,13 +34,14 @@
#include "thread_db_int.h"
-struct pt_map {
- enum {
- PT_NONE,
- PT_USER,
- PT_LWP
- } type;
+enum pt_type {
+ PT_NONE,
+ PT_USER,
+ PT_LWP
+};
+struct pt_map {
+ enum pt_type type;
union {
lwpid_t lwp;
psaddr_t thr;
OpenPOWER on IntegriCloud