MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / read_uint32

Function read_uint32

Dependencies/tracy/libbacktrace/dwarf.cpp:867–880  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

865/* Read a uint32 from BUF and advance 4 bytes. */
866
867static uint32_t
868read_uint32 (struct dwarf_buf *buf)
869{
870 const unsigned char *p = buf->buf;
871
872 if (!advance (buf, 4))
873 return 0;
874 if (buf->is_bigendian)
875 return (((uint32_t) p[0] << 24) | ((uint32_t) p[1] << 16)
876 | ((uint32_t) p[2] << 8) | (uint32_t) p[3]);
877 else
878 return (((uint32_t) p[3] << 24) | ((uint32_t) p[2] << 16)
879 | ((uint32_t) p[1] << 8) | (uint32_t) p[0]);
880}
881
882/* Read a uint64 from BUF and advance 8 bytes. */
883

Callers 4

read_offsetFunction · 0.85
read_addressFunction · 0.85
read_initial_lengthFunction · 0.85
read_attributeFunction · 0.85

Calls 1

advanceFunction · 0.70

Tested by

no test coverage detected