Update comment for struct type's length field, introduce type_length_units
authorSimon Marchi <simon.marchi@ericsson.com>
Tue, 28 Jul 2015 15:01:49 +0000 (11:01 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Tue, 28 Jul 2015 15:01:49 +0000 (11:01 -0400)
commit2e0569314c2ee9e5635899d47b0bc0a4b9b08d8d
tree6a2b5fda58c71d5f91502bbb768f411245d87d46
parentc6e5c03a2c0dfa224a71056ede035476e511f5fc
Update comment for struct type's length field, introduce type_length_units

This patch tries to clean up a bit the blur around the length field in
struct type, regarding its use with architectures with non-8-bits
addressable memory.  It clarifies that the field is expressed in host
bytes, which is what is the closest to the current reality.

It also introduces a new function to get the length of the type in
target addressable memory units.

gdb/ChangeLog:

* gdbtypes.c (type_length_units): New function.
* gdbtypes.h (type_length_units): New declaration.
(struct type) <length>: Update comment.
gdb/ChangeLog
gdb/gdbtypes.c
gdb/gdbtypes.h