forked from Imagelibrary/binutils-gdb
Compare commits
154 Commits
gdb-8.3-re
...
gdb-8.3.1-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff51bf260c | ||
|
|
dee1672e4f | ||
|
|
60cdff2f22 | ||
|
|
ef93dd73bc | ||
|
|
fe3e346568 | ||
|
|
59047affb0 | ||
|
|
3d80b2e754 | ||
|
|
88f07f28d5 | ||
|
|
5ca0b868fa | ||
|
|
2b0b07b8b6 | ||
|
|
fafa92ec3c | ||
|
|
6f4f8f476a | ||
|
|
74da864345 | ||
|
|
1d5f98eac3 | ||
|
|
c44adce9d5 | ||
|
|
38abece621 | ||
|
|
e0ef9fdab2 | ||
|
|
2d21c7260d | ||
|
|
3b0e664e2f | ||
|
|
e9224f6d80 | ||
|
|
d98f1d629b | ||
|
|
037b23d08d | ||
|
|
ee3857f2e7 | ||
|
|
450c4b5c2a | ||
|
|
db4a63fe54 | ||
|
|
e9ddef0e66 | ||
|
|
30f2a435e5 | ||
|
|
af6b62c780 | ||
|
|
ed14c4a538 | ||
|
|
33ffb2c1b5 | ||
|
|
0a4c3bdb1a | ||
|
|
790ea6e3b3 | ||
|
|
188e561c21 | ||
|
|
061ca9bbc1 | ||
|
|
607a69b8b0 | ||
|
|
4ee05fb967 | ||
|
|
69e0be31ee | ||
|
|
3b5beecae9 | ||
|
|
11e76e8d01 | ||
|
|
727aef8153 | ||
|
|
cf1bc0cd80 | ||
|
|
e967953e28 | ||
|
|
908db690e8 | ||
|
|
e13a1a16d5 | ||
|
|
f36c866169 | ||
|
|
e853d5bce5 | ||
|
|
55f04e741e | ||
|
|
ee479c89ed | ||
|
|
cfa3fa0f41 | ||
|
|
5302b8b344 | ||
|
|
0a04b387e6 | ||
|
|
8d597d0217 | ||
|
|
15a7492a25 | ||
|
|
5a627de47b | ||
|
|
e80cd22e7e | ||
|
|
d8a5975817 | ||
|
|
8ac39635f6 | ||
|
|
7e38ddcb2e | ||
|
|
3b752ac2e6 | ||
|
|
dc5626e838 | ||
|
|
40bfdfcd1a | ||
|
|
b05a7d75b2 | ||
|
|
4de38a3a76 | ||
|
|
15522b80c9 | ||
|
|
98c90f8028 | ||
|
|
0bcd30db25 | ||
|
|
e758a22f82 | ||
|
|
121fe927df | ||
|
|
05e432469a | ||
|
|
708c7c8ea3 | ||
|
|
9c3b4a444a | ||
|
|
b93a00ca4d | ||
|
|
746dfd243d | ||
|
|
8b6767f3b7 | ||
|
|
a5eb8e13d5 | ||
|
|
0281a23925 | ||
|
|
2eb697ef70 | ||
|
|
b741158440 | ||
|
|
4de026046b | ||
|
|
8a0bb7c9cf | ||
|
|
1e2ec04bbb | ||
|
|
c11739d63e | ||
|
|
1185603e67 | ||
|
|
2879fa960d | ||
|
|
6adb346028 | ||
|
|
94648c5870 | ||
|
|
bf5178fce9 | ||
|
|
935e9d9f20 | ||
|
|
1e31ba6536 | ||
|
|
a252e71900 | ||
|
|
b09548933a | ||
|
|
0fee5d8d9b | ||
|
|
3caf9fe243 | ||
|
|
e908e11a4f | ||
|
|
6f3872e420 | ||
|
|
aacdded679 | ||
|
|
4762f10bd5 | ||
|
|
9b06c95d41 | ||
|
|
ba52e3295f | ||
|
|
66263c8cdb | ||
|
|
b6a8c842ba | ||
|
|
d707f03a58 | ||
|
|
76cb58381e | ||
|
|
1dfeef2bc8 | ||
|
|
70a37db2e4 | ||
|
|
568cc1eb75 | ||
|
|
94c98a9880 | ||
|
|
20a60e4cae | ||
|
|
c1ebdd5837 | ||
|
|
402cb29da7 | ||
|
|
0aac89d158 | ||
|
|
bb8a6e0cac | ||
|
|
dd687532a6 | ||
|
|
871d2d33d9 | ||
|
|
73c04885b4 | ||
|
|
ddef9ecd5c | ||
|
|
75d31484a5 | ||
|
|
34a33f9052 | ||
|
|
abe4c19c54 | ||
|
|
a6f14e523b | ||
|
|
759896c081 | ||
|
|
aeb89fc4a2 | ||
|
|
ad9e6d7b30 | ||
|
|
74923ff252 | ||
|
|
59cbd46e2a | ||
|
|
275b4e7df5 | ||
|
|
08d9f6eac5 | ||
|
|
2ebf289fc9 | ||
|
|
59ff5f11e6 | ||
|
|
7e18a384f9 | ||
|
|
7dc4f1d187 | ||
|
|
a022590cba | ||
|
|
0e59a829ca | ||
|
|
b629b1cb7b | ||
|
|
f3514e2bd7 | ||
|
|
9ca7b838b9 | ||
|
|
37844d8af3 | ||
|
|
ca21e65906 | ||
|
|
fc4aeb0cb0 | ||
|
|
88f24dca5c | ||
|
|
f77234d1ac | ||
|
|
41ba5296f4 | ||
|
|
f51eb14ee1 | ||
|
|
5f022de96a | ||
|
|
bb4eaf0525 | ||
|
|
59c391b04d | ||
|
|
404b4cfa15 | ||
|
|
6e8063f794 | ||
|
|
92d8930c87 | ||
|
|
d2e9f688cd | ||
|
|
fd16a08ea3 | ||
|
|
759bd5ef05 | ||
|
|
9c5d0147d8 | ||
|
|
ce22166dc5 |
@@ -1,3 +1,9 @@
|
||||
2019-08-19 Tom Tromey <tom@tromey.com>
|
||||
|
||||
PR gdb/25009
|
||||
* configure: Rebuild.
|
||||
* configure.ac: Add --with-static-standard-libraries.
|
||||
|
||||
2018-06-24 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
2.32 branch created.
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
In releases, the date is not included in either version strings or
|
||||
sonames. */
|
||||
#define BFD_VERSION_DATE 20190511
|
||||
#define BFD_VERSION_DATE 20190920
|
||||
#define BFD_VERSION @bfd_version@
|
||||
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
|
||||
#define REPORT_BUGS_TO @report_bugs_to@
|
||||
|
||||
24
configure
vendored
24
configure
vendored
@@ -802,6 +802,7 @@ with_gmp
|
||||
with_gmp_include
|
||||
with_gmp_lib
|
||||
with_stage1_libs
|
||||
with_static_standard_libraries
|
||||
with_stage1_ldflags
|
||||
with_boot_libs
|
||||
with_boot_ldflags
|
||||
@@ -1572,6 +1573,9 @@ Optional Packages:
|
||||
--with-gmp-include=PATH specify directory for installed GMP include files
|
||||
--with-gmp-lib=PATH specify directory for the installed GMP library
|
||||
--with-stage1-libs=LIBS libraries for stage1
|
||||
--with-static-standard-libraries
|
||||
use -static-libstdc++ and -static-libgcc
|
||||
(default=auto)
|
||||
--with-stage1-ldflags=FLAGS
|
||||
linker flags for stage1
|
||||
--with-boot-libs=LIBS libraries for stage2 and later
|
||||
@@ -5824,6 +5828,23 @@ fi
|
||||
|
||||
|
||||
|
||||
# Whether or not to use -static-libstdc++ and -static-libgcc. The
|
||||
# default is yes if gcc is being built; no otherwise. The reason for
|
||||
# this default is that gdb is sometimes linked against GNU Source
|
||||
# Highlight, which is a shared library that uses C++ exceptions. In
|
||||
# this case, -static-libstdc++ will cause crashes.
|
||||
|
||||
# Check whether --with-static-standard-libraries was given.
|
||||
if test "${with_static_standard_libraries+set}" = set; then :
|
||||
withval=$with_static_standard_libraries;
|
||||
else
|
||||
with_static_standard_libraries=auto
|
||||
fi
|
||||
|
||||
if test "$with_static_standard_libraries" = auto; then
|
||||
with_static_standard_libraries=$have_compiler
|
||||
fi
|
||||
|
||||
# Linker flags to use for stage1 or when not bootstrapping.
|
||||
|
||||
# Check whether --with-stage1-ldflags was given.
|
||||
@@ -5838,7 +5859,8 @@ else
|
||||
# In stage 1, default to linking libstdc++ and libgcc statically with GCC
|
||||
# if supported. But if the user explicitly specified the libraries to use,
|
||||
# trust that they are doing what they want.
|
||||
if test "$stage1_libs" = "" -a "$have_static_libs" = yes; then
|
||||
if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \
|
||||
-a "$have_static_libs" = yes; then
|
||||
stage1_ldflags="-static-libstdc++ -static-libgcc"
|
||||
fi
|
||||
fi
|
||||
|
||||
16
configure.ac
16
configure.ac
@@ -1602,6 +1602,19 @@ AC_ARG_WITH(stage1-libs,
|
||||
[stage1_libs=])
|
||||
AC_SUBST(stage1_libs)
|
||||
|
||||
# Whether or not to use -static-libstdc++ and -static-libgcc. The
|
||||
# default is yes if gcc is being built; no otherwise. The reason for
|
||||
# this default is that gdb is sometimes linked against GNU Source
|
||||
# Highlight, which is a shared library that uses C++ exceptions. In
|
||||
# this case, -static-libstdc++ will cause crashes.
|
||||
AC_ARG_WITH(static-standard-libraries,
|
||||
[AS_HELP_STRING([--with-static-standard-libraries],
|
||||
[use -static-libstdc++ and -static-libgcc (default=auto)])],
|
||||
[], [with_static_standard_libraries=auto])
|
||||
if test "$with_static_standard_libraries" = auto; then
|
||||
with_static_standard_libraries=$have_compiler
|
||||
fi
|
||||
|
||||
# Linker flags to use for stage1 or when not bootstrapping.
|
||||
AC_ARG_WITH(stage1-ldflags,
|
||||
[AS_HELP_STRING([--with-stage1-ldflags=FLAGS], [linker flags for stage1])],
|
||||
@@ -1614,7 +1627,8 @@ AC_ARG_WITH(stage1-ldflags,
|
||||
# In stage 1, default to linking libstdc++ and libgcc statically with GCC
|
||||
# if supported. But if the user explicitly specified the libraries to use,
|
||||
# trust that they are doing what they want.
|
||||
if test "$stage1_libs" = "" -a "$have_static_libs" = yes; then
|
||||
if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \
|
||||
-a "$have_static_libs" = yes; then
|
||||
stage1_ldflags="-static-libstdc++ -static-libgcc"
|
||||
fi])
|
||||
AC_SUBST(stage1_ldflags)
|
||||
|
||||
@@ -1,3 +1,78 @@
|
||||
2019-09-20 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* version.in: Set GDB version number to 8.3.1.
|
||||
|
||||
2019-08-19 Tom Tromey <tom@tromey.com>
|
||||
|
||||
PR gdb/25009
|
||||
* configure: Rebuild.
|
||||
* configure.ac: Disallow the combination of -static-libstdc++ and
|
||||
source highlight.
|
||||
* source-cache.c (get_language_name): Handle rust.
|
||||
(source_cache::get_source_lines): Ignore highlighting exceptions.
|
||||
|
||||
2019-06-28 Sergio Durigan Junior <sergiodj@redhat.com>
|
||||
|
||||
PR breakpoints/24541
|
||||
* gdbarch.c: Regenerate.
|
||||
* gdbarch.h: Regenerate.
|
||||
* gdbarch.sh: Add 'stap_adjust_register'.
|
||||
* i386-tdep.c: Include '<unordered_set>'.
|
||||
(i386_stap_adjust_register): New function.
|
||||
(i386_elf_init_abi): Register 'i386_stap_adjust_register'.
|
||||
* stap-probe.c (stap_parse_register_operand): Call
|
||||
'gdbarch_stap_adjust_register'.
|
||||
|
||||
2019-05-16 Sergio Durigan Junior <sergiodj@redhat.com>
|
||||
|
||||
PR breakpoints/24541
|
||||
* stap-probe.c (stap_parse_register_operand): Make "regname" an
|
||||
"std::string", simplifying the algorithm.
|
||||
|
||||
2019-05-28 Alan Hayward <alan.hayward@arm.com>
|
||||
|
||||
PR gdb/25010
|
||||
* event-top.c: Remove include comment.
|
||||
* inflow.c (class scoped_ignore_sigttou): Move from here...
|
||||
* inflow.h (class scoped_ignore_sigttou): ...to here.
|
||||
* ser-unix.c (hardwire_drain_output): Block SIGTTOU during drain.
|
||||
* top.c: Remove include comment.
|
||||
|
||||
2019-08-04 Alan Hayward <alan.hayward@arm.com>
|
||||
|
||||
PR breakpoints/25011
|
||||
* symfile.c (symbol_file_command): Call solib_create_inferior_hook.
|
||||
|
||||
2019-05-29 Tom Tromey <tromey@adacore.com>
|
||||
|
||||
PR c++/20020:
|
||||
* cp-valprint.c (cp_print_value_fields): Call
|
||||
cp_print_static_field inside "try".
|
||||
|
||||
2019-06-10 Tom de Vries <tdevries@suse.de>
|
||||
|
||||
PR symtab/24545
|
||||
* symtab.c (struct demangled_name_entry): Add language field.
|
||||
(symbol_set_names): Revert "[gdb/symtab] Fix language of duplicate
|
||||
static minimal symbol". Set and use language field.
|
||||
|
||||
2019-04-10 Kevin Buettner <kevinb@redhat.com>
|
||||
|
||||
PR gdb/24592
|
||||
* amd64-linux-nat.c (amd64_linux_collect_native_gregset): New
|
||||
function.
|
||||
(fill_gregset): Call amd64_linux_collect_native_gregset instead
|
||||
of amd64_collect_native_gregset.
|
||||
(amd64_linux_nat_target::store_registers): Likewise.
|
||||
|
||||
2019-05-11 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* version.in: Set GDB version number to 8.3.0.DATE-git.
|
||||
|
||||
2019-05-11 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
GDB 8.3 released.
|
||||
|
||||
2019-05-11 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* version.in: Set GDB version number to 8.3.
|
||||
|
||||
@@ -92,6 +92,71 @@ static int amd64_linux_gregset32_reg_offset[] =
|
||||
/* Transfering the general-purpose registers between GDB, inferiors
|
||||
and core files. */
|
||||
|
||||
/* See amd64_collect_native_gregset. This linux specific version handles
|
||||
issues with negative EAX values not being restored correctly upon syscall
|
||||
return when debugging 32-bit targets. It has no effect on 64-bit
|
||||
targets. */
|
||||
|
||||
static void
|
||||
amd64_linux_collect_native_gregset (const struct regcache *regcache,
|
||||
void *gregs, int regnum)
|
||||
{
|
||||
amd64_collect_native_gregset (regcache, gregs, regnum);
|
||||
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 32)
|
||||
{
|
||||
/* Sign extend EAX value to avoid potential syscall restart
|
||||
problems.
|
||||
|
||||
On Linux, when a syscall is interrupted by a signal, the
|
||||
(kernel function implementing the) syscall may return
|
||||
-ERESTARTSYS when a signal occurs. Doing so indicates that
|
||||
the syscall is restartable. Then, depending on settings
|
||||
associated with the signal handler, and after the signal
|
||||
handler is called, the kernel can then either return -EINTR
|
||||
or it can cause the syscall to be restarted. We are
|
||||
concerned with the latter case here.
|
||||
|
||||
On (32-bit) i386, the status (-ERESTARTSYS) is placed in the
|
||||
EAX register. When debugging a 32-bit process from a 64-bit
|
||||
(amd64) GDB, the debugger fetches 64-bit registers even
|
||||
though the process being debugged is only 32-bit. The
|
||||
register cache is only 32 bits wide though; GDB discards the
|
||||
high 32 bits when placing 64-bit values in the 32-bit
|
||||
regcache. Normally, this is not a problem since the 32-bit
|
||||
process should only care about the lower 32-bit portions of
|
||||
these registers. That said, it can happen that the 64-bit
|
||||
value being restored will be different from the 64-bit value
|
||||
that was originally retrieved from the kernel. The one place
|
||||
(that we know of) where it does matter is in the kernel's
|
||||
syscall restart code. The kernel's code for restarting a
|
||||
syscall after a signal expects to see a negative value
|
||||
(specifically -ERESTARTSYS) in the 64-bit RAX register in
|
||||
order to correctly cause a syscall to be restarted.
|
||||
|
||||
The call to amd64_collect_native_gregset, above, is setting
|
||||
the high 32 bits of RAX (and other registers too) to 0. For
|
||||
syscall restart, we need to sign extend EAX so that RAX will
|
||||
appear as a negative value when EAX is set to -ERESTARTSYS.
|
||||
This in turn will cause the signal handling code in the
|
||||
kernel to recognize -ERESTARTSYS which will in turn cause the
|
||||
syscall to be restarted.
|
||||
|
||||
The test case gdb.base/interrupt.exp tests for this problem.
|
||||
Without this sign extension code in place, it'll show
|
||||
a number of failures when testing against unix/-m32. */
|
||||
|
||||
if (regnum == -1 || regnum == I386_EAX_REGNUM)
|
||||
{
|
||||
void *ptr = ((gdb_byte *) gregs
|
||||
+ amd64_linux_gregset32_reg_offset[I386_EAX_REGNUM]);
|
||||
|
||||
*(int64_t *) ptr = *(int32_t *) ptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Fill GDB's register cache with the general-purpose register values
|
||||
in *GREGSETP. */
|
||||
|
||||
@@ -109,7 +174,7 @@ void
|
||||
fill_gregset (const struct regcache *regcache,
|
||||
elf_gregset_t *gregsetp, int regnum)
|
||||
{
|
||||
amd64_collect_native_gregset (regcache, gregsetp, regnum);
|
||||
amd64_linux_collect_native_gregset (regcache, gregsetp, regnum);
|
||||
}
|
||||
|
||||
/* Transfering floating-point registers between GDB, inferiors and cores. */
|
||||
@@ -237,7 +302,7 @@ amd64_linux_nat_target::store_registers (struct regcache *regcache, int regnum)
|
||||
if (ptrace (PTRACE_GETREGS, tid, 0, (long) ®s) < 0)
|
||||
perror_with_name (_("Couldn't get registers"));
|
||||
|
||||
amd64_collect_native_gregset (regcache, ®s, regnum);
|
||||
amd64_linux_collect_native_gregset (regcache, ®s, regnum);
|
||||
|
||||
if (ptrace (PTRACE_SETREGS, tid, 0, (long) ®s) < 0)
|
||||
perror_with_name (_("Couldn't write registers"));
|
||||
|
||||
6
gdb/configure
vendored
6
gdb/configure
vendored
@@ -11503,6 +11503,12 @@ $as_echo "no - pkg-config not found" >&6; }
|
||||
as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
|
||||
fi
|
||||
else
|
||||
case "$LDFLAGS" in
|
||||
*static-libstdc*)
|
||||
as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
|
||||
;;
|
||||
esac
|
||||
|
||||
if ${pkg_config_prog_path} --exists source-highlight; then
|
||||
SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
|
||||
SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
|
||||
|
||||
@@ -1251,6 +1251,14 @@ if test "${enable_source_highlight}" != "no"; then
|
||||
AC_MSG_ERROR([pkg-config was not found in your system])
|
||||
fi
|
||||
else
|
||||
case "$LDFLAGS" in
|
||||
*static-libstdc*)
|
||||
AC_MSG_ERROR([source highlight is incompatible with -static-libstdc++; dnl
|
||||
either use --disable-source-highlight or dnl
|
||||
--without-static-standard-libraries])
|
||||
;;
|
||||
esac
|
||||
|
||||
if ${pkg_config_prog_path} --exists source-highlight; then
|
||||
SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
|
||||
SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
|
||||
|
||||
@@ -314,13 +314,14 @@ cp_print_value_fields (struct type *type, struct type *real_type,
|
||||
}
|
||||
else if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
{
|
||||
struct value *v = NULL;
|
||||
|
||||
TRY
|
||||
{
|
||||
v = value_static_field (type, i);
|
||||
}
|
||||
struct value *v = value_static_field (type, i);
|
||||
|
||||
cp_print_static_field (TYPE_FIELD_TYPE (type, i),
|
||||
v, stream, recurse + 1,
|
||||
options);
|
||||
}
|
||||
CATCH (ex, RETURN_MASK_ERROR)
|
||||
{
|
||||
fprintf_filtered (stream,
|
||||
@@ -328,10 +329,6 @@ cp_print_value_fields (struct type *type, struct type *real_type,
|
||||
ex.message);
|
||||
}
|
||||
END_CATCH
|
||||
|
||||
cp_print_static_field (TYPE_FIELD_TYPE (type, i),
|
||||
v, stream, recurse + 1,
|
||||
options);
|
||||
}
|
||||
else if (i == vptr_fieldno && type == vptr_basetype)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "inferior.h"
|
||||
#include "infrun.h"
|
||||
#include "target.h"
|
||||
#include "terminal.h" /* for job_control */
|
||||
#include "terminal.h"
|
||||
#include "event-loop.h"
|
||||
#include "event-top.h"
|
||||
#include "interps.h"
|
||||
|
||||
@@ -323,6 +323,7 @@ struct gdbarch
|
||||
const char * stap_gdb_register_suffix;
|
||||
gdbarch_stap_is_single_operand_ftype *stap_is_single_operand;
|
||||
gdbarch_stap_parse_special_token_ftype *stap_parse_special_token;
|
||||
gdbarch_stap_adjust_register_ftype *stap_adjust_register;
|
||||
gdbarch_dtrace_parse_probe_argument_ftype *dtrace_parse_probe_argument;
|
||||
gdbarch_dtrace_probe_is_enabled_ftype *dtrace_probe_is_enabled;
|
||||
gdbarch_dtrace_enable_probe_ftype *dtrace_enable_probe;
|
||||
@@ -685,6 +686,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
|
||||
/* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
|
||||
/* Skip verify of stap_is_single_operand, has predicate. */
|
||||
/* Skip verify of stap_parse_special_token, has predicate. */
|
||||
/* Skip verify of stap_adjust_register, has predicate. */
|
||||
/* Skip verify of dtrace_parse_probe_argument, has predicate. */
|
||||
/* Skip verify of dtrace_probe_is_enabled, has predicate. */
|
||||
/* Skip verify of dtrace_enable_probe, has predicate. */
|
||||
@@ -1388,6 +1390,12 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: stack_frame_destroyed_p = <%s>\n",
|
||||
host_address_to_string (gdbarch->stack_frame_destroyed_p));
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: gdbarch_stap_adjust_register_p() = %d\n",
|
||||
gdbarch_stap_adjust_register_p (gdbarch));
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: stap_adjust_register = <%s>\n",
|
||||
host_address_to_string (gdbarch->stap_adjust_register));
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: stap_gdb_register_prefix = %s\n",
|
||||
pstring (gdbarch->stap_gdb_register_prefix));
|
||||
@@ -4483,6 +4491,30 @@ set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch,
|
||||
gdbarch->stap_parse_special_token = stap_parse_special_token;
|
||||
}
|
||||
|
||||
int
|
||||
gdbarch_stap_adjust_register_p (struct gdbarch *gdbarch)
|
||||
{
|
||||
gdb_assert (gdbarch != NULL);
|
||||
return gdbarch->stap_adjust_register != NULL;
|
||||
}
|
||||
|
||||
void
|
||||
gdbarch_stap_adjust_register (struct gdbarch *gdbarch, struct stap_parse_info *p, std::string ®name, int regnum)
|
||||
{
|
||||
gdb_assert (gdbarch != NULL);
|
||||
gdb_assert (gdbarch->stap_adjust_register != NULL);
|
||||
if (gdbarch_debug >= 2)
|
||||
fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_adjust_register called\n");
|
||||
gdbarch->stap_adjust_register (gdbarch, p, regname, regnum);
|
||||
}
|
||||
|
||||
void
|
||||
set_gdbarch_stap_adjust_register (struct gdbarch *gdbarch,
|
||||
gdbarch_stap_adjust_register_ftype stap_adjust_register)
|
||||
{
|
||||
gdbarch->stap_adjust_register = stap_adjust_register;
|
||||
}
|
||||
|
||||
int
|
||||
gdbarch_dtrace_parse_probe_argument_p (struct gdbarch *gdbarch)
|
||||
{
|
||||
|
||||
@@ -1338,6 +1338,36 @@ typedef int (gdbarch_stap_parse_special_token_ftype) (struct gdbarch *gdbarch, s
|
||||
extern int gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p);
|
||||
extern void set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, gdbarch_stap_parse_special_token_ftype *stap_parse_special_token);
|
||||
|
||||
/* Perform arch-dependent adjustments to a register name.
|
||||
|
||||
In very specific situations, it may be necessary for the register
|
||||
name present in a SystemTap probe's argument to be handled in a
|
||||
special way. For example, on i386, GCC may over-optimize the
|
||||
register allocation and use smaller registers than necessary. In
|
||||
such cases, the client that is reading and evaluating the SystemTap
|
||||
probe (ourselves) will need to actually fetch values from the wider
|
||||
version of the register in question.
|
||||
|
||||
To illustrate the example, consider the following probe argument
|
||||
(i386):
|
||||
|
||||
4@%ax
|
||||
|
||||
This argument says that its value can be found at the %ax register,
|
||||
which is a 16-bit register. However, the argument's prefix says
|
||||
that its type is "uint32_t", which is 32-bit in size. Therefore, in
|
||||
this case, GDB should actually fetch the probe's value from register
|
||||
%eax, not %ax. In this scenario, this function would actually
|
||||
replace the register name from %ax to %eax.
|
||||
|
||||
The rationale for this can be found at PR breakpoints/24541. */
|
||||
|
||||
extern int gdbarch_stap_adjust_register_p (struct gdbarch *gdbarch);
|
||||
|
||||
typedef void (gdbarch_stap_adjust_register_ftype) (struct gdbarch *gdbarch, struct stap_parse_info *p, std::string ®name, int regnum);
|
||||
extern void gdbarch_stap_adjust_register (struct gdbarch *gdbarch, struct stap_parse_info *p, std::string ®name, int regnum);
|
||||
extern void set_gdbarch_stap_adjust_register (struct gdbarch *gdbarch, gdbarch_stap_adjust_register_ftype *stap_adjust_register);
|
||||
|
||||
/* DTrace related functions.
|
||||
The expression to compute the NARTGth+1 argument to a DTrace USDT probe.
|
||||
NARG must be >= 0. */
|
||||
|
||||
@@ -1022,6 +1022,31 @@ M;int;stap_is_single_operand;const char *s;s
|
||||
# parser), and should advance the buffer pointer (p->arg).
|
||||
M;int;stap_parse_special_token;struct stap_parse_info *p;p
|
||||
|
||||
# Perform arch-dependent adjustments to a register name.
|
||||
#
|
||||
# In very specific situations, it may be necessary for the register
|
||||
# name present in a SystemTap probe's argument to be handled in a
|
||||
# special way. For example, on i386, GCC may over-optimize the
|
||||
# register allocation and use smaller registers than necessary. In
|
||||
# such cases, the client that is reading and evaluating the SystemTap
|
||||
# probe (ourselves) will need to actually fetch values from the wider
|
||||
# version of the register in question.
|
||||
#
|
||||
# To illustrate the example, consider the following probe argument
|
||||
# (i386):
|
||||
#
|
||||
# 4@%ax
|
||||
#
|
||||
# This argument says that its value can be found at the %ax register,
|
||||
# which is a 16-bit register. However, the argument's prefix says
|
||||
# that its type is "uint32_t", which is 32-bit in size. Therefore, in
|
||||
# this case, GDB should actually fetch the probe's value from register
|
||||
# %eax, not %ax. In this scenario, this function would actually
|
||||
# replace the register name from %ax to %eax.
|
||||
#
|
||||
# The rationale for this can be found at PR breakpoints/24541.
|
||||
M;void;stap_adjust_register;struct stap_parse_info *p, std::string \®name, int regnum;p, regname, regnum
|
||||
|
||||
# DTrace related functions.
|
||||
|
||||
# The expression to compute the NARTGth+1 argument to a DTrace USDT probe.
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
2019-05-06 Kevin Buettner <kevinb@redhat.com>
|
||||
|
||||
PR gdb/24592
|
||||
* linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
|
||||
sign extension code on 32-bit builds.
|
||||
|
||||
2019-04-10 Kevin Buettner <kevinb@redhat.com>
|
||||
|
||||
PR gdb/24592
|
||||
* linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
|
||||
when using a 64-bit gdbserver.
|
||||
|
||||
2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
|
||||
|
||||
* configure.srv: Use '$enable_unittest' instead of '$development'
|
||||
|
||||
@@ -338,6 +338,21 @@ x86_fill_gregset (struct regcache *regcache, void *buf)
|
||||
|
||||
collect_register_by_name (regcache, "orig_eax",
|
||||
((char *) buf) + ORIG_EAX * REGSIZE);
|
||||
|
||||
#ifdef __x86_64__
|
||||
/* Sign extend EAX value to avoid potential syscall restart
|
||||
problems.
|
||||
|
||||
See amd64_linux_collect_native_gregset() in gdb/amd64-linux-nat.c
|
||||
for a detailed explanation. */
|
||||
if (register_size (regcache->tdesc, 0) == 4)
|
||||
{
|
||||
void *ptr = ((gdb_byte *) buf
|
||||
+ i386_regmap[find_regno (regcache->tdesc, "eax")]);
|
||||
|
||||
*(int64_t *) ptr = *(int32_t *) ptr;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
#include "parser-defs.h"
|
||||
#include <ctype.h>
|
||||
#include <algorithm>
|
||||
#include <unordered_set>
|
||||
|
||||
/* Register names. */
|
||||
|
||||
@@ -4388,6 +4389,32 @@ i386_stap_parse_special_token (struct gdbarch *gdbarch,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Implementation of 'gdbarch_stap_adjust_register', as defined in
|
||||
gdbarch.h. */
|
||||
|
||||
static void
|
||||
i386_stap_adjust_register (struct gdbarch *gdbarch, struct stap_parse_info *p,
|
||||
std::string ®name, int regnum)
|
||||
{
|
||||
static const std::unordered_set<std::string> reg_assoc
|
||||
= { "ax", "bx", "cx", "dx",
|
||||
"si", "di", "bp", "sp" };
|
||||
|
||||
if (register_size (gdbarch, regnum) >= TYPE_LENGTH (p->arg_type))
|
||||
{
|
||||
/* If we're dealing with a register whose size is greater or
|
||||
equal than the size specified by the "[-]N@" prefix, then we
|
||||
don't need to do anything. */
|
||||
return;
|
||||
}
|
||||
|
||||
if (reg_assoc.find (regname) != reg_assoc.end ())
|
||||
{
|
||||
/* Use the extended version of the register. */
|
||||
regname = "e" + regname;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* gdbarch gnu_triplet_regexp method. Both arches are acceptable as GDB always
|
||||
@@ -4436,6 +4463,8 @@ i386_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
i386_stap_is_single_operand);
|
||||
set_gdbarch_stap_parse_special_token (gdbarch,
|
||||
i386_stap_parse_special_token);
|
||||
set_gdbarch_stap_adjust_register (gdbarch,
|
||||
i386_stap_adjust_register);
|
||||
|
||||
set_gdbarch_in_indirect_branch_thunk (gdbarch,
|
||||
i386_in_indirect_branch_thunk);
|
||||
|
||||
29
gdb/inflow.c
29
gdb/inflow.c
@@ -103,35 +103,6 @@ static serial_ttystate initial_gdb_ttystate;
|
||||
|
||||
static struct terminal_info *get_inflow_inferior_data (struct inferior *);
|
||||
|
||||
/* RAII class used to ignore SIGTTOU in a scope. */
|
||||
|
||||
class scoped_ignore_sigttou
|
||||
{
|
||||
public:
|
||||
scoped_ignore_sigttou ()
|
||||
{
|
||||
#ifdef SIGTTOU
|
||||
if (job_control)
|
||||
m_osigttou = signal (SIGTTOU, SIG_IGN);
|
||||
#endif
|
||||
}
|
||||
|
||||
~scoped_ignore_sigttou ()
|
||||
{
|
||||
#ifdef SIGTTOU
|
||||
if (job_control)
|
||||
signal (SIGTTOU, m_osigttou);
|
||||
#endif
|
||||
}
|
||||
|
||||
DISABLE_COPY_AND_ASSIGN (scoped_ignore_sigttou);
|
||||
|
||||
private:
|
||||
#ifdef SIGTTOU
|
||||
sighandler_t m_osigttou = NULL;
|
||||
#endif
|
||||
};
|
||||
|
||||
/* While the inferior is running, we want SIGINT and SIGQUIT to go to the
|
||||
inferior only. If we have job control, that takes care of it. If not,
|
||||
we save our handlers in these two variables and set SIGINT and SIGQUIT
|
||||
|
||||
31
gdb/inflow.h
31
gdb/inflow.h
@@ -21,5 +21,36 @@
|
||||
#define INFLOW_H
|
||||
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include "common/job-control.h"
|
||||
|
||||
/* RAII class used to ignore SIGTTOU in a scope. */
|
||||
|
||||
class scoped_ignore_sigttou
|
||||
{
|
||||
public:
|
||||
scoped_ignore_sigttou ()
|
||||
{
|
||||
#ifdef SIGTTOU
|
||||
if (job_control)
|
||||
m_osigttou = signal (SIGTTOU, SIG_IGN);
|
||||
#endif
|
||||
}
|
||||
|
||||
~scoped_ignore_sigttou ()
|
||||
{
|
||||
#ifdef SIGTTOU
|
||||
if (job_control)
|
||||
signal (SIGTTOU, m_osigttou);
|
||||
#endif
|
||||
}
|
||||
|
||||
DISABLE_COPY_AND_ASSIGN (scoped_ignore_sigttou);
|
||||
|
||||
private:
|
||||
#ifdef SIGTTOU
|
||||
sighandler_t m_osigttou = NULL;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* inflow.h */
|
||||
|
||||
31
gdb/infrun.c
31
gdb/infrun.c
@@ -914,10 +914,14 @@ handle_vfork_child_exec_or_exit (int exec)
|
||||
int resume_parent = -1;
|
||||
|
||||
/* This exec or exit marks the end of the shared memory region
|
||||
between the parent and the child. If the user wanted to
|
||||
detach from the parent, now is the time. */
|
||||
between the parent and the child. Break the bonds. */
|
||||
inferior *vfork_parent = inf->vfork_parent;
|
||||
inf->vfork_parent->vfork_child = NULL;
|
||||
inf->vfork_parent = NULL;
|
||||
|
||||
if (inf->vfork_parent->pending_detach)
|
||||
/* If the user wanted to detach from the parent, now is the
|
||||
time. */
|
||||
if (vfork_parent->pending_detach)
|
||||
{
|
||||
struct thread_info *tp;
|
||||
struct program_space *pspace;
|
||||
@@ -925,7 +929,7 @@ handle_vfork_child_exec_or_exit (int exec)
|
||||
|
||||
/* follow-fork child, detach-on-fork on. */
|
||||
|
||||
inf->vfork_parent->pending_detach = 0;
|
||||
vfork_parent->pending_detach = 0;
|
||||
|
||||
gdb::optional<scoped_restore_exited_inferior>
|
||||
maybe_restore_inferior;
|
||||
@@ -940,7 +944,7 @@ handle_vfork_child_exec_or_exit (int exec)
|
||||
maybe_restore_thread.emplace ();
|
||||
|
||||
/* We're letting loose of the parent. */
|
||||
tp = any_live_thread_of_inferior (inf->vfork_parent);
|
||||
tp = any_live_thread_of_inferior (vfork_parent);
|
||||
switch_to_thread (tp);
|
||||
|
||||
/* We're about to detach from the parent, which implicitly
|
||||
@@ -963,7 +967,7 @@ handle_vfork_child_exec_or_exit (int exec)
|
||||
if (print_inferior_events)
|
||||
{
|
||||
const char *pidstr
|
||||
= target_pid_to_str (ptid_t (inf->vfork_parent->pid));
|
||||
= target_pid_to_str (ptid_t (vfork_parent->pid));
|
||||
|
||||
target_terminal::ours_for_output ();
|
||||
|
||||
@@ -981,7 +985,7 @@ handle_vfork_child_exec_or_exit (int exec)
|
||||
}
|
||||
}
|
||||
|
||||
target_detach (inf->vfork_parent, 0);
|
||||
target_detach (vfork_parent, 0);
|
||||
|
||||
/* Put it back. */
|
||||
inf->pspace = pspace;
|
||||
@@ -996,10 +1000,7 @@ handle_vfork_child_exec_or_exit (int exec)
|
||||
inf->removable = 1;
|
||||
set_current_program_space (inf->pspace);
|
||||
|
||||
resume_parent = inf->vfork_parent->pid;
|
||||
|
||||
/* Break the bonds. */
|
||||
inf->vfork_parent->vfork_child = NULL;
|
||||
resume_parent = vfork_parent->pid;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1029,17 +1030,13 @@ handle_vfork_child_exec_or_exit (int exec)
|
||||
set_current_program_space (pspace);
|
||||
inf->removable = 1;
|
||||
inf->symfile_flags = SYMFILE_NO_READ;
|
||||
clone_program_space (pspace, inf->vfork_parent->pspace);
|
||||
clone_program_space (pspace, vfork_parent->pspace);
|
||||
inf->pspace = pspace;
|
||||
inf->aspace = pspace->aspace;
|
||||
|
||||
resume_parent = inf->vfork_parent->pid;
|
||||
/* Break the bonds. */
|
||||
inf->vfork_parent->vfork_child = NULL;
|
||||
resume_parent = vfork_parent->pid;
|
||||
}
|
||||
|
||||
inf->vfork_parent = NULL;
|
||||
|
||||
gdb_assert (current_program_space == inf->pspace);
|
||||
|
||||
if (non_stop && resume_parent != -1)
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "gdbcmd.h"
|
||||
#include "common/filestuff.h"
|
||||
#include <termios.h>
|
||||
#include "inflow.h"
|
||||
|
||||
struct hardwire_ttystate
|
||||
{
|
||||
@@ -164,6 +165,9 @@ hardwire_print_tty_state (struct serial *scb,
|
||||
static int
|
||||
hardwire_drain_output (struct serial *scb)
|
||||
{
|
||||
/* Ignore SIGTTOU which may occur during the drain. */
|
||||
scoped_ignore_sigttou ignore_sigttou;
|
||||
|
||||
return tcdrain (scb->fd);
|
||||
}
|
||||
|
||||
|
||||
@@ -156,8 +156,7 @@ get_language_name (enum language lang)
|
||||
break;
|
||||
|
||||
case language_rust:
|
||||
/* Not handled by Source Highlight. */
|
||||
break;
|
||||
return "rust.lang";
|
||||
|
||||
case language_ada:
|
||||
return "ada.lang";
|
||||
@@ -213,21 +212,33 @@ source_cache::get_source_lines (struct symtab *s, int first_line,
|
||||
use-after-free. */
|
||||
fullname = symtab_to_fullname (s);
|
||||
}
|
||||
srchilite::SourceHighlight highlighter ("esc.outlang");
|
||||
highlighter.setStyleFile("esc.style");
|
||||
try
|
||||
{
|
||||
srchilite::SourceHighlight highlighter ("esc.outlang");
|
||||
highlighter.setStyleFile("esc.style");
|
||||
|
||||
std::ostringstream output;
|
||||
highlighter.highlight (input, output, lang_name, fullname);
|
||||
std::ostringstream output;
|
||||
highlighter.highlight (input, output, lang_name, fullname);
|
||||
|
||||
source_text result = { fullname, output.str () };
|
||||
m_source_map.push_back (std::move (result));
|
||||
source_text result = { fullname, output.str () };
|
||||
m_source_map.push_back (std::move (result));
|
||||
|
||||
if (m_source_map.size () > MAX_ENTRIES)
|
||||
m_source_map.erase (m_source_map.begin ());
|
||||
if (m_source_map.size () > MAX_ENTRIES)
|
||||
m_source_map.erase (m_source_map.begin ());
|
||||
|
||||
*lines = extract_lines (m_source_map.back (), first_line,
|
||||
last_line);
|
||||
return true;
|
||||
*lines = extract_lines (m_source_map.back (), first_line,
|
||||
last_line);
|
||||
return true;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
/* Source Highlight will throw an exception if
|
||||
highlighting fails. One possible reason it can fail
|
||||
is if the language is unknown -- which matters to gdb
|
||||
because Rust support wasn't added until after 3.1.8.
|
||||
Ignore exceptions here and fall back to
|
||||
un-highlighted text. */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -684,12 +684,8 @@ stap_parse_register_operand (struct stap_parse_info *p)
|
||||
/* Variables used to extract the register name from the probe's
|
||||
argument. */
|
||||
const char *start;
|
||||
char *regname;
|
||||
int len;
|
||||
const char *gdb_reg_prefix = gdbarch_stap_gdb_register_prefix (gdbarch);
|
||||
int gdb_reg_prefix_len = gdb_reg_prefix ? strlen (gdb_reg_prefix) : 0;
|
||||
const char *gdb_reg_suffix = gdbarch_stap_gdb_register_suffix (gdbarch);
|
||||
int gdb_reg_suffix_len = gdb_reg_suffix ? strlen (gdb_reg_suffix) : 0;
|
||||
const char *reg_prefix;
|
||||
const char *reg_ind_prefix;
|
||||
const char *reg_suffix;
|
||||
@@ -751,37 +747,54 @@ stap_parse_register_operand (struct stap_parse_info *p)
|
||||
while (isalnum (*p->arg))
|
||||
++p->arg;
|
||||
|
||||
len = p->arg - start;
|
||||
|
||||
regname = (char *) alloca (len + gdb_reg_prefix_len + gdb_reg_suffix_len + 1);
|
||||
regname[0] = '\0';
|
||||
std::string regname (start, p->arg - start);
|
||||
|
||||
/* We only add the GDB's register prefix/suffix if we are dealing with
|
||||
a numeric register. */
|
||||
if (gdb_reg_prefix && isdigit (*start))
|
||||
if (isdigit (*start))
|
||||
{
|
||||
strncpy (regname, gdb_reg_prefix, gdb_reg_prefix_len);
|
||||
strncpy (regname + gdb_reg_prefix_len, start, len);
|
||||
if (gdb_reg_prefix != NULL)
|
||||
regname = gdb_reg_prefix + regname;
|
||||
|
||||
if (gdb_reg_suffix)
|
||||
strncpy (regname + gdb_reg_prefix_len + len,
|
||||
gdb_reg_suffix, gdb_reg_suffix_len);
|
||||
|
||||
len += gdb_reg_prefix_len + gdb_reg_suffix_len;
|
||||
if (gdb_reg_suffix != NULL)
|
||||
regname += gdb_reg_suffix;
|
||||
}
|
||||
else
|
||||
strncpy (regname, start, len);
|
||||
|
||||
regname[len] = '\0';
|
||||
int regnum = user_reg_map_name_to_regnum (gdbarch, regname.c_str (),
|
||||
regname.size ());
|
||||
|
||||
/* Is this a valid register name? */
|
||||
if (user_reg_map_name_to_regnum (gdbarch, regname, len) == -1)
|
||||
if (regnum == -1)
|
||||
error (_("Invalid register name `%s' on expression `%s'."),
|
||||
regname, p->saved_arg);
|
||||
regname.c_str (), p->saved_arg);
|
||||
|
||||
/* Check if there's any special treatment that the arch-specific
|
||||
code would like to perform on the register name. */
|
||||
if (gdbarch_stap_adjust_register_p (gdbarch))
|
||||
{
|
||||
std::string oldregname = regname;
|
||||
|
||||
gdbarch_stap_adjust_register (gdbarch, p, regname, regnum);
|
||||
|
||||
if (regname != oldregname)
|
||||
{
|
||||
/* This is just a check we perform to make sure that the
|
||||
arch-dependent code has provided us with a valid
|
||||
register name. */
|
||||
regnum = user_reg_map_name_to_regnum (gdbarch, regname.c_str (),
|
||||
regname.size ());
|
||||
|
||||
if (regnum == -1)
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("Invalid register name '%s' after replacing it"
|
||||
" (previous name was '%s')"),
|
||||
regname.c_str (), oldregname.c_str ());
|
||||
}
|
||||
}
|
||||
|
||||
write_exp_elt_opcode (&p->pstate, OP_REGISTER);
|
||||
str.ptr = regname;
|
||||
str.length = len;
|
||||
str.ptr = regname.c_str ();
|
||||
str.length = regname.size ();
|
||||
write_exp_string (&p->pstate, str);
|
||||
write_exp_elt_opcode (&p->pstate, OP_REGISTER);
|
||||
|
||||
|
||||
@@ -1672,7 +1672,19 @@ symbol_file_command (const char *args, int from_tty)
|
||||
|
||||
validate_readnow_readnever (flags);
|
||||
|
||||
/* Set SYMFILE_DEFER_BP_RESET because the proper displacement for a PIE
|
||||
(Position Independent Executable) main symbol file will only be
|
||||
computed by the solib_create_inferior_hook below. Without it,
|
||||
breakpoint_re_set would fail to insert the breakpoints with the zero
|
||||
displacement. */
|
||||
add_flags |= SYMFILE_DEFER_BP_RESET;
|
||||
|
||||
symbol_file_add_main_1 (name, add_flags, flags, offset);
|
||||
|
||||
solib_create_inferior_hook (from_tty);
|
||||
|
||||
/* Now it's safe to re-add the breakpoints. */
|
||||
breakpoint_re_set ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
15
gdb/symtab.c
15
gdb/symtab.c
@@ -701,6 +701,7 @@ symbol_set_language (struct general_symbol_info *gsymbol,
|
||||
struct demangled_name_entry
|
||||
{
|
||||
const char *mangled;
|
||||
ENUM_BITFIELD(language) language : LANGUAGE_BITS;
|
||||
char demangled[1];
|
||||
};
|
||||
|
||||
@@ -841,11 +842,6 @@ symbol_set_names (struct general_symbol_info *gsymbol,
|
||||
else
|
||||
linkage_name_copy = linkage_name;
|
||||
|
||||
/* Set the symbol language. */
|
||||
char *demangled_name_ptr
|
||||
= symbol_find_demangled_name (gsymbol, linkage_name_copy);
|
||||
gdb::unique_xmalloc_ptr<char> demangled_name (demangled_name_ptr);
|
||||
|
||||
entry.mangled = linkage_name_copy;
|
||||
slot = ((struct demangled_name_entry **)
|
||||
htab_find_slot (per_bfd->demangled_names_hash,
|
||||
@@ -858,6 +854,9 @@ symbol_set_names (struct general_symbol_info *gsymbol,
|
||||
|| (gsymbol->language == language_go
|
||||
&& (*slot)->demangled[0] == '\0'))
|
||||
{
|
||||
char *demangled_name_ptr
|
||||
= symbol_find_demangled_name (gsymbol, linkage_name_copy);
|
||||
gdb::unique_xmalloc_ptr<char> demangled_name (demangled_name_ptr);
|
||||
int demangled_len = demangled_name ? strlen (demangled_name.get ()) : 0;
|
||||
|
||||
/* Suppose we have demangled_name==NULL, copy_name==0, and
|
||||
@@ -894,12 +893,16 @@ symbol_set_names (struct general_symbol_info *gsymbol,
|
||||
strcpy (mangled_ptr, linkage_name_copy);
|
||||
(*slot)->mangled = mangled_ptr;
|
||||
}
|
||||
(*slot)->language = gsymbol->language;
|
||||
|
||||
if (demangled_name != NULL)
|
||||
strcpy ((*slot)->demangled, demangled_name.get());
|
||||
strcpy ((*slot)->demangled, demangled_name.get ());
|
||||
else
|
||||
(*slot)->demangled[0] = '\0';
|
||||
}
|
||||
else if (gsymbol->language == language_unknown
|
||||
|| gsymbol->language == language_auto)
|
||||
gsymbol->language = (*slot)->language;
|
||||
|
||||
gsymbol->name = (*slot)->mangled;
|
||||
if ((*slot)->demangled[0] != '\0')
|
||||
|
||||
@@ -1,3 +1,41 @@
|
||||
2019-04-29 Tom de Vries <tdevries@suse.de>
|
||||
|
||||
PR testsuite/25005
|
||||
* lib/opencl.exp (skip_opencl_tests): Add missing "with" in regexp.
|
||||
|
||||
2019-04-18 Tom de Vries <tdevries@suse.de>
|
||||
Pedro Alves <palves@redhat.com>
|
||||
|
||||
PR gdb/24454
|
||||
* gdb.threads/vfork-follow-child-exec.c: New file.
|
||||
* gdb.threads/vfork-follow-child-exec.exp: New file.
|
||||
* gdb.threads/vfork-follow-child-exit.c: New file.
|
||||
* gdb.threads/vfork-follow-child-exit.exp: New file.
|
||||
|
||||
2019-07-08 Alan Hayward <alan.hayward@arm.com>
|
||||
|
||||
PR breakpoints/25011
|
||||
* gdb.base/break-idempotent.exp: Test both PIE and non PIE.
|
||||
|
||||
2019-03-22 Alan Hayward <alan.hayward@arm.com>
|
||||
|
||||
PR testsuite/25016
|
||||
* README: Add pie options.
|
||||
* gdb.base/break-interp.exp: Ensure pie is disabled.
|
||||
* gdb.base/dump.exp: Likewise.
|
||||
* lib/gdb.exp (gdb_compile): Add pie option.
|
||||
|
||||
2019-06-27 Tom Tromey <tromey@adacore.com>
|
||||
|
||||
PR c++/20020:
|
||||
* gdb.cp/constexpr-field.exp: Use setup_xfail.
|
||||
|
||||
2019-05-29 Tom Tromey <tromey@adacore.com>
|
||||
|
||||
PR c++/20020:
|
||||
* gdb.cp/constexpr-field.exp: New file.
|
||||
* gdb.cp/constexpr-field.cc: New file.
|
||||
|
||||
2019-04-30 Tom Tromey <tromey@adacore.com>
|
||||
|
||||
PR c++/24470:
|
||||
|
||||
@@ -482,6 +482,16 @@ gdb,no_thread_names
|
||||
|
||||
The target doesn't support thread names.
|
||||
|
||||
gdb,pie_flag
|
||||
|
||||
The flag required to force the compiler to produce position-independent
|
||||
executables.
|
||||
|
||||
gdb,pie_ldflag
|
||||
|
||||
The flag required to force the linker to produce position-independent
|
||||
executables.
|
||||
|
||||
gdb,nopie_flag
|
||||
|
||||
The flag required to force the compiler to produce non-position-independent
|
||||
|
||||
@@ -36,23 +36,6 @@
|
||||
|
||||
standard_testfile
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
if ![runto_main] then {
|
||||
fail "can't run to main"
|
||||
return 0
|
||||
}
|
||||
|
||||
if [is_remote host] {
|
||||
set arg [remote_download host $binfile]
|
||||
if { $arg == "" } {
|
||||
perror "download failed"
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
# Force a breakpoint re-set in GDB. Currently this is done by
|
||||
# reloading symbols with the "file" command.
|
||||
|
||||
@@ -123,7 +106,7 @@ proc set_breakpoint { break_command } {
|
||||
proc test_break { always_inserted break_command } {
|
||||
set cmd [lindex [split "$break_command"] 0]
|
||||
|
||||
with_test_prefix "always-inserted $always_inserted: $cmd" {
|
||||
with_test_prefix "$cmd" {
|
||||
delete_breakpoints
|
||||
|
||||
if ![runto_main] then {
|
||||
@@ -163,20 +146,43 @@ proc test_break { always_inserted break_command } {
|
||||
}
|
||||
}
|
||||
|
||||
foreach always_inserted { "off" "on" } {
|
||||
test_break $always_inserted "break"
|
||||
# The testcase uses the "file" command to force breakpoint re-set in
|
||||
# GDB. Test both with and without PIE, as GDB used to mishandle
|
||||
# breakpoint re-set when reloading PIEs.
|
||||
foreach_with_prefix pie { "nopie" "pie" } {
|
||||
|
||||
if {![skip_hw_breakpoint_tests]} {
|
||||
test_break $always_inserted "hbreak"
|
||||
set opts {debug}
|
||||
lappend opts $pie
|
||||
|
||||
set binfile [standard_output_file $testfile-$pie]
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $binfile $srcfile $opts]} {
|
||||
continue
|
||||
}
|
||||
|
||||
if {![skip_hw_watchpoint_tests]} {
|
||||
test_break $always_inserted "watch"
|
||||
if [is_remote host] {
|
||||
set arg [remote_download host $binfile]
|
||||
if { $arg == "" } {
|
||||
untested "download failed"
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
if {![skip_hw_watchpoint_access_tests]
|
||||
&& ![skip_hw_watchpoint_multi_tests]} {
|
||||
test_break $always_inserted "rwatch"
|
||||
test_break $always_inserted "awatch"
|
||||
foreach_with_prefix always_inserted { "off" "on" } {
|
||||
test_break $always_inserted "break"
|
||||
|
||||
if {![skip_hw_breakpoint_tests]} {
|
||||
test_break $always_inserted "hbreak"
|
||||
}
|
||||
|
||||
if {![skip_hw_watchpoint_tests]} {
|
||||
test_break $always_inserted "watch"
|
||||
}
|
||||
|
||||
if {![skip_hw_watchpoint_access_tests]
|
||||
&& ![skip_hw_watchpoint_multi_tests]} {
|
||||
test_break $always_inserted "rwatch"
|
||||
test_break $always_inserted "awatch"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -625,8 +625,10 @@ foreach ldprelink {NO YES} {
|
||||
lappend opts {debug}
|
||||
}
|
||||
if {$binpie != "NO"} {
|
||||
lappend opts {additional_flags=-fPIE}
|
||||
lappend opts {ldflags=-pie}
|
||||
lappend opts {pie}
|
||||
} else {
|
||||
# Debian9/Ubuntu16.10 onwards default to PIE enabled. Ensure it is disabled.
|
||||
lappend opts {nopie}
|
||||
}
|
||||
|
||||
set dir ${exec}.d
|
||||
|
||||
@@ -36,6 +36,10 @@ if {[istarget "spu*-*-*"]} then {
|
||||
set is64bitonly "yes"
|
||||
}
|
||||
|
||||
# Debian9/Ubuntu16.10 onwards default to PIE enabled. Ensure it is disabled as
|
||||
# this causes addresses to be out of range for IHEX.
|
||||
lappend options {nopie}
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ${options}] != "" } {
|
||||
untested "failed to compile"
|
||||
return -1
|
||||
|
||||
37
gdb/testsuite/gdb.cp/constexpr-field.cc
Normal file
37
gdb/testsuite/gdb.cp/constexpr-field.cc
Normal file
@@ -0,0 +1,37 @@
|
||||
/* This testcase is part of GDB, the GNU debugger.
|
||||
|
||||
Copyright 2019 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
template<typename T>
|
||||
struct X
|
||||
{
|
||||
static constexpr bool f = true;
|
||||
};
|
||||
|
||||
X<int> x;
|
||||
|
||||
struct Y
|
||||
{
|
||||
static constexpr bool f = true;
|
||||
};
|
||||
|
||||
Y y;
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
37
gdb/testsuite/gdb.cp/constexpr-field.exp
Normal file
37
gdb/testsuite/gdb.cp/constexpr-field.exp
Normal file
@@ -0,0 +1,37 @@
|
||||
# Copyright 2019 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# This file is part of the gdb testsuite.
|
||||
|
||||
if {[skip_cplus_tests]} { continue }
|
||||
|
||||
standard_testfile .cc
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
|
||||
{c++ debug additional_flags=-std=c++17}]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {![runto_main]} {
|
||||
perror "couldn't run to breakpoint"
|
||||
continue
|
||||
}
|
||||
|
||||
# "x" sometimes isn't available due to
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90526
|
||||
setup_xfail *-*-* gcc/90526
|
||||
gdb_test "print x" " = {static f = true}"
|
||||
|
||||
gdb_test "print y" " = {static f = true}"
|
||||
66
gdb/testsuite/gdb.threads/vfork-follow-child-exec.c
Normal file
66
gdb/testsuite/gdb.threads/vfork-follow-child-exec.c
Normal file
@@ -0,0 +1,66 @@
|
||||
/* This testcase is part of GDB, the GNU debugger.
|
||||
|
||||
Copyright 2019 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
static char *program_name;
|
||||
|
||||
static void *
|
||||
f (void *arg)
|
||||
{
|
||||
int res = vfork ();
|
||||
|
||||
if (res == -1)
|
||||
{
|
||||
perror ("vfork");
|
||||
return NULL;
|
||||
}
|
||||
else if (res == 0)
|
||||
{
|
||||
/* Child. */
|
||||
execl (program_name, program_name, "1", NULL);
|
||||
perror ("exec");
|
||||
abort ();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Parent. */
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
pthread_t tid;
|
||||
|
||||
if (argc > 1)
|
||||
{
|
||||
/* Getting here via execl. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
program_name = argv[0];
|
||||
|
||||
pthread_create (&tid, NULL, f, NULL);
|
||||
pthread_join (tid, NULL);
|
||||
return 0;
|
||||
}
|
||||
64
gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp
Normal file
64
gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp
Normal file
@@ -0,0 +1,64 @@
|
||||
# Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
# Test following a vfork child that execs, when the vfork parent is a
|
||||
# threaded program, and it's a non-main thread that vforks.
|
||||
|
||||
standard_testfile
|
||||
|
||||
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
# DETACH indicates whether "set detach-on-fork" is enabled. It is
|
||||
# either "on" or "off".
|
||||
|
||||
proc test_vfork {detach} {
|
||||
global binfile
|
||||
|
||||
clean_restart $binfile
|
||||
|
||||
if ![runto_main] then {
|
||||
fail "can't run to main"
|
||||
return 0
|
||||
}
|
||||
|
||||
delete_breakpoints
|
||||
|
||||
gdb_test_no_output "set follow-fork-mode child"
|
||||
gdb_test_no_output "set detach-on-fork $detach"
|
||||
|
||||
if {$detach == "off"} {
|
||||
gdb_test "continue" \
|
||||
[multi_line \
|
||||
"Attaching after .* vfork to child .*" \
|
||||
".*New inferior 2 .*" \
|
||||
".* is executing new program: .*" \
|
||||
".*Inferior 2 .* exited normally.*"]
|
||||
} else {
|
||||
gdb_test "continue" \
|
||||
[multi_line \
|
||||
"Attaching after .* vfork to child .*" \
|
||||
".*New inferior 2 .*" \
|
||||
".*Detaching vfork parent process .* after child exec.*" \
|
||||
".*Inferior 1 .* detached.*" \
|
||||
".*is executing new program: .*" \
|
||||
".*Inferior 2 .*exited normally.*"]
|
||||
}
|
||||
}
|
||||
|
||||
foreach_with_prefix detach-on-fork {"off" "on"} {
|
||||
test_vfork ${detach-on-fork}
|
||||
}
|
||||
52
gdb/testsuite/gdb.threads/vfork-follow-child-exit.c
Normal file
52
gdb/testsuite/gdb.threads/vfork-follow-child-exit.c
Normal file
@@ -0,0 +1,52 @@
|
||||
/* This testcase is part of GDB, the GNU debugger.
|
||||
|
||||
Copyright 2019 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
|
||||
static void *
|
||||
f (void *arg)
|
||||
{
|
||||
int res = vfork ();
|
||||
|
||||
if (res == -1)
|
||||
{
|
||||
perror ("vfork");
|
||||
return NULL;
|
||||
}
|
||||
else if (res == 0)
|
||||
{
|
||||
/* Child. */
|
||||
_exit (0);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Parent. */
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
pthread_t tid;
|
||||
|
||||
pthread_create (&tid, NULL, f, NULL);
|
||||
pthread_join (tid, NULL);
|
||||
return 0;
|
||||
}
|
||||
60
gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp
Normal file
60
gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp
Normal file
@@ -0,0 +1,60 @@
|
||||
# Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
# Test following a vfork child that exits, when the vfork parent is a
|
||||
# threaded program, and it's a non-main thread that vforks.
|
||||
|
||||
standard_testfile
|
||||
|
||||
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
# DETACH indicates whether "set detach-on-fork" is enabled. It is
|
||||
# either "on" or "off".
|
||||
|
||||
proc test_vfork {detach} {
|
||||
global binfile
|
||||
|
||||
clean_restart $binfile
|
||||
|
||||
if ![runto_main] then {
|
||||
fail "can't run to main"
|
||||
return 0
|
||||
}
|
||||
|
||||
gdb_test_no_output "set follow-fork-mode child"
|
||||
gdb_test_no_output "set detach-on-fork $detach"
|
||||
|
||||
if {$detach == "off"} {
|
||||
gdb_test "continue" \
|
||||
[multi_line \
|
||||
"Attaching after .* vfork to child .*" \
|
||||
".*New inferior 2 .*" \
|
||||
".*Inferior 2 .*exited normally.*"]
|
||||
} else {
|
||||
gdb_test "continue" \
|
||||
[multi_line \
|
||||
"Attaching after .* vfork to child .*" \
|
||||
".*New inferior 2 .*" \
|
||||
".*Detaching vfork parent process .* after child exit.*" \
|
||||
".*Inferior 1 .* detached.*" \
|
||||
".*Inferior 2 .*exited normally.*"]
|
||||
}
|
||||
}
|
||||
|
||||
foreach_with_prefix detach-on-fork {"off" "on"} {
|
||||
test_vfork ${detach-on-fork}
|
||||
}
|
||||
@@ -3492,6 +3492,7 @@ set gdb_saved_set_unbuffered_mode_obj ""
|
||||
# dynamically load libraries at runtime. For example, on Linux, this adds
|
||||
# -ldl so that the test can use dlopen.
|
||||
# - nowarnings: Inhibit all compiler warnings.
|
||||
# - pie: Force creation of PIE executables.
|
||||
# - nopie: Prevent creation of PIE executables.
|
||||
#
|
||||
# And here are some of the not too obscure options understood by DejaGnu that
|
||||
@@ -3630,8 +3631,33 @@ proc gdb_compile {source dest type options} {
|
||||
set options [lreplace $options $nowarnings $nowarnings $flag]
|
||||
}
|
||||
|
||||
# Replace the "nopie" option with the appropriate additional_flags
|
||||
# to disable PIE executables.
|
||||
# Replace the "pie" option with the appropriate compiler and linker flags
|
||||
# to enable PIE executables.
|
||||
set pie [lsearch -exact $options pie]
|
||||
if {$pie != -1} {
|
||||
if [target_info exists gdb,pie_flag] {
|
||||
set flag "additional_flags=[target_info gdb,pie_flag]"
|
||||
} else {
|
||||
# For safety, use fPIE rather than fpie. On AArch64, m68k, PowerPC
|
||||
# and SPARC, fpie can cause compile errors due to the GOT exceeding
|
||||
# a maximum size. On other architectures the two flags are
|
||||
# identical (see the GCC manual). Note Debian9 and Ubuntu16.10
|
||||
# onwards default GCC to using fPIE. If you do require fpie, then
|
||||
# it can be set using the pie_flag.
|
||||
set flag "additional_flags=-fPIE"
|
||||
}
|
||||
set options [lreplace $options $pie $pie $flag]
|
||||
|
||||
if [target_info exists gdb,pie_ldflag] {
|
||||
set flag "ldflags=[target_info gdb,pie_ldflag]"
|
||||
} else {
|
||||
set flag "ldflags=-pie"
|
||||
}
|
||||
lappend options "$flag"
|
||||
}
|
||||
|
||||
# Replace the "nopie" option with the appropriate linker flag to disable
|
||||
# PIE executables. There are no compiler flags for this option.
|
||||
set nopie [lsearch -exact $options nopie]
|
||||
if {$nopie != -1} {
|
||||
if [target_info exists gdb,nopie_flag] {
|
||||
|
||||
@@ -58,7 +58,7 @@ gdb_caching_proc skip_opencl_tests {
|
||||
verbose -log "\n$me: OpenCL support detected"
|
||||
set result 0
|
||||
}
|
||||
-re ".*$inferior_exited_re code.*${gdb_prompt} $" {
|
||||
-re ".*$inferior_exited_re with code.*${gdb_prompt} $" {
|
||||
verbose -log "\n$me: OpenCL support not detected"
|
||||
set result 1
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "expression.h"
|
||||
#include "value.h"
|
||||
#include "language.h"
|
||||
#include "terminal.h" /* For job_control. */
|
||||
#include "terminal.h"
|
||||
#include "common/job-control.h"
|
||||
#include "annotate.h"
|
||||
#include "completer.h"
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.3
|
||||
8.3.1
|
||||
|
||||
Reference in New Issue
Block a user