diff options
author | Tom Tromey <tromey@adacore.com> | 2023-03-22 13:43:03 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-03-27 08:37:14 -0600 |
commit | 72a8f763233c11052b8b7eee5d2d8fb23e118c97 (patch) | |
tree | 3435935b42e9be3fe4efd09bf111102b877295e0 /gdb/symtab.h | |
parent | 7005080802d695d112530a7c24c9d3d44ee109a3 (diff) | |
download | binutils-72a8f763233c11052b8b7eee5d2d8fb23e118c97.zip binutils-72a8f763233c11052b8b7eee5d2d8fb23e118c97.tar.gz binutils-72a8f763233c11052b8b7eee5d2d8fb23e118c97.tar.bz2 |
Change symbol::line to unsigned int
A user here at AdaCore noticed that, when debugging a certain program,
a stack frame reported line 34358, where it should have been line
99894.
After debugging a bit, I discovered:
(top) p (99894 & ~65536)
$60 = 34358
That line, symbol::line is too narrow.
This patch widens the member and changes all the uses that currently
use the narrower type.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r-- | gdb/symtab.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h index 2fd56ce..5bcf374 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -1293,12 +1293,12 @@ struct symbol : public general_symbol_info, public allocate_on_obstack m_type = type; } - unsigned short line () const + unsigned int line () const { return m_line; } - void set_line (unsigned short line) + void set_line (unsigned int line) { m_line = line; } @@ -1461,13 +1461,9 @@ struct symbol : public general_symbol_info, public allocate_on_obstack SYMBOL_INLINED set) this is the line number of the function's call site. Inlined function symbols are not definitions, and they are never found by symbol table lookup. - If this symbol is arch-owned, LINE shall be zero. + If this symbol is arch-owned, LINE shall be zero. */ - FIXME: Should we really make the assumption that nobody will try - to debug files longer than 64K lines? What about machine - generated programs? */ - - unsigned short m_line = 0; + unsigned int m_line = 0; /* An arbitrary data pointer, allowing symbol readers to record additional information on a per-symbol basis. Note that this data |