[Prev][Next][Index]

Re: Preserving line number information in Sage




On Thu, 1 Sep 1994, Diego Novillo wrote:

> On Thu, 1 Sep 1994, Bob Olson wrote:
> 
> > What you really want to do is add the cpp-style line number markers
> > (take a look at the output of cc -E); that way the c compiler will
> > emit error messages with file names & line numbers that refer back to
> > the original code.
> > 
> > --bob
> > 
> Maybe. But, will that work with a sequential debugger like dbx or gdb? 
> The user will be debugging the executable generated with the modified
> source. But we want to show the original source code, not the modified 
> one. 

If you include the file name and line number in the emitted #line contructs
the debugger will pull things in from the original (pre-Sage) code correctly.
Afterall, that's how things get handled through standard C/C++ preprocessors.

galen



Reference(s):