summaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-03-22 13:43:03 -0600
committerTom Tromey <tromey@adacore.com>2023-03-27 08:37:14 -0600
commit72a8f763233c11052b8b7eee5d2d8fb23e118c97 (patch)
tree3435935b42e9be3fe4efd09bf111102b877295e0 /gdb/symtab.h
parent7005080802d695d112530a7c24c9d3d44ee109a3 (diff)
downloadbinutils-gdb-72a8f763233c11052b8b7eee5d2d8fb23e118c97.tar.gz
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.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 2fd56ce21bd..5bcf374c8b2 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