What is the recommended way to attach a remote GDB to Gem5 in order to debug 
the program being run in simulation, particularly when the simulated program 
finishes execution very quickly?



I've read through http://www.m5sim.org/Debugger_Based_Debugging and was able to 
get it working with an example program (hello-world in an infinite loop),  but 
the program that I actually want to debug does not have an infinite loop, so it 
finishes executing in the simulation before I have a chance to connect the 
remote debugger.



I've tried using gem5.debug with the  -debug-break cmdline option, but since 
that causes gem5 itself to hit a breakpoint, the remote GDB's attempt to 
connect times-out.  I've tried various experiments with trying to resume gem5 
at the same time as telling the remote GDB to connect, but the race condition 
is too tight so I never get the simulated program to break before finishing 
execution... there must be a better way.



Has anyone else done something like this with any success?  I'd appreciate any 
ideas.

BTW, I'm using gem5-stable to simulate an ARM platform in SE mode.



Also, this same question was asked on the gem5 Q&A website a couple weeks ago 
(http://qa.gem5.org/351/gdb-debugging-in-syscall-mode ), but it hasn't gotten 
much attention...  it seems like all questions to the mailing list in general 
get more attention... should I avoid the Q&A site?



Thanks,

Dan







_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to