cr_read(3) Library Functions Manual cr_read(3)NAME
cr_read - read from crash dump
SYNOPSIS DESCRIPTION
The function attempts to read the memory area defined by mem_page and num_pages into the buffer pointed to by buf from the crash dump
opened using crash_cb.
The starts at the position in the crash dump associated with the physical memory offset given by mem_page. If the physical memory page
mem_page does not exist in the crash dump, sets *num_pages to 0 and returns 0.
No data transfer will occur past a page of memory that does not exist in the crash dump. If the starting position, mem_page, plus the read
length, *num_pages, goes past an area of memory that does not exist in the crash dump, sets *num_pages to the number of consecutive pages
(starting at mem_page) actually read.
RETURN VALUE
Returns zero for success. Other possible return values are described in libcrash(5).
EXAMPLES
Assuming a process opened a crash dump, the following call to cr_read(3) reads the first pages from the crash dump into the buffer pointed
to by mybuf:
WARNINGS
may return fewer pages than requested due to implementation details. Always check the number of pages returned. If they are fewer than
requested, issue a new request starting at the first page not returned. Only if that new request reads zero pages (or returns an error)
can you be sure that the page was not dumped.
AUTHOR
was developed by HP.
SEE ALSO cr_open(3), libcrash(5).
cr_read(3)