summaryrefslogtreecommitdiff
path: root/rtl-debugger.c
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2012-04-25 10:12:19 +1000
committerChris Johns <chrisj@rtems.org>2012-04-25 10:12:19 +1000
commit673b40c95705127635af12bda15694fd6ab5a96b (patch)
tree5c243823cf495ba3702773f94b275a442ac218de /rtl-debugger.c
Import the current project to git.
Diffstat (limited to 'rtl-debugger.c')
-rw-r--r--rtl-debugger.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/rtl-debugger.c b/rtl-debugger.c
new file mode 100644
index 0000000..d6360ef
--- /dev/null
+++ b/rtl-debugger.c
@@ -0,0 +1,41 @@
+/*
+ * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+/**
+ * @file
+ *
+ * @ingroup rtl
+ *
+ * @brief RTEMS Module Loading Debugger Interface.
+ *
+ * Inspection of run-time linkers in NetBSD and Android show a common type of
+ * structure that is used to interface to GDB. The NetBSD definition of this
+ * interface is being used and is defined in <link.h>. It defines a protocol
+ * that is used by GDB to inspect the state of dynamic libraries. I have not
+ * checked GDB code at when writing this comment but I suspect GDB sets a break
+ * point on the r_brk field of _rtld_debug and it has code that detects this
+ * break point being hit. When this happens it reads the state and performs the
+ * operation based on the r_state field.
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <link.h>
+
+struct r_debug _rtld_debug;
+
+void
+_rtld_debug_state (void)
+{
+ /*
+ * Empty. GDB only needs to hit this location.
+ */
+}