public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2] Define an error function in the PPC simulator library.
@ 2017-04-05 16:34 John Baldwin
  2017-04-13 13:25 ` Luis Machado
  0 siblings, 1 reply; 12+ messages in thread
From: John Baldwin @ 2017-04-05 16:34 UTC (permalink / raw)
  To: gdb-patches

Previously this used the error function from GDB directly when linked
against GDB instead of the error method in the host callbacks
structure.  This was exposed via a link error when GDB was converted
to C++.  The error function invokes the error callback similar to
sim_io_error.

sim/ppc/ChangeLog:

	PR sim/20863
	* sim_calls.c (error): New function.
---
 sim/ppc/ChangeLog   |  5 +++++
 sim/ppc/sim_calls.c | 10 ++++++++++
 2 files changed, 15 insertions(+)

diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index c0bb1f5b8b..8ad90077c0 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,8 @@
+2017-04-04  John Baldwin  <jhb@FreeBSD.org>
+
+	PR sim/20863
+	* sim_calls.c (error): New function.
+
 2017-02-13  Mike Frysinger  <vapier@gentoo.org>
 
 	* cpu.h: Include libiberty.h.
diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c
index 470c95862a..eb5d1a792b 100644
--- a/sim/ppc/sim_calls.c
+++ b/sim/ppc/sim_calls.c
@@ -386,6 +386,16 @@ sim_io_error (SIM_DESC sd, const char *fmt, ...)
 
 /****/
 
+void NORETURN
+error (const char *msg, ...)
+{
+  va_list ap;
+  va_start(ap, msg);
+  callbacks->evprintf_filtered (callbacks, msg, ap);
+  va_end(ap);
+  callbacks->error (callbacks, "");
+}
+
 void *
 zalloc(long size)
 {
-- 
2.11.0

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-09-05 19:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-05 16:34 [PATCH v2] Define an error function in the PPC simulator library John Baldwin
2017-04-13 13:25 ` Luis Machado
2017-04-14 18:02   ` John Baldwin
2017-05-05 19:51     ` John Baldwin
2017-05-19 16:28       ` [PING] " John Baldwin
2017-06-06 17:49         ` John Baldwin
2017-06-23  6:39           ` Sebastian Huber
2017-09-04 14:19     ` Pedro Alves
2017-09-05  3:00       ` John Baldwin
2017-09-05  9:14         ` Pedro Alves
2017-09-05 11:46           ` John Baldwin
2017-09-05 19:38             ` Joel Brobecker

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).