Thanks your patch. Reviewed-by: Jeff Fan <[email protected]>
-----Original Message----- From: Andrew Fish [mailto:[email protected]] Sent: Saturday, August 30, 2014 7:25 AM To: [email protected] Subject: [edk2] [SourceLevelDebugPkg] Code review: Compile/link with clang/Xcode 5 SourceLevelDebugPkg Owner, Please review this patch. SourceLevelDebugPkg: DebugAgentLib: Fix clang/Xcode 5 compile/link errors Move ExceptionStubHeaderSize from 16 to 32 bits to work around clang relocation limitation Use movw, not move for 32-bit segment register operations. diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.h b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.h index 6f1d3e5..53d9660 100644 --- a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.h +++ b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent +++ .h @@ -67,7 +67,7 @@ extern UINTN Exception0Handle; extern UINTN TimerInterruptHandle; -extern UINT16 ExceptionStubHeaderSize; +extern UINT32 ExceptionStubHeaderSize; extern BOOLEAN mSkipBreakpoint; extern EFI_VECTOR_HANDOFF_INFO mVectorHandoffInfoDebugAgent[]; extern UINTN mVectorHandoffInfoCount; diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFuncs.S b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFuncs.S index 2849391..efeaebc 100644 --- a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFuncs.S +++ b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFu +++ ncs.S @@ -33,7 +33,7 @@ ASM_GLOBAL ASM_PFX(CommonEntry) .data -ASM_PFX(ExceptionStubHeaderSize): .word ASM_PFX(Exception1Handle) - ASM_PFX(Exception0Handle) +ASM_PFX(ExceptionStubHeaderSize): .long ASM_PFX(Exception1Handle) - ASM_PFX(Exception0Handle) .text diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFuncs.asm b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFuncs.asm index 9b219fc..2aaf5b7 100644 --- a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFuncs.asm +++ b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/Ia32/AsmFu +++ ncs.asm @@ -38,7 +38,7 @@ ENDM .data -ExceptionStubHeaderSize DW Exception1Handle - Exception0Handle +ExceptionStubHeaderSize DD Exception1Handle - Exception0Handle CommonEntryAddr DD CommonEntry .code diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/X64/AsmFuncs.S b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/X64/AsmFuncs.S index 365bc94..276f036 100644 --- a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/X64/AsmFuncs.S +++ b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/X64/AsmFun +++ cs.S @@ -34,7 +34,7 @@ ASM_GLOBAL ASM_PFX(CommonEntry) .data -ASM_PFX(ExceptionStubHeaderSize): .word ASM_PFX(Exception1Handle) - ASM_PFX(Exception0Handle) +ASM_PFX(ExceptionStubHeaderSize): .long ASM_PFX(Exception1Handle) - ASM_PFX(Exception0Handle) .text @@ -271,13 +271,13 @@ NoExtrPush: movzwq 32(%rbp), %rax # movq %cs, %rax pushq %rax - movq %ds, %rax + movw %ds, %rax pushq %rax - movq %es, %rax + movw %es, %rax pushq %rax - movq %fs, %rax + movw %fs, %rax pushq %rax - movq %gs, %rax + movw %gs, %rax pushq %rax ## UINT64 Rip; diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/X64/AsmFuncs.asm b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/X64/AsmFuncs.asm index cf8c5f0..0f076a7 100644 --- a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/X64/AsmFuncs.asm +++ b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/X64/AsmFun +++ cs.asm @@ -32,7 +32,7 @@ AGENT_HANDLER_SIGNATURE MACRO db 41h, 47h, 54h, 48h ; SIGNATURE_32('A','G','T','H') ENDM -ExceptionStubHeaderSize dw Exception1Handle - Exception0Handle ; +ExceptionStubHeaderSize dd Exception1Handle - Exception0Handle ; CommonEntryAddr dq CommonEntry ; .code ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce. Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
