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>
This commit is contained in:
Hao Wu 2016-11-24 10:37:55 +08:00
parent 12f49354e6
commit a8a624d0a4
1 changed files with 2 additions and 2 deletions

View File

@ -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) {