ptal! Initially this CL was scoped only to the reg capture, but I wonder if this would be valuable everywhere?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
//! \brief Adds a property using `vm_read` for arbitrary-sized memory blocks.
//!
//! \return `true` if able to `vm_read` `value` `value_length` and write a
//! kProperty command with the `key` `value` `value_length` tuple.
//!
//! \note This method allocates a new VM page via `vm_read` in the calling
//! task's footprint. It should only be used for large memory reads
//! (e.g. thread stacks) where allocating a local stack buffer is unsafe.
bool AddPropertyBytesLarge(IntermediateDumpKey key,
const void* value,
size_t value_length);
//! \brief Adds a property using `vm_read_overwrite` and a local stack buffer.
//!
//! \return `true` if able to `vm_read_overwrite` `value` `value_length`
//! and write a kProperty command with the `key` `value` `value_length`
//! tuple.
//!
//! \note This method uses a `kMaxPropertyBytesSmallSize`-byte local stack
//! buffer to avoid allocating new virtual memory pages during the read.
//! `value_length` must be <= `kMaxPropertyBytesSmallSize`.
bool AddPropertyBytesSmall(IntermediateDumpKey key,
const void* value,
size_t value_length);
Can `AddPropertyBytes` take care of making the decision on its own, so we don’t need to pollute all of the call sites?
(Then `kMaxPropertyBytesSmallSize` wouldn’t need to be exposed either.)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |