aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtypes.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-08-21 00:24:58 +0000
committerAndrew Cagney <cagney@redhat.com>2001-08-21 00:24:58 +0000
commit1c72f9b0c41ef5de822fce0d6faed9c69d40a589 (patch)
tree84904537e7a250b24a570a8c43ce4272de4ad383 /gdb/gdbtypes.h
parentca3f769514c0a9d770848a21267b29236225252f (diff)
downloadgdb-1c72f9b0c41ef5de822fce0d6faed9c69d40a589.zip
gdb-1c72f9b0c41ef5de822fce0d6faed9c69d40a589.tar.gz
gdb-1c72f9b0c41ef5de822fce0d6faed9c69d40a589.tar.bz2
* gdbtypes.h (struct type): Clarify meaning of field ``length''.
Diffstat (limited to 'gdb/gdbtypes.h')
-rw-r--r--gdb/gdbtypes.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index bc0f8fb..6869a60 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -231,13 +231,17 @@ struct type
char *tag_name;
- /* Length of storage for a value of this type. Various places pass
- this to memcpy and such, meaning it must be in units of
- HOST_CHAR_BIT. Various other places expect they can calculate
- addresses by adding it and such, meaning it must be in units of
+ /* Length of storage for a value of this type. This is of length
+ of the type as defined by the debug info and not the length of
+ the value that resides within the type. For instance, an
+ i386-ext floating-point value only occupies 80 bits of what is
+ typically a 12 byte `long double'. Various places pass this to
+ memcpy and such, meaning it must be in units of HOST_CHAR_BIT.
+ Various other places expect they can calculate addresses by
+ adding it and such, meaning it must be in units of
TARGET_CHAR_BIT. For some DSP targets, in which HOST_CHAR_BIT
- will (presumably) be 8 and TARGET_CHAR_BIT will be (say) 32, this
- is a problem. One fix would be to make this field in bits
+ will (presumably) be 8 and TARGET_CHAR_BIT will be (say) 32,
+ this is a problem. One fix would be to make this field in bits
(requiring that it always be a multiple of HOST_CHAR_BIT and
TARGET_CHAR_BIT)--the other choice would be to make it
consistently in units of HOST_CHAR_BIT. */