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

Function read_uint64

Dependencies/tracy/libbacktrace/dwarf.cpp:884–901  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

882/* Read a uint64 from BUF and advance 8 bytes. */
883
884static uint64_t
885read_uint64 (struct dwarf_buf *buf)
886{
887 const unsigned char *p = buf->buf;
888
889 if (!advance (buf, 8))
890 return 0;
891 if (buf->is_bigendian)
892 return (((uint64_t) p[0] << 56) | ((uint64_t) p[1] << 48)
893 | ((uint64_t) p[2] << 40) | ((uint64_t) p[3] << 32)
894 | ((uint64_t) p[4] << 24) | ((uint64_t) p[5] << 16)
895 | ((uint64_t) p[6] << 8) | (uint64_t) p[7]);
896 else
897 return (((uint64_t) p[7] << 56) | ((uint64_t) p[6] << 48)
898 | ((uint64_t) p[5] << 40) | ((uint64_t) p[4] << 32)
899 | ((uint64_t) p[3] << 24) | ((uint64_t) p[2] << 16)
900 | ((uint64_t) p[1] << 8) | (uint64_t) p[0]);
901}
902
903/* Read an offset from BUF and advance the appropriate number of
904 bytes. */

Callers 5

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

Calls 1

advanceFunction · 0.70

Tested by

no test coverage detected