get_save_loc:
   34|    499|void get_save_loc(int regnum) {
   35|    499|  unw_cursor_t cursor;
   36|    499|  unw_context_t uc;
   37|    499|  unw_word_t reference_reg;
   38|       |
   39|    499|  unw_getcontext(&uc);
  ------------------
  |  |  131|    499|#define unw_getcontext(uc)		unw_tdep_getcontext(uc)
  |  |  ------------------
  |  |  |  |  138|    499|#define unw_tdep_getcontext             UNW_ARCH_OBJ(getcontext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|    499|#define UNW_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|    499|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   46|    499|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   40|    499|  unw_init_local(&cursor, &uc);
  ------------------
  |  |  279|    499|#define unw_init_local			UNW_OBJ(init_local)
  |  |  ------------------
  |  |  |  |   48|    499|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|    499|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|    499|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   41|    499|  unw_save_loc_t loc;
   42|  4.49k|  while (unw_step(&cursor) > 0) {
  ------------------
  |  |  282|  4.49k|#define unw_step			UNW_OBJ(step)
  |  |  ------------------
  |  |  |  |   48|  4.49k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  4.49k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  4.49k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (42:10): [True: 3.99k, False: 499]
  ------------------
   43|  3.99k|    unw_get_save_loc(&cursor, regnum, &loc);
  ------------------
  |  |  293|  3.99k|#define unw_get_save_loc		UNW_OBJ(get_save_loc)
  |  |  ------------------
  |  |  |  |   48|  3.99k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  3.99k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  3.99k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   44|  3.99k|  }
   45|    499|}
get_random_reg:
   47|  1.50k|void get_random_reg(int regnum) {
   48|  1.50k|  unw_cursor_t cursor;
   49|  1.50k|  unw_context_t uc;
   50|  1.50k|  unw_word_t reference_reg;
   51|       |
   52|  1.50k|  unw_getcontext(&uc);
  ------------------
  |  |  131|  1.50k|#define unw_getcontext(uc)		unw_tdep_getcontext(uc)
  |  |  ------------------
  |  |  |  |  138|  1.50k|#define unw_tdep_getcontext             UNW_ARCH_OBJ(getcontext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|  1.50k|#define UNW_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|  1.50k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   46|  1.50k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   53|  1.50k|  unw_init_local(&cursor, &uc);
  ------------------
  |  |  279|  1.50k|#define unw_init_local			UNW_OBJ(init_local)
  |  |  ------------------
  |  |  |  |   48|  1.50k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  1.50k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  1.50k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   54|  13.5k|  while (unw_step(&cursor) > 0) {
  ------------------
  |  |  282|  13.5k|#define unw_step			UNW_OBJ(step)
  |  |  ------------------
  |  |  |  |   48|  13.5k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  13.5k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  13.5k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (54:10): [True: 12.0k, False: 1.50k]
  ------------------
   55|  12.0k|    unw_get_reg(&cursor, regnum, &reference_reg);
  ------------------
  |  |  289|  12.0k|#define unw_get_reg			UNW_OBJ(get_reg)
  |  |  ------------------
  |  |  |  |   48|  12.0k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  12.0k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  12.0k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   56|  12.0k|  }
   57|  1.50k|}
check_is_signal:
   59|    186|void check_is_signal() {
   60|    186|  unw_cursor_t cursor;
   61|    186|  unw_context_t uc;
   62|    186|  unw_word_t reference_reg;
   63|       |
   64|    186|  unw_getcontext(&uc);
  ------------------
  |  |  131|    186|#define unw_getcontext(uc)		unw_tdep_getcontext(uc)
  |  |  ------------------
  |  |  |  |  138|    186|#define unw_tdep_getcontext             UNW_ARCH_OBJ(getcontext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|    186|#define UNW_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|    186|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   46|    186|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   65|    186|  unw_init_local(&cursor, &uc);
  ------------------
  |  |  279|    186|#define unw_init_local			UNW_OBJ(init_local)
  |  |  ------------------
  |  |  |  |   48|    186|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|    186|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|    186|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   66|  1.67k|  while (unw_step(&cursor) > 0) {
  ------------------
  |  |  282|  1.67k|#define unw_step			UNW_OBJ(step)
  |  |  ------------------
  |  |  |  |   48|  1.67k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  1.67k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  1.67k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (66:10): [True: 1.48k, False: 186]
  ------------------
   67|  1.48k|    if (unw_is_signal_frame(&cursor)) {
  ------------------
  |  |  294|  1.48k|#define unw_is_signal_frame		UNW_OBJ(is_signal_frame)
  |  |  ------------------
  |  |  |  |   48|  1.48k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  1.48k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  1.48k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (67:9): [True: 0, False: 1.48k]
  ------------------
   68|      0|      return;
   69|      0|    }
   70|  1.48k|  }
   71|    186|}
get_proc_name:
   73|  3.87k|void get_proc_name() {
   74|  3.87k|  unw_cursor_t cursor;
   75|  3.87k|  unw_context_t uc;
   76|       |
   77|  3.87k|  unw_getcontext(&uc);
  ------------------
  |  |  131|  3.87k|#define unw_getcontext(uc)		unw_tdep_getcontext(uc)
  |  |  ------------------
  |  |  |  |  138|  3.87k|#define unw_tdep_getcontext             UNW_ARCH_OBJ(getcontext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|  3.87k|#define UNW_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|  3.87k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   46|  3.87k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   78|  3.87k|  unw_init_local(&cursor, &uc);
  ------------------
  |  |  279|  3.87k|#define unw_init_local			UNW_OBJ(init_local)
  |  |  ------------------
  |  |  |  |   48|  3.87k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  3.87k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  3.87k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   79|  34.8k|  while (unw_step(&cursor) > 0) {
  ------------------
  |  |  282|  34.8k|#define unw_step			UNW_OBJ(step)
  |  |  ------------------
  |  |  |  |   48|  34.8k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  34.8k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  34.8k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (79:10): [True: 31.0k, False: 3.87k]
  ------------------
   80|  31.0k|    unw_word_t offset;
   81|  31.0k|    char buf[512];
   82|  31.0k|    unw_get_proc_name(&cursor, buf, sizeof(buf), &offset);
  ------------------
  |  |  296|  31.0k|#define unw_get_proc_name		UNW_OBJ(get_proc_name)
  |  |  ------------------
  |  |  |  |   48|  31.0k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  31.0k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  31.0k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   83|  31.0k|  }
   84|  3.87k|}
dispatch:
   86|  7.69k|void dispatch(const uint8_t *data, size_t size) {
   87|  7.69k|  if (size < 8) {
  ------------------
  |  Branch (87:7): [True: 314, False: 7.38k]
  ------------------
   88|    314|    return;
   89|    314|  }
   90|  7.38k|  uint8_t decider = data[0] % 4;
   91|  7.38k|  data += 2;
   92|  7.38k|  size -= 2;
   93|  7.38k|  if (decider == 0) {
  ------------------
  |  Branch (93:7): [True: 4.19k, False: 3.18k]
  ------------------
   94|  4.19k|    recurse1(data, size);
   95|  4.19k|  } else if (decider == 1) {
  ------------------
  |  Branch (95:14): [True: 1.84k, False: 1.34k]
  ------------------
   96|  1.84k|    recurse2(data, size);
   97|  1.84k|  } else if (decider == 2) {
  ------------------
  |  Branch (97:14): [True: 531, False: 817]
  ------------------
   98|    531|    recurse3(data, size);
   99|    817|  } else {
  100|    817|    recurse4(data, size);
  101|    817|  }
  102|  7.38k|}
recurse1:
  104|  4.19k|void recurse1(const uint8_t *data, size_t size) {
  105|  4.19k|  if (data[0] == 0x01) {
  ------------------
  |  Branch (105:7): [True: 3.87k, False: 321]
  ------------------
  106|  3.87k|    get_proc_name();
  107|  3.87k|  }
  108|  4.19k|  data += 2;
  109|  4.19k|  size -= 2;
  110|       |
  111|  4.19k|  dispatch(data, size);
  112|  4.19k|  return;
  113|  4.19k|}
recurse2:
  115|  1.84k|void recurse2(const uint8_t *data, size_t size) {
  116|  1.84k|  if (data[0] == 0x01) {
  ------------------
  |  Branch (116:7): [True: 1.50k, False: 337]
  ------------------
  117|  1.50k|    get_random_reg((int)data[1]);
  118|  1.50k|  }
  119|  1.84k|  data += 2;
  120|  1.84k|  size -= 2;
  121|       |
  122|  1.84k|  dispatch(data, size);
  123|  1.84k|  return;
  124|  1.84k|}
recurse3:
  126|    531|void recurse3(const uint8_t *data, size_t size) {
  127|    531|  if (data[0] == 0x01) {
  ------------------
  |  Branch (127:7): [True: 186, False: 345]
  ------------------
  128|    186|    check_is_signal((int)data[1]);
  129|    186|  }
  130|    531|  data += 2;
  131|    531|  size -= 2;
  132|       |
  133|    531|  dispatch(data, size);
  134|    531|  return;
  135|    531|}
recurse4:
  137|    817|void recurse4(const uint8_t *data, size_t size) {
  138|    817|  if (data[0] == 0x01) {
  ------------------
  |  Branch (138:7): [True: 499, False: 318]
  ------------------
  139|    499|    get_save_loc((int)data[1]);
  140|    499|  }
  141|    817|  data += 2;
  142|    817|  size -= 2;
  143|       |
  144|    817|  dispatch(data, size);
  145|    817|  return;
  146|    817|}
LLVMFuzzerTestOneInput:
  148|    346|int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  149|       |  // Ensure we have a bit of data but not too much to cause stackoverflows.
  150|    346|  if (size < 12 || size > 512) {
  ------------------
  |  Branch (150:7): [True: 6, False: 340]
  |  Branch (150:20): [True: 26, False: 314]
  ------------------
  151|     32|    return 0;
  152|     32|  }
  153|       |
  154|    314|  dispatch(data, size);
  155|    314|  return 0;
  156|    346|}

Lparser.c:dwarf_read_uleb128:
  297|    142|{
  298|    142|  unw_word_t val = 0, shift = 0;
  299|    142|  unsigned char byte;
  300|    142|  int ret;
  301|       |
  302|    142|  do
  303|    143|    {
  304|    143|      if ((ret = dwarf_readu8 (as, a, addr, &byte, arg)) < 0)
  ------------------
  |  Branch (304:11): [True: 0, False: 143]
  ------------------
  305|      0|        return ret;
  306|       |
  307|    143|      val |= ((unw_word_t) byte & 0x7f) << shift;
  308|    143|      shift += 7;
  309|    143|    }
  310|    143|  while (byte & 0x80);
  ------------------
  |  Branch (310:10): [True: 1, False: 142]
  ------------------
  311|       |
  312|    142|  *valp = val;
  313|    142|  return 0;
  314|    142|}
Lparser.c:dwarf_readu8:
   92|    370|{
   93|    370|  dwarf_misaligned_value_t *mvp = (void *) (uintptr_t) *addr;
   94|       |
   95|    370|  *val = mvp->u8;
   96|    370|  *addr += sizeof (mvp->u8);
   97|    370|  return 0;
   98|    370|}
Lparser.c:dwarf_readu16:
  103|      7|{
  104|      7|  dwarf_misaligned_value_t *mvp = (void *) (uintptr_t) *addr;
  105|       |
  106|      7|  *val = mvp->u16;
  107|      7|  *addr += sizeof (mvp->u16);
  108|      7|  return 0;
  109|      7|}
Lpe.c:dwarf_read_encoded_pointer_inlined:
  350|     75|{
  351|     75|  unw_word_t val, initial_addr = *addr;
  352|     75|  uint16_t uval16;
  353|     75|  uint32_t uval32;
  354|     75|  uint64_t uval64;
  355|     75|  int16_t sval16 = 0;
  356|     75|  int32_t sval32 = 0;
  357|     75|  int64_t sval64 = 0;
  358|     75|  int ret;
  359|       |
  360|       |  /* DW_EH_PE_omit and DW_EH_PE_aligned don't follow the normal
  361|       |     format/application encoding.  Handle them first.  */
  362|     75|  if (encoding == DW_EH_PE_omit)
  ------------------
  |  |  201|     75|#define DW_EH_PE_omit           0xff
  ------------------
  |  Branch (362:7): [True: 15, False: 60]
  ------------------
  363|     15|    {
  364|     15|      *valp = 0;
  365|     15|      return 0;
  366|     15|    }
  367|     60|  else if (encoding == DW_EH_PE_aligned)
  ------------------
  |  |  221|     60|#define DW_EH_PE_aligned        0x50    /* aligned pointer */
  ------------------
  |  Branch (367:12): [True: 0, False: 60]
  ------------------
  368|      0|    {
  369|      0|      int size = dwarf_addr_size (as);
  ------------------
  |  |   15|      0|# define dwarf_addr_size(as) (sizeof (unw_word_t))
  ------------------
  370|      0|      *addr = (initial_addr + size - 1) & -size;
  371|      0|      return dwarf_readw (as, a, addr, valp, arg);
  372|      0|    }
  373|       |
  374|     60|  switch (encoding & DW_EH_PE_FORMAT_MASK)
  ------------------
  |  |  194|     60|#define DW_EH_PE_FORMAT_MASK    0x0f    /* format of the encoded value */
  ------------------
  375|     60|    {
  376|      0|    case DW_EH_PE_ptr:
  ------------------
  |  |  202|      0|#define DW_EH_PE_ptr            0x00    /* pointer-sized unsigned value */
  ------------------
  |  Branch (376:5): [True: 0, False: 60]
  ------------------
  377|      0|      if ((ret = dwarf_readw (as, a, addr, &val, arg)) < 0)
  ------------------
  |  Branch (377:11): [True: 0, False: 0]
  ------------------
  378|      0|        return ret;
  379|      0|      break;
  380|       |
  381|      0|    case DW_EH_PE_uleb128:
  ------------------
  |  |  203|      0|#define DW_EH_PE_uleb128        0x01    /* unsigned LE base-128 value */
  ------------------
  |  Branch (381:5): [True: 0, False: 60]
  ------------------
  382|      0|      if ((ret = dwarf_read_uleb128 (as, a, addr, &val, arg)) < 0)
  ------------------
  |  Branch (382:11): [True: 0, False: 0]
  ------------------
  383|      0|        return ret;
  384|      0|      break;
  385|       |
  386|      0|    case DW_EH_PE_udata2:
  ------------------
  |  |  204|      0|#define DW_EH_PE_udata2         0x02    /* unsigned 16-bit value */
  ------------------
  |  Branch (386:5): [True: 0, False: 60]
  ------------------
  387|      0|      if ((ret = dwarf_readu16 (as, a, addr, &uval16, arg)) < 0)
  ------------------
  |  Branch (387:11): [True: 0, False: 0]
  ------------------
  388|      0|        return ret;
  389|      0|      val = uval16;
  390|      0|      break;
  391|       |
  392|     15|    case DW_EH_PE_udata4:
  ------------------
  |  |  205|     15|#define DW_EH_PE_udata4         0x03    /* unsigned 32-bit value */
  ------------------
  |  Branch (392:5): [True: 15, False: 45]
  ------------------
  393|     15|      if ((ret = dwarf_readu32 (as, a, addr, &uval32, arg)) < 0)
  ------------------
  |  Branch (393:11): [True: 0, False: 15]
  ------------------
  394|      0|        return ret;
  395|     15|      val = uval32;
  396|     15|      break;
  397|       |
  398|      0|    case DW_EH_PE_udata8:
  ------------------
  |  |  206|      0|#define DW_EH_PE_udata8         0x04    /* unsigned 64-bit value */
  ------------------
  |  Branch (398:5): [True: 0, False: 60]
  ------------------
  399|      0|      if ((ret = dwarf_readu64 (as, a, addr, &uval64, arg)) < 0)
  ------------------
  |  Branch (399:11): [True: 0, False: 0]
  ------------------
  400|      0|        return ret;
  401|      0|      val = (unw_word_t) uval64;
  402|      0|      break;
  403|       |
  404|      0|    case DW_EH_PE_sleb128:
  ------------------
  |  |  207|      0|#define DW_EH_PE_sleb128        0x09    /* signed LE base-128 value */
  ------------------
  |  Branch (404:5): [True: 0, False: 60]
  ------------------
  405|      0|      if ((ret = dwarf_read_uleb128 (as, a, addr, &val, arg)) < 0)
  ------------------
  |  Branch (405:11): [True: 0, False: 0]
  ------------------
  406|      0|        return ret;
  407|      0|      break;
  408|       |
  409|      0|    case DW_EH_PE_sdata2:
  ------------------
  |  |  208|      0|#define DW_EH_PE_sdata2         0x0a    /* signed 16-bit value */
  ------------------
  |  Branch (409:5): [True: 0, False: 60]
  ------------------
  410|      0|      if ((ret = dwarf_reads16 (as, a, addr, &sval16, arg)) < 0)
  ------------------
  |  Branch (410:11): [True: 0, False: 0]
  ------------------
  411|      0|        return ret;
  412|      0|      val = sval16;
  413|      0|      break;
  414|       |
  415|     45|    case DW_EH_PE_sdata4:
  ------------------
  |  |  209|     45|#define DW_EH_PE_sdata4         0x0b    /* signed 32-bit value */
  ------------------
  |  Branch (415:5): [True: 45, False: 15]
  ------------------
  416|     45|      if ((ret = dwarf_reads32 (as, a, addr, &sval32, arg)) < 0)
  ------------------
  |  Branch (416:11): [True: 0, False: 45]
  ------------------
  417|      0|        return ret;
  418|     45|      val = sval32;
  419|     45|      break;
  420|       |
  421|      0|    case DW_EH_PE_sdata8:
  ------------------
  |  |  210|      0|#define DW_EH_PE_sdata8         0x0c    /* signed 64-bit value */
  ------------------
  |  Branch (421:5): [True: 0, False: 60]
  ------------------
  422|      0|      if ((ret = dwarf_reads64 (as, a, addr, &sval64, arg)) < 0)
  ------------------
  |  Branch (422:11): [True: 0, False: 0]
  ------------------
  423|      0|        return ret;
  424|      0|      val = (unw_word_t) sval64;
  425|      0|      break;
  426|       |
  427|      0|    default:
  ------------------
  |  Branch (427:5): [True: 0, False: 60]
  ------------------
  428|      0|      Debug (1, "unexpected encoding format 0x%x\n",
  429|      0|             encoding & DW_EH_PE_FORMAT_MASK);
  430|      0|      return -UNW_EINVAL;
  431|     60|    }
  432|       |
  433|     60|  if (val == 0)
  ------------------
  |  Branch (433:7): [True: 0, False: 60]
  ------------------
  434|      0|    {
  435|       |      /* 0 is a special value and always absolute.  */
  436|      0|      *valp = 0;
  437|      0|      return 0;
  438|      0|    }
  439|       |
  440|     60|  switch (encoding & DW_EH_PE_APPL_MASK)
  ------------------
  |  |  195|     60|#define DW_EH_PE_APPL_MASK      0x70    /* how the value is to be applied */
  ------------------
  441|     60|    {
  442|     30|    case DW_EH_PE_absptr:
  ------------------
  |  |  213|     30|#define DW_EH_PE_absptr         0x00    /* absolute value */
  ------------------
  |  Branch (442:5): [True: 30, False: 30]
  ------------------
  443|     30|      break;
  444|       |
  445|     30|    case DW_EH_PE_pcrel:
  ------------------
  |  |  214|     30|#define DW_EH_PE_pcrel          0x10    /* rel. to addr. of encoded value */
  ------------------
  |  Branch (445:5): [True: 30, False: 30]
  ------------------
  446|     30|      val += initial_addr;
  447|     30|      break;
  448|       |
  449|      0|    case DW_EH_PE_datarel:
  ------------------
  |  |  216|      0|#define DW_EH_PE_datarel        0x30    /* data-relative */
  ------------------
  |  Branch (449:5): [True: 0, False: 60]
  ------------------
  450|       |      /* XXX For now, assume that data-relative addresses are relative
  451|       |         to the global pointer.  */
  452|      0|      val += pi->gp;
  453|      0|      break;
  454|       |
  455|      0|    case DW_EH_PE_funcrel:
  ------------------
  |  |  220|      0|#define DW_EH_PE_funcrel        0x40    /* start-of-procedure-relative */
  ------------------
  |  Branch (455:5): [True: 0, False: 60]
  ------------------
  456|      0|      val += pi->start_ip;
  457|      0|      break;
  458|       |
  459|      0|    case DW_EH_PE_textrel:
  ------------------
  |  |  215|      0|#define DW_EH_PE_textrel        0x20    /* text-relative (GCC-specific???) */
  ------------------
  |  Branch (459:5): [True: 0, False: 60]
  ------------------
  460|       |      /* XXX For now we don't support text-rel values.  If there is a
  461|       |         platform which needs this, we probably would have to add a
  462|       |         "segbase" member to unw_proc_info_t.  */
  463|      0|    default:
  ------------------
  |  Branch (463:5): [True: 0, False: 60]
  ------------------
  464|      0|      Debug (1, "unexpected application type 0x%x\n",
  465|      0|             encoding & DW_EH_PE_APPL_MASK);
  466|      0|      return -UNW_EINVAL;
  467|     60|    }
  468|       |
  469|       |  /* Trim off any extra bits.  Assume that sign extension isn't
  470|       |     required; the only place it is needed is MIPS kernel space
  471|       |     addresses.  */
  472|     60|  if (sizeof (val) > dwarf_addr_size (as))
  ------------------
  |  |   15|     60|# define dwarf_addr_size(as) (sizeof (unw_word_t))
  ------------------
  |  Branch (472:7): [Folded, False: 60]
  ------------------
  473|      0|    {
  474|      0|      assert (dwarf_addr_size (as) == 4);
  ------------------
  |  Branch (474:7): [Folded, False: 0]
  |  Branch (474:7): [Folded, False: 0]
  ------------------
  475|      0|      val = (uint32_t) val;
  476|      0|    }
  477|       |
  478|     60|  if (encoding & DW_EH_PE_indirect)
  ------------------
  |  |  198|     60|#define DW_EH_PE_indirect       0x80
  ------------------
  |  Branch (478:7): [True: 0, False: 60]
  ------------------
  479|      0|    {
  480|      0|      unw_word_t indirect_addr = val;
  481|       |
  482|      0|      if ((ret = dwarf_readw (as, a, &indirect_addr, &val, arg)) < 0)
  ------------------
  |  Branch (482:11): [True: 0, False: 0]
  ------------------
  483|      0|        return ret;
  484|      0|    }
  485|       |
  486|     60|  *valp = val;
  487|     60|  return 0;
  488|     60|}
Lpe.c:dwarf_readu32:
  114|     15|{
  115|     15|  dwarf_misaligned_value_t *mvp = (void *) (uintptr_t) *addr;
  116|       |
  117|     15|  *val = mvp->u32;
  118|     15|  *addr += sizeof (mvp->u32);
  119|     15|  return 0;
  120|     15|}
Lpe.c:dwarf_reads32:
   70|     45|{
   71|     45|  dwarf_misaligned_value_t *mvp = (void *) (uintptr_t) *addr;
   72|       |
   73|     45|  *val = mvp->s32;
   74|     45|  *addr += sizeof (mvp->s32);
   75|     45|  return 0;
   76|     45|}
Lfde.c:dwarf_readu32:
  114|     45|{
  115|     45|  dwarf_misaligned_value_t *mvp = (void *) (uintptr_t) *addr;
  116|       |
  117|     45|  *val = mvp->u32;
  118|     45|  *addr += sizeof (mvp->u32);
  119|     45|  return 0;
  120|     45|}
Lfde.c:dwarf_reads32:
   70|     15|{
   71|     15|  dwarf_misaligned_value_t *mvp = (void *) (uintptr_t) *addr;
   72|       |
   73|     15|  *val = mvp->s32;
   74|     15|  *addr += sizeof (mvp->s32);
   75|     15|  return 0;
   76|     15|}
Lfde.c:dwarf_readu8:
   92|    150|{
   93|    150|  dwarf_misaligned_value_t *mvp = (void *) (uintptr_t) *addr;
   94|       |
   95|    150|  *val = mvp->u8;
   96|    150|  *addr += sizeof (mvp->u8);
   97|    150|  return 0;
   98|    150|}
Lfde.c:dwarf_read_sleb128:
  322|     15|{
  323|     15|  unw_word_t val = 0, shift = 0;
  324|     15|  unsigned char byte;
  325|     15|  int ret;
  326|       |
  327|     15|  do
  328|     15|    {
  329|     15|      if ((ret = dwarf_readu8 (as, a, addr, &byte, arg)) < 0)
  ------------------
  |  Branch (329:11): [True: 0, False: 15]
  ------------------
  330|      0|        return ret;
  331|       |
  332|     15|      val |= ((unw_word_t) byte & 0x7f) << shift;
  333|     15|      shift += 7;
  334|     15|    }
  335|     15|  while (byte & 0x80);
  ------------------
  |  Branch (335:10): [True: 0, False: 15]
  ------------------
  336|       |
  337|     15|  if (shift < 8 * sizeof (unw_word_t) && (byte & 0x40) != 0)
  ------------------
  |  Branch (337:7): [True: 15, False: 0]
  |  Branch (337:42): [True: 15, False: 0]
  ------------------
  338|       |    /* sign-extend negative value */
  339|     15|    val |= ((unw_word_t) -1) << shift;
  340|       |
  341|     15|  *valp = val;
  342|     15|  return 0;
  343|     15|}
Lfde.c:dwarf_read_uleb128:
  297|     45|{
  298|     45|  unw_word_t val = 0, shift = 0;
  299|     45|  unsigned char byte;
  300|     45|  int ret;
  301|       |
  302|     45|  do
  303|     45|    {
  304|     45|      if ((ret = dwarf_readu8 (as, a, addr, &byte, arg)) < 0)
  ------------------
  |  Branch (304:11): [True: 0, False: 45]
  ------------------
  305|      0|        return ret;
  306|       |
  307|     45|      val |= ((unw_word_t) byte & 0x7f) << shift;
  308|     45|      shift += 7;
  309|     45|    }
  310|     45|  while (byte & 0x80);
  ------------------
  |  Branch (310:10): [True: 0, False: 45]
  ------------------
  311|       |
  312|     45|  *valp = val;
  313|     45|  return 0;
  314|     45|}

elf64.c:mi_munmap:
  249|  31.0k|{
  250|  31.0k|#ifdef SYS_munmap
  251|  31.0k|  return syscall (SYS_munmap, addr, len);
  252|       |#else
  253|       |  return munmap (addr, len);
  254|       |#endif
  255|  31.0k|}
mempool.c:mi_mmap:
  227|      2|{
  228|      2|#if defined(SYS_mmap) && !defined(__i386__) && !defined(__s390x__)
  229|       |  /* Where supported, bypass libc and invoke the syscall directly. */
  230|       |# if defined(__FreeBSD__) // prefer over syscall on *BSD
  231|       |  long int ret = __syscall (SYS_mmap, addr, len, prot, flags, fd, offset);
  232|       |# else
  233|      2|  long int ret = syscall (SYS_mmap, addr, len, prot, flags, fd, offset);
  234|      2|# endif
  235|       |  // @todo this is very likely Linux specific
  236|      2|  if ((unsigned long int)ret > -4096UL)
  ------------------
  |  Branch (236:7): [True: 0, False: 2]
  ------------------
  237|      0|    return MAP_FAILED;
  238|      2|  else
  239|      2|    return (void *)ret;
  240|       |#else
  241|       |  /* Where direct syscalls are not supported, forward to the libc call. */
  242|       |  return mmap (addr, len, prot, flags, fd, offset);
  243|       |#endif
  244|      2|}
os-linux.c:mi_mmap:
  227|  62.0k|{
  228|  62.0k|#if defined(SYS_mmap) && !defined(__i386__) && !defined(__s390x__)
  229|       |  /* Where supported, bypass libc and invoke the syscall directly. */
  230|       |# if defined(__FreeBSD__) // prefer over syscall on *BSD
  231|       |  long int ret = __syscall (SYS_mmap, addr, len, prot, flags, fd, offset);
  232|       |# else
  233|  62.0k|  long int ret = syscall (SYS_mmap, addr, len, prot, flags, fd, offset);
  234|  62.0k|# endif
  235|       |  // @todo this is very likely Linux specific
  236|  62.0k|  if ((unsigned long int)ret > -4096UL)
  ------------------
  |  Branch (236:7): [True: 0, False: 62.0k]
  ------------------
  237|      0|    return MAP_FAILED;
  238|  62.0k|  else
  239|  62.0k|    return (void *)ret;
  240|       |#else
  241|       |  /* Where direct syscalls are not supported, forward to the libc call. */
  242|       |  return mmap (addr, len, prot, flags, fd, offset);
  243|       |#endif
  244|  62.0k|}
os-linux.c:mi_munmap:
  249|  31.0k|{
  250|  31.0k|#ifdef SYS_munmap
  251|  31.0k|  return syscall (SYS_munmap, addr, len);
  252|       |#else
  253|       |  return munmap (addr, len);
  254|       |#endif
  255|  31.0k|}
Laddress_validator.c:unw_page_start:
  361|   200k|{
  362|   200k|  return addr & ~(unw_page_size - 1);
  363|   200k|}

Linit_local.c:dwarf_build_as_arg:
  132|  6.06k|dwarf_build_as_arg(const ucontext_t *uc, const int validate) {
  133|  6.06k|  uintptr_t packed_args = (uintptr_t) uc;
  134|  6.06k|  assert((packed_args & AS_ARG_VALIDATE_MASK) == 0);
  ------------------
  |  Branch (134:3): [True: 0, False: 6.06k]
  |  Branch (134:3): [True: 6.06k, False: 0]
  ------------------
  135|  6.06k|  packed_args |= (AS_ARG_VALIDATE_MASK & validate);
  ------------------
  |  |  102|  6.06k|#define AS_ARG_VALIDATE_MASK 0x1UL
  ------------------
  136|  6.06k|  return (void *) packed_args;
  137|  6.06k|}
Linit_local.c:dwarf_get_uc:
  111|   109k|{
  112|   109k|  assert(cursor->as == unw_local_addr_space);
  ------------------
  |  Branch (112:3): [True: 0, False: 109k]
  |  Branch (112:3): [True: 109k, False: 0]
  ------------------
  113|   109k|  return AS_ARG_GET_UC_PTR(cursor->as_arg);
  ------------------
  |  |  105|   109k|  ((ucontext_t *) ((uintptr_t) arg & AS_ARG_UCONTEXT_MASK))
  |  |  ------------------
  |  |  |  |  101|   109k|#define AS_ARG_UCONTEXT_MASK ~0x1UL
  |  |  ------------------
  ------------------
  114|   109k|}
Linit_local.c:dwarf_get:
  199|  12.1k|{
  200|  12.1k|  if (DWARF_IS_NULL_LOC (loc))
  ------------------
  |  |  156|  12.1k|# define DWARF_IS_NULL_LOC(l)   (DWARF_GET_LOC (l) == 0)
  |  |  ------------------
  |  |  |  |  139|  12.1k|#define DWARF_GET_LOC(l)        ((l).val)
  |  |  ------------------
  |  |  |  Branch (156:33): [True: 0, False: 12.1k]
  |  |  ------------------
  ------------------
  201|      0|    return -UNW_EBADREG;
  202|       |
  203|  12.1k|  if (DWARF_IS_REG_LOC (loc))
  ------------------
  |  |  145|  12.1k|# define DWARF_IS_REG_LOC(l)    (((l).type & DWARF_LOC_TYPE_REG) != 0)
  |  |  ------------------
  |  |  |  |  142|  12.1k|# define DWARF_LOC_TYPE_REG     (1 << 1)
  |  |  ------------------
  |  |  |  Branch (145:33): [True: 0, False: 12.1k]
  |  |  ------------------
  ------------------
  204|      0|    return (*c->as->acc.access_reg) (c->as, DWARF_GET_REG_LOC (loc), val,
  ------------------
  |  |  422|      0|#define DWARF_GET_REG_LOC(l)    ((unw_regnum_t) DWARF_GET_LOC(l))
  |  |  ------------------
  |  |  |  |  139|      0|#define DWARF_GET_LOC(l)        ((l).val)
  |  |  ------------------
  ------------------
  205|      0|                                     0, c->as_arg);
  206|  12.1k|  if (DWARF_IS_MEM_LOC (loc))
  ------------------
  |  |  147|  12.1k|# define DWARF_IS_MEM_LOC(l)    ((l).type == DWARF_LOC_TYPE_MEM)
  |  |  ------------------
  |  |  |  |  140|  12.1k|# define DWARF_LOC_TYPE_MEM     (0 << 0)
  |  |  ------------------
  |  |  |  Branch (147:33): [True: 12.1k, False: 0]
  |  |  ------------------
  ------------------
  207|  12.1k|    return (*c->as->acc.access_mem) (c->as, DWARF_GET_MEM_LOC (loc), val,
  ------------------
  |  |  421|  12.1k|#define DWARF_GET_MEM_LOC(l)    DWARF_GET_LOC(l)
  |  |  ------------------
  |  |  |  |  139|  12.1k|#define DWARF_GET_LOC(l)        ((l).val)
  |  |  ------------------
  ------------------
  208|  12.1k|                                     0, c->as_arg);
  209|  12.1k|  assert(DWARF_IS_VAL_LOC (loc));
  ------------------
  |  Branch (209:3): [True: 0, False: 0]
  |  Branch (209:3): [True: 0, False: 0]
  ------------------
  210|      0|  *val = DWARF_GET_LOC (loc);
  ------------------
  |  |  139|      0|#define DWARF_GET_LOC(l)        ((l).val)
  ------------------
  211|      0|  return 0;
  212|      0|}
Lregs.c:dwarf_get:
  199|  63.9k|{
  200|  63.9k|  if (DWARF_IS_NULL_LOC (loc))
  ------------------
  |  |  156|  63.9k|# define DWARF_IS_NULL_LOC(l)   (DWARF_GET_LOC (l) == 0)
  |  |  ------------------
  |  |  |  |  139|  63.9k|#define DWARF_GET_LOC(l)        ((l).val)
  |  |  ------------------
  |  |  |  Branch (156:33): [True: 0, False: 63.9k]
  |  |  ------------------
  ------------------
  201|      0|    return -UNW_EBADREG;
  202|       |
  203|  63.9k|  if (DWARF_IS_REG_LOC (loc))
  ------------------
  |  |  145|  63.9k|# define DWARF_IS_REG_LOC(l)    (((l).type & DWARF_LOC_TYPE_REG) != 0)
  |  |  ------------------
  |  |  |  |  142|  63.9k|# define DWARF_LOC_TYPE_REG     (1 << 1)
  |  |  ------------------
  |  |  |  Branch (145:33): [True: 0, False: 63.9k]
  |  |  ------------------
  ------------------
  204|      0|    return (*c->as->acc.access_reg) (c->as, DWARF_GET_REG_LOC (loc), val,
  ------------------
  |  |  422|      0|#define DWARF_GET_REG_LOC(l)    ((unw_regnum_t) DWARF_GET_LOC(l))
  |  |  ------------------
  |  |  |  |  139|      0|#define DWARF_GET_LOC(l)        ((l).val)
  |  |  ------------------
  ------------------
  205|      0|                                     0, c->as_arg);
  206|  63.9k|  if (DWARF_IS_MEM_LOC (loc))
  ------------------
  |  |  147|  63.9k|# define DWARF_IS_MEM_LOC(l)    ((l).type == DWARF_LOC_TYPE_MEM)
  |  |  ------------------
  |  |  |  |  140|  63.9k|# define DWARF_LOC_TYPE_MEM     (0 << 0)
  |  |  ------------------
  |  |  |  Branch (147:33): [True: 51.6k, False: 12.3k]
  |  |  ------------------
  ------------------
  207|  51.6k|    return (*c->as->acc.access_mem) (c->as, DWARF_GET_MEM_LOC (loc), val,
  ------------------
  |  |  421|  51.6k|#define DWARF_GET_MEM_LOC(l)    DWARF_GET_LOC(l)
  |  |  ------------------
  |  |  |  |  139|  51.6k|#define DWARF_GET_LOC(l)        ((l).val)
  |  |  ------------------
  ------------------
  208|  51.6k|                                     0, c->as_arg);
  209|  63.9k|  assert(DWARF_IS_VAL_LOC (loc));
  ------------------
  |  Branch (209:3): [True: 0, False: 12.3k]
  |  Branch (209:3): [True: 12.3k, False: 0]
  ------------------
  210|  12.3k|  *val = DWARF_GET_LOC (loc);
  ------------------
  |  |  139|  12.3k|#define DWARF_GET_LOC(l)        ((l).val)
  ------------------
  211|  12.3k|  return 0;
  212|  12.3k|}
Lstep.c:dwarf_get_validate:
  118|  54.5k|{
  119|  54.5k|  assert(cursor->as == unw_local_addr_space);
  ------------------
  |  Branch (119:3): [True: 0, False: 54.5k]
  |  Branch (119:3): [True: 54.5k, False: 0]
  ------------------
  120|  54.5k|  return AS_ARG_GET_VALIDATE(cursor->as_arg);
  ------------------
  |  |  107|  54.5k|  ((int) ((uintptr_t) arg & AS_ARG_VALIDATE_MASK))
  |  |  ------------------
  |  |  |  |  102|  54.5k|#define AS_ARG_VALIDATE_MASK 0x1UL
  |  |  ------------------
  ------------------
  121|  54.5k|}
Lstep.c:dwarf_set_validate:
  125|   109k|{
  126|   109k|  assert(cursor->as == unw_local_addr_space);
  ------------------
  |  Branch (126:3): [True: 0, False: 109k]
  |  Branch (126:3): [True: 109k, False: 0]
  ------------------
  127|   109k|  uintptr_t *packed_args = (uintptr_t *) &cursor->as_arg;
  128|   109k|  *packed_args |= (AS_ARG_VALIDATE_MASK & validate);
  ------------------
  |  |  102|   109k|#define AS_ARG_VALIDATE_MASK 0x1UL
  ------------------
  129|   109k|}
Lparser.c:dwarf_get:
  199|  48.5k|{
  200|  48.5k|  if (DWARF_IS_NULL_LOC (loc))
  ------------------
  |  |  156|  48.5k|# define DWARF_IS_NULL_LOC(l)   (DWARF_GET_LOC (l) == 0)
  |  |  ------------------
  |  |  |  |  139|  48.5k|#define DWARF_GET_LOC(l)        ((l).val)
  |  |  ------------------
  |  |  |  Branch (156:33): [True: 0, False: 48.5k]
  |  |  ------------------
  ------------------
  201|      0|    return -UNW_EBADREG;
  202|       |
  203|  48.5k|  if (DWARF_IS_REG_LOC (loc))
  ------------------
  |  |  145|  48.5k|# define DWARF_IS_REG_LOC(l)    (((l).type & DWARF_LOC_TYPE_REG) != 0)
  |  |  ------------------
  |  |  |  |  142|  48.5k|# define DWARF_LOC_TYPE_REG     (1 << 1)
  |  |  ------------------
  |  |  |  Branch (145:33): [True: 0, False: 48.5k]
  |  |  ------------------
  ------------------
  204|      0|    return (*c->as->acc.access_reg) (c->as, DWARF_GET_REG_LOC (loc), val,
  ------------------
  |  |  422|      0|#define DWARF_GET_REG_LOC(l)    ((unw_regnum_t) DWARF_GET_LOC(l))
  |  |  ------------------
  |  |  |  |  139|      0|#define DWARF_GET_LOC(l)        ((l).val)
  |  |  ------------------
  ------------------
  205|      0|                                     0, c->as_arg);
  206|  48.5k|  if (DWARF_IS_MEM_LOC (loc))
  ------------------
  |  |  147|  48.5k|# define DWARF_IS_MEM_LOC(l)    ((l).type == DWARF_LOC_TYPE_MEM)
  |  |  ------------------
  |  |  |  |  140|  48.5k|# define DWARF_LOC_TYPE_MEM     (0 << 0)
  |  |  ------------------
  |  |  |  Branch (147:33): [True: 48.5k, False: 0]
  |  |  ------------------
  ------------------
  207|  48.5k|    return (*c->as->acc.access_mem) (c->as, DWARF_GET_MEM_LOC (loc), val,
  ------------------
  |  |  421|  48.5k|#define DWARF_GET_MEM_LOC(l)    DWARF_GET_LOC(l)
  |  |  ------------------
  |  |  |  |  139|  48.5k|#define DWARF_GET_LOC(l)        ((l).val)
  |  |  ------------------
  ------------------
  208|  48.5k|                                     0, c->as_arg);
  209|  48.5k|  assert(DWARF_IS_VAL_LOC (loc));
  ------------------
  |  Branch (209:3): [True: 0, False: 0]
  |  Branch (209:3): [True: 0, False: 0]
  ------------------
  210|      0|  *val = DWARF_GET_LOC (loc);
  ------------------
  |  |  139|      0|#define DWARF_GET_LOC(l)        ((l).val)
  ------------------
  211|      0|  return 0;
  212|      0|}

_ULx86_64_dwarf_extract_proc_info_from_fde:
  237|     15|{
  238|     15|  unw_word_t fde_end_addr, cie_addr, cie_offset_addr, aug_end_addr = 0;
  239|     15|  unw_word_t start_ip, ip_range, aug_size, addr = *addrp;
  240|     15|  int ret;
  241|     15|  uint8_t ip_range_encoding;
  242|     15|  struct dwarf_cie_info dci;
  243|     15|  uint64_t u64val;
  244|     15|  uint32_t u32val;
  245|       |
  246|     15|  Debug (12, "FDE @ 0x%lx\n", (long) addr);
  247|       |
  248|     15|  memset (&dci, 0, sizeof (dci));
  249|       |
  250|     15|  if ((ret = dwarf_readu32 (as, a, &addr, &u32val, arg)) < 0)
  ------------------
  |  Branch (250:7): [True: 0, False: 15]
  ------------------
  251|      0|    return ret;
  252|       |
  253|     15|  if (u32val != 0xffffffff)
  ------------------
  |  Branch (253:7): [True: 15, False: 0]
  ------------------
  254|     15|    {
  255|     15|      int32_t cie_offset = 0;
  256|       |
  257|       |      /* In some configurations, an FDE with a 0 length indicates the
  258|       |         end of the FDE-table.  */
  259|     15|      if (u32val == 0)
  ------------------
  |  Branch (259:11): [True: 0, False: 15]
  ------------------
  260|      0|        return -UNW_ENOINFO;
  261|       |
  262|       |      /* the FDE is in the 32-bit DWARF format */
  263|       |
  264|     15|      *addrp = fde_end_addr = addr + u32val;
  265|     15|      cie_offset_addr = addr;
  266|       |
  267|     15|      if ((ret = dwarf_reads32 (as, a, &addr, &cie_offset, arg)) < 0)
  ------------------
  |  Branch (267:11): [True: 0, False: 15]
  ------------------
  268|      0|        return ret;
  269|       |
  270|     15|      if (is_cie_id (cie_offset, is_debug_frame))
  ------------------
  |  Branch (270:11): [True: 0, False: 15]
  ------------------
  271|       |        /* ignore CIEs (happens during linear searches) */
  272|      0|        return 0;
  273|       |
  274|     15|      if (is_debug_frame)
  ------------------
  |  Branch (274:11): [True: 0, False: 15]
  ------------------
  275|      0|        cie_addr = base + cie_offset;
  276|     15|      else
  277|       |        /* DWARF says that the CIE_pointer in the FDE is a
  278|       |           .debug_frame-relative offset, but the GCC-generated .eh_frame
  279|       |           sections instead store a "pcrelative" offset, which is just
  280|       |           as fine as it's self-contained.  */
  281|     15|        cie_addr = cie_offset_addr - cie_offset;
  282|     15|    }
  283|      0|  else
  284|      0|    {
  285|      0|      int64_t cie_offset = 0;
  286|       |
  287|       |      /* the FDE is in the 64-bit DWARF format */
  288|       |
  289|      0|      if ((ret = dwarf_readu64 (as, a, &addr, &u64val, arg)) < 0)
  ------------------
  |  Branch (289:11): [True: 0, False: 0]
  ------------------
  290|      0|        return ret;
  291|       |
  292|      0|      *addrp = fde_end_addr = (unw_word_t) (addr + u64val);
  293|      0|      cie_offset_addr = addr;
  294|       |
  295|      0|      if ((ret = dwarf_reads64 (as, a, &addr, &cie_offset, arg)) < 0)
  ------------------
  |  Branch (295:11): [True: 0, False: 0]
  ------------------
  296|      0|        return ret;
  297|       |
  298|      0|      if (is_cie_id ((unw_word_t) cie_offset, is_debug_frame))
  ------------------
  |  Branch (298:11): [True: 0, False: 0]
  ------------------
  299|       |        /* ignore CIEs (happens during linear searches) */
  300|      0|        return 0;
  301|       |
  302|      0|      if (is_debug_frame)
  ------------------
  |  Branch (302:11): [True: 0, False: 0]
  ------------------
  303|      0|        cie_addr = (unw_word_t) (base + cie_offset);
  304|      0|      else
  305|       |        /* DWARF says that the CIE_pointer in the FDE is a
  306|       |           .debug_frame-relative offset, but the GCC-generated .eh_frame
  307|       |           sections instead store a "pcrelative" offset, which is just
  308|       |           as fine as it's self-contained.  */
  309|      0|        cie_addr = (unw_word_t) ((uint64_t) cie_offset_addr - cie_offset);
  310|      0|    }
  311|       |
  312|     15|  Debug (15, "looking for CIE at address %lx\n", (long) cie_addr);
  313|       |
  314|     15|  if ((ret = parse_cie (as, a, cie_addr, pi, &dci, is_debug_frame, arg)) < 0)
  ------------------
  |  Branch (314:7): [True: 0, False: 15]
  ------------------
  315|      0|    return ret;
  316|       |
  317|       |  /* IP-range has same encoding as FDE pointers, except that it's
  318|       |     always an absolute value: */
  319|     15|  ip_range_encoding = dci.fde_encoding & DW_EH_PE_FORMAT_MASK;
  ------------------
  |  |  194|     15|#define DW_EH_PE_FORMAT_MASK    0x0f    /* format of the encoded value */
  ------------------
  320|       |
  321|     15|  if ((ret = dwarf_read_encoded_pointer (as, a, &addr, dci.fde_encoding,
  ------------------
  |  |  402|     15|#define dwarf_read_encoded_pointer      UNW_OBJ (dwarf_read_encoded_pointer)
  |  |  ------------------
  |  |  |  |   48|     15|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (321:7): [True: 0, False: 15]
  ------------------
  322|     15|                                         pi, &start_ip, arg)) < 0
  323|     15|      || (ret = dwarf_read_encoded_pointer (as, a, &addr, ip_range_encoding,
  ------------------
  |  |  402|     15|#define dwarf_read_encoded_pointer      UNW_OBJ (dwarf_read_encoded_pointer)
  |  |  ------------------
  |  |  |  |   48|     15|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (323:10): [True: 0, False: 15]
  ------------------
  324|     15|                                            pi, &ip_range, arg)) < 0)
  325|      0|    return ret;
  326|     15|  pi->start_ip = start_ip;
  327|     15|  pi->end_ip = start_ip + ip_range;
  328|     15|  pi->handler = dci.handler;
  329|       |
  330|     15|  if (dci.sized_augmentation)
  ------------------
  |  Branch (330:7): [True: 15, False: 0]
  ------------------
  331|     15|    {
  332|     15|      if ((ret = dwarf_read_uleb128 (as, a, &addr, &aug_size, arg)) < 0)
  ------------------
  |  Branch (332:11): [True: 0, False: 15]
  ------------------
  333|      0|        return ret;
  334|     15|      aug_end_addr = addr + aug_size;
  335|     15|    }
  336|       |
  337|     15|  if ((ret = dwarf_read_encoded_pointer (as, a, &addr, dci.lsda_encoding,
  ------------------
  |  |  402|     15|#define dwarf_read_encoded_pointer      UNW_OBJ (dwarf_read_encoded_pointer)
  |  |  ------------------
  |  |  |  |   48|     15|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (337:7): [True: 0, False: 15]
  ------------------
  338|     15|                                         pi, &pi->lsda, arg)) < 0)
  339|      0|    return ret;
  340|       |
  341|     15|  Debug (15, "FDE covers IP 0x%lx-0x%lx, LSDA=0x%lx\n",
  342|     15|         (long) pi->start_ip, (long) pi->end_ip, (long) pi->lsda);
  343|       |
  344|     15|  if (need_unwind_info)
  ------------------
  |  Branch (344:7): [True: 15, False: 0]
  ------------------
  345|     15|    {
  346|     15|      pi->format = UNW_INFO_FORMAT_TABLE;
  347|     15|      pi->unwind_info_size = sizeof (dci);
  348|     15|      pi->unwind_info = mempool_alloc (&dwarf_cie_info_pool);
  ------------------
  |  |   56|     15|#define mempool_alloc(p)        UNWI_ARCH_OBJ(_mempool_alloc)(p)
  |  |  ------------------
  |  |  |  |  174|     15|#define UNWI_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_UI,UNW_TARGET),_), fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  349|     15|      if (!pi->unwind_info)
  ------------------
  |  Branch (349:11): [True: 0, False: 15]
  ------------------
  350|      0|        return -UNW_ENOMEM;
  351|       |
  352|     15|      if (dci.have_abi_marker)
  ------------------
  |  Branch (352:11): [True: 0, False: 15]
  ------------------
  353|      0|        {
  354|      0|          if ((ret = dwarf_readu16 (as, a, &addr, &dci.abi, arg)) < 0
  ------------------
  |  Branch (354:15): [True: 0, False: 0]
  ------------------
  355|      0|              || (ret = dwarf_readu16 (as, a, &addr, &dci.tag, arg)) < 0)
  ------------------
  |  Branch (355:18): [True: 0, False: 0]
  ------------------
  356|      0|            return ret;
  357|      0|          Debug (13, "Found ABI marker = (abi=%u, tag=%u)\n",
  358|      0|                 dci.abi, dci.tag);
  359|      0|        }
  360|       |
  361|     15|      if (dci.sized_augmentation)
  ------------------
  |  Branch (361:11): [True: 15, False: 0]
  ------------------
  362|     15|        dci.fde_instr_start = aug_end_addr;
  363|      0|      else
  364|      0|        dci.fde_instr_start = addr;
  365|     15|      dci.fde_instr_end = fde_end_addr;
  366|       |
  367|     15|      memcpy (pi->unwind_info, &dci, sizeof (dci));
  368|     15|    }
  369|     15|  return 0;
  370|     15|}
Lfde.c:is_cie_id:
   30|     15|{
   31|       |  /* The CIE ID is normally 0xffffffff (for 32-bit ELF) or
   32|       |     0xffffffffffffffff (for 64-bit ELF).  However, .eh_frame
   33|       |     uses 0.  */
   34|     15|  if (is_debug_frame)
  ------------------
  |  Branch (34:7): [True: 0, False: 15]
  ------------------
   35|      0|      return val == (unw_word_t)(-1);
   36|     15|  else
   37|     15|    return (val == 0);
   38|     15|}
Lfde.c:parse_cie:
   49|     15|{
   50|     15|  uint8_t version, ch, augstr[5], fde_encoding, handler_encoding;
   51|     15|  uint8_t address_size, segment_size;
   52|     15|  unw_word_t len, cie_end_addr, aug_size;
   53|     15|  uint32_t u32val;
   54|     15|  uint64_t u64val;
   55|     15|  size_t i;
   56|     15|  int ret;
   57|     15|# define STR2(x)        #x
   58|     15|# define STR(x)         STR2(x)
   59|       |
   60|       |  /* Pick appropriate default for FDE-encoding.  DWARF spec says
   61|       |     start-IP (initial_location) and the code-size (address_range) are
   62|       |     "address-unit sized constants".  The `R' augmentation can be used
   63|       |     to override this, but by default, we pick an address-sized unit
   64|       |     for fde_encoding.  */
   65|     15|  switch (dwarf_addr_size (as))
  ------------------
  |  |   15|     15|# define dwarf_addr_size(as) (sizeof (unw_word_t))
  ------------------
   66|     15|    {
   67|      0|    case 4:     fde_encoding = DW_EH_PE_udata4; break;
  ------------------
  |  |  205|      0|#define DW_EH_PE_udata4         0x03    /* unsigned 32-bit value */
  ------------------
  |  Branch (67:5): [True: 0, False: 15]
  ------------------
   68|     15|    case 8:     fde_encoding = DW_EH_PE_udata8; break;
  ------------------
  |  |  206|     15|#define DW_EH_PE_udata8         0x04    /* unsigned 64-bit value */
  ------------------
  |  Branch (68:5): [True: 15, False: 0]
  ------------------
   69|      0|    default:    fde_encoding = DW_EH_PE_omit; break;
  ------------------
  |  |  201|      0|#define DW_EH_PE_omit           0xff
  ------------------
  |  Branch (69:5): [True: 0, False: 15]
  ------------------
   70|     15|    }
   71|       |
   72|     15|  dci->lsda_encoding = DW_EH_PE_omit;
  ------------------
  |  |  201|     15|#define DW_EH_PE_omit           0xff
  ------------------
   73|     15|  dci->handler = 0;
   74|       |
   75|     15|  if ((ret = dwarf_readu32 (as, a, &addr, &u32val, arg)) < 0)
  ------------------
  |  Branch (75:7): [True: 0, False: 15]
  ------------------
   76|      0|    return ret;
   77|       |
   78|     15|  if (u32val != 0xffffffff)
  ------------------
  |  Branch (78:7): [True: 15, False: 0]
  ------------------
   79|     15|    {
   80|       |      /* the CIE is in the 32-bit DWARF format */
   81|     15|      uint32_t cie_id;
   82|       |      /* DWARF says CIE id should be 0xffffffff, but in .eh_frame, it's 0 */
   83|     15|      const uint32_t expected_id = (is_debug_frame) ? 0xffffffff : 0;
  ------------------
  |  Branch (83:36): [True: 0, False: 15]
  ------------------
   84|       |
   85|     15|      len = u32val;
   86|     15|      cie_end_addr = addr + len;
   87|     15|      if ((ret = dwarf_readu32 (as, a, &addr, &cie_id, arg)) < 0)
  ------------------
  |  Branch (87:11): [True: 0, False: 15]
  ------------------
   88|      0|        return ret;
   89|     15|      if (cie_id != expected_id)
  ------------------
  |  Branch (89:11): [True: 0, False: 15]
  ------------------
   90|      0|        {
   91|      0|          Debug (1, "Unexpected CIE id %x\n", cie_id);
   92|      0|          return -UNW_EINVAL;
   93|      0|        }
   94|     15|    }
   95|      0|  else
   96|      0|    {
   97|       |      /* the CIE is in the 64-bit DWARF format */
   98|      0|      uint64_t cie_id;
   99|       |      /* DWARF says CIE id should be 0xffffffffffffffff, but in
  100|       |         .eh_frame, it's 0 */
  101|      0|      const uint64_t expected_id = (is_debug_frame) ? 0xffffffffffffffffull : 0;
  ------------------
  |  Branch (101:36): [True: 0, False: 0]
  ------------------
  102|       |
  103|      0|      if ((ret = dwarf_readu64 (as, a, &addr, &u64val, arg)) < 0)
  ------------------
  |  Branch (103:11): [True: 0, False: 0]
  ------------------
  104|      0|        return ret;
  105|      0|      len = (unw_word_t) u64val;
  106|      0|      cie_end_addr = addr + len;
  107|      0|      if ((ret = dwarf_readu64 (as, a, &addr, &cie_id, arg)) < 0)
  ------------------
  |  Branch (107:11): [True: 0, False: 0]
  ------------------
  108|      0|        return ret;
  109|      0|      if (cie_id != expected_id)
  ------------------
  |  Branch (109:11): [True: 0, False: 0]
  ------------------
  110|      0|        {
  111|      0|          Debug (1, "Unexpected CIE id %llx\n", (long long) cie_id);
  112|      0|          return -UNW_EINVAL;
  113|      0|        }
  114|      0|    }
  115|     15|  dci->cie_instr_end = cie_end_addr;
  116|       |
  117|     15|  if ((ret = dwarf_readu8 (as, a, &addr, &version, arg)) < 0)
  ------------------
  |  Branch (117:7): [True: 0, False: 15]
  ------------------
  118|      0|    return ret;
  119|       |
  120|       |  /* GCC emits version 1??? */
  121|     15|  if (version != 1 && (version < DWARF_CIE_VERSION || version > DWARF_CIE_VERSION_MAX))
  ------------------
  |  |  142|      0|#define DWARF_CIE_VERSION       3
  ------------------
                if (version != 1 && (version < DWARF_CIE_VERSION || version > DWARF_CIE_VERSION_MAX))
  ------------------
  |  |  143|      0|#define DWARF_CIE_VERSION_MAX   4
  ------------------
  |  Branch (121:7): [True: 0, False: 15]
  |  Branch (121:24): [True: 0, False: 0]
  |  Branch (121:55): [True: 0, False: 0]
  ------------------
  122|      0|    {
  123|      0|      Debug (1, "Got CIE version %u, expected version 1 or between "
  124|      0|             STR (DWARF_CIE_VERSION) " and " STR (DWARF_CIE_VERSION_MAX) "\n", version);
  125|      0|      return -UNW_EBADVERSION;
  126|      0|    }
  127|       |
  128|       |  /* read and parse the augmentation string: */
  129|     15|  memset (augstr, 0, sizeof (augstr));
  130|     15|  for (i = 0;;)
  131|     45|    {
  132|     45|      if ((ret = dwarf_readu8 (as, a, &addr, &ch, arg)) < 0)
  ------------------
  |  Branch (132:11): [True: 0, False: 45]
  ------------------
  133|      0|        return ret;
  134|       |
  135|     45|      if (!ch)
  ------------------
  |  Branch (135:11): [True: 15, False: 30]
  ------------------
  136|     15|        break;  /* end of augmentation string */
  137|       |
  138|     30|      if (i < sizeof (augstr) - 1)
  ------------------
  |  Branch (138:11): [True: 30, False: 0]
  ------------------
  139|     30|        augstr[i++] = ch;
  140|     30|    }
  141|       |
  142|     15|  if (version > 3)
  ------------------
  |  Branch (142:7): [True: 0, False: 15]
  ------------------
  143|      0|    {
  144|      0|      if((ret = dwarf_readu8(as, a, &addr, &address_size, arg)) < 0)
  ------------------
  |  Branch (144:10): [True: 0, False: 0]
  ------------------
  145|      0|	return ret;
  146|       |
  147|      0|      if((ret = dwarf_readu8(as, a, &addr, &segment_size, arg)) < 0)
  ------------------
  |  Branch (147:10): [True: 0, False: 0]
  ------------------
  148|      0|	return ret;
  149|      0|    }
  150|       |
  151|     15|  if ((ret = dwarf_read_uleb128 (as, a, &addr, &dci->code_align, arg)) < 0
  ------------------
  |  Branch (151:7): [True: 0, False: 15]
  ------------------
  152|     15|      || (ret = dwarf_read_sleb128 (as, a, &addr, &dci->data_align, arg)) < 0)
  ------------------
  |  Branch (152:10): [True: 0, False: 15]
  ------------------
  153|      0|    return ret;
  154|       |
  155|       |  /* Read the return-address column either as a u8 or as a uleb128.  */
  156|     15|  if (version == 1)
  ------------------
  |  Branch (156:7): [True: 15, False: 0]
  ------------------
  157|     15|    {
  158|     15|      if ((ret = dwarf_readu8 (as, a, &addr, &ch, arg)) < 0)
  ------------------
  |  Branch (158:11): [True: 0, False: 15]
  ------------------
  159|      0|        return ret;
  160|     15|      dci->ret_addr_column = ch;
  161|     15|    }
  162|      0|  else if ((ret = dwarf_read_uleb128 (as, a, &addr, &dci->ret_addr_column,
  ------------------
  |  Branch (162:12): [True: 0, False: 0]
  ------------------
  163|      0|                                      arg)) < 0)
  164|      0|    return ret;
  165|       |
  166|     15|  i = 0;
  167|     15|  if (augstr[0] == 'z')
  ------------------
  |  Branch (167:7): [True: 15, False: 0]
  ------------------
  168|     15|    {
  169|     15|      dci->sized_augmentation = 1;
  170|     15|      if ((ret = dwarf_read_uleb128 (as, a, &addr, &aug_size, arg)) < 0)
  ------------------
  |  Branch (170:11): [True: 0, False: 15]
  ------------------
  171|      0|        return ret;
  172|     15|      i++;
  173|     15|    }
  174|       |
  175|     30|  for (; i < sizeof (augstr) && augstr[i]; ++i)
  ------------------
  |  Branch (175:10): [True: 30, False: 0]
  |  Branch (175:33): [True: 15, False: 15]
  ------------------
  176|     15|    switch (augstr[i])
  177|     15|      {
  178|      0|      case 'L':
  ------------------
  |  Branch (178:7): [True: 0, False: 15]
  ------------------
  179|       |        /* read the LSDA pointer-encoding format.  */
  180|      0|        if ((ret = dwarf_readu8 (as, a, &addr, &ch, arg)) < 0)
  ------------------
  |  Branch (180:13): [True: 0, False: 0]
  ------------------
  181|      0|          return ret;
  182|      0|        dci->lsda_encoding = ch;
  183|      0|        break;
  184|       |
  185|     15|      case 'R':
  ------------------
  |  Branch (185:7): [True: 15, False: 0]
  ------------------
  186|       |        /* read the FDE pointer-encoding format.  */
  187|     15|        if ((ret = dwarf_readu8 (as, a, &addr, &fde_encoding, arg)) < 0)
  ------------------
  |  Branch (187:13): [True: 0, False: 15]
  ------------------
  188|      0|          return ret;
  189|     15|        break;
  190|       |
  191|     15|      case 'P':
  ------------------
  |  Branch (191:7): [True: 0, False: 15]
  ------------------
  192|       |        /* read the personality-routine pointer-encoding format.  */
  193|      0|        if ((ret = dwarf_readu8 (as, a, &addr, &handler_encoding, arg)) < 0)
  ------------------
  |  Branch (193:13): [True: 0, False: 0]
  ------------------
  194|      0|          return ret;
  195|      0|        if ((ret = dwarf_read_encoded_pointer (as, a, &addr, handler_encoding,
  ------------------
  |  |  402|      0|#define dwarf_read_encoded_pointer      UNW_OBJ (dwarf_read_encoded_pointer)
  |  |  ------------------
  |  |  |  |   48|      0|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      0|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (195:13): [True: 0, False: 0]
  ------------------
  196|      0|                                               pi, &dci->handler, arg)) < 0)
  197|      0|          return ret;
  198|      0|        break;
  199|       |
  200|      0|      case 'S':
  ------------------
  |  Branch (200:7): [True: 0, False: 15]
  ------------------
  201|       |        /* This is a signal frame. */
  202|      0|        dci->signal_frame = 1;
  203|       |
  204|       |        /* Temporarily set it to one so dwarf_parse_fde() knows that
  205|       |           it should fetch the actual ABI/TAG pair from the FDE.  */
  206|      0|        dci->have_abi_marker = 1;
  207|      0|        break;
  208|       |
  209|      0|      default:
  ------------------
  |  Branch (209:7): [True: 0, False: 15]
  ------------------
  210|      0|        Debug (1, "Unexpected augmentation string `%s'\n", augstr);
  211|      0|        if (dci->sized_augmentation)
  ------------------
  |  Branch (211:13): [True: 0, False: 0]
  ------------------
  212|       |          /* If we have the size of the augmentation body, we can skip
  213|       |             over the parts that we don't understand, so we're OK. */
  214|      0|          goto done;
  215|      0|        else
  216|      0|          return -UNW_EINVAL;
  217|     15|      }
  218|     15| done:
  219|     15|  dci->fde_encoding = fde_encoding;
  220|     15|  dci->cie_instr_start = addr;
  221|     15|  Debug (15, "CIE parsed OK, augmentation = \"%s\", handler=0x%lx\n",
  222|     15|         augstr, (long) dci->handler);
  223|     15|  return 0;
  224|     15|}

_ULx86_64_dwarf_callback:
  571|     23|{
  572|     23|  struct dwarf_callback_data *cb_data = ptr;
  573|     23|  unw_dyn_info_t *di = &cb_data->di;
  574|     23|  const Elf_W(Phdr) *phdr, *p_eh_hdr, *p_dynamic, *p_text;
  575|     23|  unw_word_t addr, eh_frame_start, eh_frame_end, fde_count, ip;
  576|     23|  Elf_W(Addr) load_base, max_load_addr = 0;
  ------------------
  |  |   44|     23|# define Elf_W(x)       Elf64_##x
  ------------------
  577|     23|  int ret, need_unwind_info = cb_data->need_unwind_info;
  578|     23|  unw_proc_info_t *pi = cb_data->pi;
  579|     23|  struct dwarf_eh_frame_hdr *hdr = NULL;
  580|     23|  unw_accessors_t *a;
  581|     23|  long n;
  582|     23|  int found = 0;
  583|     23|  Elf_W (Addr) eh_frame = 0;
  ------------------
  |  |   44|     23|# define Elf_W(x)       Elf64_##x
  ------------------
  584|       |#ifdef CONFIG_DEBUG_FRAME
  585|       |  unw_word_t start, end;
  586|       |#endif /* CONFIG_DEBUG_FRAME*/
  587|       |
  588|     23|  ip = cb_data->ip;
  589|       |
  590|       |  /* Make sure struct dl_phdr_info is at least as big as we need.  */
  591|     23|  if (size < offsetof (struct dl_phdr_info, dlpi_phnum)
  ------------------
  |  Branch (591:7): [True: 0, False: 23]
  ------------------
  592|     23|             + sizeof (info->dlpi_phnum))
  593|      0|    return -1;
  594|       |
  595|     23|  Debug (15, "checking %s, base=0x%lx)\n",
  596|     23|         info->dlpi_name, (long) info->dlpi_addr);
  597|       |
  598|     23|  phdr = info->dlpi_phdr;
  599|     23|  load_base = info->dlpi_addr;
  600|     23|  p_text = NULL;
  601|     23|  p_eh_hdr = NULL;
  602|     23|  p_dynamic = NULL;
  603|       |
  604|       |  /* See if PC falls into one of the loaded segments.  Find the
  605|       |     eh-header segment at the same time.  */
  606|    289|  for (n = info->dlpi_phnum; --n >= 0; phdr++)
  ------------------
  |  Branch (606:30): [True: 266, False: 23]
  ------------------
  607|    266|    {
  608|    266|      if (phdr->p_type == PT_LOAD)
  ------------------
  |  Branch (608:11): [True: 89, False: 177]
  ------------------
  609|     89|        {
  610|     89|          Elf_W(Addr) vaddr = phdr->p_vaddr + load_base;
  ------------------
  |  |   44|     89|# define Elf_W(x)       Elf64_##x
  ------------------
  611|       |
  612|     89|          if (ip >= vaddr && ip < vaddr + phdr->p_memsz)
  ------------------
  |  Branch (612:15): [True: 34, False: 55]
  |  Branch (612:30): [True: 15, False: 19]
  ------------------
  613|     15|            p_text = phdr;
  614|       |
  615|     89|          if (vaddr + phdr->p_filesz > max_load_addr)
  ------------------
  |  Branch (615:15): [True: 89, False: 0]
  ------------------
  616|     89|            max_load_addr = vaddr + phdr->p_filesz;
  617|     89|        }
  618|    177|      else if (phdr->p_type == PT_GNU_EH_FRAME)
  ------------------
  |  Branch (618:16): [True: 23, False: 154]
  ------------------
  619|     23|        p_eh_hdr = phdr;
  620|       |#if defined __sun
  621|       |      else if (phdr->p_type == PT_SUNW_UNWIND)
  622|       |        p_eh_hdr = phdr;
  623|       |#endif
  624|    154|      else if (phdr->p_type == PT_DYNAMIC)
  ------------------
  |  Branch (624:16): [True: 23, False: 131]
  ------------------
  625|     23|        p_dynamic = phdr;
  626|    266|    }
  627|       |
  628|     23|  if (!p_text)
  ------------------
  |  Branch (628:7): [True: 8, False: 15]
  ------------------
  629|      8|    return 0;
  630|       |
  631|     15|  if (p_eh_hdr)
  ------------------
  |  Branch (631:7): [True: 15, False: 0]
  ------------------
  632|     15|    {
  633|     15|      hdr = (struct dwarf_eh_frame_hdr *) (p_eh_hdr->p_vaddr + load_base);
  634|     15|    }
  635|      0|  else
  636|      0|    {
  637|      0|      Debug (1, "no .eh_frame_hdr section found\n");
  638|      0|      eh_frame = dwarf_find_eh_frame_section (info);
  639|      0|      if (eh_frame)
  ------------------
  |  Branch (639:11): [True: 0, False: 0]
  ------------------
  640|      0|        Debug (1, "using the .eh_frame section of %s directly\n",
  641|      0|               info->dlpi_name);
  642|      0|    }
  643|       |
  644|     15|  if (hdr || eh_frame)
  ------------------
  |  Branch (644:7): [True: 15, False: 0]
  |  Branch (644:14): [True: 0, False: 0]
  ------------------
  645|     15|    {
  646|     15|      if (p_dynamic)
  ------------------
  |  Branch (646:11): [True: 15, False: 0]
  ------------------
  647|     15|        {
  648|       |          /* For dynamically linked executables and shared libraries,
  649|       |             DT_PLTGOT is the value that data-relative addresses are
  650|       |             relative to for that object.  We call this the "gp".  */
  651|     15|          Elf_W(Dyn) *dyn = (Elf_W(Dyn) *)(p_dynamic->p_vaddr + load_base);
  ------------------
  |  |   44|     15|# define Elf_W(x)       Elf64_##x
  ------------------
  652|    334|          for (; dyn->d_tag != DT_NULL; ++dyn)
  ------------------
  |  Branch (652:18): [True: 334, False: 0]
  ------------------
  653|    334|            if (dyn->d_tag == DT_PLTGOT)
  ------------------
  |  Branch (653:17): [True: 15, False: 319]
  ------------------
  654|     15|              {
  655|       |                /* Assume that _DYNAMIC is writable and GLIBC has
  656|       |                   relocated it (true for x86 at least).  */
  657|     15|                di->gp = dyn->d_un.d_ptr;
  658|     15|                break;
  659|     15|              }
  660|     15|        }
  661|      0|      else
  662|       |        /* Otherwise this is a static executable with no _DYNAMIC.  Assume
  663|       |           that data-relative addresses are relative to 0, i.e.,
  664|       |           absolute.  */
  665|      0|        di->gp = 0;
  666|     15|      pi->gp = di->gp;
  667|       |
  668|     15|      if (hdr == NULL)
  ------------------
  |  Branch (668:11): [True: 0, False: 15]
  ------------------
  669|      0|        {
  670|       |          /* There is no .eh_frame_hdr section, hence no binary search
  671|       |             table: search the .eh_frame section linearly.  */
  672|      0|          eh_frame_start = eh_frame;
  673|      0|          eh_frame_end = max_load_addr; /* XXX can we do better? */
  674|      0|          fde_count = ~0UL;
  675|       |
  676|      0|          Debug (1, "eh_frame_start = %lx eh_frame_end = %lx\n",
  677|      0|                 eh_frame_start, eh_frame_end);
  678|       |
  679|      0|          found = linear_search (unw_local_addr_space, ip,
  ------------------
  |  |  274|      0|#define unw_local_addr_space		UNW_OBJ(local_addr_space)
  |  |  ------------------
  |  |  |  |   48|      0|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      0|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  680|      0|                                 eh_frame_start, eh_frame_end, fde_count,
  681|      0|                                 pi, need_unwind_info, NULL);
  682|      0|          if (found != 1)
  ------------------
  |  Branch (682:15): [True: 0, False: 0]
  ------------------
  683|      0|            found = 0;
  684|      0|          else
  685|      0|            cb_data->single_fde = 1;
  686|       |
  687|      0|          goto out;
  688|      0|        }
  689|       |
  690|     15|      if (hdr->version != DW_EH_VERSION)
  ------------------
  |  |  108|     15|#define DW_EH_VERSION           1       /* The version we're implementing */
  ------------------
  |  Branch (690:11): [True: 0, False: 15]
  ------------------
  691|      0|        {
  692|      0|          Debug (1, "table `%s' has unexpected version %d\n",
  693|      0|                 info->dlpi_name, hdr->version);
  694|      0|          return 0;
  695|      0|        }
  696|       |
  697|     15|      a = unw_get_accessors_int (unw_local_addr_space);
  ------------------
  |  |  278|     15|#define unw_get_accessors_int		UNW_ARCH_OBJ(get_accessors_int)
  |  |  ------------------
  |  |  |  |   49|     15|#define UNW_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    a = unw_get_accessors_int (unw_local_addr_space);
  ------------------
  |  |  274|     15|#define unw_local_addr_space		UNW_OBJ(local_addr_space)
  |  |  ------------------
  |  |  |  |   48|     15|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  698|     15|      addr = (unw_word_t) (uintptr_t) (&hdr->eh_frame);
  699|       |
  700|     15|      if ((ret = dwarf_read_encoded_pointer (unw_local_addr_space, a,
  ------------------
  |  |  402|     15|#define dwarf_read_encoded_pointer      UNW_OBJ (dwarf_read_encoded_pointer)
  |  |  ------------------
  |  |  |  |   48|     15|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if ((ret = dwarf_read_encoded_pointer (unw_local_addr_space, a,
  ------------------
  |  |  274|     15|#define unw_local_addr_space		UNW_OBJ(local_addr_space)
  |  |  ------------------
  |  |  |  |   48|     15|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (700:11): [True: 0, False: 15]
  ------------------
  701|     15|                                             &addr, hdr->eh_frame_ptr_enc, pi,
  702|     15|                                             &eh_frame_start, NULL)) < 0)
  703|      0|        return ret;
  704|       |
  705|     15|      if ((ret = dwarf_read_encoded_pointer (unw_local_addr_space, a,
  ------------------
  |  |  402|     15|#define dwarf_read_encoded_pointer      UNW_OBJ (dwarf_read_encoded_pointer)
  |  |  ------------------
  |  |  |  |   48|     15|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if ((ret = dwarf_read_encoded_pointer (unw_local_addr_space, a,
  ------------------
  |  |  274|     15|#define unw_local_addr_space		UNW_OBJ(local_addr_space)
  |  |  ------------------
  |  |  |  |   48|     15|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (705:11): [True: 0, False: 15]
  ------------------
  706|     15|                                             &addr, hdr->fde_count_enc, pi,
  707|     15|                                             &fde_count, NULL)) < 0)
  708|      0|        return ret;
  709|       |
  710|     15|      if (hdr->table_enc != (DW_EH_PE_datarel | DW_EH_PE_sdata4)
  ------------------
  |  |  216|     15|#define DW_EH_PE_datarel        0x30    /* data-relative */
  ------------------
                    if (hdr->table_enc != (DW_EH_PE_datarel | DW_EH_PE_sdata4)
  ------------------
  |  |  209|     15|#define DW_EH_PE_sdata4         0x0b    /* signed 32-bit value */
  ------------------
  |  Branch (710:11): [True: 0, False: 15]
  ------------------
  711|      0|          && hdr->table_enc != (DW_EH_PE_datarel | DW_EH_PE_sdata8))
  ------------------
  |  |  216|      0|#define DW_EH_PE_datarel        0x30    /* data-relative */
  ------------------
                        && hdr->table_enc != (DW_EH_PE_datarel | DW_EH_PE_sdata8))
  ------------------
  |  |  210|      0|#define DW_EH_PE_sdata8         0x0c    /* signed 64-bit value */
  ------------------
  |  Branch (711:14): [True: 0, False: 0]
  ------------------
  712|      0|        {
  713|       |          /* If there is no search table or it has an unsupported
  714|       |             encoding, fall back on linear search.  */
  715|      0|          if (hdr->table_enc == DW_EH_PE_omit)
  ------------------
  |  |  201|      0|#define DW_EH_PE_omit           0xff
  ------------------
  |  Branch (715:15): [True: 0, False: 0]
  ------------------
  716|      0|            {
  717|      0|              Debug (4, "table `%s' lacks search table; doing linear search\n",
  718|      0|                     info->dlpi_name);
  719|      0|            }
  720|      0|          else
  721|      0|            {
  722|      0|              Debug (4, "table `%s' has encoding 0x%x; doing linear search\n",
  723|      0|                     info->dlpi_name, hdr->table_enc);
  724|      0|            }
  725|       |
  726|      0|          eh_frame_end = max_load_addr; /* XXX can we do better? */
  727|       |
  728|      0|          if (hdr->fde_count_enc == DW_EH_PE_omit)
  ------------------
  |  |  201|      0|#define DW_EH_PE_omit           0xff
  ------------------
  |  Branch (728:15): [True: 0, False: 0]
  ------------------
  729|      0|            fde_count = ~0UL;
  730|      0|          if (hdr->eh_frame_ptr_enc == DW_EH_PE_omit)
  ------------------
  |  |  201|      0|#define DW_EH_PE_omit           0xff
  ------------------
  |  Branch (730:15): [True: 0, False: 0]
  ------------------
  731|      0|            abort ();
  732|       |
  733|      0|          Debug (1, "eh_frame_start = %lx eh_frame_end = %lx\n",
  734|      0|                 eh_frame_start, eh_frame_end);
  735|       |
  736|       |          /* XXX we know how to build a local binary search table for
  737|       |             .debug_frame, so we could do that here too.  */
  738|      0|          found = linear_search (unw_local_addr_space, ip,
  ------------------
  |  |  274|      0|#define unw_local_addr_space		UNW_OBJ(local_addr_space)
  |  |  ------------------
  |  |  |  |   48|      0|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      0|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  739|      0|                                 eh_frame_start, eh_frame_end, fde_count,
  740|      0|                                 pi, need_unwind_info, NULL);
  741|      0|          if (found != 1)
  ------------------
  |  Branch (741:15): [True: 0, False: 0]
  ------------------
  742|      0|            found = 0;
  743|      0|	  else
  744|      0|	    cb_data->single_fde = 1;
  745|      0|        }
  746|     15|      else
  747|     15|        {
  748|     15|          int is_sdata8 = (hdr->table_enc == (DW_EH_PE_datarel | DW_EH_PE_sdata8));
  ------------------
  |  |  216|     15|#define DW_EH_PE_datarel        0x30    /* data-relative */
  ------------------
                        int is_sdata8 = (hdr->table_enc == (DW_EH_PE_datarel | DW_EH_PE_sdata8));
  ------------------
  |  |  210|     15|#define DW_EH_PE_sdata8         0x0c    /* signed 64-bit value */
  ------------------
  749|     15|          size_t entry_size = is_sdata8 ? sizeof (struct table_entry64)
  ------------------
  |  Branch (749:31): [True: 0, False: 15]
  ------------------
  750|     15|                                        : sizeof (struct table_entry);
  751|     15|          di->format = is_sdata8 ? UNW_INFO_FORMAT_REMOTE_TABLE_64
  ------------------
  |  Branch (751:24): [True: 0, False: 15]
  ------------------
  752|     15|                                 : UNW_INFO_FORMAT_REMOTE_TABLE;
  753|     15|          di->start_ip = p_text->p_vaddr + load_base;
  754|     15|          di->end_ip = p_text->p_vaddr + load_base + p_text->p_memsz;
  755|     15|          di->u.rti.name_ptr = (unw_word_t) (uintptr_t) info->dlpi_name;
  756|     15|          di->u.rti.table_data = addr;
  757|     15|          assert (entry_size % sizeof (unw_word_t) == 0);
  ------------------
  |  Branch (757:11): [True: 0, False: 15]
  |  Branch (757:11): [True: 15, False: 0]
  ------------------
  758|     15|          di->u.rti.table_len = (fde_count * entry_size
  759|     15|                                 / sizeof (unw_word_t));
  760|       |          /* For the binary-search table in the eh_frame_hdr, data-relative
  761|       |             means relative to the start of that section... */
  762|     15|          di->u.rti.segbase = (unw_word_t) (uintptr_t) hdr;
  763|       |
  764|     15|          found = 1;
  765|     15|          Debug (15, "found table `%s': segbase=0x%lx, len=%lu, gp=0x%lx, "
  766|     15|                 "table_data=0x%lx\n", (char *) (uintptr_t) di->u.rti.name_ptr,
  767|     15|                 (long) di->u.rti.segbase, (long) di->u.rti.table_len,
  768|     15|                 (long) di->gp, (long) di->u.rti.table_data);
  769|     15|        }
  770|     15|    }
  771|       |
  772|     15|out:
  773|       |#ifdef CONFIG_DEBUG_FRAME
  774|       |  /* Find the start/end of the described region by parsing the phdr_info
  775|       |     structure.  */
  776|       |  start = (unw_word_t) -1;
  777|       |  end = 0;
  778|       |
  779|       |  for (n = 0; n < info->dlpi_phnum; n++)
  780|       |    {
  781|       |      if (info->dlpi_phdr[n].p_type == PT_LOAD)
  782|       |        {
  783|       |          unw_word_t seg_start = info->dlpi_addr + info->dlpi_phdr[n].p_vaddr;
  784|       |          unw_word_t seg_end = seg_start + info->dlpi_phdr[n].p_memsz;
  785|       |
  786|       |          if (seg_start < start)
  787|       |            start = seg_start;
  788|       |
  789|       |          if (seg_end > end)
  790|       |            end = seg_end;
  791|       |        }
  792|       |    }
  793|       |
  794|       |  found = dwarf_find_debug_frame (found, &cb_data->di_debug, ip,
  795|       |                                  info->dlpi_addr, info->dlpi_name, start,
  796|       |                                  end);
  797|       |#endif  /* CONFIG_DEBUG_FRAME */
  798|       |
  799|     15|  return found;
  800|     15|}
_ULx86_64_dwarf_find_proc_info:
  805|     15|{
  806|     15|  struct dwarf_callback_data cb_data;
  807|     15|  intrmask_t saved_mask;
  808|     15|  int ret;
  809|       |
  810|     15|  Debug (14, "looking for IP=0x%lx\n", (long) ip);
  811|       |
  812|     15|  memset (&cb_data, 0, sizeof (cb_data));
  813|     15|  cb_data.ip = ip;
  814|     15|  cb_data.pi = pi;
  815|     15|  cb_data.need_unwind_info = need_unwind_info;
  816|     15|  cb_data.di.format = -1;
  817|     15|  cb_data.di_debug.format = -1;
  818|       |
  819|     15|  SIGPROCMASK (SIG_SETMASK, &unwi_full_mask, &saved_mask);
  ------------------
  |  |  195|     15|    (pthread_sigmask != NULL ? pthread_sigmask((how), (new_mask), (old_mask)) \
  |  |  ------------------
  |  |  |  Branch (195:6): [True: 15, False: 0]
  |  |  ------------------
  |  |  196|     15|     : sigprocmask((how), (new_mask), (old_mask)))
  ------------------
  820|     15|  ret = as->iterate_phdr_function (dwarf_callback, &cb_data);
  ------------------
  |  |  387|     15|#define dwarf_callback                  UNW_OBJ (dwarf_callback)
  |  |  ------------------
  |  |  |  |   48|     15|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  821|     15|  SIGPROCMASK (SIG_SETMASK, &saved_mask, NULL);
  ------------------
  |  |  195|     15|    (pthread_sigmask != NULL ? pthread_sigmask((how), (new_mask), (old_mask)) \
  |  |  ------------------
  |  |  |  Branch (195:6): [True: 15, False: 0]
  |  |  ------------------
  |  |  196|     15|     : sigprocmask((how), (new_mask), (old_mask)))
  ------------------
  822|       |
  823|     15|  if (ret > 0)
  ------------------
  |  Branch (823:7): [True: 15, False: 0]
  ------------------
  824|     15|    {
  825|     15|      if (cb_data.single_fde)
  ------------------
  |  Branch (825:11): [True: 0, False: 15]
  ------------------
  826|       |	/* already got the result in *pi */
  827|      0|	return 0;
  828|       |
  829|       |      /* search the table: */
  830|     15|      if (cb_data.di.format != -1)
  ------------------
  |  Branch (830:11): [True: 15, False: 0]
  ------------------
  831|     15|        {
  832|     15|	ret = dwarf_search_unwind_table_int (as, ip, &cb_data.di,
  ------------------
  |  |   59|     15|#define dwarf_search_unwind_table_int dwarf_search_unwind_table
  |  |  ------------------
  |  |  |  |  390|     15|#define dwarf_search_unwind_table       UNW_OBJ (dwarf_search_unwind_table)
  |  |  |  |  ------------------
  |  |  |  |  |  |   48|     15|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  833|     15|					     pi, need_unwind_info, arg);
  834|     15|        }
  835|      0|      else
  836|      0|	ret = -UNW_ENOINFO;
  837|       |
  838|     15|      if (ret == -UNW_ENOINFO && cb_data.di_debug.format != -1)
  ------------------
  |  Branch (838:11): [True: 0, False: 15]
  |  Branch (838:34): [True: 0, False: 0]
  ------------------
  839|      0|	ret = dwarf_search_unwind_table_int (as, ip, &cb_data.di_debug, pi,
  ------------------
  |  |   59|      0|#define dwarf_search_unwind_table_int dwarf_search_unwind_table
  |  |  ------------------
  |  |  |  |  390|      0|#define dwarf_search_unwind_table       UNW_OBJ (dwarf_search_unwind_table)
  |  |  |  |  ------------------
  |  |  |  |  |  |   48|      0|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   46|      0|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  840|      0|					     need_unwind_info, arg);
  841|     15|    }
  842|      0|  else
  843|      0|    ret = -UNW_ENOINFO;
  844|       |
  845|     15|  return ret;
  846|     15|}
_ULx86_64_dwarf_search_unwind_table:
  922|     15|{
  923|     15|  unw_word_t ip_base = 0, segbase = 0, last_ip, fde_addr;
  924|     15|  unw_word_t found_start_ip_offset = 0, found_fde_offset = 0;
  925|     15|  int found_entry = 0;
  926|     15|  unw_accessors_t *a;
  927|     15|  int ret;
  928|     15|  unw_word_t debug_frame_base = 0;
  929|     15|  size_t table_len = 0;
  930|     15|  const void *table_data = NULL;
  931|     15|  int is_table64 = (di->format == UNW_INFO_FORMAT_REMOTE_TABLE_64);
  932|       |
  933|       |#ifdef UNW_REMOTE_ONLY
  934|       |  assert (is_remote_table(di->format));
  935|       |#else
  936|     15|  assert (is_remote_table(di->format)
  ------------------
  |  Branch (936:3): [True: 15, False: 0]
  |  Branch (936:3): [True: 0, False: 0]
  |  Branch (936:3): [True: 15, False: 0]
  |  Branch (936:3): [True: 0, False: 0]
  ------------------
  937|     15|          || di->format == UNW_INFO_FORMAT_TABLE);
  938|     15|#endif
  939|     15|  assert (ip >= di->start_ip && ip < di->end_ip);
  ------------------
  |  Branch (939:3): [True: 0, False: 15]
  |  Branch (939:3): [True: 0, False: 0]
  |  Branch (939:3): [True: 15, False: 0]
  |  Branch (939:3): [True: 15, False: 0]
  ------------------
  940|       |
  941|     15|  if (is_remote_table(di->format))
  ------------------
  |  Branch (941:7): [True: 15, False: 0]
  ------------------
  942|     15|    {
  943|     15|      table_data = (const void *) (uintptr_t) di->u.rti.table_data;
  944|     15|      table_len = di->u.rti.table_len * sizeof (unw_word_t);
  945|     15|      debug_frame_base = 0;
  946|     15|    }
  947|      0|  else
  948|      0|    {
  949|      0|      assert(di->format == UNW_INFO_FORMAT_TABLE);
  ------------------
  |  Branch (949:7): [True: 0, False: 0]
  |  Branch (949:7): [True: 0, False: 0]
  ------------------
  950|      0|#ifndef UNW_REMOTE_ONLY
  951|      0|      struct unw_debug_frame_list *fdesc = (void *) di->u.ti.table_data;
  952|       |
  953|       |      /* UNW_INFO_FORMAT_TABLE (i.e. .debug_frame) is read from local address
  954|       |         space.  Both the index and the unwind tables live in local memory, but
  955|       |         the address space to check for properties like the address size and
  956|       |         endianness is the target one.  */
  957|      0|      as = unw_local_addr_space;
  ------------------
  |  |  274|      0|#define unw_local_addr_space		UNW_OBJ(local_addr_space)
  |  |  ------------------
  |  |  |  |   48|      0|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      0|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  958|      0|      table_data = fdesc->index;
  959|      0|      table_len = fdesc->index_size;
  960|      0|      debug_frame_base = (uintptr_t) fdesc->debug_frame;
  961|      0|#endif
  962|      0|    }
  963|       |
  964|     15|  a = unw_get_accessors_int (as);
  ------------------
  |  |  278|     15|#define unw_get_accessors_int		UNW_ARCH_OBJ(get_accessors_int)
  |  |  ------------------
  |  |  |  |   49|     15|#define UNW_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  965|       |
  966|     15|  segbase = di->u.rti.segbase;
  967|     15|  if (di->format == UNW_INFO_FORMAT_IP_OFFSET) {
  ------------------
  |  Branch (967:7): [True: 0, False: 15]
  ------------------
  968|      0|    ip_base = di->start_ip;
  969|     15|  } else {
  970|     15|    ip_base = segbase;
  971|     15|  }
  972|       |
  973|     15|#ifndef UNW_REMOTE_ONLY
  974|     15|  if (as == unw_local_addr_space)
  ------------------
  |  |  274|     15|#define unw_local_addr_space		UNW_OBJ(local_addr_space)
  |  |  ------------------
  |  |  |  |   48|     15|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (974:7): [True: 15, False: 0]
  ------------------
  975|     15|    {
  976|     15|      if (is_table64)
  ------------------
  |  Branch (976:11): [True: 0, False: 15]
  ------------------
  977|      0|        {
  978|      0|          const struct table_entry64 *table64 = (const struct table_entry64 *) table_data;
  979|      0|          const struct table_entry64 *e64;
  980|      0|          e64 = lookup64 (table64, table_len, ip - ip_base);
  981|      0|          if (e64)
  ------------------
  |  Branch (981:15): [True: 0, False: 0]
  ------------------
  982|      0|            {
  983|      0|              found_entry = 1;
  984|      0|              found_start_ip_offset = (unw_word_t) e64->start_ip_offset;
  985|      0|              found_fde_offset = (unw_word_t) e64->fde_offset;
  986|      0|              if (&e64[1] < &table64[table_len / sizeof (struct table_entry64)])
  ------------------
  |  Branch (986:19): [True: 0, False: 0]
  ------------------
  987|      0|                last_ip = (unw_word_t) e64[1].start_ip_offset + ip_base;
  988|      0|              else
  989|      0|                last_ip = di->end_ip;
  990|      0|            }
  991|      0|        }
  992|     15|      else
  993|     15|        {
  994|     15|          const struct table_entry *table = (const struct table_entry *) table_data;
  995|     15|          const struct table_entry *e;
  996|     15|          e = lookup (table, table_len, ip - ip_base);
  997|     15|          if (e)
  ------------------
  |  Branch (997:15): [True: 15, False: 0]
  ------------------
  998|     15|            {
  999|     15|              found_entry = 1;
 1000|     15|              found_start_ip_offset = (unw_word_t) e->start_ip_offset;
 1001|     15|              found_fde_offset = (unw_word_t) e->fde_offset;
 1002|     15|              if (&e[1] < &table[table_len / sizeof (struct table_entry)])
  ------------------
  |  Branch (1002:19): [True: 15, False: 0]
  ------------------
 1003|     15|                last_ip = e[1].start_ip_offset + ip_base;
 1004|      0|              else
 1005|      0|                last_ip = di->end_ip;
 1006|     15|            }
 1007|     15|        }
 1008|     15|    }
 1009|      0|  else
 1010|      0|#endif
 1011|      0|    {
 1012|       |#ifndef UNW_LOCAL_ONLY
 1013|       |      int64_t found_start = 0, found_fde = 0;
 1014|       |      /* Cast through unw_sword_t to preserve the sign of the offset on
 1015|       |       * 32-bit targets: ip - ip_base is computed in unsigned unw_word_t
 1016|       |       * arithmetic and would wrap for ip < ip_base (which happens when
 1017|       |       * the IP is below segbase).  The explicit signed-narrowing cast
 1018|       |       * sign-extends the 32-bit result to int64_t correctly.  On 64-bit
 1019|       |       * targets unw_sword_t is int64_t so the cast is a no-op.  */
 1020|       |      int64_t rel_ip = (int64_t)(unw_sword_t)(ip - ip_base);
 1021|       |      int64_t last_ip_offset64 = (int64_t)(unw_sword_t)(di->end_ip - ip_base);
 1022|       |      segbase = di->u.rti.segbase;
 1023|       |      if ((ret = remote_lookup (as, (uintptr_t) table_data, table_len,
 1024|       |                                rel_ip, &found_start, &found_fde,
 1025|       |                                &last_ip_offset64, is_table64, arg)) < 0)
 1026|       |        return ret;
 1027|       |      if (ret)
 1028|       |        {
 1029|       |          found_entry = 1;
 1030|       |          found_start_ip_offset = (unw_word_t) found_start;
 1031|       |          found_fde_offset = (unw_word_t) found_fde;
 1032|       |          last_ip = (unw_word_t) last_ip_offset64 + ip_base;
 1033|       |        }
 1034|       |#endif
 1035|      0|    }
 1036|     15|  if (!found_entry)
  ------------------
  |  Branch (1036:7): [True: 0, False: 15]
  ------------------
 1037|      0|    {
 1038|      0|      Debug (1, "IP %lx inside range %lx-%lx, but no explicit unwind info found\n",
 1039|      0|             (long) ip, (long) di->start_ip, (long) di->end_ip);
 1040|       |      /* IP is inside this table's range, but there is no explicit
 1041|       |         unwind info.  */
 1042|      0|      return -UNW_ENOINFO;
 1043|      0|    }
 1044|     15|  Debug (15, "ip=0x%lx, start_ip=0x%lx\n",
 1045|     15|         (long) ip, (long) found_start_ip_offset);
 1046|     15|  if (debug_frame_base)
  ------------------
  |  Branch (1046:7): [True: 0, False: 15]
  ------------------
 1047|      0|    fde_addr = found_fde_offset + debug_frame_base;
 1048|     15|  else
 1049|     15|    fde_addr = found_fde_offset + segbase;
 1050|     15|  Debug (1, "fde_offset = %lx, segbase = %lx, debug_frame_base = %lx, "
 1051|     15|            "fde_addr = %lx\n", (long) found_fde_offset, (long) segbase,
 1052|     15|            (long) debug_frame_base, (long) fde_addr);
 1053|     15|  if ((ret = dwarf_extract_proc_info_from_fde (as, a, &fde_addr, pi,
  ------------------
  |  |  397|     15|                UNW_OBJ (dwarf_extract_proc_info_from_fde)
  |  |  ------------------
  |  |  |  |   48|     15|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1053:7): [True: 0, False: 15]
  ------------------
 1054|     15|                                               debug_frame_base ?
  ------------------
  |  Branch (1054:48): [True: 0, False: 15]
  ------------------
 1055|     15|                                               debug_frame_base : segbase,
 1056|     15|                                               need_unwind_info,
 1057|     15|                                               debug_frame_base != 0, arg)) < 0)
 1058|      0|    return ret;
 1059|       |
 1060|       |  /* .debug_frame uses an absolute encoding that does not know about any
 1061|       |     shared library relocation.  */
 1062|     15|  if (di->format == UNW_INFO_FORMAT_TABLE)
  ------------------
  |  Branch (1062:7): [True: 0, False: 15]
  ------------------
 1063|      0|    {
 1064|      0|      pi->start_ip += segbase;
 1065|      0|      pi->end_ip += segbase;
 1066|      0|      pi->flags = UNW_PI_FLAG_DEBUG_FRAME;
  ------------------
  |  |  146|      0|#define UNW_PI_FLAG_DEBUG_FRAME	32
  ------------------
 1067|      0|    }
 1068|       |
 1069|       |#if defined(NEED_LAST_IP)
 1070|       |  pi->last_ip = last_ip;
 1071|       |#else
 1072|     15|  (void)last_ip;
 1073|     15|#endif
 1074|     15|  if (ip < pi->start_ip || ip >= pi->end_ip)
  ------------------
  |  Branch (1074:7): [True: 0, False: 15]
  |  Branch (1074:28): [True: 0, False: 15]
  ------------------
 1075|      0|    return -UNW_ENOINFO;
 1076|       |
 1077|     15|  return 0;
 1078|     15|}
Lfind_proc_info-lsb.c:is_remote_table:
  912|     30|{
  913|     30|  return (format == UNW_INFO_FORMAT_REMOTE_TABLE ||
  ------------------
  |  Branch (913:11): [True: 30, False: 0]
  ------------------
  914|      0|          format == UNW_INFO_FORMAT_REMOTE_TABLE_64 ||
  ------------------
  |  Branch (914:11): [True: 0, False: 0]
  ------------------
  915|      0|          format == UNW_INFO_FORMAT_IP_OFFSET);
  ------------------
  |  Branch (915:11): [True: 0, False: 0]
  ------------------
  916|     30|}

Lfind_proc_info-lsb.c:lookup:
   25|     15|{
   26|     15|  size_t table_len = table_size / sizeof (struct table_entry);
   27|     15|  const struct table_entry *e = NULL;
   28|     15|  size_t lo, hi, mid;
   29|       |
   30|       |  /* do a binary search for right entry: */
   31|    191|  for (lo = 0, hi = table_len; lo < hi;)
  ------------------
  |  Branch (31:32): [True: 176, False: 15]
  ------------------
   32|    176|    {
   33|    176|      mid = (lo + hi) / 2U;
   34|    176|      e = table + mid;
   35|    176|      Debug (15, "e->start_ip_offset = %lx\n", (long) e->start_ip_offset);
   36|    176|      if (rel_ip < e->start_ip_offset)
  ------------------
  |  Branch (36:11): [True: 85, False: 91]
  ------------------
   37|     85|        hi = mid;
   38|     91|      else
   39|     91|        lo = mid + 1U;
   40|    176|    }
   41|     15|  if (hi <= 0)
  ------------------
  |  Branch (41:7): [True: 0, False: 15]
  ------------------
   42|      0|        return NULL;
   43|     15|  e = table + hi - 1U;
   44|     15|  return e;
   45|     15|}

_ULx86_64_dwarf_flush_rs_cache:
  594|      1|{
  595|      1|  int i;
  596|       |
  597|      1|  if (cache->log_size == DWARF_DEFAULT_LOG_UNW_CACHE_SIZE
  ------------------
  |  |  337|      2|#define DWARF_DEFAULT_LOG_UNW_CACHE_SIZE        7
  ------------------
  |  Branch (597:7): [True: 0, False: 1]
  ------------------
  598|      1|      || !cache->hash) {
  ------------------
  |  Branch (598:10): [True: 1, False: 0]
  ------------------
  599|      1|    cache->hash = cache->default_hash;
  600|      1|    cache->buckets = cache->default_buckets;
  601|      1|    cache->links = cache->default_links;
  602|      1|    cache->log_size = DWARF_DEFAULT_LOG_UNW_CACHE_SIZE;
  ------------------
  |  |  337|      1|#define DWARF_DEFAULT_LOG_UNW_CACHE_SIZE        7
  ------------------
  603|      1|  } else {
  604|      0|    if (cache->hash && cache->hash != cache->default_hash)
  ------------------
  |  Branch (604:9): [True: 0, False: 0]
  |  Branch (604:24): [True: 0, False: 0]
  ------------------
  605|      0|      mi_munmap(cache->hash, DWARF_UNW_HASH_SIZE(cache->prev_log_size)
  ------------------
  |  |   35|      0|#define DWARF_UNW_HASH_SIZE(log_size)    (1 << (log_size + 1))
  ------------------
  606|      0|                              * sizeof (cache->hash[0]));
  607|      0|    if (cache->buckets && cache->buckets != cache->default_buckets)
  ------------------
  |  Branch (607:9): [True: 0, False: 0]
  |  Branch (607:27): [True: 0, False: 0]
  ------------------
  608|      0|      mi_munmap(cache->buckets, DWARF_UNW_CACHE_SIZE(cache->prev_log_size)
  ------------------
  |  |   34|      0|#define DWARF_UNW_CACHE_SIZE(log_size)   (1 << log_size)
  ------------------
  609|      0|                              * sizeof (cache->buckets[0]));
  610|      0|    if (cache->links && cache->links != cache->default_links)
  ------------------
  |  Branch (610:9): [True: 0, False: 0]
  |  Branch (610:25): [True: 0, False: 0]
  ------------------
  611|      0|      mi_munmap(cache->links, DWARF_UNW_CACHE_SIZE(cache->prev_log_size)
  ------------------
  |  |   34|      0|#define DWARF_UNW_CACHE_SIZE(log_size)   (1 << log_size)
  ------------------
  612|      0|                              * sizeof (cache->links[0]));
  613|      0|    GET_MEMORY(cache->hash, DWARF_UNW_HASH_SIZE(cache->log_size)
  ------------------
  |  |  260|      0|#define GET_MEMORY(mem, size)                                               \
  |  |  261|      0|do {                                                                        \
  |  |  262|      0|  mem = mi_mmap (NULL, size, PROT_READ | PROT_WRITE,                        \
  |  |  263|      0|                 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);                       \
  |  |  264|      0|  if (mem == MAP_FAILED)                                                    \
  |  |  ------------------
  |  |  |  Branch (264:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  265|      0|    mem = NULL;                                                             \
  |  |  266|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (266:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
  614|      0|                             * sizeof (cache->hash[0]));
  615|      0|    GET_MEMORY(cache->buckets, DWARF_UNW_CACHE_SIZE(cache->log_size)
  ------------------
  |  |  260|      0|#define GET_MEMORY(mem, size)                                               \
  |  |  261|      0|do {                                                                        \
  |  |  262|      0|  mem = mi_mmap (NULL, size, PROT_READ | PROT_WRITE,                        \
  |  |  263|      0|                 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);                       \
  |  |  264|      0|  if (mem == MAP_FAILED)                                                    \
  |  |  ------------------
  |  |  |  Branch (264:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  265|      0|    mem = NULL;                                                             \
  |  |  266|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (266:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
  616|      0|                                * sizeof (cache->buckets[0]));
  617|      0|    GET_MEMORY(cache->links, DWARF_UNW_CACHE_SIZE(cache->log_size)
  ------------------
  |  |  260|      0|#define GET_MEMORY(mem, size)                                               \
  |  |  261|      0|do {                                                                        \
  |  |  262|      0|  mem = mi_mmap (NULL, size, PROT_READ | PROT_WRITE,                        \
  |  |  263|      0|                 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);                       \
  |  |  264|      0|  if (mem == MAP_FAILED)                                                    \
  |  |  ------------------
  |  |  |  Branch (264:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  265|      0|    mem = NULL;                                                             \
  |  |  266|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (266:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
  618|      0|                                * sizeof (cache->links[0]));
  619|      0|    if (!cache->hash || !cache->buckets || !cache->links)
  ------------------
  |  Branch (619:9): [True: 0, False: 0]
  |  Branch (619:25): [True: 0, False: 0]
  |  Branch (619:44): [True: 0, False: 0]
  ------------------
  620|      0|      {
  621|      0|        Debug (1, "Unable to allocate cache memory");
  622|      0|        return -UNW_ENOMEM;
  623|      0|      }
  624|      0|    cache->prev_log_size = cache->log_size;
  625|      0|  }
  626|       |
  627|      1|  cache->rr_head = 0;
  628|       |
  629|    129|  for (i = 0; i < DWARF_UNW_CACHE_SIZE(cache->log_size); ++i)
  ------------------
  |  |   34|    129|#define DWARF_UNW_CACHE_SIZE(log_size)   (1 << log_size)
  ------------------
  |  Branch (629:15): [True: 128, False: 1]
  ------------------
  630|    128|    {
  631|    128|      cache->links[i].coll_chain = -1;
  632|    128|      cache->links[i].ip = 0;
  633|    128|      cache->links[i].valid = 0;
  634|    128|    }
  635|    257|  for (i = 0; i< DWARF_UNW_HASH_SIZE(cache->log_size); ++i)
  ------------------
  |  |   35|    257|#define DWARF_UNW_HASH_SIZE(log_size)    (1 << (log_size + 1))
  ------------------
  |  Branch (635:15): [True: 256, False: 1]
  ------------------
  636|    256|    cache->hash[i] = -1;
  637|       |
  638|      1|  return 0;
  639|      1|}
_ULx86_64_dwarf_step:
 1101|  54.5k|{
 1102|  54.5k|  int ret;
 1103|  54.5k|  dwarf_state_record_t sr;
 1104|  54.5k|  if ((ret = find_reg_state (c, &sr)) < 0)
  ------------------
  |  Branch (1104:7): [True: 0, False: 54.5k]
  ------------------
 1105|      0|    return ret;
 1106|  54.5k|  return apply_reg_state (c, &sr.rs_current);
 1107|  54.5k|}
Lparser.c:find_reg_state:
 1004|  54.5k|{
 1005|  54.5k|  dwarf_reg_state_t *rs = NULL;
 1006|  54.5k|  struct dwarf_rs_cache *cache;
 1007|  54.5k|  int ret = 0;
 1008|  54.5k|  intrmask_t saved_mask;
 1009|       |
 1010|  54.5k|  if ((cache = get_rs_cache(c->as, &saved_mask)) &&
  ------------------
  |  Branch (1010:7): [True: 54.5k, False: 0]
  ------------------
 1011|  54.5k|      (rs = rs_lookup(cache, c)))
  ------------------
  |  Branch (1011:7): [True: 54.5k, False: 15]
  ------------------
 1012|  54.5k|    {
 1013|       |      /* update hint; no locking needed: single-word writes are atomic */
 1014|  54.5k|      unsigned short index = (unsigned short) (rs - cache->buckets);
 1015|  54.5k|      c->use_prev_instr = cache->links[index].use_prev_instr;
 1016|  54.5k|      memcpy (&sr->rs_current, rs, sizeof (*rs));
 1017|  54.5k|    }
 1018|     15|  else
 1019|     15|    {
 1020|       |      /* Release the cache lock before looking up the saved locations.
 1021|       |       * If we do not release the lock we risk deadlock if the lookup
 1022|       |       * causes libunwind to be reentered.  */
 1023|     15|      if (cache)
  ------------------
  |  Branch (1023:11): [True: 15, False: 0]
  ------------------
 1024|     15|	{
 1025|     15|	  put_rs_cache (c->as, cache, &saved_mask);
 1026|     15|	  cache = NULL;
 1027|     15|	}
 1028|       |
 1029|     15|      assert (!cache);
  ------------------
  |  Branch (1029:7): [True: 0, False: 15]
  |  Branch (1029:7): [True: 15, False: 0]
  ------------------
 1030|       |
 1031|     15|      ret = fetch_proc_info (c, c->ip);
 1032|     15|      int next_use_prev_instr = c->use_prev_instr;
 1033|     15|      if (ret >= 0)
  ------------------
  |  Branch (1033:11): [True: 15, False: 0]
  ------------------
 1034|     15|	{
 1035|       |	  /* Update use_prev_instr for the next frame. */
 1036|     15|	  assert(c->pi.unwind_info);
  ------------------
  |  Branch (1036:4): [True: 0, False: 15]
  |  Branch (1036:4): [True: 15, False: 0]
  ------------------
 1037|     15|	  struct dwarf_cie_info *dci = c->pi.unwind_info;
 1038|       |#ifdef UNW_TARGET_SPARC
 1039|       |	  /* On SPARC, O7 = address of CALL instruction itself (not call+N),
 1040|       |	     and DWARF CFI annotations start at the CALL instruction.
 1041|       |	     No backward adjustment of ip is ever needed.  */
 1042|       |	  next_use_prev_instr = 0;
 1043|       |#else
 1044|     15|	  next_use_prev_instr = ! dci->signal_frame;
 1045|     15|#endif
 1046|     15|	  ret = create_state_record_for (c, sr, c->ip);
 1047|     15|	}
 1048|     15|      put_unwind_info (c, &c->pi);
 1049|     15|      c->use_prev_instr = next_use_prev_instr;
 1050|       |
 1051|       |      /* Reacquire the cache lock.  We repeat the lookup in case the
 1052|       |       * cache was updated by another thread while we did not hold the
 1053|       |       * lock.  */
 1054|     15|      if (ret >= 0)
  ------------------
  |  Branch (1054:11): [True: 15, False: 0]
  ------------------
 1055|     15|	cache = get_rs_cache (c->as, &saved_mask);
 1056|       |
 1057|     15|      if (cache)
  ------------------
  |  Branch (1057:11): [True: 15, False: 0]
  ------------------
 1058|     15|	{
 1059|     15|	  rs = rs_lookup (cache, c);
 1060|     15|	  if (rs)
  ------------------
  |  Branch (1060:8): [True: 0, False: 15]
  ------------------
 1061|      0|	    {
 1062|      0|	      memcpy (&sr->rs_current, rs, sizeof(*rs));
 1063|      0|	    }
 1064|     15|	  else
 1065|     15|	    {
 1066|     15|	      rs = rs_new (cache, c);
 1067|     15|	      cache->links[rs - cache->buckets].hint = 0;
 1068|     15|	      memcpy (rs, &sr->rs_current, sizeof(*rs));
 1069|     15|	    }
 1070|     15|	}
 1071|      0|      else if (ret >= 0)
  ------------------
  |  Branch (1071:16): [True: 0, False: 0]
  ------------------
 1072|       |	/* Without a cache there is no entry to reuse below, but the
 1073|       |	   architecture still needs to set up its signal frame state. */
 1074|      0|	tdep_reuse_frame (c, tdep_cache_frame (c) ? 1 : 0);
  ------------------
  |  |  244|      0|# define tdep_reuse_frame               UNW_OBJ(reuse_frame)
  |  |  ------------------
  |  |  |  |   48|      0|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      0|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
              	tdep_reuse_frame (c, tdep_cache_frame (c) ? 1 : 0);
  ------------------
  |  |  243|      0|# define tdep_cache_frame               UNW_OBJ(cache_frame)
  |  |  ------------------
  |  |  |  |   48|      0|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      0|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1074:23): [True: 0, False: 0]
  ------------------
 1075|     15|    }
 1076|       |
 1077|  54.5k|  unsigned short index = -1;
 1078|  54.5k|  if (cache)
  ------------------
  |  Branch (1078:7): [True: 54.5k, False: 0]
  ------------------
 1079|  54.5k|    {
 1080|  54.5k|      if (rs)
  ------------------
  |  Branch (1080:11): [True: 54.5k, False: 0]
  ------------------
 1081|  54.5k|	{
 1082|  54.5k|	  index = (unsigned short) (rs - cache->buckets);
 1083|  54.5k|	  c->hint = cache->links[index].hint;
 1084|  54.5k|	  cache->links[c->prev_rs].hint = index + 1;
 1085|  54.5k|	  c->prev_rs = index;
 1086|  54.5k|	}
 1087|  54.5k|      if (ret >= 0)
  ------------------
  |  Branch (1087:11): [True: 54.5k, False: 0]
  ------------------
 1088|  54.5k|	{
 1089|  54.5k|	  assert (rs);
  ------------------
  |  Branch (1089:4): [True: 0, False: 54.5k]
  |  Branch (1089:4): [True: 54.5k, False: 0]
  ------------------
 1090|  54.5k|	  tdep_reuse_frame (c, cache->links[index].signal_frame);
  ------------------
  |  |  244|  54.5k|# define tdep_reuse_frame               UNW_OBJ(reuse_frame)
  |  |  ------------------
  |  |  |  |   48|  54.5k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  54.5k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  54.5k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1091|  54.5k|	}
 1092|  54.5k|      put_rs_cache (c->as, cache, &saved_mask);
 1093|  54.5k|    }
 1094|  54.5k|  return ret;
 1095|  54.5k|}
Lparser.c:get_rs_cache:
  643|  54.5k|{
  644|  54.5k|  struct dwarf_rs_cache *cache = &as->global_cache;
  645|  54.5k|  unw_caching_policy_t caching = as->caching_policy;
  646|       |
  647|  54.5k|  if (caching == UNW_CACHE_NONE)
  ------------------
  |  Branch (647:7): [True: 0, False: 54.5k]
  ------------------
  648|      0|    return NULL;
  649|       |
  650|       |#if defined(HAVE___CACHE_PER_THREAD) && HAVE___CACHE_PER_THREAD
  651|       |  if (likely (caching == UNW_CACHE_PER_THREAD))
  652|       |    {
  653|       |      static thread_local struct dwarf_rs_cache tls_cache __attribute__((tls_model("initial-exec")));
  654|       |      Debug (16, "using TLS cache\n");
  655|       |      cache = &tls_cache;
  656|       |    }
  657|       |  else
  658|       |#else
  659|  54.5k|  if (likely (caching == UNW_CACHE_GLOBAL))
  ------------------
  |  |   67|  54.5k|#  define likely(x)     __builtin_expect ((x), 1)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 54.5k, False: 0]
  |  |  ------------------
  ------------------
  660|  54.5k|#endif
  661|  54.5k|    {
  662|  54.5k|      Debug (16, "acquiring lock\n");
  663|  54.5k|      lock_acquire (&cache->lock, *saved_maskp);
  ------------------
  |  |  211|  54.5k|#define lock_acquire(l,m)                               \
  |  |  212|  54.5k|do {                                                    \
  |  |  213|  54.5k|  SIGPROCMASK (SIG_SETMASK, &unwi_full_mask, &(m));     \
  |  |  ------------------
  |  |  |  |  195|  54.5k|    (pthread_sigmask != NULL ? pthread_sigmask((how), (new_mask), (old_mask)) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (195:6): [True: 54.5k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  196|  54.5k|     : sigprocmask((how), (new_mask), (old_mask)))
  |  |  ------------------
  |  |  214|  54.5k|  mutex_lock (l);                                       \
  |  |  ------------------
  |  |  |  |  169|  54.5k|        (pthread_mutex_lock != NULL ? pthread_mutex_lock (l) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (169:10): [True: 54.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  215|  54.5k|} while (0)
  |  |  ------------------
  |  |  |  Branch (215:10): [Folded, False: 54.5k]
  |  |  ------------------
  ------------------
  664|  54.5k|    }
  665|       |
  666|  54.5k|  if ((atomic_load (&as->cache_generation) != atomic_load (&cache->generation))
  ------------------
  |  Branch (666:7): [True: 1, False: 54.5k]
  ------------------
  667|  54.5k|       || !cache->hash)
  ------------------
  |  Branch (667:11): [True: 0, False: 54.5k]
  ------------------
  668|      1|    {
  669|       |      /* cache_size is only set in the global_cache, copy it over before flushing */
  670|      1|      cache->log_size = as->global_cache.log_size;
  671|      1|      if (dwarf_flush_rs_cache (cache) < 0)
  ------------------
  |  |  404|      1|#define dwarf_flush_rs_cache            UNW_OBJ (dwarf_flush_rs_cache)
  |  |  ------------------
  |  |  |  |   48|      1|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      1|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      1|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (671:11): [True: 0, False: 1]
  ------------------
  672|      0|        return NULL;
  673|      1|      atomic_store (&cache->generation, atomic_load (&as->cache_generation));
  674|      1|    }
  675|       |
  676|  54.5k|  return cache;
  677|  54.5k|}
Lparser.c:rs_lookup:
  707|  54.5k|{
  708|  54.5k|  unsigned short index;
  709|  54.5k|  unw_word_t ip = c->ip;
  710|       |
  711|  54.5k|  if (c->hint > 0)
  ------------------
  |  Branch (711:7): [True: 48.4k, False: 6.09k]
  ------------------
  712|  48.4k|    {
  713|  48.4k|      index = c->hint - 1;
  714|  48.4k|      if (cache_match (cache, index, ip))
  ------------------
  |  Branch (714:11): [True: 47.9k, False: 502]
  ------------------
  715|  47.9k|	return &cache->buckets[index];
  716|  48.4k|    }
  717|       |
  718|  6.59k|  for (index = cache->hash[hash (ip, cache->log_size)];
  719|  6.59k|       index < DWARF_UNW_CACHE_SIZE(cache->log_size);
  ------------------
  |  |   34|  6.59k|#define DWARF_UNW_CACHE_SIZE(log_size)   (1 << log_size)
  ------------------
  |  Branch (719:8): [True: 6.56k, False: 30]
  ------------------
  720|  6.59k|       index = cache->links[index].coll_chain)
  721|  6.56k|    {
  722|  6.56k|      if (cache_match (cache, index, ip))
  ------------------
  |  Branch (722:11): [True: 6.56k, False: 0]
  ------------------
  723|  6.56k|	return &cache->buckets[index];
  724|  6.56k|    }
  725|     30|  return NULL;
  726|  6.59k|}
Lparser.c:cache_match:
  701|  55.0k|{
  702|  55.0k|  return (cache->links[index].valid && (ip == cache->links[index].ip));
  ------------------
  |  Branch (702:11): [True: 55.0k, False: 0]
  |  Branch (702:40): [True: 54.5k, False: 502]
  ------------------
  703|  55.0k|}
Lparser.c:hash:
  692|  6.61k|{
  693|       |  /* based on (sqrt(5)/2-1)*2^64 */
  694|  6.61k|# define magic  ((unw_word_t) 0x9e3779b97f4a7c16ULL)
  695|       |
  696|  6.61k|  return (unw_hash_index_t) (ip * magic >> ((sizeof(unw_word_t) * 8) - (log_size + 1)));
  ------------------
  |  |  694|  6.61k|# define magic  ((unw_word_t) 0x9e3779b97f4a7c16ULL)
  ------------------
  697|  6.61k|}
Lparser.c:put_rs_cache:
  682|  54.5k|{
  683|  54.5k|  assert (as->caching_policy != UNW_CACHE_NONE);
  ------------------
  |  Branch (683:3): [True: 0, False: 54.5k]
  |  Branch (683:3): [True: 54.5k, False: 0]
  ------------------
  684|       |
  685|  54.5k|  Debug (16, "unmasking signals/interrupts and releasing lock\n");
  686|  54.5k|  if (likely (as->caching_policy == UNW_CACHE_GLOBAL))
  ------------------
  |  |   67|  54.5k|#  define likely(x)     __builtin_expect ((x), 1)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 54.5k, False: 0]
  |  |  ------------------
  ------------------
  687|       |    lock_release (&cache->lock, *saved_maskp);
  ------------------
  |  |  216|  54.5k|#define lock_release(l,m)                       \
  |  |  217|  54.5k|do {                                            \
  |  |  218|  54.5k|  mutex_unlock (l);                             \
  |  |  ------------------
  |  |  |  |  171|  54.5k|        (pthread_mutex_unlock != NULL ? pthread_mutex_unlock (l) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (171:10): [True: 54.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  219|  54.5k|  SIGPROCMASK (SIG_SETMASK, &(m), NULL);        \
  |  |  ------------------
  |  |  |  |  195|  54.5k|    (pthread_sigmask != NULL ? pthread_sigmask((how), (new_mask), (old_mask)) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (195:6): [True: 54.5k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  196|  54.5k|     : sigprocmask((how), (new_mask), (old_mask)))
  |  |  ------------------
  |  |  220|  54.5k|} while (0)
  |  |  ------------------
  |  |  |  Branch (220:10): [Folded, False: 54.5k]
  |  |  ------------------
  ------------------
  688|  54.5k|}
Lparser.c:rs_new:
  730|     15|{
  731|     15|  unw_hash_index_t index;
  732|     15|  unsigned short head;
  733|       |
  734|     15|  head = cache->rr_head;
  735|     15|  cache->rr_head = (head + 1) & (DWARF_UNW_CACHE_SIZE(cache->log_size) - 1);
  ------------------
  |  |   34|     15|#define DWARF_UNW_CACHE_SIZE(log_size)   (1 << log_size)
  ------------------
  736|       |
  737|       |  /* remove the old rs from the hash table (if it's there): */
  738|     15|  if (cache->links[head].ip)
  ------------------
  |  Branch (738:7): [True: 0, False: 15]
  ------------------
  739|      0|    {
  740|      0|      unsigned short *pindex;
  741|      0|      for (pindex = &cache->hash[hash (cache->links[head].ip, cache->log_size)];
  742|      0|	   *pindex < DWARF_UNW_CACHE_SIZE(cache->log_size);
  ------------------
  |  |   34|      0|#define DWARF_UNW_CACHE_SIZE(log_size)   (1 << log_size)
  ------------------
  |  Branch (742:5): [True: 0, False: 0]
  ------------------
  743|      0|	   pindex = &cache->links[*pindex].coll_chain)
  744|      0|	{
  745|      0|	  if (*pindex == head)
  ------------------
  |  Branch (745:8): [True: 0, False: 0]
  ------------------
  746|      0|	    {
  747|      0|	      *pindex = cache->links[*pindex].coll_chain;
  748|      0|	      break;
  749|      0|	    }
  750|      0|	}
  751|      0|    }
  752|       |
  753|       |  /* enter new rs in the hash table */
  754|     15|  index = hash (c->ip, cache->log_size);
  755|     15|  cache->links[head].coll_chain = cache->hash[index];
  756|     15|  cache->hash[index] = head;
  757|       |
  758|     15|  cache->links[head].ip = c->ip;
  759|     15|  cache->links[head].valid = 1;
  760|     15|  cache->links[head].signal_frame = tdep_cache_frame(c) ? 1 : 0;
  ------------------
  |  |  243|     15|# define tdep_cache_frame               UNW_OBJ(cache_frame)
  |  |  ------------------
  |  |  |  |   48|     15|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (760:37): [True: 0, False: 15]
  ------------------
  761|     15|  cache->links[head].use_prev_instr = c->use_prev_instr;
  762|     15|  return cache->buckets + head;
  763|     15|}
Lparser.c:apply_reg_state:
  845|  54.5k|{
  846|  54.5k|  unw_regnum_t regnum;
  847|  54.5k|  unw_word_t addr, cfa, ip;
  848|  54.5k|  unw_word_t prev_ip, prev_cfa;
  849|  54.5k|  unw_addr_space_t as;
  850|  54.5k|  dwarf_loc_t cfa_loc;
  851|  54.5k|  unw_accessors_t *a;
  852|  54.5k|  int i, ret;
  853|  54.5k|  void *arg;
  854|       |
  855|       |  /* In the case that we have incorrect CFI, the return address column may be
  856|       |   * outside the valid range of data and will read invalid data.  Protect
  857|       |   * against the errant read and indicate that we have a bad frame.  */
  858|  54.5k|  if (rs->ret_addr_column >= DWARF_NUM_PRESERVED_REGS) {
  ------------------
  |  |   38|  54.5k|#define DWARF_NUM_PRESERVED_REGS        17
  ------------------
  |  Branch (858:7): [True: 0, False: 54.5k]
  ------------------
  859|      0|    Dprintf ("%s: return address entry %zu is outside of range of CIE",
  860|      0|             __FUNCTION__, rs->ret_addr_column);
  861|      0|    return -UNW_EBADFRAME;
  862|      0|  }
  863|       |
  864|  54.5k|  prev_ip = c->ip;
  865|  54.5k|  prev_cfa = c->cfa;
  866|       |
  867|  54.5k|  as = c->as;
  868|  54.5k|  arg = c->as_arg;
  869|  54.5k|  a = unw_get_accessors_int (as);
  ------------------
  |  |  278|  54.5k|#define unw_get_accessors_int		UNW_ARCH_OBJ(get_accessors_int)
  |  |  ------------------
  |  |  |  |   49|  54.5k|#define UNW_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  54.5k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  54.5k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  870|       |
  871|       |  /* Evaluate the CFA first, because it may be referred to by other
  872|       |     expressions.  */
  873|       |
  874|  54.5k|  if (rs->reg.where[DWARF_CFA_REG_COLUMN] == DWARF_WHERE_REG)
  ------------------
  |  |  248|  54.5k|#define DWARF_CFA_REG_COLUMN    DWARF_NUM_PRESERVED_REGS
  |  |  ------------------
  |  |  |  |   38|  54.5k|#define DWARF_NUM_PRESERVED_REGS        17
  |  |  ------------------
  ------------------
  |  Branch (874:7): [True: 54.5k, False: 0]
  ------------------
  875|  54.5k|    {
  876|       |      /* CFA is equal to [reg] + offset: */
  877|       |
  878|       |      /* As a special-case, if the stack-pointer is the CFA and the
  879|       |         stack-pointer wasn't saved, popping the CFA implicitly pops
  880|       |         the stack-pointer as well.  */
  881|  54.5k|      if ((rs->reg.val[DWARF_CFA_REG_COLUMN] == TDEP_DWARF_SP)
  ------------------
  |  |  248|  54.5k|#define DWARF_CFA_REG_COLUMN    DWARF_NUM_PRESERVED_REGS
  |  |  ------------------
  |  |  |  |   38|  54.5k|#define DWARF_NUM_PRESERVED_REGS        17
  |  |  ------------------
  ------------------
                    if ((rs->reg.val[DWARF_CFA_REG_COLUMN] == TDEP_DWARF_SP)
  ------------------
  |  |  427|  54.5k|#define TDEP_DWARF_SP UNW_TDEP_SP
  ------------------
  |  Branch (881:11): [True: 12.1k, False: 42.4k]
  ------------------
  882|  12.1k|          && (TDEP_DWARF_SP < ARRAY_SIZE(rs->reg.val))
  ------------------
  |  |  427|  12.1k|#define TDEP_DWARF_SP UNW_TDEP_SP
  ------------------
                        && (TDEP_DWARF_SP < ARRAY_SIZE(rs->reg.val))
  ------------------
  |  |   98|  12.1k|#define ARRAY_SIZE(a)   (sizeof (a) / sizeof ((a)[0]))
  ------------------
  |  Branch (882:14): [True: 0, Folded]
  ------------------
  883|  12.1k|          && (DWARF_IS_NULL_LOC(c->loc[TDEP_DWARF_SP])))
  ------------------
  |  |  156|  12.1k|# define DWARF_IS_NULL_LOC(l)   (DWARF_GET_LOC (l) == 0)
  |  |  ------------------
  |  |  |  |  139|  12.1k|#define DWARF_GET_LOC(l)        ((l).val)
  |  |  ------------------
  ------------------
  |  Branch (883:14): [True: 0, False: 12.1k]
  ------------------
  884|      0|          cfa = c->cfa;
  885|  54.5k|      else
  886|  54.5k|        {
  887|  54.5k|          regnum = dwarf_to_unw_regnum ((unw_regnum_t) rs->reg.val[DWARF_CFA_REG_COLUMN]);
  ------------------
  |  |   23|  54.5k|  (((reg) < DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0)
  |  |  ------------------
  |  |  |  |   41|  54.5k|#define DWARF_REGNUM_MAP_LENGTH         DWARF_NUM_PRESERVED_REGS
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  54.5k|#define DWARF_NUM_PRESERVED_REGS        17
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 (((reg) < DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0)
  |  |  ------------------
  |  |  |  |   19|  54.5k|# define dwarf_to_unw_regnum_map                UNW_OBJ (dwarf_to_unw_regnum_map)
  |  |  |  |  ------------------
  |  |  |  |  |  |   48|  54.5k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|  54.5k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   46|  54.5k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (23:4): [True: 54.5k, False: 0]
  |  |  ------------------
  ------------------
  888|  54.5k|          if ((ret = unw_get_reg (dwarf_to_cursor(c), regnum, &cfa)) < 0)
  ------------------
  |  |  289|  54.5k|#define unw_get_reg			UNW_OBJ(get_reg)
  |  |  ------------------
  |  |  |  |   48|  54.5k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  54.5k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  54.5k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                        if ((ret = unw_get_reg (dwarf_to_cursor(c), regnum, &cfa)) < 0)
  ------------------
  |  |   48|  54.5k|#define dwarf_to_cursor(c)      ((unw_cursor_t *) (c))
  ------------------
  |  Branch (888:15): [True: 0, False: 54.5k]
  ------------------
  889|      0|            return ret;
  890|  54.5k|        }
  891|  54.5k|      cfa += rs->reg.val[DWARF_CFA_OFF_COLUMN];
  ------------------
  |  |  249|  54.5k|#define DWARF_CFA_OFF_COLUMN    (DWARF_NUM_PRESERVED_REGS + 1)
  |  |  ------------------
  |  |  |  |   38|  54.5k|#define DWARF_NUM_PRESERVED_REGS        17
  |  |  ------------------
  ------------------
  892|  54.5k|    }
  893|      0|  else
  894|      0|    {
  895|       |      /* CFA is equal to EXPR: */
  896|       |
  897|      0|      assert (rs->reg.where[DWARF_CFA_REG_COLUMN] == DWARF_WHERE_EXPR);
  ------------------
  |  Branch (897:7): [True: 0, False: 0]
  |  Branch (897:7): [True: 0, False: 0]
  ------------------
  898|       |
  899|      0|      addr = rs->reg.val[DWARF_CFA_REG_COLUMN];
  ------------------
  |  |  248|      0|#define DWARF_CFA_REG_COLUMN    DWARF_NUM_PRESERVED_REGS
  |  |  ------------------
  |  |  |  |   38|      0|#define DWARF_NUM_PRESERVED_REGS        17
  |  |  ------------------
  ------------------
  900|       |      /* The dwarf standard doesn't specify an initial value to be pushed on */
  901|       |      /* the stack before DW_CFA_def_cfa_expression evaluation. We push on a */
  902|       |      /* dummy value (0) to keep the eval_location_expr function consistent. */
  903|      0|      if ((ret = eval_location_expr (c, 0, as, a, addr, &cfa_loc, arg)) < 0)
  ------------------
  |  Branch (903:11): [True: 0, False: 0]
  ------------------
  904|      0|        return ret;
  905|       |      /* the returned location better be a memory location... */
  906|      0|      if (DWARF_IS_REG_LOC (cfa_loc))
  ------------------
  |  |  145|      0|# define DWARF_IS_REG_LOC(l)    (((l).type & DWARF_LOC_TYPE_REG) != 0)
  |  |  ------------------
  |  |  |  |  142|      0|# define DWARF_LOC_TYPE_REG     (1 << 1)
  |  |  ------------------
  |  |  |  Branch (145:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  907|      0|        return -UNW_EBADFRAME;
  908|      0|      cfa = DWARF_GET_LOC (cfa_loc);
  ------------------
  |  |  139|      0|#define DWARF_GET_LOC(l)        ((l).val)
  ------------------
  909|      0|    }
  910|       |
  911|  54.5k|  dwarf_loc_t new_loc[DWARF_NUM_PRESERVED_REGS];
  912|  54.5k|  memcpy(new_loc, c->loc, sizeof(new_loc));
  913|       |
  914|   982k|  for (i = 0; i < DWARF_NUM_PRESERVED_REGS; ++i)
  ------------------
  |  |   38|   982k|#define DWARF_NUM_PRESERVED_REGS        17
  ------------------
  |  Branch (914:15): [True: 927k, False: 54.5k]
  ------------------
  915|   927k|    {
  916|   927k|      switch ((dwarf_where_t) rs->reg.where[i])
  ------------------
  |  Branch (916:15): [True: 927k, False: 0]
  ------------------
  917|   927k|        {
  918|  6.06k|        case DWARF_WHERE_UNDEF:
  ------------------
  |  Branch (918:9): [True: 6.06k, False: 921k]
  ------------------
  919|  6.06k|          new_loc[i] = DWARF_NULL_LOC;
  ------------------
  |  |  155|  6.06k|# define DWARF_NULL_LOC         DWARF_LOC (0, 0)
  |  |  ------------------
  |  |  |  |  150|  6.06k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
  920|  6.06k|          break;
  921|       |
  922|   600k|        case DWARF_WHERE_SAME:
  ------------------
  |  Branch (922:9): [True: 600k, False: 327k]
  ------------------
  923|   600k|          break;
  924|       |
  925|  54.5k|        case DWARF_WHERE_CFA:
  ------------------
  |  Branch (925:9): [True: 54.5k, False: 873k]
  ------------------
  926|  54.5k|          new_loc[i] = DWARF_VAL_LOC (c, cfa);
  ------------------
  |  |  151|  54.5k|# define DWARF_VAL_LOC(c,v)     DWARF_LOC ((v), DWARF_LOC_TYPE_VAL)
  |  |  ------------------
  |  |  |  |  150|  54.5k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
  927|  54.5k|          break;
  928|       |
  929|   266k|        case DWARF_WHERE_CFAREL:
  ------------------
  |  Branch (929:9): [True: 266k, False: 661k]
  ------------------
  930|   266k|          new_loc[i] = DWARF_MEM_LOC (c, cfa + rs->reg.val[i]);
  ------------------
  |  |  152|   266k|# define DWARF_MEM_LOC(c,m)     DWARF_LOC ((m), DWARF_LOC_TYPE_MEM)
  |  |  ------------------
  |  |  |  |  150|   266k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
  931|   266k|          break;
  932|       |
  933|      0|        case DWARF_WHERE_REG:
  ------------------
  |  Branch (933:9): [True: 0, False: 927k]
  ------------------
  934|       |#ifdef __s390x__
  935|       |          /* GPRs can be saved in FPRs on s390x */
  936|       |          if (unw_is_fpreg (dwarf_to_unw_regnum (rs->reg.val[i])))
  937|       |            {
  938|       |              new_loc[i] = DWARF_FPREG_LOC (c, dwarf_to_unw_regnum (rs->reg.val[i]));
  939|       |              break;
  940|       |            }
  941|       |#endif
  942|      0|          new_loc[i] = new_loc[rs->reg.val[i]];
  943|      0|          break;
  944|       |
  945|      0|        case DWARF_WHERE_EXPR:
  ------------------
  |  Branch (945:9): [True: 0, False: 927k]
  ------------------
  946|      0|          addr = rs->reg.val[i];
  947|       |          /* The dwarf standard requires the current CFA to be pushed on the */
  948|       |          /* stack before DW_CFA_expression evaluation. */
  949|      0|          if ((ret = eval_location_expr (c, cfa, as, a, addr, new_loc + i, arg)) < 0)
  ------------------
  |  Branch (949:15): [True: 0, False: 0]
  ------------------
  950|      0|            return ret;
  951|      0|          break;
  952|       |
  953|      0|        case DWARF_WHERE_VAL_EXPR:
  ------------------
  |  Branch (953:9): [True: 0, False: 927k]
  ------------------
  954|      0|          addr = rs->reg.val[i];
  955|       |          /* The dwarf standard requires the current CFA to be pushed on the */
  956|       |          /* stack before DW_CFA_val_expression evaluation. */
  957|      0|          if ((ret = eval_location_expr (c, cfa, as, a, addr, new_loc + i, arg)) < 0)
  ------------------
  |  Branch (957:15): [True: 0, False: 0]
  ------------------
  958|      0|            return ret;
  959|      0|          new_loc[i] = DWARF_VAL_LOC (c, DWARF_GET_LOC (new_loc[i]));
  ------------------
  |  |  151|      0|# define DWARF_VAL_LOC(c,v)     DWARF_LOC ((v), DWARF_LOC_TYPE_VAL)
  |  |  ------------------
  |  |  |  |  150|      0|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
  960|      0|          break;
  961|   927k|        }
  962|   927k|    }
  963|       |
  964|  54.5k|  memcpy(c->loc, new_loc, sizeof(new_loc));
  965|       |
  966|  54.5k|  c->cfa = cfa;
  967|       |  /* DWARF spec says undefined return address location means end of stack. */
  968|  54.5k|  if (DWARF_IS_NULL_LOC (c->loc[rs->ret_addr_column]))
  ------------------
  |  |  156|  54.5k|# define DWARF_IS_NULL_LOC(l)   (DWARF_GET_LOC (l) == 0)
  |  |  ------------------
  |  |  |  |  139|  54.5k|#define DWARF_GET_LOC(l)        ((l).val)
  |  |  ------------------
  |  |  |  Branch (156:33): [True: 6.06k, False: 48.5k]
  |  |  ------------------
  ------------------
  969|  6.06k|    {
  970|  6.06k|      c->ip = 0;
  971|  6.06k|    }
  972|  48.5k|  else
  973|  48.5k|  {
  974|  48.5k|    ret = dwarf_get (c, c->loc[rs->ret_addr_column], &ip);
  975|  48.5k|    if (ret < 0)
  ------------------
  |  Branch (975:9): [True: 0, False: 48.5k]
  ------------------
  976|      0|      return ret;
  977|       |#ifdef UNW_TARGET_AARCH64
  978|       |    if (aarch64_get_ra_sign_state(rs))
  979|       |      {
  980|       |        ip = tdep_strip_ptrauth_insn_mask ((unw_cursor_t*)c, ip);
  981|       |      }
  982|       |#endif
  983|  48.5k|    c->ip = ip;
  984|  48.5k|  }
  985|  54.5k|  ret = (c->ip != 0) ? 1 : 0;
  ------------------
  |  Branch (985:9): [True: 48.5k, False: 6.06k]
  ------------------
  986|       |
  987|       |  /* XXX: check for ip to be code_aligned */
  988|  54.5k|  if (c->ip == prev_ip && c->cfa == prev_cfa)
  ------------------
  |  Branch (988:7): [True: 0, False: 54.5k]
  |  Branch (988:27): [True: 0, False: 0]
  ------------------
  989|      0|    {
  990|      0|      Dprintf ("%s: ip and cfa unchanged; stopping here (ip=0x%lx)\n",
  991|      0|               __FUNCTION__, (long) c->ip);
  992|      0|      return -UNW_EBADFRAME;
  993|      0|    }
  994|       |
  995|  54.5k|  if (c->stash_frames)
  ------------------
  |  Branch (995:7): [True: 0, False: 54.5k]
  ------------------
  996|      0|    tdep_stash_frame (c, rs);
  ------------------
  |  |  250|      0|#define tdep_stash_frame                UNW_OBJ(stash_frame)
  |  |  ------------------
  |  |  |  |   48|      0|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      0|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  997|       |
  998|  54.5k|  return ret;
  999|  54.5k|}
Lparser.c:fetch_proc_info:
  457|     15|{
  458|     15|  int ret, dynamic = 1;
  459|       |
  460|       |  /* The 'ip' can point either to the previous or next instruction
  461|       |     depending on what type of frame we have: normal call or a place
  462|       |     to resume execution (e.g. after signal frame).
  463|       |
  464|       |     For a normal call frame we need to back up so we point within the
  465|       |     call itself; this is important because a) the call might be the
  466|       |     very last instruction of the function and the edge of the FDE,
  467|       |     and b) so that run_cfi_program() runs locations up to the call
  468|       |     but not more.
  469|       |
  470|       |     For signal frame, we need to do the exact opposite and look
  471|       |     up using the current 'ip' value.  That is where execution will
  472|       |     continue, and it's important we get this right, as 'ip' could be
  473|       |     right at the function entry and hence FDE edge, or at instruction
  474|       |     that manipulates CFA (push/pop). */
  475|       |
  476|     15|  if (c->use_prev_instr)
  ------------------
  |  Branch (476:7): [True: 15, False: 0]
  ------------------
  477|     15|    {
  478|       |#if defined(__arm__)
  479|       |      /* On arm, the least bit denotes thumb/arm mode, clear it. */
  480|       |      ip &= ~(unw_word_t)0x1;
  481|       |#endif
  482|     15|      --ip;
  483|     15|    }
  484|       |
  485|     15|  memset (&c->pi, 0, sizeof (c->pi));
  486|       |
  487|       |  /* check dynamic info first --- it overrides everything else */
  488|     15|  ret = unwi_find_dynamic_proc_info (c->as, ip, &c->pi, 1,
  ------------------
  |  |  268|     15|#define unwi_find_dynamic_proc_info     UNWI_OBJ(find_dynamic_proc_info)
  |  |  ------------------
  |  |  |  |  173|     15|#define UNWI_OBJ(fn)      UNW_PASTE(UNW_PREFIX,UNW_PASTE(I,fn))
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  489|     15|                                     c->as_arg);
  490|     15|  if (ret == -UNW_ENOINFO)
  ------------------
  |  Branch (490:7): [True: 15, False: 0]
  ------------------
  491|     15|    {
  492|     15|      dynamic = 0;
  493|     15|      if ((ret = tdep_find_proc_info (c, ip, 1)) < 0)
  ------------------
  |  |  256|     15|        dwarf_find_proc_info((c)->as, (ip), &(c)->pi, (n),      \
  |  |  ------------------
  |  |  |  |  388|     15|#define dwarf_find_proc_info            UNW_OBJ (dwarf_find_proc_info)
  |  |  |  |  ------------------
  |  |  |  |  |  |   48|     15|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  257|     15|                                       (c)->as_arg)
  ------------------
  |  Branch (493:11): [True: 0, False: 15]
  ------------------
  494|      0|        return ret;
  495|     15|    }
  496|       |
  497|     15|  if (c->pi.format != UNW_INFO_FORMAT_DYNAMIC
  ------------------
  |  Branch (497:7): [True: 15, False: 0]
  ------------------
  498|     15|      && c->pi.format != UNW_INFO_FORMAT_TABLE
  ------------------
  |  Branch (498:10): [True: 0, False: 15]
  ------------------
  499|      0|      && c->pi.format != UNW_INFO_FORMAT_REMOTE_TABLE
  ------------------
  |  Branch (499:10): [True: 0, False: 0]
  ------------------
  500|       |#ifdef UNW_TARGET_ARM
  501|       |      && c->pi.format != UNW_INFO_FORMAT_ARM_EXIDX
  502|       |#endif
  503|     15|      )
  504|      0|    return -UNW_ENOINFO;
  505|       |
  506|     15|  c->pi_valid = 1;
  507|     15|  c->pi_is_dynamic = dynamic;
  508|       |
  509|       |  /* Let system/machine-dependent code determine frame-specific attributes. */
  510|     15|  if (ret >= 0)
  ------------------
  |  Branch (510:7): [True: 15, False: 0]
  ------------------
  511|     15|    tdep_fetch_frame (c, ip, 1);
  ------------------
  |  |  242|     15|# define tdep_fetch_frame               UNW_OBJ(fetch_frame)
  |  |  ------------------
  |  |  |  |   48|     15|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  512|       |
  513|     15|  return ret;
  514|     15|}
Lparser.c:create_state_record_for:
  768|     15|{
  769|     15|  int ret;
  770|     15|  switch (c->pi.format)
  771|     15|    {
  772|     15|    case UNW_INFO_FORMAT_TABLE:
  ------------------
  |  Branch (772:5): [True: 15, False: 0]
  ------------------
  773|     15|    case UNW_INFO_FORMAT_REMOTE_TABLE:
  ------------------
  |  Branch (773:5): [True: 0, False: 15]
  ------------------
  774|     15|      if ((ret = setup_fde(c, sr)) < 0)
  ------------------
  |  Branch (774:11): [True: 0, False: 15]
  ------------------
  775|      0|	return ret;
  776|     15|      ret = parse_fde (c, ip, sr);
  777|     15|      break;
  778|       |
  779|      0|    case UNW_INFO_FORMAT_DYNAMIC:
  ------------------
  |  Branch (779:5): [True: 0, False: 15]
  ------------------
  780|      0|      ret = parse_dynamic (c, ip, sr);
  781|      0|      break;
  782|       |
  783|       |#ifdef UNW_TARGET_ARM
  784|       |    case UNW_INFO_FORMAT_ARM_EXIDX:
  785|       |      /* ARM exidx proc info is stepped by arm_exidx_step(), not the DWARF
  786|       |         path; signal dwarf_step() to skip so the cursor is not advanced
  787|       |         with an uninitialized state record. */
  788|       |      ret = -UNW_ENOINFO;
  789|       |      break;
  790|       |#endif
  791|       |
  792|      0|    default:
  ------------------
  |  Branch (792:5): [True: 0, False: 15]
  ------------------
  793|      0|      Debug (1, "Unexpected unwind-info format %d\n", c->pi.format);
  794|      0|      ret = -UNW_EINVAL;
  795|     15|    }
  796|     15|  return ret;
  797|     15|}
Lparser.c:setup_fde:
  540|     15|{
  541|     15|  int i, ret;
  542|       |
  543|     15|  assert (c->pi_valid);
  ------------------
  |  Branch (543:3): [True: 0, False: 15]
  |  Branch (543:3): [True: 15, False: 0]
  ------------------
  544|       |
  545|     15|  memset (sr, 0, sizeof (*sr));
  546|    300|  for (i = 0; i < DWARF_NUM_PRESERVED_REGS + 2; ++i)
  ------------------
  |  |   38|    300|#define DWARF_NUM_PRESERVED_REGS        17
  ------------------
  |  Branch (546:15): [True: 285, False: 15]
  ------------------
  547|    285|    set_reg (sr, i, DWARF_WHERE_SAME, 0);
  548|       |
  549|     15|#if !(defined(UNW_TARGET_MIPS) && _MIPS_SIM == _ABI64) \
  550|     15|    && !defined(UNW_TARGET_S390X)
  551|       |  /* SP defaults to CFA. s390x excluded: CFA = R15+160, so this default gives
  552|       |     caller's R15 = CFA instead of R15, breaking frameless functions like kill
  553|       |     that never emit DW_CFA_offset for R15. */
  554|     15|  set_reg (sr, TDEP_DWARF_SP, DWARF_WHERE_CFA, 0);
  ------------------
  |  |  427|     15|#define TDEP_DWARF_SP UNW_TDEP_SP
  ------------------
  555|     15|#endif
  556|       |
  557|     15|  struct dwarf_cie_info *dci = c->pi.unwind_info;
  558|     15|  sr->rs_current.ret_addr_column  = dci->ret_addr_column;
  559|     15|  unw_word_t addr = dci->cie_instr_start;
  560|     15|  unw_word_t curr_ip = 0;
  561|     15|  dwarf_stackable_reg_state_t *rs_stack = NULL;
  562|     15|  ret = run_cfi_program (c, sr, &curr_ip, ~(unw_word_t) 0, &addr,
  563|     15|			 dci->cie_instr_end,
  564|     15|			 &rs_stack, dci);
  565|     15|  empty_rstate_stack(&rs_stack);
  566|     15|  if (ret < 0)
  ------------------
  |  Branch (566:7): [True: 0, False: 15]
  ------------------
  567|      0|    return ret;
  568|       |
  569|     15|  memcpy (&sr->rs_initial, &sr->rs_current, sizeof (sr->rs_initial));
  570|     15|  return 0;
  571|     15|}
Lparser.c:set_reg:
   70|    442|{
   71|    442|  sr->rs_current.reg.where[regnum] = where;
   72|    442|  sr->rs_current.reg.val[regnum] = val;
   73|    442|}
Lparser.c:run_cfi_program:
  147|     30|{
  148|     30|  unw_addr_space_t as;
  149|     30|  void *arg;
  150|       |
  151|     30|  if (c->pi.flags & UNW_PI_FLAG_DEBUG_FRAME)
  ------------------
  |  |  146|     30|#define UNW_PI_FLAG_DEBUG_FRAME	32
  ------------------
  |  Branch (151:7): [True: 0, False: 30]
  ------------------
  152|      0|    {
  153|       |      /* .debug_frame CFI is stored in local address space.  */
  154|      0|      as = unw_local_addr_space;
  ------------------
  |  |  274|      0|#define unw_local_addr_space		UNW_OBJ(local_addr_space)
  |  |  ------------------
  |  |  |  |   48|      0|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      0|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|      0|      arg = NULL;
  156|      0|    }
  157|     30|  else
  158|     30|    {
  159|     30|      as = c->as;
  160|     30|      arg = c->as_arg;
  161|     30|    }
  162|     30|  unw_accessors_t *a = unw_get_accessors_int (as);
  ------------------
  |  |  278|     30|#define unw_get_accessors_int		UNW_ARCH_OBJ(get_accessors_int)
  |  |  ------------------
  |  |  |  |   49|     30|#define UNW_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|     30|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|     30|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     30|  int ret = 0;
  164|       |
  165|    252|  while (*ip <= end_ip && *addr < end_addr && ret >= 0)
  ------------------
  |  Branch (165:10): [True: 240, False: 12]
  |  Branch (165:27): [True: 222, False: 18]
  |  Branch (165:47): [True: 222, False: 0]
  ------------------
  166|    222|    {
  167|    222|      unw_word_t operand = 0, regnum, val, len;
  168|    222|      uint8_t u8, op;
  169|    222|      uint16_t u16;
  170|    222|      uint32_t u32;
  171|       |
  172|    222|      if ((ret = dwarf_readu8 (as, a, addr, &op, arg)) < 0)
  ------------------
  |  Branch (172:11): [True: 0, False: 222]
  ------------------
  173|      0|        break;
  174|       |
  175|    222|      if (op & DWARF_CFA_OPCODE_MASK)
  ------------------
  |  |  145|    222|#define DWARF_CFA_OPCODE_MASK   0xc0
  ------------------
  |  Branch (175:11): [True: 122, False: 100]
  ------------------
  176|    122|        {
  177|    122|          operand = op & DWARF_CFA_OPERAND_MASK;
  ------------------
  |  |  146|    122|#define DWARF_CFA_OPERAND_MASK  0x3f
  ------------------
  178|    122|          op &= ~DWARF_CFA_OPERAND_MASK;
  ------------------
  |  |  146|    122|#define DWARF_CFA_OPERAND_MASK  0x3f
  ------------------
  179|    122|        }
  180|    222|      switch ((dwarf_cfa_t) op)
  ------------------
  |  Branch (180:15): [True: 222, False: 0]
  ------------------
  181|    222|        {
  182|     48|        case DW_CFA_advance_loc:
  ------------------
  |  Branch (182:9): [True: 48, False: 174]
  ------------------
  183|     48|          *ip += operand * dci->code_align;
  184|     48|          Debug (15, "CFA_advance_loc to 0x%lx\n", (long) *ip);
  185|     48|          break;
  186|       |
  187|      5|        case DW_CFA_advance_loc1:
  ------------------
  |  Branch (187:9): [True: 5, False: 217]
  ------------------
  188|      5|          if ((ret = dwarf_readu8 (as, a, addr, &u8, arg)) < 0)
  ------------------
  |  Branch (188:15): [True: 0, False: 5]
  ------------------
  189|      0|            break;
  190|      5|          *ip += u8 * dci->code_align;
  191|      5|          Debug (15, "CFA_advance_loc1 to 0x%lx\n", (long) *ip);
  192|      5|          break;
  193|       |
  194|      7|        case DW_CFA_advance_loc2:
  ------------------
  |  Branch (194:9): [True: 7, False: 215]
  ------------------
  195|      7|          if ((ret = dwarf_readu16 (as, a, addr, &u16, arg)) < 0)
  ------------------
  |  Branch (195:15): [True: 0, False: 7]
  ------------------
  196|      0|            break;
  197|      7|          *ip += u16 * dci->code_align;
  198|      7|          Debug (15, "CFA_advance_loc2 to 0x%lx\n", (long) *ip);
  199|      7|          break;
  200|       |
  201|      0|        case DW_CFA_advance_loc4:
  ------------------
  |  Branch (201:9): [True: 0, False: 222]
  ------------------
  202|      0|          if ((ret = dwarf_readu32 (as, a, addr, &u32, arg)) < 0)
  ------------------
  |  Branch (202:15): [True: 0, False: 0]
  ------------------
  203|      0|            break;
  204|      0|          *ip += u32 * dci->code_align;
  205|      0|          Debug (15, "CFA_advance_loc4 to 0x%lx\n", (long) *ip);
  206|      0|          break;
  207|       |
  208|      0|        case DW_CFA_MIPS_advance_loc8:
  ------------------
  |  Branch (208:9): [True: 0, False: 222]
  ------------------
  209|       |#ifdef UNW_TARGET_MIPS
  210|       |          {
  211|       |            uint64_t u64 = 0;
  212|       |
  213|       |            if ((ret = dwarf_readu64 (as, a, addr, &u64, arg)) < 0)
  214|       |              break;
  215|       |            *ip += u64 * dci->code_align;
  216|       |            Debug (15, "CFA_MIPS_advance_loc8\n");
  217|       |            break;
  218|       |          }
  219|       |#else
  220|      0|          Debug (1, "DW_CFA_MIPS_advance_loc8 on non-MIPS target\n");
  221|      0|          ret = -UNW_EINVAL;
  222|      0|          break;
  223|      0|#endif
  224|       |
  225|     74|        case DW_CFA_offset:
  ------------------
  |  Branch (225:9): [True: 74, False: 148]
  ------------------
  226|     74|          regnum = operand;
  227|     74|          if ((ret = dwarf_read_uleb128 (as, a, addr, &val, arg)) < 0)
  ------------------
  |  Branch (227:15): [True: 0, False: 74]
  ------------------
  228|      0|            break;
  229|     74|          set_savedreg (sr, regnum, DWARF_WHERE_CFAREL, val * dci->data_align);
  230|     74|          Debug (15, "CFA_offset r%lu at cfa+0x%lx\n",
  231|     74|                 (long) regnum, (long) (val * dci->data_align));
  232|     74|          break;
  233|       |
  234|      0|        case DW_CFA_offset_extended:
  ------------------
  |  Branch (234:9): [True: 0, False: 222]
  ------------------
  235|      0|          if (((ret = read_regnum (as, a, addr, &regnum, arg)) < 0)
  ------------------
  |  Branch (235:15): [True: 0, False: 0]
  ------------------
  236|      0|              || ((ret = dwarf_read_uleb128 (as, a, addr, &val, arg)) < 0))
  ------------------
  |  Branch (236:18): [True: 0, False: 0]
  ------------------
  237|      0|            break;
  238|      0|          set_savedreg (sr, regnum, DWARF_WHERE_CFAREL, val * dci->data_align);
  239|      0|          Debug (15, "CFA_offset_extended r%lu at cf+0x%lx\n",
  240|      0|                 (long) regnum, (long) (val * dci->data_align));
  241|      0|          break;
  242|       |
  243|      0|        case DW_CFA_offset_extended_sf:
  ------------------
  |  Branch (243:9): [True: 0, False: 222]
  ------------------
  244|      0|          if (((ret = read_regnum (as, a, addr, &regnum, arg)) < 0)
  ------------------
  |  Branch (244:15): [True: 0, False: 0]
  ------------------
  245|      0|              || ((ret = dwarf_read_sleb128 (as, a, addr, &val, arg)) < 0))
  ------------------
  |  Branch (245:18): [True: 0, False: 0]
  ------------------
  246|      0|            break;
  247|      0|          set_savedreg (sr, regnum, DWARF_WHERE_CFAREL, val * dci->data_align);
  248|      0|          Debug (15, "CFA_offset_extended_sf r%lu at cf+0x%lx\n",
  249|      0|                 (long) regnum, (long) (val * dci->data_align));
  250|      0|          break;
  251|       |
  252|      0|        case DW_CFA_restore:
  ------------------
  |  Branch (252:9): [True: 0, False: 222]
  ------------------
  253|      0|          regnum = operand;
  254|      0|          restore_savedreg (sr, regnum);
  255|      0|          Debug (15, "CFA_restore r%lu\n", (long) regnum);
  256|      0|          break;
  257|       |
  258|      0|        case DW_CFA_restore_extended:
  ------------------
  |  Branch (258:9): [True: 0, False: 222]
  ------------------
  259|      0|          if ((ret = dwarf_read_uleb128 (as, a, addr, &regnum, arg)) < 0)
  ------------------
  |  Branch (259:15): [True: 0, False: 0]
  ------------------
  260|      0|            break;
  261|      0|          restore_savedreg (sr, regnum);
  262|      0|          Debug (15, "CFA_restore_extended r%lu\n", (long) regnum);
  263|      0|          break;
  264|       |
  265|     37|        case DW_CFA_nop:
  ------------------
  |  Branch (265:9): [True: 37, False: 185]
  ------------------
  266|     37|          break;
  267|       |
  268|      0|        case DW_CFA_set_loc:
  ------------------
  |  Branch (268:9): [True: 0, False: 222]
  ------------------
  269|      0|          if ((ret = dwarf_read_encoded_pointer (as, a, addr, dci->fde_encoding,
  ------------------
  |  |  402|      0|#define dwarf_read_encoded_pointer      UNW_OBJ (dwarf_read_encoded_pointer)
  |  |  ------------------
  |  |  |  |   48|      0|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      0|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (269:15): [True: 0, False: 0]
  ------------------
  270|      0|                                                 &c->pi, ip,
  271|      0|                                                 arg)) < 0)
  272|      0|            break;
  273|      0|          Debug (15, "CFA_set_loc to 0x%lx\n", (long) *ip);
  274|      0|          break;
  275|       |
  276|      1|        case DW_CFA_undefined:
  ------------------
  |  Branch (276:9): [True: 1, False: 221]
  ------------------
  277|      1|          if ((ret = read_regnum (as, a, addr, &regnum, arg)) < 0)
  ------------------
  |  Branch (277:15): [True: 0, False: 1]
  ------------------
  278|      0|            break;
  279|      1|          set_savedreg (sr, regnum, DWARF_WHERE_UNDEF, 0);
  280|      1|          Debug (15, "CFA_undefined r%lu\n", (long) regnum);
  281|      1|          break;
  282|       |
  283|      0|        case DW_CFA_same_value:
  ------------------
  |  Branch (283:9): [True: 0, False: 222]
  ------------------
  284|      0|          if ((ret = read_regnum (as, a, addr, &regnum, arg)) < 0)
  ------------------
  |  Branch (284:15): [True: 0, False: 0]
  ------------------
  285|      0|            break;
  286|      0|          set_savedreg (sr, regnum, DWARF_WHERE_SAME, 0);
  287|      0|          Debug (15, "CFA_same_value r%lu\n", (long) regnum);
  288|      0|          break;
  289|       |
  290|      0|        case DW_CFA_register:
  ------------------
  |  Branch (290:9): [True: 0, False: 222]
  ------------------
  291|      0|          if (((ret = read_regnum (as, a, addr, &regnum, arg)) < 0)
  ------------------
  |  Branch (291:15): [True: 0, False: 0]
  ------------------
  292|      0|              || ((ret = dwarf_read_uleb128 (as, a, addr, &val, arg)) < 0))
  ------------------
  |  Branch (292:18): [True: 0, False: 0]
  ------------------
  293|      0|            break;
  294|      0|          set_savedreg (sr, regnum, DWARF_WHERE_REG, val);
  295|      0|          Debug (15, "CFA_register r%lu to r%lu\n", (long) regnum, (long) val);
  296|      0|          break;
  297|       |
  298|      0|        case DW_CFA_remember_state:
  ------------------
  |  Branch (298:9): [True: 0, False: 222]
  ------------------
  299|      0|	  if (push_rstate_stack(rs_stack) < 0)
  ------------------
  |  Branch (299:8): [True: 0, False: 0]
  ------------------
  300|      0|	    {
  301|      0|              Debug (1, "Out of memory in DW_CFA_remember_state\n");
  302|      0|              ret = -UNW_ENOMEM;
  303|      0|              break;
  304|      0|	    }
  305|      0|          (*rs_stack)->state = sr->rs_current;
  306|      0|          Debug (15, "CFA_remember_state\n");
  307|      0|          break;
  308|       |
  309|      0|        case DW_CFA_restore_state:
  ------------------
  |  Branch (309:9): [True: 0, False: 222]
  ------------------
  310|      0|          if (!*rs_stack)
  ------------------
  |  Branch (310:15): [True: 0, False: 0]
  ------------------
  311|      0|            {
  312|      0|              Debug (1, "register-state stack underflow\n");
  313|      0|              ret = -UNW_EINVAL;
  314|      0|              break;
  315|      0|            }
  316|      0|          sr->rs_current = (*rs_stack)->state;
  317|      0|          pop_rstate_stack(rs_stack);
  318|      0|          Debug (15, "CFA_restore_state\n");
  319|      0|          break;
  320|       |
  321|     17|        case DW_CFA_def_cfa:
  ------------------
  |  Branch (321:9): [True: 17, False: 205]
  ------------------
  322|     17|          if (((ret = read_cfa_regnum (as, a, addr, &regnum, arg)) < 0)
  ------------------
  |  Branch (322:15): [True: 0, False: 17]
  ------------------
  323|     17|              || ((ret = dwarf_read_uleb128 (as, a, addr, &val, arg)) < 0))
  ------------------
  |  Branch (323:18): [True: 0, False: 17]
  ------------------
  324|      0|            break;
  325|     17|          set_reg (sr, DWARF_CFA_REG_COLUMN, DWARF_WHERE_REG, regnum);
  ------------------
  |  |  248|     17|#define DWARF_CFA_REG_COLUMN    DWARF_NUM_PRESERVED_REGS
  |  |  ------------------
  |  |  |  |   38|     17|#define DWARF_NUM_PRESERVED_REGS        17
  |  |  ------------------
  ------------------
  326|     17|          set_reg (sr, DWARF_CFA_OFF_COLUMN, 0, val);   /* NOT factored! */
  ------------------
  |  |  249|     17|#define DWARF_CFA_OFF_COLUMN    (DWARF_NUM_PRESERVED_REGS + 1)
  |  |  ------------------
  |  |  |  |   38|     17|#define DWARF_NUM_PRESERVED_REGS        17
  |  |  ------------------
  ------------------
  327|     17|          Debug (15, "CFA_def_cfa r%lu+0x%lx\n", (long) regnum, (long) val);
  328|     17|          break;
  329|       |
  330|      0|        case DW_CFA_def_cfa_sf:
  ------------------
  |  Branch (330:9): [True: 0, False: 222]
  ------------------
  331|      0|          if (((ret = read_cfa_regnum (as, a, addr, &regnum, arg)) < 0)
  ------------------
  |  Branch (331:15): [True: 0, False: 0]
  ------------------
  332|      0|              || ((ret = dwarf_read_sleb128 (as, a, addr, &val, arg)) < 0))
  ------------------
  |  Branch (332:18): [True: 0, False: 0]
  ------------------
  333|      0|            break;
  334|      0|          set_reg (sr, DWARF_CFA_REG_COLUMN, DWARF_WHERE_REG, regnum);
  ------------------
  |  |  248|      0|#define DWARF_CFA_REG_COLUMN    DWARF_NUM_PRESERVED_REGS
  |  |  ------------------
  |  |  |  |   38|      0|#define DWARF_NUM_PRESERVED_REGS        17
  |  |  ------------------
  ------------------
  335|      0|          set_reg (sr, DWARF_CFA_OFF_COLUMN, 0,
  ------------------
  |  |  249|      0|#define DWARF_CFA_OFF_COLUMN    (DWARF_NUM_PRESERVED_REGS + 1)
  |  |  ------------------
  |  |  |  |   38|      0|#define DWARF_NUM_PRESERVED_REGS        17
  |  |  ------------------
  ------------------
  336|      0|                   val * dci->data_align);              /* factored! */
  337|      0|          Debug (15, "CFA_def_cfa_sf r%lu+0x%lx\n",
  338|      0|                 (long) regnum, (long) (val * dci->data_align));
  339|      0|          break;
  340|       |
  341|     13|        case DW_CFA_def_cfa_register:
  ------------------
  |  Branch (341:9): [True: 13, False: 209]
  ------------------
  342|     13|          if ((ret = read_cfa_regnum (as, a, addr, &regnum, arg)) < 0)
  ------------------
  |  Branch (342:15): [True: 0, False: 13]
  ------------------
  343|      0|            break;
  344|     13|          set_reg (sr, DWARF_CFA_REG_COLUMN, DWARF_WHERE_REG, regnum);
  ------------------
  |  |  248|     13|#define DWARF_CFA_REG_COLUMN    DWARF_NUM_PRESERVED_REGS
  |  |  ------------------
  |  |  |  |   38|     13|#define DWARF_NUM_PRESERVED_REGS        17
  |  |  ------------------
  ------------------
  345|     13|          Debug (15, "CFA_def_cfa_register r%lu\n", (long) regnum);
  346|     13|          break;
  347|       |
  348|     20|        case DW_CFA_def_cfa_offset:
  ------------------
  |  Branch (348:9): [True: 20, False: 202]
  ------------------
  349|     20|          if ((ret = dwarf_read_uleb128 (as, a, addr, &val, arg)) < 0)
  ------------------
  |  Branch (349:15): [True: 0, False: 20]
  ------------------
  350|      0|            break;
  351|     20|          set_reg (sr, DWARF_CFA_OFF_COLUMN, 0, val);   /* NOT factored! */
  ------------------
  |  |  249|     20|#define DWARF_CFA_OFF_COLUMN    (DWARF_NUM_PRESERVED_REGS + 1)
  |  |  ------------------
  |  |  |  |   38|     20|#define DWARF_NUM_PRESERVED_REGS        17
  |  |  ------------------
  ------------------
  352|     20|          Debug (15, "CFA_def_cfa_offset 0x%lx\n", (long) val);
  353|     20|          break;
  354|       |
  355|      0|        case DW_CFA_def_cfa_offset_sf:
  ------------------
  |  Branch (355:9): [True: 0, False: 222]
  ------------------
  356|      0|          if ((ret = dwarf_read_sleb128 (as, a, addr, &val, arg)) < 0)
  ------------------
  |  Branch (356:15): [True: 0, False: 0]
  ------------------
  357|      0|            break;
  358|      0|          set_reg (sr, DWARF_CFA_OFF_COLUMN, 0,
  ------------------
  |  |  249|      0|#define DWARF_CFA_OFF_COLUMN    (DWARF_NUM_PRESERVED_REGS + 1)
  |  |  ------------------
  |  |  |  |   38|      0|#define DWARF_NUM_PRESERVED_REGS        17
  |  |  ------------------
  ------------------
  359|      0|                   val * dci->data_align);      /* factored! */
  360|      0|          Debug (15, "CFA_def_cfa_offset_sf 0x%lx\n",
  361|      0|                 (long) (val * dci->data_align));
  362|      0|          break;
  363|       |
  364|      0|        case DW_CFA_def_cfa_expression:
  ------------------
  |  Branch (364:9): [True: 0, False: 222]
  ------------------
  365|       |          /* Save the address of the DW_FORM_block for later evaluation. */
  366|      0|          set_reg (sr, DWARF_CFA_REG_COLUMN, DWARF_WHERE_EXPR, *addr);
  ------------------
  |  |  248|      0|#define DWARF_CFA_REG_COLUMN    DWARF_NUM_PRESERVED_REGS
  |  |  ------------------
  |  |  |  |   38|      0|#define DWARF_NUM_PRESERVED_REGS        17
  |  |  ------------------
  ------------------
  367|       |
  368|      0|          if ((ret = dwarf_read_uleb128 (as, a, addr, &len, arg)) < 0)
  ------------------
  |  Branch (368:15): [True: 0, False: 0]
  ------------------
  369|      0|            break;
  370|       |
  371|      0|          Debug (15, "CFA_def_cfa_expr @ 0x%lx [%lu bytes]\n",
  372|      0|                 (long) *addr, (long) len);
  373|      0|          *addr += len;
  374|      0|          break;
  375|       |
  376|      0|        case DW_CFA_expression:
  ------------------
  |  Branch (376:9): [True: 0, False: 222]
  ------------------
  377|      0|          if ((ret = read_regnum (as, a, addr, &regnum, arg)) < 0)
  ------------------
  |  Branch (377:15): [True: 0, False: 0]
  ------------------
  378|      0|            break;
  379|       |
  380|       |          /* Save the address of the DW_FORM_block for later evaluation. */
  381|      0|          set_savedreg (sr, regnum, DWARF_WHERE_EXPR, *addr);
  382|       |
  383|      0|          if ((ret = dwarf_read_uleb128 (as, a, addr, &len, arg)) < 0)
  ------------------
  |  Branch (383:15): [True: 0, False: 0]
  ------------------
  384|      0|            break;
  385|       |
  386|      0|          Debug (15, "CFA_expression r%lu @ 0x%lx [%lu bytes]\n",
  387|      0|                 (long) regnum, (long) addr, (long) len);
  388|      0|          *addr += len;
  389|      0|          break;
  390|       |
  391|      0|        case DW_CFA_val_expression:
  ------------------
  |  Branch (391:9): [True: 0, False: 222]
  ------------------
  392|      0|          if ((ret = read_regnum (as, a, addr, &regnum, arg)) < 0)
  ------------------
  |  Branch (392:15): [True: 0, False: 0]
  ------------------
  393|      0|            break;
  394|       |
  395|       |          /* Save the address of the DW_FORM_block for later evaluation. */
  396|      0|          set_savedreg (sr, regnum, DWARF_WHERE_VAL_EXPR, *addr);
  397|       |
  398|      0|          if ((ret = dwarf_read_uleb128 (as, a, addr, &len, arg)) < 0)
  ------------------
  |  Branch (398:15): [True: 0, False: 0]
  ------------------
  399|      0|            break;
  400|       |
  401|      0|          Debug (15, "CFA_val_expression r%lu @ 0x%lx [%lu bytes]\n",
  402|      0|                 (long) regnum, (long) addr, (long) len);
  403|      0|          *addr += len;
  404|      0|          break;
  405|       |
  406|      0|        case DW_CFA_GNU_args_size:
  ------------------
  |  Branch (406:9): [True: 0, False: 222]
  ------------------
  407|      0|          if ((ret = dwarf_read_uleb128 (as, a, addr, &val, arg)) < 0)
  ------------------
  |  Branch (407:15): [True: 0, False: 0]
  ------------------
  408|      0|            break;
  409|      0|          sr->args_size = val;
  410|      0|          Debug (15, "CFA_GNU_args_size %lu\n", (long) val);
  411|      0|          break;
  412|       |
  413|      0|        case DW_CFA_GNU_negative_offset_extended:
  ------------------
  |  Branch (413:9): [True: 0, False: 222]
  ------------------
  414|       |          /* A comment in GCC says that this is obsoleted by
  415|       |             DW_CFA_offset_extended_sf, but that it's used by older
  416|       |             PowerPC code.  */
  417|      0|          if (((ret = read_regnum (as, a, addr, &regnum, arg)) < 0)
  ------------------
  |  Branch (417:15): [True: 0, False: 0]
  ------------------
  418|      0|              || ((ret = dwarf_read_uleb128 (as, a, addr, &val, arg)) < 0))
  ------------------
  |  Branch (418:18): [True: 0, False: 0]
  ------------------
  419|      0|            break;
  420|      0|          set_savedreg (sr, regnum, DWARF_WHERE_CFAREL, ~(val * dci->data_align) + 1);
  421|      0|          Debug (15, "CFA_GNU_negative_offset_extended cfa+0x%lx\n",
  422|      0|                 (long) (~(val * dci->data_align) + 1));
  423|      0|          break;
  424|       |
  425|      0|        case DW_CFA_GNU_window_save:
  ------------------
  |  Branch (425:9): [True: 0, False: 222]
  ------------------
  426|       |#ifdef UNW_TARGET_SPARC
  427|       |          /* This is a special CFA to handle all 16 windowed registers
  428|       |             on SPARC.  */
  429|       |          for (regnum = 16; regnum < 32; ++regnum)
  430|       |            set_savedreg (sr, regnum, DWARF_WHERE_CFAREL,
  431|       |                     (regnum - 16) * sizeof (unw_word_t));
  432|       |          Debug (15, "CFA_GNU_window_save\n");
  433|       |          break;
  434|       |#elif UNW_TARGET_AARCH64
  435|       |          /* This is a specific opcode on aarch64, DW_CFA_AARCH64_negate_ra_state */
  436|       |          Debug (15, "DW_CFA_AARCH64_negate_ra_state\n");
  437|       |          aarch64_negate_ra_sign_state(sr);
  438|       |          break;
  439|       |#else
  440|       |          /* FALL THROUGH */
  441|      0|#endif
  442|      0|        case DW_CFA_lo_user:
  ------------------
  |  Branch (442:9): [True: 0, False: 222]
  ------------------
  443|      0|        case DW_CFA_hi_user:
  ------------------
  |  Branch (443:9): [True: 0, False: 222]
  ------------------
  444|      0|          Debug (1, "Unexpected CFA opcode 0x%x\n", op);
  445|      0|          ret = -UNW_EINVAL;
  446|      0|          break;
  447|    222|        }
  448|    222|    }
  449|       |
  450|     30|  if (ret > 0)
  ------------------
  |  Branch (450:7): [True: 0, False: 30]
  ------------------
  451|      0|    ret = 0;
  452|     30|  return ret;
  453|     30|}
Lparser.c:set_savedreg:
   80|     75|{
   81|     75|  if (regnum >= DWARF_NUM_PRESERVED_REGS)
  ------------------
  |  |   38|     75|#define DWARF_NUM_PRESERVED_REGS        17
  ------------------
  |  Branch (81:7): [True: 0, False: 75]
  ------------------
   82|      0|    {
   83|      0|      Debug (15, "ignoring rule for unrepresentable register r%lu\n",
   84|      0|             (long) regnum);
   85|      0|      return;
   86|      0|    }
   87|     75|  set_reg (sr, regnum, where, val);
   88|     75|}
Lparser.c:read_regnum:
   63|      1|{
   64|      1|  return dwarf_read_uleb128 (as, a, addr, valp, arg);
   65|      1|}
Lparser.c:read_cfa_regnum:
   42|     30|{
   43|     30|  int ret;
   44|       |
   45|     30|  if ((ret = dwarf_read_uleb128 (as, a, addr, valp, arg)) < 0)
  ------------------
  |  Branch (45:7): [True: 0, False: 30]
  ------------------
   46|      0|    return ret;
   47|       |
   48|     30|  if (*valp >= DWARF_NUM_PRESERVED_REGS)
  ------------------
  |  |   38|     30|#define DWARF_NUM_PRESERVED_REGS        17
  ------------------
  |  Branch (48:7): [True: 0, False: 30]
  ------------------
   49|      0|    {
   50|      0|      Debug (1, "Invalid CFA register number %u\n", (unsigned int) *valp);
   51|      0|      return -UNW_EBADREG;
   52|      0|    }
   53|     30|  return 0;
   54|     30|}
Lparser.c:empty_rstate_stack:
  128|     30|{
  129|     30|  while (*rs_stack)
  ------------------
  |  Branch (129:10): [True: 0, False: 30]
  ------------------
  130|      0|    pop_rstate_stack(rs_stack);
  131|     30|}
Lparser.c:parse_fde:
  575|     15|{
  576|     15|  int ret;
  577|     15|  struct dwarf_cie_info *dci = c->pi.unwind_info;
  578|     15|  unw_word_t addr = dci->fde_instr_start;
  579|     15|  unw_word_t curr_ip = c->pi.start_ip;
  580|     15|  dwarf_stackable_reg_state_t *rs_stack = NULL;
  581|       |  /* Process up to current `ip` for signal frame and `ip - 1` for normal call frame
  582|       |     See `c->use_prev_instr` use in `fetch_proc_info` for details. */
  583|     15|  ret = run_cfi_program (c, sr, &curr_ip, ip - c->use_prev_instr, &addr, dci->fde_instr_end,
  584|     15|			 &rs_stack, dci);
  585|     15|  empty_rstate_stack(&rs_stack);
  586|     15|  if (ret < 0)
  ------------------
  |  Branch (586:7): [True: 0, False: 15]
  ------------------
  587|      0|    return ret;
  588|       |
  589|     15|  return 0;
  590|     15|}
Lparser.c:put_unwind_info:
  527|     15|{
  528|     15|  if (c->pi_is_dynamic)
  ------------------
  |  Branch (528:7): [True: 0, False: 15]
  ------------------
  529|      0|    unwi_put_dynamic_unwind_info (c->as, pi, c->as_arg);
  ------------------
  |  |  270|      0|#define unwi_put_dynamic_unwind_info    UNWI_OBJ(put_dynamic_unwind_info)
  |  |  ------------------
  |  |  |  |  173|      0|#define UNWI_OBJ(fn)      UNW_PASTE(UNW_PREFIX,UNW_PASTE(I,fn))
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      0|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  530|     15|  else if (pi->unwind_info && pi->format == UNW_INFO_FORMAT_TABLE)
  ------------------
  |  Branch (530:12): [True: 15, False: 0]
  |  Branch (530:31): [True: 15, False: 0]
  ------------------
  531|     15|    {
  532|     15|      mempool_free (&dwarf_cie_info_pool, pi->unwind_info);
  ------------------
  |  |   57|     15|#define mempool_free(p,o)       UNWI_ARCH_OBJ(_mempool_free)(p,o)
  |  |  ------------------
  |  |  |  |  174|     15|#define UNWI_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_UI,UNW_TARGET),_), fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|     15|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|     15|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  533|       |      pi->unwind_info = NULL;
  534|     15|    }
  535|     15|  c->pi_valid = 0;
  536|     15|}

_ULx86_64_dwarf_read_encoded_pointer:
   36|     75|{
   37|     75|  return dwarf_read_encoded_pointer_inlined (as, a, addr, encoding,
   38|     75|                                             pi, valp, arg);
   39|     75|}

_Ux86_64_dwarf_init:
   33|      1|{
   34|      1|  mempool_init (&dwarf_reg_state_pool, sizeof (dwarf_stackable_reg_state_t), 0);
  ------------------
  |  |   55|      1|#define mempool_init(p,s,r)     UNWI_ARCH_OBJ(_mempool_init)(p,s,r)
  |  |  ------------------
  |  |  |  |  174|      1|#define UNWI_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_UI,UNW_TARGET),_), fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      1|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      1|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   35|      1|  mempool_init (&dwarf_cie_info_pool, sizeof (struct dwarf_cie_info), 0);
  ------------------
  |  |   55|      1|#define mempool_init(p,s,r)     UNWI_ARCH_OBJ(_mempool_init)(p,s,r)
  |  |  ------------------
  |  |  |  |  174|      1|#define UNWI_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_UI,UNW_TARGET),_), fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      1|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      1|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   36|      1|  return 0;
   37|      1|}

_Uelf64_get_proc_name_in_image:
  648|  31.0k|{
  649|  31.0k|  Elf_W (Addr) load_offset;
  ------------------
  |  |   44|  31.0k|# define Elf_W(x)       Elf64_##x
  ------------------
  650|  31.0k|  Elf_W (Addr) min_dist = ~(Elf_W (Addr))0;
  ------------------
  |  |   44|  31.0k|# define Elf_W(x)       Elf64_##x
  ------------------
  651|  31.0k|  int ret;
  652|       |
  653|  31.0k|  load_offset = elf_w (get_load_offset) (ei, segbase);
  ------------------
  |  |   45|  31.0k|# define elf_w(x)       _Uelf64_##x
  ------------------
  654|  31.0k|  ret = elf_w (lookup_symbol) (as, ip, ei, load_offset, buf, buf_len, &min_dist, arg);
  ------------------
  |  |   45|  31.0k|# define elf_w(x)       _Uelf64_##x
  ------------------
  655|       |
  656|       |  /* If the ELF image has MiniDebugInfo embedded in it, look up the symbol in
  657|       |     there as well and replace the previously found if it is closer. */
  658|  31.0k|  struct elf_image mdi;
  659|  31.0k|  if (elf_w (extract_minidebuginfo) (ei, &mdi))
  ------------------
  |  |   45|  31.0k|# define elf_w(x)       _Uelf64_##x
  ------------------
  |  Branch (659:7): [True: 0, False: 31.0k]
  ------------------
  660|      0|    {
  661|      0|      int ret_mdi = elf_w (lookup_symbol) (as, ip, &mdi, load_offset, buf,
  ------------------
  |  |   45|      0|# define elf_w(x)       _Uelf64_##x
  ------------------
  662|      0|                                           buf_len, &min_dist, arg);
  663|       |
  664|       |      /* Closer symbol was found (possibly truncated). */
  665|      0|      if (ret_mdi == 0 || ret_mdi == -UNW_ENOMEM)
  ------------------
  |  Branch (665:11): [True: 0, False: 0]
  |  Branch (665:27): [True: 0, False: 0]
  ------------------
  666|      0|        {
  667|      0|          ret = ret_mdi;
  668|      0|        }
  669|       |
  670|      0|      mi_munmap (mdi.image, mdi.size);
  671|      0|    }
  672|       |
  673|  31.0k|  if (min_dist >= ei->size)
  ------------------
  |  Branch (673:7): [True: 0, False: 31.0k]
  ------------------
  674|      0|    return -UNW_ENOINFO;                /* not found */
  675|  31.0k|  if (offp)
  ------------------
  |  Branch (675:7): [True: 31.0k, False: 0]
  ------------------
  676|  31.0k|    *offp = min_dist;
  677|  31.0k|  return ret;
  678|  31.0k|}
_Uelf64_get_proc_name:
  683|  31.0k|{
  684|  31.0k|  unsigned long segbase, mapoff;
  685|  31.0k|  struct elf_image ei;
  686|  31.0k|  int ret;
  687|  31.0k|  char file[PATH_MAX];
  688|       |
  689|  31.0k|  ret = tdep_get_elf_image (as, &ei, pid, ip, &segbase, &mapoff, file, PATH_MAX, arg);
  ------------------
  |  |  237|  31.0k|#define tdep_get_elf_image              UNW_ARCH_OBJ(get_elf_image)
  |  |  ------------------
  |  |  |  |   49|  31.0k|#define UNW_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  31.0k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  31.0k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  690|  31.0k|  if (ret < 0)
  ------------------
  |  Branch (690:7): [True: 0, False: 31.0k]
  ------------------
  691|      0|    return ret;
  692|       |
  693|  31.0k|  ret = elf_w (load_debuginfo) (file, &ei, 1);
  ------------------
  |  |   45|  31.0k|# define elf_w(x)       _Uelf64_##x
  ------------------
  694|  31.0k|  if (ret < 0)
  ------------------
  |  Branch (694:7): [True: 0, False: 31.0k]
  ------------------
  695|      0|    return ret;
  696|       |
  697|  31.0k|  ret = elf_w (get_proc_name_in_image) (as, &ei, segbase, ip, buf, buf_len, offp, arg);
  ------------------
  |  |   45|  31.0k|# define elf_w(x)       _Uelf64_##x
  ------------------
  698|       |
  699|  31.0k|  mi_munmap (ei.image, ei.size);
  700|  31.0k|  ei.image = NULL;
  701|       |
  702|  31.0k|  return ret;
  703|  31.0k|}
_Uelf64_find_section:
  784|  31.0k|{
  785|  31.0k|  Elf_W (Ehdr) *ehdr = ei->image;
  ------------------
  |  |   44|  31.0k|# define Elf_W(x)       Elf64_##x
  ------------------
  786|  31.0k|  Elf_W (Shdr) *shdr;
  ------------------
  |  |   44|  31.0k|# define Elf_W(x)       Elf64_##x
  ------------------
  787|  31.0k|  char *strtab;
  788|  31.0k|  int i;
  789|       |
  790|  31.0k|  if (!elf_w (valid_object) (ei))
  ------------------
  |  |   45|  31.0k|# define elf_w(x)       _Uelf64_##x
  ------------------
  |  Branch (790:7): [True: 0, False: 31.0k]
  ------------------
  791|      0|    return 0;
  792|       |
  793|  31.0k|  shdr = elf_w (section_table) (ei);
  ------------------
  |  |   45|  31.0k|# define elf_w(x)       _Uelf64_##x
  ------------------
  794|  31.0k|  if (!shdr)
  ------------------
  |  Branch (794:7): [True: 0, False: 31.0k]
  ------------------
  795|      0|    return 0;
  796|       |
  797|  31.0k|  strtab = elf_w (string_table) (ei, ehdr->e_shstrndx);
  ------------------
  |  |   45|  31.0k|# define elf_w(x)       _Uelf64_##x
  ------------------
  798|  31.0k|  if (!strtab)
  ------------------
  |  Branch (798:7): [True: 0, False: 31.0k]
  ------------------
  799|      0|    return 0;
  800|       |
  801|  1.69M|  for (i = 0; i < ehdr->e_shnum; ++i)
  ------------------
  |  Branch (801:15): [True: 1.67M, False: 27.1k]
  ------------------
  802|  1.67M|    {
  803|  1.67M|      if (strcmp (strtab + shdr->sh_name, secname) == 0)
  ------------------
  |  Branch (803:11): [True: 3.87k, False: 1.66M]
  ------------------
  804|  3.87k|        {
  805|  3.87k|          if (shdr->sh_offset + shdr->sh_size > ei->size)
  ------------------
  |  Branch (805:15): [True: 0, False: 3.87k]
  ------------------
  806|      0|            {
  807|      0|              Debug (1, "section \"%s\" outside image? (0x%lu > 0x%lu)\n",
  808|      0|                     secname,
  809|      0|                     (unsigned long) shdr->sh_offset + shdr->sh_size,
  810|      0|                     (unsigned long) ei->size);
  811|      0|              return 0;
  812|      0|            }
  813|       |
  814|  3.87k|          Debug (16, "found section \"%s\" at 0x%lx\n",
  815|  3.87k|                 secname, (unsigned long) shdr->sh_offset);
  816|  3.87k|          return shdr;
  817|  3.87k|        }
  818|       |
  819|  1.66M|      shdr = (Elf_W (Shdr) *) (((char *) shdr) + ehdr->e_shentsize);
  820|  1.66M|    }
  821|       |
  822|       |  /* section not found */
  823|  27.1k|  return 0;
  824|  31.0k|}
_Uelf64_load_debuginfo:
  986|  46.5k|{
  987|  46.5k|  int ret;
  988|  46.5k|  Elf_W (Shdr) *shdr;
  ------------------
  |  |   44|  46.5k|# define Elf_W(x)       Elf64_##x
  ------------------
  989|  46.5k|  Elf_W (Ehdr) *prev_image;
  ------------------
  |  |   44|  46.5k|# define Elf_W(x)       Elf64_##x
  ------------------
  990|  46.5k|  off_t prev_size;
  991|  46.5k|  char path[PATH_MAX];
  992|       |
  993|  46.5k|  if (!ei->image)
  ------------------
  |  Branch (993:7): [True: 15.5k, False: 31.0k]
  ------------------
  994|  15.5k|    {
  995|  15.5k|      ret = elf_map_image(ei, file);
  996|  15.5k|      if (ret)
  ------------------
  |  Branch (996:11): [True: 15.5k, False: 0]
  ------------------
  997|  15.5k|        return ret;
  998|  15.5k|    }
  999|       |
 1000|  31.0k|  prev_image = ei->image;
 1001|  31.0k|  prev_size = ei->size;
 1002|       |
 1003|       |  /* Ignore separate debug files which contain a .gnu_debuglink section. */
 1004|  31.0k|  if (is_local == -1) {
  ------------------
  |  Branch (1004:7): [True: 0, False: 31.0k]
  ------------------
 1005|      0|    return 0;
 1006|      0|  }
 1007|       |
 1008|  31.0k|  ret = elf_w (find_build_id_path) (ei, path, sizeof(path));
  ------------------
  |  |   45|  31.0k|# define elf_w(x)       _Uelf64_##x
  ------------------
 1009|  31.0k|  if (ret == 0)
  ------------------
  |  Branch (1009:7): [True: 3.87k, False: 27.1k]
  ------------------
 1010|  3.87k|    {
 1011|  3.87k|      ei->image = NULL;
 1012|       |
 1013|  3.87k|      ret = elf_w (load_debuginfo) (path, ei, -1);
  ------------------
  |  |   45|  3.87k|# define elf_w(x)       _Uelf64_##x
  ------------------
 1014|  3.87k|      if (ret == 0)
  ------------------
  |  Branch (1014:11): [True: 0, False: 3.87k]
  ------------------
 1015|      0|        {
 1016|      0|          mi_munmap (prev_image, prev_size);
 1017|      0|          return 0;
 1018|      0|        }
 1019|       |
 1020|  3.87k|      ei->image = prev_image;
 1021|  3.87k|      ei->size  = prev_size;
 1022|  3.87k|    }
 1023|       |
 1024|  31.0k|  shdr = elf_w (find_section) (ei, ".gnu_debuglink");
  ------------------
  |  |   45|  31.0k|# define elf_w(x)       _Uelf64_##x
  ------------------
 1025|  31.0k|  if (shdr) {
  ------------------
  |  Branch (1025:7): [True: 3.87k, False: 27.1k]
  ------------------
 1026|  3.87k|    if (shdr->sh_size >= PATH_MAX ||
  ------------------
  |  Branch (1026:9): [True: 0, False: 3.87k]
  ------------------
 1027|  3.87k|	(shdr->sh_offset + shdr->sh_size > ei->size))
  ------------------
  |  Branch (1027:2): [True: 0, False: 3.87k]
  ------------------
 1028|      0|      return 0;
 1029|       |
 1030|  3.87k|    {
 1031|  3.87k|      char linkbuf[shdr->sh_size];
 1032|  3.87k|      char *link = ((char *) ei->image) + shdr->sh_offset;
 1033|  3.87k|      const char *p;
 1034|  3.87k|      static const char *debugdir = "/usr/lib/debug";
 1035|  3.87k|      char basedir[strlen(file) + 1];
 1036|  3.87k|      char newname[shdr->sh_size + strlen (debugdir) + strlen (file) + 9];
 1037|  3.87k|      size_t crc_offset;
 1038|  3.87k|      uint32_t crc;
 1039|       |
 1040|  3.87k|      memcpy(linkbuf, link, shdr->sh_size);
 1041|       |
 1042|  3.87k|      if (memchr (linkbuf, 0, shdr->sh_size) == NULL)
  ------------------
  |  Branch (1042:11): [True: 0, False: 3.87k]
  ------------------
 1043|      0|	return 0;
 1044|       |
 1045|       |      /* The section holds the NUL-terminated file name, padded to a
 1046|       |	 four-byte boundary, followed by the CRC-32 of the debug file.  */
 1047|  3.87k|      crc_offset = UNW_ALIGN (strlen (linkbuf) + 1, 4);
  ------------------
  |  |  439|  3.87k|#define UNW_ALIGN(x,a) (((size_t)(x) + (size_t)(a) - 1) & ~((size_t)(a) - 1))
  ------------------
 1048|  3.87k|      if (crc_offset + sizeof (crc) > shdr->sh_size)
  ------------------
  |  Branch (1048:11): [True: 0, False: 3.87k]
  ------------------
 1049|      0|	{
 1050|      0|	  Debug (1, "Malformed .gnu_debuglink section in %s\n", file);
 1051|      0|	  return 0;
 1052|      0|	}
 1053|  3.87k|      memcpy (&crc, linkbuf + crc_offset, sizeof (crc));
 1054|       |
 1055|  3.87k|      ei->image = NULL;
 1056|       |
 1057|  3.87k|      Debug(1, "Found debuglink section, following %s\n", linkbuf);
 1058|       |
 1059|  3.87k|      p = strrchr (file, '/');
 1060|  3.87k|      if (p != NULL)
  ------------------
  |  Branch (1060:11): [True: 3.87k, False: 0]
  ------------------
 1061|  3.87k|	{
 1062|  3.87k|	  memcpy (basedir, file, p - file);
 1063|  3.87k|	  basedir[p - file] = '\0';
 1064|  3.87k|	}
 1065|      0|      else
 1066|      0|	basedir[0] = 0;
 1067|       |
 1068|  3.87k|      strcpy (newname, basedir);
 1069|  3.87k|      strcat (newname, "/");
 1070|  3.87k|      strcat (newname, linkbuf);
 1071|  3.87k|      ret = elf_w (load_debuglink_file) (newname, ei, crc);
  ------------------
  |  |   45|  3.87k|# define elf_w(x)       _Uelf64_##x
  ------------------
 1072|       |
 1073|  3.87k|      if (ret == -1)
  ------------------
  |  Branch (1073:11): [True: 3.87k, False: 0]
  ------------------
 1074|  3.87k|	{
 1075|  3.87k|	  strcpy (newname, basedir);
 1076|  3.87k|	  strcat (newname, "/.debug/");
 1077|  3.87k|	  strcat (newname, linkbuf);
 1078|  3.87k|	  ret = elf_w (load_debuglink_file) (newname, ei, crc);
  ------------------
  |  |   45|  3.87k|# define elf_w(x)       _Uelf64_##x
  ------------------
 1079|  3.87k|	}
 1080|       |
 1081|  3.87k|      if (ret == -1 && is_local == 1)
  ------------------
  |  Branch (1081:11): [True: 3.87k, False: 0]
  |  Branch (1081:24): [True: 3.87k, False: 0]
  ------------------
 1082|  3.87k|	{
 1083|  3.87k|	  strcpy (newname, debugdir);
 1084|  3.87k|	  strcat (newname, basedir);
 1085|  3.87k|	  strcat (newname, "/");
 1086|  3.87k|	  strcat (newname, linkbuf);
 1087|  3.87k|	  ret = elf_w (load_debuglink_file) (newname, ei, crc);
  ------------------
  |  |   45|  3.87k|# define elf_w(x)       _Uelf64_##x
  ------------------
 1088|  3.87k|	}
 1089|       |
 1090|  3.87k|      if (ret == -1)
  ------------------
  |  Branch (1090:11): [True: 3.87k, False: 0]
  ------------------
 1091|  3.87k|        {
 1092|       |          /* No debuglink file found even though .gnu_debuglink existed */
 1093|  3.87k|          ei->image = prev_image;
 1094|  3.87k|          ei->size = prev_size;
 1095|       |
 1096|  3.87k|          return 0;
 1097|  3.87k|        }
 1098|      0|      else
 1099|      0|        {
 1100|      0|          mi_munmap (prev_image, prev_size);
 1101|      0|        }
 1102|       |
 1103|      0|      return ret;
 1104|  3.87k|    }
 1105|  3.87k|  }
 1106|       |
 1107|  27.1k|  return 0;
 1108|  31.0k|}
elf64.c:_Uelf64_get_load_offset:
  462|  31.0k|{
  463|  31.0k|  Elf_W (Addr) offset = 0;
  ------------------
  |  |   44|  31.0k|# define Elf_W(x)       Elf64_##x
  ------------------
  464|  31.0k|  Elf_W (Ehdr) *ehdr;
  ------------------
  |  |   44|  31.0k|# define Elf_W(x)       Elf64_##x
  ------------------
  465|  31.0k|  Elf_W (Phdr) *phdr;
  ------------------
  |  |   44|  31.0k|# define Elf_W(x)       Elf64_##x
  ------------------
  466|  31.0k|  int i;
  467|       |  // mapoff is obtained from mmap information, so it is always aligned on a page size.
  468|       |  // PT_LOAD program headers p_offset however is not guaranteed to be aligned on a
  469|       |  // page size, ld.lld generate libraries where this is not the case. So we must
  470|       |  // make sure we compare both values with the same alignment.
  471|  31.0k|  unsigned long pagesize_alignment_mask = ~(unw_page_size - 1UL);
  472|       |
  473|  31.0k|  ehdr = ei->image;
  474|  31.0k|  phdr = (Elf_W (Phdr) *) ((char *) ei->image + ehdr->e_phoff);
  475|       |
  476|   124k|  for (i = 0; i < ehdr->e_phnum; ++i)
  ------------------
  |  Branch (476:15): [True: 124k, False: 0]
  ------------------
  477|   124k|    if (phdr[i].p_type == PT_LOAD && phdr[i].p_flags & PF_X)
  ------------------
  |  Branch (477:9): [True: 62.0k, False: 62.0k]
  |  Branch (477:38): [True: 31.0k, False: 31.0k]
  ------------------
  478|  31.0k|      {
  479|  31.0k|        offset = segbase - phdr[i].p_vaddr + (phdr[i].p_offset & (~pagesize_alignment_mask));
  480|  31.0k|        break;
  481|  31.0k|      }
  482|       |
  483|  31.0k|  return offset;
  484|  31.0k|}
elf64.c:_Uelf64_lookup_symbol:
  389|  31.0k|{
  390|  31.0k|  struct symbol_lookup_context context =
  391|  31.0k|    {
  392|  31.0k|      .as = as,
  393|  31.0k|      .ip = ip,
  394|  31.0k|      .ei = ei,
  395|  31.0k|      .load_offset = load_offset,
  396|  31.0k|      .min_dist = min_dist,
  397|  31.0k|      .arg = arg,
  398|  31.0k|    };
  399|  31.0k|  struct symbol_callback_data data =
  400|  31.0k|    {
  401|  31.0k|      .buf = buf, 
  402|  31.0k|      .buf_len = buf_len,
  403|  31.0k|    };
  404|  31.0k|  return elf_w (lookup_symbol_closeness) (as,
  ------------------
  |  |   45|  31.0k|# define elf_w(x)       _Uelf64_##x
  ------------------
  405|  31.0k|                                          &context,
  406|  31.0k|                                          elf_w (lookup_symbol_callback),
  ------------------
  |  |   45|  31.0k|# define elf_w(x)       _Uelf64_##x
  ------------------
  407|  31.0k|                                          &data);
  408|  31.0k|}
elf64.c:_Uelf64_lookup_symbol_closeness:
  255|  31.0k|{
  256|  31.0k|  struct elf_image *ei = context->ei;
  257|  31.0k|  Elf_W (Addr) load_offset = context->load_offset;
  ------------------
  |  |   44|  31.0k|# define Elf_W(x)       Elf64_##x
  ------------------
  258|  31.0k|  size_t syment_size;
  259|  31.0k|  Elf_W (Ehdr) *ehdr = ei->image;
  ------------------
  |  |   44|  31.0k|# define Elf_W(x)       Elf64_##x
  ------------------
  260|  31.0k|  Elf_W (Sym) *sym, *symtab, *symtab_end;
  ------------------
  |  |   44|  31.0k|# define Elf_W(x)       Elf64_##x
  ------------------
  261|  31.0k|  Elf_W (Shdr) *shdr;
  ------------------
  |  |   44|  31.0k|# define Elf_W(x)       Elf64_##x
  ------------------
  262|  31.0k|  Elf_W (Addr) val;
  ------------------
  |  |   44|  31.0k|# define Elf_W(x)       Elf64_##x
  ------------------
  263|  31.0k|  int i, ret = -UNW_ENOINFO;
  264|  31.0k|  char *strtab;
  265|       |
  266|  31.0k|  if (!elf_w (valid_object) (ei))
  ------------------
  |  |   45|  31.0k|# define elf_w(x)       _Uelf64_##x
  ------------------
  |  Branch (266:7): [True: 0, False: 31.0k]
  ------------------
  267|      0|    return -UNW_ENOINFO;
  268|       |
  269|  31.0k|  shdr = elf_w (section_table) (ei);
  ------------------
  |  |   45|  31.0k|# define elf_w(x)       _Uelf64_##x
  ------------------
  270|  31.0k|  if (!shdr)
  ------------------
  |  Branch (270:7): [True: 0, False: 31.0k]
  ------------------
  271|      0|    return -UNW_ENOINFO;
  272|       |
  273|  1.41M|  for (i = 0; i < ehdr->e_shnum && ret == -UNW_ENOINFO; ++i)
  ------------------
  |  Branch (273:15): [True: 1.41M, False: 0]
  |  Branch (273:36): [True: 1.37M, False: 31.0k]
  ------------------
  274|  1.37M|    {
  275|  1.37M|      switch (shdr->sh_type)
  276|  1.37M|        {
  277|  27.1k|        case SHT_SYMTAB:
  ------------------
  |  Branch (277:9): [True: 27.1k, False: 1.35M]
  ------------------
  278|  58.1k|        case SHT_DYNSYM:
  ------------------
  |  Branch (278:9): [True: 31.0k, False: 1.34M]
  ------------------
  279|  58.1k|          symtab = (Elf_W (Sym) *) ((char *) ei->image + shdr->sh_offset);
  280|  58.1k|          symtab_end = (Elf_W (Sym) *) ((char *) symtab + shdr->sh_size);
  281|  58.1k|          syment_size = shdr->sh_entsize;
  282|       |
  283|  58.1k|          strtab = elf_w (string_table) (ei, shdr->sh_link);
  ------------------
  |  |   45|  58.1k|# define elf_w(x)       _Uelf64_##x
  ------------------
  284|  58.1k|          if (!strtab)
  ------------------
  |  Branch (284:15): [True: 0, False: 58.1k]
  ------------------
  285|      0|            break;
  286|       |
  287|  58.1k|          Debug (16, "symtab=0x%lx[%d]\n",
  288|  58.1k|                 (long) shdr->sh_offset, shdr->sh_type);
  289|       |
  290|  58.1k|          for (sym = symtab;
  291|   123M|               sym < symtab_end;
  ------------------
  |  Branch (291:16): [True: 123M, False: 27.1k]
  ------------------
  292|   123M|               sym = (Elf_W (Sym) *) ((char *) sym + syment_size))
  293|   123M|            {
  294|   123M|              if (ELF_W (ST_TYPE) (sym->st_info) == STT_FUNC
  ------------------
  |  |   43|   123M|# define ELF_W(x)       ELF64_##x
  ------------------
  |  Branch (294:19): [True: 82.3M, False: 40.8M]
  ------------------
  295|  82.3M|                  && sym->st_shndx != SHN_UNDEF)
  ------------------
  |  Branch (295:22): [True: 75.2M, False: 7.17M]
  ------------------
  296|  75.2M|                {
  297|  75.2M|                  val = sym->st_value;
  298|  75.2M|                  if (sym->st_shndx != SHN_ABS)
  ------------------
  |  Branch (298:23): [True: 75.2M, False: 0]
  ------------------
  299|  75.2M|                    val += load_offset;
  300|  75.2M|                  if (tdep_get_func_addr (as, val, &val, context->arg) < 0)
  ------------------
  |  |  431|  75.2M|# define tdep_get_func_addr(as,addr,v,arg)       (*(v) = addr, 0)
  ------------------
  |  Branch (300:23): [True: 0, False: 75.2M]
  ------------------
  301|      0|                    continue;
  302|  75.2M|                  Debug (16, "0x%016lx info=0x%02x %s\n",
  303|  75.2M|                         (long) val, sym->st_info, strtab + sym->st_name);
  304|       |
  305|  75.2M|                  struct symbol_info syminfo =
  306|  75.2M|                    {
  307|  75.2M|                      .strtab   = strtab,
  308|  75.2M|                      .sym      = sym,
  309|  75.2M|                      .start_ip = val
  310|  75.2M|                    };
  311|  75.2M|                  ret = symtab_lookup (context, &syminfo, data);
  312|       |
  313|       |                  /* Keep going if the IP is not found in this symtab entry. */
  314|  75.2M|                  if (ret == -UNW_ENOINFO)
  ------------------
  |  Branch (314:23): [True: 75.1M, False: 31.0k]
  ------------------
  315|  75.1M|                    {
  316|  75.1M|                      continue;
  317|  75.1M|                    }
  318|       |
  319|  31.0k|                  break;
  320|  75.2M|                }
  321|   123M|            }
  322|  58.1k|          break;
  323|       |
  324|  1.32M|        default:
  ------------------
  |  Branch (324:9): [True: 1.32M, False: 58.1k]
  ------------------
  325|  1.32M|          break;
  326|  1.37M|        }
  327|  1.37M|      shdr = (Elf_W (Shdr) *) (((char *) shdr) + ehdr->e_shentsize);
  328|  1.37M|    }
  329|       |
  330|       |  /* If it wasn't found in the ELF symtab, check the synamic symtab. */
  331|  31.0k|  if (ret == -UNW_ENOINFO)
  ------------------
  |  Branch (331:7): [True: 0, False: 31.0k]
  ------------------
  332|      0|    ret = elf_w (lookup_symbol_from_dynamic) (as, context, symtab_lookup, data);
  ------------------
  |  |   45|      0|# define elf_w(x)       _Uelf64_##x
  ------------------
  333|       |
  334|  31.0k|  return ret;
  335|  31.0k|}
elf64.c:_Uelf64_lookup_symbol_callback:
  351|  75.2M|{
  352|  75.2M|  struct symbol_callback_data *d = data;
  353|  75.2M|  int ret = -UNW_ENOINFO;
  354|       |
  355|  75.2M|  if (context->ip >= syminfo->start_ip &&
  ------------------
  |  Branch (355:7): [True: 26.7M, False: 48.4M]
  ------------------
  356|  26.7M|      context->ip < (syminfo->start_ip + syminfo->sym->st_size))
  ------------------
  |  Branch (356:7): [True: 31.0k, False: 26.7M]
  ------------------
  357|  31.0k|    {
  358|  31.0k|      if ((Elf_W (Addr)) (context->ip - syminfo->start_ip) < *(context->min_dist))
  ------------------
  |  Branch (358:11): [True: 31.0k, False: 0]
  ------------------
  359|  31.0k|        {
  360|  31.0k|          *(context->min_dist) = (Elf_W (Addr)) (context->ip - syminfo->start_ip);
  361|  31.0k|          char const* const sym_name     = syminfo->strtab + syminfo->sym->st_name;
  362|  31.0k|          size_t            sym_name_len = strlen(sym_name);
  363|  31.0k|          Debug (1, "candidate sym: %s@%#010lx\n", sym_name, syminfo->start_ip);
  364|  31.0k|          if (sym_name_len >= d->buf_len)
  ------------------
  |  Branch (364:15): [True: 0, False: 31.0k]
  ------------------
  365|      0|            {
  366|      0|              Debug (1, "symbol length %zu exceeds buffer of length %zu\n",
  367|      0|                     sym_name_len+1, d->buf_len);
  368|      0|              sym_name_len = d->buf_len - 1; /* adjust for null terminator */
  369|      0|              ret = -UNW_ENOMEM; /* indicate truncation of symbol name */
  370|      0|            }
  371|  31.0k|          else
  372|  31.0k|            {
  373|  31.0k|              ret = UNW_ESUCCESS;
  374|  31.0k|            }
  375|  31.0k|          memcpy(d->buf, sym_name, sym_name_len);
  376|  31.0k|          d->buf[sym_name_len] = 0; /* null terminate */
  377|  31.0k|        }
  378|  31.0k|    }
  379|       |
  380|  75.2M|  return ret;
  381|  75.2M|}
elf64.c:_Uelf64_extract_minidebuginfo:
  633|  31.0k|{
  634|  31.0k|  return 0;
  635|  31.0k|}
elf64.c:_Uelf64_section_table:
   86|  62.0k|{
   87|  62.0k|  Elf_W (Ehdr) *ehdr = ei->image;
  ------------------
  |  |   44|  62.0k|# define Elf_W(x)       Elf64_##x
  ------------------
   88|  62.0k|  Elf_W (Off) soff;
  ------------------
  |  |   44|  62.0k|# define Elf_W(x)       Elf64_##x
  ------------------
   89|  62.0k|  size_t table_size;
   90|       |
   91|  62.0k|  soff = ehdr->e_shoff;
   92|  62.0k|  table_size = (size_t) ehdr->e_shnum * ehdr->e_shentsize;
   93|  62.0k|  if (soff > ei->size || table_size > ei->size - (size_t) soff)
  ------------------
  |  Branch (93:7): [True: 0, False: 62.0k]
  |  Branch (93:26): [True: 0, False: 62.0k]
  ------------------
   94|      0|    {
   95|      0|      Debug (1, "section table outside of image? (%lu + %zu > %zu)\n",
   96|      0|             (unsigned long) soff, table_size, ei->size);
   97|      0|      return NULL;
   98|      0|    }
   99|       |
  100|  62.0k|  return (Elf_W (Shdr) *) ((char *) ei->image + soff);
  101|  62.0k|}
elf64.c:_Uelf64_string_table:
  105|  89.1k|{
  106|  89.1k|  Elf_W (Ehdr) *ehdr = ei->image;
  ------------------
  |  |   44|  89.1k|# define Elf_W(x)       Elf64_##x
  ------------------
  107|  89.1k|  Elf_W (Off) soff, str_soff;
  ------------------
  |  |   44|  89.1k|# define Elf_W(x)       Elf64_##x
  ------------------
  108|  89.1k|  Elf_W (Shdr) *str_shdr;
  ------------------
  |  |   44|  89.1k|# define Elf_W(x)       Elf64_##x
  ------------------
  109|       |
  110|       |  /* this offset is assumed to be OK */
  111|  89.1k|  soff = ehdr->e_shoff;
  112|       |
  113|  89.1k|  str_soff = soff + (section * ehdr->e_shentsize);
  114|  89.1k|  if (str_soff + ehdr->e_shentsize > ei->size)
  ------------------
  |  Branch (114:7): [True: 0, False: 89.1k]
  ------------------
  115|      0|    {
  116|      0|      Debug (1, "string shdr table outside of image? (%lu > %lu)\n",
  117|      0|             (unsigned long) (str_soff + ehdr->e_shentsize),
  118|      0|             (unsigned long) ei->size);
  119|      0|      return NULL;
  120|      0|    }
  121|  89.1k|  str_shdr = (Elf_W (Shdr) *) ((char *) ei->image + str_soff);
  122|       |
  123|  89.1k|  if (str_shdr->sh_offset + str_shdr->sh_size > ei->size)
  ------------------
  |  Branch (123:7): [True: 0, False: 89.1k]
  ------------------
  124|      0|    {
  125|      0|      Debug (1, "string table outside of image? (%lu > %lu)\n",
  126|      0|             (unsigned long) (str_shdr->sh_offset + str_shdr->sh_size),
  127|      0|             (unsigned long) ei->size);
  128|      0|      return NULL;
  129|      0|    }
  130|       |
  131|  89.1k|  Debug (16, "strtab=0x%lx\n", (long) str_shdr->sh_offset);
  132|  89.1k|  return ei->image + str_shdr->sh_offset;
  133|  89.1k|}
elf64.c:_Uelf64_find_build_id_path:
  842|  31.0k|{
  843|       |/*
  844|       | * build-id is only available on GNU plaforms. So on non-GNU platforms this
  845|       | * function just returns fail (-1).
  846|       | */
  847|  31.0k|#if defined(ELF_NOTE_GNU) && defined(NT_GNU_BUILD_ID)
  848|  31.0k|  const Elf_W (Ehdr) *ehdr = ei->image;
  849|  31.0k|  const Elf_W (Phdr) *phdr;
  850|  31.0k|  unsigned i;
  851|       |
  852|  31.0k|  if (!elf_w (valid_object) (ei))
  ------------------
  |  |   45|  31.0k|# define elf_w(x)       _Uelf64_##x
  ------------------
  |  Branch (852:7): [True: 0, False: 31.0k]
  ------------------
  853|      0|    return -1;
  854|       |
  855|  31.0k|  phdr = (Elf_W (Phdr) *) ((uint8_t *) ehdr + ehdr->e_phoff);
  856|       |
  857|   387k|  for (i = 0; i < ehdr->e_phnum; ++i, phdr = (const Elf_W (Phdr) *) (((const uint8_t *) phdr) + ehdr->e_phentsize))
  ------------------
  |  Branch (857:15): [True: 360k, False: 27.1k]
  ------------------
  858|   360k|    {
  859|   360k|      const uint8_t *notes;
  860|   360k|      const uint8_t *notes_end;
  861|       |
  862|       |      /* The build-id is in a note section */
  863|   360k|      if (phdr->p_type != PT_NOTE)
  ------------------
  |  Branch (863:11): [True: 325k, False: 34.8k]
  ------------------
  864|   325k|        continue;
  865|       |
  866|  34.8k|      notes = elf_w (get_program_segment) (ei, phdr, &notes_end);
  ------------------
  |  |   45|  34.8k|# define elf_w(x)       _Uelf64_##x
  ------------------
  867|       |
  868|  65.8k|      while(notes < notes_end)
  ------------------
  |  Branch (868:13): [True: 34.8k, False: 31.0k]
  ------------------
  869|  34.8k|        {
  870|  34.8k|          const char prefix[] = "/usr/lib/debug/.build-id/";
  871|       |
  872|       |          /* See "man 5 elf" for notes about alignment in Nhdr */
  873|  34.8k|          const Elf_W(Nhdr) *nhdr = (const Elf_W(Nhdr) *) notes;
  874|  34.8k|          const Elf_W(Word) namesz = nhdr->n_namesz;
  875|  34.8k|          const Elf_W(Word) descsz = nhdr->n_descsz;
  876|  34.8k|          const Elf_W(Word) nameasz = UNW_ALIGN(namesz, 4); /* Aligned size */
  ------------------
  |  |  439|  34.8k|#define UNW_ALIGN(x,a) (((size_t)(x) + (size_t)(a) - 1) & ~((size_t)(a) - 1))
  ------------------
  877|  34.8k|          const char *name = (const char *) (nhdr + 1);
  878|  34.8k|          const uint8_t *desc = (const uint8_t *) name + nameasz;
  879|  34.8k|          unsigned j;
  880|       |
  881|  34.8k|          notes += sizeof(*nhdr) + nameasz + UNW_ALIGN(descsz, 4);
  ------------------
  |  |  439|  34.8k|#define UNW_ALIGN(x,a) (((size_t)(x) + (size_t)(a) - 1) & ~((size_t)(a) - 1))
  ------------------
  882|       |
  883|  34.8k|          if ((namesz != sizeof(ELF_NOTE_GNU)) ||  /* Spec says must be "GNU" with a NULL */
  ------------------
  |  Branch (883:15): [True: 0, False: 34.8k]
  ------------------
  884|  34.8k|              (nhdr->n_type != NT_GNU_BUILD_ID) || /* Spec says must be NT_GNU_BUILD_ID   */
  ------------------
  |  Branch (884:15): [True: 31.0k, False: 3.87k]
  ------------------
  885|  3.87k|              (strcmp(name, ELF_NOTE_GNU) != 0))   /* Must be "GNU" with NULL termination */
  ------------------
  |  Branch (885:15): [True: 0, False: 3.87k]
  ------------------
  886|  31.0k|            continue;
  887|       |
  888|       |          /* Validate that we have enough space */
  889|  3.87k|          if (path_len < (sizeof(prefix) +     /* Path prefix inc NULL */
  ------------------
  |  Branch (889:15): [True: 0, False: 3.87k]
  ------------------
  890|  3.87k|                          2 +                  /* Subdirectory         */
  891|  3.87k|                          1 +                  /* Directory separator  */
  892|  3.87k|                          (2 * (descsz - 1)) + /* Leaf filename        */
  893|  3.87k|                          6))                  /* .debug extension     */
  894|      0|            return -1;
  895|       |
  896|  3.87k|          memcpy(path, prefix, sizeof(prefix));
  897|       |
  898|  3.87k|          path = elf_w (add_hex_byte) (path + sizeof(prefix) - 1, *desc);
  ------------------
  |  |   45|  3.87k|# define elf_w(x)       _Uelf64_##x
  ------------------
  899|  3.87k|          *path++ = '/';
  900|       |
  901|  77.5k|          for(j = 1, ++desc; j < descsz; ++j, ++desc)
  ------------------
  |  Branch (901:30): [True: 73.6k, False: 3.87k]
  ------------------
  902|  73.6k|            path = elf_w (add_hex_byte) (path, *desc);
  ------------------
  |  |   45|  73.6k|# define elf_w(x)       _Uelf64_##x
  ------------------
  903|       |
  904|  3.87k|          strcat(path, ".debug");
  905|       |
  906|  3.87k|          return 0;
  907|  3.87k|        }
  908|  34.8k|    }
  909|  27.1k|#endif /* defined(ELF_NOTE_GNU) */
  910|       |
  911|  27.1k|  return -1;
  912|  31.0k|}
elf64.c:_Uelf64_add_hex_byte:
  829|  77.5k|{
  830|  77.5k|  const char hex[] = "0123456789abcdef";
  831|       |
  832|  77.5k|  *str++ = hex[byte >> 4];
  833|  77.5k|  *str++ = hex[byte & 0xf];
  834|  77.5k|  *str = 0;
  835|       |
  836|  77.5k|  return str;
  837|  77.5k|}
elf64.c:_Uelf64_load_debuglink_file:
  955|  11.6k|{
  956|  11.6k|  uint32_t file_crc;
  957|       |
  958|  11.6k|  if (elf_w (load_debuginfo) (file, ei, -1) != 0)
  ------------------
  |  |   45|  11.6k|# define elf_w(x)       _Uelf64_##x
  ------------------
  |  Branch (958:7): [True: 11.6k, False: 0]
  ------------------
  959|  11.6k|    {
  960|  11.6k|      ei->image = NULL;
  961|  11.6k|      return -1;
  962|  11.6k|    }
  963|       |
  964|      0|  file_crc = debuglink_crc32 (ei->image, ei->size);
  965|      0|  if (file_crc != crc)
  ------------------
  |  Branch (965:7): [True: 0, False: 0]
  ------------------
  966|      0|    {
  967|      0|      Debug (1, "CRC mismatch for debug file %s (%08x, expected %08x)\n",
  968|      0|             file, file_crc, crc);
  969|      0|      mi_munmap (ei->image, ei->size);
  970|      0|      ei->image = NULL;
  971|      0|      return -1;
  972|      0|    }
  973|       |
  974|      0|  return 0;
  975|      0|}

elf64.c:_Uelf64_get_program_segment:
  121|  34.8k|{
  122|  34.8k|  const uint8_t* result = NULL;
  123|       |
  124|  34.8k|  if (end)
  ------------------
  |  Branch (124:7): [True: 34.8k, False: 0]
  ------------------
  125|  34.8k|    *end = NULL;
  126|       |
  127|  34.8k|  if (!ei || !ei->image || !phdr || phdr->p_filesz == 0 || phdr->p_offset > ei->size)
  ------------------
  |  Branch (127:7): [True: 0, False: 34.8k]
  |  Branch (127:14): [True: 0, False: 34.8k]
  |  Branch (127:28): [True: 0, False: 34.8k]
  |  Branch (127:37): [True: 0, False: 34.8k]
  |  Branch (127:60): [True: 0, False: 34.8k]
  ------------------
  128|      0|    return NULL;
  129|       |
  130|  34.8k|  result = ((const uint8_t*)ei->image) + phdr->p_offset;
  131|  34.8k|  if (end)
  ------------------
  |  Branch (131:7): [True: 34.8k, False: 0]
  ------------------
  132|  34.8k|    *end = result + phdr->p_filesz;
  133|       |
  134|  34.8k|  return result;
  135|  34.8k|}
elf64.c:_Uelf64_valid_object:
   77|  93.0k|{
   78|  93.0k|  if (ei->size <= EI_VERSION)
  ------------------
  |  Branch (78:7): [True: 0, False: 93.0k]
  ------------------
   79|      0|    return 0;
   80|       |
   81|  93.0k|  return (memcmp (ei->image, ELFMAG, SELFMAG) == 0
  ------------------
  |  Branch (81:11): [True: 93.0k, False: 0]
  ------------------
   82|  93.0k|          && ((uint8_t *) ei->image)[EI_CLASS] == UNW_ELF_CLASS
  ------------------
  |  |    5|  93.0k|# define UNW_ELF_CLASS UNW_ELFCLASS64
  |  |  ------------------
  |  |  |  |   82|   186k|# define UNW_ELFCLASS64 ELFCLASS64
  |  |  ------------------
  ------------------
  |  Branch (82:14): [True: 93.0k, False: 0]
  ------------------
   83|  93.0k|          && ((uint8_t *) ei->image)[EI_VERSION] != EV_NONE
  ------------------
  |  Branch (83:14): [True: 93.0k, False: 0]
  ------------------
   84|  93.0k|          && ((uint8_t *) ei->image)[EI_VERSION] <= EV_CURRENT);
  ------------------
  |  Branch (84:14): [True: 93.0k, False: 0]
  ------------------
   85|  93.0k|}
elf64.c:elf_map_image:
   89|  15.5k|{
   90|  15.5k|  struct stat stat;
   91|  15.5k|  int fd;
   92|       |
   93|  15.5k|  fd = open (path, O_RDONLY);
   94|  15.5k|  if (fd < 0)
  ------------------
  |  Branch (94:7): [True: 15.5k, False: 0]
  ------------------
   95|  15.5k|    return -1;
   96|       |
   97|      0|  if (fstat (fd, &stat) < 0)
  ------------------
  |  Branch (97:7): [True: 0, False: 0]
  ------------------
   98|      0|    {
   99|      0|      close (fd);
  100|      0|      return -1;
  101|      0|    }
  102|       |
  103|      0|  ei->size = stat.st_size;
  104|      0|  ei->image = mi_mmap (NULL, ei->size, PROT_READ, MAP_PRIVATE, fd, 0);
  105|      0|  close (fd);
  106|      0|  if (ei->image == MAP_FAILED)
  ------------------
  |  Branch (106:7): [True: 0, False: 0]
  ------------------
  107|      0|    return -1;
  108|       |
  109|      0|  if (!elf_w (valid_object) (ei))
  ------------------
  |  |   45|      0|# define elf_w(x)       _Uelf64_##x
  ------------------
  |  Branch (109:7): [True: 0, False: 0]
  ------------------
  110|      0|  {
  111|      0|    mi_munmap(ei->image, ei->size);
  112|      0|    ei->image = NULL;
  113|      0|    return -1;
  114|      0|  }
  115|       |
  116|      0|  return 0;
  117|      0|}
os-linux.c:elf_map_image:
   89|  31.0k|{
   90|  31.0k|  struct stat stat;
   91|  31.0k|  int fd;
   92|       |
   93|  31.0k|  fd = open (path, O_RDONLY);
   94|  31.0k|  if (fd < 0)
  ------------------
  |  Branch (94:7): [True: 0, False: 31.0k]
  ------------------
   95|      0|    return -1;
   96|       |
   97|  31.0k|  if (fstat (fd, &stat) < 0)
  ------------------
  |  Branch (97:7): [True: 0, False: 31.0k]
  ------------------
   98|      0|    {
   99|      0|      close (fd);
  100|      0|      return -1;
  101|      0|    }
  102|       |
  103|  31.0k|  ei->size = stat.st_size;
  104|  31.0k|  ei->image = mi_mmap (NULL, ei->size, PROT_READ, MAP_PRIVATE, fd, 0);
  105|  31.0k|  close (fd);
  106|  31.0k|  if (ei->image == MAP_FAILED)
  ------------------
  |  Branch (106:7): [True: 0, False: 31.0k]
  ------------------
  107|      0|    return -1;
  108|       |
  109|  31.0k|  if (!elf_w (valid_object) (ei))
  ------------------
  |  |   45|  31.0k|# define elf_w(x)       _Uelf64_##x
  ------------------
  |  Branch (109:7): [True: 0, False: 31.0k]
  ------------------
  110|      0|  {
  111|      0|    mi_munmap(ei->image, ei->size);
  112|      0|    ei->image = NULL;
  113|      0|    return -1;
  114|      0|  }
  115|       |
  116|  31.0k|  return 0;
  117|  31.0k|}
os-linux.c:_Uelf64_valid_object:
   77|  31.0k|{
   78|  31.0k|  if (ei->size <= EI_VERSION)
  ------------------
  |  Branch (78:7): [True: 0, False: 31.0k]
  ------------------
   79|      0|    return 0;
   80|       |
   81|  31.0k|  return (memcmp (ei->image, ELFMAG, SELFMAG) == 0
  ------------------
  |  Branch (81:11): [True: 31.0k, False: 0]
  ------------------
   82|  31.0k|          && ((uint8_t *) ei->image)[EI_CLASS] == UNW_ELF_CLASS
  ------------------
  |  |    5|  31.0k|# define UNW_ELF_CLASS UNW_ELFCLASS64
  |  |  ------------------
  |  |  |  |   82|  62.0k|# define UNW_ELFCLASS64 ELFCLASS64
  |  |  ------------------
  ------------------
  |  Branch (82:14): [True: 31.0k, False: 0]
  ------------------
   83|  31.0k|          && ((uint8_t *) ei->image)[EI_VERSION] != EV_NONE
  ------------------
  |  Branch (83:14): [True: 31.0k, False: 0]
  ------------------
   84|  31.0k|          && ((uint8_t *) ei->image)[EI_VERSION] <= EV_CURRENT);
  ------------------
  |  Branch (84:14): [True: 31.0k, False: 0]
  ------------------
   85|  31.0k|}

_UIx86_64_address_is_valid:
  250|   100k|{
  251|   100k|  if (len == 0)
  ------------------
  |  Branch (251:7): [True: 0, False: 100k]
  ------------------
  252|      0|    return true;
  253|       |
  254|       |  /*
  255|       |   * Find the starting address of the page containing the start of the range.
  256|       |   */
  257|   100k|  unw_word_t start_page_addr = unw_page_start (addr);
  258|       |
  259|       |  /*
  260|       |   * Bounds check on bottom of memory: first page is always deemed inaccessible.
  261|       |   * This is potentially incorrect on an embedded system, especially one running
  262|       |   * on bare metal with no VMM, but the check has always been here and no one
  263|       |   * has complained.
  264|       |   */
  265|   100k|  if (start_page_addr == 0)
  ------------------
  |  Branch (265:7): [True: 0, False: 100k]
  ------------------
  266|      0|    return false;
  267|       |
  268|       |  /*
  269|       |   * Bounds check on top of memory. Unsigned wraparound could be hazardous.
  270|       |   */
  271|   100k|  if (addr > (UNW_WORD_MAX - len - unw_page_size))
  ------------------
  |  |   61|   100k|#define UNW_WORD_MAX UINT64_MAX
  ------------------
  |  Branch (271:7): [True: 0, False: 100k]
  ------------------
  272|      0|    return false;
  273|       |
  274|       |  /*
  275|       |   * Find the starting address of the page containing the end of the range.
  276|       |   */
  277|   100k|  unw_word_t end_page_addr = unw_page_start (addr + (len - 1)) + unw_page_size;
  278|       |
  279|       |  /*
  280|       |   * Step through each page and check if the first address in each is readable.
  281|       |   * The first non-readable page encountered means none of them in the given
  282|       |   * range can be considered readable.
  283|       |   */
  284|   100k|  for (unw_word_t page_addr = start_page_addr;
  285|   200k|       page_addr < end_page_addr;
  ------------------
  |  Branch (285:8): [True: 100k, False: 100k]
  ------------------
  286|   100k|       page_addr += unw_page_size)
  287|   100k|    {
  288|   100k|      if (!_is_cached_valid_mem(page_addr))
  ------------------
  |  Branch (288:11): [True: 2, False: 100k]
  ------------------
  289|      2|        {
  290|       |          /* Check 'addr' in first page to avoid uninitialized memory access. */
  291|      2|          if (!_write_validate ((page_addr == start_page_addr) ? addr : page_addr))
  ------------------
  |  Branch (291:15): [True: 0, False: 2]
  |  Branch (291:33): [True: 2, False: 0]
  ------------------
  292|      0|            {
  293|      0|              Debug(1, "returning false\n");
  294|      0|              return false;
  295|      0|            }
  296|      2|          _cache_valid_mem(page_addr);
  297|      2|        }
  298|   100k|    }
  299|       |
  300|   100k|  return true;
  301|   100k|}
Laddress_validator.c:_is_cached_valid_mem:
  195|   100k|{
  196|   100k|  int i;
  197|   273k|  for (i = 0; i < NLGA; i++)
  ------------------
  |  Branch (197:15): [True: 273k, False: 2]
  ------------------
  198|   273k|    {
  199|   273k|      if (page_addr == atomic_load(&last_good_addr[i]))
  ------------------
  |  Branch (199:11): [True: 100k, False: 173k]
  ------------------
  200|   100k|        return true;
  201|   273k|    }
  202|      2|  return false;
  203|   100k|}
Laddress_validator.c:_write_validate:
  101|      2|{
  102|      2|  int ret = -1;
  103|      2|  ssize_t bytes = 0;
  104|       |
  105|      2|  if (unlikely (_mem_validate_pipe[0] == -1))
  ------------------
  |  |   68|      2|#  define unlikely(x)   __builtin_expect ((x), 0)
  |  |  ------------------
  |  |  |  Branch (68:25): [True: 1, False: 1]
  |  |  ------------------
  ------------------
  106|      1|    {
  107|      1|      if (_open_pipe () != 0)
  ------------------
  |  Branch (107:11): [True: 0, False: 1]
  ------------------
  108|      0|        {
  109|      0|          return false;
  110|      0|        }
  111|      1|    }
  112|       |
  113|      2|  do
  114|      2|    {
  115|      2|      char buf;
  116|      2|      bytes = read (_mem_validate_pipe[0], &buf, 1);
  117|      2|    }
  118|      2|  while ( errno == EINTR );
  ------------------
  |  Branch (118:11): [True: 0, False: 2]
  ------------------
  119|       |
  120|      2|  if (!(bytes > 0 || errno == EAGAIN || errno == EWOULDBLOCK))
  ------------------
  |  Branch (120:9): [True: 1, False: 1]
  |  Branch (120:22): [True: 1, False: 0]
  |  Branch (120:41): [True: 0, False: 0]
  ------------------
  121|      0|    {
  122|       |      // re-open closed pipe
  123|      0|      if (_open_pipe () != 0)
  ------------------
  |  Branch (123:11): [True: 0, False: 0]
  ------------------
  124|      0|        {
  125|      0|          return false;
  126|      0|        }
  127|      0|    }
  128|       |
  129|      2|  do
  130|      2|    {
  131|      2|#ifdef HAVE_SYS_SYSCALL_H
  132|       |      /* use syscall insteadof write() so that ASAN does not complain */
  133|      2|      ret = syscall (SYS_write, _mem_validate_pipe[1], addr, 1);
  134|       |#else
  135|       |      ret = write (_mem_validate_pipe[1], (void *)addr, 1);
  136|       |#endif
  137|      2|    }
  138|      2|  while ( errno == EINTR );
  ------------------
  |  Branch (138:11): [True: 0, False: 2]
  ------------------
  139|       |
  140|      2|  return ret > 0;
  141|      2|}
Laddress_validator.c:_open_pipe:
   78|      1|{
   79|      1|  if (_mem_validate_pipe[0] != -1)
  ------------------
  |  Branch (79:7): [True: 0, False: 1]
  ------------------
   80|      0|    close (_mem_validate_pipe[0]);
   81|      1|  if (_mem_validate_pipe[1] != -1)
  ------------------
  |  Branch (81:7): [True: 0, False: 1]
  ------------------
   82|      0|    close (_mem_validate_pipe[1]);
   83|       |
   84|      1|  return _do_pipe2 (_mem_validate_pipe);
   85|      1|}
Laddress_validator.c:_do_pipe2:
   45|      1|{
   46|      1|  return pipe2 (pipefd, O_CLOEXEC | O_NONBLOCK);
   47|      1|}
Laddress_validator.c:_cache_valid_mem:
  215|      2|{
  216|      2|  unw_word_t zero = 0;
  217|      2|  int victim = atomic_load(&lga_victim);
  218|      4|  for (int i = 0; i < NLGA; i++)
  ------------------
  |  Branch (218:19): [True: 4, False: 0]
  ------------------
  219|      4|    {
  220|      4|      if (atomic_compare_exchange_strong(&last_good_addr[victim], &zero, page_addr))
  ------------------
  |  Branch (220:11): [True: 2, False: 2]
  ------------------
  221|      2|        {
  222|      2|          return;
  223|      2|        }
  224|      2|      victim = (victim + 1) % NLGA;
  225|      2|    }
  226|       |
  227|       |  /* All slots full. Evict the victim. */
  228|      2|  atomic_store(&last_good_addr[victim], page_addr);
  229|      0|  victim = (victim + 1) % NLGA;
  230|       |  atomic_store(&lga_victim, victim);
  231|      0|}

_ULx86_64_Ifind_dynamic_proc_info:
   90|  31.0k|{
   91|  31.0k|  if (as == unw_local_addr_space)
  ------------------
  |  |  274|  31.0k|#define unw_local_addr_space		UNW_OBJ(local_addr_space)
  |  |  ------------------
  |  |  |  |   48|  31.0k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  31.0k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  31.0k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (91:7): [True: 31.0k, False: 0]
  ------------------
   92|  31.0k|    return local_find_proc_info (as, ip, pi, need_unwind_info, arg);
   93|      0|  else
   94|      0|    return remote_find_proc_info (as, ip, pi, need_unwind_info, arg);
   95|  31.0k|}
Lfind_dynamic_proc_info.c:local_find_proc_info:
   42|  31.0k|{
   43|  31.0k|  unw_dyn_info_list_t *list;
   44|  31.0k|  unw_dyn_info_t *di;
   45|       |
   46|       |#ifndef UNW_LOCAL_ONLY
   47|       |# pragma weak _U_dyn_info_list_addr
   48|       |  if (!_U_dyn_info_list_addr)
   49|       |    return -UNW_ENOINFO;
   50|       |#endif
   51|       |
   52|       |  // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
   53|  31.0k|  list = (unw_dyn_info_list_t *) (uintptr_t) _U_dyn_info_list_addr ();
   54|  31.0k|  for (di = list->first; di; di = di->next)
  ------------------
  |  Branch (54:26): [True: 0, False: 31.0k]
  ------------------
   55|      0|    if (ip >= di->start_ip && ip < di->end_ip)
  ------------------
  |  Branch (55:9): [True: 0, False: 0]
  |  Branch (55:31): [True: 0, False: 0]
  ------------------
   56|      0|      return unwi_extract_dynamic_proc_info (as, ip, pi, di, need_unwind_info,
  ------------------
  |  |  269|      0|#define unwi_extract_dynamic_proc_info  UNWI_OBJ(extract_dynamic_proc_info)
  |  |  ------------------
  |  |  |  |  173|      0|#define UNWI_OBJ(fn)      UNW_PASTE(UNW_PREFIX,UNW_PASTE(I,fn))
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      0|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   57|      0|                                             arg);
   58|  31.0k|  return -UNW_ENOINFO;
   59|  31.0k|}

_Ux86_64_get_accessors:
   34|  85.6k|{
   35|  85.6k|  if (!atomic_load(&tdep_init_done))
  ------------------
  |  Branch (35:7): [True: 0, False: 85.6k]
  ------------------
   36|      0|    tdep_init ();
  ------------------
  |  |  232|      0|#define tdep_init                       UNW_OBJ(init)
  |  |  ------------------
  |  |  |  |   48|      0|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      0|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   37|  85.6k|  return &as->acc;
   38|  85.6k|}

_ULx86_64_get_proc_name_by_ip:
   52|  31.0k|{
   53|  31.0k|  unw_accessors_t *a = unw_get_accessors_int (as);
  ------------------
  |  |  278|  31.0k|#define unw_get_accessors_int		UNW_ARCH_OBJ(get_accessors_int)
  |  |  ------------------
  |  |  |  |   49|  31.0k|#define UNW_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  31.0k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  31.0k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   54|  31.0k|  unw_proc_info_t pi;
   55|  31.0k|  int ret;
   56|       |
   57|  31.0k|  buf[0] = '\0';        /* always return a valid string, even if it's empty */
   58|       |
   59|  31.0k|  ret = unwi_find_dynamic_proc_info (as, ip, &pi, 1, arg);
  ------------------
  |  |  268|  31.0k|#define unwi_find_dynamic_proc_info     UNWI_OBJ(find_dynamic_proc_info)
  |  |  ------------------
  |  |  |  |  173|  31.0k|#define UNWI_OBJ(fn)      UNW_PASTE(UNW_PREFIX,UNW_PASTE(I,fn))
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  31.0k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  31.0k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   60|  31.0k|  if (ret == 0)
  ------------------
  |  Branch (60:7): [True: 0, False: 31.0k]
  ------------------
   61|      0|    {
   62|      0|      unw_dyn_info_t *di = pi.unwind_info;
   63|       |
   64|      0|      if (offp)
  ------------------
  |  Branch (64:11): [True: 0, False: 0]
  ------------------
   65|      0|        *offp = ip - pi.start_ip;
   66|       |
   67|      0|      switch (di->format)
   68|      0|        {
   69|      0|        case UNW_INFO_FORMAT_DYNAMIC:
  ------------------
  |  Branch (69:9): [True: 0, False: 0]
  ------------------
   70|      0|          ret = intern_string (as, a, di->u.pi.name_ptr, buf, buf_len, arg);
   71|      0|          break;
   72|       |
   73|      0|        case UNW_INFO_FORMAT_TABLE:
  ------------------
  |  Branch (73:9): [True: 0, False: 0]
  ------------------
   74|      0|        case UNW_INFO_FORMAT_REMOTE_TABLE:
  ------------------
  |  Branch (74:9): [True: 0, False: 0]
  ------------------
   75|       |          /* XXX should we create a fake name, e.g.: "tablenameN",
   76|       |             where N is the index of the function in the table??? */
   77|      0|          ret = -UNW_ENOINFO;
   78|      0|          break;
   79|       |
   80|      0|        default:
  ------------------
  |  Branch (80:9): [True: 0, False: 0]
  ------------------
   81|      0|          ret = -UNW_EINVAL;
   82|      0|          break;
   83|      0|        }
   84|      0|      unwi_put_dynamic_unwind_info (as, &pi, arg);
  ------------------
  |  |  270|      0|#define unwi_put_dynamic_unwind_info    UNWI_OBJ(put_dynamic_unwind_info)
  |  |  ------------------
  |  |  |  |  173|      0|#define UNWI_OBJ(fn)      UNW_PASTE(UNW_PREFIX,UNW_PASTE(I,fn))
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      0|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   85|      0|      return ret;
   86|      0|    }
   87|       |
   88|  31.0k|  if (ret != -UNW_ENOINFO)
  ------------------
  |  Branch (88:7): [True: 0, False: 31.0k]
  ------------------
   89|      0|    return ret;
   90|       |
   91|       |  /* not a dynamic procedure, try to lookup static procedure name: */
   92|       |
   93|  31.0k|  if (a->get_proc_name)
  ------------------
  |  Branch (93:7): [True: 31.0k, False: 0]
  ------------------
   94|  31.0k|    return (*a->get_proc_name) (as, ip, buf, buf_len, offp, arg);
   95|       |
   96|      0|  return -UNW_ENOINFO;
   97|  31.0k|}
_ULx86_64_get_proc_name:
  102|  31.0k|{
  103|  31.0k|  struct cursor *c = (struct cursor *) cursor;
  104|  31.0k|  unw_word_t ip;
  105|  31.0k|  int error;
  106|       |
  107|  31.0k|  ip = tdep_get_ip (c);
  ------------------
  |  |  270|  31.0k|#define tdep_get_ip(c)                  ((c)->dwarf.ip)
  ------------------
  108|  31.0k|#if !defined(__ia64__)
  109|  31.0k|  if (c->dwarf.use_prev_instr)
  ------------------
  |  Branch (109:7): [True: 31.0k, False: 0]
  ------------------
  110|  31.0k|    {
  111|       |#if defined(__arm__)
  112|       |      /* On arm, the least bit denotes thumb/arm mode, clear it. */
  113|       |      ip &= ~(unw_word_t)0x1;
  114|       |#endif
  115|  31.0k|      --ip;
  116|  31.0k|    }
  117|       |
  118|       |
  119|  31.0k|#endif
  120|  31.0k|  error = unw_get_proc_name_by_ip (tdep_get_as (c), ip, buf, buf_len, offp,
  ------------------
  |  |  297|  31.0k|#define unw_get_proc_name_by_ip		UNW_OBJ(get_proc_name_by_ip)
  |  |  ------------------
  |  |  |  |   48|  31.0k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  31.0k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  31.0k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                error = unw_get_proc_name_by_ip (tdep_get_as (c), ip, buf, buf_len, offp,
  ------------------
  |  |  268|  31.0k|#define tdep_get_as(c)                  ((c)->dwarf.as)
  ------------------
  121|  31.0k|                                   tdep_get_as_arg (c));
  ------------------
  |  |  269|  31.0k|#define tdep_get_as_arg(c)              ((c)->dwarf.as_arg)
  ------------------
  122|  31.0k|#if !defined(__ia64__)
  123|  31.0k|  if (c->dwarf.use_prev_instr && offp != NULL && error == 0)
  ------------------
  |  Branch (123:7): [True: 31.0k, False: 0]
  |  Branch (123:34): [True: 31.0k, False: 0]
  |  Branch (123:50): [True: 31.0k, False: 0]
  ------------------
  124|  31.0k|    *offp += 1;
  125|  31.0k|#endif
  126|  31.0k|  return error;
  127|  31.0k|}

_ULx86_64_get_reg:
   30|  66.6k|{
   31|  66.6k|  struct cursor *c = (struct cursor *) cursor;
   32|       |
   33|       |  // We can get the IP value directly without needing a lookup.
   34|  66.6k|  if (regnum == UNW_REG_IP)
  ------------------
  |  Branch (34:7): [True: 200, False: 66.4k]
  ------------------
   35|    200|    {
   36|    200|      *valp = tdep_get_ip (c);
  ------------------
  |  |  270|    200|#define tdep_get_ip(c)                  ((c)->dwarf.ip)
  ------------------
   37|    200|      return 0;
   38|    200|    }
   39|       |
   40|  66.4k|  return tdep_access_reg (c, regnum, valp, 0);
  ------------------
  |  |  239|  66.4k|#define tdep_access_reg                 UNW_OBJ(access_reg)
  |  |  ------------------
  |  |  |  |   48|  66.4k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  66.4k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  66.4k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   41|  66.6k|}

_U_dyn_info_list_addr:
   32|  31.0k|{
   33|  31.0k|  return (unw_word_t) (uintptr_t) &_U_dyn_info_list;
   34|  31.0k|}

_Ux86_64_flush_cache:
   31|      1|{
   32|      1|#if !UNW_TARGET_IA64
   33|      1|  struct unw_debug_frame_list *w = as->debug_frames;
   34|       |
   35|      1|  while (w)
  ------------------
  |  Branch (35:10): [True: 0, False: 1]
  ------------------
   36|      0|    {
   37|      0|      struct unw_debug_frame_list *n = w->next;
   38|       |
   39|      0|      if (w->index)
  ------------------
  |  Branch (39:11): [True: 0, False: 0]
  ------------------
   40|      0|        mi_munmap (w->index, w->index_size);
   41|       |
   42|      0|      mi_munmap (w->debug_frame, w->debug_frame_size);
   43|      0|      mi_munmap (w, sizeof (*w));
   44|      0|      w = n;
   45|      0|    }
   46|      1|  as->debug_frames = NULL;
   47|      1|#endif
   48|       |
   49|       |  /* clear dyn_info_list_addr cache: */
   50|      1|  as->dyn_info_list_addr = 0;
   51|       |
   52|       |  /* This lets us flush caches lazily.  The implementation currently
   53|       |     ignores the flush range arguments (lo-hi).  This is OK because
   54|       |     unw_flush_cache() is allowed to flush more than the requested
   55|       |     range. */
   56|       |  atomic_fetch_add (&as->cache_generation, 1);
   57|      1|}

_UIx86_64_mi_init:
   69|      1|{
   70|       |#if UNW_DEBUG
   71|       |  const char *str = getenv ("UNW_DEBUG_LEVEL");
   72|       |
   73|       |  if (str)
   74|       |    unwi_debug_level = atoi (str);
   75|       |
   76|       |  if (unwi_debug_level > 0)
   77|       |    {
   78|       |      setbuf (stdout, NULL);
   79|       |      setbuf (stderr, NULL);
   80|       |    }
   81|       |#endif
   82|      1|  unw_init_page_size();
   83|       |  assert(sizeof(struct cursor) <= sizeof(unw_cursor_t));
  ------------------
  |  Branch (83:3): [True: 0, Folded]
  |  Branch (83:3): [True: 1, Folded]
  ------------------
   84|      1|}
init.c:unw_init_page_size:
   45|      1|{
   46|      1|  errno = 0;
   47|      1|  long result = sysconf (_SC_PAGESIZE);
   48|      1|  if (result == -1)
  ------------------
  |  Branch (48:7): [True: 0, False: 1]
  ------------------
   49|      0|    {
   50|      0|      if (errno != 0)
  ------------------
  |  Branch (50:11): [True: 0, False: 0]
  ------------------
   51|      0|        {
   52|      0|          print_error ("Failed to get _SC_PAGESIZE: ");
   53|      0|          print_error (strerror(errno));
   54|      0|          print_error ("\n");
   55|      0|        }
   56|      0|        else
   57|      0|          print_error ("Failed to get _SC_PAGESIZE, errno was not set.\n");
   58|       |
   59|      0|      unw_page_size = 4096;
   60|      0|    }
   61|      1|  else
   62|      1|    {
   63|      1|      unw_page_size = result;
   64|      1|    }
   65|      1|}

_UIx86_64__mempool_init:
  110|      2|{
  111|      2|  memset (pool, 0, sizeof (*pool));
  112|       |
  113|      2|  lock_init (&pool->lock);
  ------------------
  |  |  210|      2|#define lock_init(l)            mutex_init (l)
  |  |  ------------------
  |  |  |  |  167|      2|        (pthread_mutex_init != NULL ? pthread_mutex_init ((l), NULL) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (167:10): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  114|       |
  115|       |  /* round object-size up to integer multiple of MAX_ALIGN */
  116|      2|  obj_size = UNW_ALIGN(obj_size, MAX_ALIGN);
  ------------------
  |  |  439|      2|#define UNW_ALIGN(x,a) (((size_t)(x) + (size_t)(a) - 1) & ~((size_t)(a) - 1))
  ------------------
  117|       |
  118|      2|  if (!reserve)
  ------------------
  |  Branch (118:7): [True: 2, False: 0]
  ------------------
  119|      2|    {
  120|      2|      reserve = unw_page_size / obj_size / 4;
  121|      2|      if (!reserve)
  ------------------
  |  Branch (121:11): [True: 0, False: 2]
  ------------------
  122|      0|        reserve = 16;
  123|      2|    }
  124|       |
  125|      2|  pool->obj_size = obj_size;
  126|      2|  pool->reserve = reserve;
  127|      2|  pool->chunk_size = UNW_ALIGN(2*reserve*obj_size, unw_page_size);
  ------------------
  |  |  439|      2|#define UNW_ALIGN(x,a) (((size_t)(x) + (size_t)(a) - 1) & ~((size_t)(a) - 1))
  ------------------
  128|       |
  129|      2|  expand (pool);
  130|      2|}
_UIx86_64__mempool_alloc:
  134|     15|{
  135|     15|  intrmask_t saved_mask;
  136|     15|  struct object *obj;
  137|       |
  138|     15|  lock_acquire (&pool->lock, saved_mask);
  ------------------
  |  |  211|     15|#define lock_acquire(l,m)                               \
  |  |  212|     15|do {                                                    \
  |  |  213|     15|  SIGPROCMASK (SIG_SETMASK, &unwi_full_mask, &(m));     \
  |  |  ------------------
  |  |  |  |  195|     15|    (pthread_sigmask != NULL ? pthread_sigmask((how), (new_mask), (old_mask)) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (195:6): [True: 15, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  196|     15|     : sigprocmask((how), (new_mask), (old_mask)))
  |  |  ------------------
  |  |  214|     15|  mutex_lock (l);                                       \
  |  |  ------------------
  |  |  |  |  169|     15|        (pthread_mutex_lock != NULL ? pthread_mutex_lock (l) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (169:10): [True: 15, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  215|     15|} while (0)
  |  |  ------------------
  |  |  |  Branch (215:10): [Folded, False: 15]
  |  |  ------------------
  ------------------
  139|     15|  {
  140|     15|    if (pool->num_free <= pool->reserve)
  ------------------
  |  Branch (140:9): [True: 0, False: 15]
  ------------------
  141|      0|      expand (pool);
  142|       |
  143|     15|    assert (pool->num_free > 0);
  ------------------
  |  Branch (143:5): [True: 0, False: 15]
  |  Branch (143:5): [True: 15, False: 0]
  ------------------
  144|       |
  145|     15|    --pool->num_free;
  146|     15|    obj = pool->free_list;
  147|     15|    pool->free_list = obj->next;
  148|     15|  }
  149|       |  lock_release (&pool->lock, saved_mask);
  ------------------
  |  |  216|     15|#define lock_release(l,m)                       \
  |  |  217|     15|do {                                            \
  |  |  218|     15|  mutex_unlock (l);                             \
  |  |  ------------------
  |  |  |  |  171|     15|        (pthread_mutex_unlock != NULL ? pthread_mutex_unlock (l) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (171:10): [True: 15, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  219|     15|  SIGPROCMASK (SIG_SETMASK, &(m), NULL);        \
  |  |  ------------------
  |  |  |  |  195|     15|    (pthread_sigmask != NULL ? pthread_sigmask((how), (new_mask), (old_mask)) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (195:6): [True: 15, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  196|     15|     : sigprocmask((how), (new_mask), (old_mask)))
  |  |  ------------------
  |  |  220|     15|} while (0)
  |  |  ------------------
  |  |  |  Branch (220:10): [Folded, False: 15]
  |  |  ------------------
  ------------------
  150|     15|  return obj;
  151|     15|}
_UIx86_64__mempool_free:
  155|     15|{
  156|     15|  intrmask_t saved_mask;
  157|       |
  158|     15|  lock_acquire (&pool->lock, saved_mask);
  ------------------
  |  |  211|     15|#define lock_acquire(l,m)                               \
  |  |  212|     15|do {                                                    \
  |  |  213|     15|  SIGPROCMASK (SIG_SETMASK, &unwi_full_mask, &(m));     \
  |  |  ------------------
  |  |  |  |  195|     15|    (pthread_sigmask != NULL ? pthread_sigmask((how), (new_mask), (old_mask)) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (195:6): [True: 15, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  196|     15|     : sigprocmask((how), (new_mask), (old_mask)))
  |  |  ------------------
  |  |  214|     15|  mutex_lock (l);                                       \
  |  |  ------------------
  |  |  |  |  169|     15|        (pthread_mutex_lock != NULL ? pthread_mutex_lock (l) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (169:10): [True: 15, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  215|     15|} while (0)
  |  |  ------------------
  |  |  |  Branch (215:10): [Folded, False: 15]
  |  |  ------------------
  ------------------
  159|     15|  {
  160|     15|    free_object (pool, object);
  161|     15|  }
  162|       |  lock_release (&pool->lock, saved_mask);
  ------------------
  |  |  216|     15|#define lock_release(l,m)                       \
  |  |  217|     15|do {                                            \
  |  |  218|     15|  mutex_unlock (l);                             \
  |  |  ------------------
  |  |  |  |  171|     15|        (pthread_mutex_unlock != NULL ? pthread_mutex_unlock (l) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (171:10): [True: 15, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  219|     15|  SIGPROCMASK (SIG_SETMASK, &(m), NULL);        \
  |  |  ------------------
  |  |  |  |  195|     15|    (pthread_sigmask != NULL ? pthread_sigmask((how), (new_mask), (old_mask)) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (195:6): [True: 15, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  196|     15|     : sigprocmask((how), (new_mask), (old_mask)))
  |  |  ------------------
  |  |  220|     15|} while (0)
  |  |  ------------------
  |  |  |  Branch (220:10): [Folded, False: 15]
  |  |  ------------------
  ------------------
  163|     15|}
mempool.c:expand:
   88|      2|{
   89|      2|  size_t size;
   90|      2|  char *mem;
   91|       |
   92|      2|  size = pool->chunk_size;
   93|      2|  GET_MEMORY (mem, size);
  ------------------
  |  |  260|      2|#define GET_MEMORY(mem, size)                                               \
  |  |  261|      2|do {                                                                        \
  |  |  262|      2|  mem = mi_mmap (NULL, size, PROT_READ | PROT_WRITE,                        \
  |  |  263|      2|                 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);                       \
  |  |  264|      2|  if (mem == MAP_FAILED)                                                    \
  |  |  ------------------
  |  |  |  Branch (264:7): [True: 0, False: 2]
  |  |  ------------------
  |  |  265|      2|    mem = NULL;                                                             \
  |  |  266|      2|} while (0)
  |  |  ------------------
  |  |  |  Branch (266:10): [Folded, False: 2]
  |  |  ------------------
  ------------------
   94|      2|  if (!mem)
  ------------------
  |  Branch (94:7): [True: 0, False: 2]
  ------------------
   95|      0|    {
   96|      0|      size = UNW_ALIGN(pool->obj_size, unw_page_size);
  ------------------
  |  |  439|      0|#define UNW_ALIGN(x,a) (((size_t)(x) + (size_t)(a) - 1) & ~((size_t)(a) - 1))
  ------------------
   97|      0|      GET_MEMORY (mem, size);
  ------------------
  |  |  260|      0|#define GET_MEMORY(mem, size)                                               \
  |  |  261|      0|do {                                                                        \
  |  |  262|      0|  mem = mi_mmap (NULL, size, PROT_READ | PROT_WRITE,                        \
  |  |  263|      0|                 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);                       \
  |  |  264|      0|  if (mem == MAP_FAILED)                                                    \
  |  |  ------------------
  |  |  |  Branch (264:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  265|      0|    mem = NULL;                                                             \
  |  |  266|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (266:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
   98|      0|      if (!mem)
  ------------------
  |  Branch (98:11): [True: 0, False: 0]
  ------------------
   99|      0|        {
  100|       |          /* last chance: try to allocate one object from the SOS memory */
  101|      0|          size = pool->obj_size;
  102|      0|          mem = sos_alloc (size);
  ------------------
  |  |   54|      0|#define sos_alloc(s)            UNWI_ARCH_OBJ(_sos_alloc)(s)
  |  |  ------------------
  |  |  |  |  174|      0|#define UNWI_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_UI,UNW_TARGET),_), fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      0|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  103|      0|        }
  104|      0|    }
  105|      2|  add_memory (pool, mem, size, pool->obj_size);
  106|      2|}
mempool.c:add_memory:
   79|      2|{
   80|      2|  char *obj;
   81|       |
   82|     74|  for (obj = mem; obj <= mem + size - obj_size; obj += obj_size)
  ------------------
  |  Branch (82:19): [True: 72, False: 2]
  ------------------
   83|     72|    free_object (pool, obj);
   84|      2|}
mempool.c:free_object:
   69|     87|{
   70|     87|  struct object *obj = object;
   71|       |
   72|     87|  obj->next = pool->free_list;
   73|     87|  pool->free_list = obj;
   74|     87|  ++pool->num_free;
   75|     87|}

_Ux86_64_get_elf_image:
   53|  31.0k|{
   54|  31.0k|  struct map_iterator mi;
   55|  31.0k|  int found = 0, rc = UNW_ESUCCESS;
   56|  31.0k|  unsigned long hi;
   57|  31.0k|  char root[sizeof ("/proc/0123456789/root")], *cp;
   58|  31.0k|  char *full_path;
   59|  31.0k|  struct stat st;
   60|  31.0k|  unw_accessors_t *a;
   61|  31.0k|  unw_word_t magic;
   62|       |
   63|       |
   64|  31.0k|  if (maps_init (&mi, pid) < 0)
  ------------------
  |  Branch (64:7): [True: 0, False: 31.0k]
  ------------------
   65|      0|    return -1;
   66|       |
   67|   108k|  while (maps_next (&mi, segbase, &hi, mapoff, NULL))
  ------------------
  |  Branch (67:10): [True: 108k, False: 0]
  ------------------
   68|   108k|    if (ip >= *segbase && ip < hi)
  ------------------
  |  Branch (68:9): [True: 108k, False: 0]
  |  Branch (68:27): [True: 31.0k, False: 77.5k]
  ------------------
   69|  31.0k|      {
   70|  31.0k|        found = 1;
   71|  31.0k|        break;
   72|  31.0k|      }
   73|       |
   74|  31.0k|  if (!found)
  ------------------
  |  Branch (74:7): [True: 0, False: 31.0k]
  ------------------
   75|      0|    {
   76|      0|      maps_close (&mi);
   77|      0|      return -1;
   78|      0|    }
   79|       |
   80|       |  // get path only, no need to map elf image
   81|  31.0k|  if (!ei && path)
  ------------------
  |  Branch (81:7): [True: 0, False: 31.0k]
  |  Branch (81:14): [True: 0, False: 0]
  ------------------
   82|      0|    {
   83|      0|      strncpy(path, mi.path, pathlen);
   84|      0|      path[pathlen - 1] = '\0';
   85|      0|      if (strlen(mi.path) >= pathlen)
  ------------------
  |  Branch (85:11): [True: 0, False: 0]
  ------------------
   86|      0|        rc = -UNW_ENOMEM;
   87|       |
   88|      0|      maps_close (&mi);
   89|      0|      return rc;
   90|      0|    }
   91|       |
   92|  31.0k|  full_path = mi.path;
   93|       |
   94|       |  /* Get process root */
   95|  31.0k|  memcpy (root, "/proc/", 6);
   96|  31.0k|  cp = unw_ltoa (root + 6, pid);
   97|  31.0k|  assert (cp + 6 < root + sizeof (root));
  ------------------
  |  Branch (97:3): [True: 0, False: 31.0k]
  |  Branch (97:3): [True: 31.0k, False: 0]
  ------------------
   98|  31.0k|  memcpy (cp, "/root", 6);
   99|       |
  100|  31.0k|  size_t _len = strlen (mi.path) + 1;
  101|  31.0k|  if (!stat(root, &st) && S_ISDIR(st.st_mode))
  ------------------
  |  Branch (101:7): [True: 31.0k, False: 0]
  |  Branch (101:27): [True: 31.0k, False: 0]
  ------------------
  102|  31.0k|    _len += strlen (root);
  103|      0|  else
  104|      0|    root[0] = '\0';
  105|       |
  106|  31.0k|  full_path = path;
  107|  31.0k|  if(!path)
  ------------------
  |  Branch (107:6): [True: 0, False: 31.0k]
  ------------------
  108|      0|    full_path = (char*) malloc (_len);
  109|  31.0k|  else if(_len >= pathlen) // passed buffer is too small, fail
  ------------------
  |  Branch (109:11): [True: 0, False: 31.0k]
  ------------------
  110|      0|    {
  111|      0|      maps_close (&mi);
  112|      0|      return -1;
  113|      0|    }
  114|       |
  115|  31.0k|  strcpy (full_path, root);
  116|  31.0k|  strcat (full_path, mi.path);
  117|       |
  118|  31.0k|  if (stat(full_path, &st) || !S_ISREG(st.st_mode))
  ------------------
  |  Branch (118:7): [True: 0, False: 31.0k]
  |  Branch (118:31): [True: 0, False: 31.0k]
  ------------------
  119|      0|    strcpy(full_path, mi.path);
  120|       |
  121|  31.0k|  rc = elf_map_image (ei, full_path);
  122|       |
  123|       |  /*Follwing code is adapted from 
  124|       |    https://sourceware.org/pipermail/frysk-cvs/2008q1/007245.html,
  125|       |    For VDSO there is no file in the file system, so read the ELF , 
  126|       |    and create mmaped file for the content of the VDSO 
  127|       |  */
  128|  31.0k|  if (rc != -1)
  ------------------
  |  Branch (128:7): [True: 31.0k, False: 0]
  ------------------
  129|  31.0k|  {
  130|  31.0k|    maps_close (&mi);
  131|  31.0k|    goto err_exit;
  132|  31.0k|  }
  133|       |
  134|       |  /* If the above failed, try to bring in page-sized segments directly
  135|       |     from process memory.  This enables us to locate VDSO unwind
  136|       |     tables.  */
  137|      0|  ei->size = hi - *segbase;
  138|      0|  if (ei->size > MAX_VDSO_SIZE) 
  ------------------
  |  |   40|      0|# define MAX_VDSO_SIZE ((size_t) 8 * sysconf (_SC_PAGESIZE))
  ------------------
  |  Branch (138:7): [True: 0, False: 0]
  ------------------
  139|      0|  {
  140|      0|    maps_close (&mi);
  141|      0|    goto err_exit;
  142|      0|  }
  143|       |
  144|      0|  a = unw_get_accessors (as);
  ------------------
  |  |  277|      0|#define unw_get_accessors		UNW_ARCH_OBJ(get_accessors)
  |  |  ------------------
  |  |  |  |   49|      0|#define UNW_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      0|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  145|      0|  if (! a->access_mem) 
  ------------------
  |  Branch (145:7): [True: 0, False: 0]
  ------------------
  146|      0|  {
  147|      0|    maps_close (&mi);
  148|      0|    goto err_exit;
  149|      0|  }
  150|       |
  151|       |  /* Try to decide whether it's an ELF image before bringing it all
  152|       |     in.  */
  153|      0|  if (ei->size <= EI_CLASS || ei->size <= sizeof (magic))
  ------------------
  |  Branch (153:7): [True: 0, False: 0]
  |  Branch (153:31): [True: 0, False: 0]
  ------------------
  154|      0|  {
  155|      0|    maps_close (&mi);
  156|      0|    goto err_exit;
  157|      0|  }
  158|       |
  159|      0|  if (sizeof (magic) >= SELFMAG)
  ------------------
  |  Branch (159:7): [True: 0, Folded]
  ------------------
  160|      0|    {
  161|      0|      int ret = (*a->access_mem) (as, *segbase, &magic, 0, arg);
  162|      0|      if (ret < 0)
  ------------------
  |  Branch (162:11): [True: 0, False: 0]
  ------------------
  163|      0|      {
  164|      0|        rc = ret;
  165|      0|        maps_close (&mi);
  166|      0|        goto err_exit;
  167|      0|      }
  168|       |
  169|      0|      if (memcmp (&magic, ELFMAG, SELFMAG) != 0)
  ------------------
  |  Branch (169:11): [True: 0, False: 0]
  ------------------
  170|      0|      {
  171|      0|        maps_close (&mi);
  172|      0|        goto err_exit;
  173|      0|      }
  174|      0|    }
  175|       |
  176|      0|  ei->image = mmap (0, ei->size, PROT_READ | PROT_WRITE,
  177|      0|           MAP_PRIVATE | MAP_ANONYMOUS | MAP_32BIT, -1, 0);
  178|      0|  if (ei->image == MAP_FAILED)
  ------------------
  |  Branch (178:7): [True: 0, False: 0]
  ------------------
  179|      0|    {
  180|      0|      maps_close (&mi);
  181|      0|      goto err_exit;
  182|      0|    }
  183|       |
  184|      0|  if (sizeof (magic) >= SELFMAG)
  ------------------
  |  Branch (184:7): [True: 0, Folded]
  ------------------
  185|      0|    {
  186|      0|      *(unw_word_t *)ei->image = magic;
  187|      0|      hi = sizeof (magic);
  188|      0|    }
  189|      0|  else
  190|      0|    hi = 0;
  191|       |
  192|      0|  for (; hi < ei->size; hi += sizeof (unw_word_t))
  ------------------
  |  Branch (192:10): [True: 0, False: 0]
  ------------------
  193|      0|    {
  194|      0|      rc = (*a->access_mem) (as, *segbase + hi, ei->image + hi,
  195|      0|               0, arg);
  196|      0|      if (rc < 0)
  ------------------
  |  Branch (196:11): [True: 0, False: 0]
  ------------------
  197|      0|   {
  198|      0|     munmap (ei->image, ei->size);
  199|      0|     maps_close (&mi);
  200|      0|     goto err_exit;
  201|      0|   }
  202|      0|    }
  203|       |
  204|      0|  if (*segbase == *mapoff
  ------------------
  |  Branch (204:7): [True: 0, False: 0]
  ------------------
  205|      0|      && (*path == 0 || strcmp (path, "[vdso]") == 0))
  ------------------
  |  Branch (205:11): [True: 0, False: 0]
  |  Branch (205:25): [True: 0, False: 0]
  ------------------
  206|      0|    *mapoff = 0;
  207|       |
  208|  31.0k|err_exit:
  209|       |
  210|  31.0k|  if (!path)
  ------------------
  |  Branch (210:7): [True: 0, False: 31.0k]
  ------------------
  211|      0|    free (full_path);
  212|       |
  213|  31.0k|  maps_close (&mi);
  214|  31.0k|  return rc;
  215|      0|}

os-linux.c:maps_init:
   67|  31.0k|{
   68|  31.0k|  char path[sizeof ("/proc/0123456789/maps")], *cp;
   69|       |
   70|  31.0k|  memcpy (path, "/proc/", 6);
   71|  31.0k|  cp = unw_ltoa (path + 6, pid);
   72|  31.0k|  assert (cp + 6 < path + sizeof (path));
  ------------------
  |  Branch (72:3): [True: 0, False: 31.0k]
  |  Branch (72:3): [True: 31.0k, False: 0]
  ------------------
   73|  31.0k|  memcpy (cp, "/maps", 6);
   74|       |
   75|  31.0k|  mi->fd = open (path, O_RDONLY);
   76|  31.0k|  if (mi->fd >= 0)
  ------------------
  |  Branch (76:7): [True: 31.0k, False: 0]
  ------------------
   77|  31.0k|    {
   78|       |      /* Try to allocate a page-sized buffer.  */
   79|  31.0k|      mi->buf_size = getpagesize ();
   80|  31.0k|      GET_MEMORY (cp, mi->buf_size);
  ------------------
  |  |  260|  31.0k|#define GET_MEMORY(mem, size)                                               \
  |  |  261|  31.0k|do {                                                                        \
  |  |  262|  31.0k|  mem = mi_mmap (NULL, size, PROT_READ | PROT_WRITE,                        \
  |  |  263|  31.0k|                 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);                       \
  |  |  264|  31.0k|  if (mem == MAP_FAILED)                                                    \
  |  |  ------------------
  |  |  |  Branch (264:7): [True: 0, False: 31.0k]
  |  |  ------------------
  |  |  265|  31.0k|    mem = NULL;                                                             \
  |  |  266|  31.0k|} while (0)
  |  |  ------------------
  |  |  |  Branch (266:10): [Folded, False: 31.0k]
  |  |  ------------------
  ------------------
   81|  31.0k|      if (!cp)
  ------------------
  |  Branch (81:11): [True: 0, False: 31.0k]
  ------------------
   82|      0|        {
   83|      0|          close(mi->fd);
   84|      0|          mi->fd = -1;
   85|      0|          return -1;
   86|      0|        }
   87|  31.0k|      else
   88|  31.0k|        {
   89|  31.0k|          mi->offset = 0;
   90|  31.0k|          mi->buf = mi->buf_end = cp + mi->buf_size;
   91|  31.0k|          return 0;
   92|  31.0k|        }
   93|  31.0k|    }
   94|      0|  return -1;
   95|  31.0k|}
os-linux.c:maps_next:
  205|   108k|{
  206|   108k|  char perm[16], dash = 0, colon = 0, *cp;
  207|   108k|  unsigned long major, minor, inum;
  208|   108k|  ssize_t i, nread;
  209|       |
  210|   108k|  if (mi->fd < 0)
  ------------------
  |  Branch (210:7): [True: 0, False: 108k]
  ------------------
  211|      0|    return 0;
  212|       |
  213|   108k|  while (1)
  ------------------
  |  Branch (213:10): [True: 108k, Folded]
  ------------------
  214|   108k|    {
  215|   108k|      ssize_t bytes_left = mi->buf_end - mi->buf;
  216|   108k|      char *eol = NULL;
  217|       |
  218|  7.84M|      for (i = 0; i < bytes_left; ++i)
  ------------------
  |  Branch (218:19): [True: 7.81M, False: 31.0k]
  ------------------
  219|  7.81M|        {
  220|  7.81M|          if (mi->buf[i] == '\n')
  ------------------
  |  Branch (220:15): [True: 77.5k, False: 7.73M]
  ------------------
  221|  77.5k|            {
  222|  77.5k|              eol = mi->buf + i;
  223|  77.5k|              break;
  224|  77.5k|            }
  225|  7.73M|          else if (mi->buf[i] == '\0')
  ------------------
  |  Branch (225:20): [True: 0, False: 7.73M]
  ------------------
  226|      0|            break;
  227|  7.81M|        }
  228|   108k|      if (!eol)
  ------------------
  |  Branch (228:11): [True: 31.0k, False: 77.5k]
  ------------------
  229|  31.0k|        {
  230|       |          /* copy down the remaining bytes, if any */
  231|  31.0k|          if (bytes_left > 0)
  ------------------
  |  Branch (231:15): [True: 0, False: 31.0k]
  ------------------
  232|      0|            memmove (mi->buf_end - mi->buf_size, mi->buf, bytes_left);
  233|       |
  234|  31.0k|          mi->buf = mi->buf_end - mi->buf_size;
  235|  31.0k|          nread = read (mi->fd, mi->buf + bytes_left,
  236|  31.0k|                        mi->buf_size - bytes_left);
  237|  31.0k|          if (nread <= 0)
  ------------------
  |  Branch (237:15): [True: 0, False: 31.0k]
  ------------------
  238|      0|            return 0;
  239|  31.0k|          else if ((size_t) (nread + bytes_left) < mi->buf_size)
  ------------------
  |  Branch (239:20): [True: 31.0k, False: 0]
  ------------------
  240|  31.0k|            {
  241|       |              /* Move contents to the end of the buffer so we
  242|       |                 maintain the invariant that all bytes between
  243|       |                 mi->buf and mi->buf_end are valid.  */
  244|  31.0k|              memmove (mi->buf_end - nread - bytes_left, mi->buf,
  245|  31.0k|                       nread + bytes_left);
  246|  31.0k|              mi->buf = mi->buf_end - nread - bytes_left;
  247|  31.0k|            }
  248|       |
  249|  31.0k|          eol = mi->buf + bytes_left + nread - 1;
  250|       |
  251|  3.99M|          for (i = bytes_left; i < bytes_left + nread; ++i)
  ------------------
  |  Branch (251:32): [True: 3.99M, False: 0]
  ------------------
  252|  3.99M|            if (mi->buf[i] == '\n')
  ------------------
  |  Branch (252:17): [True: 31.0k, False: 3.96M]
  ------------------
  253|  31.0k|              {
  254|  31.0k|                eol = mi->buf + i;
  255|  31.0k|                break;
  256|  31.0k|              }
  257|  31.0k|        }
  258|   108k|      cp = mi->buf;
  259|   108k|      mi->buf = eol + 1;
  260|   108k|      *eol = '\0';
  261|       |
  262|       |      /* scan: "LOW-HIGH PERM OFFSET MAJOR:MINOR INUM PATH" */
  263|   108k|      cp = scan_hex (cp, low);
  264|   108k|      cp = scan_char (cp, &dash);
  265|   108k|      cp = scan_hex (cp, high);
  266|   108k|      cp = scan_string (cp, perm, sizeof (perm));
  267|   108k|      cp = scan_hex (cp, offset);
  268|   108k|      cp = scan_hex (cp, &major);
  269|   108k|      cp = scan_char (cp, &colon);
  270|   108k|      cp = scan_hex (cp, &minor);
  271|   108k|      cp = scan_dec (cp, &inum);
  272|   108k|      cp = mi->path = skip_whitespace (cp);
  273|   108k|      if (!cp)
  ------------------
  |  Branch (273:11): [True: 0, False: 108k]
  ------------------
  274|      0|        continue;
  275|   108k|      cp = scan_string (cp, NULL, 0);
  276|   108k|      if (dash != '-' || colon != ':')
  ------------------
  |  Branch (276:11): [True: 0, False: 108k]
  |  Branch (276:26): [True: 0, False: 108k]
  ------------------
  277|      0|        continue;       /* skip line with unknown or bad format */
  278|   108k|      if (flags)
  ------------------
  |  Branch (278:11): [True: 0, False: 108k]
  ------------------
  279|      0|        {
  280|      0|          *flags = 0;
  281|      0|          if (perm[0] == 'r')
  ------------------
  |  Branch (281:15): [True: 0, False: 0]
  ------------------
  282|      0|            {
  283|      0|              *flags |= PROT_READ;
  284|      0|            }
  285|      0|          if (perm[1] == 'w')
  ------------------
  |  Branch (285:15): [True: 0, False: 0]
  ------------------
  286|      0|            {
  287|      0|              *flags |= PROT_WRITE;
  288|      0|            }
  289|      0|          if (perm[2] == 'x')
  ------------------
  |  Branch (289:15): [True: 0, False: 0]
  ------------------
  290|      0|            {
  291|      0|              *flags |= PROT_EXEC;
  292|      0|            }
  293|      0|        }
  294|   108k|      return 1;
  295|   108k|    }
  296|      0|  return 0;
  297|   108k|}
os-linux.c:scan_hex:
  110|   542k|{
  111|   542k|  unsigned long num_digits = 0, digit, val = 0;
  112|       |
  113|   542k|  cp = skip_whitespace (cp);
  114|   542k|  if (!cp)
  ------------------
  |  Branch (114:7): [True: 0, False: 542k]
  ------------------
  115|      0|    return NULL;
  116|       |
  117|  4.44M|  while (1)
  ------------------
  |  Branch (117:10): [True: 4.44M, Folded]
  ------------------
  118|  4.44M|    {
  119|  4.44M|      digit = *cp;
  120|  4.44M|      if ((digit - '0') <= 9)
  ------------------
  |  Branch (120:11): [True: 3.21M, False: 1.23M]
  ------------------
  121|  3.21M|        digit -= '0';
  122|  1.23M|      else if ((digit - 'A') < 6)
  ------------------
  |  Branch (122:16): [True: 0, False: 1.23M]
  ------------------
  123|      0|        digit -= 'A' - 10;
  124|  1.23M|      else if ((digit - 'a') < 6)
  ------------------
  |  Branch (124:16): [True: 693k, False: 542k]
  ------------------
  125|   693k|        digit -= 'a' - 10;
  126|   542k|      else
  127|   542k|        break;
  128|  3.90M|      val = (val << 4) | digit;
  129|  3.90M|      ++num_digits;
  130|  3.90M|      ++cp;
  131|  3.90M|    }
  132|   542k|  if (!num_digits)
  ------------------
  |  Branch (132:7): [True: 0, False: 542k]
  ------------------
  133|      0|    return NULL;
  134|   542k|  *valp = val;
  135|   542k|  return cp;
  136|   542k|}
os-linux.c:scan_char:
  167|   217k|{
  168|   217k|  if (!cp)
  ------------------
  |  Branch (168:7): [True: 0, False: 217k]
  ------------------
  169|      0|    return NULL;
  170|       |
  171|   217k|  *valp = *cp;
  172|       |
  173|       |  /* don't step over NUL terminator */
  174|   217k|  if (*cp)
  ------------------
  |  Branch (174:7): [True: 217k, False: 0]
  ------------------
  175|   217k|    ++cp;
  176|   217k|  return cp;
  177|   217k|}
os-linux.c:scan_string:
  183|   217k|{
  184|   217k|  size_t i = 0;
  185|       |
  186|   217k|  if (!(cp = skip_whitespace (cp)))
  ------------------
  |  Branch (186:7): [True: 0, False: 217k]
  ------------------
  187|      0|    return NULL;
  188|       |
  189|  5.01M|  while (*cp != ' ' && *cp != '\t' && *cp != '\0')
  ------------------
  |  Branch (189:10): [True: 4.90M, False: 108k]
  |  Branch (189:24): [True: 4.90M, False: 0]
  |  Branch (189:39): [True: 4.80M, False: 108k]
  ------------------
  190|  4.80M|    {
  191|  4.80M|      if ((valp != NULL) && (i < buf_size - 1))
  ------------------
  |  Branch (191:11): [True: 434k, False: 4.36M]
  |  Branch (191:29): [True: 434k, False: 0]
  ------------------
  192|   434k|        valp[i++] = *cp;
  193|  4.80M|      ++cp;
  194|  4.80M|    }
  195|   217k|  if (i == 0 || i >= buf_size)
  ------------------
  |  Branch (195:7): [True: 108k, False: 108k]
  |  Branch (195:17): [True: 0, False: 108k]
  ------------------
  196|   108k|    return NULL;
  197|   108k|  valp[i] = '\0';
  198|   108k|  return cp;
  199|   217k|}
os-linux.c:scan_dec:
  140|   108k|{
  141|   108k|  unsigned long num_digits = 0, digit, val = 0;
  142|       |
  143|   108k|  if (!(cp = skip_whitespace (cp)))
  ------------------
  |  Branch (143:7): [True: 0, False: 108k]
  ------------------
  144|      0|    return NULL;
  145|       |
  146|   705k|  while (1)
  ------------------
  |  Branch (146:10): [True: 705k, Folded]
  ------------------
  147|   705k|    {
  148|   705k|      digit = *cp;
  149|   705k|      if ((digit - '0') <= 9)
  ------------------
  |  Branch (149:11): [True: 596k, False: 108k]
  ------------------
  150|   596k|        {
  151|   596k|          digit -= '0';
  152|   596k|          ++cp;
  153|   596k|        }
  154|   108k|      else
  155|   108k|        break;
  156|   596k|      val = (10 * val) + digit;
  157|   596k|      ++num_digits;
  158|   596k|    }
  159|   108k|  if (!num_digits)
  ------------------
  |  Branch (159:7): [True: 0, False: 108k]
  ------------------
  160|      0|    return NULL;
  161|   108k|  *valp = val;
  162|   108k|  return cp;
  163|   108k|}
os-linux.c:skip_whitespace:
   99|   976k|{
  100|   976k|  if (!cp)
  ------------------
  |  Branch (100:7): [True: 0, False: 976k]
  ------------------
  101|      0|    return NULL;
  102|       |
  103|  3.16M|  while (*cp == ' ' || *cp == '\t')
  ------------------
  |  Branch (103:10): [True: 2.18M, False: 976k]
  |  Branch (103:24): [True: 0, False: 976k]
  ------------------
  104|  2.18M|    ++cp;
  105|   976k|  return cp;
  106|   976k|}
os-linux.c:maps_close:
  301|  62.0k|{
  302|  62.0k|  if (mi->fd < 0)
  ------------------
  |  Branch (302:7): [True: 31.0k, False: 31.0k]
  ------------------
  303|  31.0k|    return;
  304|  31.0k|  close (mi->fd);
  305|  31.0k|  mi->fd = -1;
  306|  31.0k|  if (mi->buf)
  ------------------
  |  Branch (306:7): [True: 31.0k, False: 0]
  ------------------
  307|  31.0k|    {
  308|  31.0k|      mi_munmap (mi->buf_end - mi->buf_size, mi->buf_size);
  309|       |      mi->buf = mi->buf_end = NULL;
  310|  31.0k|    }
  311|  31.0k|}
os-linux.c:unw_ltoa:
   42|  62.0k|{
   43|  62.0k|  char *cp = buf, tmp;
   44|  62.0k|  ssize_t i, len;
   45|       |
   46|  62.0k|  do
   47|   124k|    {
   48|   124k|      *cp++ = '0' + (val % 10);
   49|   124k|      val /= 10;
   50|   124k|    }
   51|   124k|  while (val);
  ------------------
  |  Branch (51:10): [True: 62.0k, False: 62.0k]
  ------------------
   52|       |
   53|       |  /* reverse the order of the digits: */
   54|  62.0k|  len = cp - buf;
   55|  62.0k|  --cp;
   56|   124k|  for (i = 0; i < len / 2; ++i)
  ------------------
  |  Branch (56:15): [True: 62.0k, False: 62.0k]
  ------------------
   57|  62.0k|    {
   58|  62.0k|      tmp = buf[i];
   59|  62.0k|      buf[i] = cp[-i];
   60|  62.0k|      cp[-i] = tmp;
   61|  62.0k|    }
   62|  62.0k|  return buf + len;
   63|  62.0k|}

_ULx86_64_get_save_loc:
   32|  3.99k|{
   33|  3.99k|  struct cursor *c = (struct cursor *) cursor;
   34|  3.99k|  dwarf_loc_t loc;
   35|       |
   36|  3.99k|  loc = DWARF_NULL_LOC;         /* default to "not saved" */
  ------------------
  |  |  155|  3.99k|# define DWARF_NULL_LOC         DWARF_LOC (0, 0)
  |  |  ------------------
  |  |  |  |  150|  3.99k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
   37|       |
   38|  3.99k|  switch (reg)
   39|  3.99k|    {
   40|     48|    case UNW_X86_64_RBX: loc = c->dwarf.loc[RBX]; break;
  ------------------
  |  |   46|     48|#define RBX     3
  ------------------
  |  Branch (40:5): [True: 48, False: 3.94k]
  ------------------
   41|    328|    case UNW_X86_64_RSP: loc = c->dwarf.loc[RSP]; break;
  ------------------
  |  |   50|    328|#define RSP     7
  ------------------
  |  Branch (41:5): [True: 328, False: 3.66k]
  ------------------
   42|     48|    case UNW_X86_64_RBP: loc = c->dwarf.loc[RBP]; break;
  ------------------
  |  |   49|     48|#define RBP     6
  ------------------
  |  Branch (42:5): [True: 48, False: 3.94k]
  ------------------
   43|    120|    case UNW_X86_64_R12: loc = c->dwarf.loc[R12]; break;
  ------------------
  |  |   55|    120|#define R12     12
  ------------------
  |  Branch (43:5): [True: 120, False: 3.87k]
  ------------------
   44|    208|    case UNW_X86_64_R13: loc = c->dwarf.loc[R13]; break;
  ------------------
  |  |   56|    208|#define R13     13
  ------------------
  |  Branch (44:5): [True: 208, False: 3.78k]
  ------------------
   45|    376|    case UNW_X86_64_R14: loc = c->dwarf.loc[R14]; break;
  ------------------
  |  |   57|    376|#define R14     14
  ------------------
  |  Branch (45:5): [True: 376, False: 3.61k]
  ------------------
   46|    792|    case UNW_X86_64_R15: loc = c->dwarf.loc[R15]; break;
  ------------------
  |  |   58|    792|#define R15     15
  ------------------
  |  Branch (46:5): [True: 792, False: 3.20k]
  ------------------
   47|     16|    case UNW_X86_64_RIP: loc = c->dwarf.loc[RIP]; break;
  ------------------
  |  |   59|     16|#define RIP     16
  ------------------
  |  Branch (47:5): [True: 16, False: 3.97k]
  ------------------
   48|       |
   49|  2.05k|    default:
  ------------------
  |  Branch (49:5): [True: 2.05k, False: 1.93k]
  ------------------
   50|  2.05k|      break;
   51|  3.99k|    }
   52|       |
   53|  3.99k|  memset (sloc, 0, sizeof (*sloc));
   54|       |
   55|  3.99k|  if (DWARF_IS_NULL_LOC (loc))
  ------------------
  |  |  156|  3.99k|# define DWARF_IS_NULL_LOC(l)   (DWARF_GET_LOC (l) == 0)
  |  |  ------------------
  |  |  |  |  139|  3.99k|#define DWARF_GET_LOC(l)        ((l).val)
  |  |  ------------------
  |  |  |  Branch (156:33): [True: 2.05k, False: 1.93k]
  |  |  ------------------
  ------------------
   56|  2.05k|    {
   57|  2.05k|      sloc->type = UNW_SLT_NONE;
   58|  2.05k|      return 0;
   59|  2.05k|    }
   60|       |
   61|       |#if !defined(UNW_LOCAL_ONLY)
   62|       |  if (DWARF_IS_REG_LOC (loc))
   63|       |    {
   64|       |      sloc->type = UNW_SLT_REG;
   65|       |      sloc->u.regnum = DWARF_GET_REG_LOC (loc);
   66|       |    }
   67|       |  else
   68|       |#endif
   69|  1.93k|    {
   70|  1.93k|      sloc->type = UNW_SLT_MEMORY;
   71|  1.93k|      sloc->u.addr = DWARF_GET_MEM_LOC (loc);
  ------------------
  |  |  421|  1.93k|#define DWARF_GET_MEM_LOC(l)    DWARF_GET_LOC(l)
  |  |  ------------------
  |  |  |  |  139|  1.93k|#define DWARF_GET_LOC(l)        ((l).val)
  |  |  ------------------
  ------------------
   72|  1.93k|    }
   73|  1.93k|  return 0;
   74|  3.99k|}

_ULx86_64_init:
   79|      1|{
   80|      1|  intrmask_t saved_mask;
   81|      1|  intrmask_t full_mask;
   82|      1|  sigfillset (&full_mask);
   83|       |
   84|      1|  SIGPROCMASK (SIG_SETMASK, &full_mask, &saved_mask);
  ------------------
  |  |  195|      1|    (pthread_sigmask != NULL ? pthread_sigmask((how), (new_mask), (old_mask)) \
  |  |  ------------------
  |  |  |  Branch (195:6): [True: 1, False: 0]
  |  |  ------------------
  |  |  196|      1|     : sigprocmask((how), (new_mask), (old_mask)))
  ------------------
   85|      1|  mutex_lock (&x86_64_lock);
  ------------------
  |  |  169|      1|        (pthread_mutex_lock != NULL ? pthread_mutex_lock (l) : 0)
  |  |  ------------------
  |  |  |  Branch (169:10): [True: 1, False: 0]
  |  |  ------------------
  ------------------
   86|      1|  {
   87|      1|    if (atomic_load(&tdep_init_done))
  ------------------
  |  Branch (87:9): [True: 0, False: 1]
  ------------------
   88|       |      /* another thread else beat us to it... */
   89|      0|      goto out;
   90|       |
   91|      1|    sigfillset (&unwi_full_mask);
  ------------------
  |  |  176|      1|#define unwi_full_mask    UNWI_ARCH_OBJ(full_mask)
  |  |  ------------------
  |  |  |  |  174|      1|#define UNWI_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_UI,UNW_TARGET),_), fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      1|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      1|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   92|      1|    mi_init ();
  ------------------
  |  |  365|      1|#define mi_init         UNWI_ARCH_OBJ(mi_init)
  |  |  ------------------
  |  |  |  |  174|      1|#define UNWI_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_UI,UNW_TARGET),_), fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      1|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      1|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   93|       |
   94|      1|    dwarf_init ();
  ------------------
  |  |  386|      1|#define dwarf_init                      UNW_ARCH_OBJ (dwarf_init)
  |  |  ------------------
  |  |  |  |   49|      1|#define UNW_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      1|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      1|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   95|       |
   96|      1|#ifndef UNW_REMOTE_ONLY
   97|      1|    x86_64_local_addr_space_init ();
  ------------------
  |  |   63|      1|#define x86_64_local_addr_space_init    UNW_OBJ(local_addr_space_init)
  |  |  ------------------
  |  |  |  |   48|      1|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      1|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      1|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   98|      1|#endif
   99|      1|    atomic_store(&tdep_init_done, 1); /* signal that we're initialized... */
  100|      1|  }
  101|      1| out:
  102|      1|  mutex_unlock(&x86_64_lock);
  ------------------
  |  |  171|      1|        (pthread_mutex_unlock != NULL ? pthread_mutex_unlock (l) : 0)
  |  |  ------------------
  |  |  |  Branch (171:10): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  103|       |  SIGPROCMASK (SIG_SETMASK, &saved_mask, NULL);
  ------------------
  |  |  195|      1|    (pthread_sigmask != NULL ? pthread_sigmask((how), (new_mask), (old_mask)) \
  |  |  ------------------
  |  |  |  Branch (195:6): [True: 1, False: 0]
  |  |  ------------------
  |  |  196|      1|     : sigprocmask((how), (new_mask), (old_mask)))
  ------------------
  104|      1|}

_ULx86_64_local_addr_space_init:
  181|      1|{
  182|      1|  memset (&local_addr_space, 0, sizeof (local_addr_space));
  183|      1|#ifndef UNW_REMOTE_ONLY
  184|      1|# if defined(HAVE_DL_ITERATE_PHDR)
  185|      1|  local_addr_space.iterate_phdr_function = dl_iterate_phdr;
  186|      1|# endif
  187|      1|#endif
  188|      1|  local_addr_space.caching_policy = UNWI_DEFAULT_CACHING_POLICY;
  ------------------
  |  |   43|      1|#define UNWI_DEFAULT_CACHING_POLICY UNW_CACHE_GLOBAL
  ------------------
  189|      1|  local_addr_space.acc.find_proc_info = dwarf_find_proc_info;
  ------------------
  |  |  388|      1|#define dwarf_find_proc_info            UNW_OBJ (dwarf_find_proc_info)
  |  |  ------------------
  |  |  |  |   48|      1|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      1|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      1|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  190|      1|  local_addr_space.acc.put_unwind_info = put_unwind_info;
  191|      1|  local_addr_space.acc.get_dyn_info_list_addr = get_dyn_info_list_addr;
  192|      1|  local_addr_space.acc.access_mem = access_mem;
  193|      1|  local_addr_space.acc.access_reg = access_reg;
  194|      1|  local_addr_space.acc.access_fpreg = access_fpreg;
  195|      1|  local_addr_space.acc.resume = x86_64_local_resume;
  ------------------
  |  |   62|      1|#define x86_64_local_resume             UNW_OBJ(local_resume)
  |  |  ------------------
  |  |  |  |   48|      1|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      1|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      1|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  196|      1|  local_addr_space.acc.get_proc_name = get_static_proc_name;
  197|      1|  local_addr_space.acc.get_elf_filename = get_static_elf_filename;
  198|      1|  unw_flush_cache (&local_addr_space, 0, 0);
  ------------------
  |  |  304|      1|#define unw_flush_cache			UNW_ARCH_OBJ(flush_cache)
  |  |  ------------------
  |  |  |  |   49|      1|#define UNW_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      1|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      1|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  199|      1|}
Linit.c:access_mem:
   80|   112k|{
   81|   112k|  if (unlikely (write))
  ------------------
  |  |   68|   112k|#  define unlikely(x)   __builtin_expect ((x), 0)
  |  |  ------------------
  |  |  |  Branch (68:25): [True: 0, False: 112k]
  |  |  ------------------
  ------------------
   82|      0|    {
   83|      0|      Debug (16, "mem[%016lx] <- %lx\n", addr, *val);
   84|      0|      memcpy ((void *) addr, val, sizeof(unw_word_t));
   85|      0|    }
   86|   112k|  else
   87|   112k|    {
   88|       |      /* validate address */
   89|   112k|      if (unlikely (AS_ARG_GET_VALIDATE(arg))
  ------------------
  |  |   68|   224k|#  define unlikely(x)   __builtin_expect ((x), 0)
  |  |  ------------------
  |  |  |  Branch (68:25): [True: 100k, False: 12.1k]
  |  |  ------------------
  ------------------
   90|   100k|          && unlikely (!unw_address_is_valid (addr, sizeof (unw_word_t)))) {
  ------------------
  |  |   68|   100k|#  define unlikely(x)   __builtin_expect ((x), 0)
  |  |  ------------------
  |  |  |  Branch (68:25): [True: 0, False: 100k]
  |  |  ------------------
  ------------------
   91|      0|        Debug (16, "mem[%016lx] -> invalid\n", addr);
   92|      0|        return -1;
   93|      0|      }
   94|   112k|      memcpy (val, (void *) addr, sizeof(unw_word_t));
   95|   112k|      Debug (16, "mem[%016lx] -> %lx\n", addr, *val);
   96|   112k|    }
   97|   112k|  return 0;
   98|   112k|}
Linit.c:get_static_proc_name:
  167|  31.0k|{
  168|  31.0k|  return _Uelf64_get_proc_name (as, getpid (), ip, buf, buf_len, offp, arg);
  169|  31.0k|}

_ULx86_64_init_local:
   60|  6.06k|{
   61|  6.06k|  return unw_init_local_common(cursor, uc, 1);
   62|  6.06k|}
Linit_local.c:unw_init_local_common:
   44|  6.06k|{
   45|  6.06k|  struct cursor *c = (struct cursor *) cursor;
   46|       |
   47|  6.06k|  if (unlikely (!atomic_load(&tdep_init_done)))
  ------------------
  |  |   68|  6.06k|#  define unlikely(x)   __builtin_expect ((x), 0)
  |  |  ------------------
  |  |  |  Branch (68:25): [True: 1, False: 6.06k]
  |  |  ------------------
  ------------------
   48|      1|    tdep_init ();
  ------------------
  |  |  232|      1|#define tdep_init                       UNW_OBJ(init)
  |  |  ------------------
  |  |  |  |   48|      1|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      1|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      1|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   49|       |
   50|  6.06k|  Debug (1, "(cursor=%p)\n", c);
   51|       |
   52|  6.06k|  c->dwarf.as = unw_local_addr_space;
  ------------------
  |  |  274|  6.06k|#define unw_local_addr_space		UNW_OBJ(local_addr_space)
  |  |  ------------------
  |  |  |  |   48|  6.06k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  6.06k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  6.06k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   53|  6.06k|  c->dwarf.as_arg = dwarf_build_as_arg(uc, /*validate*/ 0);
   54|  6.06k|  c->frames = 0;
   55|  6.06k|  return common_init (c, use_prev_instr);
   56|  6.06k|}

_ULx86_64_fetch_frame:
   40|     15|{
   41|     15|  struct cursor *c = (struct cursor *) dw;
   42|     15|  assert(! need_unwind_info || dw->pi_valid);
  ------------------
  |  Branch (42:3): [True: 15, False: 0]
  |  Branch (42:3): [True: 0, False: 0]
  |  Branch (42:3): [True: 0, False: 15]
  |  Branch (42:3): [True: 15, False: 0]
  ------------------
   43|     15|  assert(! need_unwind_info || dw->pi.unwind_info);
  ------------------
  |  Branch (43:3): [True: 15, False: 0]
  |  Branch (43:3): [True: 0, False: 0]
  |  Branch (43:3): [True: 0, False: 15]
  |  Branch (43:3): [True: 15, False: 0]
  ------------------
   44|     15|  if (dw->pi_valid
  ------------------
  |  Branch (44:7): [True: 15, False: 0]
  ------------------
   45|     15|      && dw->pi.unwind_info
  ------------------
  |  Branch (45:10): [True: 15, False: 0]
  ------------------
   46|     15|      && ((struct dwarf_cie_info *) dw->pi.unwind_info)->signal_frame)
  ------------------
  |  Branch (46:10): [True: 0, False: 15]
  ------------------
   47|      0|    c->sigcontext_format = X86_64_SCF_LINUX_RT_SIGFRAME;
   48|     15|  else
   49|     15|    c->sigcontext_format = X86_64_SCF_NONE;
   50|       |
   51|     15|  Debug(5, "fetch frame ip=0x%lx cfa=0x%lx format=%d\n",
   52|     15|        dw->ip, dw->cfa, c->sigcontext_format);
   53|     15|}
_ULx86_64_cache_frame:
   57|     15|{
   58|     15|  struct cursor *c = (struct cursor *) dw;
   59|       |
   60|     15|  Debug(5, "cache frame ip=0x%lx cfa=0x%lx format=%d\n",
   61|     15|        dw->ip, dw->cfa, c->sigcontext_format);
   62|     15|  return c->sigcontext_format;
   63|     15|}
_ULx86_64_reuse_frame:
   67|  54.5k|{
   68|  54.5k|  struct cursor *c = (struct cursor *) dw;
   69|  54.5k|  c->sigcontext_format = frame;
   70|  54.5k|  if (c->sigcontext_format == X86_64_SCF_LINUX_RT_SIGFRAME)
  ------------------
  |  Branch (70:7): [True: 0, False: 54.5k]
  ------------------
   71|      0|  {
   72|      0|    c->frame_info.frame_type = UNW_X86_64_FRAME_SIGRETURN;
   73|       |    /* Offset from cfa to ucontext_t in signal frame.  */
   74|      0|    c->frame_info.cfa_reg_offset = 0;
   75|      0|    c->sigcontext_addr = dw->cfa;
   76|      0|  }
   77|       |
   78|  54.5k|  Debug(5, "reuse frame ip=0x%lx cfa=0x%lx format=%d addr=0x%lx offset=%+d\n",
   79|  54.5k|        dw->ip, dw->cfa, c->sigcontext_format, c->sigcontext_addr,
   80|  54.5k|        (c->sigcontext_format == X86_64_SCF_LINUX_RT_SIGFRAME
   81|  54.5k|         ? c->frame_info.cfa_reg_offset : 0));
   82|  54.5k|}
_ULx86_64_is_signal_frame:
   86|  1.48k|{
   87|  1.48k|  struct cursor *c = (struct cursor *) cursor;
   88|  1.48k|  return c->sigcontext_format != X86_64_SCF_NONE;
   89|  1.48k|}
_ULx86_64_r_uc_addr:
  110|  6.06k|{
  111|       |  /* NOTE: common_init() in init.h inlines these for fast path access. */
  112|  6.06k|  void *addr;
  113|       |
  114|  6.06k|  switch (reg)
  115|  6.06k|    {
  116|      0|    case UNW_X86_64_R8: addr = &uc->uc_mcontext.gregs[REG_R8]; break;
  ------------------
  |  Branch (116:5): [True: 0, False: 6.06k]
  ------------------
  117|      0|    case UNW_X86_64_R9: addr = &uc->uc_mcontext.gregs[REG_R9]; break;
  ------------------
  |  Branch (117:5): [True: 0, False: 6.06k]
  ------------------
  118|      0|    case UNW_X86_64_R10: addr = &uc->uc_mcontext.gregs[REG_R10]; break;
  ------------------
  |  Branch (118:5): [True: 0, False: 6.06k]
  ------------------
  119|      0|    case UNW_X86_64_R11: addr = &uc->uc_mcontext.gregs[REG_R11]; break;
  ------------------
  |  Branch (119:5): [True: 0, False: 6.06k]
  ------------------
  120|      0|    case UNW_X86_64_R12: addr = &uc->uc_mcontext.gregs[REG_R12]; break;
  ------------------
  |  Branch (120:5): [True: 0, False: 6.06k]
  ------------------
  121|      0|    case UNW_X86_64_R13: addr = &uc->uc_mcontext.gregs[REG_R13]; break;
  ------------------
  |  Branch (121:5): [True: 0, False: 6.06k]
  ------------------
  122|      0|    case UNW_X86_64_R14: addr = &uc->uc_mcontext.gregs[REG_R14]; break;
  ------------------
  |  Branch (122:5): [True: 0, False: 6.06k]
  ------------------
  123|      0|    case UNW_X86_64_R15: addr = &uc->uc_mcontext.gregs[REG_R15]; break;
  ------------------
  |  Branch (123:5): [True: 0, False: 6.06k]
  ------------------
  124|      0|    case UNW_X86_64_RDI: addr = &uc->uc_mcontext.gregs[REG_RDI]; break;
  ------------------
  |  Branch (124:5): [True: 0, False: 6.06k]
  ------------------
  125|      0|    case UNW_X86_64_RSI: addr = &uc->uc_mcontext.gregs[REG_RSI]; break;
  ------------------
  |  Branch (125:5): [True: 0, False: 6.06k]
  ------------------
  126|      0|    case UNW_X86_64_RBP: addr = &uc->uc_mcontext.gregs[REG_RBP]; break;
  ------------------
  |  Branch (126:5): [True: 0, False: 6.06k]
  ------------------
  127|      0|    case UNW_X86_64_RBX: addr = &uc->uc_mcontext.gregs[REG_RBX]; break;
  ------------------
  |  Branch (127:5): [True: 0, False: 6.06k]
  ------------------
  128|      0|    case UNW_X86_64_RDX: addr = &uc->uc_mcontext.gregs[REG_RDX]; break;
  ------------------
  |  Branch (128:5): [True: 0, False: 6.06k]
  ------------------
  129|      0|    case UNW_X86_64_RAX: addr = &uc->uc_mcontext.gregs[REG_RAX]; break;
  ------------------
  |  Branch (129:5): [True: 0, False: 6.06k]
  ------------------
  130|      0|    case UNW_X86_64_RCX: addr = &uc->uc_mcontext.gregs[REG_RCX]; break;
  ------------------
  |  Branch (130:5): [True: 0, False: 6.06k]
  ------------------
  131|  6.06k|    case UNW_X86_64_RSP: addr = &uc->uc_mcontext.gregs[REG_RSP]; break;
  ------------------
  |  Branch (131:5): [True: 6.06k, False: 0]
  ------------------
  132|      0|    case UNW_X86_64_RIP: addr = &uc->uc_mcontext.gregs[REG_RIP]; break;
  ------------------
  |  Branch (132:5): [True: 0, False: 6.06k]
  ------------------
  133|       |
  134|      0|    default:
  ------------------
  |  Branch (134:5): [True: 0, False: 6.06k]
  ------------------
  135|      0|      addr = NULL;
  136|  6.06k|    }
  137|  6.06k|  return addr;
  138|  6.06k|}

_ULx86_64_access_reg:
   67|  66.4k|{
   68|  66.4k|  dwarf_loc_t loc = DWARF_NULL_LOC;
  ------------------
  |  |  155|  66.4k|# define DWARF_NULL_LOC         DWARF_LOC (0, 0)
  |  |  ------------------
  |  |  |  |  150|  66.4k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
   69|  66.4k|  unsigned int mask;
   70|  66.4k|  int arg_num;
   71|       |
   72|  66.4k|  switch (reg)
   73|  66.4k|    {
   74|       |
   75|      0|    case UNW_X86_64_RIP:
  ------------------
  |  Branch (75:5): [True: 0, False: 66.4k]
  ------------------
   76|      0|      if (write)
  ------------------
  |  Branch (76:11): [True: 0, False: 0]
  ------------------
   77|      0|        c->dwarf.ip = *valp;            /* also update the RIP cache */
   78|      0|      loc = c->dwarf.loc[RIP];
  ------------------
  |  |   59|      0|#define RIP     16
  ------------------
   79|      0|      break;
   80|       |
   81|    320|    case UNW_X86_64_CFA:
  ------------------
  |  Branch (81:5): [True: 320, False: 66.0k]
  ------------------
   82|    320|      if (write)
  ------------------
  |  Branch (82:11): [True: 0, False: 320]
  ------------------
   83|      0|        return -UNW_EREADONLYREG;
   84|    320|      *valp = c->dwarf.cfa;
   85|    320|      return 0;
   86|       |
   87|    344|    case UNW_X86_64_RAX:
  ------------------
  |  Branch (87:5): [True: 344, False: 66.0k]
  ------------------
   88|  2.92k|    case UNW_X86_64_RDX:
  ------------------
  |  Branch (88:5): [True: 2.57k, False: 63.8k]
  ------------------
   89|  2.92k|      arg_num = reg - UNW_X86_64_RAX;
   90|  2.92k|      mask = (1 << arg_num);
   91|  2.92k|      if (write)
  ------------------
  |  Branch (91:11): [True: 0, False: 2.92k]
  ------------------
   92|      0|        {
   93|      0|          c->dwarf.eh_args[arg_num] = *valp;
   94|      0|          c->dwarf.eh_valid_mask |= mask;
   95|      0|          return 0;
   96|      0|        }
   97|  2.92k|      else if ((c->dwarf.eh_valid_mask & mask) != 0)
  ------------------
  |  Branch (97:16): [True: 0, False: 2.92k]
  ------------------
   98|      0|        {
   99|      0|          *valp = c->dwarf.eh_args[arg_num];
  100|      0|          return 0;
  101|      0|        }
  102|  2.92k|      else
  103|  2.92k|        loc = c->dwarf.loc[(reg == UNW_X86_64_RAX) ? RAX : RDX];
  ------------------
  |  |   43|    344|#define RAX     0
  ------------------
                      loc = c->dwarf.loc[(reg == UNW_X86_64_RAX) ? RAX : RDX];
  ------------------
  |  |   44|  2.57k|#define RDX     1
  ------------------
  |  Branch (103:28): [True: 344, False: 2.57k]
  ------------------
  104|  2.92k|      break;
  105|       |
  106|  2.92k|    case UNW_X86_64_RCX: loc = c->dwarf.loc[RCX]; break;
  ------------------
  |  |   45|    368|#define RCX     2
  ------------------
  |  Branch (106:5): [True: 368, False: 66.0k]
  ------------------
  107|    264|    case UNW_X86_64_RBX: loc = c->dwarf.loc[RBX]; break;
  ------------------
  |  |   46|    264|#define RBX     3
  ------------------
  |  Branch (107:5): [True: 264, False: 66.1k]
  ------------------
  108|       |
  109|  12.3k|    case UNW_X86_64_RSP: loc = c->dwarf.loc[RSP]; break;
  ------------------
  |  |   50|  12.3k|#define RSP     7
  ------------------
  |  Branch (109:5): [True: 12.3k, False: 54.0k]
  ------------------
  110|  43.0k|    case UNW_X86_64_RBP: loc = c->dwarf.loc[RBP]; break;
  ------------------
  |  |   49|  43.0k|#define RBP     6
  ------------------
  |  Branch (110:5): [True: 43.0k, False: 23.3k]
  ------------------
  111|  1.15k|    case UNW_X86_64_RSI: loc = c->dwarf.loc[RSI]; break;
  ------------------
  |  |   47|  1.15k|#define RSI     4
  ------------------
  |  Branch (111:5): [True: 1.15k, False: 65.2k]
  ------------------
  112|    440|    case UNW_X86_64_RDI: loc = c->dwarf.loc[RDI]; break;
  ------------------
  |  |   48|    440|#define RDI     5
  ------------------
  |  Branch (112:5): [True: 440, False: 65.9k]
  ------------------
  113|    208|    case UNW_X86_64_R8: loc = c->dwarf.loc[R8]; break;
  ------------------
  |  |   51|    208|#define R8      8
  ------------------
  |  Branch (113:5): [True: 208, False: 66.2k]
  ------------------
  114|    560|    case UNW_X86_64_R9: loc = c->dwarf.loc[R9]; break;
  ------------------
  |  |   52|    560|#define R9      9
  ------------------
  |  Branch (114:5): [True: 560, False: 65.8k]
  ------------------
  115|    296|    case UNW_X86_64_R10: loc = c->dwarf.loc[R10]; break;
  ------------------
  |  |   53|    296|#define R10     10
  ------------------
  |  Branch (115:5): [True: 296, False: 66.1k]
  ------------------
  116|    872|    case UNW_X86_64_R11: loc = c->dwarf.loc[R11]; break;
  ------------------
  |  |   54|    872|#define R11     11
  ------------------
  |  Branch (116:5): [True: 872, False: 65.5k]
  ------------------
  117|    512|    case UNW_X86_64_R12: loc = c->dwarf.loc[R12]; break;
  ------------------
  |  |   55|    512|#define R12     12
  ------------------
  |  Branch (117:5): [True: 512, False: 65.8k]
  ------------------
  118|    376|    case UNW_X86_64_R13: loc = c->dwarf.loc[R13]; break;
  ------------------
  |  |   56|    376|#define R13     13
  ------------------
  |  Branch (118:5): [True: 376, False: 66.0k]
  ------------------
  119|    384|    case UNW_X86_64_R14: loc = c->dwarf.loc[R14]; break;
  ------------------
  |  |   57|    384|#define R14     14
  ------------------
  |  Branch (119:5): [True: 384, False: 66.0k]
  ------------------
  120|    192|    case UNW_X86_64_R15: loc = c->dwarf.loc[R15]; break;
  ------------------
  |  |   58|    192|#define R15     15
  ------------------
  |  Branch (120:5): [True: 192, False: 66.2k]
  ------------------
  121|       |
  122|  2.10k|    default:
  ------------------
  |  Branch (122:5): [True: 2.10k, False: 64.3k]
  ------------------
  123|  2.10k|      Debug (1, "bad register number %u\n", reg);
  124|  2.10k|      return -UNW_EBADREG;
  125|  66.4k|    }
  126|       |
  127|  63.9k|  if (write)
  ------------------
  |  Branch (127:7): [True: 0, False: 63.9k]
  ------------------
  128|      0|    return dwarf_put (&c->dwarf, loc, *valp);
  129|  63.9k|  else
  130|  63.9k|    return dwarf_get (&c->dwarf, loc, valp);
  131|  63.9k|}

_ULx86_64_step:
  389|  54.5k|{
  390|  54.5k|  struct cursor *c = (struct cursor *) cursor;
  391|  54.5k|  int val = 0;
  392|  54.5k|#if CONSERVATIVE_CHECKS
  393|  54.5k|  if (c->dwarf.as == unw_local_addr_space) {
  ------------------
  |  |  274|  54.5k|#define unw_local_addr_space		UNW_OBJ(local_addr_space)
  |  |  ------------------
  |  |  |  |   48|  54.5k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  54.5k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  54.5k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (393:7): [True: 54.5k, False: 0]
  ------------------
  394|  54.5k|    val = dwarf_get_validate(&c->dwarf);
  395|  54.5k|    dwarf_set_validate (&c->dwarf, 1);
  396|  54.5k|  }
  397|  54.5k|#endif
  398|       |
  399|  54.5k|  Debug (1, "(cursor=%p, ip=0x%016lx, cfa=0x%016lx)\n",
  400|  54.5k|         c, c->dwarf.ip, c->dwarf.cfa);
  401|       |
  402|       |  /* Try DWARF-based unwinding... */
  403|  54.5k|  c->sigcontext_format = X86_64_SCF_NONE;
  404|  54.5k|  int ret = dwarf_step (&c->dwarf);
  ------------------
  |  |  403|  54.5k|#define dwarf_step                      UNW_OBJ (dwarf_step)
  |  |  ------------------
  |  |  |  |   48|  54.5k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  54.5k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  54.5k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  405|       |
  406|  54.5k|#if CONSERVATIVE_CHECKS
  407|  54.5k|  if (c->dwarf.as == unw_local_addr_space) {
  ------------------
  |  |  274|  54.5k|#define unw_local_addr_space		UNW_OBJ(local_addr_space)
  |  |  ------------------
  |  |  |  |   48|  54.5k|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  54.5k|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  54.5k|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (407:7): [True: 54.5k, False: 0]
  ------------------
  408|  54.5k|    dwarf_set_validate (&c->dwarf, val);
  409|  54.5k|  }
  410|  54.5k|#endif
  411|       |
  412|  54.5k|  if (ret < 0 && ret != -UNW_ENOINFO)
  ------------------
  |  Branch (412:7): [True: 0, False: 54.5k]
  |  Branch (412:18): [True: 0, False: 0]
  ------------------
  413|      0|    {
  414|      0|      Debug (2, "failure in dwarf_step(), returning %d\n", ret);
  415|      0|      return ret;
  416|      0|    }
  417|       |
  418|  54.5k|  if (ret == -UNW_ENOINFO)
  ------------------
  |  Branch (418:7): [True: 0, False: 54.5k]
  ------------------
  419|      0|    {
  420|       |      /*
  421|       |       * DWARF stepping failed. Use fallback strategies.
  422|       |       */
  423|      0|      if (c->dwarf.as == unw_local_addr_space) {
  ------------------
  |  |  274|      0|#define unw_local_addr_space		UNW_OBJ(local_addr_space)
  |  |  ------------------
  |  |  |  |   48|      0|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      0|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (423:11): [True: 0, False: 0]
  ------------------
  424|      0|        val = dwarf_get_validate (&c->dwarf);
  425|      0|        dwarf_set_validate (&c->dwarf, 1);
  426|      0|      }
  427|       |
  428|      0|      unw_word_t prev_ip = c->dwarf.ip;
  429|      0|      unw_word_t prev_cfa = c->dwarf.cfa;
  430|       |
  431|      0|      Debug (2, "dwarf_step() failed, trying fallback heuristics\n");
  432|      0|      ret = _unw_step_fallback (c, cursor);
  433|       |
  434|       |      /*
  435|       |       * Check for infinite call chain loops or no successful stepping.
  436|       |       * If this situation is detected, assume the end of the call chain because
  437|       |       * that's how it works on some OSes.
  438|       |       */
  439|      0|      if (ret >= 0 && c->dwarf.ip == prev_ip && c->dwarf.cfa == prev_cfa)
  ------------------
  |  Branch (439:11): [True: 0, False: 0]
  |  Branch (439:23): [True: 0, False: 0]
  |  Branch (439:49): [True: 0, False: 0]
  ------------------
  440|      0|        {
  441|      0|          Debug (2, "infinite call chain loop detected\n");
  442|      0|          ret = 0;
  443|      0|        }
  444|       |
  445|      0|      if (c->dwarf.as == unw_local_addr_space) {
  ------------------
  |  |  274|      0|#define unw_local_addr_space		UNW_OBJ(local_addr_space)
  |  |  ------------------
  |  |  |  |   48|      0|#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      0|#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define UNW_PASTE2(x,y)	x##y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (445:11): [True: 0, False: 0]
  ------------------
  446|      0|        dwarf_set_validate (&c->dwarf, val);
  447|      0|      }
  448|      0|    }
  449|       |
  450|       |  /*
  451|       |   * If stepping was successful, increment the frame counter.
  452|       |   */
  453|  54.5k|  if (ret >= 0)
  ------------------
  |  Branch (453:7): [True: 54.5k, False: 0]
  ------------------
  454|  54.5k|    {
  455|  54.5k|    	++c->frames;
  456|  54.5k|    }
  457|       |
  458|  54.5k|  Debug (2, "returning %d\n", ret);
  459|  54.5k|  return ret;
  460|  54.5k|}

Linit_local.c:common_init:
   46|  6.06k|{
   47|  6.06k|  int ret;
   48|       |
   49|  6.06k|  c->dwarf.loc[RAX] = REG_INIT_LOC(c, rax, RAX);
  ------------------
  |  |   43|  6.06k|#define RAX     0
  ------------------
                c->dwarf.loc[RAX] = REG_INIT_LOC(c, rax, RAX);
  ------------------
  |  |   33|  6.06k|    DWARF_LOC ((unw_word_t) &dwarf_get_uc(&c->dwarf)->uc_mcontext.gregs[REG_ ## ruc], 0)
  |  |  ------------------
  |  |  |  |  150|  6.06k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
   50|  6.06k|  c->dwarf.loc[RDX] = REG_INIT_LOC(c, rdx, RDX);
  ------------------
  |  |   44|  6.06k|#define RDX     1
  ------------------
                c->dwarf.loc[RDX] = REG_INIT_LOC(c, rdx, RDX);
  ------------------
  |  |   33|  6.06k|    DWARF_LOC ((unw_word_t) &dwarf_get_uc(&c->dwarf)->uc_mcontext.gregs[REG_ ## ruc], 0)
  |  |  ------------------
  |  |  |  |  150|  6.06k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
   51|  6.06k|  c->dwarf.loc[RCX] = REG_INIT_LOC(c, rcx, RCX);
  ------------------
  |  |   45|  6.06k|#define RCX     2
  ------------------
                c->dwarf.loc[RCX] = REG_INIT_LOC(c, rcx, RCX);
  ------------------
  |  |   33|  6.06k|    DWARF_LOC ((unw_word_t) &dwarf_get_uc(&c->dwarf)->uc_mcontext.gregs[REG_ ## ruc], 0)
  |  |  ------------------
  |  |  |  |  150|  6.06k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
   52|  6.06k|  c->dwarf.loc[RBX] = REG_INIT_LOC(c, rbx, RBX);
  ------------------
  |  |   46|  6.06k|#define RBX     3
  ------------------
                c->dwarf.loc[RBX] = REG_INIT_LOC(c, rbx, RBX);
  ------------------
  |  |   33|  6.06k|    DWARF_LOC ((unw_word_t) &dwarf_get_uc(&c->dwarf)->uc_mcontext.gregs[REG_ ## ruc], 0)
  |  |  ------------------
  |  |  |  |  150|  6.06k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
   53|  6.06k|  c->dwarf.loc[RSI] = REG_INIT_LOC(c, rsi, RSI);
  ------------------
  |  |   47|  6.06k|#define RSI     4
  ------------------
                c->dwarf.loc[RSI] = REG_INIT_LOC(c, rsi, RSI);
  ------------------
  |  |   33|  6.06k|    DWARF_LOC ((unw_word_t) &dwarf_get_uc(&c->dwarf)->uc_mcontext.gregs[REG_ ## ruc], 0)
  |  |  ------------------
  |  |  |  |  150|  6.06k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
   54|  6.06k|  c->dwarf.loc[RDI] = REG_INIT_LOC(c, rdi, RDI);
  ------------------
  |  |   48|  6.06k|#define RDI     5
  ------------------
                c->dwarf.loc[RDI] = REG_INIT_LOC(c, rdi, RDI);
  ------------------
  |  |   33|  6.06k|    DWARF_LOC ((unw_word_t) &dwarf_get_uc(&c->dwarf)->uc_mcontext.gregs[REG_ ## ruc], 0)
  |  |  ------------------
  |  |  |  |  150|  6.06k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
   55|  6.06k|  c->dwarf.loc[RBP] = REG_INIT_LOC(c, rbp, RBP);
  ------------------
  |  |   49|  6.06k|#define RBP     6
  ------------------
                c->dwarf.loc[RBP] = REG_INIT_LOC(c, rbp, RBP);
  ------------------
  |  |   33|  6.06k|    DWARF_LOC ((unw_word_t) &dwarf_get_uc(&c->dwarf)->uc_mcontext.gregs[REG_ ## ruc], 0)
  |  |  ------------------
  |  |  |  |  150|  6.06k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
   56|  6.06k|  c->dwarf.loc[RSP] = REG_INIT_LOC(c, rsp, RSP);
  ------------------
  |  |   50|  6.06k|#define RSP     7
  ------------------
                c->dwarf.loc[RSP] = REG_INIT_LOC(c, rsp, RSP);
  ------------------
  |  |   33|  6.06k|    DWARF_LOC ((unw_word_t) &dwarf_get_uc(&c->dwarf)->uc_mcontext.gregs[REG_ ## ruc], 0)
  |  |  ------------------
  |  |  |  |  150|  6.06k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
   57|  6.06k|  c->dwarf.loc[R8]  = REG_INIT_LOC(c, r8,  R8);
  ------------------
  |  |   51|  6.06k|#define R8      8
  ------------------
                c->dwarf.loc[R8]  = REG_INIT_LOC(c, r8,  R8);
  ------------------
  |  |   33|  6.06k|    DWARF_LOC ((unw_word_t) &dwarf_get_uc(&c->dwarf)->uc_mcontext.gregs[REG_ ## ruc], 0)
  |  |  ------------------
  |  |  |  |  150|  6.06k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
   58|  6.06k|  c->dwarf.loc[R9]  = REG_INIT_LOC(c, r9,  R9);
  ------------------
  |  |   52|  6.06k|#define R9      9
  ------------------
                c->dwarf.loc[R9]  = REG_INIT_LOC(c, r9,  R9);
  ------------------
  |  |   33|  6.06k|    DWARF_LOC ((unw_word_t) &dwarf_get_uc(&c->dwarf)->uc_mcontext.gregs[REG_ ## ruc], 0)
  |  |  ------------------
  |  |  |  |  150|  6.06k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
   59|  6.06k|  c->dwarf.loc[R10] = REG_INIT_LOC(c, r10, R10);
  ------------------
  |  |   53|  6.06k|#define R10     10
  ------------------
                c->dwarf.loc[R10] = REG_INIT_LOC(c, r10, R10);
  ------------------
  |  |   33|  6.06k|    DWARF_LOC ((unw_word_t) &dwarf_get_uc(&c->dwarf)->uc_mcontext.gregs[REG_ ## ruc], 0)
  |  |  ------------------
  |  |  |  |  150|  6.06k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
   60|  6.06k|  c->dwarf.loc[R11] = REG_INIT_LOC(c, r11, R11);
  ------------------
  |  |   54|  6.06k|#define R11     11
  ------------------
                c->dwarf.loc[R11] = REG_INIT_LOC(c, r11, R11);
  ------------------
  |  |   33|  6.06k|    DWARF_LOC ((unw_word_t) &dwarf_get_uc(&c->dwarf)->uc_mcontext.gregs[REG_ ## ruc], 0)
  |  |  ------------------
  |  |  |  |  150|  6.06k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
   61|  6.06k|  c->dwarf.loc[R12] = REG_INIT_LOC(c, r12, R12);
  ------------------
  |  |   55|  6.06k|#define R12     12
  ------------------
                c->dwarf.loc[R12] = REG_INIT_LOC(c, r12, R12);
  ------------------
  |  |   33|  6.06k|    DWARF_LOC ((unw_word_t) &dwarf_get_uc(&c->dwarf)->uc_mcontext.gregs[REG_ ## ruc], 0)
  |  |  ------------------
  |  |  |  |  150|  6.06k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
   62|  6.06k|  c->dwarf.loc[R13] = REG_INIT_LOC(c, r13, R13);
  ------------------
  |  |   56|  6.06k|#define R13     13
  ------------------
                c->dwarf.loc[R13] = REG_INIT_LOC(c, r13, R13);
  ------------------
  |  |   33|  6.06k|    DWARF_LOC ((unw_word_t) &dwarf_get_uc(&c->dwarf)->uc_mcontext.gregs[REG_ ## ruc], 0)
  |  |  ------------------
  |  |  |  |  150|  6.06k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
   63|  6.06k|  c->dwarf.loc[R14] = REG_INIT_LOC(c, r14, R14);
  ------------------
  |  |   57|  6.06k|#define R14     14
  ------------------
                c->dwarf.loc[R14] = REG_INIT_LOC(c, r14, R14);
  ------------------
  |  |   33|  6.06k|    DWARF_LOC ((unw_word_t) &dwarf_get_uc(&c->dwarf)->uc_mcontext.gregs[REG_ ## ruc], 0)
  |  |  ------------------
  |  |  |  |  150|  6.06k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
   64|  6.06k|  c->dwarf.loc[R15] = REG_INIT_LOC(c, r15, R15);
  ------------------
  |  |   58|  6.06k|#define R15     15
  ------------------
                c->dwarf.loc[R15] = REG_INIT_LOC(c, r15, R15);
  ------------------
  |  |   33|  6.06k|    DWARF_LOC ((unw_word_t) &dwarf_get_uc(&c->dwarf)->uc_mcontext.gregs[REG_ ## ruc], 0)
  |  |  ------------------
  |  |  |  |  150|  6.06k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
   65|  6.06k|  c->dwarf.loc[RIP] = REG_INIT_LOC(c, rip, RIP);
  ------------------
  |  |   59|  6.06k|#define RIP     16
  ------------------
                c->dwarf.loc[RIP] = REG_INIT_LOC(c, rip, RIP);
  ------------------
  |  |   33|  6.06k|    DWARF_LOC ((unw_word_t) &dwarf_get_uc(&c->dwarf)->uc_mcontext.gregs[REG_ ## ruc], 0)
  |  |  ------------------
  |  |  |  |  150|  6.06k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  ------------------
   66|       |
   67|  6.06k|  ret = dwarf_get (&c->dwarf, c->dwarf.loc[RIP], &c->dwarf.ip);
  ------------------
  |  |   59|  6.06k|#define RIP     16
  ------------------
   68|  6.06k|  if (ret < 0)
  ------------------
  |  Branch (68:7): [True: 0, False: 6.06k]
  ------------------
   69|      0|    return ret;
   70|       |
   71|  6.06k|  ret = dwarf_get (&c->dwarf, DWARF_REG_LOC (&c->dwarf, UNW_X86_64_RSP),
  ------------------
  |  |  157|  6.06k|# define DWARF_REG_LOC(c,r)     (DWARF_LOC((unw_word_t)                      \
  |  |  ------------------
  |  |  |  |  150|  6.06k|# define DWARF_LOC(r, t)        ((dwarf_loc_t) { .val = (r), .type = (t) })
  |  |  ------------------
  |  |  158|  6.06k|                                 x86_64_r_uc_addr(dwarf_get_uc(c), (r)), 0))
  ------------------
   72|  6.06k|                   &c->dwarf.cfa);
   73|  6.06k|  if (ret < 0)
  ------------------
  |  Branch (73:7): [True: 0, False: 6.06k]
  ------------------
   74|      0|    return ret;
   75|       |
   76|  6.06k|  c->sigcontext_format = X86_64_SCF_NONE;
   77|  6.06k|  c->sigcontext_addr = 0;
   78|       |
   79|  6.06k|  c->dwarf.args_size = 0;
   80|  6.06k|  c->dwarf.stash_frames = 0;
   81|  6.06k|  c->dwarf.use_prev_instr = use_prev_instr;
   82|  6.06k|  c->dwarf.pi_valid = 0;
   83|  6.06k|  c->dwarf.pi_is_dynamic = 0;
   84|  6.06k|  c->dwarf.hint = 0;
   85|  6.06k|  c->dwarf.prev_rs = 0;
   86|  6.06k|  c->dwarf.eh_valid_mask = 0;
   87|       |
   88|  6.06k|  return 0;
   89|  6.06k|}

