acid: make 'a' and 'A' format to have the same size as mach->szaddr
to make it easier to write portable acid code, we introduce 'A' format in the same meaning as in db(1): A Print the value of dot in hexadecimal. Dot is unaffected. both 'a' (symbolic) and 'A' will both have 64 or 32 bit size depending on the mach, so pointer array indexing works the same.
This commit is contained in:
parent
9bdf602ebb
commit
16acf605e2
6 changed files with 26 additions and 17 deletions
|
@ -185,7 +185,7 @@ listvar(char *s, vlong v)
|
|||
l->string = strnode(s);
|
||||
l->next = al(TINT);
|
||||
l = l->next;
|
||||
l->fmt = 'X';
|
||||
l->fmt = 'A';
|
||||
l->ival = v;
|
||||
|
||||
return tl;
|
||||
|
@ -260,7 +260,7 @@ trlist(Map *map, uvlong pc, uvlong sp, Symbol *sym)
|
|||
l = al(TINT); /* Function address */
|
||||
q->l = l;
|
||||
l->ival = sym->value;
|
||||
l->fmt = 'X';
|
||||
l->fmt = 'A';
|
||||
|
||||
l->next = al(TINT); /* called from address */
|
||||
l = l->next;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue