projects
/
platform
/
upstream
/
libunwind.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
8952e6357d21074070dd92a34502ef9d9f7a6a65
[platform/upstream/libunwind.git]
/
src
/
mi
/
_ReadULEB.c
1
#include <libunwind.h>
2
3
unw_word_t
4
_ReadULEB (unsigned char **dpp)
5
{
6
unsigned shift = 0;
7
unw_word_t byte, result = 0;
8
unsigned char *bp = *dpp;
9
10
while (1)
11
{
12
byte = *bp++;
13
result |= (byte & 0x7f) << shift;
14
if ((byte & 0x80) == 0)
15
break;
16
shift += 7;
17
}
18
*dpp = bp;
19
return result;
20
}