Only show exact symbol matches in disassembly.

This commit is contained in:
Daniel Beer 2010-03-28 17:13:42 +13:00
parent 0c3389f084
commit 9afbc30778
1 changed files with 2 additions and 4 deletions

6
dis.c
View File

@ -520,13 +520,11 @@ static int format_addr(char *buf, int max_len, const char *prefix,
u_int16_t addr)
{
char name[64];
u_int16_t offset;
if (stab_nearest(addr, name, sizeof(name), &addr) < 0)
if (stab_nearest(addr, name, sizeof(name), &offset) < 0 || offset)
return snprintf(buf, max_len, "%s0x%04x", prefix, addr);
if (addr)
return snprintf(buf, max_len, "%s%s+0x%x", prefix, name, addr);
return snprintf(buf, max_len, "%s%s", prefix, name);
}