mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-17 05:37:38 +01:00
781d5d5263
for f in $(find src include -name '*.[ch]'); do expand -t 8 $f > $tmp; mv $tmp $f; done
20 lines
330 B
C
20 lines
330 B
C
#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;
|
|
}
|