| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile,v 1.43 2020/03/09 01:54:31 christos Exp $ | | 1 | # $NetBSD: Makefile,v 1.44 2020/03/09 05:10:19 rin Exp $ |
2 | | | 2 | |
3 | PROG= crash | | 3 | PROG= crash |
4 | MAN= crash.8 | | 4 | MAN= crash.8 |
5 | RUMPKERNEL= yes # XXX: Avoid -mcmodel=kernel | | 5 | RUMPKERNEL= yes # XXX: Avoid -mcmodel=kernel |
6 | | | 6 | |
7 | CWARNFLAGS.clang+= -Wno-format | | 7 | CWARNFLAGS.clang+= -Wno-format |
8 | | | 8 | |
9 | LDADD+= -lutil -lkvm -ledit -lterminfo | | 9 | LDADD+= -lutil -lkvm -ledit -lterminfo |
10 | DPADD+= ${LIBUTIL} ${LIBKVM} ${LIBEDIT} ${LIBTERMINFO} | | 10 | DPADD+= ${LIBUTIL} ${LIBKVM} ${LIBEDIT} ${LIBTERMINFO} |
11 | | | 11 | |
12 | .include <bsd.own.mk> | | 12 | .include <bsd.own.mk> |
13 | | | 13 | |
14 | # some ddb kernel components need limited modifications. for now, | | 14 | # some ddb kernel components need limited modifications. for now, |
| @@ -20,54 +20,54 @@ DPADD+= ${LIBUTIL} ${LIBKVM} ${LIBEDIT} | | | @@ -20,54 +20,54 @@ DPADD+= ${LIBUTIL} ${LIBKVM} ${LIBEDIT} |
20 | || ${MACHINE} == "sparc64" \ | | 20 | || ${MACHINE} == "sparc64" \ |
21 | || ${MACHINE_CPU} == "arm" \ | | 21 | || ${MACHINE_CPU} == "arm" \ |
22 | || ${MACHINE_CPU} == "aarch64" \ | | 22 | || ${MACHINE_CPU} == "aarch64" \ |
23 | || ${MACHINE_ARCH} == "m68k" | | 23 | || ${MACHINE_ARCH} == "m68k" |
24 | SRCS+= db_trace.c | | 24 | SRCS+= db_trace.c |
25 | .if ${MACHINE_ARCH} != "m68k" | | 25 | .if ${MACHINE_ARCH} != "m68k" |
26 | SRCS+= db_machdep.c | | 26 | SRCS+= db_machdep.c |
27 | .endif | | 27 | .endif |
28 | REALCRASH=yes | | 28 | REALCRASH=yes |
29 | .else | | 29 | .else |
30 | REALCRASH=no | | 30 | REALCRASH=no |
31 | .endif | | 31 | .endif |
32 | | | 32 | |
33 | CPPFLAGS +=-DLOCKDEBUG | | | |
34 | CPPFLAGS.subr_lockdebug.c += -DCRASH -DDDB | | | |
35 | SRCS += subr_lockdebug.c | | | |
36 | | | | |
37 | .if ${REALCRASH} != "no" # { | | 33 | .if ${REALCRASH} != "no" # { |
38 | | | 34 | |
39 | S= ${.CURDIR}/../../sys | | 35 | S= ${.CURDIR}/../../sys |
40 | | | 36 | |
41 | CPPFLAGS+= -I${.CURDIR} -I${.OBJDIR} -I${S} -fno-strict-aliasing | | 37 | CPPFLAGS+= -I${.CURDIR} -I${.OBJDIR} -I${S} -fno-strict-aliasing |
42 | CPPFLAGS+= -DDDB_VERBOSE_HELP -DDB_MAX_LINE=10000000 -D_KMEMUSER | | 38 | CPPFLAGS+= -DDDB_VERBOSE_HELP -DDB_MAX_LINE=10000000 -D_KMEMUSER |
43 | CPPFLAGS+= -UDB_MACHINE_COMMANDS | | 39 | CPPFLAGS+= -UDB_MACHINE_COMMANDS |
44 | | | 40 | |
45 | # ddb files from kernel | | 41 | # ddb files from kernel |
46 | .PATH: $S/ddb | | 42 | .PATH: $S/ddb |
47 | SRCS+= db_command.c db_lwp.c db_proc.c db_xxx.c db_cpu.c | | 43 | SRCS+= db_command.c db_lwp.c db_proc.c db_xxx.c db_cpu.c |
48 | SRCS+= db_autoconf.c | | 44 | SRCS+= db_autoconf.c |
49 | SRCS+= db_access.c db_elf.c db_examine.c | | 45 | SRCS+= db_access.c db_elf.c db_examine.c |
50 | SRCS+= db_expr.c db_lex.c db_output.c db_print.c | | 46 | SRCS+= db_expr.c db_lex.c db_output.c db_print.c |
51 | SRCS+= db_sym.c db_variables.c db_write_cmd.c | | 47 | SRCS+= db_sym.c db_variables.c db_write_cmd.c |
52 | | | 48 | |
53 | .PATH: ${S}/arch/${MACHINE}/${MACHINE} | | 49 | .PATH: ${S}/arch/${MACHINE}/${MACHINE} |
54 | .PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} | | 50 | .PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} |
55 | SRCS+= db_disasm.c | | 51 | SRCS+= db_disasm.c |
56 | | | 52 | |
57 | .PATH: $S/kern | | 53 | .PATH: $S/kern |
58 | SRCS+= kern_timeout.c | | 54 | SRCS+= kern_timeout.c |
59 | CPPFLAGS.kern_timeout.c += -DCRASH -DDDB | | 55 | CPPFLAGS.kern_timeout.c += -DCRASH -DDDB |
60 | | | 56 | |
| | | 57 | CPPFLAGS +=-DLOCKDEBUG |
| | | 58 | SRCS += subr_lockdebug.c |
| | | 59 | CPPFLAGS.subr_lockdebug.c += -DCRASH -DDDB |
| | | 60 | |
61 | CPPFLAGS+= -I${S}/arch | | 61 | CPPFLAGS+= -I${S}/arch |
62 | | | 62 | |
63 | . if ${MACHINE} == "amd64" \ | | 63 | . if ${MACHINE} == "amd64" \ |
64 | || ${MACHINE} == "i386" | | 64 | || ${MACHINE} == "i386" |
65 | MACHINE_FAMILY = x86 | | 65 | MACHINE_FAMILY = x86 |
66 | . elif ${MACHINE} == "sparc64" | | 66 | . elif ${MACHINE} == "sparc64" |
67 | MACHINE_FAMILY = sparc | | 67 | MACHINE_FAMILY = sparc |
68 | . else | | 68 | . else |
69 | MACHINE_FAMILY = ${MACHINE_CPU} | | 69 | MACHINE_FAMILY = ${MACHINE_CPU} |
70 | . endif | | 70 | . endif |
71 | | | 71 | |
72 | .if ${MACHINE_CPU} == "arm" | | 72 | .if ${MACHINE_CPU} == "arm" |
73 | .PATH: ${S}/arch/arm/arm32 | | 73 | .PATH: ${S}/arch/arm/arm32 |