0
|
1 |
// Copyright (c) 2004-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 |
// e32\include\kernel\kdebug_priv.h
|
|
15 |
// Private header for kernel debugger interface
|
|
16 |
//
|
|
17 |
//
|
|
18 |
|
|
19 |
#ifndef __KDEBUG_PRIV_H__
|
|
20 |
#define __KDEBUG_PRIV_H__
|
|
21 |
|
|
22 |
#include <kernel/kernel.h>
|
|
23 |
|
|
24 |
//
|
|
25 |
// Forward declarations
|
|
26 |
//
|
|
27 |
class DPlatChunkHw;
|
|
28 |
|
|
29 |
//
|
|
30 |
// Debugger callback function typedef
|
|
31 |
//
|
|
32 |
typedef TUint (*TDebuggerEventHandler) (TKernelEvent aEvent, TAny* a1, TAny* a2);
|
|
33 |
|
|
34 |
/**
|
|
35 |
Event handler to provide stop-mode debug change notifications and
|
|
36 |
breakpoint-able event callbacks in RAM
|
|
37 |
*/
|
|
38 |
NONSHARABLE_CLASS(DEventHandler) : public DKernelEventHandler
|
|
39 |
{
|
|
40 |
public:
|
|
41 |
// Factory function
|
|
42 |
static DEventHandler* New();
|
|
43 |
|
|
44 |
// Add to queue of handlers
|
|
45 |
TInt Add(TAddPolicy aPolicy = EAppend);
|
|
46 |
|
|
47 |
private:
|
|
48 |
// Construction / destruction
|
|
49 |
DEventHandler();
|
|
50 |
~DEventHandler();
|
|
51 |
|
|
52 |
// Event handling callback
|
|
53 |
static TUint EventHandler(TKernelEvent aEvent, TAny* a1, TAny* a2, TAny* aThis);
|
|
54 |
|
|
55 |
// Dummy handler to be copied into RAM
|
|
56 |
static TUint DummyHandler(TKernelEvent aEvent, TAny* a1, TAny* a2);
|
|
57 |
|
|
58 |
// Size of dummy handler
|
|
59 |
static TUint DummyHandlerSize();
|
|
60 |
|
|
61 |
// Copy the default handler
|
|
62 |
static void CopyDummyHandler(TLinAddr aLinAddr);
|
|
63 |
|
|
64 |
// Filtering method
|
|
65 |
static TBool InterestedIn(const TKernelEvent& aKernelEvent, TDesC& aName);
|
|
66 |
|
|
67 |
private:
|
|
68 |
// Chunk to store breakpoint-able mask callback function
|
|
69 |
DPlatChunkHw* iHwChunk;
|
|
70 |
};
|
|
71 |
|
|
72 |
#endif //__KDEBUG_PRIV_H__
|