1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287
|
/** @file
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include "Edb.h"
/**
DebuggerCommand - BreakOnCALL.
@param CommandArg The argument for this command
@param DebuggerPrivate EBC Debugger private data structure
@param ExceptionType Exception type.
@param SystemContext EBC system context.
@retval EFI_DEBUG_CONTINUE formal return value
**/
EFI_DEBUG_STATUS
DebuggerBreakOnCALL (
IN CHAR16 *CommandArg,
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
{
//
// Check argument
//
if (CommandArg == NULL) {
if ((DebuggerPrivate->FeatureFlags & EFI_DEBUG_FLAG_EBC_BOC) == EFI_DEBUG_FLAG_EBC_BOC) {
EDBPrint (L"BOC on\n");
} else {
EDBPrint (L"BOC off\n");
}
} else if (StriCmp (CommandArg, L"on") == 0) {
DebuggerPrivate->FeatureFlags |= EFI_DEBUG_FLAG_EBC_BOC;
EDBPrint (L"BOC on\n");
} else if (StriCmp (CommandArg, L"off") == 0) {
DebuggerPrivate->FeatureFlags &= ~EFI_DEBUG_FLAG_EBC_B_BOC;
EDBPrint (L"BOC off\n");
} else {
EDBPrint (L"BOC - argument error\n");
}
//
// Done
//
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand BreakOnCALLEX.
@param CommandArg The argument for this command
@param DebuggerPrivate EBC Debugger private data structure
@param ExceptionType Exceptiont type.
@param SystemContext EBC system context.
@retval EFI_DEBUG_CONTINUE formal return value
**/
EFI_DEBUG_STATUS
DebuggerBreakOnCALLEX (
IN CHAR16 *CommandArg,
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
{
//
// Check argument
//
if (CommandArg == NULL) {
if ((DebuggerPrivate->FeatureFlags & EFI_DEBUG_FLAG_EBC_BOCX) == EFI_DEBUG_FLAG_EBC_BOCX) {
EDBPrint (L"BOCX on\n");
} else {
EDBPrint (L"BOCX off\n");
}
} else if (StriCmp (CommandArg, L"on") == 0) {
DebuggerPrivate->FeatureFlags |= EFI_DEBUG_FLAG_EBC_BOCX;
EDBPrint (L"BOCX on\n");
} else if (StriCmp (CommandArg, L"off") == 0) {
DebuggerPrivate->FeatureFlags &= ~EFI_DEBUG_FLAG_EBC_B_BOCX;
EDBPrint (L"BOCX off\n");
} else {
EDBPrint (L"BOCX - argument error\n");
}
//
// Done
//
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - BreakOnRET.
@param CommandArg The argument for this command
@param DebuggerPrivate EBC Debugger private data structure
@param ExceptionType Exception type.
@param SystemContext EBC system context.
@retval EFI_DEBUG_CONTINUE formal return value
**/
EFI_DEBUG_STATUS
DebuggerBreakOnRET (
IN CHAR16 *CommandArg,
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
{
//
// Check argument
//
if (CommandArg == NULL) {
if ((DebuggerPrivate->FeatureFlags & EFI_DEBUG_FLAG_EBC_BOR) == EFI_DEBUG_FLAG_EBC_BOR) {
EDBPrint (L"BOR on\n");
} else {
EDBPrint (L"BOR off\n");
}
} else if (StriCmp (CommandArg, L"on") == 0) {
DebuggerPrivate->FeatureFlags |= EFI_DEBUG_FLAG_EBC_BOR;
EDBPrint (L"BOR on\n");
} else if (StriCmp (CommandArg, L"off") == 0) {
DebuggerPrivate->FeatureFlags &= ~EFI_DEBUG_FLAG_EBC_B_BOR;
EDBPrint (L"BOR off\n");
} else {
EDBPrint (L"BOR - argument error\n");
}
//
// Done
//
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - BreakOnEntrypoint.
@param CommandArg The argument for this command
@param DebuggerPrivate EBC Debugger private data structure
@param ExceptionType Exception type.
@param SystemContext EBC system context.
@retval EFI_DEBUG_CONTINUE formal return value
**/
EFI_DEBUG_STATUS
DebuggerBreakOnEntrypoint (
IN CHAR16 *CommandArg,
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
{
//
// Check argument
//
if (CommandArg == NULL) {
if ((DebuggerPrivate->FeatureFlags & EFI_DEBUG_FLAG_EBC_BOE) == EFI_DEBUG_FLAG_EBC_BOE) {
EDBPrint (L"BOE on\n");
} else {
EDBPrint (L"BOE off\n");
}
} else if (StriCmp (CommandArg, L"on") == 0) {
DebuggerPrivate->FeatureFlags |= EFI_DEBUG_FLAG_EBC_BOE;
EDBPrint (L"BOE on\n");
} else if (StriCmp (CommandArg, L"off") == 0) {
DebuggerPrivate->FeatureFlags &= ~EFI_DEBUG_FLAG_EBC_B_BOE;
EDBPrint (L"BOE off\n");
} else {
EDBPrint (L"BOE - argument error\n");
}
//
// Done
//
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - BreakOnThunk.
@param CommandArg The argument for this command
@param DebuggerPrivate EBC Debugger private data structure
@param ExceptionType Exception type.
@param SystemContext EBC system context.
@retval EFI_DEBUG_CONTINUE formal return value
**/
EFI_DEBUG_STATUS
DebuggerBreakOnThunk (
IN CHAR16 *CommandArg,
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
{
//
// Check argument
//
if (CommandArg == NULL) {
if ((DebuggerPrivate->FeatureFlags & EFI_DEBUG_FLAG_EBC_BOT) == EFI_DEBUG_FLAG_EBC_BOT) {
EDBPrint (L"BOT on\n");
} else {
EDBPrint (L"BOT off\n");
}
} else if (StriCmp (CommandArg, L"on") == 0) {
DebuggerPrivate->FeatureFlags |= EFI_DEBUG_FLAG_EBC_BOT;
EDBPrint (L"BOT on\n");
} else if (StriCmp (CommandArg, L"off") == 0) {
DebuggerPrivate->FeatureFlags &= ~EFI_DEBUG_FLAG_EBC_B_BOT;
EDBPrint (L"BOT off\n");
} else {
EDBPrint (L"BOT - argument error\n");
}
//
// Done
//
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - BreakOnKey.
@param CommandArg The argument for this command
@param DebuggerPrivate EBC Debugger private data structure
@param ExceptionType Exception type.
@param SystemContext EBC system context.
@retval EFI_DEBUG_CONTINUE formal return value
**/
EFI_DEBUG_STATUS
DebuggerBreakOnKey (
IN CHAR16 *CommandArg,
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
{
//
// Check argument
//
if (CommandArg == NULL) {
if ((DebuggerPrivate->FeatureFlags & EFI_DEBUG_FLAG_EBC_BOK) == EFI_DEBUG_FLAG_EBC_BOK) {
EDBPrint (L"BOK on\n");
} else {
EDBPrint (L"BOK off\n");
}
} else if (StriCmp (CommandArg, L"on") == 0) {
DebuggerPrivate->FeatureFlags |= EFI_DEBUG_FLAG_EBC_BOK;
EDBPrint (L"BOK on\n");
} else if (StriCmp (CommandArg, L"off") == 0) {
DebuggerPrivate->FeatureFlags &= ~EFI_DEBUG_FLAG_EBC_B_BOK;
EDBPrint (L"BOK off\n");
} else {
EDBPrint (L"BOK - argument error\n");
}
//
// Done
//
return EFI_DEBUG_CONTINUE;
}
|