[Simh] RE : Segmentation fault when running the MIcrovax emulator

J. David Bryan jdbryan at acm.org
Sun Jan 8 16:05:34 EST 2012


On Sunday, January 8, 2012 at 15:28, brian wrote:

> I have gdb, but as I told Sergey, I know absolutely nothing about C
> programming, the only coding I've done under Linux is using Lazarus
> and FreePascal with the integrated debugger. 

That's OK; I know nothing about Linux or the VAX.  ;-)


> > (gdb) backtrace
> > #0  0x000000000044a2bb in eth_open (dev=Cannot access memory at address
> > #0x7fff00386927) at sim_ether.c:912
> > Cannot access memory at address 0x7fff00386e77
> > (gdb)

That's odd.  It looks as though the stack is corrupted.  gdb is attempting 
to print the values of the parameters to the eth_open function (starting 
with "dev") but cannot, and then is attempting to walk back in the stack 
but cannot.

Could you please try this: at the first gdb prompt after starting SIMH 
under gdb, set a breakpoint on the eth_open function:

  (gdb) break eth_open

...and then enter "run".  When the script does the attach, the breakpoint 
should be hit, and the values of the parameters (dev, name, dptr, and dbit) 
should be printed automatically.  It will be helpful to see if they print 
OK, or whether you get the "cannot access memory" error at that point as 
well.

If it does print the parameters OK, try stepping forward a line at a time 
with the gdb "next" command.  After each one, print the value of the dev 
parameter:

  (gdb) print dev

...which should print the same value as was printed when the breakpoint was 
hit.  This should help to pinpoint where the trouble is starting, although 
presumably you'll still get the segfault when you step into line 912.

                                      -- Dave




More information about the Simh mailing list