Compare commits

...

72 Commits

Author SHA1 Message Date
GDB Administrator
d19bc28bf8 Automatic date update in version.in 2021-07-03 00:00:38 +00:00
GDB Administrator
8817c1fa88 Automatic date update in version.in 2021-07-02 00:00:30 +00:00
GDB Administrator
5882e4da4d Automatic date update in version.in 2021-07-01 00:00:26 +00:00
GDB Administrator
8b1ca68bf0 Automatic date update in version.in 2021-06-30 00:00:27 +00:00
GDB Administrator
40f2c527ae Automatic date update in version.in 2021-06-29 00:00:33 +00:00
GDB Administrator
59fec5cf1f Automatic date update in version.in 2021-06-28 00:00:23 +00:00
GDB Administrator
08ca803369 Automatic date update in version.in 2021-06-27 00:00:25 +00:00
GDB Administrator
9d828925d7 Automatic date update in version.in 2021-06-26 00:00:21 +00:00
GDB Administrator
136d43af9b Automatic date update in version.in 2021-06-25 00:00:27 +00:00
GDB Administrator
9329adf6bf Automatic date update in version.in 2021-06-24 00:00:34 +00:00
GDB Administrator
e24e564529 Automatic date update in version.in 2021-06-23 00:00:27 +00:00
GDB Administrator
3319f38bea Automatic date update in version.in 2021-06-22 00:00:31 +00:00
GDB Administrator
abbf091897 Automatic date update in version.in 2021-06-21 00:00:20 +00:00
GDB Administrator
0989143e01 Automatic date update in version.in 2021-06-20 00:00:24 +00:00
GDB Administrator
a619076ace Automatic date update in version.in 2021-06-19 00:00:17 +00:00
GDB Administrator
df0fd533c7 Automatic date update in version.in 2021-06-18 00:00:28 +00:00
GDB Administrator
62423df4ff Automatic date update in version.in 2021-06-17 00:00:32 +00:00
GDB Administrator
3211a3dbaa Automatic date update in version.in 2021-06-16 00:00:28 +00:00
GDB Administrator
e62a9a1bd1 Automatic date update in version.in 2021-06-15 00:00:26 +00:00
GDB Administrator
81920af3ce Automatic date update in version.in 2021-06-14 00:00:23 +00:00
GDB Administrator
b4606dcdb2 Automatic date update in version.in 2021-06-13 00:00:27 +00:00
GDB Administrator
7f92cc5b02 Automatic date update in version.in 2021-06-12 00:00:20 +00:00
GDB Administrator
642b47369b Automatic date update in version.in 2021-06-11 00:00:41 +00:00
GDB Administrator
286b5c11d8 Automatic date update in version.in 2021-06-10 00:00:24 +00:00
GDB Administrator
990cfb441c Automatic date update in version.in 2021-06-09 00:00:29 +00:00
GDB Administrator
7843e33c7c Automatic date update in version.in 2021-06-08 00:01:15 +00:00
GDB Administrator
fdb55eb661 Automatic date update in version.in 2021-06-07 00:00:58 +00:00
GDB Administrator
79c71e81a7 Automatic date update in version.in 2021-06-06 00:00:57 +00:00
GDB Administrator
ad3ba3baa5 Automatic date update in version.in 2021-06-05 00:01:08 +00:00
GDB Administrator
fe9d4309a6 Automatic date update in version.in 2021-06-04 00:01:18 +00:00
GDB Administrator
cc7dab42bc Automatic date update in version.in 2021-06-03 00:00:59 +00:00
GDB Administrator
21533ee1f5 Automatic date update in version.in 2021-06-02 00:01:05 +00:00
GDB Administrator
462d5a10f1 Automatic date update in version.in 2021-06-01 00:01:09 +00:00
GDB Administrator
1b49f5c9cb Automatic date update in version.in 2021-05-31 00:01:08 +00:00
GDB Administrator
0640d06856 Automatic date update in version.in 2021-05-30 00:00:58 +00:00
GDB Administrator
db2324b5c4 Automatic date update in version.in 2021-05-29 00:00:55 +00:00
GDB Administrator
dc63e7fbc8 Automatic date update in version.in 2021-05-28 00:00:58 +00:00
GDB Administrator
3b3151a9a6 Automatic date update in version.in 2021-05-27 00:00:44 +00:00
GDB Administrator
bb991d45ca Automatic date update in version.in 2021-05-26 00:01:04 +00:00
GDB Administrator
dd14274596 Automatic date update in version.in 2021-05-25 00:00:54 +00:00
GDB Administrator
c042eb2f81 Automatic date update in version.in 2021-05-24 00:00:57 +00:00
GDB Administrator
a9a39471e2 Automatic date update in version.in 2021-05-23 00:01:04 +00:00
GDB Administrator
79d965c819 Automatic date update in version.in 2021-05-22 00:00:54 +00:00
GDB Administrator
20489475ae Automatic date update in version.in 2021-05-21 00:01:14 +00:00
GDB Administrator
e58525abe2 Automatic date update in version.in 2021-05-20 00:00:59 +00:00
GDB Administrator
7bb3004842 Automatic date update in version.in 2021-05-19 00:00:53 +00:00
GDB Administrator
6222fefc39 Automatic date update in version.in 2021-05-18 00:00:55 +00:00
GDB Administrator
5b0cc3b248 Automatic date update in version.in 2021-05-17 00:00:48 +00:00
GDB Administrator
200d1ece14 Automatic date update in version.in 2021-05-16 00:00:50 +00:00
GDB Administrator
da15159c0e Automatic date update in version.in 2021-05-15 00:00:48 +00:00
GDB Administrator
5adac898a8 Automatic date update in version.in 2021-05-14 00:00:48 +00:00
GDB Administrator
bbb49d6135 Automatic date update in version.in 2021-05-13 00:00:47 +00:00
GDB Administrator
cdec299fe4 Automatic date update in version.in 2021-05-12 00:00:57 +00:00
GDB Administrator
fb49a49f22 Automatic date update in version.in 2021-05-11 00:00:56 +00:00
GDB Administrator
c0a3e4bddc Automatic date update in version.in 2021-05-10 00:00:56 +00:00
GDB Administrator
8e49fcd7cb Automatic date update in version.in 2021-05-09 00:00:50 +00:00
GDB Administrator
e866bee434 Automatic date update in version.in 2021-05-08 00:00:52 +00:00
GDB Administrator
dd10a790a0 Automatic date update in version.in 2021-05-07 00:00:55 +00:00
GDB Administrator
56567f6dae Automatic date update in version.in 2021-05-06 00:00:54 +00:00
GDB Administrator
1d251b9288 Automatic date update in version.in 2021-05-05 00:00:51 +00:00
GDB Administrator
42ceb2410f Automatic date update in version.in 2021-05-04 00:00:58 +00:00
GDB Administrator
184d3e6723 Automatic date update in version.in 2021-05-03 00:00:50 +00:00
GDB Administrator
eb2f9e07d8 Automatic date update in version.in 2021-05-02 00:00:43 +00:00
GDB Administrator
71769e95c7 Automatic date update in version.in 2021-05-01 00:00:45 +00:00
GDB Administrator
808d04495e Automatic date update in version.in 2021-04-30 00:00:42 +00:00
GDB Administrator
d897b81f2b Automatic date update in version.in 2021-04-29 00:00:44 +00:00
GDB Administrator
c39cb9d25f Automatic date update in version.in 2021-04-28 00:00:54 +00:00
GDB Administrator
bcb524549d Automatic date update in version.in 2021-04-27 00:00:29 +00:00
Tom Tromey
e7d77ce0c4 Fix crash when expanding partial symtabs with DW_TAG_imported_unit
PR gdb/27743 points out a gdb crash when expanding partial symtabs,
where one of the compilation units uses DW_TAG_imported_unit.

The bug is that partial_map_expand_apply expects only to be called for
the outermost psymtab.  However, filename searching doesn't (and
probably shouldn't) guarantee this.  The fix is to walk upward to find
the outermost CU.

A new test case is included.  It is mostly copied from other test
cases, which really sped up the effort.

This bug does not occur on trunk.  There,
psym_map_symtabs_matching_filename is gone, replaced by
psymbol_functions::expand_symtabs_matching.  When this find a match,
it calls psymtab_to_symtab, which does this same upward walk.

Tested on x86-64 Fedora 32.

I propose checking in this patch on the gdb-10 branch, and just the
new test case on trunk.

gdb/ChangeLog
2021-04-23  Tom Tromey  <tromey@adacore.com>

	PR gdb/27743:
	* psymtab.c (partial_map_expand_apply): Expand outermost psymtab.

gdb/testsuite/ChangeLog
2021-04-23  Tom Tromey  <tromey@adacore.com>

	PR gdb/27743:
	* gdb.dwarf2/imported-unit-bp.exp: New file.
	* gdb.dwarf2/imported-unit-bp-main.c: New file.
	* gdb.dwarf2/imported-unit-bp-alt.c: New file.
2021-04-26 09:39:00 -06:00
GDB Administrator
c29a019680 Automatic date update in version.in 2021-04-26 00:00:30 +00:00
Joel Brobecker
2cd3a59c91 Bump GDB version number to 10.2.90.DATE-git.
gdb/ChangeLog:

	* version.in: Set GDB version number to 10.2.90.DATE-git.

gdb/testsuite/ChangeLog:

	* gdb.base/default.exp: Change $_gdb_minor to 3.
2021-04-25 08:23:56 +04:00
Joel Brobecker
1ae3e3c464 Document the GDB 10.2 release in gdb/ChangeLog
gdb/ChangeLog:

	GDB 10.2 released.
2021-04-25 08:18:45 +04:00
9 changed files with 233 additions and 6 deletions

View File

@@ -16,7 +16,7 @@
In releases, the date is not included in either version strings or
sonames. */
#define BFD_VERSION_DATE 20210425
#define BFD_VERSION_DATE 20210703
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
#define REPORT_BUGS_TO @report_bugs_to@

View File

@@ -1,3 +1,16 @@
2021-04-23 Tom Tromey <tromey@adacore.com>
PR gdb/27743:
* psymtab.c (partial_map_expand_apply): Expand outermost psymtab.
2021-04-25 Joel Brobecker <brobecker@adacore.com>
* version.in: Set GDB version number to 10.2.90.DATE-git.
2021-04-25 Joel Brobecker <brobecker@adacore.com>
GDB 10.2 released.
2021-04-25 Joel Brobecker <brobecker@adacore.com>
* version.in: Set GDB version number to 10.2.

View File

@@ -127,9 +127,10 @@ partial_map_expand_apply (struct objfile *objfile,
{
struct compunit_symtab *last_made = objfile->compunit_symtabs;
/* Shared psymtabs should never be seen here. Instead they should
be handled properly by the caller. */
gdb_assert (pst->user == NULL);
/* We may see a shared psymtab here, but we want to expand the
outermost symtab. */
while (pst->user != nullptr)
pst = pst->user;
/* Don't visit already-expanded psymtabs. */
if (pst->readin_p (objfile))

View File

@@ -1,3 +1,14 @@
2021-04-23 Tom Tromey <tromey@adacore.com>
PR gdb/27743:
* gdb.dwarf2/imported-unit-bp.exp: New file.
* gdb.dwarf2/imported-unit-bp-main.c: New file.
* gdb.dwarf2/imported-unit-bp-alt.c: New file.
2021-04-25 Joel Brobecker <brobecker@adacore.com>
* gdb.base/default.exp: Change $_gdb_minor to 3.
2021-04-22 Simon Marchi <simon.marchi@polymtl.ca>
* gdb.python/flexible-array-member.exp: Add check for Python

View File

@@ -607,7 +607,7 @@ set show_conv_list \
{$_gdb_setting_str = <internal function _gdb_setting_str>} \
{$_gdb_setting = <internal function _gdb_setting>} \
{$_gdb_major = 10} \
{$_gdb_minor = 2} \
{$_gdb_minor = 3} \
{$_shell_exitsignal = void} \
{$_shell_exitcode = 0} \
}

View File

@@ -0,0 +1,50 @@
/* Copyright 2020-2021 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/>. */
/* Used to insert labels with which we can build a fake line table. */
#define LL(N) asm ("line_label_" #N ": .globl line_label_" #N)
volatile int var;
volatile int bar;
/* Generate some code to take up some space. */
#define FILLER do { \
var = 99; \
} while (0)
int
func (void)
{ /* func prologue */
asm ("func_label: .globl func_label");
LL (1); // F1, Ln 16
FILLER;
LL (2); // F1, Ln 17
FILLER;
LL (3); // F2, Ln 21
FILLER;
LL (4); // F2, Ln 22 // F1, Ln 18, !S
FILLER;
LL (5); // F1, Ln 19 !S
FILLER;
LL (6); // F1, Ln 20
FILLER;
LL (7);
FILLER;
return 0; /* func end */
}
#ifdef WITHMAIN
int main () { return 0; }
#endif

View File

@@ -0,0 +1,24 @@
/* This testcase is part of GDB, the GNU debugger.
Copyright 2004-2021 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/>. */
extern int func (void);
int
main()
{
return func ();
}

View File

@@ -0,0 +1,128 @@
# Copyright 2020-2021 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/>.
# Test that "break /absolute/file:line" works ok with imported CUs.
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
if {![dwarf2_support]} {
return 0
}
# The .c files use __attribute__.
if [get_compiler_info] {
return -1
}
if !$gcc_compiled {
return 0
}
standard_testfile imported-unit-bp-alt.c .S imported-unit-bp-main.c
set build_options {nodebug optimize=-O1}
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
global srcdir subdir srcfile srcfile
global build_options
declare_labels lines_label callee_subprog_label cu_label
get_func_info func "$build_options additional_flags=-DWITHMAIN"
cu {} {
compile_unit {
{language @DW_LANG_C}
{name "<artificial>"}
} {
imported_unit {
{import %$cu_label}
}
}
}
cu {} {
cu_label: compile_unit {
{producer "gcc"}
{language @DW_LANG_C}
{name ${srcfile}}
{comp_dir "/tmp"}
{low_pc 0 addr}
{stmt_list ${lines_label} DW_FORM_sec_offset}
} {
callee_subprog_label: subprogram {
{external 1 flag}
{name callee}
{inline 3 data1}
}
subprogram {
{external 1 flag}
{name func}
{low_pc $func_start addr}
{high_pc "$func_start + $func_len" addr}
} {
}
}
}
lines {version 2 default_is_stmt 1} lines_label {
include_dir "/tmp"
file_name "$srcfile" 1
program {
{DW_LNE_set_address line_label_1}
{DW_LNS_advance_line 15}
{DW_LNS_copy}
{DW_LNE_set_address line_label_2}
{DW_LNS_advance_line 1}
{DW_LNS_copy}
{DW_LNE_set_address line_label_3}
{DW_LNS_advance_line 4}
{DW_LNS_copy}
{DW_LNE_set_address line_label_4}
{DW_LNS_advance_line 1}
{DW_LNS_copy}
{DW_LNS_advance_line -4}
{DW_LNS_negate_stmt}
{DW_LNS_copy}
{DW_LNE_set_address line_label_5}
{DW_LNS_advance_line 1}
{DW_LNS_copy}
{DW_LNE_set_address line_label_6}
{DW_LNS_advance_line 1}
{DW_LNS_negate_stmt}
{DW_LNS_copy}
{DW_LNE_set_address line_label_7}
{DW_LNE_end_sequence}
}
}
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file $srcfile3] $build_options] } {
return -1
}
gdb_reinitialize_dir /tmp
# Using an absolute path is important to see the bug.
gdb_test "break /tmp/${srcfile}:19" "Breakpoint .* file $srcfile, line .*"

View File

@@ -1 +1 @@
10.2
10.2.90.DATE-git