Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: Jim Blandy <jimb@codesourcery.com>,
	gdb-patches@sourceware.org,
		Vladimir Prus <vladimir@codesourcery.com>
Subject: Re: [RFA][2/5] New port: Cell BE SPU (valops.c fix)
Date: Wed, 06 Dec 2006 16:43:00 -0000	[thread overview]
Message-ID: <20061206164303.GA755@nevyn.them.org> (raw)
In-Reply-To: <200612061629.kB6GTROh021274@d12av02.megacenter.de.ibm.com>

On Wed, Dec 06, 2006 at 05:29:27PM +0100, Ulrich Weigand wrote:
> The patch I proposed to remember the type of the value residing
> in the register would allow all the above cases to work without
> changes to architecture code, and would in fact work correctly
> with any conceivable implementation of the current r_t_v / v_t_r
> interface.  However, it does have the disadvantage of requiring
> an additional field in struct value.  (Maybe we can make up that
> loss -- do we actually still require VALUE_ADDRESS for register
> values?)
> 
> Any suggestions?

Vladimir has actually been working on a similar change for a different
purpose.  He added a "parent value" pointer to values; bitfields then
are accessed by reading the enclosing structure and extracting bits
from value_contents.

I've been kind of waffling on Vladimir's patch because it has a nasty
bug that I just can't find any way to fix.  Adding pointers between
values messes up release_value / value_free; either we leak values or
we access uninitialized memory, or both.  As Vladimir has pointed out
several times, what we really need is a shared_ptr :-)

What do you think?  Would this solve the same problem as your patch?
Any bright ideas on the memory management?  We could always go whole
hog and add a refcount... I realize now that if we only need to
reference count one reference for whoever called release_value (or
being on the value chain) and one per child field, it wouldn't
be too hard.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-12-06 16:43 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-11 18:38 Ulrich Weigand
2006-11-22 14:15 ` [PING] " Ulrich Weigand
2006-11-22 14:23 ` Daniel Jacobowitz
2006-11-22 19:25   ` Jim Blandy
2006-11-22 19:28     ` Daniel Jacobowitz
2006-11-22 19:55       ` Ulrich Weigand
2006-11-22 20:30         ` Daniel Jacobowitz
2006-11-22 20:43           ` Ulrich Weigand
2006-11-22 20:57             ` Daniel Jacobowitz
2006-11-22 22:13               ` Ulrich Weigand
2006-11-22 22:48                 ` Daniel Jacobowitz
2006-11-23 13:57                   ` Ulrich Weigand
2006-11-23 16:16                     ` Daniel Jacobowitz
2006-11-23 17:55                       ` Ulrich Weigand
2006-11-23 19:59                         ` Mark Kettenis
2006-11-24  2:08                           ` Daniel Jacobowitz
2006-11-24 15:51                             ` Ulrich Weigand
2006-11-28 14:56                               ` Daniel Jacobowitz
2006-11-27 19:31                         ` Jim Blandy
2006-11-27 22:06                           ` Ulrich Weigand
2006-11-27 22:31                             ` Jim Blandy
2006-11-27 23:23                               ` Ulrich Weigand
2006-11-27 23:59                                 ` Jim Blandy
2006-11-28  0:01                                 ` Daniel Jacobowitz
2006-12-06 16:29                                   ` Ulrich Weigand
2006-12-06 16:43                                     ` Daniel Jacobowitz [this message]
2006-12-06 17:10                                       ` Ulrich Weigand
2006-12-06 17:12                                         ` Daniel Jacobowitz
2006-12-07  6:34                                           ` Vladimir Prus
2006-12-06 21:21                                     ` Jim Blandy
2006-12-06 22:02                                       ` Daniel Jacobowitz
2006-12-06 23:24                                         ` Jim Blandy
2006-12-06 23:16                                       ` Ulrich Weigand
2006-12-06 23:39                                         ` Jim Blandy
2006-12-08 15:50                                           ` Ulrich Weigand

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=20061206164303.GA755@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jimb@codesourcery.com \
    --cc=uweigand@de.ibm.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