gm2
[Top][All Lists]
Advanced

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

Re: A beginner's question


From: Gaius Mulley
Subject: Re: A beginner's question
Date: Thu, 20 Apr 2023 16:18:00 +0100

Hi Rudolf,

I use gdb to debug modula-2.  I also use gm2 with -g -O0 to generate
accurate line numbers etc.
Occasionally I find it useful to compile the whole project and get
good debugging inside the libraries via:

$ gm2 -g -O0 -fm2-whole-program -fiso mainmodule.mod
$ gdb a.out

(but perhaps it might be better to start without the
-fm2-whole-program and see if that is enough).
Exported procedure names are transformed into modulename_procedurename
whereas local procedures are without the module prefix.   When using
gdb it is also useful to use the ^x^a
(toggle) which splits the screen with source code in the top half.

I have some extra gdb enhancements - which I'm still working on (which
handle unbounded arrays).
I'll try and expedite these changes and post them to the gdb mailing
list - currently some regressions fail.

hope this helps,
Gaius

On Thu, Apr 20, 2023 at 10:53 AM Rudolf Schubert <rudolf@muc.de> wrote:
>
> Hi Gaius,
>
> I quickly tested the patch and could verify that all my *mod files
> including squash_bug[123].mod now compile successfully as you write!
> Thank you very much for your (quick and successful) efforts!
>
> One 'small' remaining problem now is: I do not have a real clue as
> how to track down the bugs which the three 'bug files' still exhibit
> when run. Till now I just entered some 'printfs' for debugging. Would
> you think that a 'real debugger' might help here? I.e. that I would try
> to see what's happening at register or assembler level? I'm not sure,
> however how quickly I would proceed here;-)
>
>
> BR
>
> Rudolf
>
> --
> Rudolf Schubert                 \
> Kirchstr. 18a                    \  mailto:rudolf@muc.de
> 82054 Sauerlach                   > http://www.dose.muc.de
> Deutschland                      /
> Tel. 08104/908311               /
>
>
> On Thu, 20 Apr 2023, Gaius Mulley wrote:
>
> > Hi Rudolf,
> >
> > many thanks for your email and test code - all very helpful.   Here is
> > a bug fix for the latest gcc git.
> > When applied I see squash_bug[123].mod all compile successfully.
> >
> > The constructor was not being placed onto the preserve list within cc1gm2.
> >
> > regards,
> > Gaius
> >
>



reply via email to

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