diff options
author | Steiner H Gunderson <steinar+sourceware@gunderson.no> | 2022-03-22 15:32:32 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2022-03-22 15:32:32 +0000 |
commit | 86ed2a5eaef2d604c163031f4f355d3a8699f3d8 (patch) | |
tree | 39c2fccb29784ce01a84319f4614d63f2b13db6d | |
parent | 25209e2c6979c3838e14e099f0333609810db280 (diff) | |
download | gdb-86ed2a5eaef2d604c163031f4f355d3a8699f3d8.zip gdb-86ed2a5eaef2d604c163031f4f355d3a8699f3d8.tar.gz gdb-86ed2a5eaef2d604c163031f4f355d3a8699f3d8.tar.bz2 |
Fix return code in _bfd_dwarf2_find_nearest_line().
* dwarf2.c (_bfd_dwarf2_find_nearest_line): if a function name is
found, but no line number info, then return a result of 2.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/dwarf2.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index fcf5aba..86d42b2 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2022-03-22 Steiner H Gunderson <steinar+sourceware@gunderson.no> + + * dwarf2.c (_bfd_dwarf2_find_nearest_line): if a function name is + found, but no line number info, then return a result of 2. + 2022-03-21 Steiner H Gunderson <steinar+sourceware@gunderson.no> PR 28978 diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index bb17679..8b5ac60 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -5267,7 +5267,11 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd, done: if (functionname_ptr && function && function->is_linkage) - *functionname_ptr = function->name; + { + *functionname_ptr = function->name; + if (!found) + found = 2; + } else if (functionname_ptr && (!*functionname_ptr || (function && !function->is_linkage))) |