From: Victor M. <ma...@fh...> - 2018-04-05 07:25:12
|
On Mittwoch, 4. April 2018 22:31:58 CEST Joachim Schimpf wrote: > On 04/04/18 15:04, Victor Mataré wrote: > > Hello, > > > > I'm trying to debug/trace eclipse code that is being called from an > > instance embedded in C++ code, but I can't seem to trigger interactive > > tracing. trace(p) does not trigger tracing for p, and trace/0 or debug/0 > > cannot even be called. I.e. in C++ i do: > > > > post_goal(EC_atom("trace")); > > EC_resume(); > > > > Which results in: > > > > calling an undefined procedure profile : trace in module eclipse > > > > However I'm not even sure EC_atom is the correct way of referencing a > > predicate with arity 0. Can't find anything covering this in the > > documentation either. trace/0 also seems to be in none of the standard > > modules, for example when I get a list of all available modules in a > > plain interactive eclipse: > > > > [eclipse 14]: findall(M, current_module(M), L), writeln(L). > > [eclipse, sepia_kernel, dfid, eclipse_language, profile, toplevel, > > ecl_compiler, tracer_tty, suspend, development_support, lists] > > > > Then trace/0 doesn't seem to be in any of them, i.e. any of eclipse/trace, > > sepia_kernel/trace, ... yield the same error as above. > > > > So what's going on here? How do I trace embedded code? > > Hi Victor, > > trace/0 and debug/0 are not actually predicates, they are commands > interpreted by the interactive toplevel. trace/1 is in principle the > correct predicate to use, but in an embedded situation you have to load any > development tools explicitly beforehand. > > You can use either the command line tools or the graphical tools. For > reference, I have summarized the necessary steps on our wiki at > > http://eclipseclp.org/wiki/Examples/DebuggingEmbeddedECLiPSeCode > > Let me know if anything is unclear! > > > Cheers, > Joachim > > ---------------------------------------------------------------------------- > -- Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > ECLiPSe-CLP-Users mailing list > ECL...@li... > https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users Thanks Joachim, that looks awesome. Didn't even know about this wiki before. From a quick glance it looks very informative. The only thing that's unclear to me is why you're recommending against using interactive debugging in an embedded application in general. Best regards, Victor |