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

Function read_string

Dependencies/tracy/libbacktrace/dwarf.cpp:792–807  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

790/* Read one zero-terminated string from BUF and advance past the string. */
791
792static const char *
793read_string (struct dwarf_buf *buf)
794{
795 const char *p = (const char *)buf->buf;
796 size_t len = strnlen (p, buf->left);
797
798 /* - If len == left, we ran out of buffer before finding the zero terminator.
799 Generate an error by advancing len + 1.
800 - If len < left, advance by len + 1 to skip past the zero terminator. */
801 size_t count = len + 1;
802
803 if (!advance (buf, count))
804 return NULL;
805
806 return p;
807}
808
809/* Read one byte from BUF and advance 1 byte. */
810

Callers 3

read_attributeFunction · 0.70
read_v2_pathsFunction · 0.70
read_line_programFunction · 0.70

Calls 1

advanceFunction · 0.70

Tested by

no test coverage detected