10 * print the value of dot as file:line
17 if (fileline(str, STRINGSZ, dot))
18 Bprint(bioout, "%s", str);
22 printlocals(Symbol *fn, ulong fp)
28 for (i = 0; localsym(&s, i); i++) {
31 Bprint(bioout, "\t%s=#%lux\n", s.name, getmem_4(fp-s.value));
36 printparams(Symbol *fn, ulong fp)
42 fp += mach->szreg; /* skip saved pc */
44 for (first = i = 0; localsym(&s, i); i++) {
45 if (s.class != CPARAM)
49 Bprint(bioout, "%s=#%lux", s.name, getmem_4(fp+s.value));
53 #define STARTSYM "_main"
54 #define FRAMENAME ".frame"
67 while (findsym(pc, CTEXT, &s)) {
68 if(strcmp(STARTSYM, s.name) == 0) {
69 Bprint(bioout, "%s() at #%llux\n", s.name, s.value);
72 if (pc == s.value) /* at first instruction */
74 else if (findlocal(&s, FRAMENAME, &f) == 0)
76 if (s.type == 'L' || s.type == 'l' || pc <= s.value+4)
78 else pc = getmem_4(sp);
80 Bprint(bioout, "%s(", s.name);
83 Bprint(bioout, " called from ");
84 symoff(buf, sizeof(buf), pc-8, CTEXT);
91 Bprint(bioout, "(trace truncated)\n");