Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFA: correctly compute addresses of embedded objects
@ 2001-05-18 17:29 Jim Blandy
  2001-05-18 18:10 ` Daniel Berlin
  0 siblings, 1 reply; 3+ messages in thread
From: Jim Blandy @ 2001-05-18 17:29 UTC (permalink / raw)
  To: gdb-patches

2001-05-17  Jim Blandy  <jimb@redhat.com>

	* valops.c (value_addr): Don't include VALUE_EMBEDDED_OFFSET in
	the pointer value we return.  It should point at the embedded
	object ARG1 represents, not at the enclosing object ARG1 might
	also be holding.

*** gdb/valops.c.base~	Tue Apr 24 13:50:06 2001
--- gdb/valops.c	Thu May 17 14:58:14 2001
***************
*** 960,967 ****
    /* Get target memory address */
    arg2 = value_from_pointer (lookup_pointer_type (VALUE_TYPE (arg1)),
  			     (VALUE_ADDRESS (arg1)
! 			      + VALUE_OFFSET (arg1)
! 			      + VALUE_EMBEDDED_OFFSET (arg1)));
  
    /* This may be a pointer to a base subobject; so remember the
       full derived object's type ... */
--- 960,966 ----
    /* Get target memory address */
    arg2 = value_from_pointer (lookup_pointer_type (VALUE_TYPE (arg1)),
  			     (VALUE_ADDRESS (arg1)
! 			      + VALUE_OFFSET (arg1)));
  
    /* This may be a pointer to a base subobject; so remember the
       full derived object's type ... */


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-05-20 13:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-18 17:29 RFA: correctly compute addresses of embedded objects Jim Blandy
2001-05-18 18:10 ` Daniel Berlin
2001-05-20 13:06   ` Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox