[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] Connect with gdb to a core of a python simulation

From: Marek Pietrzak
Subject: Re: [Simulavr-devel] Connect with gdb to a core of a python simulation
Date: Tue, 16 Aug 2011 22:42:47 +0200

Ok, I can see the point now. I was curious and exported GdbServer class
with SWIG. Looks like it works without much effort. The usage would be
roughly the following:

sc = pysimulavr.SystemClock.Instance()
dev = pysimulavr.AvrFactory.instance().makeDevice(avrproc)
port = 2144
gdb = pysimulavr.GdbServer(dev,port,0)

I was able to connect with gdb and do simple debugging though I'm not
sure how stable that is. That's 3 changed lines total if you're
interested in this change

On Tue, 2011-08-16 at 21:21 +0200, Petr Hluzín wrote:
> On 15 August 2011 22:29, Marek Pietrzak <address@hidden> wrote:
> > I don't see the GdbServer class being exported to Python in SWIG file,
> > so the answer is most likely no. Perhaps because it's kind of weird
> > using gdb when you can get all about the internal state of the device
> > with Python alone. Why do you want gdb in your simulation?
> (Strange. Your mail arrived to my inbox just few hours ago.)
> Because Python cannot get all the internal state like call stack, what
> is the value of a variable or an expression. Python script can only
> get state of registers and (through BFD library) global variables with
> elemental types (no struct).
> Furthermore a script can also be used to only simulate an external
> circuity - not control/investigate the simulation.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]