SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE -fvisibility=hidden")
ADD_LIBRARY(libcrash-manager SHARED ${LIB_CRASH_MANAGER_SRCS})
SET_TARGET_PROPERTIES(libcrash-manager PROPERTIES SOVERSION 1)
return 1;
}
-static void free_crash_info(struct crash_info *cinfo)
+EXPORT void free_crash_info(struct crash_info *cinfo)
{
free(cinfo->cmd_line);
free(cinfo->cmd_path);
free(cinfo->call_stack_hash);
}
-void crash_info_init(struct crash_info *cinfo)
+EXPORT void crash_info_init(struct crash_info *cinfo)
{
cinfo->prstatus_fd = -1;
cinfo->livedump = false;
clean_temp(crash_temp_path);
}
-void crash_manager_free(struct crash_info *cinfo)
+EXPORT void crash_manager_free(struct crash_info *cinfo)
{
if (cinfo->prstatus_fd >= 0)
close(cinfo->prstatus_fd);
free_crash_info(cinfo);
}
-bool crash_manager_direct(struct crash_info *cinfo)
+EXPORT bool crash_manager_direct(struct crash_info *cinfo)
{
if (!crash_manager_prepare(cinfo))
return false;
return result;
}
-bool crash_manager_livedump_pid(pid_t pid, const char *dump_reason, char *report_path, size_t report_path_len)
+EXPORT bool crash_manager_livedump_pid(pid_t pid, const char *dump_reason, char *report_path, size_t report_path_len)
{
bool result = false;
struct crash_info cinfo;
#include <unistd.h>
#include <stdbool.h>
+#define EXPORT __attribute__ ((visibility ("default")))
+
/* Paths and variables */
struct crash_info {
bool livedump;
bool crash_manager_direct(struct crash_info *cinfo);
bool crash_manager_livedump_pid(pid_t pid, const char *dump_reason, char *report_path, size_t report_path_len);
-void crash_info_init(struct crash_info *cinfo);
void crash_manager_free(struct crash_info *cinfo);
+void crash_info_init(struct crash_info *cinfo);
+void free_crash_info(struct crash_info *cinfo);
#endif