mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-01 05:05:40 +00:00
Compare commits
129 Commits
gdb-11-bra
...
gdb-11.1-r
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c599303f92 | ||
|
|
73a2711e86 | ||
|
|
23b81cc63e | ||
|
|
0c177cbe0a | ||
|
|
7883d1e157 | ||
|
|
55fc911ad6 | ||
|
|
b06653b60a | ||
|
|
5e6741a157 | ||
|
|
127e9f8549 | ||
|
|
706ff47ce2 | ||
|
|
de2143d60b | ||
|
|
cdf4e8ae55 | ||
|
|
dd0fea103f | ||
|
|
aaa394b7df | ||
|
|
1aa04a582c | ||
|
|
244d1aadd7 | ||
|
|
2b195da8a2 | ||
|
|
a6e40b53ef | ||
|
|
76c001c234 | ||
|
|
e34a209edf | ||
|
|
5c177fed07 | ||
|
|
c6c2468fdf | ||
|
|
26db900e8d | ||
|
|
c52e9db30f | ||
|
|
351b63eca9 | ||
|
|
5b766b015c | ||
|
|
8ba9495958 | ||
|
|
e1652de24a | ||
|
|
897254e073 | ||
|
|
0f6a3150d5 | ||
|
|
7350820d0d | ||
|
|
f566731d15 | ||
|
|
c986baa363 | ||
|
|
1862155361 | ||
|
|
106177faac | ||
|
|
2840a1862b | ||
|
|
61bdb9457a | ||
|
|
eccb3ba799 | ||
|
|
e284d00d3e | ||
|
|
e0e48e8cf9 | ||
|
|
8f1a907b47 | ||
|
|
89c2f0e527 | ||
|
|
6fc08811a1 | ||
|
|
8609cba017 | ||
|
|
dc1daf51ae | ||
|
|
c9e63461e5 | ||
|
|
86cf585239 | ||
|
|
d2374b0755 | ||
|
|
fb1b7fcec2 | ||
|
|
1780f3e77e | ||
|
|
b80f2606ef | ||
|
|
d26ac0b905 | ||
|
|
246c1d7974 | ||
|
|
b3dc0eac65 | ||
|
|
a656ee0831 | ||
|
|
76e1bef3bf | ||
|
|
91a78f327b | ||
|
|
e649c6c2a2 | ||
|
|
4b7e7a3499 | ||
|
|
3e5ec878a4 | ||
|
|
e4c1aea498 | ||
|
|
3bea08edb3 | ||
|
|
f9e4d38eec | ||
|
|
33a6518147 | ||
|
|
7fab8f850f | ||
|
|
c0f71837f8 | ||
|
|
4e0069d879 | ||
|
|
52a49e1615 | ||
|
|
791b706a9e | ||
|
|
c12608fcff | ||
|
|
7e292f1ab8 | ||
|
|
26e4f978b0 | ||
|
|
1693a7cf35 | ||
|
|
70417f28b5 | ||
|
|
86271cfa32 | ||
|
|
fc3f144a3e | ||
|
|
011ab47fa4 | ||
|
|
f0927d2036 | ||
|
|
c47bde01bb | ||
|
|
5924fafaf6 | ||
|
|
f08513e821 | ||
|
|
1f0f4c0f55 | ||
|
|
0e9c2a33e4 | ||
|
|
f26101b199 | ||
|
|
647c0a29f2 | ||
|
|
4f3fb91acc | ||
|
|
bbfd0b2867 | ||
|
|
e22715ce30 | ||
|
|
51799bd45f | ||
|
|
85e022aa1a | ||
|
|
28b48aa109 | ||
|
|
97f3dfbc4f | ||
|
|
a35647809a | ||
|
|
e8bd220d37 | ||
|
|
26e27615ab | ||
|
|
7d11b094f4 | ||
|
|
f1d9f19978 | ||
|
|
3e0910a5f0 | ||
|
|
97c5ca8c34 | ||
|
|
58a136f3e7 | ||
|
|
1bdfa2b1a8 | ||
|
|
29e079b876 | ||
|
|
969168ce6f | ||
|
|
d6771741f3 | ||
|
|
29119da49d | ||
|
|
7ad7599a96 | ||
|
|
2814ff8388 | ||
|
|
5496271fd4 | ||
|
|
3e2cf22eef | ||
|
|
789b4fb594 | ||
|
|
ff32938d44 | ||
|
|
6f0fe250d9 | ||
|
|
732236a76e | ||
|
|
e7ca24a166 | ||
|
|
76deb9291d | ||
|
|
8043d65ba2 | ||
|
|
52e44e8d29 | ||
|
|
5354f52ba2 | ||
|
|
fa8740b675 | ||
|
|
507af45f62 | ||
|
|
4165a99398 | ||
|
|
5d91a235cd | ||
|
|
45959f27d9 | ||
|
|
afc60144d1 | ||
|
|
3c21f80eb4 | ||
|
|
14b921356f | ||
|
|
466ee06bda | ||
|
|
828264c1d2 | ||
|
|
633fd34015 |
@@ -1,3 +1,16 @@
|
|||||||
|
2021-09-07 Luis Machado <luis.machado@linaro.org>
|
||||||
|
|
||||||
|
Revert: [AArch64] MTE corefile support
|
||||||
|
|
||||||
|
2021-05-21 Luis Machado <luis.machado@linaro.org>
|
||||||
|
|
||||||
|
* elf.c (elfcore_make_memtag_note_section): New function.
|
||||||
|
(elfcore_grok_note): Handle NT_MEMTAG note types.
|
||||||
|
|
||||||
|
2021-07-03 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
|
* development.sh (development): Set to false.
|
||||||
|
|
||||||
2021-07-03 Nick Clifton <nickc@redhat.com>
|
2021-07-03 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* version.m4: Update version number.
|
* version.m4: Update version number.
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Controls whether to enable development-mode features by default.
|
# Controls whether to enable development-mode features by default.
|
||||||
development=true
|
development=false
|
||||||
|
|
||||||
# Indicate whether this is a release branch.
|
# Indicate whether this is a release branch.
|
||||||
experimental=true
|
experimental=true
|
||||||
|
|||||||
19
bfd/elf.c
19
bfd/elf.c
@@ -9599,23 +9599,6 @@ elfcore_make_auxv_note_section (bfd *abfd, Elf_Internal_Note *note,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
elfcore_make_memtag_note_section (bfd *abfd, Elf_Internal_Note *note,
|
|
||||||
size_t offs)
|
|
||||||
{
|
|
||||||
asection *sect = bfd_make_section_anyway_with_flags (abfd, ".memtag",
|
|
||||||
SEC_HAS_CONTENTS);
|
|
||||||
|
|
||||||
if (sect == NULL)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
sect->size = note->descsz - offs;
|
|
||||||
sect->filepos = note->descpos + offs;
|
|
||||||
sect->alignment_power = 1 + bfd_get_arch_size (abfd) / 32;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* prstatus_t exists on:
|
/* prstatus_t exists on:
|
||||||
solaris 2.5+
|
solaris 2.5+
|
||||||
linux 2.[01] + glibc
|
linux 2.[01] + glibc
|
||||||
@@ -10676,8 +10659,6 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
|
|||||||
return elfcore_make_note_pseudosection (abfd, ".note.linuxcore.siginfo",
|
return elfcore_make_note_pseudosection (abfd, ".note.linuxcore.siginfo",
|
||||||
note);
|
note);
|
||||||
|
|
||||||
case NT_MEMTAG:
|
|
||||||
return elfcore_make_memtag_note_section (abfd, note, 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
In releases, the date is not included in either version strings or
|
In releases, the date is not included in either version strings or
|
||||||
sonames. */
|
sonames. */
|
||||||
#define BFD_VERSION_DATE 20210703
|
#define BFD_VERSION_DATE 20210913
|
||||||
#define BFD_VERSION @bfd_version@
|
#define BFD_VERSION @bfd_version@
|
||||||
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
|
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
|
||||||
#define REPORT_BUGS_TO @report_bugs_to@
|
#define REPORT_BUGS_TO @report_bugs_to@
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
2021-09-07 Luis Machado <luis.machado@linaro.org>
|
||||||
|
|
||||||
|
Revert: [AArch64] MTE corefile support
|
||||||
|
|
||||||
|
2021-05-21 Luis Machado <luis.machado@linaro.org>
|
||||||
|
|
||||||
|
* readelf.c (get_note_type): Handle NT_MEMTAG note types.
|
||||||
|
|
||||||
2021-07-03 Nick Clifton <nickc@redhat.com>
|
2021-07-03 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* configure: Regenerate.
|
* configure: Regenerate.
|
||||||
|
|||||||
@@ -18843,8 +18843,6 @@ get_note_type (Filedata * filedata, unsigned e_type)
|
|||||||
return _("NT_SIGINFO (siginfo_t data)");
|
return _("NT_SIGINFO (siginfo_t data)");
|
||||||
case NT_FILE:
|
case NT_FILE:
|
||||||
return _("NT_FILE (mapped files)");
|
return _("NT_FILE (mapped files)");
|
||||||
case NT_MEMTAG:
|
|
||||||
return _("NT_MEMTAG (memory tags)");
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
208
gdb/ChangeLog
208
gdb/ChangeLog
@@ -1,3 +1,211 @@
|
|||||||
|
2021-09-13 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
|
* version.in: Set GDB version number to 11.1.
|
||||||
|
|
||||||
|
2021-09-08 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
* dwarf2/read.h (dwarf2_per_objfile::resize_symtabs): Remove.
|
||||||
|
* dwarf2/read.c (all_comp_units_iterator, all_comp_units_range):
|
||||||
|
New classes.
|
||||||
|
(dwarf2_per_objfile::symtab_set_p)
|
||||||
|
(dwarf2_per_objfile::get_symtab, dwarf2_per_objfile::set_symtab):
|
||||||
|
Adjust to resizeable vectors.
|
||||||
|
(dwarf2_gdb_index::expand_symtabs_matching)
|
||||||
|
(dwarf2_base_index_functions::map_symbol_filenames)
|
||||||
|
(dwarf2_debug_names_index::expand_symtabs_matching): Use
|
||||||
|
all_comp_units_range.
|
||||||
|
(dwarf2_initialize_objfile, dwarf2_build_psymtabs)
|
||||||
|
(add_type_unit): Don't call resize_symtabs.
|
||||||
|
|
||||||
|
2021-09-07 John Baldwin <jhb@FreeBSD.org>
|
||||||
|
|
||||||
|
* fbsd-nat.c (fbsd_nat_target::info_proc): Use plongest and
|
||||||
|
pulongest instead of %j.
|
||||||
|
|
||||||
|
2021-08-30 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
PR cli/28290
|
||||||
|
* gdb/corelow.c (core_target_open): Skip call to gdb_abspath in the
|
||||||
|
empty-string case.
|
||||||
|
|
||||||
|
2021-08-23 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
PR gdb/26880
|
||||||
|
* gdb/exec.c (exec_file_attach): Use %s instead of %ps in call to
|
||||||
|
error function.
|
||||||
|
|
||||||
|
2021-08-06 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
PR symtab/28004
|
||||||
|
* dwarf2/read.c (dwarf2_rnglists_process, dwarf2_ranges_process):
|
||||||
|
Fix zero address complaint.
|
||||||
|
|
||||||
|
2021-08-02 Tom Tromey <tromey@adacore.com>
|
||||||
|
|
||||||
|
PR varobj/28131
|
||||||
|
* varobj.c (~varobj): Delete 'dynamic' before 'root'.
|
||||||
|
|
||||||
|
2021-08-02 Shahab Vahedi <shahab@synopsys.com>
|
||||||
|
|
||||||
|
PR gdb/28104
|
||||||
|
* gdbtypes.c (gdbtypes_post_init): Use
|
||||||
|
"arch_boolean_type (..., unsigned=1, ...) to construct
|
||||||
|
"boolean".
|
||||||
|
cp-valprint.c (test_print_flags): New.
|
||||||
|
(_initialize_cp_valprint): Run the "test_print_flags" unit-test.
|
||||||
|
|
||||||
|
2021-07-28 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
* dwarf2/read.c (attr_to_dynamic_prop): Handle DW_FORM_data16.
|
||||||
|
|
||||||
|
2021-07-27 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
PR testsuite/26904
|
||||||
|
* gdb/testsuite/gdb.ada/big_packed_array.exp: Add xfail.
|
||||||
|
|
||||||
|
2021-07-27 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
PR testsuite/26903
|
||||||
|
* gdb/testsuite/gdb.ada/array_of_variant.exp: Add xfails.
|
||||||
|
|
||||||
|
2021-07-26 Frederic Cambus <fred@statdns.com>
|
||||||
|
|
||||||
|
* syscalls/netbsd.xml: Regenerate.
|
||||||
|
|
||||||
|
2021-07-26 Shahab Vahedi <shahab@synopsys.com>
|
||||||
|
Simon Marchi <simon.marchi@efficios.com>
|
||||||
|
|
||||||
|
PR gdb/28103
|
||||||
|
* valprint.c (val_print_type_code_flags): Merely shift the VAL
|
||||||
|
to the right to get rid of the lower bits.
|
||||||
|
(test_print_flags): New.
|
||||||
|
(_initialize_valprint): Invoke the "test_print_flags" as a unit-test.
|
||||||
|
|
||||||
|
2021-07-26 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
|
||||||
|
|
||||||
|
PR gdb/28076
|
||||||
|
* mi/mi-cmd-break.c (mi_cmd_break_condition): Handle the case
|
||||||
|
of having no condition argument.
|
||||||
|
|
||||||
|
2021-07-20 Luis Machado <luis.machado@linaro.org>
|
||||||
|
Pedro Alves <pedro@palves.net>
|
||||||
|
|
||||||
|
PR gdb/28110
|
||||||
|
* gdbarch.sh: Updated documentation for gdbarch_tagged_address_p.
|
||||||
|
* gdbarch.h: Regenerate.
|
||||||
|
* printcmd.c (should_validate_memtags): Reorder comparisons and only
|
||||||
|
validate tags for pointer and reference types. Skip validation of
|
||||||
|
optimized out or unavailable values.
|
||||||
|
(print_command_1): Guard call memory tagging validation code with
|
||||||
|
a try/catch block.
|
||||||
|
|
||||||
|
2021-07-19 Tom Tromey <tromey@adacore.com>
|
||||||
|
|
||||||
|
PR gdb/28093
|
||||||
|
* language.c (auto_or_unknown_language::parser): Call error.
|
||||||
|
|
||||||
|
2021-07-17 Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
||||||
|
|
||||||
|
* Makefile.in (ALL_TARGET_OBS): Add z80-tdep.c.
|
||||||
|
* NEWS: Mention z80 support.
|
||||||
|
* configure.tgt: Handle z80*.
|
||||||
|
* features/Makefile (XMLTOC): Add z80.xml.
|
||||||
|
* features/z80-cpu.xml: New.
|
||||||
|
* features/z80.c: Generate.
|
||||||
|
* features/z80.xml: New.
|
||||||
|
* z80-tdep.c: New file.
|
||||||
|
* z80-tdep.h: New file.
|
||||||
|
|
||||||
|
2021-07-13 Lancelot Six <lsix@lancelotsix.com>
|
||||||
|
|
||||||
|
* make-init-c: Use /bin/sh as shebang.
|
||||||
|
|
||||||
|
2021-07-13 Pedro Alves <pedro@palves.net>
|
||||||
|
|
||||||
|
PR gdb/28080
|
||||||
|
* gdb_bfd.c (gdb_bfd_close_warning): New.
|
||||||
|
(gdb_bfd_iovec_fileio_close): Wrap target_fileio_close in
|
||||||
|
try/catch and print warning on exception.
|
||||||
|
(gdb_bfd_close_or_warn): Use gdb_bfd_close_warning.
|
||||||
|
|
||||||
|
2021-07-13 Pedro Alves <pedro@palves.net>
|
||||||
|
|
||||||
|
PR gdb/28080
|
||||||
|
* remote.c (remote_unpush_target): Invalidate file I/O target
|
||||||
|
handles.
|
||||||
|
* target.c (fileio_handles_invalidate_target): Make extern.
|
||||||
|
* target.h (fileio_handles_invalidate_target): Declare.
|
||||||
|
|
||||||
|
2021-07-13 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* mi/mi-main.c (mi_cmd_exec_interrupt): Use
|
||||||
|
scoped_disable_commit_resumed in the --thread-group case.
|
||||||
|
|
||||||
|
2021-07-13 John Ericson <git@JohnEricson.me>
|
||||||
|
|
||||||
|
* sparc-tdep.h: Fix comment.
|
||||||
|
* netbsd-tdep.c (nbsd_info_proc_mappings_header): Fix comment.
|
||||||
|
(nbsd_init_abi): Fix comment.
|
||||||
|
* configure.tgt (*-*-netbsd* | *-*-knetbsd*-gnu): Fix netbsd
|
||||||
|
file name.
|
||||||
|
(alpha*-*-openbsd*): Likewise.
|
||||||
|
(sparc-*-openbsd*): Likewise.
|
||||||
|
(sparc64-*-openbsd*): Likewise.
|
||||||
|
|
||||||
|
2021-07-11 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
Committed by Joel Brobecker <brobecker@adacore.com>:
|
||||||
|
* gdb/symtab.c (info_sources_filter::matches): Add default
|
||||||
|
case hander in switch statement.
|
||||||
|
|
||||||
|
2021-07-08 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* s390-linux-tdep.c (s390_linux_init_abi_any): Pass 1 (number
|
||||||
|
of displaced stepping buffers to linux_init_abi.
|
||||||
|
* s390-tdep.c (s390_gdbarch_init): Don't set the Linux-specific
|
||||||
|
displaced-stepping gdbarch callbacks.
|
||||||
|
|
||||||
|
2021-07-08 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* Makefile.in (SUBDIRS): Remove testsuite.
|
||||||
|
|
||||||
|
2021-07-06 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* configure.ac: Remove things that were moved from
|
||||||
|
testsuite/configure.ac.
|
||||||
|
* configure: Re-generate.
|
||||||
|
|
||||||
|
2021-07-05 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* config.in, configure: Re-generate.
|
||||||
|
|
||||||
|
2021-07-04 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* solib-darwin.c (darwin_solib_create_inferior_hook): Return
|
||||||
|
early if no execution.
|
||||||
|
|
||||||
|
2021-07-03 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
|
* version.in: Set GDB version number to 11.0.90.DATE-git.
|
||||||
|
|
||||||
|
2021-07-03 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
|
GDB 11.0.90 released.
|
||||||
|
|
||||||
|
2021-07-03 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
|
* version.in: Set GDB version number to 11.0.90.
|
||||||
|
|
||||||
|
2021-07-03 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
|
* NEWS: Replace "Changes since GDB 10" by "Changes in GDB 11".
|
||||||
|
|
||||||
|
2021-07-03 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
|
GDB 11 branch created (4b51505e33441c6165e7789fa2b6d21930242927):
|
||||||
|
* version.in: Bump version to 11.0.90.DATE-git.
|
||||||
|
|
||||||
2021-07-02 Tom Tromey <tromey@adacore.com>
|
2021-07-02 Tom Tromey <tromey@adacore.com>
|
||||||
|
|
||||||
* ada-exp.y (chop_selector, chop_separator, write_selectors)
|
* ada-exp.y (chop_selector, chop_separator, write_selectors)
|
||||||
|
|||||||
@@ -852,7 +852,8 @@ ALL_TARGET_OBS = \
|
|||||||
xstormy16-tdep.o \
|
xstormy16-tdep.o \
|
||||||
xtensa-config.o \
|
xtensa-config.o \
|
||||||
xtensa-linux-tdep.o \
|
xtensa-linux-tdep.o \
|
||||||
xtensa-tdep.o
|
xtensa-tdep.o \
|
||||||
|
z80-tdep.o
|
||||||
|
|
||||||
# The following native-target dependent variables are defined on
|
# The following native-target dependent variables are defined on
|
||||||
# configure.nat.
|
# configure.nat.
|
||||||
@@ -1591,7 +1592,7 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
|
|||||||
$(SUBDIR_TARGET_OBS) \
|
$(SUBDIR_TARGET_OBS) \
|
||||||
$(SUBDIR_GCC_COMPILE_OBS)
|
$(SUBDIR_GCC_COMPILE_OBS)
|
||||||
|
|
||||||
SUBDIRS = doc @subdirs@ data-directory testsuite
|
SUBDIRS = doc @subdirs@ data-directory
|
||||||
CLEANDIRS = $(SUBDIRS)
|
CLEANDIRS = $(SUBDIRS)
|
||||||
|
|
||||||
# List of subdirectories in the build tree that must exist.
|
# List of subdirectories in the build tree that must exist.
|
||||||
|
|||||||
3
gdb/NEWS
3
gdb/NEWS
@@ -1,7 +1,7 @@
|
|||||||
What has changed in GDB?
|
What has changed in GDB?
|
||||||
(Organized release by release)
|
(Organized release by release)
|
||||||
|
|
||||||
*** Changes since GDB 10
|
*** Changes in GDB 11
|
||||||
|
|
||||||
* The 'set disassembler-options' command now supports specifying options
|
* The 'set disassembler-options' command now supports specifying options
|
||||||
for the ARC target.
|
for the ARC target.
|
||||||
@@ -424,6 +424,7 @@ alias [-a] [--] ALIAS = COMMAND [DEFAULT-ARGS...]
|
|||||||
|
|
||||||
GNU/Linux/RISC-V (gdbserver) riscv*-*-linux*
|
GNU/Linux/RISC-V (gdbserver) riscv*-*-linux*
|
||||||
BPF bpf-unknown-none
|
BPF bpf-unknown-none
|
||||||
|
Z80 z80-unknown-*
|
||||||
|
|
||||||
* Python API
|
* Python API
|
||||||
|
|
||||||
|
|||||||
@@ -414,6 +414,9 @@
|
|||||||
/* Define to 1 if you have the `sigsetmask' function. */
|
/* Define to 1 if you have the `sigsetmask' function. */
|
||||||
#undef HAVE_SIGSETMASK
|
#undef HAVE_SIGSETMASK
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `sigtimedwait' function. */
|
||||||
|
#undef HAVE_SIGTIMEDWAIT
|
||||||
|
|
||||||
/* Define to 1 if you have the `socketpair' function. */
|
/* Define to 1 if you have the `socketpair' function. */
|
||||||
#undef HAVE_SOCKETPAIR
|
#undef HAVE_SOCKETPAIR
|
||||||
|
|
||||||
|
|||||||
88
gdb/configure
vendored
88
gdb/configure
vendored
@@ -619,14 +619,10 @@ ac_includes_default="\
|
|||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif"
|
#endif"
|
||||||
|
|
||||||
ac_header_list=
|
|
||||||
enable_option_checking=no
|
enable_option_checking=no
|
||||||
|
ac_header_list=
|
||||||
ac_subst_vars='LTLIBOBJS
|
ac_subst_vars='LTLIBOBJS
|
||||||
LIBOBJS
|
LIBOBJS
|
||||||
NM_TRANSFORM_NAME
|
|
||||||
GAS_TRANSFORM_NAME
|
|
||||||
READELF_TRANSFORM_NAME
|
|
||||||
STRIP_TRANSFORM_NAME
|
|
||||||
GCORE_TRANSFORM_NAME
|
GCORE_TRANSFORM_NAME
|
||||||
GDB_TRANSFORM_NAME
|
GDB_TRANSFORM_NAME
|
||||||
XSLTPROC
|
XSLTPROC
|
||||||
@@ -637,7 +633,6 @@ LIBXXHASH
|
|||||||
HAVE_LIBXXHASH
|
HAVE_LIBXXHASH
|
||||||
CTF_DEPS
|
CTF_DEPS
|
||||||
LIBCTF
|
LIBCTF
|
||||||
enable_libctf
|
|
||||||
LTLIBBABELTRACE
|
LTLIBBABELTRACE
|
||||||
LIBBABELTRACE
|
LIBBABELTRACE
|
||||||
HAVE_LIBBABELTRACE
|
HAVE_LIBBABELTRACE
|
||||||
@@ -668,7 +663,6 @@ GDBTKLIBS
|
|||||||
X_LIBS
|
X_LIBS
|
||||||
X_LDFLAGS
|
X_LDFLAGS
|
||||||
X_CFLAGS
|
X_CFLAGS
|
||||||
subdirs
|
|
||||||
TK_XINCLUDES
|
TK_XINCLUDES
|
||||||
TK_DEPS
|
TK_DEPS
|
||||||
TK_LIBRARY
|
TK_LIBRARY
|
||||||
@@ -776,7 +770,7 @@ PKG_CONFIG_PATH
|
|||||||
PKG_CONFIG
|
PKG_CONFIG
|
||||||
HAVE_NATIVE_GCORE_TARGET
|
HAVE_NATIVE_GCORE_TARGET
|
||||||
TARGET_OBS
|
TARGET_OBS
|
||||||
RPATH_ENVVAR
|
subdirs
|
||||||
GDB_DATADIR
|
GDB_DATADIR
|
||||||
DEBUGDIR
|
DEBUGDIR
|
||||||
MAKEINFO_EXTRA_FLAGS
|
MAKEINFO_EXTRA_FLAGS
|
||||||
@@ -882,7 +876,6 @@ with_gdb_datadir
|
|||||||
with_relocated_sources
|
with_relocated_sources
|
||||||
with_auto_load_dir
|
with_auto_load_dir
|
||||||
with_auto_load_safe_path
|
with_auto_load_safe_path
|
||||||
enable_shared
|
|
||||||
enable_targets
|
enable_targets
|
||||||
enable_64_bit_bfd
|
enable_64_bit_bfd
|
||||||
enable_gdbmi
|
enable_gdbmi
|
||||||
@@ -963,7 +956,8 @@ DEBUGINFOD_LIBS
|
|||||||
YACC
|
YACC
|
||||||
YFLAGS
|
YFLAGS
|
||||||
XMKMF'
|
XMKMF'
|
||||||
ac_subdirs_all='gdbtk'
|
ac_subdirs_all='testsuite
|
||||||
|
gdbtk'
|
||||||
|
|
||||||
# Initialize some variables set by options.
|
# Initialize some variables set by options.
|
||||||
ac_init_help=
|
ac_init_help=
|
||||||
@@ -1589,7 +1583,6 @@ Optional Features:
|
|||||||
sometimes confusing) to the casual installer
|
sometimes confusing) to the casual installer
|
||||||
--enable-plugins Enable support for plugins
|
--enable-plugins Enable support for plugins
|
||||||
--disable-largefile omit support for large files
|
--disable-largefile omit support for large files
|
||||||
--enable-shared build shared libraries [default=yes]
|
|
||||||
--enable-targets=TARGETS
|
--enable-targets=TARGETS
|
||||||
alternative target configurations
|
alternative target configurations
|
||||||
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
|
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
|
||||||
@@ -6623,34 +6616,9 @@ _ACEOF
|
|||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
|
||||||
$as_echo "$with_auto_load_safe_path" >&6; }
|
$as_echo "$with_auto_load_safe_path" >&6; }
|
||||||
|
|
||||||
# Enable shared libraries.
|
|
||||||
# Check whether --enable-shared was given.
|
|
||||||
if test "${enable_shared+set}" = set; then :
|
|
||||||
enableval=$enable_shared;
|
|
||||||
else
|
|
||||||
enable_shared=yes
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# If we have shared libraries, try to set RPATH_ENVVAR reasonably,
|
subdirs="$subdirs testsuite"
|
||||||
# such that we can find the shared libraries in the build tree.
|
|
||||||
if test $enable_shared = no; then
|
|
||||||
# The variable `RPATH_ENVVAR' itself is not likely to be used on any
|
|
||||||
# platform.
|
|
||||||
RPATH_ENVVAR=RPATH_ENVVAR
|
|
||||||
else
|
|
||||||
# The variable `LD_LIBRARY_PATH' is used on most platforms.
|
|
||||||
RPATH_ENVVAR=LD_LIBRARY_PATH
|
|
||||||
# The following exceptions are taken from Libtool 1.4.3.
|
|
||||||
case $host_os in
|
|
||||||
aix*)
|
|
||||||
if test $host_cpu != ia64; then
|
|
||||||
RPATH_ENVVAR=LIBPATH
|
|
||||||
fi ;;
|
|
||||||
darwin* | rhapsody*)
|
|
||||||
RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Check whether to support alternative target configurations
|
# Check whether to support alternative target configurations
|
||||||
@@ -13857,7 +13825,7 @@ fi
|
|||||||
|
|
||||||
for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
|
for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
|
||||||
ptrace64 sbrk setns sigaltstack sigprocmask \
|
ptrace64 sbrk setns sigaltstack sigprocmask \
|
||||||
setpgid setpgrp getrusage getauxval
|
setpgid setpgrp getrusage getauxval sigtimedwait
|
||||||
do :
|
do :
|
||||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||||
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
||||||
@@ -18325,8 +18293,6 @@ $as_echo "${private_dir}" >&6; }
|
|||||||
CONFIG_OBS="${CONFIG_OBS} gdbres.o"
|
CONFIG_OBS="${CONFIG_OBS} gdbres.o"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
subdirs="$subdirs gdbtk"
|
subdirs="$subdirs gdbtk"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@@ -19209,7 +19175,6 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
|
# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
|
||||||
# empty version.
|
# empty version.
|
||||||
|
|
||||||
@@ -19841,44 +19806,6 @@ ac_config_files="$ac_config_files gcore"
|
|||||||
|
|
||||||
ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
|
ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
|
||||||
|
|
||||||
# Transform the name of some programs for the testsuite/lib/pdtrace
|
|
||||||
# test tool.
|
|
||||||
|
|
||||||
gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
|
|
||||||
STRIP_TRANSFORM_NAME=`echo strip | sed -e "$gdb_ac_transform"`
|
|
||||||
if test "x$STRIP_TRANSFORM_NAME" = x; then
|
|
||||||
STRIP_TRANSFORM_NAME=strip
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
|
|
||||||
READELF_TRANSFORM_NAME=`echo readelf | sed -e "$gdb_ac_transform"`
|
|
||||||
if test "x$READELF_TRANSFORM_NAME" = x; then
|
|
||||||
READELF_TRANSFORM_NAME=readelf
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
|
|
||||||
GAS_TRANSFORM_NAME=`echo as | sed -e "$gdb_ac_transform"`
|
|
||||||
if test "x$GAS_TRANSFORM_NAME" = x; then
|
|
||||||
GAS_TRANSFORM_NAME=as
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
|
|
||||||
NM_TRANSFORM_NAME=`echo nm | sed -e "$gdb_ac_transform"`
|
|
||||||
if test "x$NM_TRANSFORM_NAME" = x; then
|
|
||||||
NM_TRANSFORM_NAME=nm
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
ac_config_files="$ac_config_files testsuite/lib/pdtrace"
|
|
||||||
|
|
||||||
ac_config_files="$ac_config_files testsuite/Makefile"
|
|
||||||
|
|
||||||
|
|
||||||
cat >confcache <<\_ACEOF
|
cat >confcache <<\_ACEOF
|
||||||
# This file is a shell script that caches the results of configure
|
# This file is a shell script that caches the results of configure
|
||||||
@@ -20608,8 +20535,6 @@ do
|
|||||||
"gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
|
"gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
|
||||||
"doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
|
"doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
|
||||||
"data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
|
"data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
|
||||||
"testsuite/lib/pdtrace") CONFIG_FILES="$CONFIG_FILES testsuite/lib/pdtrace" ;;
|
|
||||||
"testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
|
|
||||||
|
|
||||||
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
||||||
esac
|
esac
|
||||||
@@ -21240,7 +21165,6 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
|
|||||||
"depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
|
"depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
|
||||||
"nm.h":L) echo > stamp-nmh ;;
|
"nm.h":L) echo > stamp-nmh ;;
|
||||||
"gcore":F) chmod +x gcore ;;
|
"gcore":F) chmod +x gcore ;;
|
||||||
"testsuite/lib/pdtrace":F) chmod +x testsuite/lib/pdtrace ;;
|
|
||||||
|
|
||||||
esac
|
esac
|
||||||
done # for ac_tag
|
done # for ac_tag
|
||||||
|
|||||||
@@ -153,31 +153,7 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir,
|
|||||||
[Directories safe to hold auto-loaded files.])
|
[Directories safe to hold auto-loaded files.])
|
||||||
AC_MSG_RESULT([$with_auto_load_safe_path])
|
AC_MSG_RESULT([$with_auto_load_safe_path])
|
||||||
|
|
||||||
# Enable shared libraries.
|
AC_CONFIG_SUBDIRS(testsuite)
|
||||||
AC_ARG_ENABLE(shared,
|
|
||||||
AS_HELP_STRING([--enable-shared], [build shared libraries [default=yes]]),,
|
|
||||||
enable_shared=yes)
|
|
||||||
|
|
||||||
# If we have shared libraries, try to set RPATH_ENVVAR reasonably,
|
|
||||||
# such that we can find the shared libraries in the build tree.
|
|
||||||
if test $enable_shared = no; then
|
|
||||||
# The variable `RPATH_ENVVAR' itself is not likely to be used on any
|
|
||||||
# platform.
|
|
||||||
RPATH_ENVVAR=RPATH_ENVVAR
|
|
||||||
else
|
|
||||||
# The variable `LD_LIBRARY_PATH' is used on most platforms.
|
|
||||||
RPATH_ENVVAR=LD_LIBRARY_PATH
|
|
||||||
# The following exceptions are taken from Libtool 1.4.3.
|
|
||||||
case $host_os in
|
|
||||||
aix*)
|
|
||||||
if test $host_cpu != ia64; then
|
|
||||||
RPATH_ENVVAR=LIBPATH
|
|
||||||
fi ;;
|
|
||||||
darwin* | rhapsody*)
|
|
||||||
RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
AC_SUBST(RPATH_ENVVAR)
|
|
||||||
|
|
||||||
# Check whether to support alternative target configurations
|
# Check whether to support alternative target configurations
|
||||||
AC_ARG_ENABLE(targets,
|
AC_ARG_ENABLE(targets,
|
||||||
@@ -2195,7 +2171,6 @@ else
|
|||||||
LIBCTF=
|
LIBCTF=
|
||||||
CTF_DEPS=
|
CTF_DEPS=
|
||||||
fi
|
fi
|
||||||
AC_SUBST(enable_libctf)
|
|
||||||
AC_SUBST(LIBCTF)
|
AC_SUBST(LIBCTF)
|
||||||
AC_SUBST(CTF_DEPS)
|
AC_SUBST(CTF_DEPS)
|
||||||
|
|
||||||
@@ -2261,13 +2236,5 @@ GDB_AC_TRANSFORM([gdb], [GDB_TRANSFORM_NAME])
|
|||||||
GDB_AC_TRANSFORM([gcore], [GCORE_TRANSFORM_NAME])
|
GDB_AC_TRANSFORM([gcore], [GCORE_TRANSFORM_NAME])
|
||||||
AC_CONFIG_FILES([gcore], [chmod +x gcore])
|
AC_CONFIG_FILES([gcore], [chmod +x gcore])
|
||||||
AC_CONFIG_FILES([Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile])
|
AC_CONFIG_FILES([Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile])
|
||||||
# Transform the name of some programs for the testsuite/lib/pdtrace
|
|
||||||
# test tool.
|
|
||||||
GDB_AC_TRANSFORM(strip, STRIP_TRANSFORM_NAME)
|
|
||||||
GDB_AC_TRANSFORM(readelf, READELF_TRANSFORM_NAME)
|
|
||||||
GDB_AC_TRANSFORM(as, GAS_TRANSFORM_NAME)
|
|
||||||
GDB_AC_TRANSFORM(nm, NM_TRANSFORM_NAME)
|
|
||||||
AC_CONFIG_FILES([testsuite/lib/pdtrace], [chmod +x testsuite/lib/pdtrace])
|
|
||||||
AC_CONFIG_FILES([testsuite/Makefile])
|
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ case "${targ}" in
|
|||||||
*-*-freebsd* | *-*-kfreebsd*-gnu)
|
*-*-freebsd* | *-*-kfreebsd*-gnu)
|
||||||
os_obs="fbsd-tdep.o solib-svr4.o";;
|
os_obs="fbsd-tdep.o solib-svr4.o";;
|
||||||
*-*-netbsd* | *-*-knetbsd*-gnu)
|
*-*-netbsd* | *-*-knetbsd*-gnu)
|
||||||
os_obs="nbsd-tdep.o solib-svr4.o";;
|
os_obs="netbsd-tdep.o solib-svr4.o";;
|
||||||
*-*-openbsd*)
|
*-*-openbsd*)
|
||||||
os_obs="obsd-tdep.o solib-svr4.o";;
|
os_obs="obsd-tdep.o solib-svr4.o";;
|
||||||
esac
|
esac
|
||||||
@@ -146,7 +146,7 @@ alpha*-*-netbsd* | alpha*-*-knetbsd*-gnu)
|
|||||||
alpha*-*-openbsd*)
|
alpha*-*-openbsd*)
|
||||||
# Target: OpenBSD/alpha
|
# Target: OpenBSD/alpha
|
||||||
gdb_target_obs="alpha-mdebug-tdep.o alpha-bsd-tdep.o \
|
gdb_target_obs="alpha-mdebug-tdep.o alpha-bsd-tdep.o \
|
||||||
alpha-netbsd-tdep.o alpha-obsd-tdep.o nbsd-tdep.o"
|
alpha-netbsd-tdep.o alpha-obsd-tdep.o netbsd-tdep.o"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
am33_2.0*-*-linux*)
|
am33_2.0*-*-linux*)
|
||||||
@@ -632,14 +632,14 @@ sparc64-*-netbsd* | sparc64-*-knetbsd*-gnu)
|
|||||||
sparc-*-openbsd*)
|
sparc-*-openbsd*)
|
||||||
# Target: OpenBSD/sparc
|
# Target: OpenBSD/sparc
|
||||||
gdb_target_obs="sparc-tdep.o sparc-netbsd-tdep.o sparc-obsd-tdep.o \
|
gdb_target_obs="sparc-tdep.o sparc-netbsd-tdep.o sparc-obsd-tdep.o \
|
||||||
nbsd-tdep.o bsd-uthread.o \
|
netbsd-tdep.o bsd-uthread.o \
|
||||||
ravenscar-thread.o sparc-ravenscar-thread.o"
|
ravenscar-thread.o sparc-ravenscar-thread.o"
|
||||||
;;
|
;;
|
||||||
sparc64-*-openbsd*)
|
sparc64-*-openbsd*)
|
||||||
# Target: OpenBSD/sparc64
|
# Target: OpenBSD/sparc64
|
||||||
gdb_target_obs="sparc64-tdep.o sparc64-netbsd-tdep.o sparc64-obsd-tdep.o \
|
gdb_target_obs="sparc64-tdep.o sparc64-netbsd-tdep.o sparc64-obsd-tdep.o \
|
||||||
sparc-tdep.o sparc-netbsd-tdep.o sparc-obsd-tdep.o \
|
sparc-tdep.o sparc-netbsd-tdep.o sparc-obsd-tdep.o \
|
||||||
nbsd-tdep.o bsd-uthread.o \
|
netbsd-tdep.o bsd-uthread.o \
|
||||||
ravenscar-thread.o sparc-ravenscar-thread.o"
|
ravenscar-thread.o sparc-ravenscar-thread.o"
|
||||||
;;
|
;;
|
||||||
sparc-*-solaris2* | sparcv9-*-solaris2* | sparc64-*-solaris2*)
|
sparc-*-solaris2* | sparcv9-*-solaris2* | sparc64-*-solaris2*)
|
||||||
@@ -761,6 +761,10 @@ xtensa*-*-*linux*)
|
|||||||
# Target: GNU/Linux Xtensa
|
# Target: GNU/Linux Xtensa
|
||||||
gdb_target_obs="xtensa-linux-tdep.o symfile-mem.o linux-tdep.o"
|
gdb_target_obs="xtensa-linux-tdep.o symfile-mem.o linux-tdep.o"
|
||||||
;;
|
;;
|
||||||
|
z80*)
|
||||||
|
# Target: Z80
|
||||||
|
gdb_target_obs="z80-tdep.o"
|
||||||
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|||||||
@@ -428,7 +428,8 @@ core_target_open (const char *arg, int from_tty)
|
|||||||
}
|
}
|
||||||
|
|
||||||
gdb::unique_xmalloc_ptr<char> filename (tilde_expand (arg));
|
gdb::unique_xmalloc_ptr<char> filename (tilde_expand (arg));
|
||||||
if (!IS_ABSOLUTE_PATH (filename.get ()))
|
if (strlen (filename.get ()) != 0
|
||||||
|
&& !IS_ABSOLUTE_PATH (filename.get ()))
|
||||||
filename = gdb_abspath (filename.get ());
|
filename = gdb_abspath (filename.get ());
|
||||||
|
|
||||||
flags = O_BINARY | O_LARGEFILE;
|
flags = O_BINARY | O_LARGEFILE;
|
||||||
|
|||||||
@@ -38,6 +38,8 @@
|
|||||||
#include "gdbsupport/byte-vector.h"
|
#include "gdbsupport/byte-vector.h"
|
||||||
#include "gdbarch.h"
|
#include "gdbarch.h"
|
||||||
#include "cli/cli-style.h"
|
#include "cli/cli-style.h"
|
||||||
|
#include "gdbsupport/selftest.h"
|
||||||
|
#include "selftest-arch.h"
|
||||||
|
|
||||||
static struct obstack dont_print_vb_obstack;
|
static struct obstack dont_print_vb_obstack;
|
||||||
static struct obstack dont_print_statmem_obstack;
|
static struct obstack dont_print_statmem_obstack;
|
||||||
@@ -715,11 +717,77 @@ cp_print_class_member (const gdb_byte *valaddr, struct type *type,
|
|||||||
fprintf_filtered (stream, "%ld", (long) val);
|
fprintf_filtered (stream, "%ld", (long) val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GDB_SELF_TEST
|
||||||
|
|
||||||
|
/* Test printing of TYPE_CODE_STRUCT values. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
test_print_fields (gdbarch *arch)
|
||||||
|
{
|
||||||
|
struct field *f;
|
||||||
|
type *uint8_type = builtin_type (arch)->builtin_uint8;
|
||||||
|
type *bool_type = builtin_type (arch)->builtin_bool;
|
||||||
|
type *the_struct = arch_composite_type (arch, NULL, TYPE_CODE_STRUCT);
|
||||||
|
TYPE_LENGTH (the_struct) = 4;
|
||||||
|
|
||||||
|
/* Value: 1110 1001
|
||||||
|
Fields: C-BB B-A- */
|
||||||
|
if (gdbarch_byte_order (arch) == BFD_ENDIAN_LITTLE)
|
||||||
|
{
|
||||||
|
f = append_composite_type_field_raw (the_struct, "A", bool_type);
|
||||||
|
SET_FIELD_BITPOS (*f, 1);
|
||||||
|
FIELD_BITSIZE (*f) = 1;
|
||||||
|
f = append_composite_type_field_raw (the_struct, "B", uint8_type);
|
||||||
|
SET_FIELD_BITPOS (*f, 3);
|
||||||
|
FIELD_BITSIZE (*f) = 3;
|
||||||
|
f = append_composite_type_field_raw (the_struct, "C", bool_type);
|
||||||
|
SET_FIELD_BITPOS (*f, 7);
|
||||||
|
FIELD_BITSIZE (*f) = 1;
|
||||||
|
}
|
||||||
|
/* According to the logic commented in "make_gdb_type_struct ()" of
|
||||||
|
* target-descriptions.c, bit positions are numbered differently for
|
||||||
|
* little and big endians. */
|
||||||
|
else
|
||||||
|
{
|
||||||
|
f = append_composite_type_field_raw (the_struct, "A", bool_type);
|
||||||
|
SET_FIELD_BITPOS (*f, 30);
|
||||||
|
FIELD_BITSIZE (*f) = 1;
|
||||||
|
f = append_composite_type_field_raw (the_struct, "B", uint8_type);
|
||||||
|
SET_FIELD_BITPOS (*f, 26);
|
||||||
|
FIELD_BITSIZE (*f) = 3;
|
||||||
|
f = append_composite_type_field_raw (the_struct, "C", bool_type);
|
||||||
|
SET_FIELD_BITPOS (*f, 24);
|
||||||
|
FIELD_BITSIZE (*f) = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
value *val = allocate_value (the_struct);
|
||||||
|
gdb_byte *contents = value_contents_writeable (val);
|
||||||
|
store_unsigned_integer (contents, TYPE_LENGTH (value_enclosing_type (val)),
|
||||||
|
gdbarch_byte_order (arch), 0xe9);
|
||||||
|
|
||||||
|
string_file out;
|
||||||
|
struct value_print_options opts;
|
||||||
|
get_no_prettyformat_print_options (&opts);
|
||||||
|
cp_print_value_fields(val, &out, 0, &opts, NULL, 0);
|
||||||
|
SELF_CHECK (out.string () == "{A = false, B = 5, C = true}");
|
||||||
|
|
||||||
|
out.clear();
|
||||||
|
opts.format = 'x';
|
||||||
|
cp_print_value_fields(val, &out, 0, &opts, NULL, 0);
|
||||||
|
SELF_CHECK (out.string () == "{A = 0x0, B = 0x5, C = 0x1}");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void _initialize_cp_valprint ();
|
void _initialize_cp_valprint ();
|
||||||
void
|
void
|
||||||
_initialize_cp_valprint ()
|
_initialize_cp_valprint ()
|
||||||
{
|
{
|
||||||
|
#if GDB_SELF_TEST
|
||||||
|
selftests::register_test_foreach_arch ("print-fields", test_print_fields);
|
||||||
|
#endif
|
||||||
|
|
||||||
obstack_begin (&dont_print_stat_array_obstack,
|
obstack_begin (&dont_print_stat_array_obstack,
|
||||||
32 * sizeof (struct type *));
|
32 * sizeof (struct type *));
|
||||||
obstack_begin (&dont_print_statmem_obstack,
|
obstack_begin (&dont_print_statmem_obstack,
|
||||||
|
|||||||
@@ -1,3 +1,13 @@
|
|||||||
|
2021-08-12 Tom Tromey <tromey@adacore.com>
|
||||||
|
|
||||||
|
* gdb.texinfo (Output Styling): Mention Pygments.
|
||||||
|
|
||||||
|
2021-07-26 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
|
||||||
|
|
||||||
|
PR gdb/28076
|
||||||
|
* gdb.texinfo (GDB/MI Breakpoint Commands): Mention clearing
|
||||||
|
the condition in the -break-condition command.
|
||||||
|
|
||||||
2021-07-02 Pedro Alves <pedro@palves.net>
|
2021-07-02 Pedro Alves <pedro@palves.net>
|
||||||
|
|
||||||
* gdb.texinfo (TUI): <TUI Mouse Support>: New node/section.
|
* gdb.texinfo (TUI): <TUI Mouse Support>: New node/section.
|
||||||
|
|||||||
@@ -26033,10 +26033,16 @@ Show the current state of styling.
|
|||||||
|
|
||||||
@item set style sources @samp{on|off}
|
@item set style sources @samp{on|off}
|
||||||
Enable or disable source code styling. This affects whether source
|
Enable or disable source code styling. This affects whether source
|
||||||
code, such as the output of the @code{list} command, is styled. Note
|
code, such as the output of the @code{list} command, is styled. The
|
||||||
that source styling only works if styling in general is enabled, and
|
default is @samp{on}. Note that source styling only works if styling
|
||||||
if @value{GDBN} was linked with the GNU Source Highlight library. The
|
in general is enabled, and if a source highlighting library is
|
||||||
default is @samp{on}.
|
available to @value{GDBN}.
|
||||||
|
|
||||||
|
There are two ways that highlighting can be done. First, if
|
||||||
|
@value{GDBN} was linked with the GNU Source Highlight library, then it
|
||||||
|
is used. Otherwise, if @value{GDBN} was configured with Python
|
||||||
|
scripting support, and if the Python Pygments package is available,
|
||||||
|
then it will be used.
|
||||||
|
|
||||||
@item show style sources
|
@item show style sources
|
||||||
Show the current state of source code styling.
|
Show the current state of source code styling.
|
||||||
@@ -30565,7 +30571,7 @@ times="0"@}
|
|||||||
@subsubheading Synopsis
|
@subsubheading Synopsis
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
-break-condition [ --force ] @var{number} @var{expr}
|
-break-condition [ --force ] @var{number} [ @var{expr} ]
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
Breakpoint @var{number} will stop the program only if the condition in
|
Breakpoint @var{number} will stop the program only if the condition in
|
||||||
@@ -30573,7 +30579,8 @@ Breakpoint @var{number} will stop the program only if the condition in
|
|||||||
@samp{-break-list} output (see the description of the @samp{-break-list}
|
@samp{-break-list} output (see the description of the @samp{-break-list}
|
||||||
command below). If the @samp{--force} flag is passed, the condition
|
command below). If the @samp{--force} flag is passed, the condition
|
||||||
is forcibly defined even when it is invalid for all locations of
|
is forcibly defined even when it is invalid for all locations of
|
||||||
breakpoint @var{number}.
|
breakpoint @var{number}. If the @var{expr} argument is omitted,
|
||||||
|
breakpoint @var{number} becomes unconditional.
|
||||||
|
|
||||||
@subsubheading @value{GDBN} Command
|
@subsubheading @value{GDBN} Command
|
||||||
|
|
||||||
|
|||||||
@@ -1639,6 +1639,73 @@ line_header_eq_voidp (const void *item_lhs, const void *item_rhs)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* An iterator for all_comp_units that is based on index. This
|
||||||
|
approach makes it possible to iterate over all_comp_units safely,
|
||||||
|
when some caller in the loop may add new units. */
|
||||||
|
|
||||||
|
class all_comp_units_iterator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
all_comp_units_iterator (dwarf2_per_bfd *per_bfd, bool start)
|
||||||
|
: m_per_bfd (per_bfd),
|
||||||
|
m_index (start ? 0 : per_bfd->all_comp_units.size ())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
all_comp_units_iterator &operator++ ()
|
||||||
|
{
|
||||||
|
++m_index;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
dwarf2_per_cu_data *operator* () const
|
||||||
|
{
|
||||||
|
return m_per_bfd->get_cu (m_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator== (const all_comp_units_iterator &other) const
|
||||||
|
{
|
||||||
|
return m_index == other.m_index;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool operator!= (const all_comp_units_iterator &other) const
|
||||||
|
{
|
||||||
|
return m_index != other.m_index;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
dwarf2_per_bfd *m_per_bfd;
|
||||||
|
size_t m_index;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* A range adapter for the all_comp_units_iterator. */
|
||||||
|
class all_comp_units_range
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
all_comp_units_range (dwarf2_per_bfd *per_bfd)
|
||||||
|
: m_per_bfd (per_bfd)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
all_comp_units_iterator begin ()
|
||||||
|
{
|
||||||
|
return all_comp_units_iterator (m_per_bfd, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
all_comp_units_iterator end ()
|
||||||
|
{
|
||||||
|
return all_comp_units_iterator (m_per_bfd, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
dwarf2_per_bfd *m_per_bfd;
|
||||||
|
};
|
||||||
|
|
||||||
/* See declaration. */
|
/* See declaration. */
|
||||||
|
|
||||||
dwarf2_per_bfd::dwarf2_per_bfd (bfd *obfd, const dwarf2_debug_sections *names,
|
dwarf2_per_bfd::dwarf2_per_bfd (bfd *obfd, const dwarf2_debug_sections *names,
|
||||||
@@ -1703,9 +1770,9 @@ private:
|
|||||||
bool
|
bool
|
||||||
dwarf2_per_objfile::symtab_set_p (const dwarf2_per_cu_data *per_cu) const
|
dwarf2_per_objfile::symtab_set_p (const dwarf2_per_cu_data *per_cu) const
|
||||||
{
|
{
|
||||||
gdb_assert (per_cu->index < this->m_symtabs.size ());
|
if (per_cu->index < this->m_symtabs.size ())
|
||||||
|
|
||||||
return this->m_symtabs[per_cu->index] != nullptr;
|
return this->m_symtabs[per_cu->index] != nullptr;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* See read.h. */
|
/* See read.h. */
|
||||||
@@ -1713,9 +1780,9 @@ dwarf2_per_objfile::symtab_set_p (const dwarf2_per_cu_data *per_cu) const
|
|||||||
compunit_symtab *
|
compunit_symtab *
|
||||||
dwarf2_per_objfile::get_symtab (const dwarf2_per_cu_data *per_cu) const
|
dwarf2_per_objfile::get_symtab (const dwarf2_per_cu_data *per_cu) const
|
||||||
{
|
{
|
||||||
gdb_assert (per_cu->index < this->m_symtabs.size ());
|
if (per_cu->index < this->m_symtabs.size ())
|
||||||
|
|
||||||
return this->m_symtabs[per_cu->index];
|
return this->m_symtabs[per_cu->index];
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* See read.h. */
|
/* See read.h. */
|
||||||
@@ -1724,9 +1791,9 @@ void
|
|||||||
dwarf2_per_objfile::set_symtab (const dwarf2_per_cu_data *per_cu,
|
dwarf2_per_objfile::set_symtab (const dwarf2_per_cu_data *per_cu,
|
||||||
compunit_symtab *symtab)
|
compunit_symtab *symtab)
|
||||||
{
|
{
|
||||||
gdb_assert (per_cu->index < this->m_symtabs.size ());
|
if (per_cu->index >= this->m_symtabs.size ())
|
||||||
|
this->m_symtabs.resize (per_cu->index + 1);
|
||||||
gdb_assert (this->m_symtabs[per_cu->index] == nullptr);
|
gdb_assert (this->m_symtabs[per_cu->index] == nullptr);
|
||||||
|
|
||||||
this->m_symtabs[per_cu->index] = symtab;
|
this->m_symtabs[per_cu->index] = symtab;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4321,11 +4388,12 @@ dwarf2_gdb_index::expand_symtabs_matching
|
|||||||
|
|
||||||
if (symbol_matcher == NULL && lookup_name == NULL)
|
if (symbol_matcher == NULL && lookup_name == NULL)
|
||||||
{
|
{
|
||||||
for (const auto &per_cu : per_objfile->per_bfd->all_comp_units)
|
for (dwarf2_per_cu_data *per_cu
|
||||||
|
: all_comp_units_range (per_objfile->per_bfd))
|
||||||
{
|
{
|
||||||
QUIT;
|
QUIT;
|
||||||
|
|
||||||
if (!dw2_expand_symtabs_matching_one (per_cu.get (), per_objfile,
|
if (!dw2_expand_symtabs_matching_one (per_cu, per_objfile,
|
||||||
file_matcher,
|
file_matcher,
|
||||||
expansion_notify))
|
expansion_notify))
|
||||||
return false;
|
return false;
|
||||||
@@ -4437,14 +4505,14 @@ dwarf2_base_index_functions::map_symbol_filenames
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto &per_cu : per_objfile->per_bfd->all_comp_units)
|
for (dwarf2_per_cu_data *per_cu
|
||||||
|
: all_comp_units_range (per_objfile->per_bfd))
|
||||||
{
|
{
|
||||||
/* We only need to look at symtabs not already expanded. */
|
/* We only need to look at symtabs not already expanded. */
|
||||||
if (per_objfile->symtab_set_p (per_cu.get ()))
|
if (per_cu->is_debug_types || per_objfile->symtab_set_p (per_cu))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
quick_file_names *file_data = dw2_get_file_names (per_cu.get (),
|
quick_file_names *file_data = dw2_get_file_names (per_cu, per_objfile);
|
||||||
per_objfile);
|
|
||||||
if (file_data == nullptr
|
if (file_data == nullptr
|
||||||
|| qfn_cache.find (file_data) != qfn_cache.end ())
|
|| qfn_cache.find (file_data) != qfn_cache.end ())
|
||||||
continue;
|
continue;
|
||||||
@@ -5309,11 +5377,12 @@ dwarf2_debug_names_index::expand_symtabs_matching
|
|||||||
|
|
||||||
if (symbol_matcher == NULL && lookup_name == NULL)
|
if (symbol_matcher == NULL && lookup_name == NULL)
|
||||||
{
|
{
|
||||||
for (const auto &per_cu : per_objfile->per_bfd->all_comp_units)
|
for (dwarf2_per_cu_data *per_cu
|
||||||
|
: all_comp_units_range (per_objfile->per_bfd))
|
||||||
{
|
{
|
||||||
QUIT;
|
QUIT;
|
||||||
|
|
||||||
if (!dw2_expand_symtabs_matching_one (per_cu.get (), per_objfile,
|
if (!dw2_expand_symtabs_matching_one (per_cu, per_objfile,
|
||||||
file_matcher,
|
file_matcher,
|
||||||
expansion_notify))
|
expansion_notify))
|
||||||
return false;
|
return false;
|
||||||
@@ -5421,7 +5490,6 @@ dwarf2_initialize_objfile (struct objfile *objfile)
|
|||||||
if (per_bfd->using_index)
|
if (per_bfd->using_index)
|
||||||
{
|
{
|
||||||
dwarf_read_debug_printf ("using_index already set");
|
dwarf_read_debug_printf ("using_index already set");
|
||||||
per_objfile->resize_symtabs ();
|
|
||||||
objfile->qf.push_front (make_dwarf_gdb_index ());
|
objfile->qf.push_front (make_dwarf_gdb_index ());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -5430,7 +5498,6 @@ dwarf2_initialize_objfile (struct objfile *objfile)
|
|||||||
create_all_comp_units (per_objfile);
|
create_all_comp_units (per_objfile);
|
||||||
per_bfd->quick_file_names_table
|
per_bfd->quick_file_names_table
|
||||||
= create_quick_file_names_table (per_bfd->all_comp_units.size ());
|
= create_quick_file_names_table (per_bfd->all_comp_units.size ());
|
||||||
per_objfile->resize_symtabs ();
|
|
||||||
|
|
||||||
for (int i = 0; i < per_bfd->all_comp_units.size (); ++i)
|
for (int i = 0; i < per_bfd->all_comp_units.size (); ++i)
|
||||||
{
|
{
|
||||||
@@ -5452,7 +5519,6 @@ dwarf2_initialize_objfile (struct objfile *objfile)
|
|||||||
if (per_bfd->debug_names_table != nullptr)
|
if (per_bfd->debug_names_table != nullptr)
|
||||||
{
|
{
|
||||||
dwarf_read_debug_printf ("re-using shared debug names table");
|
dwarf_read_debug_printf ("re-using shared debug names table");
|
||||||
per_objfile->resize_symtabs ();
|
|
||||||
objfile->qf.push_front (make_dwarf_debug_names ());
|
objfile->qf.push_front (make_dwarf_debug_names ());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -5462,7 +5528,6 @@ dwarf2_initialize_objfile (struct objfile *objfile)
|
|||||||
if (per_bfd->index_table != nullptr)
|
if (per_bfd->index_table != nullptr)
|
||||||
{
|
{
|
||||||
dwarf_read_debug_printf ("re-using shared index table");
|
dwarf_read_debug_printf ("re-using shared index table");
|
||||||
per_objfile->resize_symtabs ();
|
|
||||||
objfile->qf.push_front (make_dwarf_gdb_index ());
|
objfile->qf.push_front (make_dwarf_gdb_index ());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -5482,7 +5547,6 @@ dwarf2_initialize_objfile (struct objfile *objfile)
|
|||||||
if (dwarf2_read_debug_names (per_objfile))
|
if (dwarf2_read_debug_names (per_objfile))
|
||||||
{
|
{
|
||||||
dwarf_read_debug_printf ("found debug names");
|
dwarf_read_debug_printf ("found debug names");
|
||||||
per_objfile->resize_symtabs ();
|
|
||||||
objfile->qf.push_front (make_dwarf_debug_names ());
|
objfile->qf.push_front (make_dwarf_debug_names ());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -5492,7 +5556,6 @@ dwarf2_initialize_objfile (struct objfile *objfile)
|
|||||||
get_gdb_index_contents_from_section<dwz_file>))
|
get_gdb_index_contents_from_section<dwz_file>))
|
||||||
{
|
{
|
||||||
dwarf_read_debug_printf ("found gdb index from file");
|
dwarf_read_debug_printf ("found gdb index from file");
|
||||||
per_objfile->resize_symtabs ();
|
|
||||||
objfile->qf.push_front (make_dwarf_gdb_index ());
|
objfile->qf.push_front (make_dwarf_gdb_index ());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -5504,7 +5567,6 @@ dwarf2_initialize_objfile (struct objfile *objfile)
|
|||||||
{
|
{
|
||||||
dwarf_read_debug_printf ("found gdb index from cache");
|
dwarf_read_debug_printf ("found gdb index from cache");
|
||||||
global_index_cache.hit ();
|
global_index_cache.hit ();
|
||||||
per_objfile->resize_symtabs ();
|
|
||||||
objfile->qf.push_front (make_dwarf_gdb_index ());
|
objfile->qf.push_front (make_dwarf_gdb_index ());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -5534,7 +5596,6 @@ dwarf2_build_psymtabs (struct objfile *objfile, psymbol_functions *psf)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
psf->set_partial_symtabs (per_bfd->partial_symtabs);
|
psf->set_partial_symtabs (per_bfd->partial_symtabs);
|
||||||
per_objfile->resize_symtabs ();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5561,8 +5622,6 @@ dwarf2_build_psymtabs (struct objfile *objfile, psymbol_functions *psf)
|
|||||||
dwarf2_build_psymtabs_hard (per_objfile);
|
dwarf2_build_psymtabs_hard (per_objfile);
|
||||||
psymtabs.keep ();
|
psymtabs.keep ();
|
||||||
|
|
||||||
per_objfile->resize_symtabs ();
|
|
||||||
|
|
||||||
/* (maybe) store an index in the cache. */
|
/* (maybe) store an index in the cache. */
|
||||||
global_index_cache.store (per_objfile);
|
global_index_cache.store (per_objfile);
|
||||||
}
|
}
|
||||||
@@ -5904,8 +5963,6 @@ add_type_unit (dwarf2_per_objfile *per_objfile, ULONGEST sig, void **slot)
|
|||||||
= per_objfile->per_bfd->allocate_signatured_type (sig);
|
= per_objfile->per_bfd->allocate_signatured_type (sig);
|
||||||
signatured_type *sig_type = sig_type_holder.get ();
|
signatured_type *sig_type = sig_type_holder.get ();
|
||||||
|
|
||||||
per_objfile->resize_symtabs ();
|
|
||||||
|
|
||||||
per_objfile->per_bfd->all_comp_units.emplace_back
|
per_objfile->per_bfd->all_comp_units.emplace_back
|
||||||
(sig_type_holder.release ());
|
(sig_type_holder.release ());
|
||||||
if (per_objfile->per_bfd->using_index)
|
if (per_objfile->per_bfd->using_index)
|
||||||
@@ -13608,7 +13665,6 @@ dwarf2_rnglists_process (unsigned offset, struct dwarf2_cu *cu,
|
|||||||
/* Base address selection entry. */
|
/* Base address selection entry. */
|
||||||
gdb::optional<CORE_ADDR> base;
|
gdb::optional<CORE_ADDR> base;
|
||||||
const gdb_byte *buffer;
|
const gdb_byte *buffer;
|
||||||
CORE_ADDR baseaddr;
|
|
||||||
bool overflow = false;
|
bool overflow = false;
|
||||||
ULONGEST addr_index;
|
ULONGEST addr_index;
|
||||||
struct dwarf2_section_info *rnglists_section;
|
struct dwarf2_section_info *rnglists_section;
|
||||||
@@ -13625,8 +13681,6 @@ dwarf2_rnglists_process (unsigned offset, struct dwarf2_cu *cu,
|
|||||||
}
|
}
|
||||||
buffer = rnglists_section->buffer + offset;
|
buffer = rnglists_section->buffer + offset;
|
||||||
|
|
||||||
baseaddr = objfile->text_section_offset ();
|
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
/* Initialize it due to a false compiler warning. */
|
/* Initialize it due to a false compiler warning. */
|
||||||
@@ -13768,7 +13822,7 @@ dwarf2_rnglists_process (unsigned offset, struct dwarf2_cu *cu,
|
|||||||
|
|
||||||
/* A not-uncommon case of bad debug info.
|
/* A not-uncommon case of bad debug info.
|
||||||
Don't pollute the addrmap with bad data. */
|
Don't pollute the addrmap with bad data. */
|
||||||
if (range_beginning + baseaddr == 0
|
if (range_beginning == 0
|
||||||
&& !per_objfile->per_bfd->has_section_at_zero)
|
&& !per_objfile->per_bfd->has_section_at_zero)
|
||||||
{
|
{
|
||||||
complaint (_(".debug_rnglists entry has start address of zero"
|
complaint (_(".debug_rnglists entry has start address of zero"
|
||||||
@@ -13810,7 +13864,6 @@ dwarf2_ranges_process (unsigned offset, struct dwarf2_cu *cu, dwarf_tag tag,
|
|||||||
gdb::optional<CORE_ADDR> base;
|
gdb::optional<CORE_ADDR> base;
|
||||||
unsigned int dummy;
|
unsigned int dummy;
|
||||||
const gdb_byte *buffer;
|
const gdb_byte *buffer;
|
||||||
CORE_ADDR baseaddr;
|
|
||||||
|
|
||||||
if (cu_header->version >= 5)
|
if (cu_header->version >= 5)
|
||||||
return dwarf2_rnglists_process (offset, cu, tag, callback);
|
return dwarf2_rnglists_process (offset, cu, tag, callback);
|
||||||
@@ -13826,8 +13879,6 @@ dwarf2_ranges_process (unsigned offset, struct dwarf2_cu *cu, dwarf_tag tag,
|
|||||||
}
|
}
|
||||||
buffer = per_objfile->per_bfd->ranges.buffer + offset;
|
buffer = per_objfile->per_bfd->ranges.buffer + offset;
|
||||||
|
|
||||||
baseaddr = objfile->text_section_offset ();
|
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
CORE_ADDR range_beginning, range_end;
|
CORE_ADDR range_beginning, range_end;
|
||||||
@@ -13878,7 +13929,7 @@ dwarf2_ranges_process (unsigned offset, struct dwarf2_cu *cu, dwarf_tag tag,
|
|||||||
|
|
||||||
/* A not-uncommon case of bad debug info.
|
/* A not-uncommon case of bad debug info.
|
||||||
Don't pollute the addrmap with bad data. */
|
Don't pollute the addrmap with bad data. */
|
||||||
if (range_beginning + baseaddr == 0
|
if (range_beginning == 0
|
||||||
&& !per_objfile->per_bfd->has_section_at_zero)
|
&& !per_objfile->per_bfd->has_section_at_zero)
|
||||||
{
|
{
|
||||||
complaint (_(".debug_ranges entry has start address of zero"
|
complaint (_(".debug_ranges entry has start address of zero"
|
||||||
@@ -18231,7 +18282,22 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
|
|||||||
baton->locexpr.per_cu = cu->per_cu;
|
baton->locexpr.per_cu = cu->per_cu;
|
||||||
baton->locexpr.per_objfile = per_objfile;
|
baton->locexpr.per_objfile = per_objfile;
|
||||||
|
|
||||||
struct dwarf_block *block = attr->as_block ();
|
struct dwarf_block *block;
|
||||||
|
if (attr->form == DW_FORM_data16)
|
||||||
|
{
|
||||||
|
size_t data_size = 16;
|
||||||
|
block = XOBNEW (obstack, struct dwarf_block);
|
||||||
|
block->size = (data_size
|
||||||
|
+ 2 /* Extra bytes for DW_OP and arg. */);
|
||||||
|
gdb_byte *data = XOBNEWVEC (obstack, gdb_byte, block->size);
|
||||||
|
data[0] = DW_OP_implicit_value;
|
||||||
|
data[1] = data_size;
|
||||||
|
memcpy (&data[2], attr->as_block ()->data, data_size);
|
||||||
|
block->data = data;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
block = attr->as_block ();
|
||||||
|
|
||||||
baton->locexpr.size = block->size;
|
baton->locexpr.size = block->size;
|
||||||
baton->locexpr.data = block->data;
|
baton->locexpr.data = block->data;
|
||||||
switch (attr->name)
|
switch (attr->name)
|
||||||
|
|||||||
@@ -514,16 +514,6 @@ struct dwarf2_per_objfile
|
|||||||
const struct comp_unit_head *cu_header,
|
const struct comp_unit_head *cu_header,
|
||||||
unsigned int *bytes_read_ptr);
|
unsigned int *bytes_read_ptr);
|
||||||
|
|
||||||
/* Resize the M_SYMTABS vector to the needed size (the number of partial
|
|
||||||
symtabs allocated by the per-bfd). */
|
|
||||||
void resize_symtabs ()
|
|
||||||
{
|
|
||||||
/* The symtabs vector should only grow, not shrink. */
|
|
||||||
gdb_assert (per_bfd->all_comp_units.size () >= m_symtabs.size ());
|
|
||||||
|
|
||||||
m_symtabs.resize (per_bfd->all_comp_units.size ());
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Return true if the symtab corresponding to PER_CU has been set,
|
/* Return true if the symtab corresponding to PER_CU has been set,
|
||||||
false otherwise. */
|
false otherwise. */
|
||||||
bool symtab_set_p (const dwarf2_per_cu_data *per_cu) const;
|
bool symtab_set_p (const dwarf2_per_cu_data *per_cu) const;
|
||||||
|
|||||||
@@ -453,9 +453,8 @@ exec_file_attach (const char *filename, int from_tty)
|
|||||||
|
|
||||||
if (!current_program_space->exec_bfd ())
|
if (!current_program_space->exec_bfd ())
|
||||||
{
|
{
|
||||||
error (_("\"%ps\": could not open as an executable file: %s."),
|
error (_("\"%s\": could not open as an executable file: %s."),
|
||||||
styled_string (file_name_style.style (), scratch_pathname),
|
scratch_pathname, bfd_errmsg (bfd_get_error ()));
|
||||||
bfd_errmsg (bfd_get_error ()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* gdb_realpath_keepfile resolves symlinks on the local
|
/* gdb_realpath_keepfile resolves symlinks on the local
|
||||||
@@ -475,8 +474,7 @@ exec_file_attach (const char *filename, int from_tty)
|
|||||||
/* Make sure to close exec_bfd, or else "run" might try to use
|
/* Make sure to close exec_bfd, or else "run" might try to use
|
||||||
it. */
|
it. */
|
||||||
current_program_space->exec_close ();
|
current_program_space->exec_close ();
|
||||||
error (_("\"%ps\": not in executable format: %s"),
|
error (_("\"%s\": not in executable format: %s"), scratch_pathname,
|
||||||
styled_string (file_name_style.style (), scratch_pathname),
|
|
||||||
gdb_bfd_errmsg (bfd_get_error (), matching).c_str ());
|
gdb_bfd_errmsg (bfd_get_error (), matching).c_str ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ fbsd_nat_target::info_proc (const char *args, enum info_proc_what what)
|
|||||||
printf_filtered ("Parent process: %d\n", kp.ki_ppid);
|
printf_filtered ("Parent process: %d\n", kp.ki_ppid);
|
||||||
printf_filtered ("Process group: %d\n", kp.ki_pgid);
|
printf_filtered ("Process group: %d\n", kp.ki_pgid);
|
||||||
printf_filtered ("Session id: %d\n", kp.ki_sid);
|
printf_filtered ("Session id: %d\n", kp.ki_sid);
|
||||||
printf_filtered ("TTY: %ju\n", (uintmax_t) kp.ki_tdev);
|
printf_filtered ("TTY: %s\n", pulongest (kp.ki_tdev));
|
||||||
printf_filtered ("TTY owner process group: %d\n", kp.ki_tpgid);
|
printf_filtered ("TTY owner process group: %d\n", kp.ki_tpgid);
|
||||||
printf_filtered ("User IDs (real, effective, saved): %d %d %d\n",
|
printf_filtered ("User IDs (real, effective, saved): %d %d %d\n",
|
||||||
kp.ki_ruid, kp.ki_uid, kp.ki_svuid);
|
kp.ki_ruid, kp.ki_uid, kp.ki_svuid);
|
||||||
@@ -383,34 +383,35 @@ fbsd_nat_target::info_proc (const char *args, enum info_proc_what what)
|
|||||||
kp.ki_rusage.ru_majflt);
|
kp.ki_rusage.ru_majflt);
|
||||||
printf_filtered ("Major faults, children: %ld\n",
|
printf_filtered ("Major faults, children: %ld\n",
|
||||||
kp.ki_rusage_ch.ru_majflt);
|
kp.ki_rusage_ch.ru_majflt);
|
||||||
printf_filtered ("utime: %jd.%06ld\n",
|
printf_filtered ("utime: %s.%06ld\n",
|
||||||
(intmax_t) kp.ki_rusage.ru_utime.tv_sec,
|
plongest (kp.ki_rusage.ru_utime.tv_sec),
|
||||||
kp.ki_rusage.ru_utime.tv_usec);
|
kp.ki_rusage.ru_utime.tv_usec);
|
||||||
printf_filtered ("stime: %jd.%06ld\n",
|
printf_filtered ("stime: %s.%06ld\n",
|
||||||
(intmax_t) kp.ki_rusage.ru_stime.tv_sec,
|
plongest (kp.ki_rusage.ru_stime.tv_sec),
|
||||||
kp.ki_rusage.ru_stime.tv_usec);
|
kp.ki_rusage.ru_stime.tv_usec);
|
||||||
printf_filtered ("utime, children: %jd.%06ld\n",
|
printf_filtered ("utime, children: %s.%06ld\n",
|
||||||
(intmax_t) kp.ki_rusage_ch.ru_utime.tv_sec,
|
plongest (kp.ki_rusage_ch.ru_utime.tv_sec),
|
||||||
kp.ki_rusage_ch.ru_utime.tv_usec);
|
kp.ki_rusage_ch.ru_utime.tv_usec);
|
||||||
printf_filtered ("stime, children: %jd.%06ld\n",
|
printf_filtered ("stime, children: %s.%06ld\n",
|
||||||
(intmax_t) kp.ki_rusage_ch.ru_stime.tv_sec,
|
plongest (kp.ki_rusage_ch.ru_stime.tv_sec),
|
||||||
kp.ki_rusage_ch.ru_stime.tv_usec);
|
kp.ki_rusage_ch.ru_stime.tv_usec);
|
||||||
printf_filtered ("'nice' value: %d\n", kp.ki_nice);
|
printf_filtered ("'nice' value: %d\n", kp.ki_nice);
|
||||||
printf_filtered ("Start time: %jd.%06ld\n", kp.ki_start.tv_sec,
|
printf_filtered ("Start time: %s.%06ld\n",
|
||||||
|
plongest (kp.ki_start.tv_sec),
|
||||||
kp.ki_start.tv_usec);
|
kp.ki_start.tv_usec);
|
||||||
pgtok = getpagesize () / 1024;
|
pgtok = getpagesize () / 1024;
|
||||||
printf_filtered ("Virtual memory size: %ju kB\n",
|
printf_filtered ("Virtual memory size: %s kB\n",
|
||||||
(uintmax_t) kp.ki_size / 1024);
|
pulongest (kp.ki_size / 1024));
|
||||||
printf_filtered ("Data size: %ju kB\n",
|
printf_filtered ("Data size: %s kB\n",
|
||||||
(uintmax_t) kp.ki_dsize * pgtok);
|
pulongest (kp.ki_dsize * pgtok));
|
||||||
printf_filtered ("Stack size: %ju kB\n",
|
printf_filtered ("Stack size: %s kB\n",
|
||||||
(uintmax_t) kp.ki_ssize * pgtok);
|
pulongest (kp.ki_ssize * pgtok));
|
||||||
printf_filtered ("Text size: %ju kB\n",
|
printf_filtered ("Text size: %s kB\n",
|
||||||
(uintmax_t) kp.ki_tsize * pgtok);
|
pulongest (kp.ki_tsize * pgtok));
|
||||||
printf_filtered ("Resident set size: %ju kB\n",
|
printf_filtered ("Resident set size: %s kB\n",
|
||||||
(uintmax_t) kp.ki_rssize * pgtok);
|
pulongest (kp.ki_rssize * pgtok));
|
||||||
printf_filtered ("Maximum RSS: %ju kB\n",
|
printf_filtered ("Maximum RSS: %s kB\n",
|
||||||
(uintmax_t) kp.ki_rusage.ru_maxrss);
|
pulongest (kp.ki_rusage.ru_maxrss));
|
||||||
printf_filtered ("Pending Signals: ");
|
printf_filtered ("Pending Signals: ");
|
||||||
for (int i = 0; i < _SIG_WORDS; i++)
|
for (int i = 0; i < _SIG_WORDS; i++)
|
||||||
printf_filtered ("%08x ", kp.ki_siglist.__bits[i]);
|
printf_filtered ("%08x ", kp.ki_siglist.__bits[i]);
|
||||||
|
|||||||
@@ -170,7 +170,8 @@ XMLTOC = \
|
|||||||
s390x-tevx-linux64.xml \
|
s390x-tevx-linux64.xml \
|
||||||
s390x-vx-linux64.xml \
|
s390x-vx-linux64.xml \
|
||||||
s390-gs-linux64.xml \
|
s390-gs-linux64.xml \
|
||||||
s390x-gs-linux64.xml
|
s390x-gs-linux64.xml \
|
||||||
|
z80.xml
|
||||||
|
|
||||||
TDESC_CFILES = $(patsubst %.xml,%.c,$(XMLTOC))
|
TDESC_CFILES = $(patsubst %.xml,%.c,$(XMLTOC))
|
||||||
GDB = false
|
GDB = false
|
||||||
|
|||||||
33
gdb/features/z80-cpu.xml
Normal file
33
gdb/features/z80-cpu.xml
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- Copyright (C) 2020 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
Copying and distribution of this file, with or without modification,
|
||||||
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
notice and this notice are preserved. -->
|
||||||
|
|
||||||
|
<!DOCTYPE feature SYSTEM "gdb-target.dtd">
|
||||||
|
<feature name="org.gnu.gdb.z80.cpu">
|
||||||
|
<flags id="af_flags" size="2">
|
||||||
|
<field name="C" start="0" end="0"/>
|
||||||
|
<field name="N" start="1" end="1"/>
|
||||||
|
<field name="P/V" start="2" end="2"/>
|
||||||
|
<field name="F3" start="3" end="3"/>
|
||||||
|
<field name="H" start="4" end="4"/>
|
||||||
|
<field name="F5" start="5" end="5"/>
|
||||||
|
<field name="Z" start="6" end="6"/>
|
||||||
|
<field name="S" start="7" end="7"/>
|
||||||
|
</flags>
|
||||||
|
<reg name="af" bitsize="16" type="af_flags"/>
|
||||||
|
<reg name="bc" bitsize="16" type="uint16"/>
|
||||||
|
<reg name="de" bitsize="16" type="data_ptr"/>
|
||||||
|
<reg name="hl" bitsize="16" type="data_ptr"/>
|
||||||
|
<reg name="sp" bitsize="16" type="data_ptr" />
|
||||||
|
<reg name="pc" bitsize="32" type="code_ptr" />
|
||||||
|
<reg name="ix" bitsize="16" type="data_ptr"/>
|
||||||
|
<reg name="iy" bitsize="16" type="data_ptr"/>
|
||||||
|
<reg name="af'" bitsize="16" type="af_flags"/>
|
||||||
|
<reg name="bc'" bitsize="16" type="uint16"/>
|
||||||
|
<reg name="de'" bitsize="16" type="data_ptr"/>
|
||||||
|
<reg name="hl'" bitsize="16" type="data_ptr"/>
|
||||||
|
<reg name="ir" bitsize="16" type="uint16"/>
|
||||||
|
</feature>
|
||||||
44
gdb/features/z80.c
Normal file
44
gdb/features/z80.c
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
|
||||||
|
Original: z80.xml */
|
||||||
|
|
||||||
|
#include "defs.h"
|
||||||
|
#include "osabi.h"
|
||||||
|
#include "target-descriptions.h"
|
||||||
|
|
||||||
|
struct target_desc *tdesc_z80;
|
||||||
|
static void
|
||||||
|
initialize_tdesc_z80 (void)
|
||||||
|
{
|
||||||
|
target_desc_up result = allocate_target_description ();
|
||||||
|
set_tdesc_architecture (result.get (), bfd_scan_arch ("z80"));
|
||||||
|
|
||||||
|
struct tdesc_feature *feature;
|
||||||
|
|
||||||
|
feature = tdesc_create_feature (result.get (), "org.gnu.gdb.z80.cpu");
|
||||||
|
tdesc_type_with_fields *type_with_fields;
|
||||||
|
type_with_fields = tdesc_create_flags (feature, "af_flags", 2);
|
||||||
|
tdesc_add_flag (type_with_fields, 0, "C");
|
||||||
|
tdesc_add_flag (type_with_fields, 1, "N");
|
||||||
|
tdesc_add_flag (type_with_fields, 2, "P/V");
|
||||||
|
tdesc_add_flag (type_with_fields, 3, "F3");
|
||||||
|
tdesc_add_flag (type_with_fields, 4, "H");
|
||||||
|
tdesc_add_flag (type_with_fields, 5, "F5");
|
||||||
|
tdesc_add_flag (type_with_fields, 6, "Z");
|
||||||
|
tdesc_add_flag (type_with_fields, 7, "S");
|
||||||
|
|
||||||
|
tdesc_create_reg (feature, "af", 0, 1, NULL, 16, "af_flags");
|
||||||
|
tdesc_create_reg (feature, "bc", 1, 1, NULL, 16, "uint16");
|
||||||
|
tdesc_create_reg (feature, "de", 2, 1, NULL, 16, "data_ptr");
|
||||||
|
tdesc_create_reg (feature, "hl", 3, 1, NULL, 16, "data_ptr");
|
||||||
|
tdesc_create_reg (feature, "sp", 4, 1, NULL, 16, "data_ptr");
|
||||||
|
tdesc_create_reg (feature, "pc", 5, 1, NULL, 32, "code_ptr");
|
||||||
|
tdesc_create_reg (feature, "ix", 6, 1, NULL, 16, "data_ptr");
|
||||||
|
tdesc_create_reg (feature, "iy", 7, 1, NULL, 16, "data_ptr");
|
||||||
|
tdesc_create_reg (feature, "af'", 8, 1, NULL, 16, "af_flags");
|
||||||
|
tdesc_create_reg (feature, "bc'", 9, 1, NULL, 16, "uint16");
|
||||||
|
tdesc_create_reg (feature, "de'", 10, 1, NULL, 16, "data_ptr");
|
||||||
|
tdesc_create_reg (feature, "hl'", 11, 1, NULL, 16, "data_ptr");
|
||||||
|
tdesc_create_reg (feature, "ir", 12, 1, NULL, 16, "uint16");
|
||||||
|
|
||||||
|
tdesc_z80 = result.release ();
|
||||||
|
}
|
||||||
12
gdb/features/z80.xml
Normal file
12
gdb/features/z80.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- Copyright (C) 2020 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
Copying and distribution of this file, with or without modification,
|
||||||
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
notice and this notice are preserved. -->
|
||||||
|
|
||||||
|
<!DOCTYPE target SYSTEM "gdb-target.dtd">
|
||||||
|
<target>
|
||||||
|
<architecture>z80</architecture>
|
||||||
|
<xi:include href="z80-cpu.xml"/>
|
||||||
|
</target>
|
||||||
@@ -423,6 +423,15 @@ gdb_bfd_iovec_fileio_pread (struct bfd *abfd, void *stream, void *buf,
|
|||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Warn that it wasn't possible to close a bfd for file NAME, because
|
||||||
|
of REASON. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
gdb_bfd_close_warning (const char *name, const char *reason)
|
||||||
|
{
|
||||||
|
warning (_("cannot close \"%s\": %s"), name, reason);
|
||||||
|
}
|
||||||
|
|
||||||
/* Wrapper for target_fileio_close suitable for passing as the
|
/* Wrapper for target_fileio_close suitable for passing as the
|
||||||
CLOSE_FUNC argument to gdb_bfd_openr_iovec. */
|
CLOSE_FUNC argument to gdb_bfd_openr_iovec. */
|
||||||
|
|
||||||
@@ -436,7 +445,16 @@ gdb_bfd_iovec_fileio_close (struct bfd *abfd, void *stream)
|
|||||||
|
|
||||||
/* Ignore errors on close. These may happen with remote
|
/* Ignore errors on close. These may happen with remote
|
||||||
targets if the connection has already been torn down. */
|
targets if the connection has already been torn down. */
|
||||||
|
try
|
||||||
|
{
|
||||||
target_fileio_close (fd, &target_errno);
|
target_fileio_close (fd, &target_errno);
|
||||||
|
}
|
||||||
|
catch (const gdb_exception &ex)
|
||||||
|
{
|
||||||
|
/* Also avoid crossing exceptions over bfd. */
|
||||||
|
gdb_bfd_close_warning (bfd_get_filename (abfd),
|
||||||
|
ex.message->c_str ());
|
||||||
|
}
|
||||||
|
|
||||||
/* Zero means success. */
|
/* Zero means success. */
|
||||||
return 0;
|
return 0;
|
||||||
@@ -626,8 +644,8 @@ gdb_bfd_close_or_warn (struct bfd *abfd)
|
|||||||
ret = bfd_close (abfd);
|
ret = bfd_close (abfd);
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
warning (_("cannot close \"%s\": %s"),
|
gdb_bfd_close_warning (name,
|
||||||
name, bfd_errmsg (bfd_get_error ()));
|
bfd_errmsg (bfd_get_error ()));
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -730,7 +730,8 @@ typedef std::string (gdbarch_memtag_to_string_ftype) (struct gdbarch *gdbarch, s
|
|||||||
extern std::string gdbarch_memtag_to_string (struct gdbarch *gdbarch, struct value *tag);
|
extern std::string gdbarch_memtag_to_string (struct gdbarch *gdbarch, struct value *tag);
|
||||||
extern void set_gdbarch_memtag_to_string (struct gdbarch *gdbarch, gdbarch_memtag_to_string_ftype *memtag_to_string);
|
extern void set_gdbarch_memtag_to_string (struct gdbarch *gdbarch, gdbarch_memtag_to_string_ftype *memtag_to_string);
|
||||||
|
|
||||||
/* Return true if ADDRESS contains a tag and false otherwise. */
|
/* Return true if ADDRESS contains a tag and false otherwise. ADDRESS
|
||||||
|
must be either a pointer or a reference type. */
|
||||||
|
|
||||||
typedef bool (gdbarch_tagged_address_p_ftype) (struct gdbarch *gdbarch, struct value *address);
|
typedef bool (gdbarch_tagged_address_p_ftype) (struct gdbarch *gdbarch, struct value *address);
|
||||||
extern bool gdbarch_tagged_address_p (struct gdbarch *gdbarch, struct value *address);
|
extern bool gdbarch_tagged_address_p (struct gdbarch *gdbarch, struct value *address);
|
||||||
|
|||||||
@@ -608,7 +608,8 @@ v;int;significant_addr_bit;;;;;;0
|
|||||||
# Return a string representation of the memory tag TAG.
|
# Return a string representation of the memory tag TAG.
|
||||||
m;std::string;memtag_to_string;struct value *tag;tag;;default_memtag_to_string;;0
|
m;std::string;memtag_to_string;struct value *tag;tag;;default_memtag_to_string;;0
|
||||||
|
|
||||||
# Return true if ADDRESS contains a tag and false otherwise.
|
# Return true if ADDRESS contains a tag and false otherwise. ADDRESS
|
||||||
|
# must be either a pointer or a reference type.
|
||||||
m;bool;tagged_address_p;struct value *address;address;;default_tagged_address_p;;0
|
m;bool;tagged_address_p;struct value *address;address;;default_tagged_address_p;;0
|
||||||
|
|
||||||
# Return true if the tag from ADDRESS matches the memory tag for that
|
# Return true if the tag from ADDRESS matches the memory tag for that
|
||||||
|
|||||||
@@ -6093,7 +6093,7 @@ gdbtypes_post_init (struct gdbarch *gdbarch)
|
|||||||
builtin_type->builtin_string
|
builtin_type->builtin_string
|
||||||
= arch_type (gdbarch, TYPE_CODE_STRING, TARGET_CHAR_BIT, "string");
|
= arch_type (gdbarch, TYPE_CODE_STRING, TARGET_CHAR_BIT, "string");
|
||||||
builtin_type->builtin_bool
|
builtin_type->builtin_bool
|
||||||
= arch_type (gdbarch, TYPE_CODE_BOOL, TARGET_CHAR_BIT, "bool");
|
= arch_boolean_type (gdbarch, TARGET_CHAR_BIT, 1, "bool");
|
||||||
|
|
||||||
/* The following three are about decimal floating point types, which
|
/* The following three are about decimal floating point types, which
|
||||||
are 32-bits, 64-bits and 128-bits respectively. */
|
are 32-bits, 64-bits and 128-bits respectively. */
|
||||||
|
|||||||
@@ -825,8 +825,8 @@ public:
|
|||||||
|
|
||||||
int parser (struct parser_state *ps) const override
|
int parser (struct parser_state *ps) const override
|
||||||
{
|
{
|
||||||
/* No parsing is done, just claim success. */
|
error (_("expression parsing not implemented for language \"%s\""),
|
||||||
return 1;
|
natural_name ());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* See language.h. */
|
/* See language.h. */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Copyright (C) 2013-2021 Free Software Foundation, Inc.
|
# Copyright (C) 2013-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -423,20 +423,19 @@ mi_cmd_break_condition (const char *command, char **argv, int argc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* There must be at least two more args: a bpnum and a condition
|
/* There must be at least one more arg: a bpnum. */
|
||||||
expression. */
|
if (oind >= argc)
|
||||||
if (oind + 1 >= argc)
|
error (_("-break-condition: Missing the <number> argument"));
|
||||||
error (_("-break-condition: Missing the <number> and/or <expr> "
|
|
||||||
"argument"));
|
|
||||||
|
|
||||||
int bpnum = atoi (argv[oind]);
|
int bpnum = atoi (argv[oind]);
|
||||||
|
|
||||||
/* The rest form the condition expr. */
|
/* The rest form the condition expr. */
|
||||||
std::string expr (argv[oind + 1]);
|
std::string expr = "";
|
||||||
for (int i = oind + 2; i < argc; ++i)
|
for (int i = oind + 1; i < argc; ++i)
|
||||||
{
|
{
|
||||||
expr += " ";
|
|
||||||
expr += argv[i];
|
expr += argv[i];
|
||||||
|
if (i + 1 < argc)
|
||||||
|
expr += " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
set_breakpoint_condition (bpnum, expr.c_str (), 0 /* from_tty */,
|
set_breakpoint_condition (bpnum, expr.c_str (), 0 /* from_tty */,
|
||||||
|
|||||||
@@ -383,6 +383,9 @@ mi_cmd_exec_interrupt (const char *command, char **argv, int argc)
|
|||||||
{
|
{
|
||||||
struct inferior *inf = find_inferior_id (current_context->thread_group);
|
struct inferior *inf = find_inferior_id (current_context->thread_group);
|
||||||
|
|
||||||
|
scoped_disable_commit_resumed disable_commit_resumed
|
||||||
|
("interrupting all threads of thread group");
|
||||||
|
|
||||||
iterate_over_threads (interrupt_thread_callback, &inf->pid);
|
iterate_over_threads (interrupt_thread_callback, &inf->pid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -520,7 +520,7 @@ nbsd_get_siginfo_type (struct gdbarch *gdbarch)
|
|||||||
return siginfo_type;
|
return siginfo_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* See nbsd-tdep.h. */
|
/* See netbsd-tdep.h. */
|
||||||
|
|
||||||
void
|
void
|
||||||
nbsd_info_proc_mappings_header (int addr_bit)
|
nbsd_info_proc_mappings_header (int addr_bit)
|
||||||
@@ -607,7 +607,7 @@ nbsd_get_syscall_number (struct gdbarch *gdbarch, thread_info *thread)
|
|||||||
internal_error (__FILE__, __LINE__, _("nbsd_get_sycall_number called"));
|
internal_error (__FILE__, __LINE__, _("nbsd_get_sycall_number called"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* See nbsd-tdep.h. */
|
/* See netbsd-tdep.h. */
|
||||||
|
|
||||||
void
|
void
|
||||||
nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||||
|
|||||||
@@ -1265,20 +1265,27 @@ print_value (value *val, const value_print_options &opts)
|
|||||||
|
|
||||||
static bool
|
static bool
|
||||||
should_validate_memtags (struct value *value)
|
should_validate_memtags (struct value *value)
|
||||||
{
|
|
||||||
if (target_supports_memory_tagging ()
|
|
||||||
&& gdbarch_tagged_address_p (target_gdbarch (), value))
|
|
||||||
{
|
{
|
||||||
gdb_assert (value != nullptr && value_type (value) != nullptr);
|
gdb_assert (value != nullptr && value_type (value) != nullptr);
|
||||||
|
|
||||||
|
if (!target_supports_memory_tagging ())
|
||||||
|
return false;
|
||||||
|
|
||||||
enum type_code code = value_type (value)->code ();
|
enum type_code code = value_type (value)->code ();
|
||||||
|
|
||||||
return (code == TYPE_CODE_PTR
|
/* Skip non-address values. */
|
||||||
|| code == TYPE_CODE_REF
|
if (code != TYPE_CODE_PTR
|
||||||
|| code == TYPE_CODE_METHODPTR
|
&& !TYPE_IS_REFERENCE (value_type (value)))
|
||||||
|| code == TYPE_CODE_MEMBERPTR);
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
/* OK, we have an address value. Check we have a complete value we
|
||||||
|
can extract. */
|
||||||
|
if (value_optimized_out (value)
|
||||||
|
|| !value_entirely_available (value))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/* We do. Check whether it includes any tags. */
|
||||||
|
return gdbarch_tagged_address_p (target_gdbarch (), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Helper for parsing arguments for print_command_1. */
|
/* Helper for parsing arguments for print_command_1. */
|
||||||
@@ -1321,7 +1328,11 @@ print_command_1 (const char *args, int voidprint)
|
|||||||
value_type (val)->code () != TYPE_CODE_VOID))
|
value_type (val)->code () != TYPE_CODE_VOID))
|
||||||
{
|
{
|
||||||
/* If memory tagging validation is on, check if the tag is valid. */
|
/* If memory tagging validation is on, check if the tag is valid. */
|
||||||
if (print_opts.memory_tag_violations && should_validate_memtags (val)
|
if (print_opts.memory_tag_violations)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (should_validate_memtags (val)
|
||||||
&& !gdbarch_memtag_matches_p (target_gdbarch (), val))
|
&& !gdbarch_memtag_matches_p (target_gdbarch (), val))
|
||||||
{
|
{
|
||||||
/* Fetch the logical tag. */
|
/* Fetch the logical tag. */
|
||||||
@@ -1341,6 +1352,18 @@ print_command_1 (const char *args, int voidprint)
|
|||||||
"allocation tag (%s).\n"),
|
"allocation tag (%s).\n"),
|
||||||
ltag.c_str (), atag.c_str ());
|
ltag.c_str (), atag.c_str ());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (gdb_exception_error &ex)
|
||||||
|
{
|
||||||
|
if (ex.error == TARGET_CLOSE_ERROR)
|
||||||
|
throw;
|
||||||
|
|
||||||
|
fprintf_filtered (gdb_stderr,
|
||||||
|
_("Could not validate memory tag: %s\n"),
|
||||||
|
ex.message->c_str ());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
print_value (val, print_opts);
|
print_value (val, print_opts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5624,6 +5624,15 @@ remote_unpush_target (remote_target *target)
|
|||||||
pop_all_targets_at_and_above (process_stratum);
|
pop_all_targets_at_and_above (process_stratum);
|
||||||
generic_mourn_inferior ();
|
generic_mourn_inferior ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Don't rely on target_close doing this when the target is popped
|
||||||
|
from the last remote inferior above, because something may be
|
||||||
|
holding a reference to the target higher up on the stack, meaning
|
||||||
|
target_close won't be called yet. We lost the connection to the
|
||||||
|
target, so clear these now, otherwise we may later throw
|
||||||
|
TARGET_CLOSE_ERROR while trying to tell the remote target to
|
||||||
|
close the file. */
|
||||||
|
fileio_handles_invalidate_target (target);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@@ -1120,7 +1120,7 @@ s390_linux_init_abi_any (struct gdbarch_info info, struct gdbarch *gdbarch)
|
|||||||
|
|
||||||
tdep->s390_syscall_record = s390_linux_syscall_record;
|
tdep->s390_syscall_record = s390_linux_syscall_record;
|
||||||
|
|
||||||
linux_init_abi (info, gdbarch, 0);
|
linux_init_abi (info, gdbarch, 1);
|
||||||
|
|
||||||
/* Register handling. */
|
/* Register handling. */
|
||||||
set_gdbarch_core_read_description (gdbarch, s390_core_read_description);
|
set_gdbarch_core_read_description (gdbarch, s390_core_read_description);
|
||||||
|
|||||||
@@ -7050,10 +7050,6 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
|||||||
set_gdbarch_displaced_step_copy_insn (gdbarch,
|
set_gdbarch_displaced_step_copy_insn (gdbarch,
|
||||||
s390_displaced_step_copy_insn);
|
s390_displaced_step_copy_insn);
|
||||||
set_gdbarch_displaced_step_fixup (gdbarch, s390_displaced_step_fixup);
|
set_gdbarch_displaced_step_fixup (gdbarch, s390_displaced_step_fixup);
|
||||||
set_gdbarch_displaced_step_prepare (gdbarch, linux_displaced_step_prepare);
|
|
||||||
set_gdbarch_displaced_step_finish (gdbarch, linux_displaced_step_finish);
|
|
||||||
set_gdbarch_displaced_step_restore_all_in_ptid
|
|
||||||
(gdbarch, linux_displaced_step_restore_all_in_ptid);
|
|
||||||
set_gdbarch_displaced_step_hw_singlestep (gdbarch, s390_displaced_step_hw_singlestep);
|
set_gdbarch_displaced_step_hw_singlestep (gdbarch, s390_displaced_step_hw_singlestep);
|
||||||
set_gdbarch_software_single_step (gdbarch, s390_software_single_step);
|
set_gdbarch_software_single_step (gdbarch, s390_software_single_step);
|
||||||
set_gdbarch_max_insn_length (gdbarch, S390_MAX_INSTR_SIZE);
|
set_gdbarch_max_insn_length (gdbarch, S390_MAX_INSTR_SIZE);
|
||||||
|
|||||||
@@ -504,6 +504,10 @@ darwin_solib_read_all_image_info_addr (struct darwin_info *info)
|
|||||||
static void
|
static void
|
||||||
darwin_solib_create_inferior_hook (int from_tty)
|
darwin_solib_create_inferior_hook (int from_tty)
|
||||||
{
|
{
|
||||||
|
/* Everything below only makes sense if we have a running inferior. */
|
||||||
|
if (!target_has_execution ())
|
||||||
|
return;
|
||||||
|
|
||||||
struct darwin_info *info = get_darwin_info ();
|
struct darwin_info *info = get_darwin_info ();
|
||||||
CORE_ADDR load_addr;
|
CORE_ADDR load_addr;
|
||||||
|
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ extern int sparc_is_annulled_branch_insn (CORE_ADDR pc);
|
|||||||
extern const struct sparc_gregmap sparc32_sol2_gregmap;
|
extern const struct sparc_gregmap sparc32_sol2_gregmap;
|
||||||
extern const struct sparc_fpregmap sparc32_sol2_fpregmap;
|
extern const struct sparc_fpregmap sparc32_sol2_fpregmap;
|
||||||
|
|
||||||
/* Functions and variables exported from sparcnbsd-tdep.c. */
|
/* Functions and variables exported from sparc-netbsd-tdep.c. */
|
||||||
|
|
||||||
/* Register offsets for NetBSD. */
|
/* Register offsets for NetBSD. */
|
||||||
extern const struct sparc_gregmap sparc32nbsd_gregmap;
|
extern const struct sparc_gregmap sparc32nbsd_gregmap;
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
2021-07-17 Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
||||||
|
|
||||||
|
* z80-stub.c: New file.
|
||||||
|
|
||||||
2020-04-28 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
|
2020-04-28 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
|
||||||
|
|
||||||
* ia64vms-stub.c: Fix typo in comment (thead -> thread).
|
* ia64vms-stub.c: Fix typo in comment (thead -> thread).
|
||||||
|
|||||||
1355
gdb/stubs/z80-stub.c
Normal file
1355
gdb/stubs/z80-stub.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -4242,6 +4242,8 @@ info_sources_filter::matches (const char *fullname) const
|
|||||||
case match_on::FULLNAME:
|
case match_on::FULLNAME:
|
||||||
to_match = fullname;
|
to_match = fullname;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
gdb_assert_not_reached ("bad m_match_type");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_c_regexp->exec (to_match, 0, NULL, 0) != 0)
|
if (m_c_regexp->exec (to_match, 0, NULL, 0) != 0)
|
||||||
|
|||||||
@@ -105,6 +105,7 @@
|
|||||||
<syscall name="compat_43_osethostname" number="88"/>
|
<syscall name="compat_43_osethostname" number="88"/>
|
||||||
<syscall name="compat_43_ogetdtablesize" number="89"/>
|
<syscall name="compat_43_ogetdtablesize" number="89"/>
|
||||||
<syscall name="dup2" number="90"/>
|
<syscall name="dup2" number="90"/>
|
||||||
|
<syscall name="getrandom" number="91"/>
|
||||||
<syscall name="fcntl" number="92"/>
|
<syscall name="fcntl" number="92"/>
|
||||||
<syscall name="compat_50_select" number="93"/>
|
<syscall name="compat_50_select" number="93"/>
|
||||||
<syscall name="fsync" number="95"/>
|
<syscall name="fsync" number="95"/>
|
||||||
@@ -171,6 +172,9 @@
|
|||||||
<syscall name="compat_09_osetdomainname" number="163"/>
|
<syscall name="compat_09_osetdomainname" number="163"/>
|
||||||
<syscall name="compat_09_ouname" number="164"/>
|
<syscall name="compat_09_ouname" number="164"/>
|
||||||
<syscall name="sysarch" number="165"/>
|
<syscall name="sysarch" number="165"/>
|
||||||
|
<syscall name="__futex" number="166"/>
|
||||||
|
<syscall name="__futex_set_robust_list" number="167"/>
|
||||||
|
<syscall name="__futex_get_robust_list" number="168"/>
|
||||||
<syscall name="compat_10_osemsys" number="169"/>
|
<syscall name="compat_10_osemsys" number="169"/>
|
||||||
<syscall name="compat_10_omsgsys" number="170"/>
|
<syscall name="compat_10_omsgsys" number="170"/>
|
||||||
<syscall name="compat_10_oshmsys" number="171"/>
|
<syscall name="compat_10_oshmsys" number="171"/>
|
||||||
@@ -310,7 +314,6 @@
|
|||||||
<syscall name="_lwp_setname" number="323"/>
|
<syscall name="_lwp_setname" number="323"/>
|
||||||
<syscall name="_lwp_getname" number="324"/>
|
<syscall name="_lwp_getname" number="324"/>
|
||||||
<syscall name="_lwp_ctl" number="325"/>
|
<syscall name="_lwp_ctl" number="325"/>
|
||||||
<syscall name="_lwp_gettid" number="326"/>
|
|
||||||
<syscall name="compat_60_sa_register" number="330"/>
|
<syscall name="compat_60_sa_register" number="330"/>
|
||||||
<syscall name="compat_60_sa_stacks" number="331"/>
|
<syscall name="compat_60_sa_stacks" number="331"/>
|
||||||
<syscall name="compat_60_sa_enable" number="332"/>
|
<syscall name="compat_60_sa_enable" number="332"/>
|
||||||
@@ -458,4 +461,17 @@
|
|||||||
<syscall name="__statvfs190" number="484"/>
|
<syscall name="__statvfs190" number="484"/>
|
||||||
<syscall name="__fstatvfs190" number="485"/>
|
<syscall name="__fstatvfs190" number="485"/>
|
||||||
<syscall name="__fhstatvfs190" number="486"/>
|
<syscall name="__fhstatvfs190" number="486"/>
|
||||||
|
<syscall name="__acl_get_link" number="487"/>
|
||||||
|
<syscall name="__acl_set_link" number="488"/>
|
||||||
|
<syscall name="__acl_delete_link" number="489"/>
|
||||||
|
<syscall name="__acl_aclcheck_link" number="490"/>
|
||||||
|
<syscall name="__acl_get_file" number="491"/>
|
||||||
|
<syscall name="__acl_set_file" number="492"/>
|
||||||
|
<syscall name="__acl_get_fd" number="493"/>
|
||||||
|
<syscall name="__acl_set_fd" number="494"/>
|
||||||
|
<syscall name="__acl_delete_file" number="495"/>
|
||||||
|
<syscall name="__acl_delete_fd" number="496"/>
|
||||||
|
<syscall name="__acl_aclcheck_file" number="497"/>
|
||||||
|
<syscall name="__acl_aclcheck_fd" number="498"/>
|
||||||
|
<syscall name="lpathconf" number="499"/>
|
||||||
</syscalls_info>
|
</syscalls_info>
|
||||||
|
|||||||
@@ -3121,13 +3121,9 @@ static std::vector<fileio_fh_t> fileio_fhandles;
|
|||||||
list each time a new file is opened. */
|
list each time a new file is opened. */
|
||||||
static int lowest_closed_fd;
|
static int lowest_closed_fd;
|
||||||
|
|
||||||
/* Invalidate the target associated with open handles that were open
|
/* See target.h. */
|
||||||
on target TARG, since we're about to close (and maybe destroy) the
|
|
||||||
target. The handles remain open from the client's perspective, but
|
|
||||||
trying to do anything with them other than closing them will fail
|
|
||||||
with EIO. */
|
|
||||||
|
|
||||||
static void
|
void
|
||||||
fileio_handles_invalidate_target (target_ops *targ)
|
fileio_handles_invalidate_target (target_ops *targ)
|
||||||
{
|
{
|
||||||
for (fileio_fh_t &fh : fileio_fhandles)
|
for (fileio_fh_t &fh : fileio_fhandles)
|
||||||
|
|||||||
@@ -2230,6 +2230,12 @@ extern LONGEST target_fileio_read_alloc (struct inferior *inf,
|
|||||||
extern gdb::unique_xmalloc_ptr<char> target_fileio_read_stralloc
|
extern gdb::unique_xmalloc_ptr<char> target_fileio_read_stralloc
|
||||||
(struct inferior *inf, const char *filename);
|
(struct inferior *inf, const char *filename);
|
||||||
|
|
||||||
|
/* Invalidate the target associated with open handles that were open
|
||||||
|
on target TARG, since we're about to close (and maybe destroy) the
|
||||||
|
target. The handles remain open from the client's perspective, but
|
||||||
|
trying to do anything with them other than closing them will fail
|
||||||
|
with EIO. */
|
||||||
|
extern void fileio_handles_invalidate_target (target_ops *targ);
|
||||||
|
|
||||||
/* Tracepoint-related operations. */
|
/* Tracepoint-related operations. */
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,171 @@
|
|||||||
|
2021-09-10 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
* lib/gdb.exp (gdb_compile_test): Handle unrecognized command line
|
||||||
|
option.
|
||||||
|
|
||||||
|
2021-09-09 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
* gdb.base/coredump-filter-build-id.exp: Handle older eu-unstrip.
|
||||||
|
|
||||||
|
2021-09-09 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
* gdb.mi/mi-sym-info.exp: Fix regexps. Add missing message argument
|
||||||
|
to mi_gdb_test. Factor out regexps for functions and variables.
|
||||||
|
|
||||||
|
2021-09-04 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
PR testsuite/26950
|
||||||
|
* gdb/testsuite/gdb.arch/i386-avx.c (main): Remove call to have_avx.
|
||||||
|
(have_avx): Move ...
|
||||||
|
* gdb/testsuite/lib/gdb.exp (have_avx): ... here. New proc.
|
||||||
|
* gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp: Use have_avx.
|
||||||
|
* gdb/testsuite/gdb.arch/i386-avx.exp: Same.
|
||||||
|
|
||||||
|
2021-09-03 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
* gdb.gdb/complaints.exp: Use untested if clear_complaints cannot
|
||||||
|
be found.
|
||||||
|
|
||||||
|
2021-09-03 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
* lib/selftest-support.exp: Emit untested when not being able to set
|
||||||
|
breakpoint.
|
||||||
|
|
||||||
|
2021-09-01 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
PR testsuite/28298
|
||||||
|
* gdb.dwarf2/fission-base.S: Use DWO instead of XSTR(DWO).
|
||||||
|
* gdb.dwarf2/fission-loclists-pie.S: Same.
|
||||||
|
* gdb.dwarf2/fission-loclists.S: Same.
|
||||||
|
* gdb.dwarf2/fission-reread.S: Same.
|
||||||
|
* gdb.dwarf2/fission-base.exp: Use additional_flags=-DDWO=\"$dwo\".
|
||||||
|
* gdb.dwarf2/fission-loclists-pie.exp: Same.
|
||||||
|
* gdb.dwarf2/fission-loclists.exp: Same.
|
||||||
|
* gdb.dwarf2/fission-reread.exp: Same.
|
||||||
|
|
||||||
|
2021-09-01 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
* gdb.fortran/call-no-debug.exp: Avoid shared lib symbols for
|
||||||
|
find_mangled_name calls.
|
||||||
|
|
||||||
|
2021-08-30 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
PR cli/28290
|
||||||
|
* gdb.base/batch-exit-status.exp: Add gdb '' and gdb '' '' tests.
|
||||||
|
|
||||||
|
2021-08-23 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
PR gdb/26880
|
||||||
|
* gdb.base/non-executable.exp: New file.
|
||||||
|
|
||||||
|
2021-08-06 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
PR symtab/28004
|
||||||
|
* gdb.dwarf2/dw2-zero-range-shlib.c: New test.
|
||||||
|
* gdb.dwarf2/dw2-zero-range.c: New test.
|
||||||
|
* gdb.dwarf2/dw2-zero-range.exp: New file.
|
||||||
|
|
||||||
|
2021-08-02 Tom Tromey <tromey@adacore.com>
|
||||||
|
|
||||||
|
PR varobj/28131
|
||||||
|
* gdb.python/py-mi-var-info-path-expression.exp: Add regression
|
||||||
|
test.
|
||||||
|
|
||||||
|
2021-07-26 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
|
||||||
|
|
||||||
|
PR gdb/28076
|
||||||
|
* gdb.mi/mi-break.exp: Add more tests to check clearing the
|
||||||
|
breakpoint condition.
|
||||||
|
|
||||||
|
2021-07-22 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
* gdb.ada/formatted_ref.exp: Add xfail for PR gcc/101575.
|
||||||
|
* gdb.ada/iwide.exp: Same.
|
||||||
|
* gdb.ada/pkd_arr_elem.exp: Same.
|
||||||
|
|
||||||
|
2021-07-22 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
* gdb.cp/step-and-next-inline.cc (tree_check, get_alias_set, main):
|
||||||
|
Tag closing brace with comment.
|
||||||
|
* gdb.cp/step-and-next-inline.h: Update to keep identical with
|
||||||
|
step-and-next-inline.cc.
|
||||||
|
* gdb.cp/step-and-next-inline.exp: Issue extra next when required.
|
||||||
|
|
||||||
|
2021-07-21 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
* lib/gdb.exp (gcc_major_version): New proc.
|
||||||
|
* gdb.base/ptype-offsets.cc: Define static member static_member::Empty.
|
||||||
|
* gdb.cp/templates.exp: Define static member using -DGCC_BUG.
|
||||||
|
* gdb.cp/m-static.exp: Add
|
||||||
|
additional_flags=-fno-eliminate-unused-debug-types.
|
||||||
|
* gdb.cp/pr-574.exp: Same.
|
||||||
|
* gdb.cp/pr9167.exp: Same.
|
||||||
|
|
||||||
|
2021-07-21 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
* gdb.ada/arrayptr.exp: Add KFAILs for PR20991 and PR28115.
|
||||||
|
* gdb.ada/exprs.exp: Add KFAILs for PR20991.
|
||||||
|
* gdb.ada/packed_array_assign.exp: Same.
|
||||||
|
|
||||||
|
2021-07-19 Tom Tromey <tromey@adacore.com>
|
||||||
|
|
||||||
|
PR gdb/28093
|
||||||
|
* gdb.base/langs.exp: Add tests.
|
||||||
|
|
||||||
|
2021-07-14 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
* lib/gdb.exp (have_index): New proc.
|
||||||
|
* gdb.base/gold-gdb-index.exp: Use have_index.
|
||||||
|
|
||||||
|
2021-07-13 Pedro Alves <pedro@palves.net>
|
||||||
|
|
||||||
|
PR gdb/28080
|
||||||
|
* gdb.base/detach-sysroot-target.exp: New.
|
||||||
|
* gdb.base/detach-sysroot-target.c: New.
|
||||||
|
|
||||||
|
2021-07-13 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
PR testsuite/27690
|
||||||
|
* gdb.threads/check-libthread-db.exp: Update patterns for glibc 2.33.
|
||||||
|
|
||||||
|
2021-07-13 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* gdb.mi/interrupt-thread-group.c: New.
|
||||||
|
* gdb.mi/interrupt-thread-group.exp: New.
|
||||||
|
|
||||||
|
2021-07-12 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
PR testsuite/28057
|
||||||
|
* gdb.btrace/tsx.exp: Add pattern for system with tsx disabled in
|
||||||
|
microcode.
|
||||||
|
|
||||||
|
2021-07-12 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
* lib/mi-support.exp (mi_readnow): New proc.
|
||||||
|
* gdb.mi/mi-info-sources.exp: Use nosharedlibrary. Update patterns.
|
||||||
|
Skip tests for readnow. Use "maint expand-symtabs".
|
||||||
|
|
||||||
|
2021-07-08 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
* gdb.guile/scm-breakpoint.exp: Make additional "ERROR: " prefix in
|
||||||
|
exception printing optional.
|
||||||
|
|
||||||
|
2021-07-06 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* configure.ac: Restore.
|
||||||
|
* configure: Re-generate.
|
||||||
|
* aclocal.m4: Re-generate.
|
||||||
|
* Makefile.in (distclean): Add config.status.
|
||||||
|
(Makefile): Adjust paths.
|
||||||
|
(lib/pdtrace): Adjust paths.
|
||||||
|
(config.status): Add.
|
||||||
|
|
||||||
|
2021-07-06 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
* gdb.fortran/ptype-on-functions.exp: Allow both $integer8 and
|
||||||
|
$integer4 for size of string length.
|
||||||
|
|
||||||
2021-07-01 Pedro Alves <pedro@palves.net>
|
2021-07-01 Pedro Alves <pedro@palves.net>
|
||||||
|
|
||||||
PR mi/15729
|
PR mi/15729
|
||||||
|
|||||||
@@ -348,14 +348,17 @@ clean mostlyclean:
|
|||||||
|
|
||||||
distclean maintainer-clean realclean: clean
|
distclean maintainer-clean realclean: clean
|
||||||
-rm -f *~ core
|
-rm -f *~ core
|
||||||
-rm -f Makefile *-init.exp
|
-rm -f Makefile config.status *-init.exp
|
||||||
-rm -fr *.log summary detail *.plog *.sum *.psum site.*
|
-rm -fr *.log summary detail *.plog *.sum *.psum site.*
|
||||||
|
|
||||||
Makefile : Makefile.in ../config.status $(host_makefile_frag)
|
Makefile : Makefile.in config.status $(host_makefile_frag)
|
||||||
cd .. && $(SHELL) ./config.status testsuite/Makefile
|
$(SHELL) config.status Makefile
|
||||||
|
|
||||||
lib/pdtrace: pdtrace.in ../config.status
|
lib/pdtrace: pdtrace.in config.status
|
||||||
cd .. && $(SHELL) ./config.status testsuite/lib/pdtrace
|
$(SHELL) config.status lib/pdtrace
|
||||||
|
|
||||||
|
config.status: configure
|
||||||
|
$(SHELL) config.status --recheck
|
||||||
|
|
||||||
TAGS: force
|
TAGS: force
|
||||||
find $(srcdir) -name '*.exp' -print | \
|
find $(srcdir) -name '*.exp' -print | \
|
||||||
|
|||||||
37
gdb/testsuite/aclocal.m4
vendored
Normal file
37
gdb/testsuite/aclocal.m4
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
m4_include(../../config/acx.m4)
|
||||||
|
m4_include(../../config/override.m4)
|
||||||
|
m4_include(../../config/enable.m4)
|
||||||
|
m4_include(../transform.m4)
|
||||||
|
|
||||||
|
# AM_CONDITIONAL -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 7
|
||||||
|
|
||||||
|
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||||
|
# -------------------------------------
|
||||||
|
# Define a conditional.
|
||||||
|
AC_DEFUN([AM_CONDITIONAL],
|
||||||
|
[AC_PREREQ(2.52)dnl
|
||||||
|
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||||
|
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||||
|
AC_SUBST([$1_TRUE])
|
||||||
|
AC_SUBST([$1_FALSE])
|
||||||
|
if $2; then
|
||||||
|
$1_TRUE=
|
||||||
|
$1_FALSE='#'
|
||||||
|
else
|
||||||
|
$1_TRUE='#'
|
||||||
|
$1_FALSE=
|
||||||
|
fi
|
||||||
|
AC_CONFIG_COMMANDS_PRE(
|
||||||
|
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
||||||
|
AC_MSG_ERROR([[conditional "$1" was never defined.
|
||||||
|
Usually this means the macro was only invoked conditionally.]])
|
||||||
|
fi])])
|
||||||
4806
gdb/testsuite/configure
vendored
Executable file
4806
gdb/testsuite/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
99
gdb/testsuite/configure.ac
Normal file
99
gdb/testsuite/configure.ac
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
# -*- Autoconf -*-
|
||||||
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
|
# Copyright 2002-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/>.
|
||||||
|
|
||||||
|
AC_INIT
|
||||||
|
AC_CONFIG_SRCDIR([gdb.base])
|
||||||
|
|
||||||
|
AC_CANONICAL_BUILD
|
||||||
|
AC_CANONICAL_HOST
|
||||||
|
AC_CANONICAL_TARGET
|
||||||
|
|
||||||
|
ACX_NONCANONICAL_TARGET
|
||||||
|
|
||||||
|
# Enable gdbtk.
|
||||||
|
AC_ARG_ENABLE(gdbtk,
|
||||||
|
[ --enable-gtk enable gdbtk graphical user interface (GUI)],,
|
||||||
|
[if test -d $srcdir/../gdbtk && test -d $srcdir/gdb.gdbtk; then
|
||||||
|
enable_gdbtk=yes
|
||||||
|
else
|
||||||
|
enable_gdbtk=no
|
||||||
|
fi])
|
||||||
|
# We unconditionally disable gdbtk tests on selected platforms.
|
||||||
|
case $host_os in
|
||||||
|
go32* | windows*)
|
||||||
|
enable_gdbtk=no ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Add gdbtk tests when appropriate.
|
||||||
|
if test $enable_gdbtk = yes; then
|
||||||
|
AC_CONFIG_SUBDIRS(gdb.gdbtk)
|
||||||
|
fi
|
||||||
|
|
||||||
|
GCC_ENABLE([libctf], [yes], [], [Handle .ctf type-info sections])
|
||||||
|
AC_SUBST(enable_libctf)
|
||||||
|
|
||||||
|
# Enable shared libraries.
|
||||||
|
AC_ARG_ENABLE(shared,
|
||||||
|
[ --enable-shared build shared libraries [deault=yes]],,
|
||||||
|
enable_shared=yes)
|
||||||
|
|
||||||
|
# If we have shared libraries, try to set RPATH_ENVVAR reasonably,
|
||||||
|
# such that we can find the shared libraries in the build tree.
|
||||||
|
if test $enable_shared = no; then
|
||||||
|
# The variable `RPATH_ENVVAR' itself is not likely to be used on any
|
||||||
|
# platform.
|
||||||
|
RPATH_ENVVAR=RPATH_ENVVAR
|
||||||
|
else
|
||||||
|
# The variable `LD_LIBRARY_PATH' is used on most platforms.
|
||||||
|
RPATH_ENVVAR=LD_LIBRARY_PATH
|
||||||
|
# The following exceptions are taken from Libtool 1.4.3.
|
||||||
|
case $host_os in
|
||||||
|
aix*)
|
||||||
|
if test $host_cpu != ia64; then
|
||||||
|
RPATH_ENVVAR=LIBPATH
|
||||||
|
fi ;;
|
||||||
|
darwin* | rhapsody*)
|
||||||
|
RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
AC_SUBST(RPATH_ENVVAR)
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS(pthread.h)
|
||||||
|
|
||||||
|
AC_EXEEXT
|
||||||
|
|
||||||
|
if test "${build}" = "${host}" -a "${host}" = "${target}"; then
|
||||||
|
case "${host}" in
|
||||||
|
*gnu*)
|
||||||
|
EXTRA_RULES=read1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
AC_SUBST(EXTRA_RULES)
|
||||||
|
|
||||||
|
# Transform the name of some programs and generate the lib/pdtrace
|
||||||
|
# test tool.
|
||||||
|
AC_ARG_PROGRAM
|
||||||
|
GDB_AC_TRANSFORM(strip, STRIP_TRANSFORM_NAME)
|
||||||
|
GDB_AC_TRANSFORM(readelf, READELF_TRANSFORM_NAME)
|
||||||
|
GDB_AC_TRANSFORM(as, GAS_TRANSFORM_NAME)
|
||||||
|
GDB_AC_TRANSFORM(nm, NM_TRANSFORM_NAME)
|
||||||
|
AC_CONFIG_FILES([lib/pdtrace], [chmod +x lib/pdtrace])
|
||||||
|
AC_CONFIG_FILES([Makefile])
|
||||||
|
|
||||||
|
AC_OUTPUT
|
||||||
@@ -19,6 +19,29 @@ if { [skip_ada_tests] } { return -1 }
|
|||||||
|
|
||||||
standard_ada_testfile p
|
standard_ada_testfile p
|
||||||
|
|
||||||
|
if [get_compiler_info] {
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
set old_gcc [expr [test_compiler_info {gcc-[0-7]-*}]]
|
||||||
|
|
||||||
|
proc gdb_test_with_xfail { cmd re re_xfail msg } {
|
||||||
|
global scenario old_gcc
|
||||||
|
set have_xfail [expr $old_gcc && [string equal "$scenario" "minimal"]]
|
||||||
|
|
||||||
|
gdb_test_multiple $cmd $msg {
|
||||||
|
-re -wrap $re {
|
||||||
|
pass $gdb_test_name
|
||||||
|
}
|
||||||
|
-re -wrap $re_xfail {
|
||||||
|
if { $have_xfail } {
|
||||||
|
# gcc/101633
|
||||||
|
setup_xfail *-*-*
|
||||||
|
}
|
||||||
|
fail $gdb_test_name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach_with_prefix scenario {all minimal} {
|
foreach_with_prefix scenario {all minimal} {
|
||||||
set flags [list debug additional_flags=-fgnat-encodings=$scenario]
|
set flags [list debug additional_flags=-fgnat-encodings=$scenario]
|
||||||
|
|
||||||
@@ -32,17 +55,23 @@ foreach_with_prefix scenario {all minimal} {
|
|||||||
runto "p.adb:$bp_location"
|
runto "p.adb:$bp_location"
|
||||||
|
|
||||||
set v1 "(tag => object, values => (2, 2, 2, 2, 2))"
|
set v1 "(tag => object, values => (2, 2, 2, 2, 2))"
|
||||||
|
set v1_xfail "(tag => object, values => ())"
|
||||||
set v2 "(tag => unused)"
|
set v2 "(tag => unused)"
|
||||||
|
|
||||||
gdb_test "print objects" \
|
set re [string_to_regexp " = ($v1, $v2)"]
|
||||||
[string_to_regexp " = ($v1, $v2)"] \
|
set re_xfail [string_to_regexp " = ($v1_xfail, $v2)"]
|
||||||
"print entire array"
|
gdb_test_with_xfail "print objects" $re $re_xfail "print entire array"
|
||||||
gdb_test "print objects(1)" \
|
|
||||||
[string_to_regexp " = $v1"] \
|
set re [string_to_regexp " = $v1"]
|
||||||
|
set re_xfail [string_to_regexp " = $v1_xfail"]
|
||||||
|
gdb_test_with_xfail "print objects(1)" $re $re_xfail \
|
||||||
"print first array element"
|
"print first array element"
|
||||||
gdb_test "print objects(1 .. 1)" \
|
|
||||||
[string_to_regexp " = ($v1)"] \
|
set re [string_to_regexp " = ($v1)"]
|
||||||
|
set re_xfail [string_to_regexp " = ($v1_xfail)"]
|
||||||
|
gdb_test_with_xfail "print objects(1 .. 1)" $re $re_xfail \
|
||||||
"print first array slice"
|
"print first array slice"
|
||||||
|
|
||||||
gdb_test "print objects(2)" \
|
gdb_test "print objects(2)" \
|
||||||
[string_to_regexp " = $v2"] \
|
[string_to_regexp " = $v2"] \
|
||||||
"print second array element"
|
"print second array element"
|
||||||
|
|||||||
@@ -49,10 +49,38 @@ foreach_with_prefix scenario {all minimal} {
|
|||||||
|
|
||||||
gdb_test "ptype string_access" "= access array \\(<>\\) of character"
|
gdb_test "ptype string_access" "= access array \\(<>\\) of character"
|
||||||
|
|
||||||
gdb_test "print pa_ptr.all" \
|
set kfail_int128support_re \
|
||||||
" = \\(10, 20, 30, 40, 50, 60, 62, 63, -23, 42\\)"
|
"That operation is not available on integers of more than 8 bytes\\."
|
||||||
|
set kfail_packed_array_range_re \
|
||||||
|
"cannot subscript or call something of type `foo__packed_array_ptr'"
|
||||||
|
|
||||||
gdb_test "print pa_ptr(3)" " = 30"
|
gdb_test_multiple "print pa_ptr.all" "" {
|
||||||
|
-re -wrap " = \\(10, 20, 30, 40, 50, 60, 62, 63, -23, 42\\)" {
|
||||||
gdb_test "print pa_ptr.all(3)" " = 30"
|
pass $gdb_test_name
|
||||||
|
}
|
||||||
|
-re -wrap $kfail_int128support_re {
|
||||||
|
kfail gdb/20991 $gdb_test_name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
gdb_test_multiple "print pa_ptr(3)" "" {
|
||||||
|
-re -wrap " = 30" {
|
||||||
|
pass $gdb_test_name
|
||||||
|
}
|
||||||
|
-re -wrap $kfail_int128support_re {
|
||||||
|
kfail gdb/20991 $gdb_test_name
|
||||||
|
}
|
||||||
|
-re -wrap $kfail_packed_array_range_re {
|
||||||
|
kfail gdb/28115 $gdb_test_name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
gdb_test_multiple "print pa_ptr.all(3)" "" {
|
||||||
|
-re -wrap " = 30" {
|
||||||
|
pass $gdb_test_name
|
||||||
|
}
|
||||||
|
-re -wrap $kfail_int128support_re {
|
||||||
|
kfail gdb/20991 $gdb_test_name
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,11 @@ if { [skip_ada_tests] } { return -1 }
|
|||||||
|
|
||||||
standard_ada_testfile foo_ra24_010
|
standard_ada_testfile foo_ra24_010
|
||||||
|
|
||||||
|
if [get_compiler_info] {
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
set old_gcc [expr [test_compiler_info {gcc-[0-8]-*}]]
|
||||||
|
|
||||||
foreach_with_prefix scenario {all minimal} {
|
foreach_with_prefix scenario {all minimal} {
|
||||||
set flags [list debug additional_flags=-fgnat-encodings=$scenario]
|
set flags [list debug additional_flags=-fgnat-encodings=$scenario]
|
||||||
|
|
||||||
@@ -34,6 +39,20 @@ foreach_with_prefix scenario {all minimal} {
|
|||||||
gdb_test "print good" \
|
gdb_test "print good" \
|
||||||
"= \\(false <repeats 196 times>\\)" \
|
"= \\(false <repeats 196 times>\\)" \
|
||||||
|
|
||||||
gdb_test "print bad" \
|
set have_xfail [expr $old_gcc && [string equal "$scenario" "minimal"]]
|
||||||
"= \\(false <repeats 196 times>\\)"
|
|
||||||
|
set re "= \\(false <repeats 196 times>\\)"
|
||||||
|
set re_xfail "= \\(0 => 0 <repeats 25 times>\\)"
|
||||||
|
gdb_test_multiple "print bad" "" {
|
||||||
|
-re -wrap $re {
|
||||||
|
pass $gdb_test_name
|
||||||
|
}
|
||||||
|
-re -wrap $re_xfail {
|
||||||
|
if { $have_xfail } {
|
||||||
|
# gcc/101643
|
||||||
|
setup_xfail *-*-*
|
||||||
|
}
|
||||||
|
fail $gdb_test_name
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,14 +28,34 @@ clean_restart ${testfile}
|
|||||||
set bp_location [gdb_get_line_number "START" ${testdir}/p.adb]
|
set bp_location [gdb_get_line_number "START" ${testdir}/p.adb]
|
||||||
runto "p.adb:$bp_location"
|
runto "p.adb:$bp_location"
|
||||||
|
|
||||||
gdb_test "print X ** Y = Z" \
|
set kfail_int128support_re \
|
||||||
"= true" \
|
"That operation is not available on integers of more than 8 bytes\\."
|
||||||
"Long_Long_Integer ** Y"
|
|
||||||
|
|
||||||
gdb_test "print long_float'min (long_float (X), 8.0)" \
|
gdb_test_multiple "print X ** Y = Z" "Long_Long_Integer ** Y" {
|
||||||
"= 7.0" \
|
-re -wrap "= true" {
|
||||||
"long_float'min"
|
pass $gdb_test_name
|
||||||
|
}
|
||||||
|
-re -wrap $kfail_int128support_re {
|
||||||
|
kfail gdb/20991 $gdb_test_name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
gdb_test "print long_float'max (long_float (X), 8.0)" \
|
set cmd "print long_float'min (long_float (X), 8.0)"
|
||||||
"= 8.0" \
|
gdb_test_multiple $cmd "long_float'min" {
|
||||||
"long_float'max"
|
-re -wrap "= 7.0" {
|
||||||
|
pass $gdb_test_name
|
||||||
|
}
|
||||||
|
-re -wrap $kfail_int128support_re {
|
||||||
|
kfail gdb/20991 $gdb_test_name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set cmd "print long_float'max (long_float (X), 8.0)"
|
||||||
|
gdb_test_multiple $cmd "long_float'max" {
|
||||||
|
-re -wrap "= 8.0" {
|
||||||
|
pass $gdb_test_name
|
||||||
|
}
|
||||||
|
-re -wrap $kfail_int128support_re {
|
||||||
|
kfail gdb/20991 $gdb_test_name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -90,7 +90,30 @@ proc test_p_op1_equals_op2 {op1 op2} {
|
|||||||
|
|
||||||
clean_restart ${testfile}
|
clean_restart ${testfile}
|
||||||
|
|
||||||
runto defs.adb:[gdb_get_line_number "marker here" ${testdir}/defs.adb ]
|
set bp_location \
|
||||||
|
defs.adb:[gdb_get_line_number "marker here" ${testdir}/defs.adb]
|
||||||
|
|
||||||
|
# Workaround gcc PR101575.
|
||||||
|
#runto $bp_location
|
||||||
|
gdb_breakpoint "$bp_location"
|
||||||
|
gdb_run_cmd
|
||||||
|
set re "Breakpoint $decimal, defs.f1 \\(.*\\) at .*:$decimal.*"
|
||||||
|
set re_xfail "Breakpoint $decimal, defs__struct1IP \\(\\) at .*:$decimal.*"
|
||||||
|
set ok 1
|
||||||
|
gdb_test_multiple "" "Runto to $bp_location" {
|
||||||
|
-re -wrap $re {
|
||||||
|
if { $ok } {
|
||||||
|
pass $gdb_test_name
|
||||||
|
} else {
|
||||||
|
xfail $gdb_test_name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-re -wrap $re_xfail {
|
||||||
|
set ok 0
|
||||||
|
send_gdb "continue\n"
|
||||||
|
exp_continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
set s1_address [get_address "s1"]
|
set s1_address [get_address "s1"]
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,29 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional
|
|||||||
|
|
||||||
clean_restart ${testfile}
|
clean_restart ${testfile}
|
||||||
|
|
||||||
set bp_location [gdb_get_line_number "BREAK" ${testdir}/p.adb]
|
set bp_location p.adb:[gdb_get_line_number "BREAK" ${testdir}/p.adb]
|
||||||
runto "p.adb:$bp_location"
|
|
||||||
|
# Workaround gcc PR101575.
|
||||||
|
#runto "$bp_location"
|
||||||
|
gdb_breakpoint "$bp_location"
|
||||||
|
gdb_run_cmd
|
||||||
|
set re "Breakpoint $decimal, p \\(\\) at .*:$decimal.*"
|
||||||
|
set re_xfail "Breakpoint $decimal, p__P5b.0 \\(\\) at .*:$decimal.*"
|
||||||
|
set ok 1
|
||||||
|
gdb_test_multiple "" "Runto to $bp_location" {
|
||||||
|
-re -wrap $re {
|
||||||
|
if { $ok } {
|
||||||
|
pass $gdb_test_name
|
||||||
|
} else {
|
||||||
|
xfail $gdb_test_name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-re -wrap $re_xfail {
|
||||||
|
set ok 0
|
||||||
|
send_gdb "continue\n"
|
||||||
|
exp_continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
gdb_test "print My_Drawable" \
|
gdb_test "print My_Drawable" \
|
||||||
"= \\(center => \\(x => 1, y => 2\\), radius => 3\\)"
|
"= \\(center => \\(x => 1, y => 2\\), radius => 3\\)"
|
||||||
|
|||||||
@@ -27,15 +27,72 @@ clean_restart ${testfile}
|
|||||||
|
|
||||||
runto "aggregates.run_test"
|
runto "aggregates.run_test"
|
||||||
|
|
||||||
gdb_test \
|
set kfail_int128support_re \
|
||||||
"print pra := ((packed_array_assign_x => 2, packed_array_assign_y => 0, packed_array_assign_w => 17), pr, (packed_array_assign_x => 7, packed_array_assign_y => 1, packed_array_assign_w => 23))" \
|
"That operation is not available on integers of more than 8 bytes\\."
|
||||||
" = \\(\\(packed_array_assign_w => 17, packed_array_assign_x => 2, packed_array_assign_y => 0\\), \\(packed_array_assign_w => 104, packed_array_assign_x => 2, packed_array_assign_y => 3\\), \\(packed_array_assign_w => 23, packed_array_assign_x => 7, packed_array_assign_y => 1\\)\\)" \
|
|
||||||
"value of pra"
|
|
||||||
|
|
||||||
gdb_test "print pra(1) := pr" \
|
set cmd \
|
||||||
" = \\(packed_array_assign_w => 104, packed_array_assign_x => 2, packed_array_assign_y => 3\\)"
|
[list \
|
||||||
gdb_test "print pra(1)" \
|
"print pra := " \
|
||||||
" = \\(packed_array_assign_w => 104, packed_array_assign_x => 2, packed_array_assign_y => 3\\)"
|
"((packed_array_assign_x => 2," \
|
||||||
|
"packed_array_assign_y => 0," \
|
||||||
|
"packed_array_assign_w => 17)," \
|
||||||
|
"pr," \
|
||||||
|
"(packed_array_assign_x => 7," \
|
||||||
|
"packed_array_assign_y => 1," \
|
||||||
|
"packed_array_assign_w => 23))"]
|
||||||
|
set cmd [join $cmd]
|
||||||
|
set re \
|
||||||
|
[list \
|
||||||
|
" = \\(\\(packed_array_assign_w => 17," \
|
||||||
|
"packed_array_assign_x => 2," \
|
||||||
|
"packed_array_assign_y => 0\\)," \
|
||||||
|
"\\(packed_array_assign_w => 104," \
|
||||||
|
"packed_array_assign_x => 2," \
|
||||||
|
"packed_array_assign_y => 3\\)," \
|
||||||
|
"\\(packed_array_assign_w => 23," \
|
||||||
|
"packed_array_assign_x => 7," \
|
||||||
|
"packed_array_assign_y => 1\\)\\)"]
|
||||||
|
set re [join $re]
|
||||||
|
gdb_test_multiple $cmd "value of pra" {
|
||||||
|
-re -wrap $re {
|
||||||
|
pass $gdb_test_name
|
||||||
|
}
|
||||||
|
-re -wrap $kfail_int128support_re {
|
||||||
|
kfail gdb/20991 $gdb_test_name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set cmd "print pra(1) := pr"
|
||||||
|
set re \
|
||||||
|
[list \
|
||||||
|
" = \\(packed_array_assign_w => 104," \
|
||||||
|
"packed_array_assign_x => 2," \
|
||||||
|
"packed_array_assign_y => 3\\)"]
|
||||||
|
set re [join $re]
|
||||||
|
gdb_test_multiple $cmd "" {
|
||||||
|
-re -wrap $re {
|
||||||
|
pass $gdb_test_name
|
||||||
|
}
|
||||||
|
-re -wrap $kfail_int128support_re {
|
||||||
|
kfail gdb/20991 $gdb_test_name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set cmd "print pra(1)"
|
||||||
|
set re \
|
||||||
|
[list \
|
||||||
|
" = \\(packed_array_assign_w => 104," \
|
||||||
|
"packed_array_assign_x => 2," \
|
||||||
|
"packed_array_assign_y => 3\\)"]
|
||||||
|
set re [join $re]
|
||||||
|
gdb_test_multiple $cmd "" {
|
||||||
|
-re -wrap $re {
|
||||||
|
pass $gdb_test_name
|
||||||
|
}
|
||||||
|
-re -wrap $kfail_int128support_re {
|
||||||
|
kfail gdb/20991 $gdb_test_name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
gdb_test "print npr := (q000 => 3, r000 => (packed_array_assign_x => 6, packed_array_assign_y => 1, packed_array_assign_w => 117))" \
|
gdb_test "print npr := (q000 => 3, r000 => (packed_array_assign_x => 6, packed_array_assign_y => 1, packed_array_assign_w => 117))" \
|
||||||
" = \\(q000 => 3, r000 => \\(packed_array_assign_w => 117, packed_array_assign_x => 6, packed_array_assign_y => 1\\)\\)" \
|
" = \\(q000 => 3, r000 => \\(packed_array_assign_w => 117, packed_array_assign_x => 6, packed_array_assign_y => 1\\)\\)" \
|
||||||
|
|||||||
@@ -25,8 +25,30 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
|
|||||||
|
|
||||||
clean_restart ${testfile}
|
clean_restart ${testfile}
|
||||||
|
|
||||||
set bp_location [gdb_get_line_number "START" ${testdir}/failure.adb]
|
set bp_location \
|
||||||
runto "failure.adb:$bp_location"
|
failure.adb:[gdb_get_line_number "START" ${testdir}/failure.adb]
|
||||||
|
|
||||||
|
# Workaround gcc PR101575.
|
||||||
|
#runto "$bp_location"
|
||||||
|
gdb_breakpoint "$bp_location"
|
||||||
|
gdb_run_cmd
|
||||||
|
set re "Breakpoint $decimal, failure \\(\\) at .*:$decimal.*"
|
||||||
|
set re_xfail "Breakpoint $decimal, failure__bounded_funny_stringIP.0 \\(\\) at .*:$decimal.*"
|
||||||
|
set ok 1
|
||||||
|
gdb_test_multiple "" "Runto to $bp_location" {
|
||||||
|
-re -wrap $re {
|
||||||
|
if { $ok } {
|
||||||
|
pass $gdb_test_name
|
||||||
|
} else {
|
||||||
|
xfail $gdb_test_name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-re -wrap $re_xfail {
|
||||||
|
set ok 0
|
||||||
|
send_gdb "continue\n"
|
||||||
|
exp_continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Print Test. The order of the components depends on which version of
|
# Print Test. The order of the components depends on which version of
|
||||||
# the compiler being used, as newer version can re-order the order
|
# the compiler being used, as newer version can re-order the order
|
||||||
|
|||||||
@@ -23,6 +23,11 @@ if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if { ![have_avx] } {
|
||||||
|
verbose "Skipping x86_64 displaced stepping tests."
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
standard_testfile .S
|
standard_testfile .S
|
||||||
|
|
||||||
set options [list debug \
|
set options [list debug \
|
||||||
|
|||||||
@@ -48,24 +48,8 @@ v8sf_t data[] =
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
have_avx (void)
|
|
||||||
{
|
|
||||||
unsigned int eax, ebx, ecx, edx;
|
|
||||||
|
|
||||||
if (!x86_cpuid (1, &eax, &ebx, &ecx, &edx))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if ((ecx & (bit_AVX | bit_OSXSAVE)) == (bit_AVX | bit_OSXSAVE))
|
|
||||||
return 1;
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
{
|
|
||||||
if (have_avx ())
|
|
||||||
{
|
{
|
||||||
asm ("vmovaps 0(%0), %%ymm0\n\t"
|
asm ("vmovaps 0(%0), %%ymm0\n\t"
|
||||||
"vmovaps 32(%0), %%ymm1\n\t"
|
"vmovaps 32(%0), %%ymm1\n\t"
|
||||||
@@ -122,7 +106,6 @@ main (int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
puts ("Bye!"); /* second breakpoint here */
|
puts ("Bye!"); /* second breakpoint here */
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,11 @@ if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if { ![have_avx] } {
|
||||||
|
verbose "Skipping x86 AVX tests."
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
standard_testfile .c
|
standard_testfile .c
|
||||||
|
|
||||||
if [get_compiler_info] {
|
if [get_compiler_info] {
|
||||||
@@ -47,23 +52,6 @@ if ![runto_main] then {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
send_gdb "print have_avx ()\r"
|
|
||||||
gdb_expect {
|
|
||||||
-re ".. = 1\r\n$gdb_prompt " {
|
|
||||||
pass "check whether processor supports AVX"
|
|
||||||
}
|
|
||||||
-re ".. = 0\r\n$gdb_prompt " {
|
|
||||||
verbose "processor does not support AVX; skipping AVX tests"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
-re ".*$gdb_prompt $" {
|
|
||||||
fail "check whether processor supports AVX"
|
|
||||||
}
|
|
||||||
timeout {
|
|
||||||
fail "check whether processor supports AVX (timeout)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gdb_test "break [gdb_get_line_number "first breakpoint here"]" \
|
gdb_test "break [gdb_get_line_number "first breakpoint here"]" \
|
||||||
"Breakpoint .* at .*i386-avx.c.*" \
|
"Breakpoint .* at .*i386-avx.c.*" \
|
||||||
"set first breakpoint in main"
|
"set first breakpoint in main"
|
||||||
|
|||||||
@@ -76,3 +76,7 @@ test_exit_status 1 "-batch -x $good_commands -x $bad_commands" \
|
|||||||
"-batch -x good-commands -x bad-commands"
|
"-batch -x good-commands -x bad-commands"
|
||||||
test_exit_status 1 "-batch -x $good_commands -ex \"set not-a-thing 4\"" \
|
test_exit_status 1 "-batch -x $good_commands -ex \"set not-a-thing 4\"" \
|
||||||
"-batch -x good-commands -ex \"set not-a-thing 4\""
|
"-batch -x good-commands -ex \"set not-a-thing 4\""
|
||||||
|
|
||||||
|
set no_such_re ": No such file or directory\\."
|
||||||
|
test_exit_status 1 "-batch \"\"" $no_such_re
|
||||||
|
test_exit_status 1 "-batch \"\" \"\"" [multi_line $no_such_re $no_such_re]
|
||||||
|
|||||||
@@ -58,7 +58,8 @@ if { [catch "exec [gdb_find_eu-unstrip] -n --core $corefilename" output] == 0 }
|
|||||||
|
|
||||||
verbose -log "First line of eu-unstrip: $line"
|
verbose -log "First line of eu-unstrip: $line"
|
||||||
|
|
||||||
if { [regexp "^${hex}\\+${hex} \[a-f0-9\]+@${hex}.*[string_to_regexp $binfile]$" $line] } {
|
set binfile_re (?:[string_to_regexp $binfile]|\\\[(?:exe|pie)\\\])
|
||||||
|
if { [regexp "^${hex}\\+${hex} \[a-f0-9\]+@${hex}.*$binfile_re$" $line] } {
|
||||||
pass "$test"
|
pass "$test"
|
||||||
} else {
|
} else {
|
||||||
fail "$test"
|
fail "$test"
|
||||||
|
|||||||
22
gdb/testsuite/gdb.base/detach-sysroot-target.c
Normal file
22
gdb/testsuite/gdb.base/detach-sysroot-target.c
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
/* This testcase is part of GDB, the GNU debugger.
|
||||||
|
|
||||||
|
Copyright 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/>. */
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
59
gdb/testsuite/gdb.base/detach-sysroot-target.exp
Normal file
59
gdb/testsuite/gdb.base/detach-sysroot-target.exp
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
# Copyright 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 running a program from the GDB prompt and then detaching it,
|
||||||
|
# with "set sysroot target:". Regression test for PR gdb/28080.
|
||||||
|
#
|
||||||
|
# It is assumed that it is only safe to tweak the sysroot on the
|
||||||
|
# current board if it is currently either empty or already "target:".
|
||||||
|
# If set to anything else, we skip the test.
|
||||||
|
|
||||||
|
standard_testfile
|
||||||
|
|
||||||
|
if {[prepare_for_testing "failed to prepare" ${binfile} ${srcfile}]} {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
gdb_test_multiple "show sysroot" "" {
|
||||||
|
-wrap -re "The current system root is \"\"\\." {
|
||||||
|
pass $gdb_test_name
|
||||||
|
|
||||||
|
# Explicitly set target: sysroot.
|
||||||
|
gdb_test_no_output "set sysroot target:"
|
||||||
|
}
|
||||||
|
-wrap -re "The current system root is \"target:\"\\." {
|
||||||
|
pass $gdb_test_name
|
||||||
|
|
||||||
|
# Nothing else to do.
|
||||||
|
}
|
||||||
|
-re "$gdb_prompt $" {
|
||||||
|
pass $gdb_test_name
|
||||||
|
|
||||||
|
# If testing with any other sysroot, we probably should not
|
||||||
|
# mess with it.
|
||||||
|
unsupported "sysroot is set"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ![runto_main] {
|
||||||
|
fail "couldn't run to main"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
# With PR gdb/28080, this would crash GDB when testing with "target
|
||||||
|
# remote".
|
||||||
|
set escapedbinfile [string_to_regexp ${binfile}]
|
||||||
|
gdb_test "detach" "Detaching from program: .*$escapedbinfile, .*"
|
||||||
@@ -28,7 +28,7 @@ if {[prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" \
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [readnow] } {
|
if { [have_index $binfile] != "gdb_index" } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,6 +111,12 @@ if [runto csub] then {
|
|||||||
"set lang to minimal"
|
"set lang to minimal"
|
||||||
|
|
||||||
gdb_test "print x" " = 5000" "print parameter value"
|
gdb_test "print x" " = 5000" "print parameter value"
|
||||||
|
|
||||||
|
# Ensure this at least does not crash.
|
||||||
|
gdb_test_no_output "set language unknown"
|
||||||
|
gdb_test "print x" \
|
||||||
|
"expression parsing not implemented for language .Unknown." \
|
||||||
|
"expression parsing does not crash for unknown"
|
||||||
}
|
}
|
||||||
|
|
||||||
set timeout $oldtimeout
|
set timeout $oldtimeout
|
||||||
|
|||||||
32
gdb/testsuite/gdb.base/non-executable.exp
Normal file
32
gdb/testsuite/gdb.base/non-executable.exp
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# Copyright 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/>.
|
||||||
|
|
||||||
|
# Check that loading an existing but non-executable file
|
||||||
|
# results in the correct error message.
|
||||||
|
|
||||||
|
set binfile "$srcdir/$subdir/$gdb_test_file_name.exp"
|
||||||
|
|
||||||
|
clean_restart
|
||||||
|
|
||||||
|
set re \
|
||||||
|
[list \
|
||||||
|
"\"[string_to_regexp $binfile]\"" \
|
||||||
|
"not in executable format" \
|
||||||
|
"file format not recognized"]
|
||||||
|
set re [join $re ": "]
|
||||||
|
|
||||||
|
# Using gdb_load will generate a dejagnu ERROR, so use
|
||||||
|
# plain file command instead.
|
||||||
|
gdb_test "file $binfile" $re "error message"
|
||||||
@@ -185,6 +185,9 @@ struct static_member
|
|||||||
int abc;
|
int abc;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Work around PR gcc/101452. */
|
||||||
|
static_member static_member::Empty;
|
||||||
|
|
||||||
struct empty_member
|
struct empty_member
|
||||||
{
|
{
|
||||||
struct { } empty;
|
struct { } empty;
|
||||||
|
|||||||
@@ -59,6 +59,11 @@ set abort_2 [multi_line \
|
|||||||
"\[0-9\]*\t 0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\tmov\[^\\\r\\\n\]*" \
|
"\[0-9\]*\t 0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\tmov\[^\\\r\\\n\]*" \
|
||||||
"\[0-9\]*\t 0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\tret\[^\\\r\\\n\]*" \
|
"\[0-9\]*\t 0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\tret\[^\\\r\\\n\]*" \
|
||||||
]
|
]
|
||||||
|
set abort_3 \
|
||||||
|
[multi_line \
|
||||||
|
"$decimal\t $hex <main\\+$decimal>:\t\[^\\\r\\\n\]*" \
|
||||||
|
"$decimal\t $hex <test\\+$decimal>:\tmov\[^\\\r\\\n\]*" \
|
||||||
|
"$decimal\t $hex <test\\+$decimal>:\tret\[^\\\r\\\n\]*"]
|
||||||
|
|
||||||
set test "speculation indication"
|
set test "speculation indication"
|
||||||
gdb_test_multiple "record instruction-history" $test {
|
gdb_test_multiple "record instruction-history" $test {
|
||||||
@@ -68,6 +73,9 @@ gdb_test_multiple "record instruction-history" $test {
|
|||||||
-re "$abort_2.*$gdb_prompt $" {
|
-re "$abort_2.*$gdb_prompt $" {
|
||||||
pass $test
|
pass $test
|
||||||
}
|
}
|
||||||
|
-re -wrap "$abort_3.*" {
|
||||||
|
pass $gdb_test_name
|
||||||
|
}
|
||||||
-re "$begin_to_end.*$gdb_prompt $" {
|
-re "$begin_to_end.*$gdb_prompt $" {
|
||||||
pass $test
|
pass $test
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,8 +31,14 @@ if [get_compiler_info] {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set flags [list debug c++]
|
||||||
|
if { [test_compiler_info gcc-*] && [gcc_major_version] >= 10 } {
|
||||||
|
# Work around PR gcc/101452.
|
||||||
|
lappend flags additional_flags=-fno-eliminate-unused-debug-types
|
||||||
|
}
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile \
|
if {[prepare_for_testing "failed to prepare" $testfile \
|
||||||
[list $srcfile $srcfile2] {debug c++}]} {
|
[list $srcfile $srcfile2] $flags]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,13 @@ if [get_compiler_info "c++"] {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
|
set flags [list debug c++]
|
||||||
|
if { [test_compiler_info gcc-*] && [gcc_major_version] >= 10 } {
|
||||||
|
# Work around PR gcc/101452.
|
||||||
|
lappend flags additional_flags=-fno-eliminate-unused-debug-types
|
||||||
|
}
|
||||||
|
|
||||||
|
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $flags]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,13 @@
|
|||||||
|
|
||||||
standard_testfile .cc
|
standard_testfile .cc
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
|
set flags [list debug c++]
|
||||||
|
if { [test_compiler_info gcc-*] && [gcc_major_version] >= 10 } {
|
||||||
|
# Work around PR gcc/101452.
|
||||||
|
lappend flags additional_flags=-fno-eliminate-unused-debug-types
|
||||||
|
}
|
||||||
|
|
||||||
|
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $flags]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ tree_check (tree *t, int i)
|
|||||||
abort();
|
abort();
|
||||||
tree *x = t;
|
tree *x = t;
|
||||||
return x;
|
return x;
|
||||||
}
|
} // tree-check
|
||||||
|
|
||||||
#endif /* USE_NEXT_INLINE_H */
|
#endif /* USE_NEXT_INLINE_H */
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ get_alias_set (tree *t)
|
|||||||
&& TREE_TYPE (t).z != 3)
|
&& TREE_TYPE (t).z != 3)
|
||||||
return 0;
|
return 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
} // get_alias_set
|
||||||
|
|
||||||
tree xx;
|
tree xx;
|
||||||
|
|
||||||
@@ -63,4 +63,4 @@ main()
|
|||||||
{
|
{
|
||||||
get_alias_set (&xx);
|
get_alias_set (&xx);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
} // main
|
||||||
|
|||||||
@@ -67,29 +67,100 @@ proc do_test { use_header } {
|
|||||||
gdb_test "step" ".*" "step into get_alias_set"
|
gdb_test "step" ".*" "step into get_alias_set"
|
||||||
gdb_test "bt" "\\s*\\#0\\s+get_alias_set\[^\r\]*${srcfile}:.*" \
|
gdb_test "bt" "\\s*\\#0\\s+get_alias_set\[^\r\]*${srcfile}:.*" \
|
||||||
"not in inline 1"
|
"not in inline 1"
|
||||||
|
|
||||||
# It's possible that this first failure (when not using a header
|
# It's possible that this first failure (when not using a header
|
||||||
# file) is GCC's fault, though the remaining failures would best
|
# file) is GCC's fault, though the remaining failures would best
|
||||||
# be fixed by adding location views support (though it could be
|
# be fixed by adding location views support (though it could be
|
||||||
# that some easier heuristic could be figured out). Still, it is
|
# that some easier heuristic could be figured out). Still, it is
|
||||||
# not certain that the first failure wouldn't also be fixed by
|
# not certain that the first failure wouldn't also be fixed by
|
||||||
# having location view support, so for now it is tagged as such.
|
# having location view support, so for now it is tagged as such.
|
||||||
if {[test_compiler_info gcc*] && !$use_header} {
|
set have_kfail [expr [test_compiler_info gcc*] && !$use_header]
|
||||||
|
|
||||||
|
set ok 1
|
||||||
|
gdb_test_multiple "next" "next step 1" {
|
||||||
|
-re -wrap "if \\(t->x != i\\)" {
|
||||||
|
set ok 0
|
||||||
|
send_gdb "next\n"
|
||||||
|
exp_continue
|
||||||
|
}
|
||||||
|
-re -wrap ".*TREE_TYPE.* != 1" {
|
||||||
|
if { $ok } {
|
||||||
|
pass $gdb_test_name
|
||||||
|
} else {
|
||||||
|
if { $have_kfail } {
|
||||||
setup_kfail "*-*-*" symtab/25507
|
setup_kfail "*-*-*" symtab/25507
|
||||||
}
|
}
|
||||||
gdb_test "next" ".*TREE_TYPE.*" "next step 1"
|
fail $gdb_test_name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
gdb_test "bt" "\\s*\\#0\\s+get_alias_set\[^\r\]*${srcfile}:.*" \
|
gdb_test "bt" "\\s*\\#0\\s+get_alias_set\[^\r\]*${srcfile}:.*" \
|
||||||
"not in inline 2"
|
"not in inline 2"
|
||||||
gdb_test "next" ".*TREE_TYPE.*" "next step 2"
|
|
||||||
gdb_test "bt" "\\s*\\#0\\s+get_alias_set\[^\r\]*${srcfile}:.*" \
|
set ok 1
|
||||||
"not in inline 3"
|
gdb_test_multiple "next" "next step 2" {
|
||||||
if {[test_compiler_info gcc*] && !$use_header} {
|
-re -wrap "return x;" {
|
||||||
|
set ok 0
|
||||||
|
send_gdb "next\n"
|
||||||
|
exp_continue
|
||||||
|
}
|
||||||
|
-re -wrap ".*TREE_TYPE.* != 2" {
|
||||||
|
if { $ok } {
|
||||||
|
pass $gdb_test_name
|
||||||
|
} else {
|
||||||
|
if { $have_kfail } {
|
||||||
setup_kfail "*-*-*" symtab/25507
|
setup_kfail "*-*-*" symtab/25507
|
||||||
}
|
}
|
||||||
gdb_test "next" ".*TREE_TYPE.*" "next step 3"
|
fail $gdb_test_name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gdb_test "bt" "\\s*\\#0\\s+get_alias_set\[^\r\]*${srcfile}:.*" \
|
||||||
|
"not in inline 3"
|
||||||
|
|
||||||
|
set ok 1
|
||||||
|
gdb_test_multiple "next" "next step 3" {
|
||||||
|
-re -wrap "return x;" {
|
||||||
|
set ok 0
|
||||||
|
send_gdb "next\n"
|
||||||
|
exp_continue
|
||||||
|
}
|
||||||
|
-re -wrap ".*TREE_TYPE.* != 3\\)" {
|
||||||
|
if { $ok } {
|
||||||
|
pass $gdb_test_name
|
||||||
|
} else {
|
||||||
|
if { $have_kfail } {
|
||||||
|
setup_kfail "*-*-*" symtab/25507
|
||||||
|
}
|
||||||
|
fail $gdb_test_name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
gdb_test "bt" "\\s*\\#0\\s+get_alias_set\[^\r\]*${srcfile}:.*" \
|
gdb_test "bt" "\\s*\\#0\\s+get_alias_set\[^\r\]*${srcfile}:.*" \
|
||||||
"not in inline 4"
|
"not in inline 4"
|
||||||
if {!$use_header} { setup_kfail "*-*-*" symtab/25507 }
|
|
||||||
gdb_test "next" "return 0.*" "next step 4"
|
set ok 1
|
||||||
|
gdb_test_multiple "next" "next step 4" {
|
||||||
|
-re -wrap "(if \\(t != NULL|\} // get_alias_set)" {
|
||||||
|
send_gdb "next\n"
|
||||||
|
exp_continue
|
||||||
|
}
|
||||||
|
-re -wrap "return x;" {
|
||||||
|
set ok 0
|
||||||
|
send_gdb "next\n"
|
||||||
|
exp_continue
|
||||||
|
}
|
||||||
|
-re -wrap "return 0.*" {
|
||||||
|
if { $ok } {
|
||||||
|
pass $gdb_test_name
|
||||||
|
} else {
|
||||||
|
if { $have_kfail } {
|
||||||
|
setup_kfail "*-*-*" symtab/25507
|
||||||
|
}
|
||||||
|
fail $gdb_test_name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
gdb_test "bt" \
|
gdb_test "bt" \
|
||||||
"\\s*\\#0\\s+(main|get_alias_set)\[^\r\]*${srcfile}:.*" \
|
"\\s*\\#0\\s+(main|get_alias_set)\[^\r\]*${srcfile}:.*" \
|
||||||
"not in inline 5"
|
"not in inline 5"
|
||||||
|
|||||||
@@ -35,4 +35,4 @@ tree_check (tree *t, int i)
|
|||||||
abort();
|
abort();
|
||||||
tree *x = t;
|
tree *x = t;
|
||||||
return x;
|
return x;
|
||||||
}
|
} // tree_check
|
||||||
|
|||||||
@@ -27,7 +27,13 @@ if [get_compiler_info "c++"] {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
|
set flags [list debug c++]
|
||||||
|
if { [test_compiler_info gcc-*] && [gcc_major_version] >= 10 } {
|
||||||
|
# Work around PR gcc/101452.
|
||||||
|
lappend flags additional_flags=-DGCC_BUG
|
||||||
|
}
|
||||||
|
|
||||||
|
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $flags]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
21
gdb/testsuite/gdb.dwarf2/dw2-zero-range-shlib.c
Normal file
21
gdb/testsuite/gdb.dwarf2/dw2-zero-range-shlib.c
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
Copyright 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/>. */
|
||||||
|
|
||||||
|
void
|
||||||
|
foo (void)
|
||||||
|
{
|
||||||
|
asm ("foo_label: .globl foo_label");
|
||||||
|
}
|
||||||
24
gdb/testsuite/gdb.dwarf2/dw2-zero-range.c
Normal file
24
gdb/testsuite/gdb.dwarf2/dw2-zero-range.c
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
Copyright 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 void foo (void);
|
||||||
|
|
||||||
|
int
|
||||||
|
main (void)
|
||||||
|
{
|
||||||
|
asm ("main_label: .globl main_label");
|
||||||
|
foo ();
|
||||||
|
}
|
||||||
185
gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
Normal file
185
gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
# Copyright 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/>.
|
||||||
|
|
||||||
|
# Check that the ".debug_ranges entry has start address of zero" complaint
|
||||||
|
# is triggered for a loaded shared lib.
|
||||||
|
|
||||||
|
load_lib dwarf.exp
|
||||||
|
|
||||||
|
# This test can only be run on targets which support DWARF-2 and use gas.
|
||||||
|
if {![dwarf2_support]} {
|
||||||
|
verbose "Skipping $gdb_test_file_name."
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
if {[skip_shlib_tests]} {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
standard_testfile .c -shlib.c -dw.S
|
||||||
|
|
||||||
|
# Test with both a .debug_ranges section (DWARF 4) and a .debug_rnglists
|
||||||
|
# section (DWARF 5).
|
||||||
|
|
||||||
|
foreach_with_prefix ranges_sect {ranges rnglists} {
|
||||||
|
set asm_file [standard_output_file ${ranges_sect}-$srcfile3]
|
||||||
|
|
||||||
|
if { $ranges_sect == "ranges" } {
|
||||||
|
Dwarf::assemble $asm_file {
|
||||||
|
global srcdir subdir srcfile2
|
||||||
|
declare_labels ranges_label
|
||||||
|
|
||||||
|
cu {} {
|
||||||
|
compile_unit {
|
||||||
|
{language @DW_LANG_C}
|
||||||
|
{name $srcfile2}
|
||||||
|
{ranges ${ranges_label} DW_FORM_sec_offset}
|
||||||
|
} {
|
||||||
|
subprogram {
|
||||||
|
{external 1 flag}
|
||||||
|
{name foo}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ranges {is_64 [is_64_target]} {
|
||||||
|
ranges_label: sequence {
|
||||||
|
base 0
|
||||||
|
range 0 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} elseif { $ranges_sect == "rnglists" } {
|
||||||
|
Dwarf::assemble $asm_file {
|
||||||
|
global srcdir subdir srcfile2
|
||||||
|
declare_labels rnglists_label
|
||||||
|
|
||||||
|
cu {
|
||||||
|
version 5
|
||||||
|
} {
|
||||||
|
compile_unit {
|
||||||
|
{language @DW_LANG_C}
|
||||||
|
{name $srcfile2}
|
||||||
|
{ranges ${rnglists_label} DW_FORM_sec_offset}
|
||||||
|
} {
|
||||||
|
subprogram {
|
||||||
|
{external 1 flag}
|
||||||
|
{name foo}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rnglists {
|
||||||
|
table {
|
||||||
|
rnglists_label: list_ {
|
||||||
|
start_end 0 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
error "invalid ranges section kind"
|
||||||
|
}
|
||||||
|
|
||||||
|
set lib1 [standard_output_file shr1.sl]
|
||||||
|
set lib_opts "nodebug"
|
||||||
|
|
||||||
|
set sources [list ${srcdir}/${subdir}/$srcfile2 $asm_file]
|
||||||
|
if { [gdb_compile_shlib $sources ${lib1} $lib_opts] != "" } {
|
||||||
|
untested "failed to compile"
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
|
||||||
|
set exec_opts [list debug shlib=${lib1}]
|
||||||
|
set sources ${srcdir}/${subdir}/${srcfile}
|
||||||
|
if { [gdb_compile $sources ${binfile} executable \
|
||||||
|
$exec_opts] != ""} {
|
||||||
|
untested "failed to compile"
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
|
||||||
|
clean_restart $binfile
|
||||||
|
|
||||||
|
set readnow_p [readnow]
|
||||||
|
|
||||||
|
# Don't load the symbols for $lib1 during runto_main.
|
||||||
|
# Instead, we do this afterwards using "sharedlibrary $lib1".
|
||||||
|
gdb_test_no_output "set auto-solib-add off"
|
||||||
|
|
||||||
|
if { ![runto_main] } {
|
||||||
|
fail "cannot run to main."
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
|
||||||
|
set complaint_re ".debug_${ranges_sect} entry has start address of zero"
|
||||||
|
set re \
|
||||||
|
"During symbol reading: $complaint_re \\\[in module \[^\r\n\]*\\\]"
|
||||||
|
|
||||||
|
# Test for presence of complaint, with lib1 relocated.
|
||||||
|
with_complaints 1 {
|
||||||
|
set test "Zero address complaint - relocated - psymtab"
|
||||||
|
set have_complaint 0
|
||||||
|
gdb_test_multiple "sharedlibrary $lib1" $test {
|
||||||
|
-re -wrap $re {
|
||||||
|
set have_complaint 1
|
||||||
|
}
|
||||||
|
-re -wrap "" {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if { $have_complaint } {
|
||||||
|
pass $test
|
||||||
|
} else {
|
||||||
|
set index [have_index $lib1]
|
||||||
|
if { $index == "gdb_index" } {
|
||||||
|
kfail symtab/28159 $test
|
||||||
|
} else {
|
||||||
|
fail $test
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if { ! $readnow_p } {
|
||||||
|
with_complaints 1 {
|
||||||
|
gdb_test "maint expand-symtabs $srcfile2" $re \
|
||||||
|
"Zero address complaint - relocated - symtab"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
clean_restart
|
||||||
|
# Test for presence of complaint, with lib1 unrelocated.
|
||||||
|
with_complaints 1 {
|
||||||
|
gdb_load $lib1
|
||||||
|
set test "Zero address complaint - unrelocated - psymtab"
|
||||||
|
set have_complaint [regexp $re.* $gdb_file_cmd_msg]
|
||||||
|
if { $have_complaint } {
|
||||||
|
pass $test
|
||||||
|
} else {
|
||||||
|
set index [have_index $lib1]
|
||||||
|
if { $index == "gdb_index" } {
|
||||||
|
kfail symtab/28159 $test
|
||||||
|
} else {
|
||||||
|
fail $test
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if { ! $readnow_p } {
|
||||||
|
with_complaints 1 {
|
||||||
|
gdb_test "maint expand-symtabs $srcfile2" $re \
|
||||||
|
"Zero address complaint - unrelocated - symtab"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -20,9 +20,6 @@
|
|||||||
and then massaging the output.
|
and then massaging the output.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define XSTR(s) STR(s)
|
|
||||||
#define STR(s) #s
|
|
||||||
|
|
||||||
.file "fission-base.c"
|
.file "fission-base.c"
|
||||||
|
|
||||||
.text
|
.text
|
||||||
@@ -146,7 +143,7 @@ main:
|
|||||||
.8byte .Letext0-.Ltext0 # DW_AT_high_pc
|
.8byte .Letext0-.Ltext0 # DW_AT_high_pc
|
||||||
.4byte .Ldebug_line0 # DW_AT_stmt_list
|
.4byte .Ldebug_line0 # DW_AT_stmt_list
|
||||||
.ascii "/tmp/src/gdb/testsuite\0" # DW_AT_comp_dir
|
.ascii "/tmp/src/gdb/testsuite\0" # DW_AT_comp_dir
|
||||||
.asciz XSTR(DWO) # DW_AT_GNU_dwo_name
|
.asciz DWO # DW_AT_GNU_dwo_name
|
||||||
.4byte .Ldebug_pubnames0 # DW_AT_GNU_pubnames
|
.4byte .Ldebug_pubnames0 # DW_AT_GNU_pubnames
|
||||||
.4byte .Ldebug_pubtypes0 # DW_AT_GNU_pubtypes
|
.4byte .Ldebug_pubtypes0 # DW_AT_GNU_pubtypes
|
||||||
.4byte .Ldebug_addr0_begin # DW_AT_GNU_addr_base
|
.4byte .Ldebug_addr0_begin # DW_AT_GNU_addr_base
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ set obj [standard_output_file "${testfile}.o"]
|
|||||||
set dwo [standard_output_file "${testfile}.dwo"]
|
set dwo [standard_output_file "${testfile}.dwo"]
|
||||||
if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
|
if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
|
||||||
[list $srcfile \
|
[list $srcfile \
|
||||||
[list nodebug split-dwo additional_flags=-DDWO=$dwo] \
|
[list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \
|
||||||
$obj]] {
|
$obj]] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,8 +33,6 @@
|
|||||||
return init (&argc);
|
return init (&argc);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
#define XSTR(s) STR(s)
|
|
||||||
#define STR(s) #s
|
|
||||||
|
|
||||||
.file "fission-loclists-pie.c"
|
.file "fission-loclists-pie.c"
|
||||||
.text
|
.text
|
||||||
@@ -463,7 +461,7 @@ main:
|
|||||||
.LASF1:
|
.LASF1:
|
||||||
.string "/tmp/19999/obj64/gdb/testsuite"
|
.string "/tmp/19999/obj64/gdb/testsuite"
|
||||||
.LASF0:
|
.LASF0:
|
||||||
.string XSTR(DWO)
|
.string DWO
|
||||||
.section .debug_str_offsets.dwo,"e",@progbits
|
.section .debug_str_offsets.dwo,"e",@progbits
|
||||||
.long 0 # indexed string 0x0: argv
|
.long 0 # indexed string 0x0: argv
|
||||||
.long 0x5 # indexed string 0x1: argc
|
.long 0x5 # indexed string 0x1: argc
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ set obj [standard_output_file "${testfile}.o"]
|
|||||||
set dwo [standard_output_file "${testfile}.dwo"]
|
set dwo [standard_output_file "${testfile}.dwo"]
|
||||||
if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" \
|
if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" \
|
||||||
{nodebug ldflags=-pie} \
|
{nodebug ldflags=-pie} \
|
||||||
[list $srcfile [list nodebug split-dwo additional_flags=-DDWO=$dwo] \
|
[list $srcfile [list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \
|
||||||
$obj]] {
|
$obj]] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,9 +33,6 @@
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define XSTR(s) STR(s)
|
|
||||||
#define STR(s) #s
|
|
||||||
|
|
||||||
.file "fission-loclists.c"
|
.file "fission-loclists.c"
|
||||||
.text
|
.text
|
||||||
.Ltext0:
|
.Ltext0:
|
||||||
@@ -243,7 +240,7 @@ main:
|
|||||||
.byte 0x5
|
.byte 0x5
|
||||||
.4byte .Ldebug_ranges0 # DW_AT_GNU_ranges_base
|
.4byte .Ldebug_ranges0 # DW_AT_GNU_ranges_base
|
||||||
.ascii "/tmp/src/gdb/testsuite\0" # DW_AT_comp_dir
|
.ascii "/tmp/src/gdb/testsuite\0" # DW_AT_comp_dir
|
||||||
.asciz XSTR(DWO) # DW_AT_GNU_dwo_name
|
.asciz DWO # DW_AT_GNU_dwo_name
|
||||||
.4byte .Ldebug_pubnames0 # DW_AT_GNU_pubnames
|
.4byte .Ldebug_pubnames0 # DW_AT_GNU_pubnames
|
||||||
.4byte .Ldebug_pubtypes0 # DW_AT_GNU_pubtypes
|
.4byte .Ldebug_pubtypes0 # DW_AT_GNU_pubtypes
|
||||||
.4byte .Ldebug_addr0 # DW_AT_GNU_addr_base
|
.4byte .Ldebug_addr0 # DW_AT_GNU_addr_base
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ set obj [standard_output_file "${testfile}.o"]
|
|||||||
set dwo [standard_output_file "${testfile}.dwo"]
|
set dwo [standard_output_file "${testfile}.dwo"]
|
||||||
if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
|
if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
|
||||||
[list $srcfile \
|
[list $srcfile \
|
||||||
[list nodebug split-dwo additional_flags=-DDWO=$dwo] \
|
[list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \
|
||||||
$obj]] {
|
$obj]] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,9 +47,6 @@
|
|||||||
# define SYMBOL(str) str
|
# define SYMBOL(str) str
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define XSTR(s) STR(s)
|
|
||||||
#define STR(s) #s
|
|
||||||
|
|
||||||
.file "fission-reread.cc"
|
.file "fission-reread.cc"
|
||||||
|
|
||||||
.globl SYMBOL(baz)
|
.globl SYMBOL(baz)
|
||||||
@@ -146,7 +143,7 @@ SYMBOL(main):
|
|||||||
.4byte 0 /* Offset to Type DIE */
|
.4byte 0 /* Offset to Type DIE */
|
||||||
.uleb128 0x2 /* (DIE (0) DW_TAG_type_unit) */
|
.uleb128 0x2 /* (DIE (0) DW_TAG_type_unit) */
|
||||||
.ascii "/tmp/src/gdb/testsuite\0" /* DW_AT_comp_dir */
|
.ascii "/tmp/src/gdb/testsuite\0" /* DW_AT_comp_dir */
|
||||||
.asciz XSTR(DWO) /* DW_AT_GNU_dwo_name */
|
.asciz DWO /* DW_AT_GNU_dwo_name */
|
||||||
.4byte .Ldebug_pubnames0 /* DW_AT_GNU_pubnames */
|
.4byte .Ldebug_pubnames0 /* DW_AT_GNU_pubnames */
|
||||||
.4byte .Ldebug_pubtypes0 /* DW_AT_GNU_pubtypes */
|
.4byte .Ldebug_pubtypes0 /* DW_AT_GNU_pubtypes */
|
||||||
.4byte .Ldebug_addr0 /* DW_AT_GNU_addr_base */
|
.4byte .Ldebug_addr0 /* DW_AT_GNU_addr_base */
|
||||||
@@ -217,7 +214,7 @@ SYMBOL(main):
|
|||||||
.4byte .Letext0-.Ltext0 /* DW_AT_high_pc */
|
.4byte .Letext0-.Ltext0 /* DW_AT_high_pc */
|
||||||
.4byte .Ldebug_line0 /* DW_AT_stmt_list */
|
.4byte .Ldebug_line0 /* DW_AT_stmt_list */
|
||||||
.ascii "/tmp/src/gdb/testsuite\0" /* DW_AT_comp_dir */
|
.ascii "/tmp/src/gdb/testsuite\0" /* DW_AT_comp_dir */
|
||||||
.asciz XSTR(DWO) /* DW_AT_GNU_dwo_name */
|
.asciz DWO /* DW_AT_GNU_dwo_name */
|
||||||
.4byte .Ldebug_pubnames0 /* DW_AT_GNU_pubnames */
|
.4byte .Ldebug_pubnames0 /* DW_AT_GNU_pubnames */
|
||||||
.4byte .Ldebug_pubtypes0 /* DW_AT_GNU_pubtypes */
|
.4byte .Ldebug_pubtypes0 /* DW_AT_GNU_pubtypes */
|
||||||
.4byte .Ldebug_addr0 /* DW_AT_GNU_addr_base */
|
.4byte .Ldebug_addr0 /* DW_AT_GNU_addr_base */
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ if { $additional_flags != "" } {
|
|||||||
|
|
||||||
set dwo_options $options
|
set dwo_options $options
|
||||||
lappend dwo_options split-dwo
|
lappend dwo_options split-dwo
|
||||||
lappend dwo_options additional_flags=-DDWO=$dwo
|
lappend dwo_options additional_flags=-DDWO=\"$dwo\"
|
||||||
|
|
||||||
if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" $options \
|
if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" $options \
|
||||||
[list $srcfile $dwo_options $obj]] {
|
[list $srcfile $dwo_options $obj]] {
|
||||||
|
|||||||
@@ -28,11 +28,6 @@ if {[prepare_for_testing_full "failed to prepare" \
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
if ![fortran_runto_main] {
|
|
||||||
untested "could not run to main"
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Find a possibly mangled version of NAME, a function we want to call
|
# Find a possibly mangled version of NAME, a function we want to call
|
||||||
# that has no debug information available. We hope that the mangled
|
# that has no debug information available. We hope that the mangled
|
||||||
# version of NAME contains the pattern NAME, and so we use 'info
|
# version of NAME contains the pattern NAME, and so we use 'info
|
||||||
@@ -67,12 +62,22 @@ proc find_mangled_name { name } {
|
|||||||
return $symbol_name
|
return $symbol_name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Sample before before starting the exec, in order to avoid picking up symbols
|
||||||
|
# from shared libs.
|
||||||
|
set some_func [find_mangled_name "some_func"]
|
||||||
|
set string_func [find_mangled_name "string_func"]
|
||||||
|
|
||||||
|
if ![fortran_runto_main] {
|
||||||
|
untested "could not run to main"
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
|
||||||
# Call the function SOME_FUNC, that takes a single integer and returns
|
# Call the function SOME_FUNC, that takes a single integer and returns
|
||||||
# an integer. As the function has no debug information then we have
|
# an integer. As the function has no debug information then we have
|
||||||
# to pass the integer argument as '&1' so that GDB will send the
|
# to pass the integer argument as '&1' so that GDB will send the
|
||||||
# address of an integer '1' (as Fortran arguments are pass by
|
# address of an integer '1' (as Fortran arguments are pass by
|
||||||
# reference).
|
# reference).
|
||||||
set symbol_name [find_mangled_name "some_func"]
|
set symbol_name $some_func
|
||||||
if { $symbol_name == "" } {
|
if { $symbol_name == "" } {
|
||||||
untested "couldn't find suitable name for 'some_func'"
|
untested "couldn't find suitable name for 'some_func'"
|
||||||
} else {
|
} else {
|
||||||
@@ -91,7 +96,7 @@ if { $symbol_name == "" } {
|
|||||||
# The compiled program is expecting the address of the string, so we
|
# The compiled program is expecting the address of the string, so we
|
||||||
# prefix that argument with '&', but the artificial length parameter
|
# prefix that argument with '&', but the artificial length parameter
|
||||||
# is pass by value, so there's no need for '&' in that case.
|
# is pass by value, so there's no need for '&' in that case.
|
||||||
set symbol_name [find_mangled_name "string_func"]
|
set symbol_name $string_func
|
||||||
if { $symbol_name == "" } {
|
if { $symbol_name == "" } {
|
||||||
untested "couldn't find suitable name for 'string_func'"
|
untested "couldn't find suitable name for 'string_func'"
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -33,6 +33,13 @@ set integer4 [fortran_int4]
|
|||||||
set logical4 [fortran_logical4]
|
set logical4 [fortran_logical4]
|
||||||
set integer8 [fortran_int8]
|
set integer8 [fortran_int8]
|
||||||
|
|
||||||
|
# A fortran string parameter is passed as a char *, and an additional
|
||||||
|
# argument str_ for the string length. The type used for the string length
|
||||||
|
# argument is size_t, but for gcc 7 and earlier, the actual type is int
|
||||||
|
# instead ( see
|
||||||
|
# https://gcc.gnu.org/onlinedocs/gfortran/Argument-passing-conventions.html ).
|
||||||
|
set stringlen ($integer8|$integer4)
|
||||||
|
|
||||||
if {[test_compiler_info {clang-*}]} {
|
if {[test_compiler_info {clang-*}]} {
|
||||||
set some_module_class_type "Type number"
|
set some_module_class_type "Type number"
|
||||||
set some_module_aux_info ", $integer8 \\(10\\)"
|
set some_module_aux_info ", $integer8 \\(10\\)"
|
||||||
@@ -62,7 +69,7 @@ gdb_test "ptype fun_ptr" \
|
|||||||
"type = PTR TO -> \\( $integer4 \\(\\) \\(${fun_ptr_arg}\\) \\)"
|
"type = PTR TO -> \\( $integer4 \\(\\) \\(${fun_ptr_arg}\\) \\)"
|
||||||
|
|
||||||
gdb_test "ptype say_string" \
|
gdb_test "ptype say_string" \
|
||||||
"type = void \\(character\[^,\]+, $integer8\\)"
|
"type = void \\(character\[^,\]+, $stringlen\\)"
|
||||||
|
|
||||||
set say_array_artificial_first_arg ""
|
set say_array_artificial_first_arg ""
|
||||||
if {[test_compiler_info {clang-*}]} {
|
if {[test_compiler_info {clang-*}]} {
|
||||||
|
|||||||
@@ -104,6 +104,26 @@ proc test_empty_complaint { cmd msg } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc test_empty_complaints { } {
|
proc test_empty_complaints { } {
|
||||||
|
global decimal
|
||||||
|
|
||||||
|
set re [multi_line \
|
||||||
|
"All functions matching regular expression \[^:\]*:" \
|
||||||
|
"" \
|
||||||
|
"File \[^\r\n\]*/complaints\\.c:" \
|
||||||
|
"$decimal:\tvoid clear_complaints\\(\\);"]
|
||||||
|
|
||||||
|
set found 0
|
||||||
|
gdb_test_multiple "info function ^clear_complaints()$" "" {
|
||||||
|
-re -wrap $re {
|
||||||
|
set found 1
|
||||||
|
}
|
||||||
|
-re -wrap "" {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if { ! $found } {
|
||||||
|
untested "Cannot find clear_complaints, skipping test"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
test_empty_complaint "call clear_complaints()" \
|
test_empty_complaint "call clear_complaints()" \
|
||||||
"clear complaints"
|
"clear complaints"
|
||||||
|
|||||||
@@ -260,10 +260,10 @@ proc_with_prefix test_watchpoints { } {
|
|||||||
"test watchpoint write"
|
"test watchpoint write"
|
||||||
|
|
||||||
gdb_test "guile (define wp2 (make-breakpoint \"result\" #:wp-class WP_WRITE #:type 999))" \
|
gdb_test "guile (define wp2 (make-breakpoint \"result\" #:wp-class WP_WRITE #:type 999))" \
|
||||||
"ERROR: In procedure gdbscm_make_breakpoint: Out of range: invalid breakpoint type in position 5: 999\r\n.*" \
|
"(ERROR: )?In procedure gdbscm_make_breakpoint: Out of range: invalid breakpoint type in position 5: 999\r\n.*" \
|
||||||
"create a breakpoint with an invalid type number"
|
"create a breakpoint with an invalid type number"
|
||||||
gdb_test "guile (define wp2 (make-breakpoint \"result\" #:wp-class WP_WRITE #:type BP_NONE))" \
|
gdb_test "guile (define wp2 (make-breakpoint \"result\" #:wp-class WP_WRITE #:type BP_NONE))" \
|
||||||
"ERROR: In procedure gdbscm_make_breakpoint: unsupported breakpoint type in position 5: \"BP_NONE\"\r\n.*" \
|
"(ERROR: )?In procedure gdbscm_make_breakpoint: unsupported breakpoint type in position 5: \"BP_NONE\"\r\n.*" \
|
||||||
"create a breakpoint with an unsupported type"
|
"create a breakpoint with an unsupported type"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -533,7 +533,7 @@ proc_with_prefix test_catchpoints {} {
|
|||||||
# Try to create a catchpoint, currently this isn't supported via
|
# Try to create a catchpoint, currently this isn't supported via
|
||||||
# the guile api.
|
# the guile api.
|
||||||
gdb_test "guile (define cp (make-breakpoint \"syscall\" #:type BP_CATCHPOINT))" \
|
gdb_test "guile (define cp (make-breakpoint \"syscall\" #:type BP_CATCHPOINT))" \
|
||||||
"ERROR: In procedure gdbscm_make_breakpoint: unsupported breakpoint type in position 3: \"BP_CATCHPOINT\"\r\n.*" \
|
"(ERROR: )?In procedure gdbscm_make_breakpoint: unsupported breakpoint type in position 3: \"BP_CATCHPOINT\"\r\n.*" \
|
||||||
"create a catchpoint via the api"
|
"create a catchpoint via the api"
|
||||||
|
|
||||||
# Setup a catchpoint.
|
# Setup a catchpoint.
|
||||||
|
|||||||
65
gdb/testsuite/gdb.mi/interrupt-thread-group.c
Normal file
65
gdb/testsuite/gdb.mi/interrupt-thread-group.c
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
/* This testcase is part of GDB, the GNU debugger.
|
||||||
|
|
||||||
|
Copyright 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/>. */
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
#define NUM_THREADS 4
|
||||||
|
|
||||||
|
static pthread_barrier_t barrier;
|
||||||
|
|
||||||
|
static void *
|
||||||
|
thread_function (void *arg)
|
||||||
|
{
|
||||||
|
pthread_barrier_wait (&barrier);
|
||||||
|
|
||||||
|
for (int i = 0; i < 30; i++)
|
||||||
|
sleep (1);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
all_threads_started (void)
|
||||||
|
{}
|
||||||
|
|
||||||
|
int
|
||||||
|
main (void)
|
||||||
|
{
|
||||||
|
pthread_t threads[NUM_THREADS];
|
||||||
|
|
||||||
|
pthread_barrier_init (&barrier, NULL, NUM_THREADS + 1);
|
||||||
|
|
||||||
|
for (int i = 0; i < NUM_THREADS; i++)
|
||||||
|
{
|
||||||
|
int res = pthread_create (&threads[i], NULL, thread_function, NULL);
|
||||||
|
assert (res == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
pthread_barrier_wait (&barrier);
|
||||||
|
all_threads_started ();
|
||||||
|
|
||||||
|
for (int i = 0; i < NUM_THREADS; i++)
|
||||||
|
{
|
||||||
|
int res = pthread_join (threads[i], NULL);
|
||||||
|
assert (res == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
130
gdb/testsuite/gdb.mi/interrupt-thread-group.exp
Normal file
130
gdb/testsuite/gdb.mi/interrupt-thread-group.exp
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
# Copyright 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 --exec-interrupt with thread-group.
|
||||||
|
#
|
||||||
|
# Run two inferiors, try interrupting them both with --exec-interrupt +
|
||||||
|
# --thread-group.
|
||||||
|
|
||||||
|
load_lib mi-support.exp
|
||||||
|
set MIFLAGS "-i=mi"
|
||||||
|
|
||||||
|
standard_testfile .c
|
||||||
|
|
||||||
|
if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile \
|
||||||
|
executable debug] != "" } {
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
|
||||||
|
save_vars { GDBFLAGS } {
|
||||||
|
append GDBFLAGS " -ex \"set non-stop on\" -ex \"set mi-async\""
|
||||||
|
mi_clean_restart $binfile
|
||||||
|
}
|
||||||
|
|
||||||
|
mi_detect_async
|
||||||
|
|
||||||
|
# Create breakpoint by hand instead of using mi_runto, since we'll need it for
|
||||||
|
# both inferiors.
|
||||||
|
mi_create_breakpoint "all_threads_started" \
|
||||||
|
"set breakpoint on all_threads_started"
|
||||||
|
|
||||||
|
# Run first inferior to all_threads_started (to ensure all threads are started)
|
||||||
|
# and resume it.
|
||||||
|
if { [mi_run_cmd] < 0 } {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
mi_expect_stop "breakpoint-hit" "all_threads_started" ".*" ".*" ".*" {"" "disp=\"keep\""} \
|
||||||
|
"inferior i1 stops at all_threads_started"
|
||||||
|
|
||||||
|
mi_send_resuming_command "exec-continue --thread-group i1" \
|
||||||
|
"continue inferior 1"
|
||||||
|
|
||||||
|
# We can't run a second inferior on stub targets. We can still test with one
|
||||||
|
# inferior and ensure that the command has the desired effect.
|
||||||
|
set use_second_inferior [expr {![use_gdb_stub]}]
|
||||||
|
|
||||||
|
if { $use_second_inferior } {
|
||||||
|
# The inferior created by the -add-inferior MI command does not inherit the
|
||||||
|
# target connection of the first inferior. If debugging through an
|
||||||
|
# extended-remote connection, that means we can't run that second inferior
|
||||||
|
# on the remote connection. Use the add-inferior CLI command as a stop-gap.
|
||||||
|
if { [mi_is_target_remote] } {
|
||||||
|
mi_gdb_test "add-inferior" \
|
||||||
|
"\\^done" \
|
||||||
|
"add inferior 2"
|
||||||
|
} else {
|
||||||
|
mi_gdb_test "-add-inferior" \
|
||||||
|
"\\^done,inferior=\"i2\"" \
|
||||||
|
"add inferior 2"
|
||||||
|
}
|
||||||
|
mi_gdb_test "-file-exec-and-symbols --thread-group i2 $::binfile" \
|
||||||
|
"\\^done" \
|
||||||
|
"set executable of inferior 2"
|
||||||
|
# Run second inferior to all_threads_started (to ensure all threads are
|
||||||
|
# started) and resume it.
|
||||||
|
mi_gdb_test "-exec-run --thread-group i2" \
|
||||||
|
"\\^running.*" \
|
||||||
|
"run inferior 2"
|
||||||
|
|
||||||
|
mi_expect_stop "breakpoint-hit" "all_threads_started" ".*" ".*" ".*" {"" "disp=\"keep\""} \
|
||||||
|
"inferior i2 stops at all_threads_started"
|
||||||
|
|
||||||
|
mi_send_resuming_command "exec-continue --thread-group i2" \
|
||||||
|
"continue inferior 2"
|
||||||
|
|
||||||
|
mi_check_thread_states {
|
||||||
|
"running" "running" "running" "running" "running"
|
||||||
|
"running" "running" "running" "running" "running"
|
||||||
|
} "before interrupting"
|
||||||
|
} else {
|
||||||
|
mi_check_thread_states {
|
||||||
|
"running" "running" "running" "running" "running"
|
||||||
|
} "before interrupting"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Interrupt inferior 1, wait for events.
|
||||||
|
mi_gdb_test "-exec-interrupt --thread-group i1" \
|
||||||
|
"\\^done" \
|
||||||
|
"interrupt inferior 1"
|
||||||
|
|
||||||
|
for {set i 0} {$i < 5} {incr i} {
|
||||||
|
mi_expect_interrupt "inferior 1, interrupt $i"
|
||||||
|
}
|
||||||
|
|
||||||
|
if { $use_second_inferior } {
|
||||||
|
mi_check_thread_states {
|
||||||
|
"stopped" "stopped" "stopped" "stopped" "stopped"
|
||||||
|
"running" "running" "running" "running" "running"
|
||||||
|
} "after interrupting inferior 1"
|
||||||
|
|
||||||
|
# Interrupt inferior 2, wait for events.
|
||||||
|
mi_gdb_test "-exec-interrupt --thread-group i2" \
|
||||||
|
"\\^done" \
|
||||||
|
"interrupt inferior 2"
|
||||||
|
|
||||||
|
for {set i 0} {$i < 5} {incr i} {
|
||||||
|
mi_expect_interrupt "inferior 2, interrupt $i"
|
||||||
|
}
|
||||||
|
|
||||||
|
mi_check_thread_states {
|
||||||
|
"stopped" "stopped" "stopped" "stopped" "stopped"
|
||||||
|
"stopped" "stopped" "stopped" "stopped" "stopped"
|
||||||
|
} "after interrupting inferior 2"
|
||||||
|
} else {
|
||||||
|
mi_check_thread_states {
|
||||||
|
"stopped" "stopped" "stopped" "stopped" "stopped"
|
||||||
|
} "after interrupting inferior 1"
|
||||||
|
}
|
||||||
@@ -435,6 +435,28 @@ proc_with_prefix test_forced_conditions {} {
|
|||||||
mi_gdb_test "-break-info 16" \
|
mi_gdb_test "-break-info 16" \
|
||||||
"\\^done,[mi_make_breakpoint_table [list $bp]]" \
|
"\\^done,[mi_make_breakpoint_table [list $bp]]" \
|
||||||
"invalid condition is defined"
|
"invalid condition is defined"
|
||||||
|
|
||||||
|
# No cond argument should clear the condition.
|
||||||
|
mi_gdb_test "-break-condition 16" \
|
||||||
|
"~\"Breakpoint 16's condition is now valid at location 1, enabling.*\\^done" \
|
||||||
|
"clear the condition"
|
||||||
|
set bp [mi_make_breakpoint -number 16]
|
||||||
|
mi_gdb_test "-break-info 16" \
|
||||||
|
"\\^done,[mi_make_breakpoint_table [list $bp]]" \
|
||||||
|
"condition is cleared"
|
||||||
|
|
||||||
|
# Zero-argument is an error.
|
||||||
|
mi_gdb_test "-break-condition" \
|
||||||
|
"\\^error,msg=\"-break-condition: Missing the <number> argument\"" \
|
||||||
|
"no arguments to -break-condition"
|
||||||
|
|
||||||
|
# Passing --force with no condition should not crash or raise an error.
|
||||||
|
mi_gdb_test "-break-condition --force 16" \
|
||||||
|
"\\^done" \
|
||||||
|
"clear the condition with --force"
|
||||||
|
mi_gdb_test "-break-condition --force" \
|
||||||
|
"\\^error,msg=\"-break-condition: Missing the <number> argument\"" \
|
||||||
|
"no arguments with --force"
|
||||||
}
|
}
|
||||||
|
|
||||||
proc test_break {mi_mode} {
|
proc test_break {mi_mode} {
|
||||||
|
|||||||
@@ -28,8 +28,14 @@ if {[prepare_for_testing $testfile.exp $testfile \
|
|||||||
|
|
||||||
mi_clean_restart $binfile
|
mi_clean_restart $binfile
|
||||||
|
|
||||||
|
set readnow_p [mi_readnow]
|
||||||
|
|
||||||
mi_runto_main
|
mi_runto_main
|
||||||
|
|
||||||
|
# Unload symbols for shared libraries to prevent
|
||||||
|
# 'ERROR: internal buffer is full'.
|
||||||
|
mi_gdb_test "nosharedlibrary" ".*\\^done" "nosharedlibrary"
|
||||||
|
|
||||||
# Helper to build expected MI output pattern for a list. NAME is the
|
# Helper to build expected MI output pattern for a list. NAME is the
|
||||||
# name of the list (which can be the empty string) and args is one
|
# name of the list (which can be the empty string) and args is one
|
||||||
# or more strings representing the fields of the list, which will be
|
# or more strings representing the fields of the list, which will be
|
||||||
@@ -108,27 +114,45 @@ proc check_info_sources { debug_fully_read } {
|
|||||||
with_test_prefix "debug_read=${debug_fully_read}" {
|
with_test_prefix "debug_read=${debug_fully_read}" {
|
||||||
|
|
||||||
if { $debug_fully_read } {
|
if { $debug_fully_read } {
|
||||||
set p [mi_list "files" \
|
set p1 \
|
||||||
|
[mi_list "files" \
|
||||||
|
".*" \
|
||||||
[mi_tuple "" \
|
[mi_tuple "" \
|
||||||
[mi_field "file" "\[^\"\]+/mi-info-sources-base\\.c"] \
|
[mi_field "file" "\[^\"\]+/mi-info-sources-base\\.c"] \
|
||||||
[mi_field "fullname" "\[^\"\]+/mi-info-sources-base\\.c"] \
|
[mi_field "fullname" "\[^\"\]+/mi-info-sources-base\\.c"] \
|
||||||
[mi_field "debug-fully-read" "${debug_fully_read}"]] \
|
[mi_field "debug-fully-read" "${debug_fully_read}"]] \
|
||||||
[mi_tuple "" \
|
".*"]
|
||||||
[mi_field "file" "\[^\"\]+/mi-info-sources\\.c"] \
|
set p2 \
|
||||||
[mi_field "fullname" "\[^\"\]+/mi-info-sources\\.c"] \
|
[mi_list "files" \
|
||||||
[mi_field "debug-fully-read" "true"]]]
|
".*" \
|
||||||
} else {
|
|
||||||
set p [mi_list "files" \
|
|
||||||
[mi_tuple "" \
|
[mi_tuple "" \
|
||||||
[mi_field "file" "\[^\"\]+/mi-info-sources\\.c"] \
|
[mi_field "file" "\[^\"\]+/mi-info-sources\\.c"] \
|
||||||
[mi_field "fullname" "\[^\"\]+/mi-info-sources\\.c"] \
|
[mi_field "fullname" "\[^\"\]+/mi-info-sources\\.c"] \
|
||||||
[mi_field "debug-fully-read" "true"]] \
|
[mi_field "debug-fully-read" "true"]] \
|
||||||
|
".*"]
|
||||||
|
} else {
|
||||||
|
set p1 \
|
||||||
|
[mi_list "files" \
|
||||||
|
".*" \
|
||||||
|
[mi_tuple "" \
|
||||||
|
[mi_field "file" "\[^\"\]+/mi-info-sources\\.c"] \
|
||||||
|
[mi_field "fullname" "\[^\"\]+/mi-info-sources\\.c"] \
|
||||||
|
[mi_field "debug-fully-read" "true"]] \
|
||||||
|
".*"]
|
||||||
|
set p2 \
|
||||||
|
[mi_list "files" \
|
||||||
|
".*" \
|
||||||
[mi_tuple "" \
|
[mi_tuple "" \
|
||||||
[mi_field "file" "\[^\"\]+/mi-info-sources-base\\.c"] \
|
[mi_field "file" "\[^\"\]+/mi-info-sources-base\\.c"] \
|
||||||
[mi_field "fullname" "\[^\"\]+/mi-info-sources-base\\.c"] \
|
[mi_field "fullname" "\[^\"\]+/mi-info-sources-base\\.c"] \
|
||||||
[mi_field "debug-fully-read" "${debug_fully_read}"]]]
|
[mi_field "debug-fully-read" "${debug_fully_read}"]] \
|
||||||
|
".*"]
|
||||||
}
|
}
|
||||||
mi_gdb_test "-file-list-exec-source-files" ".*\\^done,${p}" "-file-list-exec-source-files"
|
|
||||||
|
mi_gdb_test "-file-list-exec-source-files" ".*\\^done,${p1}" \
|
||||||
|
"-file-list-exec-source-files, src1"
|
||||||
|
mi_gdb_test "-file-list-exec-source-files" ".*\\^done,${p2}" \
|
||||||
|
"-file-list-exec-source-files, src2"
|
||||||
|
|
||||||
set p [mi_list "files" \
|
set p [mi_list "files" \
|
||||||
[mi_tuple "" \
|
[mi_tuple "" \
|
||||||
@@ -147,7 +171,7 @@ proc check_info_sources { debug_fully_read } {
|
|||||||
|
|
||||||
set p [mi_list "files" \
|
set p [mi_list "files" \
|
||||||
[mi_tuple "" \
|
[mi_tuple "" \
|
||||||
[mi_field "filename" "\[^\"\]+/mi-info-sources"] \
|
[mi_field "filename" "\[^\"\]+/mi-info-sources(\.debug)?"] \
|
||||||
[mi_field "debug-info" "${debug_info}"] \
|
[mi_field "debug-info" "${debug_info}"] \
|
||||||
[mi_list "sources" \
|
[mi_list "sources" \
|
||||||
".*" \
|
".*" \
|
||||||
@@ -162,7 +186,7 @@ proc check_info_sources { debug_fully_read } {
|
|||||||
|
|
||||||
set p [mi_list "files" \
|
set p [mi_list "files" \
|
||||||
[mi_tuple "" \
|
[mi_tuple "" \
|
||||||
[mi_field "filename" "\[^\"\]+/mi-info-sources"] \
|
[mi_field "filename" "\[^\"\]+/mi-info-sources(\.debug)?"] \
|
||||||
[mi_field "debug-info" "${debug_info}"] \
|
[mi_field "debug-info" "${debug_info}"] \
|
||||||
[mi_list "sources" \
|
[mi_list "sources" \
|
||||||
".*" \
|
".*" \
|
||||||
@@ -177,8 +201,13 @@ proc check_info_sources { debug_fully_read } {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if { ! $readnow_p } {
|
||||||
check_info_sources "false"
|
check_info_sources "false"
|
||||||
|
}
|
||||||
|
|
||||||
mi_continue_to "some_other_func"
|
mi_continue_to "some_other_func"
|
||||||
|
|
||||||
|
# Force "fully-read".
|
||||||
|
mi_gdb_test "maint expand-symtabs"
|
||||||
|
|
||||||
check_info_sources "true"
|
check_info_sources "true"
|
||||||
|
|||||||
@@ -189,34 +189,58 @@ with_timeout_factor 4 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set f2_re \
|
||||||
|
"\{line=\"33\",name=\"f2\",type=\"float \\(another_float_t\\)\",description=\"float f2\\(another_float_t\\);\"\}"
|
||||||
|
set f3_re \
|
||||||
|
"\{line=\"39\",name=\"f3\",type=\"int \\(another_int_t\\)\",description=\"int f3\\(another_int_t\\);\"\}"
|
||||||
|
set f4_re \
|
||||||
|
"\{line=\"36\",name=\"f4\",type=\"void \\(int \\*\\)\",description=\"void f4\\(int \\*\\);\"\}"
|
||||||
|
|
||||||
|
set global_i1_re \
|
||||||
|
"\{line=\"18\",name=\"global_i1\",type=\"int\",description=\"static int global_i1;\"\}"
|
||||||
|
set global_f2_re \
|
||||||
|
"\{line=\"21\",name=\"global_f2\",type=\"int\",description=\"int global_f2;\"\}"
|
||||||
|
set global_i2_re \
|
||||||
|
"\{line=\"20\",name=\"global_i2\",type=\"int\",description=\"int global_i2;\"\}"
|
||||||
|
set global_f1_s1_re \
|
||||||
|
"\{line=\"25\",name=\"global_f1\",type=\"float\",description=\"static float global_f1;\"\}"
|
||||||
|
set global_f1_s2_re \
|
||||||
|
"\{line=\"19\",name=\"global_f1\",type=\"float\",description=\"static float global_f1;\"\}"
|
||||||
|
|
||||||
|
set another_int_re "\{line=\"23\",name=\"another_int_t\"\}"
|
||||||
|
set my_int_re "\{line=\"27\",name=\"my_int_t\"\}"
|
||||||
|
set another_char_re "\{line=\"44\",name=\"another_char_t\"\}"
|
||||||
|
set another_float_re "\{line=\"24\",name=\"another_float_t\"\}"
|
||||||
|
set another_short_re "\{line=\"45\",name=\"another_short_t\"\}"
|
||||||
|
|
||||||
# Filter functions by name and type.
|
# Filter functions by name and type.
|
||||||
set lineno [gdb_get_line_number "f3 (another_int_t arg)" ${srcfile2}]
|
set lineno [gdb_get_line_number "f3 (another_int_t arg)" ${srcfile2}]
|
||||||
mi_gdb_test "116-symbol-info-functions --name ^f3$" \
|
mi_gdb_test "116-symbol-info-functions --name ^f3$" \
|
||||||
"116\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[\{line=\"39\",name=\"f3\",type=\"int \\(another_int_t\\)\",description=\"int f3\\(another_int_t\\);\"\}\\\]\}\\\]\}" \
|
"116\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[$f3_re\\\]\}\\\]\}" \
|
||||||
"List all functions matching pattern f3"
|
"List all functions matching pattern f3"
|
||||||
|
|
||||||
set lineno [gdb_get_line_number "f4 (int *arg)" ${srcfile}]
|
set lineno [gdb_get_line_number "f4 (int *arg)" ${srcfile}]
|
||||||
mi_gdb_test "117-symbol-info-functions --type void --name ^f4$" \
|
mi_gdb_test "117-symbol-info-functions --type void --name ^f4$" \
|
||||||
"117\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile\",fullname=\"\[^\"\]+$srcfile\",symbols=\\\[\{line=\"36\",name=\"f4\",type=\"void \\(int \\*\\)\",description=\"void f4\\(int \\*\\);\"\}\\\]\}\\\]\}" \
|
"117\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile\",fullname=\"\[^\"\]+$srcfile\",symbols=\\\[$f4_re\\\]\}\\\]\}" \
|
||||||
"List all functions matching type void"
|
"List all functions matching type void"
|
||||||
|
|
||||||
# Filter variables by name and type.
|
# Filter variables by name and type.
|
||||||
set lineno [gdb_get_line_number "int global_f2;" ${srcfile2}]
|
set lineno [gdb_get_line_number "int global_f2;" ${srcfile2}]
|
||||||
mi_gdb_test "118-symbol-info-variables --name global_f2" \
|
mi_gdb_test "118-symbol-info-variables --name global_f2" \
|
||||||
"118\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[\{line=\"21\",name=\"global_f2\",type=\"int\",description=\"int global_f2;\"\}\\\]\}\\\]\}" \
|
"118\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[$global_f2_re\\\]\}\\\]\}" \
|
||||||
"List all variables matching pattern global_f2"
|
"List all variables matching pattern global_f2"
|
||||||
|
|
||||||
set lineno1 [gdb_get_line_number "static float __attribute__ ((used)) global_f1;" ${srcfile}]
|
set lineno1 [gdb_get_line_number "static float __attribute__ ((used)) global_f1;" ${srcfile}]
|
||||||
set lineno2 [gdb_get_line_number "static float __attribute__ ((used)) global_f1;" ${srcfile2}]
|
set lineno2 [gdb_get_line_number "static float __attribute__ ((used)) global_f1;" ${srcfile2}]
|
||||||
mi_gdb_test "119-symbol-info-variables --type float --name ^global_" \
|
mi_gdb_test "119-symbol-info-variables --type float --name ^global_" \
|
||||||
"119\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile\",fullname=\"\[^\"\]+$srcfile\",symbols=\\\[\{line=\"25\",name=\"global_f1\",type=\"float\",description=\"static float global_f1;\"\}\\\]\},\{filename=\"\[^\"\]*$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[\{line=\"19\",name=\"global_f1\",type=\"float\",description=\"static float global_f1;\"\}\\\]\}\\\]\}" \
|
"119\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile\",fullname=\"\[^\"\]+$srcfile\",symbols=\\\[$global_f1_s1_re\\\]\},\{filename=\"\[^\"\]*$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[$global_f1_s2_re\\\]\}\\\]\}" \
|
||||||
"List all variables matching type float"
|
"List all variables matching type float"
|
||||||
|
|
||||||
# Fetch types, filtering by name.
|
# Fetch types, filtering by name.
|
||||||
set lineno1 [gdb_get_line_number "typedef int my_int_t;" ${srcfile}]
|
set lineno1 [gdb_get_line_number "typedef int my_int_t;" ${srcfile}]
|
||||||
set lineno2 [gdb_get_line_number "typedef int another_int_t;" ${srcfile2}]
|
set lineno2 [gdb_get_line_number "typedef int another_int_t;" ${srcfile2}]
|
||||||
mi_gdb_test "120-symbol-info-types --name _int_" \
|
mi_gdb_test "120-symbol-info-types --name _int_" \
|
||||||
"120\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile\",fullname=\"\[^\"\]+$srcfile\",symbols=\\\[\{line=\"27\",name=\"my_int_t\"\}\\\]\},\{filename=\"\[^\"\]*$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[\{line=\"23\",name=\"another_int_t\"\}\\\]\}\\\]\}" \
|
"120\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile\",fullname=\"\[^\"\]+$srcfile\",symbols=\\\[$my_int_re\\\]\},\{filename=\"\[^\"\]*$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[$another_int_re\\\]\}\\\]\}" \
|
||||||
"List all types matching _int_"
|
"List all types matching _int_"
|
||||||
|
|
||||||
# Test the --max-results parameter.
|
# Test the --max-results parameter.
|
||||||
@@ -225,20 +249,17 @@ mi_gdb_test "121-symbol-info-functions --max-results 0" \
|
|||||||
"-symbol-info-functions --max-results 0"
|
"-symbol-info-functions --max-results 0"
|
||||||
|
|
||||||
mi_gdb_test "122-symbol-info-functions --max-results 1 --name ^\[^_\]" \
|
mi_gdb_test "122-symbol-info-functions --max-results 1 --name ^\[^_\]" \
|
||||||
"122\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[\{line=\"39\",name=\"f3\",type=\"int \\(another_int_t\\)\",description=\"int f3\\(another_int_t\\);\"\}\\\]\}\\\]\}" \
|
"122\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[(?:$f2_re|$f3_re)\\\]\}\\\]\}" \
|
||||||
"-symbol-info-functions --max-results 1"
|
"-symbol-info-functions --max-results 1"
|
||||||
|
|
||||||
mi_gdb_test "123-symbol-info-functions --max-results 2 --name ^\[^_\]" \
|
mi_gdb_test "123-symbol-info-functions --max-results 2 --name ^\[^_\]" \
|
||||||
"123\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[\{line=\"33\",name=\"f2\",type=\"float \\(another_float_t\\)\",description=\"float f2\\(another_float_t\\);\"\},\{line=\"39\",name=\"f3\",type=\"int \\(another_int_t\\)\",description=\"int f3\\(another_int_t\\);\"\}\\\]\}\\\]\}" \
|
"123\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[$f2_re,$f3_re\\\]\}\\\]\}" \
|
||||||
"-symbol-info-functions --max-results 2"
|
"-symbol-info-functions --max-results 2"
|
||||||
|
|
||||||
mi_gdb_test "124-symbol-info-variables --max-results 3 --name ^\[^_\]" \
|
mi_gdb_test "124-symbol-info-variables --max-results 3 --name ^\[^_\]" \
|
||||||
"124\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[\{line=\"21\",name=\"global_f2\",type=\"int\",description=\"int global_f2;\"\},\{line=\"20\",name=\"global_i2\",type=\"int\",description=\"int global_i2;\"\},\{line=\"19\",name=\"global_f1\",type=\"float\",description=\"static float global_f1;\"\}\\\]\}\\\]\}" \
|
"124\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[$global_f2_re,$global_i2_re,(?:$global_i1_re|$global_f1_s2_re)\\\]\}\\\]\}" \
|
||||||
|
"-symbol-info-types --max-results 3"
|
||||||
|
|
||||||
set s1 "\{line=\"44\",name=\"another_char_t\"\}"
|
|
||||||
set s2 "\{line=\"24\",name=\"another_float_t\"\}"
|
|
||||||
set s3 "\{line=\"23\",name=\"another_int_t\"\}"
|
|
||||||
set s4 "\{line=\"45\",name=\"another_short_t\"\}"
|
|
||||||
mi_gdb_test "125-symbol-info-types --max-results 4 --name another_" \
|
mi_gdb_test "125-symbol-info-types --max-results 4 --name another_" \
|
||||||
"125\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[$s1,$s2,$s3,$s4\\\]\}\\\]\}" \
|
"125\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[$another_char_re,$another_float_re,$another_int_re,$another_short_re\\\]\}\\\]\}" \
|
||||||
"-symbol-info-types --max-results 4"
|
"-symbol-info-types --max-results 4"
|
||||||
|
|||||||
@@ -85,3 +85,15 @@ mi_gdb_test "-var-list-children c1.car.atom" \
|
|||||||
mi_gdb_test "-var-info-path-expression c1.car.atom.ival" \
|
mi_gdb_test "-var-info-path-expression c1.car.atom.ival" \
|
||||||
"\\^error,msg=\".*\"" \
|
"\\^error,msg=\".*\"" \
|
||||||
"-var-info-path-expression c1.car.atom.ival"
|
"-var-info-path-expression c1.car.atom.ival"
|
||||||
|
|
||||||
|
|
||||||
|
# Regression test for a crasher that would occur when deleting a
|
||||||
|
# varobj that held an iterator that hadn't yet been completed.
|
||||||
|
# See PR varobj/28131.
|
||||||
|
mi_gdb_test "-var-create c1_again * &c1" \
|
||||||
|
"\\^done.*" \
|
||||||
|
"-var-create c1_again * &c1"
|
||||||
|
mi_gdb_test "-var-list-children c1_again 0 1" \
|
||||||
|
"\\^done,numchild=\"1\",children=.child=\{name=\"c1_again.car\".*" \
|
||||||
|
"-var-list-children c1_again"
|
||||||
|
mi_delete_varobj c1_again "delete c1_again"
|
||||||
|
|||||||
@@ -32,6 +32,13 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Case 1: libthread_db fakes a single thread with th_unique == NULL.
|
||||||
|
set thread_re1 "0 => $decimal => 0"
|
||||||
|
# Case 2: libthread_db already initialized.
|
||||||
|
set thread_re2 "$hex => $decimal => ${hex}(; errno = 0)?"
|
||||||
|
# Match either of the two cases.
|
||||||
|
set initial_thread_re "($thread_re1|$thread_re2)"
|
||||||
|
|
||||||
with_test_prefix "user-initiated check" {
|
with_test_prefix "user-initiated check" {
|
||||||
|
|
||||||
# User-initiated check with libthread_db not loaded.
|
# User-initiated check with libthread_db not loaded.
|
||||||
@@ -49,18 +56,16 @@ with_test_prefix "user-initiated check" {
|
|||||||
"No libthread_db loaded" \
|
"No libthread_db loaded" \
|
||||||
"no libpthread.so loaded"
|
"no libpthread.so loaded"
|
||||||
|
|
||||||
|
# User-initiated check with NPTL possibly uninitialized.
|
||||||
# User-initiated check with NPTL uninitialized.
|
|
||||||
# libthread_db should fake a single thread with th_unique == NULL.
|
|
||||||
gdb_test "continue" \
|
gdb_test "continue" \
|
||||||
".*Stopped due to shared library event.*Inferior loaded .*libpthread.*"
|
".*Stopped due to shared library event.*Inferior loaded .*libpthread.*"
|
||||||
|
|
||||||
gdb_test_sequence "maint check libthread-db" \
|
gdb_test_sequence "maint check libthread-db" \
|
||||||
"libpthread.so not initialized" {
|
"libpthread.so possibly not initialized" \
|
||||||
"\[\r\n\]+Running libthread_db integrity checks:"
|
[list \
|
||||||
"\[\r\n\]+\[ \]+Got thread 0x0 => \[0-9\]+ => 0x0 ... OK"
|
"\[\r\n\]+Running libthread_db integrity checks:" \
|
||||||
"\[\r\n\]+libthread_db integrity checks passed."
|
"\[\r\n\]+\[ \]+Got thread $initial_thread_re ... OK" \
|
||||||
}
|
"\[\r\n\]+libthread_db integrity checks passed."]
|
||||||
|
|
||||||
# User-initiated check with NPTL fully operational.
|
# User-initiated check with NPTL fully operational.
|
||||||
gdb_test_no_output "set stop-on-solib-events 0"
|
gdb_test_no_output "set stop-on-solib-events 0"
|
||||||
@@ -78,8 +83,8 @@ with_test_prefix "user-initiated check" {
|
|||||||
|
|
||||||
with_test_prefix "automated load-time check" {
|
with_test_prefix "automated load-time check" {
|
||||||
|
|
||||||
# Automated load-time check with NPTL uninitialized.
|
# Automated load-time check with NPTL possibly uninitialized.
|
||||||
with_test_prefix "libpthread.so not initialized" {
|
with_test_prefix "libpthread.so possibly not initialized" {
|
||||||
clean_restart ${binfile}
|
clean_restart ${binfile}
|
||||||
|
|
||||||
gdb_test_no_output "maint set check-libthread-db 1"
|
gdb_test_no_output "maint set check-libthread-db 1"
|
||||||
@@ -88,12 +93,12 @@ with_test_prefix "automated load-time check" {
|
|||||||
gdb_run_cmd
|
gdb_run_cmd
|
||||||
|
|
||||||
gdb_test_sequence "" \
|
gdb_test_sequence "" \
|
||||||
"check debug libthread-db output" {
|
"check debug libthread-db output" \
|
||||||
"\[\r\n\]+Running libthread_db integrity checks:"
|
[list \
|
||||||
"\[\r\n\]+\[ \]+Got thread 0x0 => \[0-9\]+ => 0x0 ... OK"
|
"\[\r\n\]+Running libthread_db integrity checks:" \
|
||||||
"\[\r\n\]+libthread_db integrity checks passed."
|
"\[\r\n\]+\[ \]+Got thread $initial_thread_re ... OK" \
|
||||||
"\[\r\n\]+[Thread debugging using libthread_db enabled]"
|
"\[\r\n\]+libthread_db integrity checks passed." \
|
||||||
}
|
"\[\r\n\]+\\\[Thread debugging using libthread_db enabled\\\]"]
|
||||||
}
|
}
|
||||||
|
|
||||||
# Automated load-time check with NPTL fully operational.
|
# Automated load-time check with NPTL fully operational.
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user