Skip to content

Commit

Permalink
"Quiet mode" is now turned off, if dropping into the debugger, both b…
Browse files Browse the repository at this point in the history
…y using -V and by triggering unimplemented instructions.

git-svn-id: file:///home/ryo_on/repos/gxemul-repo/gxemul/trunk@5660 dbbdf1f2-f3a0-11dc-8807-f0e41a653009
  • Loading branch information
debug committed Jan 31, 2010
1 parent f1ee165 commit d8a1c64
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
2 changes: 2 additions & 0 deletions HISTORY
Original file line number Diff line number Diff line change
Expand Up @@ -4442,3 +4442,5 @@ Changelog for GXemul:
Renaming old testmips to oldtestmips, so that the name
testmips can be used by the new framework.
20100131 Reimplementing a slow version of the st.d M88K instruction.
"Quiet mode" is now turned off, if dropping into the debugger,
both by using -V and by triggering unimplemented instructions.
12 changes: 9 additions & 3 deletions man/gxemul.1
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,13 @@ Remember to use quotes if your shell gives special meaning to parentheses.
.It Fl H
Display a list of available machine templates.
.It Fl q
Quiet mode (suppress debug messages).
Start up in Quiet mode (i.e. suppress debug messages). If an error occurs
during emulation which stops execution and drops the user into the debugger,
quiet mode is turned off.
.It Fl V
Start up in interactive mode, paused.
Start up in interactive mode, paused. If this option is used,
.Fl q
is ignored.
.El
.Pp
Any files supplied on the command line when using the
Expand Down Expand Up @@ -447,7 +451,9 @@ Force the single-step debugger to be entered at the end of a simulation.
.It Fl q
Quiet mode; this suppresses startup messages.
.It Fl V
Start up in the single-step debugger, paused.
Start up in the single-step debugger, paused. If this option is used,
.Fl q
is ignored.
.It Fl v
Increase verbosity (show more debug messages). This option can be used
multiple times.
Expand Down
8 changes: 7 additions & 1 deletion src/components/cpu/CPUDyntransComponent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,14 @@ void CPUDyntransComponent::DyntransToBeTranslatedDone(struct DyntransIC* ic)

if (ic->f == NULL || ic->f == instr_abort_in_delay_slot) {
abort = true;
UI* ui = GetUI();

// Instruction translation failed. If we were running in
// quiet mode, then simply dropping into the GXemul> prompt
// with no good explanation would be bad, so we always turn
// off quiet mode on Aborts:
GetRunningGXemulInstance()->SetQuietMode(false);

UI* ui = GetUI();
if (ui != NULL) {
bool isSingleStepping = GetRunningGXemulInstance()->GetRunState() == GXemul::SingleStepping;

Expand Down
4 changes: 4 additions & 0 deletions src/old_main/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,10 @@ int get_cmd_args(int argc, char *argv[], struct emul *emul,
extra_argc = argc;
extra_argv = argv;

// If -V is used, -q is ignored.
if (single_step == ENTER_SINGLE_STEPPING)
quiet_mode = 0;

if (type == NULL && subtype == NULL &&
(single_step == ENTER_SINGLE_STEPPING || argc > 0)) {
int res = 0;
Expand Down

0 comments on commit d8a1c64

Please sign in to comment.