Fix setting breakpoints or stepping on line 65535
This removes code that was present from the very first git revisison
7b4ac7e1ed
from 1988. It was in the
gdb/dbxread.c at the time (and makes more sense for dbx line info format
since line numbers are 16-bit entities in that debug format and debugging
files with more than 65535 lines would not work anyway) but moved from
there to gdb/buildsym.c which is used for dwarf line info as well, and
excluding an arbitrary line number does certainly not make sense nowadays.
Add a test case for line 65535
gdb:
2019-12-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
* buildsym.c (buildsym_compunit::record_line): Do no longer ignore
line 65535.
gdb/testsuite:
2019-12-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
* gdb.base/line65535.exp: New file.
* gdb.base/line65535.c: New file.
This commit is contained in:
parent
4383e1fc3b
commit
c296cbe681
|
@ -1,3 +1,8 @@
|
||||||
|
2019-12-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
|
||||||
|
|
||||||
|
* buildsym.c (buildsym_compunit::record_line): Do no longer ignore
|
||||||
|
line 65535.
|
||||||
|
|
||||||
2019-12-27 Tom Tromey <tom@tromey.com>
|
2019-12-27 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* tui/tui-source.c (tui_source_window::do_scroll_vertical): Remove
|
* tui/tui-source.c (tui_source_window::do_scroll_vertical): Remove
|
||||||
|
|
|
@ -670,12 +670,6 @@ buildsym_compunit::record_line (struct subfile *subfile, int line,
|
||||||
{
|
{
|
||||||
struct linetable_entry *e;
|
struct linetable_entry *e;
|
||||||
|
|
||||||
/* Ignore the dummy line number in libg.o */
|
|
||||||
if (line == 0xffff)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Make sure line vector exists and is big enough. */
|
/* Make sure line vector exists and is big enough. */
|
||||||
if (!subfile->line_vector)
|
if (!subfile->line_vector)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2019-12-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
|
||||||
|
|
||||||
|
* gdb.base/line65535.exp: New file.
|
||||||
|
* gdb.base/line65535.c: New file.
|
||||||
|
|
||||||
2019-12-27 Simon Marchi <simon.marchi@polymtl.ca>
|
2019-12-27 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
* lib/ada.exp (gnat_runtime_has_debug_info): New proc.
|
* lib/ada.exp (gnat_runtime_has_debug_info): New proc.
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
/* This testcase is part of GDB, the GNU debugger.
|
||||||
|
|
||||||
|
Copyright 2019 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#line 65535 "line65535.c"
|
||||||
|
int main() { return 0; }
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Copyright 2019 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# This test tries to place a breakpoint on line 65535.
|
||||||
|
# For the purpose of this test we are satisfied if the break
|
||||||
|
# command succeeds, we will not try to actually run to that line.
|
||||||
|
|
||||||
|
standard_testfile
|
||||||
|
|
||||||
|
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
|
||||||
|
gdb_test "break $srcfile:65535" \
|
||||||
|
".*Breakpoint 1 at .*: file $srcfile, line 65535\\..*" \
|
||||||
|
"break at line 65535"
|
Loading…
Reference in New Issue