One more idea. At the crash point, within gdb, can you do:
(gdb) info reg (gdb) print /x $esp (gdb) disassemble $pc,$pc+20 Tristan. ----- Mail original ----- > On Fri, 17 Jan 2014 14:08:32 -0500 > Adam Jensen <[email protected]> wrote: > > > $ gdb ./dlx_test_behaviour > > (gdb) set logging file trace.log > > (gdb) set logging on > > (gdb) run --assert-level=note > > FYI: > > $ ghdl -m -g --workdir=work dlx_test_behaviour > $ gdb ./dlx_test_behaviour > GNU gdb 6.1.1 [FreeBSD] > This GDB was configured as "amd64-marcel-freebsd"...Dwarf Error: > wrong > version in compilation unit header (is 4, should be 2) [in > module /home/hanzer/devel/dlx/dlx_test_behaviour] > > > Install and use [/usr/ports/devel/gdb] to correct the problem. > > > $ ghdl -m -g --workdir=work dlx_test_behaviour > $ /usr/local/bin/gdb ./dlx_test_behavior > GNU gdb (GDB) 7.6 [GDB v7.6 for FreeBSD] > > Reading symbols from > /home/hanzer/devel/dlx/dlx_test_behaviour...done. > (gdb) set logging file trace.log > (gdb) set logging on > Copying output to trace.log. > (gdb) run --assert-level=note > Starting program: /home/hanzer/devel/dlx/dlx_test_behaviour > --assert-level=note 0 X"20020000" > 4 X"AC020018" > 8 X"20420001" > 12 X"6441000A" > 16 X"1420FFF0" > 20 X"44000000" > > Program received signal SIGSEGV, Segmentation fault. > 0x00000000004299ac in work__dlx__ARCH__behaviour__interpreter__PROC > (INSTANCE=<error reading variable: Cannot access memory at address > 0x80073bd88>) at dlx-behaviour.vhdl:143 143 mem_enable <= > '0' > 0x80073bd88>after Tpd_clk_out; > (gdb) bt > #0 0x00000000004299ac in > work__dlx__ARCH__behaviour__interpreter__PROC > (INSTANCE=<error reading variable: Cannot access memory at address > 0x80073bd88>) at dlx-behaviour.vhdl:143 #1 0x0000000000441c94 in > 0x80073bd88>grt_stack_loop () > 0x80073bd88>at > /home/hanzer/ghdl_build/source/gcc-4.8-20130808/gcc/vhdl/grt/config/amd64.S:40 > #2 0x00000008014fac00 in ?? () > #3 0x0000000000429998 in > work__dlx__ARCH__behaviour__interpreter__bus_read (INSTANCE=0x0, > address=0x0, data_width=width_byte, instr_fetch=false, data=0x0, > phi1=0x0, phi2=0x2000, reset=<error reading variable: Cannot access > memory at address 0x80073e000>, a=<error reading variable: Cannot > access memory at address 0x80073e008>, d=<error reading variable: > Cannot access memory at address 0x80073e010>, width=<error reading > variable: Cannot access memory at address 0x80073e018>, > write_enable=<error reading variable: Cannot access memory at address > 0x80073e020>, mem_enable=<error reading variable: Cannot access > memory > 0x80073e020>at address 0x80073e028>, ifetch=<error reading variable: > 0x80073e020>Cannot access memory at address 0x80073e030>, > ready=<error > 0x80073e020>reading variable: Cannot access memory at address > 0x80073e020>0x80073e038>, tpd_clk_out=<error reading variable: Cannot > 0x80073e020>0x80073e038>access memory at address 0x80073e040>) at > 0x80073e020>0x80073e038>dlx-behaviour.vhdl:143 #4 0x000000080073dfa8 > 0x80073e020>0x80073e038>in ?? () > #5 0x0000000000002000 in ?? () > Cannot access memory at address 0x80073e000 > (gdb) frame 0 > #0 0x00000000004299ac in > work__dlx__ARCH__behaviour__interpreter__PROC > (INSTANCE=<error reading variable: Cannot access memory at address > 0x80073bd88>) at dlx-behaviour.vhdl:143 143 mem_enable <= > '0' > 0x80073bd88>after Tpd_clk_out; > (gdb) list > 138 loop > 139 wait until phi2 = '0'; > 140 exit when ready = '1' or reset = '1'; > 141 end loop; > 142 data := d; > 143 mem_enable <= '0' after Tpd_clk_out; > 144 end bus_read; > 145 > 146 > 147 begin -- interpreter > (gdb) frame 1 > #1 0x0000000000441c94 in grt_stack_loop () > at > /home/hanzer/ghdl_build/source/gcc-4.8-20130808/gcc/vhdl/grt/config/amd64.S:40 > 40 call *8(%rsp) (gdb) list > 35 .text > 36 > 37 /* Function called to loop on the process. */ > 38 ENTRY(grt_stack_loop) > 39 mov 0(%rsp),%rdi > 40 call *8(%rsp) > 41 jmp NAME(grt_stack_loop) > 42 END(grt_stack_loop) > 43 > 44 /* function Stack_Create (Func : Address; Arg : > Address) > (gdb) quit > > _______________________________________________ > Ghdl-discuss mailing list > [email protected] > https://mail.gna.org/listinfo/ghdl-discuss > _______________________________________________ Ghdl-discuss mailing list [email protected] https://mail.gna.org/listinfo/ghdl-discuss
