11 * print the value of dot as file:line
18 if (fileline(str, STRINGSZ, dot))
19 Bprint(bioout, "%s", str);
23 printlocals(Symbol *fn, ulong fp)
29 for (i = 0; localsym(&s, i); i++) {
32 Bprint(bioout, "\t%s=#%lux\n", s.name, getmem_4(fp-s.value));
37 printparams(Symbol *fn, ulong fp)
43 fp += mach->szreg; /* skip saved pc */
45 for (first = i = 0; localsym(&s, i); i++) {
46 if (s.class != CPARAM)
50 Bprint(bioout, "%s=#%lux", s.name, getmem_4(fp+s.value));
55 #define STARTSYM "_main"
56 #define FRAMENAME ".frame"
69 while (findsym(pc, CTEXT, &s)) {
70 if(strcmp(STARTSYM, s.name) == 0) {
71 Bprint(bioout, "%s() at #%llux\n", s.name, s.value);
74 if (pc == s.value) /* at first instruction */
76 else if (findlocal(&s, FRAMENAME, &f) == 0)
78 if (s.type == 'L' || s.type == 'l' || pc <= s.value+4)
80 else pc = getmem_4(sp);
82 Bprint(bioout, "%s(", s.name);
85 Bprint(bioout, " called from ");
86 symoff(buf, sizeof(buf), pc-4, CTEXT);
93 Bprint(bioout, "(trace truncated)\n");