Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 119191
b: refs/heads/master
c: 966c8c1
h: refs/heads/master
i:
  119189: bae05ab
  119187: 0d7f9ad
  119183: 558e759
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Nov 20, 2008
1 parent 48764be commit 3d7986b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3fa59dfbc3b223f02c26593be69ce6fc9a940405
refs/heads/master: 966c8c12dc9e77f931e2281ba25d2f0244b06949
17 changes: 12 additions & 5 deletions trunk/kernel/kallsyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,17 +304,24 @@ int sprint_symbol(char *buffer, unsigned long address)
char *modname;
const char *name;
unsigned long offset, size;
char namebuf[KSYM_NAME_LEN];
int len;

name = kallsyms_lookup(address, &size, &offset, &modname, namebuf);
name = kallsyms_lookup(address, &size, &offset, &modname, buffer);
if (!name)
return sprintf(buffer, "0x%lx", address);

if (name != buffer)
strcpy(buffer, name);
len = strlen(buffer);
buffer += len;

if (modname)
return sprintf(buffer, "%s+%#lx/%#lx [%s]", name, offset,
size, modname);
len += sprintf(buffer, "+%#lx/%#lx [%s]",
offset, size, modname);
else
return sprintf(buffer, "%s+%#lx/%#lx", name, offset, size);
len += sprintf(buffer, "+%#lx/%#lx", offset, size);

return len;
}

/* Look up a kernel symbol and print it to the kernel messages. */
Expand Down

0 comments on commit 3d7986b

Please sign in to comment.