// Raw direct call to Player public static void doShowVariable(DebugCLI cli) { cli.waitTilHalted(); try { // an integer followed by a variable name Session session = cli.Session; int id = cli.nextIntToken(); String name = (cli.hasMoreTokens())?cli.nextToken():null; System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append(name); sb.Append(" = "); //$NON-NLS-1$ Value v = ((PlayerSession)session).getValue(id, name); ExpressionCache.appendVariableValue(sb, v); cli.output(sb.ToString()); } catch (NullReferenceException) { cli.err(LocalizationManager.getLocalizedTextString("key26")); //$NON-NLS-1$ } }
/// <summary> Dump the break reason and offset</summary> public static void doShowBreak(DebugCLI cli) { cli.waitTilHalted(); try { Session session = cli.Session; System.Text.StringBuilder sb = new System.Text.StringBuilder(); if (session.Suspended) { sb.Append(LocalizationManager.getLocalizedTextString("stopped")); //$NON-NLS-1$ sb.Append(' '); appendBreakInfo(cli, sb, true); } else { sb.Append(LocalizationManager.getLocalizedTextString("key24")); //$NON-NLS-1$ } cli.output(sb.ToString()); } catch (NullReferenceException) { cli.err(LocalizationManager.getLocalizedTextString("key25")); //$NON-NLS-1$ } }