[m-dev.] using gdb on the compiler

Ian MacLarty maclarty at cs.mu.OZ.AU
Tue Jul 26 22:14:35 AEST 2005


On Tue, 26 Jul 2005, Julien Fischer wrote:

>
>
> On Tue, 26 Jul 2005, Ian MacLarty wrote:
>
> > I can't seem to get C level debugging working on the compiler.
> > I've got the following in my Mmake.params file:
> > GRADE=asm_fast.gc.decldebug
> > EXTRA_CFLAGS=-O0 -g
> > EXTRA_LDFLAGS=-g
> > and I run the compiler using the lmc script with MMC_UNDER_GDB=true,
> > but I get "no debugging symbols found" messages and no context
> > (line no/filenames) in gdb.
>
> Have you told gdb where to find the source files?
>
> > It does know the function names though, but that seems to be all.
> >
> > I swear I've done the same in the past and it's worked.
> > Can anyone tell me what I've missed.
>
> For debugging the deep profiled debugging version of the compiler under
> gdb I have the following in my Mmake.params file:
>
> MCFLAGS+=--c-debug
> MLFLAGS+=-g
> EXTRA_CFLAGS=-g -O0
>

That worked.  Thanks.  I guess my mistake was to use LDFLAGS instead
of MLFLAGS for -g.  I don't really see why that doesn't work though.
Oh well, it's working now.

Cheers,

Ian.

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list