summaryrefslogtreecommitdiffstats
path: root/lldb/test/lldbutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/lldbutil.py')
-rw-r--r--lldb/test/lldbutil.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/lldb/test/lldbutil.py b/lldb/test/lldbutil.py
index 2143b93469b..a9896fa3954 100644
--- a/lldb/test/lldbutil.py
+++ b/lldb/test/lldbutil.py
@@ -53,10 +53,17 @@ def in_range(symbol, section):
symEA = symbol.GetEndAddress().GetFileAddress()
secSA = section.GetFileAddress()
secEA = secSA + section.GetByteSize()
- if (secSA <= symSA and symEA < secEA):
- return True
+
+ if symEA != lldb.LLDB_INVALID_ADDRESS:
+ if secSA <= symSA and symEA <= secEA:
+ return True
+ else:
+ return False
else:
- return False
+ if secSA <= symSA and symSA < secEA:
+ return True
+ else:
+ return False
def symbol_iter(module, section):
"""Given a module and its contained section, returns an iterator on the
OpenPOWER on IntegriCloud