When you started using gdb, you changed the command line. Instead of using configs/example/fs.py as the configuration script, you told it to use your rcS as the configuration script. Using gdb on gem5 isn't going to tell you anything anyway, since one of the simulated programs started with your rcS had a simulated segfault. Using gdb on gem5 would only help if gem5 itself had a real segfault. There's some good information about debugging gem5 and the things running inside of it here:
http://www.gem5.org/Debugging Gabe On 07/04/11 04:45, Mahmood Naderan wrote: > This is what I did: > 1- > mahmood@srv:gem5$ build/ALPHA_FS/m5.debug configs/example/fs.py > --script=configs/parsec/runscript.rcS > gem5 Simulator System. http://gem5.org > gem5 is copyrighted software; use the --copyright option for details. > > gem5 compiled Jul 4 2011 11:01:55 > gem5 started Jul 4 2011 16:02:30 > gem5 executing on srv > command line: build/ALPHA_FS/m5.debug configs/example/fs.py > --script=configs/parsec/runscript.rcS > Global frequency set at 1000000000000 ticks per second > info: kernel located at: /home/mahmood/gem5/disk/alpha/binaries/vmlinux > Listening for system connection on port 3456 > 0: system.tsunami.io.rtc: Real-time clock set to Thu Jan 1 00:00:00 > 2009 > 0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000 > **** REAL SIMULATION **** > info: Entering event queue @ 0. Starting simulation... > warn: Prefetch instructions in Alpha do not do anything > warn: Prefetch instructions in Alpha do not do anything > hack: be nice to actually delete the event here > Exiting @ tick 1823735792000 because m5_exit instruction encountered > > > 2- I opened /home/mahmood/gem5/m5out/system.terminal and saw > init started: BusyBox v1.1.0 (2007.03.04-01:07+0000) multi-call binary > mounting filesystems... > loading script... > Segmentation fault > Done :D > > > 3- I tried to debug with gdb to see why I get seg fault. So > mahmood@srv:gem5$ gdb build/ALPHA_FS/m5.debug > 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/mahmood/gem5/build/ALPHA_FS/m5.debug...done. > (gdb) run --debug-break=2000 configs/parsec/runscript.rcS > Starting program: /home/mahmood/gem5/build/ALPHA_FS/m5.debug > --debug-break=2000 configs/parsec/runscript.rcS > [Thread debugging using libthread_db enabled] > gem5 Simulator System. http://gem5.org > gem5 is copyrighted software; use the --copyright option for details. > > gem5 compiled Jul 4 2011 11:01:55 > gem5 started Jul 4 2011 16:08:45 > gem5 executing on srv > command line: /home/mahmood/gem5/build/ALPHA_FS/m5.debug > --debug-break=2000 configs/parsec/runscript.rcS > warn: need to stop all queues > Traceback (most recent call last): > File "<string>", line 1, in <module> > File "/home/mahmood/gem5/src/python/m5/main.py", line 328, in main > filecode = compile(filedata, filename, 'exec') > File "configs/parsec/runscript.rcS", line 4 > /sbin/m5 dumpresetstats 200000000 2000000000 > ^ > SyntaxError: invalid syntax > > Program exited with code 01. > > > 4- runscript.rcS contains: > #!/bin/sh > # File to run the blackscholes benchmark > cd /parsec/install/bin > /sbin/m5 dumpresetstats > ./blackscholes 64 /parsec/install/inputs/blackscholes/in_4K.txt > /parsec/install/inputs/blackscholes/prices.txt > echo "Done :D" > /sbin/m5 exit > _______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
