aboutsummaryrefslogtreecommitdiff
path: root/gdb/ChangeLog
diff options
context:
space:
mode:
authorAndreas Arnez <arnez@linux.vnet.ibm.com>2017-06-13 15:20:30 +0200
committerAndreas Arnez <arnez@linux.vnet.ibm.com>2017-06-13 15:20:30 +0200
commit242d31ab7c3901e02bd68c1824d1d3610e02562b (patch)
tree57e90f1652658ba1b8076f19c1bfb4ad8e5ea35c /gdb/ChangeLog
parent03c8af18d1a8f359fd023696848bda488119da60 (diff)
downloadgdb-242d31ab7c3901e02bd68c1824d1d3610e02562b.zip
gdb-242d31ab7c3901e02bd68c1824d1d3610e02562b.tar.gz
gdb-242d31ab7c3901e02bd68c1824d1d3610e02562b.tar.bz2
read/write_pieced_value: Improve logic for buffer allocation
So far the main loop in read_pieced_value and write_pieced_value is structured like this: (1) Prepare a buffer and some variables we may need; (2) depending on the DWARF piece type to be handled, use the buffer and the prepared variables, ignore them, or even recalculate them. This approach reduces readability and may also lead to unnecessary copying of data. This patch moves the preparations to the places where sufficient information is available and removes some of the variables involved. gdb/ChangeLog: * dwarf2loc.c (read_pieced_value): Move the buffer allocation and some other preparations to the places where sufficient information is available. (write_pieced_value): Likewise.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r--gdb/ChangeLog7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8c022a4..a177e8e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
+ * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
+ some other preparations to the places where sufficient information
+ is available.
+ (write_pieced_value): Likewise.
+
+2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
+
* dwarf2loc.c (bits_to_bytes): New function.
(read_pieced_value): Fix offset calculations for register pieces
on big-endian targets.