[PATCH 2/3] rld-dwarf: Fix file::get_source

Alex White alexanderjwhite at gmail.com
Wed Mar 3 17:01:53 UTC 2021


The file::get_source method was giving "unknown:-1" for valid
addresses. This has been fixed.
---
 rtemstoolkit/rld-dwarf.cpp | 5 ++---
 1 file 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;
           }
-- 
2.27.0



More information about the devel mailing list