essentially an ultra-trivial finite state machine which, when it
reaches an accept state, signals that we should now read debug info
from the object into the associated struct _DebugInfo. The accept
- state is arrived at when have_rx_map and have_rw_map both become
- true. The initial state is one in which we have no observations,
- so have_rx_map and have_rw_map are both false.
+ state is arrived at when have_rx_map is true and rw_map_count
+ is 1 or 2. The initial state is one in which we have no observations,
+ so have_rx_map is false and rw_map_count is 0.
This all started as a rather ad-hoc solution, but was further
expanded to handle weird object layouts, e.g. more than one rw
/* This should be ensured by our caller (that we're in the accept
state). */
vg_assert(di->fsm.have_rx_map);
- vg_assert(di->fsm.have_rw_map);
+ vg_assert(di->fsm.rw_map_count);
for (i = 0; i < VG_(sizeXA)(di->fsm.maps); i++) {
const DebugInfoMapping* map = VG_(indexXA)(di->fsm.maps, i);