From: Stefan E. <se...@us...> - 2001-10-04 16:33:43
|
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv27788 Modified Files: chkmem.c Log Message: - moved peek and poke to debug.c Index: chkmem.c =================================================================== RCS file: /cvsroot/blob/blob/src/chkmem.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- chkmem.c 2001/10/01 12:40:18 1.4 +++ chkmem.c 2001/10/04 16:33:41 1.5 @@ -234,92 +234,6 @@ __commandlist(ChkMem, "chkmem", chkmemhelp); -/********************************************************************* - * Poke - * - * AUTOR: Stefan Eletzhofer - * REVISED: - * - * Poke values to memory - * - */ -int Poke( int argc, char *argv[] ) -{ - u32 address; - u32 value; - - if ( argc < 3 ) { - SerialOutputString("*** not enough arguments\n"); - return CHKMEM_ERR; - } - - if(strtoval(argv[1], &address) < 0) { - SerialOutputString("*** not an address\n"); - return CHKMEM_ERR; - } - - if(strtoval(argv[2], &value) < 0) { - SerialOutputString("*** not a value\n"); - return CHKMEM_ERR; - } - - -#if CHKMEM_DEBUG - SerialOutputString("adr=0x"); - SerialOutputHex(address); - SerialOutputString(" val=0x"); - SerialOutputHex(value); - SerialOutputString("\n"); -#endif - - MEM( address ) = value; - - return CHKMEM_OK; -} -static char pokehelp[] = "poke address value\n"; -__commandlist(Poke, "poke", pokehelp ); - -/********************************************************************* - * Peek - * - * AUTOR: Stefan Eletzhofer - * REVISED: - * - * Poke values to memory - * - */ -int Peek( int argc, char *argv[] ) -{ - u32 address; - u32 value; - - if ( argc < 2 ) { - SerialOutputString("*** not enough arguments\n"); - return CHKMEM_ERR; - } - - if(strtoval(argv[1], &address) < 0) { - SerialOutputString("*** not an address\n"); - return CHKMEM_ERR; - } - -#if CHKMEM_DEBUG - SerialOutputString("adr=0x"); - SerialOutputHex(address); - SerialOutputString("\n"); -#endif - - value = MEM( address ); - - SerialOutputHex(value); - SerialOutputString("\n"); - - return CHKMEM_OK; -} -static char peekhelp[] = "peek address\n"; -__commandlist(Peek, "peek", peekhelp ); - - /*********************************************************************/ /** STATIC FUNCTIONS ************************************************/ /*********************************************************************/ |