gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] Debugging with GM2


From: Gaius Mulley
Subject: Re: [Gm2] Debugging with GM2
Date: Thu, 22 Mar 2018 16:12:52 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Michael Riedl <address@hidden> writes:

> Gaius,
>
> I need some help. I am continuing testing my library and now have an
> issue that a test routine is failing when allocated memory is freed.
>
> *** Error in `./TstPSVD': free(): corrupted unsorted chunks:
> 0x0000000001c026a0 ***
>
> That did not happen with XDS and old Mocka version but anyhow maybe
> that simply did not recognize. Normally that indicates that the
> program writes to some unwanted memory segments.
>
> What would you suggest to use as compiler options in such a case to do
> proper debugging besides
> the obvious "-g" ?
>
> Gruß
>
> Michael

Hi Michael,

I always use:

gm2 -g -fsoft-check-all -fm2-g foo.mod

when debugging cases such as yours.  This turns on all runtime checking
and also generates neat line by line accurate debug info.  Then I use
gdb (normally from within emacs) but the later is a personal preference.

The -fm2-g generates additional nops to ensure that the single stepping
will also occur over END and other keywords which might not generate
actual code

regards,
Gaius



reply via email to

[Prev in Thread] Current Thread [Next in Thread]