[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Simulavr-devel] Address of breakpoints from source lines
From: |
Sebastian |
Subject: |
Re: [Simulavr-devel] Address of breakpoints from source lines |
Date: |
Fri, 18 Jun 2010 20:06:19 +0200 |
Am Freitag, den 18.06.2010, 15:23 +0200 schrieb ThomasK:
> Hi,
>
> I'm again ... ;-)
>
> Sebastian schrieb:
> > Hi,
> > is there a way to get breakpoint-adresses for source code lines
> > directly from simulavr (with the python interface)?
>
> I'ts possible to set and remove breakpoints by python interface, see
> method assertInitDone in regress/modules/simtestutil.py. You use the
>From looking at this and at example.py, I got the impression that, to
"continue" from a breakpoint, you must delete it. And to recognize that
a breakpoint was reached, you test if getCurrentTime returns increasing
values when you call doRun?
Is there a way to have non-blocking breakpoints, where only a callback
is called?
What would be the advantage of simulavr-breakpoints over checking PC
after Step()-ing in single steps in a python script? Better performance
because the inner loop is completely in C++?
> If you want to get addresses for every source
> line, you have to read it out from elf file before!
...
> I'm not sure, if there is a possibility with the BFD interface
In this manual: http://sourceware.org/binutils/docs-2.20/bfd/index.html
I found a chapter on how to read line numbers from COFF. In the ELF
backend chapter, there isn't very much:
http://sourceware.org/binutils/docs-2.20/bfd/elf.html#elf
My method (Popen avr-gdb) works for me, so I don't have a big need to
extend simulavr right now. But if more users need this feature (get
adress of breakpoint by line) it's maybe worth to implement in simulavr.
greetings,
Sebastian