summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-06-06 21:26:49 +0000
committerphk <phk@FreeBSD.org>2004-06-06 21:26:49 +0000
commit4c3fd8116d1815c5e18c8569e354a99c8c7ce1c8 (patch)
tree6b5fca44622323941a76adcf768eb12cd9c793f7
parent5c9b04429a84b964e9619870accf1c4b6209412a (diff)
downloadFreeBSD-src-4c3fd8116d1815c5e18c8569e354a99c8c7ce1c8.zip
FreeBSD-src-4c3fd8116d1815c5e18c8569e354a99c8c7ce1c8.tar.gz
Remove filename+line number from panic messages.
-rw-r--r--sys/alpha/alpha/support.s6
-rw-r--r--sys/arm/arm/exception.S19
-rw-r--r--sys/arm/arm/in_cksum_arm.S6
-rw-r--r--sys/arm/arm/locore.S6
-rw-r--r--sys/i386/i386/swtch.s12
-rw-r--r--sys/kern/kern_shutdown.c6
-rw-r--r--sys/sparc64/include/asmacros.h6
-rw-r--r--sys/sys/systm.h6
8 files changed, 17 insertions, 50 deletions
diff --git a/sys/alpha/alpha/support.s b/sys/alpha/alpha/support.s
index 0d485f2..a340d75 100644
--- a/sys/alpha/alpha/support.s
+++ b/sys/alpha/alpha/support.s
@@ -680,10 +680,8 @@ LEAF(longjmp, 1)
longjmp_botch:
lda a0, longjmp_botchmsg
- mov 0, a1
- mov 0, a2
- mov ra, a3
- CALL(__panic)
+ mov ra, a1
+ CALL(panic)
call_pal PAL_bugchk
.data
diff --git a/sys/arm/arm/exception.S b/sys/arm/arm/exception.S
index fb6bded..1a52946 100644
--- a/sys/arm/arm/exception.S
+++ b/sys/arm/arm/exception.S
@@ -65,14 +65,10 @@ AST_ALIGNMENT_FAULT_LOCALS
*/
ASENTRY_NP(reset_entry)
adr r0, Lreset_panicmsg
- adr r1, Lfile
- mov r2, #__LINE__
- bl _C_LABEL(__panic)
+ bl _C_LABEL(panic)
/* NOTREACHED */
Lreset_panicmsg:
.asciz "Reset vector called, LR = 0x%08x"
-Lfile:
- .asciz __FILE__
.balign 4
/*
@@ -122,12 +118,7 @@ _C_LABEL(prefetch_abort_handler_address):
.text
abortprefetch:
adr r0, abortprefetchmsg
- adr r1, filee
- mov r2, #__LINE__
- b _C_LABEL(__panic)
-
-filee:
- .asciz __FILE__
+ b _C_LABEL(panic)
abortprefetchmsg:
.asciz "abortprefetch"
@@ -164,14 +155,10 @@ _C_LABEL(data_abort_handler_address):
.text
abortdata:
adr r0, abortdatamsg
- adr r1, file
- mov r2, #__LINE__
- b _C_LABEL(__panic)
+ b _C_LABEL(panic)
abortdatamsg:
.asciz "abortdata"
-file:
- .asciz __FILE__
.align 0
/*
diff --git a/sys/arm/arm/in_cksum_arm.S b/sys/arm/arm/in_cksum_arm.S
index d0b6452..57f43e3 100644
--- a/sys/arm/arm/in_cksum_arm.S
+++ b/sys/arm/arm/in_cksum_arm.S
@@ -221,11 +221,7 @@ ENTRY(in4_cksum)
.Lin4_cksum_whoops:
adr r0, .Lin4_cksum_whoops_str
- adr r1, .LFile
- mov r2, #__LINE__
- bl _C_LABEL(__panic)
-.LFile:
- .asciz __FILE__
+ bl _C_LABEL(panic)
.Lin4_cksum_whoops_str:
.asciz "in4_cksum: out of mbufs\n"
.align 5
diff --git a/sys/arm/arm/locore.S b/sys/arm/arm/locore.S
index ff569e8..ec8a760 100644
--- a/sys/arm/arm/locore.S
+++ b/sys/arm/arm/locore.S
@@ -153,9 +153,7 @@ mmu_done:
bl _C_LABEL(mi_startup) /* call mi_startup()! */
adr r0, .Lmainreturned
- adr r1, .LFile
- mov r2, #__LINE__
- b _C_LABEL(__panic)
+ b _C_LABEL(panic)
/* NOTEACHED */
#ifdef STARTUP_PAGETABLE_ADDR
#define MMU_INIT(va,pa,n_sec,attr) \
@@ -181,8 +179,6 @@ mmu_init_table2:
.word _end
.word svcstk + INIT_ARM_STACK_SIZE
-.LFile:
- .asciz __FILE__
.Lmainreturned:
.asciz "main() returned"
.align 0
diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s
index 0ea6a7b..8e7fb41 100644
--- a/sys/i386/i386/swtch.s
+++ b/sys/i386/i386/swtch.s
@@ -299,26 +299,20 @@ cpu_switch_load_gs:
#ifdef INVARIANTS
badsw1:
pushal
- pushl $0
- pushl $0
pushl $sw0_1
- call __panic
+ call panic
sw0_1: .asciz "cpu_throw: no newthread supplied"
badsw2:
pushal
- pushl $0
- pushl $0
pushl $sw0_2
- call __panic
+ call panic
sw0_2: .asciz "cpu_switch: no curthread supplied"
badsw3:
pushal
- pushl $0
- pushl $0
pushl $sw0_3
- call __panic
+ call panic
sw0_3: .asciz "cpu_switch: no newthread supplied"
#endif
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index 45d71ea..49c6a41 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -474,7 +474,7 @@ static u_int panic_cpu = NOCPU;
* MPSAFE
*/
void
-__panic(const char *file, int line, const char *fmt, ...)
+panic(const char *fmt, ...)
{
struct thread *td = curthread;
int bootopt, newpanic;
@@ -508,11 +508,11 @@ __panic(const char *file, int line, const char *fmt, ...)
if (newpanic) {
(void)vsnprintf(buf, sizeof(buf), fmt, ap);
panicstr = buf;
- printf("panic: %s\nat line %d in file %s\n", buf, line, file);
+ printf("panic: %s\n", buf);
} else {
printf("panic: ");
vprintf(fmt, ap);
- printf("\nat line %d in file %s", line, file);
+ printf("\n");
}
va_end(ap);
#ifdef SMP
diff --git a/sys/sparc64/include/asmacros.h b/sys/sparc64/include/asmacros.h
index 9337983..a0e317b 100644
--- a/sys/sparc64/include/asmacros.h
+++ b/sys/sparc64/include/asmacros.h
@@ -101,10 +101,8 @@
.sect .rodata ; \
9: .asciz msg ; \
.previous ; \
- SET(9b, r1, %o2) ; \
- clr %o1 ; \
- clr %o0 ; \
- call __panic ; \
+ SET(9b, r1, %o0) ; \
+ call panic ; \
nop
#ifdef INVARIANTS
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
index d131856..44c5703 100644
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -132,13 +132,11 @@ void *hashinit(int count, struct malloc_type *type, u_long *hashmask);
void *phashinit(int count, struct malloc_type *type, u_long *nentries);
#ifdef RESTARTABLE_PANICS
-void __panic(const char *file, int line, const char *, ...) __printflike(3, 4);
+void panic(const char *, ...) __printflike(1, 2);
#else
-void __panic(const char *file, int line, const char *, ...) __dead2 __printflike(3, 4);
+void panic(const char *, ...) __dead2 __printflike(1, 2);
#endif
-#define panic(...) __panic(__FILE__, __LINE__, __VA_ARGS__)
-
void backtrace(void);
void cpu_boot(int);
void cpu_rootconf(void);
OpenPOWER on IntegriCloud