diff options
author | Mike Leach <mike.leach@linaro.org> | 2019-02-06 13:11:01 +0000 |
---|---|---|
committer | Mike Leach <mike.leach@linaro.org> | 2019-02-06 13:11:01 +0000 |
commit | 9afda9a0dcbea5e75767405072b581ef0afbb36d (patch) | |
tree | cb77e41ce139c464affedd434dbc014d35a95721 /decoder/include/opencsd/ocsd_if_types.h | |
parent | d28c326aaac0124def7a3f5d9a78bc53684d7c81 (diff) | |
download | OpenCSD-9afda9a0dcbea5e75767405072b581ef0afbb36d.tar.gz |
opencsd: Memory accessor - updates to handle incorrect accessor returns.
Updated cache and memory mappers to reject memory accessor returns that exceed
the requested byte amount. Fixes overrun issue that errors in callback
accessors could create if they returned -ve err codes instread of 0 bytes as
required
Adjusted optional cache stats code to be compile in and out.
Adjusted cache read in mapper to avoid double accessor call if 0 bytes
returned in cache load as accessor did not have address required
(highlighted by perf callbacks that "map" to entire memory space, but will
return 0 if addresses not covered by debug data.).
Signed-off-by: Mike Leach <mike.leach@linaro.org>
Diffstat (limited to 'decoder/include/opencsd/ocsd_if_types.h')
-rw-r--r-- | decoder/include/opencsd/ocsd_if_types.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/decoder/include/opencsd/ocsd_if_types.h b/decoder/include/opencsd/ocsd_if_types.h index 9a05e8c..cb5e462 100644 --- a/decoder/include/opencsd/ocsd_if_types.h +++ b/decoder/include/opencsd/ocsd_if_types.h @@ -126,6 +126,7 @@ typedef enum _ocsd_err_t { OCSD_ERR_MEM_ACC_FILE_NOT_FOUND, /**< Memory access file could not be opened */ OCSD_ERR_MEM_ACC_FILE_DIFF_RANGE, /**< Attempt to re-use the same memory access file for a different address range */ OCSD_ERR_MEM_ACC_RANGE_INVALID, /**< Address range in accessor set to invalid values */ + OCSD_ERR_MEM_ACC_BAD_LEN, /**< Memory accessor returned a bad read length value (larger than requested */ /* test errors - errors generated only by the test code, not the library */ OCSD_ERR_TEST_SNAPSHOT_PARSE, /**< test snapshot file parse error */ OCSD_ERR_TEST_SNAPSHOT_PARSE_INFO, /**< test snapshot file parse information */ |