MdeModulePkg/EbcDxe: Make the comments align with EDKII coding style

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Pete Batard <pete@akeo.ie>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen.yao@intel.com
This commit is contained in:
Dandan Bi 2016-11-29 11:01:00 +08:00 committed by Star Zeng
parent 445d200762
commit e8a5ac7c49
30 changed files with 2356 additions and 4016 deletions

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007 - 2016, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,13 +9,7 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
Ebc.c
Abstract:
--*/
**/
#include <Uefi.h>
#include "Edb.h"
@ -66,27 +60,19 @@ CHAR16 *mExceptionStr[] = {
L"EXCEPT_EBC_SINGLE_STEP",
};
/**
Clear all the breakpoint.
@param DebuggerPrivate EBC Debugger private data structure
@param NeedRemove Whether need to remove all the breakpoint
**/
VOID
EdbClearAllBreakpoint (
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
IN BOOLEAN NeedRemove
)
/*++
Routine Description:
Clear all the breakpoint
Arguments:
DebuggerPrivate - EBC Debugger private data structure
NeedRemove - Whether need to remove all the breakpoint
Returns:
None
--*/
{
UINTN Index;
@ -117,25 +103,17 @@ Returns:
return ;
}
/**
Set all the breakpoint.
@param DebuggerPrivate EBC Debugger private data structure
**/
VOID
EdbSetAllBreakpoint (
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate
)
/*++
Routine Description:
Set all the breakpoint
Arguments:
DebuggerPrivate - EBC Debugger private data structure
Returns:
None
--*/
{
UINTN Index;
UINT16 Data16;
@ -173,28 +151,20 @@ Returns:
return ;
}
/**
Check all the breakpoint, if match, then set status flag, and record current breakpoint.
Then clear all breakpoint to let user see a clean memory
@param DebuggerPrivate EBC Debugger private data structure
@param SystemContext EBC system context.
**/
VOID
EdbCheckBreakpoint (
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
IN EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
Check all the breakpoint, if match, then set status flag, and record current breakpoint.
Then clear all breakpoint to let user see a clean memory
Arguments:
DebuggerPrivate - EBC Debugger private data structure
SystemContext - EBC system context.
Returns:
None
--*/
{
UINT64 Address;
UINTN Index;
@ -277,25 +247,16 @@ Returns:
return ;
}
/**
clear all the symbol.
@param DebuggerPrivate EBC Debugger private data structure
**/
VOID
EdbClearSymbol (
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate
)
/*++
Routine Description:
clear all the symbol
Arguments:
DebuggerPrivate - EBC Debugger private data structure
Returns:
None
--*/
{
EFI_DEBUGGER_SYMBOL_CONTEXT *DebuggerSymbolContext;
EFI_DEBUGGER_SYMBOL_OBJECT *Object;
@ -332,6 +293,16 @@ Returns:
return ;
}
/**
Initialize Debugger private data structure
@param DebuggerPrivate EBC Debugger private data structure
@param ExceptionType Exception type.
@param SystemContext EBC system context.
@param Initialized Whether the DebuggerPrivate data is initialized.
**/
EFI_STATUS
InitDebuggerPrivateData (
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
@ -339,24 +310,6 @@ InitDebuggerPrivateData (
IN EFI_SYSTEM_CONTEXT SystemContext,
IN BOOLEAN Initialized
)
/*++
Routine Description:
Initialize Debugger private data structure
Arguments:
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Initialized - Whether the DebuggerPrivate data is initialized.
Returns:
None
--*/
{
//
// clear STEP flag in any condition.
@ -404,6 +357,16 @@ Returns:
return EFI_SUCCESS;
}
/**
De-initialize Debugger private data structure.
@param DebuggerPrivate EBC Debugger private data structure
@param ExceptionType Exception type.
@param SystemContext EBC system context.
@param Initialized Whether the DebuggerPrivate data is initialized.
**/
EFI_STATUS
DeinitDebuggerPrivateData (
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
@ -411,24 +374,6 @@ DeinitDebuggerPrivateData (
IN EFI_SYSTEM_CONTEXT SystemContext,
IN BOOLEAN Initialized
)
/*++
Routine Description:
De-initialize Debugger private data structure
Arguments:
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Initialized - Whether the DebuggerPrivate data is initialized.
Returns:
None
--*/
{
if (!Initialized) {
//
@ -468,6 +413,16 @@ Returns:
return EFI_SUCCESS;
}
/**
Print the reason of current break to EbcDebugger.
@param DebuggerPrivate EBC Debugger private data structure
@param ExceptionType Exception type.
@param SystemContext EBC system context.
@param Initialized Whether the DebuggerPrivate data is initialized.
**/
VOID
PrintExceptionReason (
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
@ -475,24 +430,6 @@ PrintExceptionReason (
IN EFI_SYSTEM_CONTEXT SystemContext,
IN BOOLEAN Initialized
)
/*++
Routine Description:
Print the reason of current break to EbcDebugger.
Arguments:
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Initialized - Whether the DebuggerPrivate data is initialized.
Returns:
None
--*/
{
//
// Print break status
@ -529,30 +466,22 @@ Returns:
return ;
}
/**
The default Exception Callback for the VM interpreter.
In this function, we report status code, and print debug information
about EBC_CONTEXT, then dead loop.
@param ExceptionType Exception type.
@param SystemContext EBC system context.
**/
VOID
EFIAPI
EdbExceptionHandler (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
The default Exception Callback for the VM interpreter.
In this function, we report status code, and print debug information
about EBC_CONTEXT, then dead loop.
Arguments:
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
None
--*/
{
CHAR16 InputBuffer[EFI_DEBUG_INPUS_BUFFER_SIZE];
CHAR16 *CommandArg;

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,14 +9,8 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
Edb.h
Abstract:
--*/
**/
#ifndef _EFI_EDB_H_
#define _EFI_EDB_H_
@ -30,15 +24,29 @@ Abstract:
#define EFI_DEBUG_BREAK 2
#define EFI_DEBUG_CONTINUE 3
//
// Function
//
/**
Driver Entry point.
@param ImageHandle ImageHandle of the loaded driver.
@param SystemTable Pointer to the EFI System Table.
**/
EFI_STATUS
EfiDebuggerEntrypoint (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
);
/**
The default Exception Callback for the VM interpreter.
In this function, we report status code, and print debug information
about EBC_CONTEXT, then dead loop.
@param ExceptionType Exception type.
@param SystemContext EBC system context.
**/
VOID
EFIAPI
EdbExceptionHandler (

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,14 +9,8 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbCmdBranch.c
Abstract:
--*/
**/
#include "Edb.h"
@ -28,25 +22,19 @@ CHAR16 *mBranchTypeStr[] = {
L"(JMP8)",
};
/**
Comvert Branch Type to string.
@param Type Branch Type
@retval String string of Branch Type.
**/
CHAR16 *
EdbBranchTypeToStr (
IN EFI_DEBUGGER_BRANCH_TYPE Type
)
/*++
Routine Description:
Comvert Branch Type to string
Arguments:
Type - Branch Type
Returns:
String
--*/
{
if (Type < 0 || Type >= EfiDebuggerBranchTypeEbcMax) {
return L"(Unknown Type)";
@ -55,6 +43,18 @@ Returns:
return mBranchTypeStr [Type];
}
/**
DebuggerCommand - CallStack.
@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
DebuggerCallStack (
IN CHAR16 *CommandArg,
@ -62,24 +62,6 @@ DebuggerCallStack (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - CallStack
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
INTN Index;
UINTN SubIndex;
@ -256,6 +238,18 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - InstructionBranch.
@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
DebuggerInstructionBranch (
IN CHAR16 *CommandArg,
@ -263,24 +257,6 @@ DebuggerInstructionBranch (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - InstructionBranch
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
UINTN Index;

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,17 +9,24 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbCmdBreak.c
Abstract:
--*/
**/
#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,
@ -27,24 +34,6 @@ DebuggerBreakOnCALL (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - BreakOnCALL
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
//
// Check argument
@ -71,6 +60,19 @@ Returns:
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,
@ -78,24 +80,6 @@ DebuggerBreakOnCALLEX (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - BreakOnCALLEX
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
//
// Check argument
@ -122,6 +106,19 @@ Returns:
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,
@ -129,24 +126,6 @@ DebuggerBreakOnRET (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - BreakOnRET
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
//
// Check argument
@ -173,6 +152,19 @@ Returns:
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,
@ -180,24 +172,6 @@ DebuggerBreakOnEntrypoint (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - BreakOnEntrypoint
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
//
// Check argument
@ -224,6 +198,21 @@ Returns:
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,
@ -231,24 +220,6 @@ DebuggerBreakOnThunk (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - BreakOnThunk
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
//
// Check argument
@ -275,6 +246,20 @@ Returns:
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,
@ -282,24 +267,6 @@ DebuggerBreakOnKey (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - BreakOnKey
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
//
// Check argument

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007 - 2016, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,37 +9,25 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbCmdBreakpoint.c
Abstract:
--*/
**/
#include "Edb.h"
/**
Check whether current IP is EBC BREAK3 instruction.
@param Address EBC IP address.
@retval TRUE Current IP is EBC BREAK3 instruction
@retval FALSE Current IP is not EBC BREAK3 instruction
**/
BOOLEAN
IsEBCBREAK3 (
IN UINTN Address
)
/*++
Routine Description:
Check whether current IP is EBC BREAK3 instruction
Arguments:
Address - EBC IP address.
Returns:
TRUE - Current IP is EBC BREAK3 instruction
FALSE - Current IP is not EBC BREAK3 instruction
--*/
{
if (GET_OPCODE(Address) != OPCODE_BREAK) {
return FALSE;
@ -52,28 +40,22 @@ Returns:
}
}
/**
Check whether the Address is already set in breakpoint.
@param DebuggerPrivate EBC Debugger private data structure
@param Address Breakpoint Address
@retval TRUE breakpoint is found
@retval FALSE breakpoint is not found
**/
BOOLEAN
DebuggerBreakpointIsDuplicated (
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
IN UINTN Address
)
/*++
Routine Description:
Check whether the Address is already set in breakpoint
Arguments:
DebuggerPrivate - EBC Debugger private data structure
Address - Breakpoint Address
Returns:
TRUE - breakpoint is found
FALSE - breakpoint is not found
--*/
{
UINTN Index;
@ -95,29 +77,23 @@ Returns:
return FALSE;
}
/**
Add this breakpoint.
@param DebuggerPrivate EBC Debugger private data structure
@param Address Breakpoint Address
@retval EFI_SUCCESS breakpoint added successfully
@retval EFI_ALREADY_STARTED breakpoint is already added
@retval EFI_OUT_OF_RESOURCES all the breakpoint entries are used
**/
EFI_STATUS
DebuggerBreakpointAdd (
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
IN UINTN Address
)
/*++
Routine Description:
Add this breakpoint
Arguments:
DebuggerPrivate - EBC Debugger private data structure
Address - Breakpoint Address
Returns:
EFI_SUCCESS - breakpoint added successfully
EFI_ALREADY_STARTED - breakpoint is already added
EFI_OUT_OF_RESOURCES - all the breakpoint entries are used
--*/
{
//
// Check duplicated breakpoint
@ -160,28 +136,22 @@ Returns:
return EFI_SUCCESS;
}
/**
Delete this breakpoint.
@param DebuggerPrivate EBC Debugger private data structure
@param Index Breakpoint Index
@retval EFI_SUCCESS breakpoint deleted successfully
@retval EFI_NOT_FOUND breakpoint not found
**/
EFI_STATUS
DebuggerBreakpointDel (
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
IN UINTN Index
)
/*++
Routine Description:
Delete this breakpoint
Arguments:
DebuggerPrivate - EBC Debugger private data structure
Index - Breakpoint Index
Returns:
EFI_SUCCESS - breakpoint deleted successfully
EFI_NOT_FOUND - breakpoint not found
--*/
{
UINTN BpIndex;
@ -209,28 +179,22 @@ Returns:
return EFI_SUCCESS;
}
/**
Disable this breakpoint.
@param DebuggerPrivate EBC Debugger private data structure
@param Index Breakpoint Index
@retval EFI_SUCCESS breakpoint disabled successfully
@retval EFI_NOT_FOUND breakpoint not found
**/
EFI_STATUS
DebuggerBreakpointDis (
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
IN UINTN Index
)
/*++
Routine Description:
Disable this breakpoint
Arguments:
DebuggerPrivate - EBC Debugger private data structure
Index - Breakpoint Index
Returns:
EFI_SUCCESS - breakpoint disabled successfully
EFI_NOT_FOUND - breakpoint not found
--*/
{
if ((Index >= EFI_DEBUGGER_BREAKPOINT_MAX) ||
(Index >= DebuggerPrivate->DebuggerBreakpointCount)) {
@ -245,28 +209,22 @@ Returns:
return EFI_SUCCESS;
}
/**
Enable this breakpoint.
@param DebuggerPrivate - EBC Debugger private data structure
@param Index - Breakpoint Index
@retval EFI_SUCCESS - breakpoint enabled successfully
@retval EFI_NOT_FOUND - breakpoint not found
**/
EFI_STATUS
DebuggerBreakpointEn (
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
IN UINTN Index
)
/*++
Routine Description:
Enable this breakpoint
Arguments:
DebuggerPrivate - EBC Debugger private data structure
Index - Breakpoint Index
Returns:
EFI_SUCCESS - breakpoint enabled successfully
EFI_NOT_FOUND - breakpoint not found
--*/
{
if ((Index >= EFI_DEBUGGER_BREAKPOINT_MAX) ||
(Index >= DebuggerPrivate->DebuggerBreakpointCount)) {
@ -281,6 +239,18 @@ Returns:
return EFI_SUCCESS;
}
/**
DebuggerCommand - BreakpointList.
@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
DebuggerBreakpointList (
IN CHAR16 *CommandArg,
@ -288,24 +258,6 @@ DebuggerBreakpointList (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - BreakpointList
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
UINTN Index;
@ -347,6 +299,18 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - BreakpointSet.
@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
DebuggerBreakpointSet (
IN CHAR16 *CommandArg,
@ -354,24 +318,6 @@ DebuggerBreakpointSet (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - BreakpointSet
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
UINTN Address;
EFI_STATUS Status;
@ -411,6 +357,18 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - BreakpointClear
@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
DebuggerBreakpointClear (
IN CHAR16 *CommandArg,
@ -418,24 +376,6 @@ DebuggerBreakpointClear (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - BreakpointClear
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
UINTN Index;
EFI_STATUS Status;
@ -484,6 +424,18 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - BreakpointDisable
@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
DebuggerBreakpointDisable (
IN CHAR16 *CommandArg,
@ -491,24 +443,6 @@ DebuggerBreakpointDisable (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - BreakpointDisable
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
UINTN Index;
EFI_STATUS Status;
@ -552,6 +486,17 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - BreakpointEnable.
@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
DebuggerBreakpointEnable (
IN CHAR16 *CommandArg,
@ -559,24 +504,6 @@ DebuggerBreakpointEnable (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - BreakpointEnable
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
UINTN Index;
EFI_STATUS Status;

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,17 +9,23 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbCmdExtIo.c
Abstract:
--*/
**/
#include "Edb.h"
/**
DebuggerCommand - IB.
@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
DebuggerExtIoIB (
IN CHAR16 *CommandArg,
@ -27,24 +33,6 @@ DebuggerExtIoIB (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - IB
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
EDBPrint (L"Unsupported\n");
//
@ -53,6 +41,20 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - IW.
@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
DebuggerExtIoIW (
IN CHAR16 *CommandArg,
@ -60,24 +62,6 @@ DebuggerExtIoIW (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - IW
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
EDBPrint (L"Unsupported\n");
//
@ -86,6 +70,19 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - ID.
@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
DebuggerExtIoID (
IN CHAR16 *CommandArg,
@ -93,24 +90,6 @@ DebuggerExtIoID (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - ID
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
EDBPrint (L"Unsupported\n");
//
@ -119,6 +98,18 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - OB.
@param CommandArg - The argument for this command
@param DebuggerPrivate - EBC Debugger private data structure
@param ExceptionType - Interrupt type.
@param SystemContext - EBC system context.
@retval EFI_DEBUG_CONTINUE - formal return value
**/
EFI_DEBUG_STATUS
DebuggerExtIoOB (
IN CHAR16 *CommandArg,
@ -126,24 +117,6 @@ DebuggerExtIoOB (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - OB
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
EDBPrint (L"Unsupported\n");
//
@ -152,6 +125,19 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - OW.
@param CommandArg - The argument for this command
@param DebuggerPrivate - EBC Debugger private data structure
@param ExceptionType - Interrupt type.
@param SystemContext - EBC system context.
@retval EFI_DEBUG_CONTINUE - formal return value
**/
EFI_DEBUG_STATUS
DebuggerExtIoOW (
IN CHAR16 *CommandArg,
@ -159,24 +145,6 @@ DebuggerExtIoOW (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - OW
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
EDBPrint (L"Unsupported\n");
//
@ -185,6 +153,19 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - OD.
@param CommandArg - The argument for this command
@param DebuggerPrivate - EBC Debugger private data structure
@param ExceptionType - Interrupt type.
@param SystemContext - EBC system context.
@retval EFI_DEBUG_CONTINUE - formal return value
**/
EFI_DEBUG_STATUS
DebuggerExtIoOD (
IN CHAR16 *CommandArg,
@ -192,24 +173,6 @@ DebuggerExtIoOD (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - OD
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
EDBPrint (L"Unsupported\n");
//

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,17 +9,23 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbCmdExtPci.c
Abstract:
--*/
**/
#include "Edb.h"
/**
DebuggerCommand - PCIL.
@param CommandArg - The argument for this command
@param DebuggerPrivate - EBC Debugger private data structure
@param ExceptionType - Interrupt type.
@param SystemContext - EBC system context.
@retval EFI_DEBUG_CONTINUE - formal return value
**/
EFI_DEBUG_STATUS
DebuggerExtPciPCIL (
IN CHAR16 *CommandArg,
@ -27,24 +33,6 @@ DebuggerExtPciPCIL (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - PCIL
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
EDBPrint (L"Unsupported\n");
//
@ -53,6 +41,18 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - PCID.
@param CommandArg - The argument for this command
@param DebuggerPrivate - EBC Debugger private data structure
@param ExceptionType - Interrupt type.
@param SystemContext - EBC system context.
@retval EFI_DEBUG_CONTINUE - formal return value
**/
EFI_DEBUG_STATUS
DebuggerExtPciPCID (
IN CHAR16 *CommandArg,
@ -60,24 +60,6 @@ DebuggerExtPciPCID (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - PCID
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
EDBPrint (L"Unsupported\n");
//
@ -86,6 +68,18 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - CFGB.
@param CommandArg - The argument for this command
@param DebuggerPrivate - EBC Debugger private data structure
@param ExceptionType - Interrupt type.
@param SystemContext - EBC system context.
@retval EFI_DEBUG_CONTINUE - formal return value
**/
EFI_DEBUG_STATUS
DebuggerExtPciCFGB (
IN CHAR16 *CommandArg,
@ -93,24 +87,6 @@ DebuggerExtPciCFGB (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - CFGB
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
EDBPrint (L"Unsupported\n");
//
@ -119,6 +95,19 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - CFGW.
@param CommandArg - The argument for this command
@param DebuggerPrivate - EBC Debugger private data structure
@param ExceptionType - Interrupt type.
@param SystemContext - EBC system context.
@retval EFI_DEBUG_CONTINUE - formal return value
**/
EFI_DEBUG_STATUS
DebuggerExtPciCFGW (
IN CHAR16 *CommandArg,
@ -126,24 +115,6 @@ DebuggerExtPciCFGW (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - CFGW
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
EDBPrint (L"Unsupported\n");
//
@ -152,6 +123,18 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - CFGD.
@param CommandArg - The argument for this command
@param DebuggerPrivate - EBC Debugger private data structure
@param ExceptionType - Interrupt type.
@param SystemContext - EBC system context.
@retval EFI_DEBUG_CONTINUE - formal return value
**/
EFI_DEBUG_STATUS
DebuggerExtPciCFGD (
IN CHAR16 *CommandArg,
@ -159,24 +142,6 @@ DebuggerExtPciCFGD (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - CFGD
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
EDBPrint (L"Unsupported\n");
//

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,17 +9,25 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbCmdGo.c
Abstract:
--*/
**/
#include "Edb.h"
/**
DebuggerCommand - Go.
@param CommandArg - The argument for this command
@param DebuggerPrivate - EBC Debugger private data structure
@param ExceptionType - Interrupt type.
@param SystemContext - EBC system context.
@retval EFI_DEBUG_BREAK - formal return value
@retval EFI_DEBUG_CONTINUE - something wrong
**/
EFI_DEBUG_STATUS
DebuggerGo (
IN CHAR16 *CommandArg,
@ -27,25 +35,6 @@ DebuggerGo (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - Go
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_BREAK - formal return value
EFI_DEBUG_CONTINUE - something wrong
--*/
{
UINTN Address;
CHAR16 *CommandStr;

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,17 +9,23 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbCmdHelp.c
Abstract:
--*/
**/
#include "Edb.h"
/**
DebuggerCommand - Help.
@param CommandArg - The argument for this command
@param DebuggerPrivate - EBC Debugger private data structure
@param ExceptionType - Interrupt type.
@param SystemContext - EBC system context.
@retval EFI_DEBUG_CONTINUE - formal return value
**/
EFI_DEBUG_STATUS
DebuggerHelp (
IN CHAR16 *CommandArg,
@ -27,24 +33,6 @@ DebuggerHelp (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - Help
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
UINTN Index;

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,38 +9,27 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbCmdMemory.c
Abstract:
--*/
**/
#include "Edb.h"
/**
Display memory unit.
@param Address - Memory Address
@param Width - Memory Width
@return Length of the memory unit
**/
UINTN
EdbDisplayMemoryUnit (
IN UINTN Address,
IN EDB_DATA_WIDTH Width
)
/*++
Routine Description:
Display memory unit
Arguments:
Address - Memory Address
Width - Memory Width
Returns:
Length of the memory unit
--*/
{
UINT8 Data8;
UINT16 Data16;
@ -78,29 +67,21 @@ Returns:
return 0;
}
/**
Display memory.
@param Address - Memory Address
@param Count - Memory Count
@param Width - Memory Width
**/
VOID
EdbDisplayMemory (
IN UINTN Address,
IN UINTN Count,
IN EDB_DATA_WIDTH Width
)
/*++
Routine Description:
Display memory
Arguments:
Address - Memory Address
Count - Memory Count
Width - Memory Width
Returns:
None
--*/
{
UINTN LineNumber;
UINTN ByteNumber;
@ -182,29 +163,21 @@ Returns:
return ;
}
/**
Entry memory.
@param Address - Memory Address
@param Value - Memory Value
@param Width - Memory Width
**/
VOID
EdbEnterMemory (
IN UINTN Address,
IN VOID *Value,
IN EDB_DATA_WIDTH Width
)
/*++
Routine Description:
Entry memory
Arguments:
Address - Memory Address
Value - Memory Value
Width - Memory Width
Returns:
None
--*/
{
switch (Width) {
case EdbWidthUint8:
@ -226,30 +199,24 @@ Returns:
return ;
}
/**
Get memory address and count.
@param CommandArg - The argument for this command
@param Address - Memory Address
@param Count - Memory Count
@retval EFI_SUCCESS - memory address and count are got
@retval EFI_INVALID_PARAMETER - something wrong
**/
EFI_STATUS
EdbGetMemoryAddressCount (
IN CHAR16 *CommandArg,
IN UINTN *Address,
IN UINTN *Count
)
/*++
Routine Description:
Get memory address and count
Arguments:
CommandArg - The argument for this command
Address - Memory Address
Count - Memory Count
Returns:
EFI_SUCCESS - memory address and count are got
EFI_INVALID_PARAMETER - something wrong
--*/
{
CHAR16 *CommandStr;
UINTN MemAddress;
@ -293,30 +260,24 @@ Returns:
return EFI_SUCCESS;
}
/**
Get memory address and value.
@param CommandArg - The argument for this command
@param Address - Memory Address
@param Value - Memory Value
@retval EFI_SUCCESS - memory address and value are got
@retval EFI_INVALID_PARAMETER - something wrong
**/
EFI_STATUS
EdbGetMemoryAddressValue (
IN CHAR16 *CommandArg,
IN UINTN *Address,
IN UINT64 *Value
)
/*++
Routine Description:
Get memory address and value
Arguments:
CommandArg - The argument for this command
Address - Memory Address
Value - Memory Value
Returns:
EFI_SUCCESS - memory address and value are got
EFI_INVALID_PARAMETER - something wrong
--*/
{
CHAR16 *CommandStr;
UINTN MemAddress;
@ -360,27 +321,21 @@ Returns:
return EFI_SUCCESS;
}
/**
Display memory.
@param CommandArg - The argument for this command
@param Width - Memory Width
@retval EFI_DEBUG_RETURN - formal return value
**/
EFI_DEBUG_STATUS
DebuggerMemoryDisplay (
IN CHAR16 *CommandArg,
IN EDB_DATA_WIDTH Width
)
/*++
Routine Description:
Display memory
Arguments:
CommandArg - The argument for this command
Width - Memory Width
Returns:
EFI_DEBUG_RETURN - formal return value
--*/
{
EFI_STATUS Status;
UINTN Address;
@ -405,27 +360,21 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
Enter memory.
@param CommandArg - The argument for this command
@param Width - Memory Width
@retval EFI_DEBUG_RETURN - formal return value
**/
EFI_DEBUG_STATUS
DebuggerMemoryEnter (
IN CHAR16 *CommandArg,
IN EDB_DATA_WIDTH Width
)
/*++
Routine Description:
Enter memory
Arguments:
CommandArg - The argument for this command
Width - Memory Width
Returns:
EFI_DEBUG_RETURN - formal return value
--*/
{
EFI_STATUS Status;
UINTN Address;
@ -450,6 +399,18 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - DB.
@param CommandArg - The argument for this command
@param DebuggerPrivate - EBC Debugger private data structure
@param ExceptionType - Interrupt type.
@param SystemContext - EBC system context.
@retval EFI_DEBUG_RETURN - formal return value
**/
EFI_DEBUG_STATUS
DebuggerMemoryDB (
IN CHAR16 *CommandArg,
@ -457,28 +418,22 @@ DebuggerMemoryDB (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - DB
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_RETURN - formal return value
--*/
{
return DebuggerMemoryDisplay (CommandArg, EdbWidthUint8);
}
/**
DebuggerCommand - DW.
@param CommandArg - The argument for this command
@param DebuggerPrivate - EBC Debugger private data structure
@param ExceptionType - Interrupt type.
@param SystemContext - EBC system context.
@retval EFI_DEBUG_RETURN - formal return value
**/
EFI_DEBUG_STATUS
DebuggerMemoryDW (
IN CHAR16 *CommandArg,
@ -486,28 +441,22 @@ DebuggerMemoryDW (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - DW
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_RETURN - formal return value
--*/
{
return DebuggerMemoryDisplay (CommandArg, EdbWidthUint16);
}
/**
DebuggerCommand - DD.
@param CommandArg - The argument for this command
@param DebuggerPrivate - EBC Debugger private data structure
@param ExceptionType - Interrupt type.
@param SystemContext - EBC system context.
@retval EFI_DEBUG_RETURN - formal return value
**/
EFI_DEBUG_STATUS
DebuggerMemoryDD (
IN CHAR16 *CommandArg,
@ -515,28 +464,22 @@ DebuggerMemoryDD (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - DD
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_RETURN - formal return value
--*/
{
return DebuggerMemoryDisplay (CommandArg, EdbWidthUint32);
}
/**
DebuggerCommand - DQ.
@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_RETURN - formal return value
**/
EFI_DEBUG_STATUS
DebuggerMemoryDQ (
IN CHAR16 *CommandArg,
@ -544,28 +487,22 @@ DebuggerMemoryDQ (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - DQ
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_RETURN - formal return value
--*/
{
return DebuggerMemoryDisplay (CommandArg, EdbWidthUint64);
}
/**
DebuggerCommand - EB.
@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_RETURN - formal return value
**/
EFI_DEBUG_STATUS
DebuggerMemoryEB (
IN CHAR16 *CommandArg,
@ -573,28 +510,22 @@ DebuggerMemoryEB (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - EB
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_RETURN - formal return value
--*/
{
return DebuggerMemoryEnter (CommandArg, EdbWidthUint8);
}
/**
DebuggerCommand - EW.
@param CommandArg - The argument for this command
@param DebuggerPrivate - EBC Debugger private data structure
@param ExceptionType - Interrupt type.
@param SystemContext - EBC system context.
@retval EFI_DEBUG_RETURN - formal return value
**/
EFI_DEBUG_STATUS
DebuggerMemoryEW (
IN CHAR16 *CommandArg,
@ -602,28 +533,22 @@ DebuggerMemoryEW (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - EW
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_RETURN - formal return value
--*/
{
return DebuggerMemoryEnter (CommandArg, EdbWidthUint16);
}
/**
DebuggerCommand - ED.
@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_RETURN - formal return value
**/
EFI_DEBUG_STATUS
DebuggerMemoryED (
IN CHAR16 *CommandArg,
@ -631,28 +556,22 @@ DebuggerMemoryED (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - ED
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_RETURN - formal return value
--*/
{
return DebuggerMemoryEnter (CommandArg, EdbWidthUint32);
}
/**
DebuggerCommand - EQ.
@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_RETURN - formal return value
**/
EFI_DEBUG_STATUS
DebuggerMemoryEQ (
IN CHAR16 *CommandArg,
@ -660,24 +579,6 @@ DebuggerMemoryEQ (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - EQ
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_RETURN - formal return value
--*/
{
return DebuggerMemoryEnter (CommandArg, EdbWidthUint64);
}

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation.All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -16,10 +16,22 @@ Module Name:
Abstract:
--*/
**/
#include "Edb.h"
/**
DebuggerCommand - Quit
@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_RETURN - formal return value
**/
EFI_DEBUG_STATUS
DebuggerQuit (
IN CHAR16 *CommandArg,
@ -27,24 +39,6 @@ DebuggerQuit (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - Quit
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_RETURN - formal return value
--*/
{
return EFI_DEBUG_RETURN;
}

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation.All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,17 +9,23 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbCmdRegister.c
Abstract:
--*/
**/
#include "Edb.h"
/**
DebuggerCommand - Register.
@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
DebuggerRegister (
IN CHAR16 *CommandArg,
@ -27,24 +33,6 @@ DebuggerRegister (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - Register
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
CHAR16 *RegName;
CHAR16 *RegValStr;

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,17 +9,23 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbCmdScope.c
Abstract:
--*/
**/
#include "Edb.h"
/**
DebuggerCommand - Scope.
@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
DebuggerScope (
IN CHAR16 *CommandArg,
@ -27,24 +33,6 @@ DebuggerScope (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - Scope
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
EFI_STATUS Status;
UINTN Address;
@ -79,6 +67,18 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - List.
@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
DebuggerList (
IN CHAR16 *CommandArg,
@ -86,24 +86,6 @@ DebuggerList (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - List
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
if (CommandArg == NULL) {
EdbShowDisasm (DebuggerPrivate, SystemContext);

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,37 +9,25 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbCmdStep.c
Abstract:
--*/
**/
#include "Edb.h"
/**
Check whether current IP is EBC CALL instruction (NOTE: CALLEX is exclusive)
@param Address - EBC IP address.
@retval TRUE - Current IP is EBC CALL instruction
@retval FALSE - Current IP is not EBC CALL instruction
**/
BOOLEAN
IsEBCCALL (
IN UINTN Address
)
/*++
Routine Description:
Check whether current IP is EBC CALL instruction (NOTE: CALLEX is exclusive)
Arguments:
Address - EBC IP address.
Returns:
TRUE - Current IP is EBC CALL instruction
FALSE - Current IP is not EBC CALL instruction
--*/
{
if (GET_OPCODE(Address) != OPCODE_CALL) {
return FALSE;
@ -52,26 +40,20 @@ Returns:
}
}
/**
Check whether current IP is EBC RET instruction.
@param Address - EBC IP address.
@retval TRUE - Current IP is EBC RET instruction
@retval FALSE - Current IP is not EBC RET instruction
**/
BOOLEAN
IsEBCRET (
IN UINTN Address
)
/*++
Routine Description:
Check whether current IP is EBC RET instruction
Arguments:
Address - EBC IP address.
Returns:
TRUE - Current IP is EBC RET instruction
FALSE - Current IP is not EBC RET instruction
--*/
{
if (GET_OPCODE(Address) != OPCODE_RET) {
return FALSE;
@ -84,6 +66,18 @@ Returns:
}
}
/**
DebuggerCommand - StepInto.
@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
DebuggerStepInto (
IN CHAR16 *CommandArg,
@ -91,30 +85,24 @@ DebuggerStepInto (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - StepInto
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
SystemContext.SystemContextEbc->Flags |= VMFLAGS_STEP;
return EFI_DEBUG_BREAK;
}
/**
DebuggerCommand - StepOver.
@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
DebuggerStepOver (
IN CHAR16 *CommandArg,
@ -122,24 +110,6 @@ DebuggerStepOver (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - StepOver
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
if (IsEBCCALL((UINTN)SystemContext.SystemContextEbc->Ip)) {
//
@ -156,6 +126,18 @@ Returns:
return EFI_DEBUG_BREAK;
}
/**
DebuggerCommand - StepOut.
@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
DebuggerStepOut (
IN CHAR16 *CommandArg,
@ -163,24 +145,6 @@ DebuggerStepOut (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - StepOut
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
if (IsEBCRET((UINTN)SystemContext.SystemContextEbc->Ip)) {
//

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007 - 2016, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,36 +9,24 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbCmdSymbol.c
Abstract:
--*/
**/
#include "Edb.h"
/**
Get file name from full path.
@param FullPath - full file path
@return file name
**/
CHAR16 *
GetFileNameFromFullPath (
IN CHAR16 *FullPath
)
/*++
Routine Description:
Get file name from full path
Arguments:
FullPath - full file path
Returns:
file name
--*/
{
CHAR16 *FileName;
CHAR16 *TempFileName;
@ -55,25 +43,19 @@ Returns:
return FileName;
}
/**
Get dir name from full path.
@param FullPath - full file path
@return dir name
**/
CHAR16 *
GetDirNameFromFullPath (
IN CHAR16 *FullPath
)
/*++
Routine Description:
Get dir name from full path
Arguments:
FullPath - full file path
Returns:
dir name
--*/
{
CHAR16 *FileName;
@ -86,29 +68,23 @@ Returns:
return L"";
}
/**
Construct full path accroding to dir and file path.
@param DirPath - dir path
@param FilePath - file path
@param Size - dir max size
@return Full file name
**/
CHAR16 *
ConstructFullPath (
IN CHAR16 *DirPath,
IN CHAR16 *FilePath,
IN UINTN Size
)
/*++
Routine Description:
Construct full path accroding to dir and file path
Arguments:
DirPath - dir path
FilePath - file path
Size - dir max size
Returns:
Full file name
--*/
{
UINTN DirPathSize;
@ -128,25 +104,19 @@ CHAR16 *mSymbolTypeStr[] = {
L"(SV)",
};
/**
Comvert Symbol Type to string.
@param Type - Symbol Type
@return String
**/
CHAR16 *
EdbSymbolTypeToStr (
IN EFI_DEBUGGER_SYMBOL_TYPE Type
)
/*++
Routine Description:
Comvert Symbol Type to string
Arguments:
Type - Symbol Type
Returns:
String
--*/
{
if (Type < 0 || Type >= EfiDebuggerSymbolTypeMax) {
return L"(?)";
@ -155,27 +125,21 @@ Returns:
return mSymbolTypeStr [Type];
}
/**
Find the symbol accroding to address and display symbol.
@param Address - SymbolAddress
@param DebuggerPrivate - EBC Debugger private data structure
@retval EFI_DEBUG_CONTINUE - formal return value
**/
EFI_DEBUG_STATUS
DebuggerDisplaySymbolAccrodingToAddress (
IN UINTN Address,
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate
)
/*++
Routine Description:
Find the symbol accroding to address and display symbol
Arguments:
Address - SymbolAddress
DebuggerPrivate - EBC Debugger private data structure
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
EFI_DEBUGGER_SYMBOL_OBJECT *Object;
EFI_DEBUGGER_SYMBOL_ENTRY *Entry;
@ -224,29 +188,23 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
Find the symbol accroding to name and display symbol.
@param SymbolFileName - The Symbol File Name, NULL means for all
@param SymbolName - The Symbol Name, NULL means for all
@param DebuggerPrivate - EBC Debugger private data structure
@retval EFI_DEBUG_CONTINUE - formal return value
**/
EFI_DEBUG_STATUS
DebuggerDisplaySymbolAccrodingToName (
IN CHAR16 *SymbolFileName,
IN CHAR16 *SymbolName,
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate
)
/*++
Routine Description:
Find the symbol accroding to name and display symbol
Arguments:
SymbolFileName - The Symbol File Name, NULL means for all
SymbolName - The Symbol Name, NULL means for all
DebuggerPrivate - EBC Debugger private data structure
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
UINTN Index;
UINTN SubIndex;
@ -338,6 +296,18 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - ListSymbol.
@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
DebuggerListSymbol (
IN CHAR16 *CommandArg,
@ -345,24 +315,6 @@ DebuggerListSymbol (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - ListSymbol
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
CHAR16 *SymbolFileName;
CHAR16 *SymbolName;
@ -425,6 +377,18 @@ Returns:
return DebuggerDisplaySymbolAccrodingToName (SymbolFileName, SymbolName, DebuggerPrivate);
}
/**
DebuggerCommand - LoadSymbol.
@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
DebuggerLoadSymbol (
IN CHAR16 *CommandArg,
@ -432,24 +396,6 @@ DebuggerLoadSymbol (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - LoadSymbol
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
UINTN BufferSize;
VOID *Buffer;
@ -590,6 +536,18 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - UnloadSymbol
@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
DebuggerUnloadSymbol (
IN CHAR16 *CommandArg,
@ -597,24 +555,6 @@ DebuggerUnloadSymbol (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - UnloadSymbol
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
EFI_STATUS Status;
CHAR16 *FileName;
@ -696,6 +636,18 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - DisplaySymbol.
@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
DebuggerDisplaySymbol (
IN CHAR16 *CommandArg,
@ -703,24 +655,6 @@ DebuggerDisplaySymbol (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - DisplaySymbol
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
if (CommandArg == NULL) {
DebuggerPrivate->DebuggerSymbolContext.DisplaySymbol = !DebuggerPrivate->DebuggerSymbolContext.DisplaySymbol;
@ -738,6 +672,18 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - LoadCode.
@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
DebuggerLoadCode (
IN CHAR16 *CommandArg,
@ -745,24 +691,6 @@ DebuggerLoadCode (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - LoadCode
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
UINTN BufferSize;
VOID *Buffer;
@ -838,6 +766,18 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - UnloadCode.
@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
DebuggerUnloadCode (
IN CHAR16 *CommandArg,
@ -845,24 +785,6 @@ DebuggerUnloadCode (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - UnloadCode
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
CHAR16 *CommandArg2;
CHAR16 *FileName;
@ -909,6 +831,18 @@ Returns:
return EFI_DEBUG_CONTINUE;
}
/**
DebuggerCommand - DisplayCode.
@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
DebuggerDisplayCode (
IN CHAR16 *CommandArg,
@ -916,24 +850,6 @@ DebuggerDisplayCode (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
/*++
Routine Description:
DebuggerCommand - DisplayCode
Arguments:
CommandArg - The argument for this command
DebuggerPrivate - EBC Debugger private data structure
InterruptType - Interrupt type.
SystemContext - EBC system context.
Returns:
EFI_DEBUG_CONTINUE - formal return value
--*/
{
if (CommandArg == NULL) {
DebuggerPrivate->DebuggerSymbolContext.DisplayCodeOnly = !DebuggerPrivate->DebuggerSymbolContext.DisplayCodeOnly;

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,14 +9,8 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbCommand.c
Abstract:
--*/
**/
#include "Edb.h"
@ -578,28 +572,22 @@ EFI_DEBUGGER_COMMAND_SET mDebuggerCommandSet[] = {
},
};
/**
Find the command according to name.
@param CommandName - Command Name
@param CommandArg - Command Argument
@return Not NULL - The DebuggerCommand is found successfully
@return NULL - not found
**/
EFI_DEBUGGER_COMMAND
MatchDebuggerCommand (
IN CHAR16 *CommandName,
IN CHAR16 **CommandArg
)
/*++
Routine Description:
Find the command according to name
Arguments:
CommandName - Command Name
CommandArg - Command Argument
Returns:
Not NULL - The DebuggerCommand is found successfully
NULL - not found
--*/
{
UINTN Index;
CHAR16 *Temp;
@ -637,26 +625,20 @@ Returns:
return NULL;
}
/**
Find the command name according to the function key.
@param CommandKey - Command Function Key
@return Not NULL - The DebuggerName is found successfully
@return NULL - not found
**/
CHAR16 *
GetCommandNameByKey (
IN EFI_INPUT_KEY CommandKey
)
/*++
Routine Description:
Find the command name according to the function key
Arguments:
CommandKey - Command Function Key
Returns:
Not NULL - The DebuggerName is found successfully
NULL - not found
--*/
{
UINTN Index;

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,14 +9,8 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbCommand.h
Abstract:
--*/
**/
#ifndef _EFI_EDB_COMMAND_H_
#define _EFI_EDB_COMMAND_H_
@ -29,12 +23,33 @@ typedef enum {
EdbWidthMax
} EDB_DATA_WIDTH;
/**
Find the command according to name.
@param CommandName - Command Name
@param CommandArg - Command Argument
@return Not NULL - The DebuggerCommand is found successfully
@return NULL - not found
**/
EFI_DEBUGGER_COMMAND
MatchDebuggerCommand (
IN CHAR16 *CommandName,
IN CHAR16 **CommandArg
);
/**
Find the command name according to the function key.
@param CommandKey - Command Function Key
@return Not NULL - The DebuggerName is found successfully
@return NULL - not found
**/
CHAR16 *
GetCommandNameByKey (
IN EFI_INPUT_KEY CommandKey

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,14 +9,7 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbCommon.h
Abstract:
--*/
**/
#ifndef _EFI_EDB_COMMON_H_
#define _EFI_EDB_COMMON_H_

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,14 +9,8 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbDisasm.c
Abstract:
--*/
**/
#include "Edb.h"
@ -117,29 +111,23 @@ EDB_DISASM_INSTRUCTION mEdbDisasmInstructionTable[] = {
EdbDisasmMOVREL, // opcode 0x39 MOVREL
};
/**
Disasm instruction - BREAK.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmBREAK (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - BREAK
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
ASSERT (GET_OPCODE(InstructionAddress) == OPCODE_BREAK);
@ -164,29 +152,23 @@ Returns:
extern CONST UINT8 mJMPLen[];
/**
Disasm instruction - JMP.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmJMP (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - JMP
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
UINT8 Modifiers;
UINT8 Operands;
@ -248,29 +230,23 @@ Returns:
return Size;
}
/**
Disasm instruction - JMP8.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmJMP8 (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - JMP8
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
UINT8 Modifiers;
@ -300,29 +276,23 @@ Returns:
return 2;
}
/**
Disasm instruction - CALL.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmCALL (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - CALL
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
UINT8 Modifiers;
UINT8 Operands;
@ -410,29 +380,23 @@ Returns:
return Size;
}
/**
Disasm instruction - RET.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmRET (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - RET
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
ASSERT (GET_OPCODE(InstructionAddress) == OPCODE_RET);
@ -454,29 +418,23 @@ Returns:
return 2;
}
/**
Disasm instruction - CMP.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmCMP (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - CMP
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
UINT8 Opcode;
UINT8 Modifiers;
@ -552,29 +510,23 @@ Returns:
return Size;
}
/**
Disasm instruction - Unsigned Data Manipulate.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmUnsignedDataManip (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - Unsigned Data Manipulate
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
UINT8 Modifiers;
UINT8 Opcode;
@ -676,29 +628,23 @@ Returns:
return Size;
}
/**
Disasm instruction - Signed Data Manipulate,
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmSignedDataManip (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - Signed Data Manipulate
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
UINT8 Modifiers;
UINT8 Opcode;
@ -780,29 +726,23 @@ Returns:
return Size;
}
/**
Disasm instruction - MOVxx.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmMOVxx (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - MOVxx
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
UINT8 Modifiers;
UINT8 Opcode;
@ -939,29 +879,23 @@ Returns:
return Size;
}
/**
Disasm instruction - MOVsnw.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmMOVsnw (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - MOVsnw
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
UINT8 Modifiers;
UINT8 Operands;
@ -1015,29 +949,23 @@ Returns:
return Size;
}
/**
Disasm instruction - MOVsnd.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmMOVsnd (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - MOVsnd
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
UINT8 Modifiers;
UINT8 Operands;
@ -1091,29 +1019,23 @@ Returns:
return Size;
}
/**
Disasm instruction - LOADSP.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmLOADSP (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - LOADSP
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
UINT8 Operands;
@ -1139,29 +1061,23 @@ Returns:
return 2;
}
/**
Disasm instruction - STORESP.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmSTORESP (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - STORESP
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
UINT8 Operands;
@ -1187,29 +1103,24 @@ Returns:
return 2;
}
/**
Disasm instruction - PUSH.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmPUSH (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - PUSH
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
UINT8 Modifiers;
UINT8 Operands;
@ -1257,29 +1168,23 @@ Returns:
return Size;
}
/**
Disasm instruction - POP.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmPOP (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - POP
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
UINT8 Modifiers;
UINT8 Operands;
@ -1327,29 +1232,23 @@ Returns:
return Size;
}
/**
Disasm instruction - CMPI.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmCMPI (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - CMPI
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
UINT8 Modifiers;
UINT8 Opcode;
@ -1444,29 +1343,23 @@ Returns:
return Size;
}
/**
Disasm instruction - PUSHn.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmPUSHn (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - PUSHn
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
UINT8 Modifiers;
UINT8 Operands;
@ -1509,29 +1402,23 @@ Returns:
return Size;
}
/**
Disasm instruction - POPn.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmPOPn (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - POPn
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
UINT8 Modifiers;
UINT8 Operands;
@ -1574,29 +1461,23 @@ Returns:
return Size;
}
/**
Disasm instruction - MOVI.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmMOVI (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - MOVI
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
UINT8 Modifiers;
UINT8 Operands;
@ -1688,29 +1569,23 @@ Returns:
return Size;
}
/**
Disasm instruction - MOVIn.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmMOVIn (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - MOVIn
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
UINT8 Modifiers;
UINT8 Operands;
@ -1788,29 +1663,23 @@ Returns:
return Size;
}
/**
Disasm instruction - MOVREL.
@param InstructionAddress - The instruction address
@param SystemContext - EBC system context.
@param DisasmString - The instruction string
@return Instruction length
**/
UINTN
EdbDisasmMOVREL (
IN EFI_PHYSICAL_ADDRESS InstructionAddress,
IN EFI_SYSTEM_CONTEXT SystemContext,
OUT CHAR16 **DisasmString
)
/*++
Routine Description:
Disasm instruction - MOVREL
Arguments:
InstructionAddress - The instruction address
SystemContext - EBC system context.
DisasmString - The instruction string
Returns:
Instruction length
--*/
{
UINT8 Modifiers;
UINT8 Operands;

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,14 +9,8 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbDisasm.h
Abstract:
--*/
**/
#ifndef _EFI_EDB_DISASM_H_
#define _EFI_EDB_DISASM_H_

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,14 +9,8 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbDisasmSupport.h
Abstract:
--*/
**/
#ifndef _EFI_EDB_DISASM_SUPPORT_H_
#define _EFI_EDB_DISASM_SUPPORT_H_

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,40 +9,24 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbHook.c
Abstract:
--*/
**/
#include "Edb.h"
//
// Hook support function
//
/**
Check the Hook flag, and trigger exception if match.
@param VmPtr - EbcDebuggerCheckHookFlag
@param Flag - Feature flag
**/
VOID
EbcDebuggerCheckHookFlag (
IN VM_CONTEXT *VmPtr,
IN UINT32 Flag
)
/*++
Routine Description:
Check the Hook flag, and trigger exception if match.
Arguments:
VmPtr - EbcDebuggerCheckHookFlag
Flag - Feature flag
Returns:
None
--*/
{
if ((mDebuggerPrivate.FeatureFlags & Flag) == Flag) {
mDebuggerPrivate.StatusFlags = Flag;
@ -55,26 +39,19 @@ Returns:
return ;
}
/**
It will record soruce address for Callstack entry.
@param SourceEntry - Source address
@param Type - Branch type
**/
VOID
EbcDebuggerPushCallstackSource (
IN UINT64 SourceEntry,
IN EFI_DEBUGGER_BRANCH_TYPE Type
)
/*++
Routine Description:
It will record soruce address for Callstack entry.
Arguments:
SourceEntry - Source address
Type - Branch type
Returns:
None
--*/
{
if (mDebuggerPrivate.CallStackEntryCount > EFI_DEBUGGER_CALLSTACK_MAX) {
ASSERT (FALSE);
@ -93,26 +70,19 @@ Returns:
return ;
}
/**
It will record parameter for Callstack entry.
@param ParameterAddress - The address for the parameter
@param Type - Branch type
**/
VOID
EbcDebuggerPushCallstackParameter (
IN UINT64 ParameterAddress,
IN EFI_DEBUGGER_BRANCH_TYPE Type
)
/*++
Routine Description:
It will record parameter for Callstack entry.
Arguments:
ParameterAddress - The address for the parameter
Type - Branch type
Returns:
None
--*/
{
if (mDebuggerPrivate.CallStackEntryCount > EFI_DEBUGGER_CALLSTACK_MAX) {
ASSERT (FALSE);
@ -135,26 +105,19 @@ Returns:
return ;
}
/**
It will record source address for callstack entry.
@param DestEntry - Source address
@param Type - Branch type
**/
VOID
EbcDebuggerPushCallstackDest (
IN UINT64 DestEntry,
IN EFI_DEBUGGER_BRANCH_TYPE Type
)
/*++
Routine Description:
It will record source address for callstack entry.
Arguments:
DestEntry - Source address
Type - Branch type
Returns:
None
--*/
{
UINTN Index;
@ -180,24 +143,15 @@ Returns:
return ;
}
/**
It will throw the newest Callstack entry.
**/
VOID
EbcDebuggerPopCallstack (
VOID
)
/*++
Routine Description:
It will throw the newest Callstack entry.
Arguments:
None
Returns:
None
--*/
{
if ((mDebuggerPrivate.CallStackEntryCount > 0) &&
(mDebuggerPrivate.CallStackEntryCount <= EFI_DEBUGGER_CALLSTACK_MAX)) {
@ -219,26 +173,19 @@ Returns:
return ;
}
/**
It will record source address for trace entry.
@param SourceEntry - Source address
@param Type - Branch type
**/
VOID
EbcDebuggerPushTraceSourceEntry (
IN UINT64 SourceEntry,
IN EFI_DEBUGGER_BRANCH_TYPE Type
)
/*++
Routine Description:
It will record source address for trace entry.
Arguments:
SourceEntry - Source address
Type - Branch type
Returns:
None
--*/
{
if (mDebuggerPrivate.TraceEntryCount > EFI_DEBUGGER_TRACE_MAX) {
ASSERT (FALSE);
@ -257,26 +204,19 @@ Returns:
return ;
}
/**
It will record destination address for trace entry.
@param DestEntry - Destination address
@param Type - Branch type
**/
VOID
EbcDebuggerPushTraceDestEntry (
IN UINT64 DestEntry,
IN EFI_DEBUGGER_BRANCH_TYPE Type
)
/*++
Routine Description:
It will record destination address for trace entry.
Arguments:
DestEntry - Destination address
Type - Branch type
Returns:
None
--*/
{
UINTN Index;
@ -302,28 +242,21 @@ Returns:
return ;
}
/**
It will record address for StepEntry, if STEPOVER or STEPOUT is enabled.
@param Entry - Break Address
@param FramePtr - Break Frame pointer
@param Flag - for STEPOVER or STEPOUT
**/
VOID
EbcDebuggerPushStepEntry (
IN UINT64 Entry,
IN UINT64 FramePtr,
IN UINT32 Flag
)
/*++
Routine Description:
It will record address for StepEntry, if STEPOVER or STEPOUT is enabled.
Arguments:
Entry - Break Address
FramePtr - Break Frame pointer
Flag - for STEPOVER or STEPOUT
Returns:
None
--*/
{
//
// Check StepOver
@ -364,30 +297,20 @@ EbcDebuggerBreakEventFunc (
}
}
//
// Hook function implementation
//
/**
The hook in InitializeEbcDriver.
It will init the EbcDebuggerPrivate data structure.
@param Handle - The EbcDebugProtocol handle.
@param EbcDebugProtocol - The EbcDebugProtocol interface.
**/
VOID
EbcDebuggerHookInit (
IN EFI_HANDLE Handle,
IN EFI_DEBUG_SUPPORT_PROTOCOL *EbcDebugProtocol
)
/*++
Routine Description:
The hook in InitializeEbcDriver.
It will init the EbcDebuggerPrivate data structure.
Arguments:
Handle - The EbcDebugProtocol handle.
EbcDebugProtocol - The EbcDebugProtocol interface.
Returns:
None
--*/
{
EFI_STATUS Status;
UINTN Index;
@ -479,25 +402,16 @@ Returns:
return ;
}
VOID
EbcDebuggerHookUnload (
VOID
)
/*++
Routine Description:
/**
The hook in UnloadImage for EBC Interpreter.
It clean up the environment.
Arguments:
None
Returns:
None
--*/
**/
VOID
EbcDebuggerHookUnload (
VOID
)
{
UINTN Index;
UINTN SubIndex;
@ -545,49 +459,37 @@ Returns:
return ;
}
VOID
EbcDebuggerHookEbcUnloadImage (
IN EFI_HANDLE Handle
)
/*++
Routine Description:
/**
The hook in EbcUnloadImage.
Currently do nothing here.
Arguments:
@param Handle - The EbcImage handle.
Handle - The EbcImage handle.
**/
Returns:
None
--*/
VOID
EbcDebuggerHookEbcUnloadImage (
IN EFI_HANDLE Handle
)
{
return ;
}
VOID
EbcDebuggerHookExecuteEbcImageEntryPoint (
IN VM_CONTEXT *VmPtr
)
/*++
Routine Description:
/**
The hook in ExecuteEbcImageEntryPoint.
It will record the call-stack entry. (-1 means EbcImageEntryPoint call)
and trigger Exception if BOE enabled.
Arguments:
VmPtr - pointer to VM context.
@param VmPtr - pointer to VM context.
Returns:
None
--*/
**/
VOID
EbcDebuggerHookExecuteEbcImageEntryPoint (
IN VM_CONTEXT *VmPtr
)
{
EbcDebuggerPushCallstackSource ((UINT64)(UINTN)-1, EfiDebuggerBranchTypeEbcCall);
EbcDebuggerPushCallstackParameter ((UINT64)(UINTN)VmPtr->Gpr[0], EfiDebuggerBranchTypeEbcCall);
@ -596,26 +498,19 @@ Returns:
return ;
}
VOID
EbcDebuggerHookEbcInterpret (
IN VM_CONTEXT *VmPtr
)
/*++
Routine Description:
/**
The hook in ExecuteEbcImageEntryPoint.
It will record the call-stack entry. (-2 means EbcInterpret call)
and trigger Exception if BOT enabled.
Arguments:
@param VmPtr - pointer to VM context.
VmPtr - pointer to VM context.
Returns:
None
--*/
**/
VOID
EbcDebuggerHookEbcInterpret (
IN VM_CONTEXT *VmPtr
)
{
EbcDebuggerPushCallstackSource ((UINT64)(UINTN)-2, EfiDebuggerBranchTypeEbcCall);
EbcDebuggerPushCallstackParameter ((UINT64)(UINTN)VmPtr->Gpr[0], EfiDebuggerBranchTypeEbcCall);
@ -624,25 +519,18 @@ Returns:
return ;
}
VOID
EbcDebuggerHookExecuteStart (
IN VM_CONTEXT *VmPtr
)
/*++
Routine Description:
/**
The hook in EbcExecute, before ExecuteFunction.
It will trigger Exception if GoTil, StepOver, or StepOut hit.
Arguments:
@param VmPtr - pointer to VM context.
VmPtr - pointer to VM context.
Returns:
None
--*/
**/
VOID
EbcDebuggerHookExecuteStart (
IN VM_CONTEXT *VmPtr
)
{
EFI_TPL CurrentTpl;
@ -710,25 +598,18 @@ Returns:
return ;
}
VOID
EbcDebuggerHookExecuteEnd (
IN VM_CONTEXT *VmPtr
)
/*++
Routine Description:
/**
The hook in EbcExecute, after ExecuteFunction.
It will record StepOut Entry if need.
Arguments:
@param VmPtr - pointer to VM context.
VmPtr - pointer to VM context.
Returns:
None
--*/
**/
VOID
EbcDebuggerHookExecuteEnd (
IN VM_CONTEXT *VmPtr
)
{
UINTN Address;
@ -741,26 +622,19 @@ Returns:
return ;
}
VOID
EbcDebuggerHookCALLStart (
IN VM_CONTEXT *VmPtr
)
/*++
Routine Description:
/**
The hook in ExecuteCALL, before move IP.
It will trigger Exception if BOC enabled,
and record Callstack, and trace information.
Arguments:
@param VmPtr - pointer to VM context.
VmPtr - pointer to VM context.
Returns:
None
--*/
**/
VOID
EbcDebuggerHookCALLStart (
IN VM_CONTEXT *VmPtr
)
{
EbcDebuggerCheckHookFlag (VmPtr, EFI_DEBUG_FLAG_EBC_BOC);
EbcDebuggerPushCallstackSource ((UINT64)(UINTN)VmPtr->Ip, EfiDebuggerBranchTypeEbcCall);
@ -769,26 +643,19 @@ Returns:
return ;
}
VOID
EbcDebuggerHookCALLEnd (
IN VM_CONTEXT *VmPtr
)
/*++
Routine Description:
/**
The hook in ExecuteCALL, after move IP.
It will record Callstack, trace information
and record StepOver/StepOut Entry if need.
Arguments:
@param VmPtr - pointer to VM context.
VmPtr - pointer to VM context.
Returns:
None
--*/
**/
VOID
EbcDebuggerHookCALLEnd (
IN VM_CONTEXT *VmPtr
)
{
UINT64 Address;
UINTN FramePtr;
@ -817,26 +684,19 @@ Returns:
return ;
}
VOID
EbcDebuggerHookCALLEXStart (
IN VM_CONTEXT *VmPtr
)
/*++
Routine Description:
/**
The hook in ExecuteCALL, before call EbcLLCALLEX.
It will trigger Exception if BOCX enabled,
and record Callstack information.
Arguments:
@param VmPtr - pointer to VM context.
VmPtr - pointer to VM context.
Returns:
None
--*/
**/
VOID
EbcDebuggerHookCALLEXStart (
IN VM_CONTEXT *VmPtr
)
{
EbcDebuggerCheckHookFlag (VmPtr, EFI_DEBUG_FLAG_EBC_BOCX);
// EbcDebuggerPushCallstackSource ((UINT64)(UINTN)VmPtr->Ip, EfiDebuggerBranchTypeEbcCallEx);
@ -845,51 +705,37 @@ Returns:
return ;
}
VOID
EbcDebuggerHookCALLEXEnd (
IN VM_CONTEXT *VmPtr
)
/*++
Routine Description:
/**
The hook in ExecuteCALL, after call EbcLLCALLEX.
It will record trace information.
Arguments:
@param VmPtr - pointer to VM context.
VmPtr - pointer to VM context.
Returns:
None
--*/
**/
VOID
EbcDebuggerHookCALLEXEnd (
IN VM_CONTEXT *VmPtr
)
{
// EbcDebuggerPushCallstackDest ((UINT64)(UINTN)VmPtr->Ip, EfiDebuggerBranchTypeEbcCallEx);
EbcDebuggerPushTraceDestEntry ((UINT64)(UINTN)VmPtr->Ip, EfiDebuggerBranchTypeEbcCallEx);
return ;
}
VOID
EbcDebuggerHookRETStart (
IN VM_CONTEXT *VmPtr
)
/*++
Routine Description:
/**
The hook in ExecuteRET, before move IP.
It will trigger Exception if BOR enabled,
and record Callstack, and trace information.
Arguments:
@param VmPtr - pointer to VM context.
VmPtr - pointer to VM context.
Returns:
None
--*/
**/
VOID
EbcDebuggerHookRETStart (
IN VM_CONTEXT *VmPtr
)
{
EbcDebuggerCheckHookFlag (VmPtr, EFI_DEBUG_FLAG_EBC_BOR);
EbcDebuggerPopCallstack ();
@ -897,121 +743,86 @@ Returns:
return ;
}
VOID
EbcDebuggerHookRETEnd (
IN VM_CONTEXT *VmPtr
)
/*++
Routine Description:
/**
The hook in ExecuteRET, after move IP.
It will record trace information.
Arguments:
@param VmPtr - pointer to VM context.
VmPtr - pointer to VM context.
Returns:
None
--*/
**/
VOID
EbcDebuggerHookRETEnd (
IN VM_CONTEXT *VmPtr
)
{
EbcDebuggerPushTraceDestEntry ((UINT64)(UINTN)VmPtr->Ip, EfiDebuggerBranchTypeEbcRet);
return ;
}
VOID
EbcDebuggerHookJMPStart (
IN VM_CONTEXT *VmPtr
)
/*++
Routine Description:
/**
The hook in ExecuteJMP, before move IP.
It will record trace information.
Arguments:
@param VmPtr - pointer to VM context.
VmPtr - pointer to VM context.
Returns:
None
--*/
**/
VOID
EbcDebuggerHookJMPStart (
IN VM_CONTEXT *VmPtr
)
{
EbcDebuggerPushTraceSourceEntry ((UINT64)(UINTN)VmPtr->Ip, EfiDebuggerBranchTypeEbcJmp);
return ;
}
VOID
EbcDebuggerHookJMPEnd (
IN VM_CONTEXT *VmPtr
)
/*++
Routine Description:
/**
The hook in ExecuteJMP, after move IP.
It will record trace information.
Arguments:
@param VmPtr - pointer to VM context.
VmPtr - pointer to VM context.
Returns:
None
--*/
**/
VOID
EbcDebuggerHookJMPEnd (
IN VM_CONTEXT *VmPtr
)
{
EbcDebuggerPushTraceDestEntry ((UINT64)(UINTN)VmPtr->Ip, EfiDebuggerBranchTypeEbcJmp);
return ;
}
VOID
EbcDebuggerHookJMP8Start (
IN VM_CONTEXT *VmPtr
)
/*++
Routine Description:
/**
The hook in ExecuteJMP8, before move IP.
It will record trace information.
Arguments:
@param VmPtr - pointer to VM context.
VmPtr - pointer to VM context.
Returns:
None
--*/
**/
VOID
EbcDebuggerHookJMP8Start (
IN VM_CONTEXT *VmPtr
)
{
EbcDebuggerPushTraceSourceEntry ((UINT64)(UINTN)VmPtr->Ip, EfiDebuggerBranchTypeEbcJmp8);
return ;
}
VOID
EbcDebuggerHookJMP8End (
IN VM_CONTEXT *VmPtr
)
/*++
Routine Description:
/**
The hook in ExecuteJMP8, after move IP.
It will record trace information.
Arguments:
@param VmPtr - pointer to VM context.
VmPtr - pointer to VM context.
Returns:
None
--*/
**/
VOID
EbcDebuggerHookJMP8End (
IN VM_CONTEXT *VmPtr
)
{
EbcDebuggerPushTraceDestEntry ((UINT64)(UINTN)VmPtr->Ip, EfiDebuggerBranchTypeEbcJmp8);
return ;

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,14 +9,7 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbHook.h
Abstract:
--*/
**/
#ifndef _EFI_EDB_HOOKER_H_
#define _EFI_EDB_HOOKER_H_

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,14 +9,8 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbSupport.h
Abstract:
--*/
**/
#ifndef _EFI_EDB_SUPPORT_H_
#define _EFI_EDB_SUPPORT_H_
@ -175,9 +169,9 @@ PatchForAsciiStrTokenBefore (
IN CHAR8 Patch
);
//
// Shell Library
//
/**
Shell Library.
**/
VOID
EFIAPI
Input (

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,17 +9,23 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbSupportFile.c
Abstract:
--*/
**/
#include "Edb.h"
/**
Read a file.
@param Vol - File System Volume
@param FileName - The file to be read.
@param BufferSize - The file buffer size
@param Buffer - The file buffer
@retval EFI_SUCCESS - read file successfully
@retval EFI_NOT_FOUND - file not found
**/
EFI_STATUS
EFIAPI
ReadFileFromVol (
@ -28,25 +34,6 @@ ReadFileFromVol (
OUT UINTN *BufferSize,
OUT VOID **Buffer
)
/*++
Routine Description:
Read a file.
Arguments:
Vol - File System Volume
FileName - The file to be read.
BufferSize - The file buffer size
Buffer - The file buffer
Returns:
EFI_SUCCESS - read file successfully
EFI_NOT_FOUND - file not found
--*/
{
EFI_STATUS Status;
EFI_FILE_HANDLE RootDir;
@ -138,6 +125,25 @@ Returns:
return EFI_SUCCESS;
}
/**
Read a file.
If ScanFs is FLASE, it will use DebuggerPrivate->Vol as default Fs.
If ScanFs is TRUE, it will scan all FS and check the file.
If there is only one file match the name, it will be read.
If there is more than one file match the name, it will return Error.
@param DebuggerPrivate - EBC Debugger private data structure
@param FileName - The file to be read.
@param BufferSize - The file buffer size
@param Buffer - The file buffer
@param ScanFs - Need Scan all FS
@retval EFI_SUCCESS - read file successfully
@retval EFI_NOT_FOUND - file not found
@retval EFI_NO_MAPPING - there is duplicated files found
**/
EFI_STATUS
EFIAPI
ReadFileToBuffer (
@ -147,31 +153,6 @@ ReadFileToBuffer (
OUT VOID **Buffer,
IN BOOLEAN ScanFs
)
/*++
Routine Description:
Read a file.
If ScanFs is FLASE, it will use DebuggerPrivate->Vol as default Fs.
If ScanFs is TRUE, it will scan all FS and check the file.
If there is only one file match the name, it will be read.
If there is more than one file match the name, it will return Error.
Arguments:
DebuggerPrivate - EBC Debugger private data structure
FileName - The file to be read.
BufferSize - The file buffer size
Buffer - The file buffer
ScanFs - Need Scan all FS
Returns:
EFI_SUCCESS - read file successfully
EFI_NOT_FOUND - file not found
EFI_NO_MAPPING - there is duplicated files found
--*/
{
EFI_STATUS Status;
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Vol;
@ -272,6 +253,18 @@ Returns:
return EFI_SUCCESS;
}
/**
Get file name under this dir with index
@param DebuggerPrivate - EBC Debugger private data structure
@param DirName - The dir to be read.
@param FileName - The file name pattern under this dir
@param Index - The file index under this dir
@return File Name which match the pattern and index.
**/
CHAR16 *
EFIAPI
GetFileNameUnderDir (
@ -280,24 +273,6 @@ GetFileNameUnderDir (
IN CHAR16 *FileName,
IN OUT UINTN *Index
)
/*++
Routine Description:
Get file name under this dir with index
Arguments:
DebuggerPrivate - EBC Debugger private data structure
DirName - The dir to be read.
FileName - The file name pattern under this dir
Index - The file index under this dir
Returns:
File Name which match the pattern and index.
--*/
{
EFI_STATUS Status;
EFI_FILE_HANDLE RootDir;

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007 - 2016, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007 - 2016, Intel Corporation All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,35 +9,23 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbSupportString.c
Abstract:
--*/
**/
#include "Edb.h"
/**
Convert hex string to uint.
@param str - The string
**/
UINTN
EFIAPI
Xtoi (
CHAR16 *str
)
/*++
Routine Description:
Convert hex string to uint
Arguments:
Str - The string
Returns:
--*/
{
UINTN u;
CHAR16 c;
@ -90,24 +78,19 @@ Returns:
return u;
}
/**
Convert hex string to uint.
@param str - The string
**/
UINT64
EFIAPI
LXtoi (
CHAR16 *str
)
/*++
Routine Description:
Convert hex string to uint
Arguments:
Str - The string
Returns:
--*/
{
UINT64 u;
CHAR16 c;
@ -161,24 +144,18 @@ Returns:
return u;
}
/**
Convert hex string to uint.
@param str - The string
**/
UINTN
EFIAPI
Atoi (
CHAR16 *str
)
/*++
Routine Description:
Convert hex string to uint
Arguments:
Str - The string
Returns:
--*/
{
UINTN u;
CHAR16 c;
@ -217,24 +194,18 @@ Returns:
return u;
}
/**
Convert hex string to uint.
@param str - The string
**/
UINTN
EFIAPI
AsciiXtoi (
CHAR8 *str
)
/*++
Routine Description:
Convert hex string to uint
Arguments:
Str - The string
Returns:
--*/
{
UINTN u;
CHAR8 c;
@ -287,24 +258,18 @@ Returns:
return u;
}
/**
Convert hex string to uint.
@param str - The string
**/
UINTN
EFIAPI
AsciiAtoi (
CHAR8 *str
)
/*++
Routine Description:
Convert hex string to uint
Arguments:
Str - The string
Returns:
--*/
{
UINTN u;
CHAR8 c;
@ -361,28 +326,24 @@ AsciiToUpper (
return (Chr >= 'a' && Chr <= 'z') ? Chr - ('a' - 'A') : Chr;
}
/**
Compare the Unicode and Ascii string pointed by String to the string pointed by String2.
@param String - Unicode String to process
@param String2 - Ascii string to process
@return Return a positive integer if String is lexicall greater than String2; Zero if
the two strings are identical; and a negative interger if String is lexically
less than String2.
**/
INTN
EFIAPI
StrCmpUnicodeAndAscii (
IN CHAR16 *String,
IN CHAR8 *String2
)
/*++
Routine Description:
Compare the Unicode and Ascii string pointed by String to the string pointed by String2.
Arguments:
String - Unicode String to process
String2 - Ascii string to process
Returns:
Return a positive integer if String is lexicall greater than String2; Zero if
the two strings are identical; and a negative interger if String is lexically
less than String2.
--*/
{
while (*String) {
if (*String != (CHAR16)*String2) {
@ -396,27 +357,24 @@ Returns:
return (*String - (CHAR16)*String2);
}
/**
Compare the Unicode string pointed by String to the string pointed by String2.
@param String - Unicode String to process
@param String2 - Unicode string to process
@return Return a positive integer if String is lexically greater than String2; Zero if
the two strings are identical; and a negative integer if String is lexically
less than String2.
**/
INTN
EFIAPI
StriCmp (
IN CHAR16 *String,
IN CHAR16 *String2
)
/*++
Routine Description:
Compare the Unicode string pointed by String to the string pointed by String2.
Arguments:
String - Unicode String to process
String2 - Unicode string to process
Returns:
Return a positive integer if String is lexically greater than String2; Zero if
the two strings are identical; and a negative integer if String is lexically
less than String2.
--*/
{
while ((*String != L'\0') &&
(UnicodeToUpper (*String) == UnicodeToUpper (*String2))) {
@ -427,28 +385,24 @@ Returns:
return UnicodeToUpper (*String) - UnicodeToUpper (*String2);
}
/**
Compare the Unicode and Ascii string pointed by String to the string pointed by String2.
@param String - Unicode String to process
@param String2 - Ascii string to process
@return Return a positive integer if String is lexically greater than String2; Zero if
the two strings are identical; and a negative integer if String is lexically
less than String2.
**/
INTN
EFIAPI
StriCmpUnicodeAndAscii (
IN CHAR16 *String,
IN CHAR8 *String2
)
/*++
Routine Description:
Compare the Unicode and Ascii string pointed by String to the string pointed by String2.
Arguments:
String - Unicode String to process
String2 - Ascii string to process
Returns:
Return a positive integer if String is lexically greater than String2; Zero if
the two strings are identical; and a negative integer if String is lexically
less than String2.
--*/
{
while ((*String != L'\0') &&
(UnicodeToUpper (*String) == (CHAR16)AsciiToUpper (*String2))) {
@ -459,19 +413,20 @@ Returns:
return UnicodeToUpper (*String) - (CHAR16)AsciiToUpper (*String2);
}
/**
Verify if the string is end with the sub string.
@param Str - The string where to search the sub string
@param SubStr - The substring.
**/
BOOLEAN
EFIAPI
StrEndWith (
IN CHAR16 *Str,
IN CHAR16 *SubStr
)
/*++
Routine Description:
Verify if the string is end with the sub string.
--*/
{
CHAR16 *Temp;
@ -491,12 +446,17 @@ Routine Description:
}
}
/**
Duplicate a string.
@param Src The string to be duplicated.
**/
CHAR16 *
EFIAPI
StrDuplicate (
IN CHAR16 *Src
)
// duplicate a string
{
CHAR16 *Dest;
UINTN Size;
@ -513,19 +473,20 @@ StrDuplicate (
CHAR16 *mLineBuffer = NULL;
CHAR16 *mFieldBuffer = NULL;
/**
Find the first substring.
@param String Point to the string where to find the substring.
@param CharSet Point to the string to be found.
**/
UINTN
EFIAPI
StrSpn (
IN CHAR16 *String,
IN CHAR16 *CharSet
)
/*++
Routine Description:
Find the first substring.
--*/
{
UINTN Count;
CHAR16 *Str1;
@ -550,6 +511,15 @@ Routine Description:
return Count;
}
/**
Searches a string for the first occurrence of a character contained in a
specified buffer.
@param String Point to the string where to find the substring.
@param CharSet Point to the string to be found.
**/
CHAR16 *
EFIAPI
@ -557,14 +527,6 @@ StrBrk (
IN CHAR16 *String,
IN CHAR16 *CharSet
)
/*++
Routine Description:
Searches a string for the first occurrence of a character contained in a
specified buffer.
--*/
{
CHAR16 *Str1;
CHAR16 *Str2;
@ -580,19 +542,20 @@ Routine Description:
return NULL;
}
/**
Find the next token after one or more specified characters.
@param String Point to the string where to find the substring.
@param CharSet Point to the string to be found.
**/
CHAR16 *
EFIAPI
StrTokenLine (
IN CHAR16 *String OPTIONAL,
IN CHAR16 *CharSet
)
/*++
Routine Description:
Find the next token after one or more specified characters.
--*/
{
CHAR16 *Begin;
CHAR16 *End;
@ -618,6 +581,14 @@ Routine Description:
return Begin;
}
/**
Find the next token after one specificed characters.
@param String Point to the string where to find the substring.
@param CharSet Point to the string to be found.
**/
CHAR16 *
EFIAPI
@ -625,13 +596,6 @@ StrTokenField (
IN CHAR16 *String OPTIONAL,
IN CHAR16 *CharSet
)
/*++
Routine Description:
Find the next token after one specificed characters.
--*/
{
CHAR16 *Begin;
CHAR16 *End;
@ -753,19 +717,20 @@ PatchForStrTokenBefore (
CHAR8 *mAsciiLineBuffer = NULL;
CHAR8 *mAsciiFieldBuffer = NULL;
/**
Find the first substring.
@param String Point to the string where to find the substring.
@param CharSet Point to the string to be found.
**/
UINTN
EFIAPI
AsciiStrSpn (
IN CHAR8 *String,
IN CHAR8 *CharSet
)
/*++
Routine Description:
Find the first substring.
--*/
{
UINTN Count;
CHAR8 *Str1;
@ -790,21 +755,20 @@ Routine Description:
return Count;
}
/**
Searches a string for the first occurrence of a character contained in a
specified buffer.
@param String Point to the string where to find the substring.
@param CharSet Point to the string to be found.
**/
CHAR8 *
EFIAPI
AsciiStrBrk (
IN CHAR8 *String,
IN CHAR8 *CharSet
)
/*++
Routine Description:
Searches a string for the first occurrence of a character contained in a
specified buffer.
--*/
{
CHAR8 *Str1;
CHAR8 *Str2;
@ -820,19 +784,20 @@ Routine Description:
return NULL;
}
/**
Find the next token after one or more specified characters.
@param String Point to the string where to find the substring.
@param CharSet Point to the string to be found.
**/
CHAR8 *
EFIAPI
AsciiStrTokenLine (
IN CHAR8 *String OPTIONAL,
IN CHAR8 *CharSet
)
/*++
Routine Description:
Find the next token after one or more specified characters.
--*/
{
CHAR8 *Begin;
CHAR8 *End;
@ -858,6 +823,14 @@ Routine Description:
return Begin;
}
/**
Find the next token after one specificed characters.
@param String Point to the string where to find the substring.
@param CharSet Point to the string to be found.
**/
CHAR8 *
EFIAPI
@ -865,13 +838,6 @@ AsciiStrTokenField (
IN CHAR8 *String OPTIONAL,
IN CHAR8 *CharSet
)
/*++
Routine Description:
Find the next token after one specificed characters.
--*/
{
CHAR8 *Begin;
CHAR8 *End;

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,14 +9,8 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbSupportUI.c
Abstract:
--*/
**/
#include "Edb.h"
@ -33,28 +27,23 @@ SetCursorPosition (
IN UINTN Len
);
/**
Function waits for a given event to fire, or for an optional timeout to expire.
@param Event - The event to wait for
@param Timeout - An optional timeout value in 100 ns units.
@retval EFI_SUCCESS - Event fired before Timeout expired.
@retval EFI_TIME_OUT - Timout expired before Event fired..
**/
EFI_STATUS
EFIAPI
WaitForSingleEvent (
IN EFI_EVENT Event,
IN UINT64 Timeout OPTIONAL
)
/*++
Routine Description:
Function waits for a given event to fire, or for an optional timeout to expire.
Arguments:
Event - The event to wait for
Timeout - An optional timeout value in 100 ns units.
Returns:
EFI_SUCCESS - Event fired before Timeout expired.
EFI_TIME_OUT - Timout expired before Event fired..
--*/
{
EFI_STATUS Status;
UINTN Index;
@ -103,6 +92,15 @@ Returns:
return Status;
}
/**
Move the cursor position one character backward.
@param LineLength Length of a line. Get it by calling QueryMode
@param Column Current column of the cursor position
@param Row Current row of the cursor position
**/
VOID
EFIAPI
ConMoveCursorBackward (
@ -110,19 +108,6 @@ ConMoveCursorBackward (
IN OUT UINTN *Column,
IN OUT UINTN *Row
)
/*++
Routine Description:
Move the cursor position one character backward.
Arguments:
LineLength Length of a line. Get it by calling QueryMode
Column Current column of the cursor position
Row Current row of the cursor position
Returns:
--*/
{
ASSERT (Column != NULL);
ASSERT (Row != NULL);
@ -144,6 +129,16 @@ Returns:
}
}
/**
Move the cursor position one character backward.
@param LineLength Length of a line. Get it by calling QueryMode
@param TotalRow Total row of a screen, get by calling QueryMode
@param Column Current column of the cursor position
@param Row Current row of the cursor position
**/
VOID
EFIAPI
ConMoveCursorForward (
@ -152,20 +147,6 @@ ConMoveCursorForward (
IN OUT UINTN *Column,
IN OUT UINTN *Row
)
/*++
Routine Description:
Move the cursor position one character backward.
Arguments:
LineLength Length of a line. Get it by calling QueryMode
TotalRow Total row of a screen, get by calling QueryMode
Column Current column of the cursor position
Row Current row of the cursor position
Returns:
--*/
{
ASSERT (Column != NULL);
ASSERT (Row != NULL);

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
/*++
/** @file
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@ -9,14 +9,8 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdbSymbol.h
Abstract:
--*/
**/
#ifndef _EFI_EDB_SYMBOL_H_
#define _EFI_EDB_SYMBOL_H_