This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Update comments in struct value for non-8-bits architectures


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3723fda829671b273d7b31a0753bb1fa8f614cb6

commit 3723fda829671b273d7b31a0753bb1fa8f614cb6
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Tue Jul 28 11:01:49 2015 -0400

    Update comments in struct value for non-8-bits architectures
    
    gdb/ChangeLog:
    
    	* value.c (struct value): Update comments.

Diff:
---
 gdb/ChangeLog |  4 ++++
 gdb/value.c   | 30 +++++++++++++++---------------
 2 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 380ff42..1e83384 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
 2015-07-28  Simon Marchi  <simon.marchi@ericsson.com>
 
+	* value.c (struct value): Update comments.
+
+2015-07-28  Simon Marchi  <simon.marchi@ericsson.com>
+
 	* gdbtypes.c (type_length_units): New function.
 	* gdbtypes.h (type_length_units): New declaration.
 	(struct type) <length>: Update comment.
diff --git a/gdb/value.c b/gdb/value.c
index 4399493..7fb7e2b 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -234,11 +234,11 @@ struct value
     } computed;
   } location;
 
-  /* Describes offset of a value within lval of a structure in bytes.
-     If lval == lval_memory, this is an offset to the address.  If
-     lval == lval_register, this is a further offset from
-     location.address within the registers structure.  Note also the
-     member embedded_offset below.  */
+  /* Describes offset of a value within lval of a structure in target
+     addressable memory units.  If lval == lval_memory, this is an offset to
+     the address.  If lval == lval_register, this is a further offset from
+     location.address within the registers structure.  Note also the member
+     embedded_offset below.  */
   int offset;
 
   /* Only used for bitfields; number of bits contained in them.  */
@@ -291,19 +291,19 @@ struct value
 
      When we store the entire object, `enclosing_type' is the run-time
      type -- the complete object -- and `embedded_offset' is the
-     offset of `type' within that larger type, in bytes.  The
-     value_contents() macro takes `embedded_offset' into account, so
-     most GDB code continues to see the `type' portion of the value,
-     just as the inferior would.
+     offset of `type' within that larger type, in target addressable memory
+     units.  The value_contents() macro takes `embedded_offset' into account,
+     so most GDB code continues to see the `type' portion of the value, just
+     as the inferior would.
 
      If `type' is a pointer to an object, then `enclosing_type' is a
      pointer to the object's run-time type, and `pointed_to_offset' is
-     the offset in bytes from the full object to the pointed-to object
-     -- that is, the value `embedded_offset' would have if we followed
-     the pointer and fetched the complete object.  (I don't really see
-     the point.  Why not just determine the run-time type when you
-     indirect, and avoid the special case?  The contents don't matter
-     until you indirect anyway.)
+     the offset in target addressable memory units from the full object
+     to the pointed-to object -- that is, the value `embedded_offset' would
+     have if we followed the pointer and fetched the complete object.
+     (I don't really see the point.  Why not just determine the
+     run-time type when you indirect, and avoid the special case?  The
+     contents don't matter until you indirect anyway.)
 
      If we're not doing anything fancy, `enclosing_type' is equal to
      `type', and `embedded_offset' is zero, so everything works


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]