MdeModulePkg: Fix GCC build failure

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-25 09:00:39 +08:00 committed by Star Zeng
parent bb767506b2
commit 8ae1714047
4 changed files with 10 additions and 16 deletions

View File

@ -194,7 +194,6 @@ Returns:
{ {
UINT64 Address; UINT64 Address;
UINTN Index; UINTN Index;
UINT16 OldInstruction;
BOOLEAN IsHitBreakpoint; BOOLEAN IsHitBreakpoint;
// //
@ -209,7 +208,6 @@ Returns:
for (Index = 0; (Index < DebuggerPrivate->DebuggerBreakpointCount) && (Index < EFI_DEBUGGER_BREAKPOINT_MAX); Index++) { for (Index = 0; (Index < DebuggerPrivate->DebuggerBreakpointCount) && (Index < EFI_DEBUGGER_BREAKPOINT_MAX); Index++) {
if ((DebuggerPrivate->DebuggerBreakpointContext[Index].BreakpointAddress == Address) && if ((DebuggerPrivate->DebuggerBreakpointContext[Index].BreakpointAddress == Address) &&
(DebuggerPrivate->DebuggerBreakpointContext[Index].State)) { (DebuggerPrivate->DebuggerBreakpointContext[Index].State)) {
OldInstruction = (UINT16)DebuggerPrivate->DebuggerBreakpointContext[Index].OldInstruction;
IsHitBreakpoint = TRUE; IsHitBreakpoint = TRUE;
break; break;
} }
@ -244,7 +242,6 @@ Returns:
for (Index = 0; (Index < DebuggerPrivate->DebuggerBreakpointCount) && (Index < EFI_DEBUGGER_BREAKPOINT_MAX); Index++) { for (Index = 0; (Index < DebuggerPrivate->DebuggerBreakpointCount) && (Index < EFI_DEBUGGER_BREAKPOINT_MAX); Index++) {
if ((DebuggerPrivate->DebuggerBreakpointContext[Index].BreakpointAddress == Address) && if ((DebuggerPrivate->DebuggerBreakpointContext[Index].BreakpointAddress == Address) &&
(DebuggerPrivate->DebuggerBreakpointContext[Index].State)) { (DebuggerPrivate->DebuggerBreakpointContext[Index].State)) {
OldInstruction = (UINT16)DebuggerPrivate->DebuggerBreakpointContext[Index].OldInstruction;
IsHitBreakpoint = TRUE; IsHitBreakpoint = TRUE;
break; break;
} }

View File

@ -439,8 +439,6 @@ Returns:
{ {
UINTN Index; UINTN Index;
EFI_STATUS Status; EFI_STATUS Status;
UINTN Address;
UINT16 OldInstruction;
if (CommandArg == NULL) { if (CommandArg == NULL) {
EDBPrint (L"BreakpointClear Argument error!\n"); EDBPrint (L"BreakpointClear Argument error!\n");
@ -470,9 +468,6 @@ Returns:
(Index >= DebuggerPrivate->DebuggerBreakpointCount)) { (Index >= DebuggerPrivate->DebuggerBreakpointCount)) {
EDBPrint (L"BreakpointClear error!\n"); EDBPrint (L"BreakpointClear error!\n");
return EFI_DEBUG_CONTINUE; return EFI_DEBUG_CONTINUE;
} else {
Address = (UINTN)DebuggerPrivate->DebuggerBreakpointContext[Index].BreakpointAddress;
OldInstruction = (UINT16)DebuggerPrivate->DebuggerBreakpointContext[Index].OldInstruction;
} }
// //

View File

@ -457,11 +457,13 @@ Returns:
NULL, NULL,
&mDebuggerPrivate.BreakEvent &mDebuggerPrivate.BreakEvent
); );
if (!EFI_ERROR (Status)) {
Status = gBS->SetTimer ( Status = gBS->SetTimer (
mDebuggerPrivate.BreakEvent, mDebuggerPrivate.BreakEvent,
TimerPeriodic, TimerPeriodic,
EFI_DEBUG_BREAK_TIMER_INTERVAL EFI_DEBUG_BREAK_TIMER_INTERVAL
); );
}
return ; return ;
} }
@ -493,7 +495,9 @@ Returns:
// //
// Close the break event // Close the break event
// //
if (mDebuggerPrivate.BreakEvent != NULL) {
gBS->CloseEvent (mDebuggerPrivate.BreakEvent); gBS->CloseEvent (mDebuggerPrivate.BreakEvent);
}
// //
// Clean up the symbol // Clean up the symbol

View File

@ -193,7 +193,6 @@ Returns:
{ {
CHAR8 *LineBuffer; CHAR8 *LineBuffer;
CHAR8 *FieldBuffer; CHAR8 *FieldBuffer;
EFI_DEBUGGER_SYMBOL_ENTRY *Entry;
EDB_EBC_MAP_PARSE_STATE MapParseState; EDB_EBC_MAP_PARSE_STATE MapParseState;
EDB_EBC_SYMBOL_PARSE_STATE SymbolParseState; EDB_EBC_SYMBOL_PARSE_STATE SymbolParseState;
CHAR8 *Name; CHAR8 *Name;
@ -201,7 +200,6 @@ Returns:
UINTN Address; UINTN Address;
EFI_DEBUGGER_SYMBOL_TYPE Type; EFI_DEBUGGER_SYMBOL_TYPE Type;
Entry = Object->Entry;
// //
// Begin to parse the Buffer // Begin to parse the Buffer