arm_memory_read.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <ctype.h>
#include <unistd.h>
#include "dbg_msg.h"
#include "jt_arm.h"
#include "jt_flash.h"
#include "arm_gdbstub.h"
#include "arm_memory_mmap.h"
#include "arm_gdbstub_break.h"

Data Structures

Defines

Functions

Variables


Detailed Description


Define Documentation

#define insertCachedWordAddr ( address,
value   )     insertCachedAddr(&lookupCacheContainer.wordCache, address, value)

Referenced by gdbLookupArmInstr().

#define insertCachedHalfwordAddr ( address,
value   )     insertCachedAddr(&lookupCacheContainer.halfWordCache, address, value)

Referenced by gdbLookupThumbInstr().

#define findCachedWordAddr ( address,
value   )     findCachedAddr(lookupCacheContainer.wordCache, address, value)

Referenced by gdbLookupArmInstr().

#define findCachedHalfwordAddr ( address,
value   )     findCachedAddr(lookupCacheContainer.halfWordCache, address, value)

Referenced by gdbLookupThumbInstr().


Function Documentation

static void insertCachedAddr ( struct lookupCache **  cache,
uint32_t  address,
uint32_t  value 
) [static]

insert address and its value into a given lookup cache

Parameters:
cache 
address 
value 
Returns:
-

References lookupCache::address, lookupCache::next, and lookupCache::value.

static int findCachedAddr ( struct lookupCache cache,
uint32_t  address,
uint32_t *  value 
) [static]

search for address at given lookup cache

Parameters:
cache 
address 
value Pointer to hold data value at address
Return values:
1 if found
0 if not found

References lookupCache::address, lookupCache::next, and lookupCache::value.

static void clearGivenLookupCache ( struct lookupCache **  cache  )  [static]

clear given lookup cache

Parameters:
cache 
Returns:
-

References lookupCache::next.

Referenced by gdb_clearLookupCache().

void gdb_read_memory_block ( uint32_t  addr,
uint32_t  word_len,
uint32_t *  buf 
)

Read out a length of memory at the target, starting a target address (addr).
This memory contents is copied to a buffer (buf).
If possible try to put a target READ program into our target workspace.
And transfer the Read-data via DCC.
If this is not possible read the memory via JTAG.

Parameters:
addr start word address of target memory
word_len number of 32-Bit words to read
buf pointer to destination buffer
Returns:
-

References memMap::baseAddr, DBG_LEVEL_GDB_ARM_INFO, getWorkSpace(), ICERT_REG_DCC_CONTROL, ICERT_REG_DCC_DATA, IF_DBG, jtag_arm_IceRT_RegRead(), jtag_arm_IceRT_RegRead_Once(), jtag_arm_IceRT_RegWrite(), jtag_arm_Mointor2DebugMode(), jtag_arm_PollDbgState(), jtag_arm_ReadWordMemory(), jtag_arm_RunProgram(), memMap::memBufferType, memMap::MemBufferType::Workspace::offset, useWorkspace(), memMap::MemBufferType::Workspace, and WORKSPACE_ALGO_READ.

Referenced by gdb_read_mem(), and verifyFlashCB_read_sector().

int* gdb_read_mem ( int  addr,
int  length 
)
uint32_t gdbLookupThumbInstr ( uint32_t  addr  ) 
uint32_t gdbLookupArmInstr ( uint32_t  addr  ) 
void gdb_clearLookupCache ( void   ) 

clear temporary caches that might be used by gdbLookupArmInstr and gdbLookupThumbInstr

Returns:
-

References clearGivenLookupCache(), lookupCacheContainer::halfWordCache, and lookupCacheContainer::wordCache.

Referenced by gdb_action_continue(), and gdb_action_step().


Variable Documentation

struct lookupCacheContainer lookupCacheContainer = {NULL, NULL} [static]

This file is part of the documentation for JTAG-GDB Server for ARM .

Generated on Mon Feb 15 21:23:21 2010 by doxygen 1.6.2.