+2020-10-19 Mark Wielaard <mark@klomp.org>
+
+ * dwarf_frame_register.c (dwarf_frame_register): Declare ops_mem
+ as array of (at least) 3 elements.
+ * libdw.h (dwarf_frame_register): Add extra explanation of ops_mem
+ argument.
+
2020-10-23 Tom Tromey <tom@tromey.com>
* memory-access.h (read_3ubyte_unaligned_inc): Call
#include <dwarf.h>
int
-dwarf_frame_register (Dwarf_Frame *fs, int regno, Dwarf_Op *ops_mem,
+dwarf_frame_register (Dwarf_Frame *fs, int regno, Dwarf_Op ops_mem[3],
Dwarf_Op **ops, size_t *nops)
{
/* Maybe there was a previous error. */
caller's REGNO is "same_value", i.e. this frame did not change it;
ask the caller frame where to find it.
- For common simple expressions *OPS is OPS_MEM. For arbitrary DWARF
- expressions in the CFI, *OPS is an internal pointer that can be used as
- long as the Dwarf_CFI used to create FRAME remains alive. */
+ For common simple expressions *OPS is OPS_MEM (which is a caller
+ owned array for at least 3 Dwarf_Ops). For arbitrary DWARF
+ expressions in the CFI, *OPS is an internal pointer that can be
+ used as long as the Dwarf_CFI used to create FRAME remains
+ alive. */
extern int dwarf_frame_register (Dwarf_Frame *frame, int regno,
Dwarf_Op ops_mem[3],
Dwarf_Op **ops, size_t *nops)
+2020-10-19 Mark Wielaard <mark@klomp.org>
+
+ * addrcfi.c (print_register): Make ops_mem 3 elements.
+
2020-10-19 Mark Wielaard <mark@klomp.org>
* testfile60.bz2: Removed.
printf ("\t%s reg%u (%s%s): ", setname, regno, prefix, regname);
- Dwarf_Op ops_mem[2];
+ Dwarf_Op ops_mem[3];
Dwarf_Op *ops;
size_t nops;
int result = dwarf_frame_register (stuff->frame, regno, ops_mem, &ops, &nops);