From d3ac331e3666b95bb0e601ca21768a119c3a0cd1 Mon Sep 17 00:00:00 2001 From: "gergely.erdelyi" Date: Tue, 27 Jan 2009 17:27:54 +0000 Subject: [PATCH] idd.i: Wrapper functions to access debug_event_t. Patch by Igor Skochinsky --- swig/idd.i | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/swig/idd.i b/swig/idd.i index ac38927..205297b 100644 --- a/swig/idd.i +++ b/swig/idd.i @@ -1,3 +1,55 @@ -%ignore debugger_t; - -%include "idd.hpp" +%ignore debugger_t; + +%include "idd.hpp" + +%inline %{ + +char get_event_module_name(const debug_event_t* ev, char *buf, size_t bufsize) +{ + qstrncpy(buf, ev->modinfo.name, bufsize); + return true; +} + +ea_t get_event_module_base(const debug_event_t* ev) +{ + return ev->modinfo.base; +} + +asize_t get_event_module_size(const debug_event_t* ev) +{ + return ev->modinfo.size; +} + +char get_event_exc_info(const debug_event_t* ev, char *buf, size_t bufsize) +{ + qstrncpy(buf, ev->exc.info, bufsize); + return true; +} + +char get_event_info(const debug_event_t* ev, char *buf, size_t bufsize) +{ + qstrncpy(buf, ev->info, bufsize); + return true; +} + +ea_t get_event_bpt_hea(const debug_event_t* ev) +{ + return ev->bpt.hea; +} + +uint get_event_exc_code(const debug_event_t* ev) +{ + return ev->exc.code; +} + +ea_t get_event_exc_ea(const debug_event_t* ev) +{ + return ev->exc.ea; +} + +bool can_exc_continue(const debug_event_t* ev) +{ + return ev->exc.can_cont; +} + +%}