diff options
author | Joel Brobecker <brobecker@adacore.com> | 2015-03-24 11:14:13 -0700 |
---|---|---|
committer | Joel Brobecker <brobecker@adacore.com> | 2015-03-24 11:25:46 -0700 |
commit | 283a99589a0780a3b1fc011885b630bd9223ebba (patch) | |
tree | 6416ff1ce3ab2294060896c9232e51c7001ff761 /gdb/ChangeLog | |
parent | 93a8e2276fadd7dbb323d7cf4b082c33b32073d5 (diff) | |
download | gdb-283a99589a0780a3b1fc011885b630bd9223ebba.zip gdb-283a99589a0780a3b1fc011885b630bd9223ebba.tar.gz gdb-283a99589a0780a3b1fc011885b630bd9223ebba.tar.bz2 |
Do not make "prop" field of struct dynamic_prop_list a pointer.
struct dynamic_prop_list is declared as follow:
struct dynamic_prop_list
{
[...]
/* The dynamic property itself. */
struct dynamic_prop *prop;
[...]
};
In this case, the pointer indirection is unnecessary and costing us,
for each dynamic property, the memory needed to store one pointer.
This patch removes this pointer indirection, savin us a tiny bit of
memory, as well as reduces a bit the complexity by removing the need
to allocate memory for the property, as the allocation is now part
of the struct itself.
gdb/ChangeLog:
* gdbtypes.h (struct dynamic_prop_list) <prop>: Remove
pointer indirection.
* gdbtypes.c (get_dyn_prop): Adjust, following change above.
(add_dyn_prop, copy_dynamic_prop_list): Likewise.
Tested on x86_64-linux.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r-- | gdb/ChangeLog | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 78ccc8a..43dda55 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2015-03-24 Joel Brobecker <brobecker@adacore.com> + * gdbtypes.h (struct dynamic_prop_list) <prop>: Remove + pointer indirection. + * gdbtypes.c (get_dyn_prop): Adjust, following change above. + (add_dyn_prop, copy_dynamic_prop_list): Likewise. + +2015-03-24 Joel Brobecker <brobecker@adacore.com> + * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_DATA_LOCATION>: Renames DYN_ATTR_DATA_LOCATION. (TYPE_DATA_LOCATION): Use DYN_PROP_DATA_LOCATION instead of |