[M3devel] recent m3gdb does not want to compile

Rodney M. Bates rodney.m.bates at cox.net
Thu Jun 11 04:20:49 CEST 2009


Peter Eiserloh has recently gotten it to build on AMD64_LINUX,
using the do-cm3-m3gdb.sh script.  You should try that method.

Unfortunately, it is not recognizing executables and dynamic
libraries.  I have looked at this a bit, and the problem looks to
be in the bfd library, which is stock from gdb.  m3gdb is derived
from gdb 6.4, which is by now quite old.  gdb maintainers are about
to make a new release, I think 6.9.   I am in the throes of moving
house now, but am getting odd bits of time to look at this. 

I have been thinking for some time that it is about time to update
m3gdb to a later gdb.  For one thing, gdb now has some reverse
debugging support, which would be very nice for Modula-3 too.
I have done it two or three times, and I believe Tony has done it
at least once.  It takes a fair amount of work.  But it should be
possible to get the current m3gdb working on AMD64 without going
to that much trouble.  Maybe just some updated source files from
bfd will do the trick. 

Jay is right about global variables.  You will have a very hard time
finding them using stock gdb.  They are located in a record with a
funny compiler-generated name and have funny compiler-mangled
field names.   I'm not sure you can get them even if you know these.




Elmar Stellnberger wrote:
> For any kind of reason recent m3gdbs refuse to compile at me:
>
> ../gdb/configure
> ...
> checking for x86_64-unknown-linux-gnu-ar... no
> checking for ar... ar
> ...
>
>   
>> which ar
>>     
> /usr/bin/ar
>
> setting --bindir to /usr/bin or /usr does not help.
> full error log: see attachement
>
>  Should I compile m3gdb towards 32bit on an x86_64 platform if the
> m3build I am using is 32bit?
>
>   Besides this I am in wonder why a plain gdb can not access global
> Modula-3 variables using PM3/EZM3 although I have specified -gstabs in
> m3config/src/COMMON:
> ASM = ["as","--32","-gstabs","-o"]         % Assembler
> DEBUG_FLAG = "-gstabs"    % debugging info
> BDEBUG_FLAG = "-gstabs"   % debugging info
> LDEBUG_FLAG = "-gstabs"
>
> i.e.
>   
>> gdb -batch --directory=
>>     
> --directory=/home/elm/m3/Benchmark/LINUXLIBC6/../src  -ex 'info
> variables' /home/elm/m3/Benchmark/LINUXLIBC6/./pureDCT-queue >smbls
>
>   
>> grep myglobal smbls  -> nothing found
>>     
>
>   




More information about the M3devel mailing list