From: Michael Snyder <msnyder@vmware.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: "tromey@redhat.com" <tromey@redhat.com>,
Vladimir Prus <vladimir@codesourcery.com>,
"gdb@sources.redhat.com" <gdb@sources.redhat.com>
Subject: Re: Private data members
Date: Wed, 29 Jul 2009 22:39:00 -0000 [thread overview]
Message-ID: <4A70CDB4.2040206@vmware.com> (raw)
In-Reply-To: <m21vnzduh3.fsf@igel.home>
Andreas Schwab wrote:
> Michael Snyder <msnyder@vmware.com> writes:
>
>> Define struct breakpoint in breakpoint.h, put any public members
>> in there, and then include a member "struct breakpoint_private"
>> that is only a forward declaration.
>
> That only works if this member is a pointer. You cannot have struct
> members with incomplete types.
Right. But that can still be done, because we have a local allocator.
Breakpoint structs are created by set_raw_breakpoint_without_location,
a static function, and the exported interface is set_raw_breakpoint.
As long as nobody outside of breakpoint.c allocates a struct bp,
I don't see why it shouldn't work.
prev parent reply other threads:[~2009-07-29 22:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-29 8:45 Vladimir Prus
2009-07-29 13:39 ` Daniel Jacobowitz
2009-07-29 13:41 ` Vladimir Prus
2009-07-29 16:18 ` Samuel Bronson
2009-07-29 16:50 ` Vladimir Prus
2009-07-29 15:32 ` Tom Tromey
2009-07-29 17:30 ` Michael Snyder
2009-07-29 21:56 ` Andreas Schwab
2009-07-29 22:39 ` Michael Snyder [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=4A70CDB4.2040206@vmware.com \
--to=msnyder@vmware.com \
--cc=gdb@sources.redhat.com \
--cc=schwab@linux-m68k.org \
--cc=tromey@redhat.com \
--cc=vladimir@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