public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v1 12/13] script language API for GDB: preserve_values changes
@ 2013-12-06  5:53 xdje42
  0 siblings, 0 replies; only message in thread
From: xdje42 @ 2013-12-06  5:53 UTC (permalink / raw)
  To: gdb-patches

This patch contains the changes for preserving values.
They're pretty simple and straightforward.

2013-12-05  Doug Evans  <xdje42@gmail.com>

	* value.c (preserve_values): Update to call preserve_script_values.
	* python/py-value.c: Remove #ifdef HAVE_PYTHON.
	(gdbpy_preserve_values): Renamed from preserve_python_values.
	New arg slang.
	(!HAVE_PYTHON, preserve_python_values): Delete.

diff --git a/gdb/value.c b/gdb/value.c
index a64e7e1..7e3357a 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -2266,7 +2266,7 @@ preserve_values (struct objfile *objfile)
   for (var = internalvars; var; var = var->next)
     preserve_one_internalvar (var, objfile, copied_types);
 
-  preserve_python_values (objfile, copied_types);
+  preserve_script_values (objfile, copied_types);
 
   htab_delete (copied_types);
 }
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index 40254b9..de0f764 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -30,8 +30,6 @@
 #include "cp-abi.h"
 #include "python.h"
 
-#ifdef HAVE_PYTHON
-
 #include "python-internal.h"
 
 /* Even though Python scalar types directly map to host types, we use
@@ -163,7 +161,8 @@ valpy_new (PyTypeObject *subtype, PyObject *args, PyObject *keywords)
 /* Iterate over all the Value objects, calling preserve_one_value on
    each.  */
 void
-preserve_python_values (struct objfile *objfile, htab_t copied_types)
+gdbpy_preserve_values (const struct script_language_defn *slang,
+		       struct objfile *objfile, htab_t copied_types)
 {
   value_object *iter;
 
@@ -1530,13 +1529,3 @@ PyTypeObject value_object_type = {
   0,				  /* tp_alloc */
   valpy_new			  /* tp_new */
 };
-
-#else
-
-void
-preserve_python_values (struct objfile *objfile, htab_t copied_types)
-{
-  /* Nothing.  */
-}
-
-#endif /* HAVE_PYTHON */

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

only message in thread, other threads:[~2013-12-06  5:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-06  5:53 [PATCH v1 12/13] script language API for GDB: preserve_values changes xdje42

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