diff options
author | Hao Wu <hao.a.wu@intel.com> | 2016-11-24 10:37:55 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-11-25 13:34:21 +0800 |
commit | a8a624d0a45d506f3ac1eab883226cb1cfa71bf6 (patch) | |
tree | 01017a452b8ff4bc91ed4811193a1a6fca144deb | |
parent | 12f49354e67df6477a690bf8dd4d919a679da19a (diff) | |
download | edk2-platforms-a8a624d0a45d506f3ac1eab883226cb1cfa71bf6.tar.xz |
MdeModulePkg/EbcDebugger: Add missing check for symbol not found
In function DebuggerDisplaySymbolAccrodingToAddress(), when variable
'CandidateAddress' (returned by EbdFindSymbolAddress function) equals
(UINTN) -1, it also indicates that the symbol is not found at the given
address.
This commit adds this missing check.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
-rw-r--r-- | MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdSymbol.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdSymbol.c b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdSymbol.c index 329a642cfd..8a418d5190 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdSymbol.c +++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbCmdSymbol.c @@ -1,6 +1,6 @@ /*++
-Copyright (c) 2007, Intel Corporation
+Copyright (c) 2007 - 2016, Intel Corporation
All rights reserved. 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
@@ -185,7 +185,7 @@ Returns: // Find the nearest symbol address
//
CandidateAddress = EbdFindSymbolAddress (Address, EdbMatchSymbolTypeNearestAddress, &Object, &Entry);
- if (CandidateAddress == 0) {
+ if (CandidateAddress == 0 || CandidateAddress == (UINTN) -1) {
EDBPrint (L"Symbole at Address not found!\n");
return EFI_DEBUG_CONTINUE;
} else if (Address != CandidateAddress) {
|