Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org, Joel Brobecker <brobecker@adacore.com>
Subject: Re: [RFA/Python] Fix procfs.c build failure on 32bit solaris (_FILE_OFFSET_BITS)
Date: Tue, 23 Nov 2010 15:22:00 -0000	[thread overview]
Message-ID: <m3lj4k3w1m.fsf@fleche.redhat.com> (raw)
In-Reply-To: <201011231242.44422.pedro@codesourcery.com> (Pedro Alves's	message of "Tue, 23 Nov 2010 12:42:44 +0000")

>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:

Pedro>     /* With a Python scripting enabled GDB, store a reference to the
Pedro>        Python object that has been associated with this breakpoint.
Pedro>        This is always NULL for a GDB that is not script enabled.  It
Pedro>        can sometimes be NULL for enabled GDBs as not all breakpoint
Pedro>        types are tracked by the Python scripting API.  */
Pedro>     PyObject *py_bp_object;

Pedro> Given that we only need to hold a pointer to this, thus the PyObject
Pedro> need not be complete at this point, can we forward declare PyObject
Pedro> instead somehow?

Python defines it as a typedef for "struct _object *".  Yuck -- I'd
rather not copy that into our code.

Pedro> If not, can we perhaps come up with a wrapper type that itself
Pedro> can be forward declared?  Or fallback to void* if nothing else
Pedro> cleaner is possible?

Either of these works for me.

Pedro> The advantage would be that python-internal.h would then only be
Pedro> included in the specific modules that require it, in other words,
Pedro> it would be moved to breakpoint.c.

I think this would be good.  Python has turned out to be unclean enough
that it is better to work around its problems systematically.

Tom


  reply	other threads:[~2010-11-23 15:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23  1:14 Joel Brobecker
2010-11-23  3:25 ` Jan Kratochvil
2010-11-23 12:42 ` Pedro Alves
2010-11-23 15:22   ` Tom Tromey [this message]
2010-11-23 16:29     ` Pedro Alves
2010-11-23 17:23       ` Phil Muldoon
2010-11-23 17:47         ` Pedro Alves
2010-11-24 17:20       ` Joel Brobecker
2010-11-25 13:12         ` Pedro Alves
2010-11-24 18:25       ` Tom Tromey

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=m3lj4k3w1m.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.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