MdeModulePkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdeModulePkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
committed by
mergify[bot]
parent
7c7184e201
commit
1436aea4d5
@@ -20,10 +20,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
**/
|
||||
BOOLEAN
|
||||
IsEBCBREAK3 (
|
||||
IN UINTN Address
|
||||
IN UINTN Address
|
||||
)
|
||||
{
|
||||
if (GET_OPCODE(Address) != OPCODE_BREAK) {
|
||||
if (GET_OPCODE (Address) != OPCODE_BREAK) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -47,8 +47,8 @@ IsEBCBREAK3 (
|
||||
**/
|
||||
BOOLEAN
|
||||
DebuggerBreakpointIsDuplicated (
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN UINTN Address
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN UINTN Address
|
||||
)
|
||||
{
|
||||
UINTN Index;
|
||||
@@ -85,8 +85,8 @@ DebuggerBreakpointIsDuplicated (
|
||||
**/
|
||||
EFI_STATUS
|
||||
DebuggerBreakpointAdd (
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN UINTN Address
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN UINTN Address
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -114,15 +114,15 @@ DebuggerBreakpointAdd (
|
||||
// Set the breakpoint
|
||||
//
|
||||
DebuggerPrivate->DebuggerBreakpointContext[DebuggerPrivate->DebuggerBreakpointCount].BreakpointAddress = Address;
|
||||
DebuggerPrivate->DebuggerBreakpointContext[DebuggerPrivate->DebuggerBreakpointCount].State = TRUE;
|
||||
DebuggerPrivate->DebuggerBreakpointContext[DebuggerPrivate->DebuggerBreakpointCount].OldInstruction = 0;
|
||||
DebuggerPrivate->DebuggerBreakpointContext[DebuggerPrivate->DebuggerBreakpointCount].State = TRUE;
|
||||
DebuggerPrivate->DebuggerBreakpointContext[DebuggerPrivate->DebuggerBreakpointCount].OldInstruction = 0;
|
||||
CopyMem (
|
||||
&DebuggerPrivate->DebuggerBreakpointContext[DebuggerPrivate->DebuggerBreakpointCount].OldInstruction,
|
||||
(VOID *)Address,
|
||||
sizeof(UINT16)
|
||||
sizeof (UINT16)
|
||||
);
|
||||
|
||||
DebuggerPrivate->DebuggerBreakpointCount ++;
|
||||
DebuggerPrivate->DebuggerBreakpointCount++;
|
||||
|
||||
//
|
||||
// Done
|
||||
@@ -143,14 +143,15 @@ DebuggerBreakpointAdd (
|
||||
**/
|
||||
EFI_STATUS
|
||||
DebuggerBreakpointDel (
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN UINTN Index
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN UINTN Index
|
||||
)
|
||||
{
|
||||
UINTN BpIndex;
|
||||
UINTN BpIndex;
|
||||
|
||||
if ((Index >= EFI_DEBUGGER_BREAKPOINT_MAX) ||
|
||||
(Index >= DebuggerPrivate->DebuggerBreakpointCount)) {
|
||||
(Index >= DebuggerPrivate->DebuggerBreakpointCount))
|
||||
{
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
@@ -164,12 +165,13 @@ DebuggerBreakpointDel (
|
||||
sizeof (DebuggerPrivate->DebuggerBreakpointContext[BpIndex])
|
||||
);
|
||||
}
|
||||
|
||||
ZeroMem (
|
||||
&DebuggerPrivate->DebuggerBreakpointContext[BpIndex],
|
||||
sizeof(DebuggerPrivate->DebuggerBreakpointContext[BpIndex])
|
||||
sizeof (DebuggerPrivate->DebuggerBreakpointContext[BpIndex])
|
||||
);
|
||||
|
||||
DebuggerPrivate->DebuggerBreakpointCount --;
|
||||
DebuggerPrivate->DebuggerBreakpointCount--;
|
||||
|
||||
//
|
||||
// Done
|
||||
@@ -190,12 +192,13 @@ DebuggerBreakpointDel (
|
||||
**/
|
||||
EFI_STATUS
|
||||
DebuggerBreakpointDis (
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN UINTN Index
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN UINTN Index
|
||||
)
|
||||
{
|
||||
if ((Index >= EFI_DEBUGGER_BREAKPOINT_MAX) ||
|
||||
(Index >= DebuggerPrivate->DebuggerBreakpointCount)) {
|
||||
(Index >= DebuggerPrivate->DebuggerBreakpointCount))
|
||||
{
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
@@ -220,12 +223,13 @@ DebuggerBreakpointDis (
|
||||
**/
|
||||
EFI_STATUS
|
||||
DebuggerBreakpointEn (
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN UINTN Index
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN UINTN Index
|
||||
)
|
||||
{
|
||||
if ((Index >= EFI_DEBUGGER_BREAKPOINT_MAX) ||
|
||||
(Index >= DebuggerPrivate->DebuggerBreakpointCount)) {
|
||||
(Index >= DebuggerPrivate->DebuggerBreakpointCount))
|
||||
{
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
@@ -251,13 +255,13 @@ DebuggerBreakpointEn (
|
||||
**/
|
||||
EFI_DEBUG_STATUS
|
||||
DebuggerBreakpointList (
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
)
|
||||
{
|
||||
UINTN Index;
|
||||
UINTN Index;
|
||||
|
||||
//
|
||||
// Check breakpoint cound
|
||||
@@ -277,8 +281,8 @@ DebuggerBreakpointList (
|
||||
EDBPrint (L"Breakpoint :\n");
|
||||
EDBPrint (L" Index Address Status\n");
|
||||
EDBPrint (L"======= ================== ========\n");
|
||||
//EDBPrint (L" 1 0xFFFFFFFF00000000 *\n");
|
||||
//EDBPrint (L" 12 0x00000000FFFFFFFF\n");
|
||||
// EDBPrint (L" 1 0xFFFFFFFF00000000 *\n");
|
||||
// EDBPrint (L" 12 0x00000000FFFFFFFF\n");
|
||||
for (Index = 0; Index < DebuggerPrivate->DebuggerBreakpointCount; Index++) {
|
||||
//
|
||||
// Print the breakpoint
|
||||
@@ -311,14 +315,14 @@ DebuggerBreakpointList (
|
||||
**/
|
||||
EFI_DEBUG_STATUS
|
||||
DebuggerBreakpointSet (
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
)
|
||||
{
|
||||
UINTN Address;
|
||||
EFI_STATUS Status;
|
||||
UINTN Address;
|
||||
EFI_STATUS Status;
|
||||
|
||||
if (CommandArg == NULL) {
|
||||
EDBPrint (L"BreakpointSet Argument error!\n");
|
||||
@@ -331,7 +335,7 @@ DebuggerBreakpointSet (
|
||||
Status = Symboltoi (CommandArg, &Address);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (Status == EFI_NOT_FOUND) {
|
||||
Address = Xtoi(CommandArg);
|
||||
Address = Xtoi (CommandArg);
|
||||
} else {
|
||||
//
|
||||
// Something wrong, let Symboltoi print error info.
|
||||
@@ -345,7 +349,7 @@ DebuggerBreakpointSet (
|
||||
// Add breakpoint
|
||||
//
|
||||
Status = DebuggerBreakpointAdd (DebuggerPrivate, Address);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (EFI_ERROR (Status)) {
|
||||
EDBPrint (L"BreakpointSet error!\n");
|
||||
}
|
||||
|
||||
@@ -369,14 +373,14 @@ DebuggerBreakpointSet (
|
||||
**/
|
||||
EFI_DEBUG_STATUS
|
||||
DebuggerBreakpointClear (
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
)
|
||||
{
|
||||
UINTN Index;
|
||||
EFI_STATUS Status;
|
||||
UINTN Index;
|
||||
EFI_STATUS Status;
|
||||
|
||||
if (CommandArg == NULL) {
|
||||
EDBPrint (L"BreakpointClear Argument error!\n");
|
||||
@@ -388,7 +392,7 @@ DebuggerBreakpointClear (
|
||||
// delete all breakpoint
|
||||
//
|
||||
DebuggerPrivate->DebuggerBreakpointCount = 0;
|
||||
ZeroMem (DebuggerPrivate->DebuggerBreakpointContext, sizeof(DebuggerPrivate->DebuggerBreakpointContext));
|
||||
ZeroMem (DebuggerPrivate->DebuggerBreakpointContext, sizeof (DebuggerPrivate->DebuggerBreakpointContext));
|
||||
EDBPrint (L"All the Breakpoint is cleared\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
}
|
||||
@@ -396,14 +400,15 @@ DebuggerBreakpointClear (
|
||||
//
|
||||
// Get breakpoint index
|
||||
//
|
||||
Index = Atoi(CommandArg);
|
||||
if (Index == (UINTN) -1) {
|
||||
Index = Atoi (CommandArg);
|
||||
if (Index == (UINTN)-1) {
|
||||
EDBPrint (L"BreakpointClear Argument error!\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
}
|
||||
|
||||
if ((Index >= EFI_DEBUGGER_BREAKPOINT_MAX) ||
|
||||
(Index >= DebuggerPrivate->DebuggerBreakpointCount)) {
|
||||
(Index >= DebuggerPrivate->DebuggerBreakpointCount))
|
||||
{
|
||||
EDBPrint (L"BreakpointClear error!\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
}
|
||||
@@ -412,7 +417,7 @@ DebuggerBreakpointClear (
|
||||
// Delete breakpoint
|
||||
//
|
||||
Status = DebuggerBreakpointDel (DebuggerPrivate, Index);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (EFI_ERROR (Status)) {
|
||||
EDBPrint (L"BreakpointClear error!\n");
|
||||
}
|
||||
|
||||
@@ -436,14 +441,14 @@ DebuggerBreakpointClear (
|
||||
**/
|
||||
EFI_DEBUG_STATUS
|
||||
DebuggerBreakpointDisable (
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
)
|
||||
{
|
||||
UINTN Index;
|
||||
EFI_STATUS Status;
|
||||
UINTN Index;
|
||||
EFI_STATUS Status;
|
||||
|
||||
if (CommandArg == NULL) {
|
||||
EDBPrint (L"BreakpointDisable Argument error!\n");
|
||||
@@ -457,6 +462,7 @@ DebuggerBreakpointDisable (
|
||||
for (Index = 0; Index < DebuggerPrivate->DebuggerBreakpointCount; Index++) {
|
||||
Status = DebuggerBreakpointDis (DebuggerPrivate, Index);
|
||||
}
|
||||
|
||||
EDBPrint (L"All the Breakpoint is disabled\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
}
|
||||
@@ -464,8 +470,8 @@ DebuggerBreakpointDisable (
|
||||
//
|
||||
// Get breakpoint index
|
||||
//
|
||||
Index = Atoi(CommandArg);
|
||||
if (Index == (UINTN) -1) {
|
||||
Index = Atoi (CommandArg);
|
||||
if (Index == (UINTN)-1) {
|
||||
EDBPrint (L"BreakpointDisable Argument error!\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
}
|
||||
@@ -474,7 +480,7 @@ DebuggerBreakpointDisable (
|
||||
// Disable breakpoint
|
||||
//
|
||||
Status = DebuggerBreakpointDis (DebuggerPrivate, Index);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (EFI_ERROR (Status)) {
|
||||
EDBPrint (L"BreakpointDisable error!\n");
|
||||
}
|
||||
|
||||
@@ -497,14 +503,14 @@ DebuggerBreakpointDisable (
|
||||
**/
|
||||
EFI_DEBUG_STATUS
|
||||
DebuggerBreakpointEnable (
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
)
|
||||
{
|
||||
UINTN Index;
|
||||
EFI_STATUS Status;
|
||||
UINTN Index;
|
||||
EFI_STATUS Status;
|
||||
|
||||
if (CommandArg == NULL) {
|
||||
EDBPrint (L"BreakpointEnable Argument error!\n");
|
||||
@@ -518,6 +524,7 @@ DebuggerBreakpointEnable (
|
||||
for (Index = 0; Index < DebuggerPrivate->DebuggerBreakpointCount; Index++) {
|
||||
Status = DebuggerBreakpointEn (DebuggerPrivate, Index);
|
||||
}
|
||||
|
||||
EDBPrint (L"All the Breakpoint is enabled\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
}
|
||||
@@ -525,8 +532,8 @@ DebuggerBreakpointEnable (
|
||||
//
|
||||
// Get breakpoint index
|
||||
//
|
||||
Index = Atoi(CommandArg);
|
||||
if (Index == (UINTN) -1) {
|
||||
Index = Atoi (CommandArg);
|
||||
if (Index == (UINTN)-1) {
|
||||
EDBPrint (L"BreakpointEnable Argument error!\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
}
|
||||
@@ -535,7 +542,7 @@ DebuggerBreakpointEnable (
|
||||
// Enable breakpoint
|
||||
//
|
||||
Status = DebuggerBreakpointEn (DebuggerPrivate, Index);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (EFI_ERROR (Status)) {
|
||||
EDBPrint (L"BreakpointEnable error!\n");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user