]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix build on macOS
authorPaul Floyd <pjfloyd@wanadoo.fr>
Thu, 20 Oct 2022 21:11:42 +0000 (23:11 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Thu, 20 Oct 2022 21:15:00 +0000 (23:15 +0200)
A while back when I added support for split RW PT_LOAD sections
one instance in the macho code didn't get updated. Also
update the comment that refers to the old struct member that
got renamed.

coregrind/m_debuginfo/priv_storage.h
coregrind/m_debuginfo/readmacho.c

index f44ab43ffed9f9097e586b42d7618ab4f2f13504..a4b90d36b314f9ce564950af2991f9290a38148a 100644 (file)
@@ -541,9 +541,9 @@ ML_(cmp_for_DiAddrRange_range) ( const void* keyV, const void* elemV );
    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
index 61a3fe9f5a707d3d6b789ddba52a42b7afd0ffab..33cc037b576b2d073ca0e8a1f6467ce01383832e 100644 (file)
@@ -714,7 +714,7 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di )
    /* 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);