public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH/committed] sim: iq2000: add fallback for exit syscall
@ 2023-12-21  6:45 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2023-12-21  6:45 UTC (permalink / raw)
  To: gdb-patches

Make sure this syscall always exits regardless of the exit code.
---
 sim/iq2000/iq2000.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sim/iq2000/iq2000.c b/sim/iq2000/iq2000.c
index 087646b59b00..f35e91e83bae 100644
--- a/sim/iq2000/iq2000.c
+++ b/sim/iq2000/iq2000.c
@@ -77,6 +77,9 @@ do_syscall (SIM_CPU *current_cpu, PCADDR pc)
 	  /* Fail.  */
 	  puts ("fail");
 	  exit (1);
+	default:
+	  puts ("unknown exit");
+	  exit (2);
 	}
 
     case TARGET_NEWLIB_SYS_write:
-- 
2.43.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-21  6:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-21  6:45 [PATCH/committed] sim: iq2000: add fallback for exit syscall Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).