Whoa, geez... ask about a feature and it gets cut?! Just kidding.

I'm working on a project to inject bit flips into caches. We're using
OpenOCD to run the target program one step at a time and build a database
of all memory accesses. For each line of code, we disassemble it, and if it
touches memory, we calculate the address and data which requires reading
values from other registers. We also time how long it takes load
instructions to run so that we can guess if it resulted in a cache hit or
miss.

The tricky part is that we want to run on the hardware we're testing, so
simulating caches isn't an option. This gives us "ground truth" about the
implementation, and we don't have to worry about simulator setups and
figuring out exactly how the cache is handling things.

So it's a pretty odd use-case, and maybe not worth maintaining (I would
obviously vote for keeping it... if I have a vote that is). And maybe there
is a smarter / better way to do it. We did investigate using the RPC
interface and decided against it (I don't recall the specifics). And maybe
there is a way to use Capstone...

But as it stands now, OpenOCD's disassembler has been working great with
the exception of the PLD instruction for ARM. I'm working on the code for
that now and will submit a patch when I've tested it.

Thank you to everyone that works on OpenOCD!

James

On Mon, Jan 15, 2018 at 7:11 AM, Marc Schink <openocd-...@marcschink.de>
wrote:

> Hi,
>
> are there good reasons why we need (ARM) disassembly integrated in
> OpenOCD? As Paul already said, there are awesome external tools/libraries
> like Capstone.
> If there are no good reasons, I would vote to remove the disassembly
> features in near future rather than extending it because it seems out of
> scope for OpenOCD.
>
> Marc
>
> Am 14.01.2018 um 09:01 schrieb Paul Fertser:
>
>> Hello James,
>>
>> On Sat, Jan 13, 2018 at 06:20:05PM -0500, James Marshall wrote:
>>
>>> I found the "...TODO..." in srt/target/arm_disassembler.c.
>>> Do you know when this may be implemented? If I attempt to implement it,
>>> are
>>> there any pitfalls I should know about (I'm assuming that there is
>>> something
>>> tricky since it was left unfinished).
>>>
>>
>> Please just do it, there should be no hidden traps there, just lack of
>> time.
>>
>> BTW, OpenOCD has an RPC interface so you can instead fetch memory and
>> process it with any external tool/library (such as Capstone) in any
>> language you like.
>>
>> HTH
>>
>>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to