Jump to content
Excelsior Forums
Sign in to follow this  
nemo

Debugging on Linux

Recommended Posts

I seem to be unable to debug modula-2 programmes under gdb/Linux.  Most of the variables are reported as not being available.  What am I doing wrong (or failing to do)?

Share this post


Link to post
Share on other sites

No -- gdb finds the source and I can step through source but no variable information is available.  Here is a typical session.

(gdb) disp i

1: {<data variable, no debug info>} 134654752 = 0

(gdb) l

4      FROM SWholeIO IMPORT WriteCard;

5

6      VAR

7          i :CARDINAL;

8      BEGIN

9          i := 1;

10        WriteString('Hello world'); WriteLn;

11        INC(i);

12        WriteCard(i, 4); WriteLn

13      END hello.

(gdb) b 11

Breakpoint 2 at 0x8048e7a: file hello.mod, line 11.

(gdb) c

Continuing.

Hello world

Breakpoint 2, main () at hello.mod:11

11        INC(i);

1: {<data variable, no debug info>} 134654752 = 0

(gdb) n

What am I doing wrong?  The documentations states that debug information is on by default.  I do assume that someone at Excelsior knows how to debug a Modula-2 programme under gdb.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×