[PATCH 10/22] dwarf: Fix get_source

Chris Johns chrisj at rtems.org
Tue Mar 2 23:16:47 UTC 2021


On 2/3/21 7:01 am, Alex White wrote:
> The file::get_source method was giving "unknown:-1" for valid
> addresses. This has been fixed.

+1

Chris

> ---
>  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 devel mailing list