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));
54 #define STARTSYM "_main"
55 #define FRAMENAME ".frame"
68 while (findsym(pc, CTEXT, &s)) {
69 if(strcmp(STARTSYM, s.name) == 0) {
70 Bprint(bioout, "%s() at #%llux\n", s.name, s.value);
73 if (pc == s.value) /* at first instruction */
75 else if (findlocal(&s, FRAMENAME, &f) == 0)
77 if (s.type == 'L' || s.type == 'l' || pc <= s.value+4)
79 else pc = getmem_4(sp);
81 Bprint(bioout, "%s(", s.name);
84 Bprint(bioout, " called from ");
85 symoff(buf, sizeof(buf), pc-8, CTEXT);
92 Bprint(bioout, "(trace truncated)\n");