summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex White <alex.white@oarcorp.com>2021-02-24 16:41:02 -0600
committerJoel Sherrill <joel@rtems.org>2021-03-30 13:15:57 -0500
commit0fe7902aeed3e4808b3497c1cec93075b42e74e2 (patch)
tree18a24aa4620b87914113a8a6b4e7c4f655a2c908
parentrld-dwarf: Add function::has_entry_pc (diff)
downloadrtems-tools-0fe7902aeed3e4808b3497c1cec93075b42e74e2.tar.bz2
rld-dwarf: Fix file::get_source
The file::get_source method was giving "unknown:-1" for valid addresses. This has been fixed.
-rw-r--r--rtemstoolkit/rld-dwarf.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/rtemstoolkit/rld-dwarf.cpp b/rtemstoolkit/rld-dwarf.cpp
index acb4fd4..2fce0e4 100644
--- a/rtemstoolkit/rld-dwarf.cpp
+++ b/rtemstoolkit/rld-dwarf.cpp
@@ -2167,12 +2167,11 @@ namespace rld
r = cu.get_source (addr, line);
if (r)
{
- if (match.valid () &&
- (match.is_an_end_sequence () || !!line.is_an_end_sequence ()))
+ if (!match.valid ())
{
match = line;
}
- else
+ else if (match.is_an_end_sequence () || !line.is_an_end_sequence ())
{
match = line;
}