| ... | ... | @@ -1087,9 +1087,25 @@ const MachODumper = struct { |
| 1087 | 1087 | try writer.writeAll(symtab_label ++ "\n"); |
| 1088 | 1088 | |
| 1089 | 1089 | for (ctx.symtab.items) |sym| { |
| 1090 | | if (sym.stab()) continue; |
| 1091 | 1090 | const sym_name = ctx.getString(sym.n_strx); |
| 1092 | | if (sym.sect()) { |
| 1091 | if (sym.stab()) { |
| 1092 | const tt = switch (sym.n_type) { |
| 1093 | macho.N_SO => "SO", |
| 1094 | macho.N_OSO => "OSO", |
| 1095 | macho.N_BNSYM => "BNSYM", |
| 1096 | macho.N_ENSYM => "ENSYM", |
| 1097 | macho.N_FUN => "FUN", |
| 1098 | macho.N_GSYM => "GSYM", |
| 1099 | macho.N_STSYM => "STSYM", |
| 1100 | else => "UNKNOWN STAB", |
| 1101 | }; |
| 1102 | try writer.print("{x}", .{sym.n_value}); |
| 1103 | if (sym.n_sect > 0) { |
| 1104 | const sect = ctx.sections.items[sym.n_sect - 1]; |
| 1105 | try writer.print(" ({s},{s})", .{ sect.segName(), sect.sectName() }); |
| 1106 | } |
| 1107 | try writer.print(" {s} (stab) {s}\n", .{ tt, sym_name }); |
| 1108 | } else if (sym.sect()) { |
| 1093 | 1109 | const sect = ctx.sections.items[sym.n_sect - 1]; |
| 1094 | 1110 | try writer.print("{x} ({s},{s})", .{ |
| 1095 | 1111 | sym.n_value, |