[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Simulavr-devel] [patch #7640] Fixes error in branch instruction trace:
From: |
Petr Hluzin |
Subject: |
[Simulavr-devel] [patch #7640] Fixes error in branch instruction trace: bogus target labels |
Date: |
Fri, 18 Nov 2011 23:26:43 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20100101 Firefox/8.0 |
Follow-up Comment #2, patch #7640 (project simulavr):
(I'm sorry for the delay.)
Ok, I see the bug and your patch would definitely fix it.
Trace() of some instructions use byte-based addresses, some use word-based.
AvrDevice::Load() fills the symbol array using byte-based addresses for
symbols in RAM and word-based for symbols in Flash (see calls to AddSymbol).
Most places in simulavr use "address" to mean a byte-based value; "index" or
"offset" for word-based values - similar to terminology used by GDB. I fix
places when the naming is swapped.
It would be nice if the code used only one way to specify a memory location,
probably byte-based way. But I do not know if it is worth converting.
These functions use the word-based addressing: avr_op_JMP::Trace(),
avr_op_LPM_Z::Trace(), avr_op_LPM::Trace(), avr_op_LPM_Z_incr::Trace()
We should either:
(A) use accept your patch (which turns avr_op_BRBC and avr_op_BRBS to
word-based symbol lookup) and rename the variables to `index' or
(B) turn the above mentioned functions to byte-based lookup and not rename
Fellows, should we do A or B?
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?7640>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [Simulavr-devel] [patch #7640] Fixes error in branch instruction trace: bogus target labels,
Petr Hluzin <=