core/dynamo.c
/* Assumed to only be called about DR dll writable regions */
Assumed to only be called about DR dll writable regions
Assumed to only be called about DR dll writable regions
bool
data_sections_enclose_region(app_pc start, app_pc end)
{
#  ifdef X64
    return ((datasec_start[DATASEC_RARELY_PROT] == start &&
             datasec_end[DATASEC_RARELY_PROT] == end) ||
            (datasec_start[DATASEC_FREQ_PROT] == start &&
             datasec_end[DATASEC_FREQ_PROT] == datasec_start[DATASEC_CXTSW_PROT] &&
             datasec_end[DATASEC_CXTSW_PROT] == datasec_start[DATASEC_NEVER_PROT] &&
             datasec_end[DATASEC_NEVER_PROT] == end));
#  else
    return (datasec_start[DATASEC_RARELY_PROT] == start &&
            datasec_end[DATASEC_RARELY_PROT] == datasec_start[DATASEC_FREQ_PROT] &&
            datasec_end[DATASEC_FREQ_PROT] == datasec_start[DATASEC_CXTSW_PROT] &&
            datasec_end[DATASEC_CXTSW_PROT] == datasec_start[DATASEC_NEVER_PROT] &&
            datasec_end[DATASEC_NEVER_PROT] == end);
#  endif
}
bool data_sections_enclose_region ( app_pc start , app_pc end ) { #  ifdef X64 return ( ( datasec_start [ DATASEC_RARELY_PROT ] == start && datasec_end [ DATASEC_RARELY_PROT ] == end ) || ( datasec_start [ DATASEC_FREQ_PROT ] == start && datasec_end [ DATASEC_FREQ_PROT ] == datasec_start [ DATASEC_CXTSW_PROT ] && datasec_end [ DATASEC_CXTSW_PROT ] == datasec_start [ DATASEC_NEVER_PROT ] && datasec_end [ DATASEC_NEVER_PROT ] == end ) ) ; #  else return ( datasec_start [ DATASEC_RARELY_PROT ] == start && datasec_end [ DATASEC_RARELY_PROT ] == datasec_start [ DATASEC_FREQ_PROT ] && datasec_end [ DATASEC_FREQ_PROT ] == datasec_start [ DATASEC_CXTSW_PROT ] && datasec_end [ DATASEC_CXTSW_PROT ] == datasec_start [ DATASEC_NEVER_PROT ] && datasec_end [ DATASEC_NEVER_PROT ] == end ) ; #  endif }
Assumed to only be called about DR dll writable regions
Assumed to only be called about DR dll writable regions
/* rather than solve the general enclose problem, we check for 32-bit,
     * where .data|.fspdata|.cspdata|.nspdata form the only writable region,
     * and 64-bit, where .pdata is between .data and .fspdata.
     */