OVP Forums - A community of assistance, help, questions, and answers.
|
View previous topic :: View next topic |
Author |
Message |
KaMous
Joined: 17 Feb 2011 Posts: 9
|
Posted: Wed Nov 09, 2011 6:36 pm Post subject: Manipulating memory contents by functions in callbacks |
|
|
Hello,
how can I manipulate memory by means of callbacks? Using the armm processor model and the non-TLM platform model, I'm trying to set up callbacks on memory address ranges so that values stored to them are modified in order to inject faults. But if I set up a read callback that calls Code: | icmWriteProcessorMemory() | or Code: | icmDebugWriteProcessorMemory() | on the address that is read, set e.g to the address range from 0x00400000 to 0x405000 and do a
in arm-none-eabi-gdb, the gdb connection is closed.
Can you help me, please? |
|
Back to top |
|
 |
DuncGrah OVP Technologist

Joined: 27 Feb 2008 Posts: 1654 Location: United Kingdom
|
Posted: Thu Nov 10, 2011 5:38 am Post subject: |
|
|
This is the same question posted here
A callback applied to an address replaces the memory location so what happens here is
1. Access address
2. callback is called
3. callback accesses address
repeat from 2.
Maybe, there should be a detection of a recursively called callback that would detect the problem and stop with an error. |
|
Back to top |
|
 |
KaMous
Joined: 17 Feb 2011 Posts: 9
|
Posted: Sun Nov 20, 2011 3:00 pm Post subject: |
|
|
Thank you for your reply regarding the use of an MMC for what I need to do. I've been able to achieve what I wanted to.
So, am I getting this correctly: that the memory callback generated by the icmAdd...Callback() function is not executed in addition to the ordinary memory access, but rather instead of it? |
|
Back to top |
|
 |
DuncGrah OVP Technologist

Joined: 27 Feb 2008 Posts: 1654 Location: United Kingdom
|
Posted: Mon Nov 21, 2011 1:36 am Post subject: |
|
|
Yes that is correct.
Think of it this way, you create the memory behavior by adding a memory object or by a adding a memory callback over the address range you want to use. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Information regarding OVP © 2008-2022 Imperas Software
|