Hi, I am having a lot of trouble figuring out how to prevent the debugger
becoming active in embedded mode.

I have tried:
+ Calling ecl_disable_interrupts(); before cl_eval()
+ Executing the following in ecl: (setf *debugger-hook* #'debug-ignore)
+ And also this: (setf si::*interrupt-enable* nil)

Mmm... I want to evaluate something like
si_safe_eval(3,c_string_to_object("(vvvvformat t \"Hello\")"), Cnil,
OBJNULL);

and not have my program stop. Logging something would be fine.

When I execute the following code,


#define READCL(expr) (c_string_to_object(# expr))

int main(int argv, char* argv[]) {
char* exec_name = (char*) get_exec_name();
        cl_boot(1, &argv[0]);

        ecl_disable_interrupts();

        // Initialise the whispy-one lisp environment
        cl_eval(READCL((setf *debugger-hook* #'debug-ignore)));
        cl_eval(READCL((setf si::*interrupt-enable* nil)));

        // All good
        cl_eval(READCL((format t "Hello~%")));

        // Forces program to halt, reading from stdin
        cl_eval(READCL((vvvvformat t "Hello~%")));

        cl_shutdown();
}



I get this:
Hello

VVVVFORMAT
#<a UNDEFINED-FUNCTION>
Condition of type: SIMPLE-CONTROL-ERROR
Restart ABORT is not active.

No restarts available.

Top level in: #<process TOP-LEVEL>.
>

And my program is stuck. Logging something would be fine, but freezing the
program is no good.

Thanks in advance


------------------------------------------------------------------------------
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to