]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: mn10300: fix sim_engine_halt call
authorMike Frysinger <vapier@gentoo.org>
Tue, 5 Dec 2023 12:56:52 +0000 (07:56 -0500)
committerMike Frysinger <vapier@gentoo.org>
Tue, 5 Dec 2023 12:56:52 +0000 (07:56 -0500)
The sim_stop argument is an enum and should only be one of those
values, not a signal constant.  Fix the logic to pass the right
sim_xxx & SIM_xxx values in the right arguments.

sim/mn10300/op_utils.c

index 5425537dc1def519c09ad1f6a39c8dc9eb2fd0c5..5cb4158efd9e588340f71f57b8e61bdcb3183ea1 100644 (file)
@@ -155,7 +155,8 @@ do_syscall (SIM_DESC sd)
     {
       /* EXIT - caller can look in parm1 to work out the reason */
       sim_engine_halt (simulator, STATE_CPU (simulator, 0), NULL, PC,
-                      (parm1 == 0xdead ? SIM_SIGABRT : sim_exited), parm1);
+                      parm1 == 0xdead ? sim_stopped : sim_exited,
+                      parm1 == 0xdead ? SIM_SIGABRT : parm1);
     }
   else
     {