From: "Bradley D. LaRonde <brad@ltc.com>" <brad@ltc.com>
To: ralf@oss.sgi.com
Cc: linux-mips@oss.sgi.com
Subject: [PATCH] remove die/die_if_kernel __FUNCTION__ cat for gcc 3.x's sake
Date: Tue, 19 Feb 2002 17:33:02 -0500 [thread overview]
Message-ID: <20020219173302.A1989@dev1.ltc.com> (raw)
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[];
reply other threads:[~2002-02-19 23:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020219173302.A1989@dev1.ltc.com \
--to=brad@ltc.com \
--cc=linux-mips@oss.sgi.com \
--cc=ralf@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox