Expand symbols for indexed addressing, allow . and : in symbols.
This commit is contained in:
parent
9afbc30778
commit
749faf4107
10
dis.c
10
dis.c
|
@ -544,8 +544,14 @@ static int format_operand(char *buf, int max_len,
|
|||
return snprintf(buf, max_len, "%s", msp430_reg_names[reg]);
|
||||
|
||||
case MSP430_AMODE_INDEXED:
|
||||
return snprintf(buf, max_len, "0x%x(%s)", (u_int16_t)addr,
|
||||
msp430_reg_names[reg]);
|
||||
{
|
||||
int len = format_addr(buf, max_len, "", addr);
|
||||
|
||||
len += snprintf(buf + len,
|
||||
max_len - len,
|
||||
"(%s)", msp430_reg_names[reg]);
|
||||
return len;
|
||||
}
|
||||
|
||||
case MSP430_AMODE_SYMBOLIC:
|
||||
return format_addr(buf, max_len, "", addr);
|
||||
|
|
3
stab.c
3
stab.c
|
@ -293,7 +293,8 @@ int stab_parse(const char *text, int *addr)
|
|||
token_sum = 0;
|
||||
|
||||
while (*text) {
|
||||
if (isalnum(*text) || *text == '_' || *text == '$') {
|
||||
if (isalnum(*text) || *text == '_' || *text == '$' ||
|
||||
*text == '.' || *text == ':') {
|
||||
if (token_len + 1 < sizeof(token_buf))
|
||||
token_buf[token_len++] = *text;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue