Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: tromey@redhat.com
Cc: Pierre Muller <muller@ics.u-strasbg.fr>, gdb-patches@sourceware.org
Subject: Re: [RFA] Build failure fix: Python troubles on non-python targets...
Date: Thu, 28 May 2009 16:31:00 -0000	[thread overview]
Message-ID: <8ac60eac0905280931k3ddbfd52q184e39395e85ad96@mail.gmail.com> (raw)
In-Reply-To: <m3bppdtf9p.fsf@fleche.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 705 bytes --]

On Thu, May 28, 2009 at 8:32 AM, Tom Tromey <tromey@redhat.com> wrote:

> Ok with that change.  Thanks.

The patch was line-wrapped and missing change to configure.

Also moving HAVE_PYTHON down revealed a bug: the signature of of
apply_val_pretty_printer has changed, but the prototype in the !HAVE_PYTHON
was not updated.

Attached is the patch I just committed.

-- 
Paul Pluzhnikov


2009-05-28  Pierre Muller  <muller@ics.u-strasbg.fr>
	    Paul Pluzhnikov  <ppluzhnikov@google.com>

	* configure.ac (!have_libpython): Add python-prettyprint source
	and object files.
	* configure: Regenerate.
	* python/python-prettyprint.c: Move "#ifdef HAVE_PYTHON" before
	python headers.

[-- Attachment #2: gdb-python-20090528.txt --]
[-- Type: text/plain, Size: 2706 bytes --]

Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/configure.ac,v
retrieving revision 1.101
diff -u -p -u -r1.101 configure.ac
--- configure.ac	23 Apr 2009 21:28:19 -0000	1.101
+++ configure.ac	28 May 2009 16:21:19 -0000
@@ -685,8 +685,8 @@ if test "${have_libpython}" = yes; then
 else
   # Even if Python support is not compiled in, we need to have these files
   # included in order to recognize the GDB command "python".
-  CONFIG_OBS="$CONFIG_OBS python.o python-value.o"
-  CONFIG_SRCS="$CONFIG_SRCS python/python.c python/python-value.c"
+  CONFIG_OBS="$CONFIG_OBS python.o python-value.o python-prettyprint.o"
+  CONFIG_SRCS="$CONFIG_SRCS python/python.c python/python-value.c python/python-prettyprint.c"
 fi
 AC_SUBST(PYTHON_CFLAGS)
 
Index: configure
===================================================================
RCS file: /cvs/src/src/gdb/configure,v
retrieving revision 1.282
diff -u -p -u -r1.282 configure
--- configure	6 May 2009 23:05:27 -0000	1.282
+++ configure	28 May 2009 16:21:20 -0000
@@ -11907,8 +11907,8 @@ echo "${ECHO_T}${PYTHON_CFLAGS}" >&6
 else
   # Even if Python support is not compiled in, we need to have these files
   # included in order to recognize the GDB command "python".
-  CONFIG_OBS="$CONFIG_OBS python.o python-value.o"
-  CONFIG_SRCS="$CONFIG_SRCS python/python.c python/python-value.c"
+  CONFIG_OBS="$CONFIG_OBS python.o python-value.o python-prettyprint.o"
+  CONFIG_SRCS="$CONFIG_SRCS python/python.c python/python-value.c python/python-prettyprint.c"
 fi
 
 
Index: python/python-prettyprint.c
===================================================================
RCS file: /cvs/src/src/gdb/python/python-prettyprint.c,v
retrieving revision 1.2
diff -u -p -u -r1.2 python-prettyprint.c
--- python/python-prettyprint.c	28 May 2009 01:09:20 -0000	1.2
+++ python/python-prettyprint.c	28 May 2009 16:21:20 -0000
@@ -23,10 +23,12 @@
 #include "symtab.h"
 #include "language.h"
 #include "valprint.h"
+
 #include "python.h"
-#include "python-internal.h"
 
 #ifdef HAVE_PYTHON
+#include "python-internal.h"
+
 
 /* Helper function for find_pretty_printer which iterates over a list,
    calls each function and inspects output.  This will return a
@@ -587,9 +589,8 @@ gdbpy_default_visualizer (PyObject *self
 int
 apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr,
 			  int embedded_offset, CORE_ADDR address,
-			  struct ui_file *stream, int format,
-			  int deref_ref, int recurse,
-			  enum val_prettyprint pretty,
+			  struct ui_file *stream, int recurse,
+			  const struct value_print_options *options,
 			  const struct language_defn *language)
 {
   return 0;

      parent reply	other threads:[~2009-05-28 16:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-28 10:03 Pierre Muller
2009-05-28 14:56 ` Paul Pluzhnikov
2009-05-28 15:38 ` Tom Tromey
2009-05-28 16:22   ` Pierre Muller
2009-05-28 16:23     ` Paul Pluzhnikov
2009-05-28 16:37     ` Tom Tromey
2009-05-28 16:31   ` Paul Pluzhnikov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8ac60eac0905280931k3ddbfd52q184e39395e85ad96@mail.gmail.com \
    --to=ppluzhnikov@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=muller@ics.u-strasbg.fr \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox