summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/mdso/mdso.h10
-rw-r--r--src/logic/mdso_map_input.c3
2 files changed, 12 insertions, 1 deletions
diff --git a/include/mdso/mdso.h b/include/mdso/mdso.h
index 1cceb7b..d8c5057 100644
--- a/include/mdso/mdso.h
+++ b/include/mdso/mdso.h
@@ -44,6 +44,16 @@ extern "C" {
#define MDSO_ERROR_CHILD 0x0004
#define MDSO_ERROR_CUSTOM 0x0008
+enum mdso_custom_error {
+ MDSO_ERR_FLOW_ERROR,
+ MDSO_ERR_FLEE_ERROR,
+ MDSO_ERR_NULL_CONTEXT,
+ MDSO_ERR_NULL_SOURCE,
+ MDSO_ERR_INVALID_CONTEXT,
+ MDSO_ERR_INVALID_SOURCE,
+ MDSO_ERR_SOURCE_SIZE_ZERO,
+ MDSO_ERR_CAP,
+};
struct mdso_source_version {
int major;
diff --git a/src/logic/mdso_map_input.c b/src/logic/mdso_map_input.c
index 592aaae..9dbdaff 100644
--- a/src/logic/mdso_map_input.c
+++ b/src/logic/mdso_map_input.c
@@ -42,7 +42,8 @@ int mdso_map_input(
return MDSO_SYSTEM_ERROR(dctx);
else if (st.st_size == 0)
- return MDSO_CUSTOM_ERROR(dctx,0);
+ return MDSO_CUSTOM_ERROR(
+ dctx,MDSO_ERR_SOURCE_SIZE_ZERO);
map->size = st.st_size;
map->addr = mmap(0,map->size,prot,MAP_PRIVATE,fd,0);