Subject: Re: tracking program counter / assembling objdump output
To: None <is@netbsd.org>
From: None <SigmFSK@aol.com>
List: port-m68k
Date: 09/27/2006 19:14:52
In a message dated 9/27/2006 2:54:13 A.M. Eastern Standard Time,
is@netbsd.org writes:
On Tue, Sep 26, 2006 at 03:41:58PM -0400, SigmFSK@aol.com wrote:
> Hi all:
> Is there a way to track the program counter of a user program as it
changes
> when running an executable?
gdb ?
-is
-------
thanks for the tip. I've been trying ways to get the info via gdb.
The executable in question is a.out-sunos-big format, statically linked.
It runs on a sun3/80 under NetBSD 3.0, NetBSD 1.5.3, and SunOS 4.1.1.
With NetBSD 3.0, I can either run it directly, or run it all-the-way-through
under gdb. But I can't single step through it, or have it stop at any
breakpoints in gdb. I can set breakpoints which show up correctly with "info
break", but upon "run"ning, it just runs all the way through. If I control-c in
the middle, it stops and shows me the actual program counter, and the
dissassemble command shows the correct instructions. But if I "si" single machine
instruction step - it runs all the way to the end. Must be something with the
executable is not the default elf format.
If I run it under gdb on NetBSD 1.5.3 (last version for default elf format),
or Sunos 4.1.1, upon "run"ning, gdb complains that it can't access memory
location 0x4 and quits.
It seems overkill to use an in-circuit-emulator for something so apparently
simple, but I'm starting to run out of ideas.
/arthur