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

brian brian at meadows.pair.com
Sun Jan 8 15:28:18 EST 2012


On 01/08/2012 03:04 PM, J. David Bryan wrote:
> On Sunday, January 8, 2012 at 2:00, Sergey Oboguev wrote:
>
>> If you compile it, rather than using pre-built binary, can you compile
>> in debug mode, run under gdb and see the stack at fault point, and also
>> the fault location?
>
> I agree that knowing where the fault occurs would be helpful now.
>
> If I read the makefile supplied with SIMH correctly, a non-Win32
> compilation already includes debug info (via the "-g" switch):
>
>    CC = gcc -std=c99 -U__STRICT_ANSI__ -g $(OS_CCDEFS) -I .
>
> Brian, if you have gdb on your system, you should be able to start SIMH
> with gdb, issue the gdb "run" command, and then when the segfault occurs,
> issue the gdb "backtrace" command to print the call stack.  This should
> show us where the problem is occuring.
>

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. I've seen walkbacks 
(backtraces?) before, so here's the output. Hope it gives you what you 
need.

Brian.

<paste>

> sudo gdb /home/brian/vax/bin/vax
> GNU gdb (GDB) 7.1-ubuntu
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> Reading symbols from /home/brian/vax/bin/vax...done.
> (gdb) run
> Starting program: /home/brian/vax/bin/vax
> [Thread debugging using libthread_db enabled]
>
> VAX simulator V3.8-1
> NVR: buffering file in memory
> VAX simulator V3.8-1 [64b data, 64b addresses, Ethernet support]
> RQ: unit is read only
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x000000000044a2bb in eth_open (dev=Cannot access memory at address 0x7fff00386927
> ) at sim_ether.c:912
> 912     sim_ether.c: No such file or directory.
>         in sim_ether.c
> (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)




More information about the Simh mailing list