🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #2267

Re: "Embedded Prolog" in C code

#2267
From: David Bowen
Date: Thu, 30 May 1991 02:56
24 lines
1699 bytes
(I hope Andre Marien won't mind if I comment.)

In article <TED.91May27100027@ithaka.nmsu.edu> 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.
Technical Details
Message-ID: <1533@quintus.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!sun-barr!newstop!exodus!appserv!sun!quintus!dave
References: <1991May26.231138.13000@brolga.cc.uq.oz.au> <TED.91May27100027@ithaka.nmsu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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> <TED.91May27100027@ithaka.nmsu.edu>
Reply-To: dbowen@quintus.com (David Bowen)
Organization: Quintus Corporation
Lines: 24