Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!sun-barr!newstop!exodus!appserv!sun!quintus!dave From: dave@quintus.UUCP (David Bowen) Newsgroups: comp.lang.prolog Subject: Re: "Embedded Prolog" in C code Message-ID: <1533@quintus.UUCP> Date: 30 May 91 02:56:07 GMT References: <1991May26.231138.13000@brolga.cc.uq.oz.au> Reply-To: dbowen@quintus.com (David Bowen) Organization: Quintus Corporation Lines: 24 (I hope Andre Marien won't mind if I comment.) In article ted@nmsu.edu (Ted Dunning) writes: >you should consider the fact that embedding will almost always >seriously compromise debugging of the embedded code. this is >especially true of embedding c in a more advanced language. This is not an intrinsic limitation of Prolog or Lisp. Since release 2.5 Quintus Prolog has provided the ability to link your C code (and your Prolog code) with the Prolog system to get a standard executable file. You can then run standard debuggers like dbx to debug your C code, while simultaneously running the Prolog debugger. >there are two reasonable outs for this, one is to start the higher >level language from inside a c debugger (this assumes that you have >unstripped executables or .o files) and then after loading your c-code >into prolog (lisp) you break back to the debugger and set up >breakpoints and such. The problem with trying to debug C code that you have loaded into a running Prolog/Lisp system is that somehow you have to get the C debugger to understand where all the symbols are. In general C debuggers don't have the flexibility to do this.