aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/python-internal.h
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2026-02-23 10:22:55 +0000
committerAndrew Burgess <aburgess@redhat.com>2026-03-05 09:51:13 +0000
commit8012cfca41d9379e436a404d21c00df0ea126d28 (patch)
treee89eb3e7f2c6a26c1a8e706058fc7725ac7a08e3 /gdb/python/python-internal.h
parentee89a3c9eff5aa2d1345a1a1b258e3ed87945ed2 (diff)
downloadbinutils-8012cfca41d9379e436a404d21c00df0ea126d28.tar.gz
binutils-8012cfca41d9379e436a404d21c00df0ea126d28.tar.bz2
binutils-8012cfca41d9379e436a404d21c00df0ea126d28.zip
gdb: return optional from last_symtab_line, and use this more
I noticed that last_symtab_line is defined as returning an int, but if the file associated with the symtab cannot be read then the function returns false! This commit updates last_symtab_line to return std::optional<int> and replaces 'return false' with 'return {}'. I then realised that last_symtab_line isn't actually used very often, but we do use source_cache::get_line_charpos to perform the same job. So I went through all uses of ::get_line_charpos and replaced them with last_symtab_line where appropriate. I think this makes it clearer what we're actually trying to do. There should be no user visible changes after this commit. Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/python/python-internal.h')
0 files changed, 0 insertions, 0 deletions