This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: a question about gdb and simulator


This method has been achieved by connecting our simulations to GDB using
the remote serial interface to a simulator running on the same machine
as GDB.

The remote serial interface is by far the most accurate way of
connecting GDB to a simulated target as it allows the simulator to clock
itself and act like a real CPU.

Problems arise when bringing simulators that are built-in to GDB into
environments such as systemC because systemC requires you to build your
simulation as an executable. If you go down the road of having your
simulation so tightly coupled with GDB you will have to link whatever
libraries GDB uses into you systemC model.

The system we use looks like this.

GDB G tcp/ip remote <--> GDB Server <--> Shared memory <--> CPU
simulator and debugger I/F

In this case GDB is the standard GDB downloaded from the net sources,
GDB server is an executable running on the same machine to handle GDB
commands and the CPU simulator is our own in house simulator running on
the same machine.

In order to run this within systemC you need to link the shared object
which gets built for our CPU simulator and debugger interface into the
systemC environment and let it then compile an executable containing
this functionality.

You can then start up a systemC model and connect to it using the GDB
target-remote command and you then have a software debugger running on
your simulated hardware platform.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]