comparison src/cli/userinterface.d @ 5:496dfd8f7342 default tip

added: -repeat option for "in", "ov" -run until a line option -run until a function option -break on a function start -n is an alias for ov
author marton@basel.hu
date Sun, 17 Apr 2011 11:05:31 +0200
parents 4a9dcbd9e54f
children
comparison
equal deleted inserted replaced
4:a5fb1bc967e6 5:496dfd8f7342
236 236
237 printAsmLine(address, hex[0..hexlen], ins[0..strlen(ins)], symbol, location, source); 237 printAsmLine(address, hex[0..hexlen], ins[0..strlen(ins)], symbol, location, source);
238 return true; 238 return true;
239 } 239 }
240 240
241 /********************************************************************************************** 241 /**********************************************************************************************
242 242 prints information about symbol (not recursive)
243 **********************************************************************************************/
244
245 void printSymbol( NamedSymbol ns, uint indent=0)
246 {
247
248 {
249
250
251 char[] indent_str;
252 indent_str.length = indent*2;
253 indent_str[0..indent*2] = ' ';
254 ClassInfo cs = ns.classinfo;
255 if ( cs == ProcedureSymbol.classinfo )
256 {
257 ProcedureSymbol ps = cast(ProcedureSymbol)ns;
258
259 DbgIO.println("%s%s %d arguments",
260 indent_str, ps.name_type, ps.arguments.symbols.length
261 );
262 }
263 else if ( cs == StackSymbol.classinfo ) {
264 StackSymbol ss = cast(StackSymbol)ns;
265 DbgIO.println("%s%s stack (%s) %x ebp%s%d", indent_str, ns.name_type, ns.mangled_name, ss.cvtype, ss.offset>=0?"+":"", ss.offset);
266 }
267 else if ( cs == DataSymbol.classinfo )
268 {
269 DataSymbol ds = cast(DataSymbol)ns;
270 DbgIO.println("%s%s (%s) data offset: 0x%x size: 0x%x segment: 0x%x type: 0x%x (%s)", indent_str, ds.name_type, ds.name_notype,
271 ds.offset, ds.size, ds.cvdata.segment, ds.cvdata.type, dbg.images.mangleCVtype(ds.cvdata.type)
272 );
273 }
274 else
275 DbgIO.println("%s%s %s", indent_str, ns.name_type, cs.name);
276 ScopeSymbol scs = cast(ScopeSymbol)ns;
277 //if ( scs !is null )
278 // printSymbols(cv, scs.symbols.named_symbols, indent+1);
279 }
280 }
281
282 /**********************************************************************************************
283 prints symbols that contain substring with indentation indent
243 **********************************************************************************************/ 284 **********************************************************************************************/
244 void printSymbols(CodeView cv, NamedSymbol[] syms, string substring=null, uint indent=0) 285 void printSymbols(CodeView cv, NamedSymbol[] syms, string substring=null, uint indent=0)
245 { 286 {
246 foreach ( ns; syms ) 287 foreach ( ns; syms )
247 { 288 {