* [PATCH] remove die/die_if_kernel __FUNCTION__ cat for gcc 3.x's sake
@ 2002-02-19 22:33 Bradley D. LaRonde <brad@ltc.com>
0 siblings, 0 replies; only message in thread
From: Bradley D. LaRonde <brad@ltc.com> @ 2002-02-19 22:33 UTC (permalink / raw)
To: ralf; +Cc: linux-mips
diff -urNbB --exclude-from=diff-linux-exclude linux-oss-2.4-2002-01-20/include/asm-mips/system.h linux-encore-2.4.17-2/include/asm-mips/system.h
--- linux-oss-2.4-2002-01-20/include/asm-mips/system.h Sun Dec 16 04:34:16 2001
+++ linux-encore-2.4.17-2/include/asm-mips/system.h Tue Feb 19 17:05:36 2002
@@ -276,14 +276,14 @@
extern void *set_except_vector(int n, void *addr);
-extern void __die(const char *, struct pt_regs *, const char *where,
- unsigned long line) __attribute__((noreturn));
-extern void __die_if_kernel(const char *, struct pt_regs *, const char *where,
- unsigned long line);
+extern void __die(const char *, struct pt_regs *, const char *file,
+ const char *function, unsigned long line) __attribute__((noreturn));
+extern void __die_if_kernel(const char *, struct pt_regs *, const char *file,
+ const char *function, unsigned long line);
#define die(msg, regs) \
- __die(msg, regs, __FILE__ ":"__FUNCTION__, __LINE__)
+ __die(msg, regs, __FILE__, __FUNCTION__, __LINE__)
#define die_if_kernel(msg, regs) \
- __die_if_kernel(msg, regs, __FILE__ ":"__FUNCTION__, __LINE__)
+ __die_if_kernel(msg, regs, __FILE__, __FUNCTION__, __LINE__)
#endif /* _ASM_SYSTEM_H */
diff -urNbB --exclude-from=diff-linux-exclude linux-oss-2.4-2002-01-20/arch/mips/kernel/traps.c linux-encore-2.4.17-2/arch/mips/kernel/traps.c
--- linux-oss-2.4-2002-01-20/arch/mips/kernel/traps.c Sun Jan 20 17:06:08 2002
+++ linux-encore-2.4.17-2/arch/mips/kernel/traps.c Tue Feb 19 17:20:25 2002
@@ -327,25 +327,25 @@
static spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
-void __die(const char * str, struct pt_regs * regs, const char *where,
- unsigned long line)
+void __die(const char * str, struct pt_regs * regs, const char *file,
+ const char *function, unsigned long line)
{
console_verbose();
spin_lock_irq(&die_lock);
printk("%s", str);
- if (where)
- printk(" in %s, line %ld", where, line);
+ if (file && function)
+ printk(" in %s:%s, line %ld", file, function, line);
printk(":\n");
show_registers(regs);
spin_unlock_irq(&die_lock);
do_exit(SIGSEGV);
}
-void __die_if_kernel(const char * str, struct pt_regs * regs, const char *where,
- unsigned long line)
+void __die_if_kernel(const char * str, struct pt_regs * regs, const char *file,
+ const char* function, unsigned long line)
{
if (!user_mode(regs))
- __die(str, regs, where, line);
+ __die(str, regs, file, function, line);
}
extern const struct exception_table_entry __start___dbe_table[];
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-02-19 23:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-19 22:33 [PATCH] remove die/die_if_kernel __FUNCTION__ cat for gcc 3.x's sake Bradley D. LaRonde <brad@ltc.com>
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox