aboutsummaryrefslogtreecommitdiff
path: root/elfcpp
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2015-11-19 10:17:36 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2015-11-19 10:17:46 -0500
commitbb82e93484cdd56c67efd52b869a6123b2623f6c (patch)
treeabca26349e9a33797e05f737b57fa35f7a477e50 /elfcpp
parent9a0847060d5823ec520ebf0c3e307e26442e5b8c (diff)
downloadgdb-bb82e93484cdd56c67efd52b869a6123b2623f6c.zip
gdb-bb82e93484cdd56c67efd52b869a6123b2623f6c.tar.gz
gdb-bb82e93484cdd56c67efd52b869a6123b2623f6c.tar.bz2
Fix iov_len calculation in aarch64_linux_set_debug_regs
There is this build failure when building in C++: /home/simark/src/binutils-gdb/gdb/nat/aarch64-linux-hw-point.c: In function ‘void aarch64_linux_set_debug_regs(const aarch64_debug_reg_state*, int, int)’: /home/simark/src/binutils-gdb/gdb/nat/aarch64-linux-hw-point.c:564:64: error: ‘count’ cannot appear in a constant-expression iov.iov_len = (offsetof (struct user_hwdebug_state, dbg_regs[count - 1]) ^ We can simplify the computation and make g++ happy at the same time by formulating as: size of fixed part + size of variable part thus... size of fixed part + count * size of one variable part element thus... offsetof (struct user_hwdebug_state, dbg_regs) + count * sizeof (regs.dbg_reg[0]); gdb/ChangeLog: * nat/aarch64-linux-hw-point.c (aarch64_linux_set_debug_regs): Change form of iov_len computation.
Diffstat (limited to 'elfcpp')
0 files changed, 0 insertions, 0 deletions