liyujie
2025-08-28 b3810562527858a3b3d98ffa6e9c9c5b0f4a9a8e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <libunwind.h>
 
unw_word_t
_ReadULEB (unsigned char **dpp)
{
  unsigned shift = 0;
  unw_word_t byte, result = 0;
  unsigned char *bp = *dpp;
 
  while (1)
    {
      byte = *bp++;
      result |= (byte & 0x7f) << shift;
      if ((byte & 0x80) == 0)
   break;
      shift += 7;
    }
  *dpp = bp;
  return result;
}