[rtems-tools commit] rld-dwarf: Fix file::get_source

Joel Sherrill joel at rtems.org
Tue Mar 30 18:20:46 UTC 2021


Module:    rtems-tools
Branch:    master
Commit:    0fe7902aeed3e4808b3497c1cec93075b42e74e2
Changeset: http://git.rtems.org/rtems-tools/commit/?id=0fe7902aeed3e4808b3497c1cec93075b42e74e2

Author:    Alex White <alex.white at oarcorp.com>
Date:      Wed Feb 24 16:41:02 2021 -0600

rld-dwarf: Fix file::get_source

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;
           }



More information about the vc mailing list