Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Fix handling of DW_AT_high_pc
authorGabriel Corona <gabriel.corona@loria.fr>
Mon, 24 Mar 2014 10:43:08 +0000 (11:43 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Mon, 24 Mar 2014 10:53:29 +0000 (11:53 +0100)
DW_AT_high_pc is the first address which is not in the range and not
the last address in the range.

src/mc/mc_global.c

index fb55f18..53d9328 100644 (file)
@@ -277,7 +277,7 @@ static dw_frame_t MC_find_function_by_ip_and_object(void* ip, mc_object_info_t i
     int k = i + ((j-i)/2);
     if(ip < base[k].low_pc) {
       j = k-1;
-    } else if(ip > base[k].high_pc) {
+    } else if(ip >= base[k].high_pc) {
       i = k+1;
     } else {
       return base[k].function;