Subject: tracking program counter / assembling objdump output
To: None <port-m68k@NetBSD.org>
From: None <SigmFSK@aol.com>
List: port-m68k
Date: 09/26/2006 15:41:58
Hi all:
Is there a way to track the program counter of a user program as  it changes 
when running an executable?
Or modify the objdump assembly output  of an m68020 executable, so that it 
can be modified and re-assembled?

I'm  currently working on debugging (the very small number) of bugs with the 
TME Sun3  m68020 emulator.  Other than three "extreme memory usage" test 
files, I  currently have it so that it performs identically to a real Sun 3/80 on 
the  entire gcc-3.3.3 testsuite running under NetBSD 3.0.

But, I have a few  executables that run differently between TME and a real 
sun3.
One of them is  a small statically linked a.out Sunos executable (that also 
runs under NetBSD  3.0).

The other is the gcc-3.2.3 compiler running under SunOS 4.1.1, where it  
incorrectly preprocesses certain string structures.

I don't know exactly where in the program that the bug is  occurring.  I can 
track the PC as it changes inside TME (by modifying the  TME source to print 
it out) and follow the code by looking at the objdump  assembly output of the 
executable.
 
Is there a software debugger or such that I can do the same on a real  sun3?  
Or do I basically need an in-circuit-emulator and place inside the  real sun3?
 
The objdump output appears quite complete, but it doesn't appear to be in a  
format that is assemblable by gcc.  Is this on purpose, or is there a way  to 
modify it to get to assemble (I could then add assembly "debug" statements  
and determine where the processing goes awry).
 
thanks,
arthur