os/kernelhwsrv/kerneltest/e32test/nkernsa/debug.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // e32test\nkernsa\debug.cpp
    15 // 
    16 //
    17 
    18 #include <nktest/nkutils.h>
    19 
    20 extern "C" {
    21 
    22 void DumpMemory(const char* msg, const void* data, int length)
    23 	{
    24 	const unsigned char* s = (const unsigned char*)data;
    25 	int i;
    26 	DEBUGPRINT("%s", msg);
    27 	for (i=0; i<length; i+=0x10)
    28 		{
    29 		DEBUGPRINT("%08x: %02x %02x %02x %02x %02x %02x %02x %02x | %02x %02x %02x %02x %02x %02x %02x %02x",
    30 			s,
    31 			s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7],
    32 			s[8], s[9], s[10], s[11], s[12], s[13], s[14], s[15]
    33 			);
    34 		s+=16;
    35 		}
    36 	}
    37 
    38 }
    39