dumpstack: x86: make printk_address equal
- x86_64: use %p to print an address - make i386-version the same as the above The result should be the same on x86_64; on i386 the output only changes if CONFIG_KALLSYMS is turned off, in which case the address is printed twice. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
dd6e4eba1c
commit
161827903b
|
@ -23,31 +23,8 @@ static int die_counter;
|
||||||
|
|
||||||
void printk_address(unsigned long address, int reliable)
|
void printk_address(unsigned long address, int reliable)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_KALLSYMS
|
printk(" [<%p>] %s%pS\n", (void *) address,
|
||||||
unsigned long offset = 0;
|
reliable ? "" : "? ", (void *) address);
|
||||||
unsigned long symsize;
|
|
||||||
const char *symname;
|
|
||||||
char *modname;
|
|
||||||
char *delim = ":";
|
|
||||||
char namebuf[KSYM_NAME_LEN];
|
|
||||||
char reliab[4] = "";
|
|
||||||
|
|
||||||
symname = kallsyms_lookup(address, &symsize, &offset,
|
|
||||||
&modname, namebuf);
|
|
||||||
if (!symname) {
|
|
||||||
printk(" [<%08lx>]\n", address);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!reliable)
|
|
||||||
strcpy(reliab, "? ");
|
|
||||||
|
|
||||||
if (!modname)
|
|
||||||
modname = delim = "";
|
|
||||||
printk(" [<%08lx>] %s%s%s%s%s+0x%lx/0x%lx\n",
|
|
||||||
address, reliab, delim, modname, delim, symname, offset, symsize);
|
|
||||||
#else
|
|
||||||
printk(" [<%08lx>]\n", address);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int valid_stack_ptr(struct thread_info *tinfo,
|
static inline int valid_stack_ptr(struct thread_info *tinfo,
|
||||||
|
|
|
@ -23,8 +23,8 @@ static int die_counter;
|
||||||
|
|
||||||
void printk_address(unsigned long address, int reliable)
|
void printk_address(unsigned long address, int reliable)
|
||||||
{
|
{
|
||||||
printk(" [<%016lx>] %s%pS\n",
|
printk(" [<%p>] %s%pS\n", (void *) address,
|
||||||
address, reliable ? "" : "? ", (void *) address);
|
reliable ? "" : "? ", (void *) address);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack,
|
static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack,
|
||||||
|
|
Loading…
Reference in a new issue