Commit Graph

8 Commits

Author SHA1 Message Date
9b05f5c0a5 libsysprof-analyze: make CSTRING helper more succinct to use 2023-04-27 17:14:19 -07:00
1182b65c07 libsysprof-analyze: add CString helper
This checks, up to the end of the frame, that we have a valid \0 for the
CString before passing it back to the caller. Otherwise, NULL is returned
for a corrupt/invalid CString within the frame.
2023-04-27 16:59:41 -07:00
97c93ea965 libsysprof-analyze: track frame length
That way we don't have to decode this too in the subclasses.
2023-04-25 17:09:04 -07:00
62863f08c3 libsysprof-analyze: add various bswap and cast helpers 2023-04-25 17:08:13 -07:00
e9d5cb733d libsysprof-analyze: move to internal types for documents
We want to have an object hierarchy, but we don't want to expose our class
or other internal details to the public API/ABI. This uses the old form of
class definition so we can maintain that.

An alternative would be to do what GDK does for internal types, should we
find that easier to maintain going forward.
2023-04-25 16:19:54 -07:00
a5dafa5409 libsysprof-analyze: rename some private API
prefix with _, use frame type directly, use needs_swap rather than
is_native so it's more clear to readers.
2023-04-25 16:11:59 -07:00
69930dc876 libsysprof-analyze: read property access to frame header
Also handle swapping the data when non-native endian so that we can leave
our GMappedFile unperturbed (and therefore not have to keep those bytes as
dirty pages in process).
2023-04-25 15:55:41 -07:00
31003c519c libsysprof-analyze: rename to SysprofDocumentFrame
We will eventually be adding sub-types for the various frame types, and
use this as a common ancestor for item inflation.
2023-04-25 15:32:55 -07:00