2016-04-19 18:01:44 +02:00
|
|
|
|
2016-04-19 Doug Evans <xdje42@gmail.com>
|
|
|
|
|
|
|
|
|
|
* source.c (is_regular_file): New arg errno_ptr.
|
|
|
|
|
All callers updated.
|
|
|
|
|
|
2016-04-19 16:53:40 +02:00
|
|
|
|
2016-04-19 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
* linux-record.c (record_linux_system_call): Merge handling for
|
|
|
|
|
readlink/recv/read and pipe/pipe2.
|
|
|
|
|
|
2016-04-19 15:45:50 +02:00
|
|
|
|
2016-04-14 Walfred Tedeschi <walfred.tedeschi@intel.com>
|
|
|
|
|
|
|
|
|
|
* features/i386/amd64-mpx-linux.xml: Remove AVX feature.
|
|
|
|
|
* features/i386/amd64-mpx.xml: Remove AVX feature.
|
|
|
|
|
* features/i386/i386-mpx-linux.xml: Remove AVX feature.
|
|
|
|
|
* features/i386/i386-mpx.xml: Remove AVX feature.
|
|
|
|
|
* features/i386/amd64-mpx-linux.c: Regenerate.
|
|
|
|
|
* features/i386/amd64-mpx.c: Regenerate.
|
|
|
|
|
* features/i386/i386-mpx-linux.c: Regenerate.
|
|
|
|
|
* features/i386/i386-mpx.c: Regenerate.
|
|
|
|
|
* regformats/i386/amd64-mpx-linux.dat: Regenerate.
|
|
|
|
|
* regformats/i386/amd64-mpx.dat: Regenerate.
|
|
|
|
|
* regformats/i386/i386-mpx-linux.dat: Regenerate.
|
|
|
|
|
* regformats/i386/i386-mpx.dat: Regenerate.
|
|
|
|
|
|
Add target descriptions for AVX + MPX
The current MPX target descriptions assume that MPX is always combined
with AVX, however that's not correct. We can have machines with MPX
and without AVX; or machines with AVX and without MPX.
This patch adds new target descriptions for machines that support
both MPX and AVX, as duplicates of the existing MPX descriptions.
The following commit will remove AVX from the MPX-only descriptions.
2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
gdb/ChangeLog:
* amd64-linux-tdep.c (features/i386/amd64-avx-mpx-linux.c):
New include.
(amd64_linux_core_read_description): Add case for
X86_XSTATE_AVX_MPX_MASK.
(_initialize_amd64_linux_tdep): Call initialize_tdesc_amd64_avx_mpx_linux.
* amd64-linux-tdep.h (tdesc_amd64_avx_mpx_linux): New definition.
* amd64-tdep.c (features/i386/amd64-avx-mpx.c): New include.
(amd64_target_description): Add case for X86_XSTATE_AVX_MPX_MASK.
(_initialize_amd64_tdep): Call initialize_tdesc_amd64_avx_mpx.
* common/x86-xstate.h (X86_XSTATE_MPX_MASK): Remove AVX bits.
(X86_XSTATE_AVX_MPX_MASK): New case.
* features/Makefile (i386/i386-avx-mpx, i386/i386-avx-mpx-linux)
(i386/amd64-avx-mpx, i386/amd64-avx-mpx-linux): New rules.
(i386/i386-avx-mpx-expedite, i386/i386-avx-mpx-linux-expedite)
(i386/amd64-avx-mpx-expedite, i386/amd64-avx-mpx-linux-expedite):
New expedites.
* i386-linux-tdep.c (features/i386/i386-avx-mpx-linux.c): New
include.
(i386_linux_core_read_description): Add case
X86_XSTATE_AVX_MPX_MASK.
(_initialize_i386_linux_tdep): Call
initialize_tdesc_i386_avx_mpx_linux.
* i386-linux-tdep.h (tdesc_i386_avx_mpx_linux): New include.
* i386-tdep.c (features/i386/i386-avx-mpx.c): New include.
(i386_target_description): Add case for X86_XSTATE_AVX_MPX_MASK.
* x86-linux-nat.c (x86_linux_read_description): Add case for
X86_XSTATE_AVX_MPX_MASK.
* features/i386/amd64-avx-mpx-linux.xml: New file.
* features/i386/i386-avx-mpx-linux.xml: New file.
* features/i386/i386-avx-mpx.xml: New file.
* features/i386/amd64-avx-mpx.xml: New file.
* features/i386/amd64-avx-mpx-linux.c: Generated.
* features/i386/amd64-avx-mpx.c: Generated.
* features/i386/i386-avx-mpx-linux.c: Generated.
* features/i386/i386-avx-mpx.c: Generated.
* regformats/i386/amd64-avx-mpx-linux.dat: Generated.
* regformats/i386/amd64-avx-mpx.dat: Generated.
* regformats/i386/i386-avx-mpx-linux.dat: Generated.
* regformats/i386/i386-avx-mpx.dat: Generated.
gdb/gdbserver/ChangeLog:
* Makefile.in (clean): Add removal for i386-avx-mpx.c,
i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
(i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
(amd64-avx-mpx-linux.c): New rules.
(amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
* configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
(srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
(srv_amd64_regobj): Add amd64-avx-mpx.o.
(srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
(srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
(srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
(srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
(srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
(ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
(ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
* linux-x86-low.c (x86_linux_read_description): Add case for
X86_XSTATE_AVX_MPX_MASK.
(x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
(initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
init_registers_i386_avx_mpx_linux.
* linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
(initialize_low_tracepoint): Call
init_registers_i386_avx_mpx_linux.
* linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
(initialize_low_tracepoint): Call
init_registers_amd64_avx_mpx_linux.
* linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
(init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
(init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
declarations.
2016-04-19 15:44:32 +02:00
|
|
|
|
2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
|
|
|
|
|
|
|
|
|
|
* amd64-linux-tdep.c (features/i386/amd64-avx-mpx-linux.c):
|
|
|
|
|
New include.
|
|
|
|
|
(amd64_linux_core_read_description): Add case for
|
|
|
|
|
X86_XSTATE_AVX_MPX_MASK.
|
|
|
|
|
(_initialize_amd64_linux_tdep): Call initialize_tdesc_amd64_avx_mpx_linux.
|
|
|
|
|
* amd64-linux-tdep.h (tdesc_amd64_avx_mpx_linux): New definition.
|
|
|
|
|
* amd64-tdep.c (features/i386/amd64-avx-mpx.c): New include.
|
|
|
|
|
(amd64_target_description): Add case for X86_XSTATE_AVX_MPX_MASK.
|
|
|
|
|
(_initialize_amd64_tdep): Call initialize_tdesc_amd64_avx_mpx.
|
|
|
|
|
* common/x86-xstate.h (X86_XSTATE_MPX_MASK): Remove AVX bits.
|
|
|
|
|
(X86_XSTATE_AVX_MPX_MASK): New case.
|
|
|
|
|
* features/Makefile (i386/i386-avx-mpx, i386/i386-avx-mpx-linux)
|
|
|
|
|
(i386/amd64-avx-mpx, i386/amd64-avx-mpx-linux): New rules.
|
|
|
|
|
(i386/i386-avx-mpx-expedite, i386/i386-avx-mpx-linux-expedite)
|
|
|
|
|
(i386/amd64-avx-mpx-expedite, i386/amd64-avx-mpx-linux-expedite):
|
|
|
|
|
New expedites.
|
|
|
|
|
* i386-linux-tdep.c (features/i386/i386-avx-mpx-linux.c): New
|
|
|
|
|
include.
|
|
|
|
|
(i386_linux_core_read_description): Add case
|
|
|
|
|
X86_XSTATE_AVX_MPX_MASK.
|
|
|
|
|
(_initialize_i386_linux_tdep): Call
|
|
|
|
|
initialize_tdesc_i386_avx_mpx_linux.
|
|
|
|
|
* i386-linux-tdep.h (tdesc_i386_avx_mpx_linux): New include.
|
|
|
|
|
* i386-tdep.c (features/i386/i386-avx-mpx.c): New include.
|
|
|
|
|
(i386_target_description): Add case for X86_XSTATE_AVX_MPX_MASK.
|
|
|
|
|
* x86-linux-nat.c (x86_linux_read_description): Add case for
|
|
|
|
|
X86_XSTATE_AVX_MPX_MASK.
|
|
|
|
|
* features/i386/amd64-avx-mpx-linux.xml: New file.
|
|
|
|
|
* features/i386/i386-avx-mpx-linux.xml: New file.
|
|
|
|
|
* features/i386/i386-avx-mpx.xml: New file.
|
|
|
|
|
* features/i386/amd64-avx-mpx.xml: New file.
|
|
|
|
|
* features/i386/amd64-avx-mpx-linux.c: Generated.
|
|
|
|
|
* features/i386/amd64-avx-mpx.c: Generated.
|
|
|
|
|
* features/i386/i386-avx-mpx-linux.c: Generated.
|
|
|
|
|
* features/i386/i386-avx-mpx.c: Generated.
|
|
|
|
|
* regformats/i386/amd64-avx-mpx-linux.dat: Generated.
|
|
|
|
|
* regformats/i386/amd64-avx-mpx.dat: Generated.
|
|
|
|
|
* regformats/i386/i386-avx-mpx-linux.dat: Generated.
|
|
|
|
|
* regformats/i386/i386-avx-mpx.dat: Generated.
|
|
|
|
|
|
Fix PR gdb/19250: ptrace prototype is not detected properly in C++ mode
The ptrace args/return types detection doesn't work properly in C++
mode, on non-GNU/Linux hosts. For example, on gcc70 (NetBSD 5.1),
where the prototype is:
int ptrace(int, __pid_t, void*, int);
configure misdetects it as:
$ grep PTRACE_TYPE config.h
#define PTRACE_TYPE_ARG1 int
#define PTRACE_TYPE_ARG3 int *
#define PTRACE_TYPE_ARG4 int
/* #undef PTRACE_TYPE_ARG5 */
#define PTRACE_TYPE_RET int
resulting in:
../../src/gdb/amd64bsd-nat.c: In function 'void amd64bsd_fetch_inferior_registers(target_ops*, regcache*, int)':
../../src/gdb/amd64bsd-nat.c:56: warning: dereferencing type-punned pointer will break strict-aliasing rules
../../src/gdb/amd64bsd-nat.c: In function 'void amd64bsd_store_inferior_registers(target_ops*, regcache*, int)':
../../src/gdb/amd64bsd-nat.c:104: warning: dereferencing type-punned pointer will break strict-aliasing rules
../../src/gdb/amd64bsd-nat.c:110: warning: dereferencing type-punned pointer will break strict-aliasing rules
We could address this [1], however despite ptrace.m4's claim:
# Needs to be tested in C++ mode, to detect whether we need to cast
# the first argument to enum __ptrace_request.
it appears that there's actually no need to test in C++ mode. Always
running the ptrace tests in C mode works just the same on GNU/Linux.
I remember experimenting with several different ways to handle the
original issue back then, and maybe that was needed in some other
attempt and then I didn't realize it ended up not really necessary.
Confirmed that this fixes the NetBSD 5.1 C++ build, and confirmed that
C and C++ builds on Fedora 23 are unaffected.
[1] - https://sourceware.org/ml/gdb-patches/2016-04/msg00374.html
gdb/ChangeLog:
2016-04-18 Pedro Alves <palves@redhat.com>
* ptrace.m4 (GDB_AC_PTRACE): Don't run tests in C++ mode.
* configure: Regenerate.
gdb/gdbserver/ChangeLog:
2016-04-18 Pedro Alves <palves@redhat.com>
* configure: Regenerate.
2016-04-18 18:42:50 +02:00
|
|
|
|
2016-04-18 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* ptrace.m4 (GDB_AC_PTRACE): Don't run tests in C++ mode.
|
|
|
|
|
* configure: Regenerate.
|
|
|
|
|
|
2016-04-18 15:58:14 +02:00
|
|
|
|
2016-04-18 Martin Galvan <martin.galvan@tallertechnologies.com>
|
|
|
|
|
|
|
|
|
|
* valops.c (value_addr): For C++ references, set the copied value's
|
|
|
|
|
enclosing_type as well.
|
|
|
|
|
|
2016-04-18 09:50:09 +02:00
|
|
|
|
2016-04-18 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
Revert:
|
|
|
|
|
2016-04-15 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arm-tdep.c (thumb_stack_frame_destroyed_p): Return zero if
|
|
|
|
|
PC is far from the end of function.
|
|
|
|
|
|
2016-04-16 02:24:08 +02:00
|
|
|
|
2016-04-16 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* ada-exp.y (yydefred): Define as ada_yydefred.
|
|
|
|
|
|
2016-04-15 18:08:53 +02:00
|
|
|
|
2016-04-15 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* ada-lang.c (ada_lookup_struct_elt_type): Constify 'type_str' and
|
|
|
|
|
'name_str' locals.
|
|
|
|
|
|
2016-04-15 22:14:07 +02:00
|
|
|
|
2016-04-15 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* btrace.c (pt_btrace_insn_flags): Change return type to
|
|
|
|
|
btrace_insn_flags. Use btrace_insn_flags for local.
|
|
|
|
|
|
2016-04-16 00:52:00 +02:00
|
|
|
|
2016-04-15 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* nat/linux-ptrace.h [__mips__] (GDB_ARCH_IS_TRAP_BRKPT): Also
|
|
|
|
|
accept TRAP_BRKPT.
|
|
|
|
|
[__mips__] (GDB_ARCH_IS_TRAP_HWBKPT): Also accept TRAP_HWBKPT.
|
|
|
|
|
|
2016-04-15 16:30:01 +02:00
|
|
|
|
2016-04-15 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arm-tdep.c (thumb_stack_frame_destroyed_p): Return zero if
|
|
|
|
|
PC is far from the end of function.
|
|
|
|
|
|
2016-04-14 13:58:03 +02:00
|
|
|
|
2016-04-14 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* cli/cli-cmds.c (alias_usage_error): New function.
|
|
|
|
|
(alias_command): Use it.
|
|
|
|
|
* ctf.c (ctf_save_metadata_header): Inline metadata_fmt local in
|
|
|
|
|
ctf_save_write_metadata call.
|
|
|
|
|
|
2016-04-14 13:58:03 +02:00
|
|
|
|
2016-04-14 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* ada-typeprint.c (print_fixed_point_type): Don't pass float as
|
|
|
|
|
argument to function expecting LONGEST.
|
|
|
|
|
* value.c (unpack_long): Add casts to LONGEST.
|
|
|
|
|
|
2016-04-13 22:17:22 +02:00
|
|
|
|
2016-04-13 Luis Machado <lgustavo@codesourcery.com>
|
|
|
|
|
|
|
|
|
|
* exec.c (exec_file_locate_attach): Guard a couple functions
|
|
|
|
|
that can throw errors.
|
|
|
|
|
(exception_print_same): New helper function.
|
|
|
|
|
|
2016-04-13 15:34:00 +02:00
|
|
|
|
2016-04-13 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
PR remote/19840
|
|
|
|
|
* remote.c (struct remote_state) <last_resume_exec_dir>: New
|
|
|
|
|
field.
|
|
|
|
|
(new_remote_state): Default last_resume_exec_dir to EXEC_FORWARD.
|
|
|
|
|
(remote_open_1): Reset last_resume_exec_dir to EXEC_FORWARD.
|
|
|
|
|
(remote_resume): Store the last execution direction.
|
|
|
|
|
(remote_execution_direction): New function.
|
|
|
|
|
(init_remote_ops): Install it as to_execution_direction target_ops
|
|
|
|
|
method.
|
|
|
|
|
|
2016-04-12 18:49:24 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* common/common-exceptions.h (GDB_XCPT_TRY): Update comment.
|
|
|
|
|
[__cplusplus] (GDB_XCPT): Define as GDB_XCPT_TRY.
|
|
|
|
|
|
2016-04-12 18:20:04 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* common/common-exceptions.c (struct catcher) <buf>: Now a
|
|
|
|
|
'jmp_buf' instead of SIGJMP_BUF.
|
|
|
|
|
(exceptions_state_mc_init): Change return type to 'jmp_buf'.
|
|
|
|
|
(throw_exception): Use longjmp instead of SIGLONGJMP.
|
|
|
|
|
* common/common-exceptions.h: Include <setjmp.h> instead of
|
|
|
|
|
"gdb_setjmp.h".
|
|
|
|
|
(exceptions_state_mc_init): Change return type to 'jmp_buf'.
|
|
|
|
|
[GDB_XCPT == GDB_XCPT_SJMP] (TRY): Use setjmp instead of
|
|
|
|
|
SIGSETJMP.
|
|
|
|
|
* cp-support.c: Include "gdb_setjmp.h".
|
|
|
|
|
|
2016-04-12 18:17:13 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* common/common-exceptions.c (exception_rethrow): Remove
|
|
|
|
|
prepare_to_throw_exception call.
|
|
|
|
|
* common/common-exceptions.h (prepare_to_throw_exception): Delete
|
|
|
|
|
declaration.
|
|
|
|
|
* exceptions.c (prepare_to_throw_exception): Delete.
|
|
|
|
|
|
2016-04-12 17:49:32 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* target.c (target_check_pending_interrupt): Delete.
|
|
|
|
|
* target.h (struct target_ops) <to_check_pending_interrupt>:
|
|
|
|
|
Remove method.
|
|
|
|
|
(target_check_pending_interrupt): Remove declaration.
|
|
|
|
|
* target-delegates.c: Regenerate.
|
|
|
|
|
|
2016-04-12 17:49:32 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* defs.h: Update comments on SIGINT handling.
|
|
|
|
|
(immediate_quit): Delete declaration.
|
|
|
|
|
* event-loop.c (call_async_signal_handler): Delete.
|
|
|
|
|
* event-loop.h (call_async_signal_handler): Delete declaration.
|
|
|
|
|
(mark_async_signal_handler): Update comments.
|
|
|
|
|
(gdb_call_async_signal_handler): Delete declaration.
|
|
|
|
|
* event-top.c (handle_sigint): Call mark_async_signal_handler
|
|
|
|
|
instead of gdb_call_async_signal_handler.
|
|
|
|
|
* exceptions.c (prepare_to_throw_exception): Remove reference to
|
|
|
|
|
immediate_quit.
|
|
|
|
|
(exception_fprintf): Remove comments about immediate_quit.
|
|
|
|
|
* mingw-hdep.c (sigint_event, sigint_handler): Delete.
|
|
|
|
|
(gdb_select): Don't wait on sigint_event.
|
|
|
|
|
(gdb_call_async_signal_handler): Delete.
|
|
|
|
|
(_initialize_mingw_hdep): Delete.
|
|
|
|
|
* posix-hdep.c (gdb_call_async_signal_handler): Delete.
|
|
|
|
|
* utils.c (immediate_quit): Delete.
|
|
|
|
|
|
target remote: Don't rely on immediate_quit (introduce quit handlers)
remote.c is the last user of immediate_quit. It's relied on to
immediately break the initial remote connection sync up, if the user
does Ctrl-C, assuming that was because the target isn't responding.
At that stage, since the connection isn't synced yet, disconnecting is
the only safe thing to do. This commit reworks that, to not rely on
throwing from the SIGINT signal handler.
So, this commit:
- Introduces the concept of a "quit handler". This is used to
override what does the QUIT macro do when the quit flag is set.
- Makes the "struct serial" reachar / write code call QUIT in the
partial read/write loops, so the current quit handler is invoked
whenever a serial->read_prim / serial->write_prim returns EINTR.
- Makes the "struct serial" reachar / write code call
interruptible_select instead of gdb_select, so that QUITs are
detected in a race-free manner.
- Stops remote.c from setting immediate_quit during the initial
connection.
- Instead, we install a custom quit handler whenever we're calling
into the serial code. This custom quit handler knows to immediately
throw a quit when we're in the initial connection setup, and
otherwise defer handling the quit/Ctrl-C request to later, when
we're safely out of a packet command/response sequence. This also
is what is now responsible for handling "double Ctrl-C because
target connection is stuck/wedged."
- remote.c no longer installs a specialized SIGINT handlers, and
instead re-uses the quit flag. Since we want to rely on the QUIT
macro, the SIGINT handler must also set the quit. And the easiest
is just to not install custom SIGINT handler in remote.c. Let the
standard SIGINT handler do its job of setting the quit flag.
Centralizing SIGINT handlers seems like a good thing to me, anyway.
gdb/ChangeLog:
2016-04-12 Pedro Alves <palves@redhat.com>
* defs.h (quit_handler_ftype, quit_handler)
(make_cleanup_override_quit_handler, default_quit_handler): New.
(QUIT): Adjust comments.
* event-top.c (default_quit_handler): New function.
(quit_handler): New global.
(struct quit_handler_cleanup_data): New.
(restore_quit_handler, restore_quit_handler_dtor)
(make_cleanup_override_quit_handler): New.
(async_request_quit): Call QUIT.
* remote.c (struct remote_state) <got_ctrlc_during_io>: New field.
(async_sigint_remote_twice_token, async_sigint_remote_token):
Delete.
(remote_close): Update comments.
(remote_start_remote): Don't set immediate_quit. Set starting_up
earlier.
(remote_serial_quit_handler, remote_unpush_and_throw): New
functions.
(remote_open_1): Clear got_ctrlc_during_io. Set
remote_async_terminal_ours_p unconditionally.
(async_initialize_sigint_signal_handler)
(async_handle_remote_sigint, async_handle_remote_sigint_twice)
(remote_check_pending_interrupt, async_remote_interrupt)
(async_remote_interrupt_twice)
(async_cleanup_sigint_signal_handler, ofunc)
(sync_remote_interrupt, sync_remote_interrupt_twice): Delete.
(remote_terminal_inferior, remote_terminal_ours): Remove async
checks.
(remote_wait_as): Don't install a SIGINT handler in sync mode.
(readchar, remote_serial_write): Override the quit handler with
remote_serial_quit_handler.
(getpkt_or_notif_sane_1): Don't call QUIT.
(initialize_remote_ops): Don't install
remote_check_pending_interrupt.
(_initialize_remote): Don't create async_sigint_remote_token and
async_sigint_remote_twice_token.
* ser-base.c (ser_base_wait_for): Call QUIT and use
interruptible_select.
(ser_base_write): Call QUIT.
* ser-go32.c (dos_readchar, dos_write): Call QUIT.
* ser-unix.c (wait_for): Don't use VTIME. Always take the
gdb_select path, but call QUIT and interruptible_select.
* utils.c (maybe_quit): Call the current quit handler. Don't call
target_check_pending_interrupt.
(defaulted_query, prompt_for_continue): Override the quit handler
with the default quit handler.
2016-04-12 17:49:32 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* defs.h (quit_handler_ftype, quit_handler)
|
|
|
|
|
(make_cleanup_override_quit_handler, default_quit_handler): New.
|
|
|
|
|
(QUIT): Adjust comments.
|
|
|
|
|
* event-top.c (default_quit_handler): New function.
|
|
|
|
|
(quit_handler): New global.
|
|
|
|
|
(struct quit_handler_cleanup_data): New.
|
|
|
|
|
(restore_quit_handler, restore_quit_handler_dtor)
|
|
|
|
|
(make_cleanup_override_quit_handler): New.
|
|
|
|
|
(async_request_quit): Call QUIT.
|
|
|
|
|
* remote.c (struct remote_state) <got_ctrlc_during_io>: New field.
|
|
|
|
|
(async_sigint_remote_twice_token, async_sigint_remote_token):
|
|
|
|
|
Delete.
|
|
|
|
|
(remote_close): Update comments.
|
|
|
|
|
(remote_start_remote): Don't set immediate_quit. Set starting_up
|
|
|
|
|
earlier.
|
|
|
|
|
(remote_serial_quit_handler, remote_unpush_and_throw): New
|
|
|
|
|
functions.
|
|
|
|
|
(remote_open_1): Clear got_ctrlc_during_io. Set
|
|
|
|
|
remote_async_terminal_ours_p unconditionally.
|
|
|
|
|
(async_initialize_sigint_signal_handler)
|
|
|
|
|
(async_handle_remote_sigint, async_handle_remote_sigint_twice)
|
|
|
|
|
(remote_check_pending_interrupt, async_remote_interrupt)
|
|
|
|
|
(async_remote_interrupt_twice)
|
|
|
|
|
(async_cleanup_sigint_signal_handler, ofunc)
|
|
|
|
|
(sync_remote_interrupt, sync_remote_interrupt_twice): Delete.
|
|
|
|
|
(remote_terminal_inferior, remote_terminal_ours): Remove async
|
|
|
|
|
checks.
|
|
|
|
|
(remote_wait_as): Don't install a SIGINT handler in sync mode.
|
|
|
|
|
(readchar, remote_serial_write): Override the quit handler with
|
|
|
|
|
remote_serial_quit_handler.
|
|
|
|
|
(getpkt_or_notif_sane_1): Don't call QUIT.
|
|
|
|
|
(initialize_remote_ops): Don't install
|
|
|
|
|
remote_check_pending_interrupt.
|
|
|
|
|
(_initialize_remote): Don't create async_sigint_remote_token and
|
|
|
|
|
async_sigint_remote_twice_token.
|
|
|
|
|
* ser-base.c (ser_base_wait_for): Call QUIT and use
|
|
|
|
|
interruptible_select.
|
|
|
|
|
(ser_base_write): Call QUIT.
|
|
|
|
|
* ser-go32.c (dos_readchar, dos_write): Call QUIT.
|
|
|
|
|
* ser-unix.c (wait_for): Don't use VTIME. Always take the
|
|
|
|
|
gdb_select path, but call QUIT and interruptible_select.
|
|
|
|
|
* utils.c (maybe_quit): Call the current quit handler. Don't call
|
|
|
|
|
target_check_pending_interrupt.
|
|
|
|
|
(defaulted_query, prompt_for_continue): Override the quit handler
|
|
|
|
|
with the default quit handler.
|
|
|
|
|
|
2016-04-12 17:49:32 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* tui/tui-hooks.c (tui_target_has_run): Delete.
|
|
|
|
|
(tui_about_to_proceed): Delete.
|
|
|
|
|
(tui_about_to_proceed_observer): Delete.
|
|
|
|
|
(tui_install_hooks, tui_remove_hooks): Don't install/remove an
|
|
|
|
|
about_to_proceed observer.
|
|
|
|
|
|
Use target_terminal_ours_for_output in MI
The MI code only does output, so leave raw/cooked mode alone, as well
as the SIGINT handler. Restore terminal settings after output, while
at it. Also, a couple events missed calling target_terminal_ours
before output, even.
gdb/ChangeLog:
2016-04-12 Pedro Alves <palves@redhat.com>
* mi/mi-interp.c (mi_new_thread): Put
target_terminal_ours_for_output in effect while outputting.
(mi_thread_exit): Use target_terminal_ours_for_output instead of
target_terminal_ours.
(mi_record_changed, mi_inferior_added, mi_inferior_appeared)
(mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
(mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
(mi_breakpoint_created, mi_breakpoint_deleted)
(mi_breakpoint_modified, mi_solib_loaded, mi_solib_unloaded)
(mi_command_param_changed, mi_memory_changed)
(report_initial_inferior): Use target_terminal_ours_for_output
instead of target_terminal_ours. Restore terminal settings.
* mi/mi-main.c (mi_execute_command): Use
target_terminal_ours_for_output instead of target_terminal_ours.
Restore terminal settings.
2016-04-12 17:49:32 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* mi/mi-interp.c (mi_new_thread): Put
|
|
|
|
|
target_terminal_ours_for_output in effect while outputting.
|
|
|
|
|
(mi_thread_exit): Use target_terminal_ours_for_output instead of
|
|
|
|
|
target_terminal_ours.
|
|
|
|
|
(mi_record_changed, mi_inferior_added, mi_inferior_appeared)
|
|
|
|
|
(mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
|
|
|
|
|
(mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
|
|
|
|
|
(mi_breakpoint_created, mi_breakpoint_deleted)
|
|
|
|
|
(mi_breakpoint_modified, mi_solib_loaded, mi_solib_unloaded)
|
|
|
|
|
(mi_command_param_changed, mi_memory_changed)
|
|
|
|
|
(report_initial_inferior): Use target_terminal_ours_for_output
|
|
|
|
|
instead of target_terminal_ours. Restore terminal settings.
|
|
|
|
|
* mi/mi-main.c (mi_execute_command): Use
|
|
|
|
|
target_terminal_ours_for_output instead of target_terminal_ours.
|
|
|
|
|
Restore terminal settings.
|
|
|
|
|
|
2016-04-12 17:49:32 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
PR gdb/19828
|
|
|
|
|
* gnu-nat.c (inf_validate_task_sc): Don't call
|
|
|
|
|
target_terminal_ours / target_terminal_inferior around query.
|
|
|
|
|
* i386-tdep.c (i386_record_lea_modrm, i386_process_record): Don't
|
|
|
|
|
call target_terminal_ours / target_terminal_inferior around
|
|
|
|
|
yquery.
|
|
|
|
|
* linux-record.c (record_linux_system_call): Don't call
|
|
|
|
|
target_terminal_ours / target_terminal_inferior around yquery.
|
|
|
|
|
* nto-procfs.c (interrupt_query): Don't call target_terminal_ours
|
|
|
|
|
/ target_terminal_inferior around query.
|
|
|
|
|
* record-full.c (record_full_check_insn_num): Remove
|
|
|
|
|
'set_terminal' parameter. Don't call target_terminal_ours /
|
|
|
|
|
target_terminal_inferior around query.
|
|
|
|
|
(record_full_message, record_full_registers_change)
|
|
|
|
|
(record_full_xfer_partial): Adjust.
|
|
|
|
|
* remote.c (interrupt_query): Don't call target_terminal_ours /
|
|
|
|
|
target_terminal_inferior around query.
|
|
|
|
|
* utils.c (defaulted_query): Install cleanup to restore target
|
|
|
|
|
terminal. Put target_terminal_ours_for_output in effect while
|
|
|
|
|
defaulted producing, and target_terminal_ours in in effect while
|
|
|
|
|
handling input.
|
|
|
|
|
(prompt_for_continue): Install cleanup to restore target terminal.
|
|
|
|
|
Put target_terminal_ours in in effect while handling input.
|
|
|
|
|
|
2016-04-12 17:49:31 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* utils.c (defaulted_query, prompt_for_continue): Free temporary
|
|
|
|
|
strings with cleanups, instead of xfree.
|
|
|
|
|
|
2016-04-12 17:49:31 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* utils.c (vwarning, internal_vproblem): Use
|
|
|
|
|
make_cleanup_restore_target_terminal and
|
|
|
|
|
target_terminal_ours_for_output.
|
|
|
|
|
|
2016-04-12 17:49:31 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* infcmd.c (post_create_inferior, prepare_one_step): Use
|
|
|
|
|
target_terminal_ours_for_output instead of target_terminal_ours.
|
|
|
|
|
|
2016-04-12 17:49:31 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* exceptions.c (print_flush): Use target_terminal_ours_for_output
|
|
|
|
|
instead of target_terminal_ours, and restore target terminal with
|
|
|
|
|
a cleanup.
|
|
|
|
|
|
2016-04-12 17:49:31 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* cp-support.c (gdb_demangle): Use target_terminal_ours_for_output
|
|
|
|
|
instead of target_terminal_ours, and restore target terminal with
|
|
|
|
|
a cleanup.
|
|
|
|
|
|
2016-04-12 17:49:31 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* ada-lang.c (type_as_string, type_as_string_and_cleanup): New
|
|
|
|
|
functions.
|
|
|
|
|
(ada_lookup_struct_elt_type): Use type_as_string_and_cleanup.
|
|
|
|
|
|
2016-04-12 17:49:31 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* ser-base.c (fd_event): Retry read_prim on EINTR.
|
|
|
|
|
(do_ser_base_readchar): Retry read_prim on EINTR.
|
|
|
|
|
(ser_base_write): Retry write_prim on EINTR.
|
|
|
|
|
* ser-unix.c (ser_unix_read_prim): Don't retry on EINTR here.
|
|
|
|
|
(ser_unix_write_prim): Remove comment.
|
|
|
|
|
|
2016-04-12 17:49:31 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* remote.c (remote_pass_ctrlc): New function.
|
|
|
|
|
(init_remote_ops): Install it.
|
|
|
|
|
* target.c (target_terminal_inferior): Pass pending Ctrl-C to the
|
|
|
|
|
target.
|
|
|
|
|
(target_pass_ctrlc, default_target_pass_ctrlc): New functions.
|
|
|
|
|
* target.h (struct target_ops) <to_pass_ctrlc>: New method.
|
|
|
|
|
(target_pass_ctrlc, default_target_pass_ctrlc): New declarations.
|
|
|
|
|
* target-delegates.c: Regenerate.
|
|
|
|
|
|
2016-04-12 17:49:31 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* infcmd.c (interrupt_target_1): Call target_stop is in non-stop
|
|
|
|
|
mode.
|
|
|
|
|
* linux-nat.c (linux_nat_interrupt): Delete.
|
|
|
|
|
(linux_nat_add_target): Don't install linux_nat_interrupt.
|
|
|
|
|
* remote.c (remote_interrupt_ns): Change return type to void.
|
|
|
|
|
Throw error if interrupting the target is not supported.
|
|
|
|
|
(remote_interrupt): Don't call the remote_stop_ns/remote_stop_as.
|
|
|
|
|
|
2016-04-12 17:49:31 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* defs.h (clear_quit_flag): Remove declaration.
|
|
|
|
|
* extension-priv.h (struct extension_language_ops)
|
|
|
|
|
<clear_quit_flag>: Remove field and update comments.
|
|
|
|
|
* extension.c (clear_quit_flag): Delete.
|
|
|
|
|
* guile/guile.c (guile_extension_ops): Adjust.
|
|
|
|
|
* python/python.c (python_extension_ops): Adjust.
|
|
|
|
|
(gdbpy_clear_quit_flag): Delete.
|
|
|
|
|
|
2016-04-12 17:49:30 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* main.c (captured_main): Don't clear the quit flag.
|
|
|
|
|
|
2016-04-12 17:49:30 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* exceptions.c (prepare_to_throw_exception): Don't clear the quit
|
|
|
|
|
flag.
|
|
|
|
|
|
Don't call clear_quit_flag in command_handler
This just looks totally wrong to me, for completetly discarding a
user-requested Ctrl-C. I can't think of why we'd want do this here.
Actually, I digged the history, and found out that this has been here
since at least 7b4ac7e1ed2c (gdb-2.4, the initial revision, 1988), at
a time were we had a top level setjmp/longjmp, long before that got
wrapped in throw_exception and friends, and this code was in an
explicit loop, with the quit_flag cleared on every iteration, before
executing a command...
gdb/ChangeLog:
2016-04-12 Pedro Alves <palves@redhat.com>
* event-top.c (command_handler): Don't call clear_quit_flag.
2016-04-12 17:49:30 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* event-top.c (command_handler): Don't call clear_quit_flag.
|
|
|
|
|
|
2016-04-12 17:49:30 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* remote-sim.c (gdb_os_poll_quit): Don't call clear_quit_flag.
|
|
|
|
|
* remote.c (remote_wait_as): Don't call clear_quit_flag.
|
|
|
|
|
|
2016-04-12 17:49:30 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* python/python.c: Include "ser-event.h".
|
|
|
|
|
(gdbpy_event_fds): Delete.
|
|
|
|
|
(gdbpy_serial_event): New.
|
|
|
|
|
(gdbpy_run_events): Change prototype. Use serial_event_clear
|
|
|
|
|
instead of serial_readchar.
|
|
|
|
|
(gdbpy_post_event): Use serial_event_set instead of serial_write.
|
|
|
|
|
(gdbpy_initialize_events): Use make_serial_event instead of
|
|
|
|
|
serial_pipe.
|
|
|
|
|
|
Introduce interruptible_select
We have places where we call a blocking gdb_select expecting that a
Ctrl-C will unblock it. However, if the Ctrl-C is pressed just before
gdb_select, the SIGINT handler runs before gdb_select, and thus
gdb_select won't return.
For example gdb_readline_no_editing:
QUIT;
/* Wait until at least one byte of data is available. Control-C
can interrupt gdb_select, but not fgetc. */
FD_ZERO (&readfds);
FD_SET (fd, &readfds);
if (gdb_select (fd + 1, &readfds, NULL, NULL, NULL) == -1)
and stdio_file_read:
/* For the benefit of Windows, call gdb_select before reading from
the file. Wait until at least one byte of data is available.
Control-C can interrupt gdb_select, but not read. */
{
fd_set readfds;
FD_ZERO (&readfds);
FD_SET (stdio->fd, &readfds);
if (gdb_select (stdio->fd + 1, &readfds, NULL, NULL, NULL) == -1)
return -1;
}
return read (stdio->fd, buf, length_buf);
This is a race classically fixed with either the self-pipe trick, or
by blocking SIGINT and then using pselect instead of select.
Blocking SIGINT most of the time would mean that check_quit_flag (and
thus QUIT) would need to do a syscall every time it is called, which
sounds best avoided, since QUIT is called in many loops. Thus we take
the self-pipe trick route (wrapped in a serial event).
Instead of having all places that need this manually add an extra file
descriptor to the set of gdb_select's watched file descriptors, we
introduce a wrapper, interruptible_select, that does that.
The Windows version of gdb_select actually does not suffer from this,
because mingw-hdep.c:gdb_call_async_signal_handler sets a Windows
event that gdb_select always waits on. So this patch can be seen as
generalization of that technique. We can't remove that extra event
from mingw-hdep.c until we get rid of immediate_quit though.
gdb/ChangeLog:
2016-04-12 Pedro Alves <palves@redhat.com>
* defs.h: Extend QUIT-related comments to mention
interruptible_select.
(quit_serial_event_set, quit_serial_event_clear): Declare.
* event-top.c: Include "ser-event.h" and "gdb_select.h".
(quit_serial_event): New global.
(async_init_signals): Make quit_serial_event.
(quit_serial_event_set, quit_serial_event_clear)
(quit_serial_event_fd, interruptible_select): New functions.
* extension.c (set_quit_flag): Set the quit serial event.
(check_quit_flag): Clear the quit serial event.
* gdb_select.h (interruptible_select): New declaration.
* guile/scm-ports.c (ioscm_input_waiting): Use
interruptible_select instead of gdb_select.
* top.c (gdb_readline_no_editing): Likewise.
* ui-file.c (stdio_file_read): Likewise.
2016-04-12 17:49:30 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* defs.h: Extend QUIT-related comments to mention
|
|
|
|
|
interruptible_select.
|
|
|
|
|
(quit_serial_event_set, quit_serial_event_clear): Declare.
|
|
|
|
|
* event-top.c: Include "ser-event.h" and "gdb_select.h".
|
|
|
|
|
(quit_serial_event): New global.
|
|
|
|
|
(async_init_signals): Make quit_serial_event.
|
|
|
|
|
(quit_serial_event_set, quit_serial_event_clear)
|
|
|
|
|
(quit_serial_event_fd, interruptible_select): New functions.
|
|
|
|
|
* extension.c (set_quit_flag): Set the quit serial event.
|
|
|
|
|
(check_quit_flag): Clear the quit serial event.
|
|
|
|
|
* gdb_select.h (interruptible_select): New declaration.
|
|
|
|
|
* guile/scm-ports.c (ioscm_input_waiting): Use
|
|
|
|
|
interruptible_select instead of gdb_select.
|
|
|
|
|
* top.c (gdb_readline_no_editing): Likewise.
|
|
|
|
|
* ui-file.c (stdio_file_read): Likewise.
|
|
|
|
|
|
Fix signal handler/event-loop races
GDB's core signal handling suffers from a classical signal handler /
mainline code race:
int
gdb_do_one_event (void)
{
...
/* First let's see if there are any asynchronous signal handlers
that are ready. These would be the result of invoking any of the
signal handlers. */
if (invoke_async_signal_handlers ())
return 1;
...
/* Block waiting for a new event. (...). */
if (gdb_wait_for_event (1) < 0)
return -1;
...
}
If a signal is delivered while gdb is blocked in the poll/select
inside gdb_wait_for_event, then the select/poll breaks with EINTR,
we'll loop back around and call invoke_async_signal_handlers.
However, if the signal handler runs between
invoke_async_signal_handlers and gdb_wait_for_event,
gdb_wait_for_event will block, until the next unrelated event...
The fix is to a struct serial_event, and register it in the set of
files that select/poll in gdb_wait_for_event waits on. The signal
handlers that defer work to invoke_async_signal_handlers call
mark_async_signal_handler, which is adjusted to also set the new
serial event in addition to setting a flag, and is thus now is
garanteed to immediately unblock the next gdb_select/poll call, up
until invoke_async_signal_handlers is called and the event is cleared.
gdb/ChangeLog:
2016-04-12 Pedro Alves <palves@redhat.com>
* event-loop.c: Include "ser-event.h".
(async_signal_handlers_serial_event): New global.
(async_signals_handler, initialize_async_signal_handlers): New
functions.
(mark_async_signal_handler): Set
async_signal_handlers_serial_event.
(invoke_async_signal_handlers): Clear
async_signal_handlers_serial_event.
* event-top.c (async_init_signals): Call
initialize_async_signal_handlers.
2016-04-12 17:49:30 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* event-loop.c: Include "ser-event.h".
|
|
|
|
|
(async_signal_handlers_serial_event): New global.
|
|
|
|
|
(async_signals_handler, initialize_async_signal_handlers): New
|
|
|
|
|
functions.
|
|
|
|
|
(mark_async_signal_handler): Set
|
|
|
|
|
async_signal_handlers_serial_event.
|
|
|
|
|
(invoke_async_signal_handlers): Clear
|
|
|
|
|
async_signal_handlers_serial_event.
|
|
|
|
|
* event-top.c (async_init_signals): Call
|
|
|
|
|
initialize_async_signal_handlers.
|
|
|
|
|
|
Introduce a serial interface for select'able events
This patch adds a new "event" struct serial type, that is an
abstraction specifically for waking up blocking waits/selects,
implemented on top of a pipe on POSIX, and on top of a native Windows
event (CreateEvent, etc.) on Windows.
This will be used to plug signal handler / mainline code races.
For example, GDB can indefinitely delay handling a quit request if the
user presses Ctrl-C between the last QUIT call and the next (blocking)
gdb_select call in the event loop:
QUIT;
<<< press ctrl-c here and end up blocked in gdb_select
indefinitely.
gdb_select (...); // whoops, SIGINT was already handled, no EINTR.
A global alone (either the quit flag, or the "ready" flag of the async
signal handlers in the event loop) is not sufficient.
To plug races such as these on POSIX systems, we have to register some
waitable file descriptor in the set of files gdb_select waits on, and
write to it from the signal handler. This is classically a pipe, and
the pattern called the self-pipe trick. On Linux, it could be a more
efficient eventfd instead, but I'm sticking with a pipe for
simplifity, as we need it for portability anyway.
(Alternatively, we could use pselect/ppoll, and block signals until
the pselect. The latter is not a design I think GDB could use,
because we want the QUIT macro to be super cheap, as it is used in
loops. Plus, Windows.)
This is a "struct serial" because Windows's gdb_select relies on that.
Windows's gdb_select, our "select" replacement, knows how to wait on
all kinds of handles (regular files, pipes, sockets, console, etc.)
unlike the native Windows "select" function, which can only wait on
sockets. Each file descriptor for a "serial" type that is not
normally waitable with WaitForMultipleObjects must have a
corresponding struct serial instance. gdb_select then internally
looks up the struct serial instance that wraps each file descriptor,
and asks it for the corresponding Windows waitable handle.
We could use serial_pipe() to create a "struct serial"-wrapped pipe
that is usable everywhere, including Windows. That's what currently
python/python.c uses for cross-thread posting of events.
However, serial_write and serial_readchar are not designed to be
async-signal-safe on POSIX hosts. It's easier to bypass those when
setting/clearing the event source.
And writing and a serial pipe is a bit heavy weight on Windows.
gdb_select requires an extra thread to wait on the pipe and several
Windows events, when a single manual-reset Windows event, with no
extra thread is sufficient.
The intended usage is simply:
- Call make_serial_event to create a serial event object.
- From the signal handler call serial_event_set to set the event.
- From mainline code, have select/poll wait for serial_event_fd(), in
addition to whatever other files you're about to wait for.
gdb/ChangeLog:
2016-04-12 Pedro Alves <palves@redhat.com>
* Makefile.in (SFILES): Add ser-event.c.
(HFILES_NO_SRCDIR): Add ser-event.h.
(COMMON_OBS): Add ser-event.o.
* ser-event.c, ser-event.h: New files.
* serial.c (new_serial): New function, factored out from
(serial_fdopen_ops): ... this.
(serial_open_ops_1): New function, factored out from
(serial_open): ... this.
(serial_open_ops): New function.
* serial.h (struct serial): Forware declare.
(serial_open_ops): New declaration.
2016-04-12 17:49:30 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* Makefile.in (SFILES): Add ser-event.c.
|
|
|
|
|
(HFILES_NO_SRCDIR): Add ser-event.h.
|
|
|
|
|
(COMMON_OBS): Add ser-event.o.
|
|
|
|
|
* ser-event.c, ser-event.h: New files.
|
|
|
|
|
* serial.c (new_serial): New function, factored out from
|
|
|
|
|
(serial_fdopen_ops): ... this.
|
|
|
|
|
(serial_open_ops_1): New function, factored out from
|
|
|
|
|
(serial_open): ... this.
|
|
|
|
|
(serial_open_ops): New function.
|
|
|
|
|
* serial.h (struct serial): Forware declare.
|
|
|
|
|
(serial_open_ops): New declaration.
|
|
|
|
|
|
2016-04-12 17:49:30 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* serial.c (serial_open, serial_fdopen_ops, do_serial_close):
|
|
|
|
|
Remove references to name.
|
|
|
|
|
* serial.h (struct serial) <name>: Delete.
|
|
|
|
|
|
Stop remote-fileio.c from throwing from SIGINT handler
This code installs a custom signal handler that throws a quit
exception if remote_fio_no_longjmp is not set.
AFAICS, the only real reason for this might have been to unblock the
ui_file_read call, in remote_fileio_func_read. But ever since:
2009-11-13 Daniel Jacobowitz <dan@codesourcery.com>
* ui-file.c (stdio_file_read): Call gdb_select before read.
at:
https://sourceware.org/ml/gdb-patches/2009-11/msg00321.html
that call is interruptible.
This is not only useful for switching to native C++ exceptions, but
AFAICS, also fixes a potential mess up of the remote protocol
connection, since there are target_read_memory calls done while
remote_fio_no_longjmp is clear. If the user presses ctrl-c while GDB
is sending or receiving a packet, we'll stop the communication
immediately, at a point where it isn't safe.
gdbserver doesn't support the File I/O remote protocol extension so I
can't test this.
gdb/ChangeLog:
2016-04-12 Pedro Alves <palves@redhat.com>
* remote-fileio.c (sigint_fileio_token, remote_fio_no_longjmp):
Delete.
(async_remote_fileio_interrupt): Delete.
(remote_fileio_ctrl_c_signal_handler): Don't call the async signal
handler. Instead just always set the ctrl_c flag.
(remote_fileio_reply): Clear remote_fio_ctrl_c_flag before
re-enabling the SIGINT handler.
(remote_fileio_func_open, remote_fileio_func_close)
(remote_fileio_func_read, remote_fileio_func_write)
(remote_fileio_func_lseek, remote_fileio_func_rename)
(remote_fileio_func_unlink, remote_fileio_func_stat)
(remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
(remote_fileio_func_isatty, remote_fileio_func_system)
(remote_fileio_request): Remove references to
remote_fio_no_longjmp.
(initialize_remote_fileio): Don't create an async signal handler.
2016-04-12 17:49:30 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* remote-fileio.c (sigint_fileio_token, remote_fio_no_longjmp):
|
|
|
|
|
Delete.
|
|
|
|
|
(async_remote_fileio_interrupt): Delete.
|
|
|
|
|
(remote_fileio_ctrl_c_signal_handler): Don't call the async signal
|
|
|
|
|
handler. Instead just always set the ctrl_c flag.
|
|
|
|
|
(remote_fileio_reply): Clear remote_fio_ctrl_c_flag before
|
|
|
|
|
re-enabling the SIGINT handler.
|
|
|
|
|
(remote_fileio_func_open, remote_fileio_func_close)
|
|
|
|
|
(remote_fileio_func_read, remote_fileio_func_write)
|
|
|
|
|
(remote_fileio_func_lseek, remote_fileio_func_rename)
|
|
|
|
|
(remote_fileio_func_unlink, remote_fileio_func_stat)
|
|
|
|
|
(remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
|
|
|
|
|
(remote_fileio_func_isatty, remote_fileio_func_system)
|
|
|
|
|
(remote_fileio_request): Remove references to
|
|
|
|
|
remote_fio_no_longjmp.
|
|
|
|
|
(initialize_remote_fileio): Don't create an async signal handler.
|
|
|
|
|
|
Don't set immediate_quit in prompt_for_continue
immediate_quit used to be necessary back when prompt_for_continue used
blocking fread, but nowadays it uses gdb_readline_wrapper, which is
implemented in terms of a nested event loop, which already knows how
to react to SIGINT:
#0 throw_it (reason=RETURN_QUIT, error=GDB_NO_ERROR, fmt=0x9d6d7e "Quit", ap=0x7fffffffcb88)
at .../src/gdb/common/common-exceptions.c:324
#1 0x00000000007bab5d in throw_vquit (fmt=0x9d6d7e "Quit", ap=0x7fffffffcb88) at .../src/gdb/common/common-exceptions.c:366
#2 0x00000000007bac9f in throw_quit (fmt=0x9d6d7e "Quit") at .../src/gdb/common/common-exceptions.c:385
#3 0x0000000000773a2d in quit () at .../src/gdb/utils.c:1039
#4 0x000000000065d81b in async_request_quit (arg=0x0) at .../src/gdb/event-top.c:893
#5 0x000000000065c27b in invoke_async_signal_handlers () at .../src/gdb/event-loop.c:949
#6 0x000000000065aeef in gdb_do_one_event () at .../src/gdb/event-loop.c:280
#7 0x0000000000770838 in gdb_readline_wrapper (prompt=0x7fffffffcd40 "---Type <return> to continue, or q <return> to quit---")
at .../src/gdb/top.c:873
The need for the QUIT in stdin_event_handler is then exposed by the
gdb.base/double-prompt-target-event-error.exp test, which has:
# We're now stopped in a pagination query while handling a
# target event (printing where the program stopped). Quitting
# the pagination should result in only one prompt being
# output.
send_gdb "\003p 1\n"
Without that change we'd get:
Continuing.
---Type <return> to continue, or q <return> to quit---PASS: gdb.base/double-prompt-target-event-error.exp: ctrlc target event: continue: continue to pagination
^CpQuit
(gdb) 1
Undefined command: "1". Try "help".
(gdb) PASS: gdb.base/double-prompt-target-event-error.exp: ctrlc target event: continue: first prompt
ERROR: Undefined command "".
UNRESOLVED: gdb.base/double-prompt-target-event-error.exp: ctrlc target event: continue: no double prompt
Vs:
Continuing.
---Type <return> to continue, or q <return> to quit---PASS: gdb.base/double-prompt-target-event-error.exp: ctrlc target event: continue: continue to pagination
^CQuit
(gdb) p 1
$1 = 1
(gdb) PASS: gdb.base/double-prompt-target-event-error.exp: ctrlc target event: continue: first prompt
PASS: gdb.base/double-prompt-target-event-error.exp: ctrlc target event: continue: no double prompt
gdb/ChangeLog:
2016-04-12 Pedro Alves <palves@redhat.com>
* event-top.c (stdin_event_handler): Call QUIT;
(prompt_for_continue): Don't run with immediate_quit set.
2016-04-12 17:49:30 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* event-top.c (stdin_event_handler): Call QUIT;
|
|
|
|
|
(prompt_for_continue): Don't run with immediate_quit set.
|
|
|
|
|
|
2016-04-12 17:49:29 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* tui/tui-io.c (tui_redisplay_readline): Check
|
|
|
|
|
gdb_in_secondary_prompt_p instead of immediate_quit.
|
|
|
|
|
* tui/tui.c: Include top.h.
|
|
|
|
|
(tui_rl_startup_hook): Check gdb_in_secondary_prompt_p instead of
|
|
|
|
|
immediate_quit.
|
|
|
|
|
|
2016-04-12 17:49:29 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* top.c (read_command_file): Inline command_loop here.
|
|
|
|
|
(command_loop): Delete.
|
|
|
|
|
|
2016-04-12 17:49:29 +02:00
|
|
|
|
2016-04-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* top.c: Include "gdb_select.h".
|
|
|
|
|
(gdb_readline_no_editing): Wait for input with gdb_select instead
|
|
|
|
|
of blocking in fgetc.
|
|
|
|
|
(command_line_input): Don't set immediate_quit.
|
|
|
|
|
|
2016-04-08 20:05:45 +02:00
|
|
|
|
2016-04-08 Martin Galvan <martin.galvan@tallertechnologies.com>
|
|
|
|
|
|
|
|
|
|
* value.c (value_next): Make pass-by-reference parameters const-correct.
|
|
|
|
|
(value_parent): Likewise.
|
|
|
|
|
(value_enclosing_type): Likewise.
|
|
|
|
|
(value_lazy): Likewise.
|
|
|
|
|
(value_stack): Likewise.
|
|
|
|
|
(value_embedded_offset): Likewise.
|
|
|
|
|
(value_pointed_to_offset): Likewise.
|
|
|
|
|
(value_raw_address): Likewise.
|
|
|
|
|
(deprecated_value_modifiable): Likewise.
|
|
|
|
|
(value_free_to_mark): Likewise.
|
|
|
|
|
(value_release_to_mark): Likewise.
|
|
|
|
|
(internalvar_name): Likewise.
|
|
|
|
|
(readjust_indirect_value_type): Likewise.
|
|
|
|
|
(value_initialized): Likewise.
|
|
|
|
|
* value.h (value_next): Likewise.
|
|
|
|
|
(value_parent): Likewise.
|
|
|
|
|
(value_enclosing_type): Likewise.
|
|
|
|
|
(value_lazy): Likewise.
|
|
|
|
|
(value_stack): Likewise.
|
|
|
|
|
(value_embedded_offset): Likewise.
|
|
|
|
|
(value_pointed_to_offset): Likewise.
|
|
|
|
|
(value_raw_address): Likewise.
|
|
|
|
|
(deprecated_value_modifiable): Likewise.
|
|
|
|
|
(value_free_to_mark): Likewise.
|
|
|
|
|
(value_release_to_mark): Likewise.
|
|
|
|
|
(internalvar_name): Likewise.
|
|
|
|
|
(readjust_indirect_value_type): Likewise.
|
|
|
|
|
(value_initialized): Likewise.
|
|
|
|
|
|
Make breakpoint handling in record-full idempotent
Some test fails in gdb.reverse/break-reverse.exp on arm-linux lead me
seeing the following error message,
continue^M
Continuing.^M
Cannot remove breakpoints because program is no longer writable.^M
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Further execution is probably impossible.^M
^M
Breakpoint 3, bar () at /home/yao/SourceCode/gnu/gdb/git/gdb/testsuite/gdb.reverse/break-reverse.c:22^M
22 xyz = 2; /* break in bar */^M
(gdb) PASS: gdb.reverse/break-reverse.exp: continue to breakpoint: bar backward
this is caused by two entries in record_full_breakpoints, and their addr
is the same, but in_target_beneath is different.
during the record, we do continue,
Continuing.
infrun: clear_proceed_status_thread (Thread 13772.13772)
infrun: proceed (addr=0xffffffff, signal=GDB_SIGNAL_DEFAULT)
infrun: step-over queue now empty
infrun: resuming [Thread 13772.13772] for step-over
infrun: skipping breakpoint: stepping past insn at: 0x8620
Sending packet: $Z0,85f4,4#1d...Packet received: OK <----
.....
Sending packet: $vCont;c#a8...infrun: target_wait (-1.0.0, status) =
infrun: -1.0.0 [process -1],
infrun: status->kind = ignore
infrun: TARGET_WAITKIND_IGNORE
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: -1.0.0 [process -1],
infrun: status->kind = ignore
infrun: TARGET_WAITKIND_IGNORE
infrun: prepare_to_wait
Packet received: T05swbreak:;0b:9cf5ffbe;0d:9cf5ffbe;0f:f4850000;thread:p35cc.35cc;core:1;
Sending packet: $Z0,85f4,4#1d...Packet received: OK <-----
....
Sending packet: $z0,85f4,4#3d...Packet received: OK <-----
we can see breakpoint on 0x85f4 are inserted *twice*, but only removed
once. That is fine to remote target, because Z/z packets are
idempotent, but there is a leftover in record_full_breakpoints
in record-full target. The flow can be described as below,
record_full_breakpoints remote target
-----------------------------------------------------------------------
forward execution, continue, in_target_beneath 1 breakpoint inserted
insert breakpoints on 0x85f4 in_target_beneath 1
twice
program stops,
remove breakpoint on 0x85f4 in_target_beneath 1 breakpoint removed
reverse execution, continue, in_target_beneath 1 none is requested
insert breakpoints on 0x85f4, in_target_beneath 0
program stops,
remote breakpoint on 0x85f4, in_target_beneath 0 request to remove,
but GDBserver
doesn't know
now, the question is why breakoint on 0x85f4 is inserted twice? One
is the normal breakpoint, and the other is the single step breakpoint.
GDB inserts single step breakpoint to do single step. When program
stops at 0x85f4, both of them are set on 0x85f4, and GDB deletes
single step breakpoint, so in update_global_location_list, this
breakpoint location is no longer found, GDB call
force_breakpoint_reinsertion to mark it condition_updated, and insert
it again.
The reason force_breakpoint_reinsertion is called to update the
conditions in the target side, because the conditions may be
changed. My original fix is to not call force_breakpoint_reinsertion
if OLD_LOC->cond is NULL, but it is not correct if another location
on the same address has condition, GDB doesn't produce condition for
target side, but GDB should do.
Then, I change my mind back to make record-full handling breakpoint
idempotent, to align with remote target. Before insert a new entry
into record_full_breakpoints, look for existing one on the same
address first. I also add an assert on
"bp->in_target_beneath == in_target_beneath", to be safer.
gdb:
2016-04-07 Yao Qi <yao.qi@linaro.org>
* record-full.c (record_full_insert_breakpoint): Return
early if entry on the address is found in
record_full_breakpoints.
2016-04-07 17:47:26 +02:00
|
|
|
|
2016-04-07 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* record-full.c (record_full_insert_breakpoint): Return
|
|
|
|
|
early if entry on the address is found in
|
|
|
|
|
record_full_breakpoints.
|
|
|
|
|
|
2016-04-07 17:47:26 +02:00
|
|
|
|
2016-04-07 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* record-full.c (record_full_insert_breakpoint): Set
|
|
|
|
|
bp_tgt->reqstd_address and bp_tgt->placed_size.
|
|
|
|
|
|
2016-04-06 23:18:31 +02:00
|
|
|
|
2016-04-06 Don Breazeal <donb@codesourcery.com>
|
|
|
|
|
|
|
|
|
|
* value.c (value_actual_type): Don't try to get rtti type
|
|
|
|
|
of the value if it has been optimized out.
|
|
|
|
|
(value_optimized_out): If a memory access error occurs,
|
|
|
|
|
just check vaue->optimized_out.
|
|
|
|
|
|
2016-04-06 21:05:16 +02:00
|
|
|
|
2016-04-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
|
|
|
|
|
|
Revert the previous commit adding unknown_v_replies_ok.
|
|
|
|
|
|
2016-04-06 17:13:12 +02:00
|
|
|
|
2016-04-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
|
|
|
|
|
|
* remote.c (struct remote_state): New field unknown_v_replies_ok.
|
|
|
|
|
(packet_config_support): Read it.
|
|
|
|
|
(remote_start_remote): Set it.
|
|
|
|
|
|
2016-04-06 16:48:27 +02:00
|
|
|
|
2016-04-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
|
|
|
|
|
|
* remote.c: Revert check-in by a mistake in the previous commit.
|
|
|
|
|
|
2016-04-06 15:57:08 +02:00
|
|
|
|
2016-04-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
|
Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* exec.c (exec_file_locate_attach): Print warning for unsupported
|
|
|
|
|
target_pid_to_exec_file.
|
|
|
|
|
* symfile-mem.c (add_vsyscall_page): Remove the "file" command
|
|
|
|
|
message part.
|
|
|
|
|
|
2016-04-04 22:46:36 +02:00
|
|
|
|
2016-04-04 Simon Marchi <simon.marchi@ericsson.com>
|
|
|
|
|
|
|
|
|
|
* cli/cli-decode.c (help_cmd_list): Fix function doc and remove
|
|
|
|
|
trailing spaces.
|
|
|
|
|
|
2016-04-01 17:00:59 +02:00
|
|
|
|
2016-04-01 Artemiy Volkov <artemiyv@acm.org>
|
|
|
|
|
|
|
|
|
|
PR gdb/19820
|
|
|
|
|
* eval.c (evaluate_subexp_standard): Allow TYPE_CODE_ENUM to be
|
|
|
|
|
the type of BINOP_REPEAT's second operand.
|
|
|
|
|
|
2016-03-31 20:28:47 +02:00
|
|
|
|
2016-03-31 Yichao Yu <yyc1992@gmail.com>
|
|
|
|
|
|
|
|
|
|
PR gdb/19858
|
|
|
|
|
* jit.c (jit_breakpoint_re_set_internal): Return 0 if we already
|
|
|
|
|
got the breakpoint at the right address.
|
|
|
|
|
(jit_inferior_created): New function.
|
|
|
|
|
(_initialize_jit): Install jit_inferior_created as
|
|
|
|
|
inferior_created observer.
|
|
|
|
|
|
2016-03-31 15:49:25 +02:00
|
|
|
|
2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
|
|
|
|
|
|
|
|
|
|
* NEWS: Mention support for tracepoints on powerpc*-linux.
|
|
|
|
|
|
2016-02-29 15:16:19 +01:00
|
|
|
|
2016-03-31 Catalin Udma <catalin.udma@freescale.com>
|
|
|
|
|
|
|
|
|
|
PR python/19743
|
|
|
|
|
* python/python.c (execute_gdb_command): Use console uiout
|
|
|
|
|
when executing gdb command.
|
|
|
|
|
* utils.c (restore_ui_out_closure): New structure.
|
|
|
|
|
(do_restore_ui_out): New function.
|
|
|
|
|
(make_cleanup_restore_ui_out): Likewise.
|
|
|
|
|
* utils.h (make_cleanup_restore_ui_out): Declare.
|
|
|
|
|
|
Remove support for "target m32rsdi" and "target mips/pmon/ddb/rockhopper/lsi"
This removes support for:
| target | source |
|-------------------+-----------------------|
| target m32rsdi | gdb/remote-m32r-sdi.c |
| target mips | gdb/remote-mips.c |
| target pmon | gdb/remote-mips.c |
| target ddb | gdb/remote-mips.c |
| target rockhopper | gdb/remote-mips.c |
| target lsi | gdb/remote-mips.c |
That is:
- Remote M32R debugging over SDI.
- Debugging boards using the MIPS remote debugging protocol
over a serial line, PMON, and a few variants.
These are the last non-"target remote" remote targets in the tree, if
you don't count "target sim".
Refs:
https://sourceware.org/ml/gdb/2016-03/msg00004.html
https://sourceware.org/ml/gdb-patches/2016-03/msg00580.html
gdb/ChangeLog:
2016-03-31 Pedro Alves <palves@redhat.com>
* NEWS: Mention that support for "target m32rsdi", "target mips",
"target pmon", "target ddb", "target rockhopper", and "target lsi"
was removed.
* Makefile.in (ALL_TARGET_OBS): Remove remote-m32r-sdi.o and
remote-mips.o.
(ALLDEPFILES): Remove remote-m32r-sdi.c and remote-mips.c.
* configure.tgt: Remove all references to remote-m32r-sdi.o and
remote-mips.o.
* mips-tdep.c (deprecated_mips_set_processor_regs_hack): Delete
function.
* mips-tdep.h (deprecated_mips_set_processor_regs_hack): Delete
declaration.
* remote-m32r-sdi.c, remote-mips.c: Delete files.
* symfile.c (generic_load, generic_load): Remove comments.
gdb/doc/ChangeLog:
2016-03-31 Pedro Alves <palves@redhat.com>
* gdb.texinfo (M32R/SDI): Delete node.
(MIPS Embedded): Remove references to the MIPS remote debugging
protocol, PMON and variants, and the associated commands.
2016-03-31 14:24:34 +02:00
|
|
|
|
2016-03-31 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* NEWS: Mention that support for "target m32rsdi", "target mips",
|
|
|
|
|
"target pmon", "target ddb", "target rockhopper", and "target lsi"
|
|
|
|
|
was removed.
|
|
|
|
|
* Makefile.in (ALL_TARGET_OBS): Remove remote-m32r-sdi.o and
|
|
|
|
|
remote-mips.o.
|
|
|
|
|
(ALLDEPFILES): Remove remote-m32r-sdi.c and remote-mips.c.
|
|
|
|
|
* configure.tgt: Remove all references to remote-m32r-sdi.o and
|
|
|
|
|
remote-mips.o.
|
|
|
|
|
* mips-tdep.c (deprecated_mips_set_processor_regs_hack): Delete
|
|
|
|
|
function.
|
|
|
|
|
* mips-tdep.h (deprecated_mips_set_processor_regs_hack): Delete
|
|
|
|
|
declaration.
|
|
|
|
|
* remote-m32r-sdi.c, remote-mips.c: Delete files.
|
|
|
|
|
* symfile.c (generic_load, generic_load): Remove comments.
|
|
|
|
|
|
2016-03-30 18:02:46 +02:00
|
|
|
|
2016-03-30 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arm-tdep.c (arm_epilogue_frame_this_id): Check 'func' against
|
|
|
|
|
0 rather than NULL.
|
|
|
|
|
|
Add arm epilogue unwinder
Nowadays, GDB can't unwind successfully from epilogue on arm,
(gdb) bt
#0 0x76ff65a2 in shr1 () from /home/yao/Source/gnu/build/gdb/testsuite/gdb.reverse/shr1.sl
#1 0x0000869e in main () at /home/yao/Source/gnu/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.reverse/solib-reverse.c:34
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) disassemble shr1
Dump of assembler code for function shr1:
....
0x76ff659a <+10>: adds r7, #12
0x76ff659c <+12>: mov sp, r7
0x76ff659e <+14>: ldr.w r7, [sp], #4
0x76ff65a2 <+18>: bx lr
End of assembler dump.
in this case, prologue unwinder is used. It analyzes the prologue and
get the offsets of saved registers to SP. However, in epilogue, the
SP has been restored, prologue unwinder gets the registers from the
wrong address, and even the frame id is wrong.
In reverse debugging, this case (program stops at the last instruction
of function) happens quite frequently due to the reverse execution.
There are many test fails due to missing epilogue unwinder.
This adds epilogue unwinder, but the frame cache is still get by
prologue unwinder except that SP is fixed up separately, because SP
is restored in epilogue.
This patch fixes many fails in solib-precsave.exp, and solib-reverse.exp.
gdb:
2016-03-30 Yao Qi <yao.qi@linaro.org>
* arm-tdep.c: (arm_make_epilogue_frame_cache): New function.
(arm_epilogue_frame_this_id): New function.
(arm_epilogue_frame_prev_register): New function.
(arm_epilogue_frame_sniffer): New function.
(arm_epilogue_frame_unwind): New.
(arm_gdbarch_init): Append unwinder arm_epilogue_frame_unwind.
2016-03-30 17:44:24 +02:00
|
|
|
|
2016-03-30 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arm-tdep.c: (arm_make_epilogue_frame_cache): New function.
|
|
|
|
|
(arm_epilogue_frame_this_id): New function.
|
|
|
|
|
(arm_epilogue_frame_prev_register): New function.
|
|
|
|
|
(arm_epilogue_frame_sniffer): New function.
|
|
|
|
|
(arm_epilogue_frame_unwind): New.
|
|
|
|
|
(arm_gdbarch_init): Append unwinder arm_epilogue_frame_unwind.
|
|
|
|
|
|
2016-03-30 17:44:24 +02:00
|
|
|
|
2016-03-30 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arm-tdep.c (arm_stack_frame_destroyed_p): Rename it ...
|
|
|
|
|
(arm_stack_frame_destroyed_p_1): ... here. Don't call
|
|
|
|
|
arm_pc_is_thumb.
|
|
|
|
|
(arm_stack_frame_destroyed_p): Call
|
|
|
|
|
thumb_stack_frame_destroyed_p and
|
|
|
|
|
arm_stack_frame_destroyed_p_1.
|
|
|
|
|
|
2016-03-30 08:48:35 +02:00
|
|
|
|
2016-03-30 Doug Evans <dje@google.com>
|
|
|
|
|
|
|
|
|
|
* python/py-utils.c (host_string_to_python_string): New function.
|
|
|
|
|
* python/python-internal.h (host_string_to_python_string): Declare it.
|
|
|
|
|
* python/py-*.c (*): Update all calls to
|
|
|
|
|
PyString_Decode (str, strlen (str), host_charset (), NULL);
|
|
|
|
|
to use host_string_to_python_string instead.
|
|
|
|
|
|
gdbserver: Handle 'v' packet while processing qSymbol.
On powerpc64, qSymbol query may require gdb to read a function
descriptor, sending a vFile packet to gdbserver. Thus, we need
to handle 'v' packet in look_up_one_symbol.
vFile replies may be quite long, and require reallocating own_buf.
Since handle_v_requests assumes the buffer is the static global own_buf
from server.c and reallocates it, we need to make own_buf global and
use it from look_up_one_symbol instead of using our own auto variable.
I've also done the same change in relocate_instruction, just in case.
On gdb side, in remote_check_symbols, rs->buf may be clobbered by vFile
handling, yet we need its contents for the reply (the symbol name is
stored there). Allocate a new buffer instead.
This broke fast tracepoints on powerpc64, due to errors in reading IPA
symbols.
gdb/ChangeLog:
* remote.c (remote_check_symbols): Allocate own buffer for reply.
gdbserver/ChangeLog:
* remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
packets.
(relocate_instruction): Remove own_buf.
* server.c (own_buf): Make global.
(handle_v_requests): Make global.
* server.h (own_buf): New declaration.
(handle_v_requests): New prototype.
2016-03-12 14:03:26 +01:00
|
|
|
|
2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
|
|
|
|
|
|
|
|
|
|
* remote.c (remote_check_symbols): Allocate own buffer for reply.
|
|
|
|
|
|
2016-03-27 19:45:54 +02:00
|
|
|
|
2016-03-29 Max Filippov <jcmvbkbc@gmail.com>
|
|
|
|
|
|
|
|
|
|
* xtensa-tdep.c (xtensa_frame_cache): Change op1 type to LONGEST.
|
|
|
|
|
Use safe_read_memory_integer instead of read_memory_integer.
|
|
|
|
|
|
2016-03-29 23:18:19 +02:00
|
|
|
|
2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
|
|
|
|
|
|
|
|
|
|
* NEWS: Mention support for tracepoints on s390*-linux.
|
|
|
|
|
|
2016-03-29 19:27:43 +02:00
|
|
|
|
2016-03-29 Don Breazeal <donb@codesourcery.com>
|
|
|
|
|
|
|
|
|
|
* gdb/value.c (value_actual_type): Fix formatting issue.
|
|
|
|
|
|
2016-03-23 12:21:20 +01:00
|
|
|
|
2016-03-23 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* gdbarch.sh (software_single_step): Remove comments.
|
|
|
|
|
* gdbarch.h: Regenerated.
|
|
|
|
|
|
2016-03-21 11:41:38 +01:00
|
|
|
|
2016-03-21 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arm-tdep.c (arm_record_media): New.
|
|
|
|
|
(arm_record_ld_st_reg_offset): Call arm_record_media.
|
|
|
|
|
|
2016-03-21 11:22:59 +01:00
|
|
|
|
2016-03-21 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arm-linux-tdep.c (arm_canonicalize_syscall): Canonicalize
|
|
|
|
|
more syscalls.
|
|
|
|
|
|
2016-03-18 16:01:47 +01:00
|
|
|
|
2016-03-18 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* sparc-tdep.c (sparc_software_single_step): Make it static.
|
|
|
|
|
* sparc-tdep.h (sparc_software_single_step): Remove declaration.
|
|
|
|
|
|
2016-03-18 15:39:09 +01:00
|
|
|
|
2016-03-18 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* spu-tdep.c (spu_software_single_step): Throw error when
|
|
|
|
|
target_read_memory fails.
|
|
|
|
|
|
2016-03-17 18:17:30 +01:00
|
|
|
|
2016-03-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
|
|
|
|
|
|
* linux-thread-db.c (check_pid_namespace_match): Extend the message.
|
|
|
|
|
|
PR remote/19496, timeout in forking-threads-plus-bkpt
This patch addresses a failure in
gdb.threads/forking-threads-plus-breakpoint.exp:
FAIL: gdb.threads/forking-threads-plus-breakpoint.exp: cond_bp_target=1:
detach_on_fork=on: inferior 1 exited (timeout)
Cause:
A fork event was reported to GDB before GDB knew about the parent
thread, followed immediately by a breakpoint event in a different
thread. The parent thread was subsequently added via
remote_notice_new_inferior in process_stop_reply, but when the thread
was added the thread_info.state was set to THREAD_STOPPED. The fork
event was then handled correctly, but when the fork parent was resumed
via a call to keep_going, the state was unchanged.
The breakpoint event was then handled, which caused all the
non-breakpoint threads to be stopped. When the breakpoint thread was
resumed, all the non-breakpoint threads were resumed via
infrun.c:restart_threads. Our old fork parent wasn't restarted,
because it still had thread_info.state set to THREAD_STOPPED.
Ultimately the program under debug hung waiting for a pthread_join
while the old fork parent was stopped forever by GDB.
Fix:
Since this is non-stop, then the bug is that the thread should have
been added in THREAD_RUNNING state. Consider that infrun may be
pulling target events out of the target_ops backend into its own event
queue, but, not process them immediately. E.g., infrun may be
stopping all threads temporarily for a step-over-breakpoint operation
for thread A (stop_all_threads). The waitstatus of all threads is
thus left pending in the thread structure (save_status), including the
fork event of thread B. Right at this point, if the user does "info
threads", that should show thread B (the fork parent) running, not
stopped, even if internally, gdb is holding it paused for a little
bit.
Thus if in non-stop mode, always add new threads in the external
user-visible THREAD_RUNNING state. Change remote_notice_new_inferior
to accept the internal executing state of the thread instead, with
EXECUTING set to 1 when we discover a thread that is running on the
target (such as through remote_update_thread_list), and 0 when the
thread is really paused (such as when we see a stop reply).
Tested on x86_64 Linux and Nios II Linux target with x86 Linux host.
gdb/ChangeLog:
2016-03-17 Pedro Alves <palves@redhat.com>
Don Breazeal <donb@codesourcery.com>
PR remote/19496
* infcmd.c (notice_new_inferior): Use the 'leave_running' argument
instead of checking the 'non_stop' global.
* remote.c (remote_add_thread): New parameter 'executing'. Use it
to set the new thread's executing state.
(remote_notice_new_inferior): Rename parameter 'running' to
'executing'. Always set the thread state to THREAD_RUNNING in
non-stop mode, and to THREAD_STOPPED in all-stop mode. Pass
EXECUTING to remote_add_thread and notice_new_inferior.
(remote_update_thread_list): Update to pass executing state, not
running state.
2016-03-17 11:21:37 +01:00
|
|
|
|
2016-03-17 Pedro Alves <palves@redhat.com>
|
|
|
|
|
Don Breazeal <donb@codesourcery.com>
|
|
|
|
|
|
|
|
|
|
PR remote/19496
|
|
|
|
|
* infcmd.c (notice_new_inferior): Use the 'leave_running' argument
|
|
|
|
|
instead of checking the 'non_stop' global.
|
|
|
|
|
* remote.c (remote_add_thread): New parameter 'executing'. Use it
|
|
|
|
|
to set the new thread's executing state.
|
|
|
|
|
(remote_notice_new_inferior): Rename parameter 'running' to
|
|
|
|
|
'executing'. Always set the thread state to THREAD_RUNNING in
|
|
|
|
|
non-stop mode, and to THREAD_STOPPED in all-stop mode. Pass
|
|
|
|
|
EXECUTING to remote_add_thread and notice_new_inferior.
|
|
|
|
|
(remote_update_thread_list): Update to pass executing state, not
|
|
|
|
|
running state.
|
|
|
|
|
|
2016-03-17 10:55:55 +01:00
|
|
|
|
2016-03-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
* syscalls/s390-linux.xml: Add NUMA syscalls and new syscalls up
|
|
|
|
|
to 374.
|
|
|
|
|
* syscalls/s390x-linux.xml: Likewise.
|
|
|
|
|
|
2016-03-17 09:58:57 +01:00
|
|
|
|
2016-03-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
* linux-record.c (record_mem_at_reg): New helper function.
|
|
|
|
|
(record_linux_system_call): Exploit new helper function where
|
|
|
|
|
applicable.
|
|
|
|
|
|
2016-03-17 09:58:57 +01:00
|
|
|
|
2016-03-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
* linux-record.c: Fix whitespace issues; tabify, remove trailing
|
|
|
|
|
spaces.
|
|
|
|
|
|
2016-03-17 09:58:56 +01:00
|
|
|
|
2016-03-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
* linux-record.c (record_linux_system_call): Add missing return
|
|
|
|
|
statements to handling of pipe and pipe2 syscalls.
|
|
|
|
|
|
2016-03-16 18:30:41 +01:00
|
|
|
|
2016-03-16 Doug Evans <dje@google.com>
|
|
|
|
|
|
|
|
|
|
* xml-tdesc.c (tdesc_start_enum): Fix c++ build.
|
|
|
|
|
|
2016-03-16 15:55:56 +01:00
|
|
|
|
2016-03-16 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arm-linux-tdep.c (arm_linux_init_abi): Fix
|
|
|
|
|
arm_linux_record_tdep.arg1, arm_linux_record_tdep.arg2 and
|
|
|
|
|
arm_linux_record_tdep.arg3. Set arm_linux_record_tdep.arg4,
|
|
|
|
|
arm_linux_record_tdep.arg5, arm_linux_record_tdep.arg6, and
|
|
|
|
|
arm_linux_record_tdep.arg7.
|
|
|
|
|
|
2016-03-15 23:18:28 +01:00
|
|
|
|
2016-03-15 Keith Seitz <keiths@redhat.com>
|
|
|
|
|
|
|
|
|
|
PR breakpoints/18303
|
|
|
|
|
* cp-namespace.c (cp_lookup_bare_symbol): Change assertion to
|
|
|
|
|
look for "::" instead of simply ":".
|
|
|
|
|
(cp_search_static_and_baseclasses): Return null_block_symbol for
|
|
|
|
|
malformed input.
|
|
|
|
|
Remove assertions.
|
|
|
|
|
* cp-support.c (cp_find_first_component_aux): Do not return
|
|
|
|
|
a prefix length for ':' unless the next character is also ':'.
|
|
|
|
|
|
2016-03-15 22:43:49 +01:00
|
|
|
|
2016-03-15 Doug Evans <dje@google.com>
|
|
|
|
|
|
|
|
|
|
* features/aarch64-core.xml (cpsr_flags): New flags type.
|
|
|
|
|
(cpsr): Use it.
|
|
|
|
|
* features/aarch64.c: Regenerate.
|
|
|
|
|
|
2016-03-15 22:41:52 +01:00
|
|
|
|
2016-03-15 Doug Evans <dje@google.com>
|
|
|
|
|
|
|
|
|
|
* features/i386/32bit-core.xml (i386_eflags): Remove "end" spec.
|
|
|
|
|
* features/i386/32bit-sse.xml (i386_eflags): Ditto.
|
|
|
|
|
* features/i386/64bit-core.xml (i386_eflags): Ditto.
|
|
|
|
|
* features/i386/64bit-sse.xml (i386_eflags): Ditto.
|
|
|
|
|
* features/i386/x32-core.xml (i386_eflags): Ditto.
|
|
|
|
|
|
2016-03-15 22:37:29 +01:00
|
|
|
|
2016-03-15 Doug Evans <dje@google.com>
|
2016-03-15 23:02:13 +01:00
|
|
|
|
Wei-cheng Wang <cole945@gmail.com>
|
2016-03-15 22:37:29 +01:00
|
|
|
|
|
|
|
|
|
Extend flags to support multibit and enum bitfields.
|
2016-03-15 23:02:13 +01:00
|
|
|
|
* NEWS: Document new features.
|
2016-03-15 22:37:29 +01:00
|
|
|
|
* c-typeprint.c (c_type_print_varspec_prefix): Handle TYPE_CODE_FLAGS.
|
|
|
|
|
(c_type_print_varspec_suffix, c_type_print_base): Ditto.
|
|
|
|
|
* gdbtypes.c (arch_flags_type): Don't assume all fields are one bit.
|
|
|
|
|
(append_flags_type_field): New function.
|
|
|
|
|
(append_flags_type_flag): Call it.
|
|
|
|
|
* gdbtypes.h (append_flags_type_field): Declare.
|
|
|
|
|
* target-descriptions.c (struct tdesc_type_flag): Delete.
|
|
|
|
|
(enum tdesc_type_kind) <TDESC_TYPE_BOOL>: New enum value.
|
|
|
|
|
(enum tdesc_type_kind) <TDESC_TYPE_ENUM>: Ditto.
|
|
|
|
|
(struct tdesc_type) <u.f>: Delete.
|
|
|
|
|
(tdesc_predefined_types): Add "bool".
|
|
|
|
|
(tdesc_predefined_type): New function.
|
|
|
|
|
(tdesc_gdb_type): Handle TDESC_TYPE_BOOL, TDESC_TYPE_ENUM.
|
|
|
|
|
Update TDESC_TYPE_FLAGS support.
|
|
|
|
|
(tdesc_free_type): Handle TDESC_TYPE_ENUM. Update TDESC_TYPE_FLAGS.
|
|
|
|
|
(tdesc_create_flags): Update.
|
|
|
|
|
(tdesc_create_enum): New function.
|
|
|
|
|
(tdesc_add_field): Initialize start,end to -1.
|
|
|
|
|
(tdesc_add_typed_bitfield): New function.
|
|
|
|
|
(tdesc_add_bitfield): Call it.
|
|
|
|
|
(tdesc_add_flag): Allow TDESC_TYPE_STRUCT. Update.
|
|
|
|
|
(tdesc_add_enum_value): New function.
|
|
|
|
|
(maint_print_c_tdesc_cmd): Fold TDESC_TYPE_FLAGS support into
|
|
|
|
|
TDESC_TYPE_STRUCT. Handle TDESC_TYPE_ENUM.
|
|
|
|
|
* target-descriptions.h (tdesc_create_enum): Declare.
|
|
|
|
|
(tdesc_add_typed_bitfield, tdesc_add_enum_value): Declare.
|
|
|
|
|
* valprint.c (generic_val_print_enum_1): New function.
|
|
|
|
|
(generic_val_print_enum): Call it.
|
|
|
|
|
(val_print_type_code_flags): Make static. Handle multibit bitfields
|
|
|
|
|
and enum bitfields.
|
|
|
|
|
* valprint.h (val_print_type_code_flags): Delete.
|
|
|
|
|
* xml-tdesc.c (struct tdesc_parsing_data) <current_type_is_flags>:
|
|
|
|
|
Delete. All uses removed.
|
|
|
|
|
(tdesc_start_enum): New function.
|
|
|
|
|
(tdesc_start_field): Handle multibit and enum bitfields.
|
|
|
|
|
(tdesc_start_enum_value): New function.
|
|
|
|
|
(enum_value_attributes, enum_children, enum_attributes): New static
|
|
|
|
|
globals.
|
|
|
|
|
(feature_children): Add "enum".
|
|
|
|
|
* features/gdb-target.dtd (enum, evalue): New elements.
|
|
|
|
|
|
2016-03-15 20:57:06 +01:00
|
|
|
|
2016-03-15 Doug Evans <dje@google.com>
|
|
|
|
|
|
|
|
|
|
* target-descriptions.c (struct tdesc_type) <u.u.size>: Change type
|
|
|
|
|
from LONGEST to int.
|
|
|
|
|
(struct tdesc_type) <u.f.size>: Ditto.
|
|
|
|
|
(tdesc_set_struct_size): Change type of "size" arg from LONGEST
|
|
|
|
|
to int. Add assertion size > 0.
|
|
|
|
|
(tdesc_create_flags): Ditto.
|
|
|
|
|
* target-descriptions.h (tdesc_set_struct_size): Update.
|
|
|
|
|
(tdesc_create_flags): Update.
|
|
|
|
|
* xml-tdesc.c (MAX_FIELD_SIZE, MAX_FIELD_BITSIZE): New macros.
|
|
|
|
|
(MAX_VECTOR_SIZE): New macro.
|
|
|
|
|
(tdesc_start_struct): Catch conversion errors from LONGEST to int.
|
|
|
|
|
(tdesc_start_flags, tdesc_start_field, tdesc_start_vector): Ditto.
|
|
|
|
|
|
2016-03-15 20:53:55 +01:00
|
|
|
|
2016-03-15 Doug Evans <dje@google.com>
|
|
|
|
|
|
|
|
|
|
* target-descriptions.c (maint_print_c_tdesc_cmd): Use "type" for
|
|
|
|
|
TYPE_CODE_FLAGS instead of "field_type", for consistency.
|
|
|
|
|
* features/i386/amd64-avx-linux.c: Regenerate.
|
|
|
|
|
* features/i386/amd64-avx.c: Regenerate.
|
|
|
|
|
* features/i386/amd64-avx512-linux.c: Regenerate.
|
|
|
|
|
* features/i386/amd64-avx512.c: Regenerate.
|
|
|
|
|
* features/i386/amd64-linux.c: Regenerate.
|
|
|
|
|
* features/i386/amd64-mpx-linux.c: Regenerate.
|
|
|
|
|
* features/i386/amd64-mpx.c: Regenerate.
|
|
|
|
|
* features/i386/amd64.c: Regenerate.
|
|
|
|
|
* features/i386/i386-avx-linux.c: Regenerate.
|
|
|
|
|
* features/i386/i386-avx.c: Regenerate.
|
|
|
|
|
* features/i386/i386-avx512-linux.c: Regenerate.
|
|
|
|
|
* features/i386/i386-avx512.c: Regenerate.
|
|
|
|
|
* features/i386/i386-linux.c: Regenerate.
|
|
|
|
|
* features/i386/i386-mmx-linux.c: Regenerate.
|
|
|
|
|
* features/i386/i386-mmx.c: Regenerate.
|
|
|
|
|
* features/i386/i386-mpx-linux.c: Regenerate.
|
|
|
|
|
* features/i386/i386-mpx.c: Regenerate.
|
|
|
|
|
* features/i386/i386.c: Regenerate.
|
|
|
|
|
* features/i386/x32-avx-linux.c: Regenerate.
|
|
|
|
|
* features/i386/x32-avx.c: Regenerate.
|
|
|
|
|
* features/i386/x32-avx512-linux.c: Regenerate.
|
|
|
|
|
* features/i386/x32-avx512.c: Regenerate.
|
|
|
|
|
* features/i386/x32-linux.c: Regenerate.
|
|
|
|
|
* features/i386/x32.c: Regenerate.
|
|
|
|
|
|
2016-03-15 17:33:04 +01:00
|
|
|
|
2016-03-15 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
PR gdb/19676
|
|
|
|
|
* linux-thread-db.c (try_thread_db_load_1): Leave
|
|
|
|
|
info->td_ta_thr_iter_p NULL iff debugging a live process and we
|
|
|
|
|
have /proc access.
|
|
|
|
|
(find_new_threads_once): Assert that we have a non-NULL
|
|
|
|
|
info->td_ta_thr_iter_p instead of checking whether the target has
|
|
|
|
|
execution.
|
|
|
|
|
|
Fix PR gdb/19676: Disable displaced stepping if /proc not mounted
On GNU/Linux archs that support displaced stepping, if /proc is not
mounted, GDB gets stuck not able to step past breakpoints:
(gdb) c
Continuing.
dl_main (phdr=<optimized out>, phnum=<optimized out>, user_entry=<optimized out>, auxv=<optimized out>) at rtld.c:2163
2163 LIBC_PROBE (init_complete, 2, LM_ID_BASE, r);
Cannot find AT_ENTRY auxiliary vector entry.
(gdb) c
Continuing.
dl_main (phdr=<optimized out>, phnum=<optimized out>, user_entry=<optimized out>, auxv=<optimized out>) at rtld.c:2163
2163 LIBC_PROBE (init_complete, 2, LM_ID_BASE, r);
Cannot find AT_ENTRY auxiliary vector entry.
(gdb)
That's because GDB can't figure out where the scratch pad is.
This is a regression introduced by the earlier changes to make the
Linux native target always work in non-stop mode.
This commit makes GDB detect the case and fallback to stepping over
breakpoints in-line.
gdb/ChangeLog:
2016-03-15 Pedro Alves <palves@redhat.com>
PR gdb/19676
* infrun.c (displaced_step_prepare): Also disable displaced
stepping on NOT_SUPPORTED_ERROR.
* linux-tdep.c (linux_displaced_step_location): If reading auxv
fails, throw NOT_SUPPORTED_ERROR instead of generic error.
2016-03-15 17:33:04 +01:00
|
|
|
|
2016-03-15 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
PR gdb/19676
|
|
|
|
|
* infrun.c (displaced_step_prepare): Also disable displaced
|
|
|
|
|
stepping on NOT_SUPPORTED_ERROR.
|
|
|
|
|
* linux-tdep.c (linux_displaced_step_location): If reading auxv
|
|
|
|
|
fails, throw NOT_SUPPORTED_ERROR instead of generic error.
|
|
|
|
|
|
2015-11-14 23:08:07 +01:00
|
|
|
|
2016-03-13 Marcin Kościelnicki <koriakin@0x04.net>
|
|
|
|
|
|
|
|
|
|
* s390-linux-tdep.c (s390_gen_return_address): New function.
|
|
|
|
|
(s390_gdbarch_init): Fill gen_return_address hook.
|
|
|
|
|
|
2016-01-21 11:03:32 +01:00
|
|
|
|
2016-03-11 Andrew Burgess <andrew.burgess@embecosm.com>
|
|
|
|
|
|
|
|
|
|
* symmisc.c (maintenance_info_line_tables): New function.
|
|
|
|
|
(maintenance_print_one_line_table): New function.
|
|
|
|
|
(_initialize_symmisc): Register 'maint info line-table' command.
|
|
|
|
|
* NEWS: Mention new command.
|
|
|
|
|
|
2015-11-14 21:18:18 +01:00
|
|
|
|
2016-03-11 Marcin Kościelnicki <koriakin@0x04.net>
|
|
|
|
|
|
|
|
|
|
* s390-linux-tdep.c (s390_ax_pseudo_register_collect): New function.
|
|
|
|
|
(s390_ax_pseudo_register_push_stack): New function.
|
|
|
|
|
(s390_gdbarch_init): Fill ax_pseudo_register_collect and
|
|
|
|
|
ax_pseudo_register_push_stack hooks.
|
|
|
|
|
|
2016-03-10 23:12:30 +01:00
|
|
|
|
2016-03-10 Simon Marchi <simon.marchi@polymtl.ca>
|
|
|
|
|
|
|
|
|
|
* data-directory/Makefile.in (PYTHON_FILE_LIST): Install
|
|
|
|
|
gdb/function/as_string.py.
|
|
|
|
|
* python/lib/gdb/function/as_string.py: New file.
|
|
|
|
|
* NEWS: Mention the new $_as_string function.
|
|
|
|
|
|
2016-03-09 20:17:54 +01:00
|
|
|
|
2016-03-09 Jose E. Marchesi <jose.marchesi@oracle.com>
|
|
|
|
|
|
|
|
|
|
* target.h: Fix doc string of target_can_use_hardware_watchpoint.
|
|
|
|
|
|
2016-03-09 19:25:00 +01:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* event-top.c (more_to_come): Delete.
|
|
|
|
|
(struct readline_input_state): Delete.
|
|
|
|
|
(readline_input_state): Delete.
|
|
|
|
|
(get_command_line_buffer): New function.
|
|
|
|
|
(command_handler): Update comments. Don't handle NULL commands
|
|
|
|
|
here. Do not execute commented lines.
|
|
|
|
|
(command_line_append_input_line): New function.
|
|
|
|
|
(handle_line_of_input): New function, partly based on
|
|
|
|
|
command_line_handler and command_line_input.
|
|
|
|
|
(command_line_handler): Rewrite.
|
|
|
|
|
* event-top.h (command_handler): New declaration.
|
|
|
|
|
(command_loop): Defer command execution to command_handler.
|
|
|
|
|
(command_line_input): Update comments. Simplify, using struct
|
|
|
|
|
buffer and handle_line_of_input.
|
|
|
|
|
* top.h (struct buffer): New forward declaration.
|
|
|
|
|
(handle_line_of_input): New declaration.
|
|
|
|
|
|
2016-03-09 19:25:00 +01:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* event-top.c (command_line_handler): Use xfree + xstrdup instead
|
|
|
|
|
of xrealloc + strcpy.
|
|
|
|
|
* main.c (captured_main): Use xstrdup instead of xmalloc plus
|
|
|
|
|
manual clear.
|
|
|
|
|
* top.c (saved_command_line): Rewrite comment.
|
|
|
|
|
(saved_command_line_size): Delete.
|
|
|
|
|
(command_line_input): Use xfree + xstrdup instead of xrealloc +
|
|
|
|
|
strcpy.
|
|
|
|
|
* top.h (saved_command_line_size): Delete declaration.
|
|
|
|
|
|
2016-03-09 19:25:00 +01:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* event-top.c: Include buffer.h.
|
|
|
|
|
(gdb_readline_no_editing_callback): Use struct buffer instead
|
|
|
|
|
of xrealloc.
|
|
|
|
|
|
2016-03-09 19:25:00 +01:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* common/buffer.h (buffer_grow_char): New function.
|
|
|
|
|
* top.c: Include buffer.h.
|
|
|
|
|
(gdb_readline_no_editing): Rename 'prompt_arg' parameter to
|
|
|
|
|
'prompt'. Use struct buffer instead of xrealloc.
|
|
|
|
|
|
2016-03-09 19:24:59 +01:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* defs.h (gdb_readline): Delete declaration.
|
|
|
|
|
* top.c (gdb_readline): Rename to ...
|
|
|
|
|
(gdb_readline_no_editing): ... this, and make static.
|
|
|
|
|
|
2016-03-09 19:24:59 +01:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* utils.c (prompt_for_continue): Update comments.
|
|
|
|
|
|
2016-03-09 19:24:59 +01:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* event-top.c (async_annotation_suffix): Delete.
|
|
|
|
|
(top_level_prompt, command_line_handler): Don't use
|
|
|
|
|
'async_annotation_suffix' and simplify.
|
|
|
|
|
* event-top.h (async_annotation_suffix): Delete declaration.
|
|
|
|
|
(init_main): Remove reference to 'async_annotation_suffix'.
|
|
|
|
|
|
2016-03-09 19:24:59 +01:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* event-top.c (gdb_readline2): Rename to ...
|
|
|
|
|
(gdb_readline_no_editing_callback): ... this.
|
|
|
|
|
(change_line_handler, stdin_event_handler)
|
|
|
|
|
(gdb_setup_readline): Adjust.
|
|
|
|
|
* event-top.h (gdb_readline2): Rename to ...
|
|
|
|
|
(gdb_readline_no_editing_callback): ... this, and move closer to
|
|
|
|
|
other readline-related declarations.
|
|
|
|
|
* mi/mi-interp.c (mi_interpreter_resume): Adjust.
|
|
|
|
|
|
2016-03-09 19:24:59 +01:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* top.c (window_hook): Delete.
|
|
|
|
|
(command_loop): Remove references to window_hook.
|
|
|
|
|
|
2016-03-06 16:38:52 +01:00
|
|
|
|
2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
|
|
|
|
|
|
|
|
|
|
* corefile.c (safe_read_memory_unsigned_integer): New function.
|
|
|
|
|
* gdbcore.h (safe_read_memory_unsigned_integer): New prototype.
|
|
|
|
|
* rs6000-tdep.c (rs6000_frame_cache): Read backchain as unsigned.
|
|
|
|
|
|
2016-01-07 17:24:48 +01:00
|
|
|
|
2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
|
|
|
|
|
|
|
|
|
|
* rs6000-tdep.c: Add "ax.h" and "ax-gdb.h" includes.
|
|
|
|
|
(rs6000_gen_return_address): New function.
|
|
|
|
|
(rs6000_gdbarch_init): Wire in the above.
|
|
|
|
|
|
2016-01-07 17:19:25 +01:00
|
|
|
|
2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
|
|
|
|
|
|
|
|
|
|
* rs6000-tdep.c (rs6000_ax_pseudo_register_collect): New function.
|
|
|
|
|
(rs6000_gdbarch_init): Wire in the above.
|
|
|
|
|
|
2016-03-09 17:12:29 +01:00
|
|
|
|
2016-03-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
* s390-linux-tdep.c (s390_analyze_prologue): Ignore BRC and BRCL
|
|
|
|
|
instructions that do nothing or are conditional traps.
|
|
|
|
|
|
2016-03-09 17:12:29 +01:00
|
|
|
|
2016-03-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
* s390-linux-tdep.c (s390_prologue_frame_unwind_cache): Store
|
|
|
|
|
frame func's PC in info->func before any other failure can occur.
|
|
|
|
|
(s390_frame_this_id): Use frame_id_build_unavailable_stack if
|
|
|
|
|
info->func has been filled out.
|
|
|
|
|
|
Avoid spaces in osabi names
It's not possible today to select some of the osabis by name.
Specifically, those that have spaces in their names and then the first
word is ambiguous...
For example:
(gdb) set osabi <TAB>
[...]
FreeBSD ELF
FreeBSD a.out
[...]
(gdb) set osabi FreeBSD ELF
Ambiguous item "FreeBSD ELF".
In reality, because "set osabi" is an enum command, that was
equivalent to trying "set osabi FreeBSD", which is then obviously
ambiguous, because of "FreeBSD ELF" and "FreeBSD a.out".
Also, even if the first word is not ambiguous, we actually ignore
whatever comes after the first word:
(gdb) set osabi GNU/Linux
(gdb) show osabi
The current OS ABI is "GNU/Linux".
The default OS ABI is "GNU/Linux".
(gdb) set osabi Windows SomeNonsense
^^^^^^^^^^^^
(gdb) show osabi
The current OS ABI is "Windows CE".
The default OS ABI is "GNU/Linux".
(gdb)
Fix this by avoiding spaces in osabi names.
We could instead make "set osabi" have a custom set hook, or
alternatively make the enum set hook (in cli-setshow.c) handle values
with spaces, but OTOH, I have a feeling that could cause trouble.
E.g., in cases where we might want to write more than one enum value
in the same line. We could support quoting as workaround, but, not
sure we want that. "No spaces" seems like a simpler rule.
gdb/ChangeLog:
2016-03-09 Pedro Alves <palves@redhat.com>
* osabi.c (gdb_osabi_names): Avoid spaces in osabi names.
2016-03-09 16:52:43 +01:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* osabi.c (gdb_osabi_names): Avoid spaces in osabi names.
|
|
|
|
|
|
2016-03-09 16:46:31 +01:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* frv-tdep.c (frv_gdbarch_init): Handle bfd_mach_fr300.
|
|
|
|
|
|
2016-03-08 02:45:09 +01:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* cris-tdep.c (cris_gdbarch_init): Return 0 if the info's byte
|
|
|
|
|
order is BFD_ENDIAN_BIG or if the cris version is unsupported.
|
|
|
|
|
|
Fix floating conversion buffer overrun when host/target format matches
Running the testsuite with a gdb configured with --enable-libmcheck
reveals a problem:
(gdb) ptype 3 * 2.0
type = <12-byte float>
memory clobbered past end of allocated block
ERROR: Process no longer exists
UNRESOLVED: gdb.ada/ptype_arith_binop.exp: ptype 3 * 2.0
(gdb) PASS: gdb.dlang/expression.exp: ptype 0x1.FFFFFFFFFFFFFp1023
ptype 0x1p-52L
type = real
memory clobbered past end of allocated block
ERROR: Process no longer exists
UNRESOLVED: gdb.dlang/expression.exp: ptype 0x1p-52L
Even though this shows up with Ada and D, it's easy to reproduce in C
too. We just need to print a long double, when the current arch is
32-bit, which is the default when gdb starts up:
$ ./gdb -q -ex "ptype 1.0L"
type = long double
memory clobbered past end of allocated block
Aborted (core dumped)
Valgrind shows:
==22159== Invalid write of size 8
==22159== at 0x8464A9: floatformat_from_doublest (doublest.c:756)
==22159== by 0x846822: store_typed_floating (doublest.c:867)
==22159== by 0x6A7959: value_from_double (value.c:3662)
==22159== by 0x6A9F2D: evaluate_subexp_standard (eval.c:745)
==22159== by 0x7F31AF: evaluate_subexp_c (c-lang.c:716)
==22159== by 0x6A8986: evaluate_subexp (eval.c:79)
==22159== by 0x6A8BA3: evaluate_type (eval.c:174)
==22159== by 0x817CCF: whatis_exp (typeprint.c:456)
==22159== by 0x817EAA: ptype_command (typeprint.c:508)
==22159== by 0x5F267B: do_cfunc (cli-decode.c:105)
==22159== by 0x5F5618: cmd_func (cli-decode.c:1885)
==22159== by 0x83622A: execute_command (top.c:475)
==22159== Address 0x8c6cb28 is 8 bytes inside a block of size 12 alloc'd
==22159== at 0x4C2AA98: calloc (vg_replace_malloc.c:711)
==22159== by 0x87384A: xcalloc (common-utils.c:83)
==22159== by 0x873889: xzalloc (common-utils.c:93)
==22159== by 0x6A34CB: allocate_value_contents (value.c:1036)
==22159== by 0x6A3501: allocate_value (value.c:1047)
==22159== by 0x6A790A: value_from_double (value.c:3656)
==22159== by 0x6A9F2D: evaluate_subexp_standard (eval.c:745)
==22159== by 0x7F31AF: evaluate_subexp_c (c-lang.c:716)
==22159== by 0x6A8986: evaluate_subexp (eval.c:79)
==22159== by 0x6A8BA3: evaluate_type (eval.c:174)
==22159== by 0x817CCF: whatis_exp (typeprint.c:456)
==22159== by 0x817EAA: ptype_command (typeprint.c:508)
==22159==
type = long double
(gdb)
Even if the target and host floating-point formats match, the length
of the types might still be different. On x86, long double is the
80-bit extended precision type on both 32-bit and 64-bit ABIs, but by
default it is stored as 12 bytes on 32-bit, and 16 bytes on 64-bit,
for alignment reasons. Several places in doublest.c already consider
this, but floatformat_to_doublest and floatformat_from_doublest miss
it. E.g., convert_typed_floating and store_typed_floating,
Tested on x86-64 Fedora 23 with --enable-libmcheck, where it fixes the
crashed above.
gdb/ChangeLog:
2016-03-09 Pedro Alves <palves@redhat.com>
* doublest.c: Extend comments.
(floatformat_to_doublest, floatformat_from_doublest): Copy the
floatformat's total size, not the host type's size.
2016-03-09 04:01:06 +01:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* doublest.c: Extend comments.
|
|
|
|
|
(floatformat_to_doublest, floatformat_from_doublest): Copy the
|
|
|
|
|
floatformat's total size, not the host type's size.
|
|
|
|
|
|
2016-03-09 03:29:39 +01:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* doublest.c (floatformat_totalsize_bytes): New function.
|
|
|
|
|
(floatformat_from_type): Assert that the type's length is at least
|
|
|
|
|
as long as the floatformat's totalsize.
|
|
|
|
|
* doublest.h (floatformat_totalsize_bytes): New declaration.
|
|
|
|
|
* gdbtypes.c (arch_float_type): Assert that the type's length is
|
|
|
|
|
at least as long as the floatformat's totalsize.
|
|
|
|
|
|
Fix HP/PA GNU/Linux "long double" format
This:
$ ./gdb -ex "set architecture hppa1.0" -ex "set osabi GNU/Linux" -ex "ptype 1.0L"
Shows that HPPA/Linux support for long doubles is broken. It causes
GDB to access memory out of bounds. With Valgrind, we see:
The target architecture is assumed to be hppa1.0
==4371== Invalid write of size 8
==4371== at 0x4C2F21F: memset (vg_replace_strmem.c:1224)
==4371== by 0x8451C4: convert_doublest_to_floatformat (doublest.c:362)
==4371== by 0x845F86: floatformat_from_doublest (doublest.c:769)
==4371== by 0x84628E: store_typed_floating (doublest.c:873)
==4371== by 0x6A7C3D: value_from_double (value.c:3662)
==4371== by 0x6AA211: evaluate_subexp_standard (eval.c:745)
==4371== by 0x7F306D: evaluate_subexp_c (c-lang.c:716)
==4371== by 0x6A8C6A: evaluate_subexp (eval.c:79)
==4371== by 0x6A8E87: evaluate_type (eval.c:174)
==4371== by 0x817B8D: whatis_exp (typeprint.c:456)
==4371== by 0x817D68: ptype_command (typeprint.c:508)
==4371== by 0x5F2977: do_cfunc (cli-decode.c:105)
==4371== Address 0x8998d18 is 0 bytes after a block of size 8 alloc'd
==4371== at 0x4C2AA98: calloc (vg_replace_malloc.c:711)
==4371== by 0x8732B6: xcalloc (common-utils.c:83)
==4371== by 0x8732F5: xzalloc (common-utils.c:93)
==4371== by 0x6A37AF: allocate_value_contents (value.c:1036)
==4371== by 0x6A37E5: allocate_value (value.c:1047)
==4371== by 0x6A7BEE: value_from_double (value.c:3656)
==4371== by 0x6AA211: evaluate_subexp_standard (eval.c:745)
==4371== by 0x7F306D: evaluate_subexp_c (c-lang.c:716)
==4371== by 0x6A8C6A: evaluate_subexp (eval.c:79)
==4371== by 0x6A8E87: evaluate_type (eval.c:174)
==4371== by 0x817B8D: whatis_exp (typeprint.c:456)
==4371== by 0x817D68: ptype_command (typeprint.c:508)
The trouble is that hppa_linux_init_abi overrides the default
long_double_bit set by the generic hppa-tdep.c:
set_gdbarch_long_double_bit (gdbarch, 128);
set_gdbarch_long_double_format (gdbarch, floatformats_ia64_quad);
with:
/* On hppa-linux, currently, sizeof(long double) == 8. There has been
some discussions to support 128-bit long double, but it requires some
more work in gcc and glibc first. */
set_gdbarch_long_double_bit (gdbarch, 64);
which misses overriding the long_double_format, so we end with a weird
combination of:
set_gdbarch_long_double_bit (gdbarch, 64);
set_gdbarch_long_double_format (gdbarch, floatformats_ia64_quad);
Weird because floatformats_ia64_quad's totalsize is longer than 64-bits.
The floatformat conversion routines use the struct floatformat's
totalsize (in bits) to know how much to copy/convert, thus the buffer
overruns.
gdb/ChangeLog:
2016-03-09 Pedro Alves <palves@redhat.com>
* hppa-linux-tdep.c (hppa_linux_init_abi): Set the long double
format to floatformats_ieee_double.
2016-03-09 02:50:02 +01:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* hppa-linux-tdep.c (hppa_linux_init_abi): Set the long double
|
|
|
|
|
format to floatformats_ieee_double.
|
|
|
|
|
|
Fix "set architecture mips:10000" crash
Fix this GDB crash:
$ gdb -ex "set architecture mips:10000"
Segmentation fault (core dumped)
Backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000495b1b in mips_gdbarch_init (info=..., arches=0x0) at /home/pedro/gdb/mygit/cxx-convertion/src/gdb/mips-tdep.c:8436
8436 if (bfd_get_flavour (info.abfd) == bfd_target_elf_flavour
(top-gdb) bt
#0 0x0000000000495b1b in mips_gdbarch_init (info=..., arches=0x0) at .../src/gdb/mips-tdep.c:8436
#1 0x00000000007348a6 in gdbarch_find_by_info (info=...) at .../src/gdb/gdbarch.c:5155
#2 0x000000000073563c in gdbarch_update_p (info=...) at .../src/gdb/arch-utils.c:522
#3 0x0000000000735585 in set_architecture (ignore_args=0x0, from_tty=1, c=0x26bc870) at .../src/gdb/arch-utils.c:496
#4 0x00000000005f29fd in do_sfunc (c=0x26bc870, args=0x0, from_tty=1) at .../src/gdb/cli/cli-decode.c:121
#5 0x00000000005fd3f3 in do_set_command (arg=0x7fffffffdcdd "mips:10000", from_tty=1, c=0x26bc870) at .../src/gdb/cli/cli-setshow.c:455
#6 0x0000000000836157 in execute_command (p=0x7fffffffdcdd "mips:10000", from_tty=1) at .../src/gdb/top.c:460
#7 0x000000000071abfb in catch_command_errors (command=0x835f6b <execute_command>, arg=0x7fffffffdccc "set architecture mips:10000", from_tty=1)
at .../src/gdb/main.c:368
#8 0x000000000071bf4f in captured_main (data=0x7fffffffd750) at .../src/gdb/main.c:1132
#9 0x0000000000716737 in catch_errors (func=0x71af44 <captured_main>, func_args=0x7fffffffd750, errstring=0x106b9a1 "", mask=RETURN_MASK_ALL)
at .../src/gdb/exceptions.c:240
#10 0x000000000071bfe6 in gdb_main (args=0x7fffffffd750) at .../src/gdb/main.c:1164
#11 0x000000000040a6ad in main (argc=4, argv=0x7fffffffd858) at .../src/gdb/gdb.c:32
(top-gdb)
We already check whether info.abfd is NULL before all other
bfd_get_flavour calls in the same function. Just this one case was
missing.
(This was exposed by a WIP test that tries all "set architecture ARCH"
values.)
gdb/ChangeLog:
2016-03-07 Pedro Alves <palves@redhat.com>
* mips-tdep.c (mips_gdbarch_init): Check whether info.abfd is NULL
before calling bfd_get_flavour.
2016-03-07 01:10:30 +01:00
|
|
|
|
2016-03-07 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* mips-tdep.c (mips_gdbarch_init): Check whether info.abfd is NULL
|
|
|
|
|
before calling bfd_get_flavour.
|
|
|
|
|
|
2016-03-05 13:17:15 +01:00
|
|
|
|
2016-03-05 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
|
|
|
|
|
|
|
|
|
|
* avr-tdep.c (AVR_LAST_ARG_REGNUM): Define.
|
|
|
|
|
(avr_push_dummy_call): Correct last needed argument register.
|
|
|
|
|
Write MSB of argument into register and subsequent bytes into
|
|
|
|
|
other registers in decreasing order.
|
|
|
|
|
|
2016-03-04 17:02:15 +01:00
|
|
|
|
2016-03-04 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arm-tdep.c (arm_record_vdata_transfer_insn): Simplify the
|
|
|
|
|
condition check. Record the right D register number.
|
|
|
|
|
|
2016-03-04 16:57:55 +01:00
|
|
|
|
2016-03-04 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arm-tdep.c (arm_record_extension_space): Remove code
|
|
|
|
|
printing "Process record does not support".
|
|
|
|
|
(arm_record_data_proc_misc_ld_str): Likewise.
|
|
|
|
|
(decode_insn): Call arm_record_extension_space if condition
|
|
|
|
|
is 0xf. Call arm_record_unsupported_insn if ret isn't
|
|
|
|
|
ARM_RECORD_SUCCESS. Use 'ret' instead of 'insn_id' to hold
|
|
|
|
|
the value of thumb2_record_decode_insn_handler.
|
|
|
|
|
|
2016-03-04 16:03:06 +01:00
|
|
|
|
2016-03-04 Simon Marchi <simon.marchi@ericsson.com>
|
|
|
|
|
|
|
|
|
|
* features/feature_to_c.sh: Print the help when passing no
|
|
|
|
|
argument.
|
|
|
|
|
|
2016-03-02 15:40:27 +01:00
|
|
|
|
2016-03-02 Bernhard Heckel <bernhard.heckel@intel.com>
|
|
|
|
|
|
|
|
|
|
* MAINTAINERS (Write After Approval): Add Bernhard Heckel.
|
|
|
|
|
|
2016-03-02 15:30:05 +01:00
|
|
|
|
2016-03-02 Bernhard Heckel <bernhard.heckel@intel.com>
|
|
|
|
|
|
|
|
|
|
* dwarf2read.c (new_symbol_full): Fix detection of gfortran compilers.
|
|
|
|
|
|
2016-03-01 12:43:55 +01:00
|
|
|
|
2016-03-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
* s390-linux-tdep.c (s390_backchain_frame_unwind_cache): Avoid
|
|
|
|
|
exception when attempting to access the inferior's backchain.
|
|
|
|
|
|
2016-02-19 16:54:03 +01:00
|
|
|
|
2016-02-29 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* aarch64-linux-tdep.c (aarch64_canonicalize_syscall): Support
|
|
|
|
|
eventfd2, eventfd2, dup3, inotify_init1, fallocate and pipe2.
|
|
|
|
|
Return gdb_sys_epoll_create1 instead of gdb_sys_epoll_create
|
|
|
|
|
for aarch64_sys_epoll_create1.
|
|
|
|
|
|
2016-02-19 16:51:03 +01:00
|
|
|
|
2016-02-29 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* linux-record.h (enum gdb_syscall) <gdb_sys_fallocate>: New.
|
|
|
|
|
<gdb_sys_eventfd2, gdb_sys_epoll_create1, gdb_sys_dup3>: New.
|
|
|
|
|
<gdb_sys_pipe2, gdb_sys_inotify_init1>: New.
|
|
|
|
|
* linux-record.c (record_linux_system_call): Handle them.
|
|
|
|
|
|
2016-02-28 10:25:55 +01:00
|
|
|
|
2016-02-28 Iain Buclaw <ibuclaw@gdcproject.org>
|
|
|
|
|
|
|
|
|
|
* d-namespace.c (d_lookup_symbol_imports): Avoid recursive lookups from
|
|
|
|
|
cyclic imports.
|
|
|
|
|
|
2016-02-26 21:22:24 +01:00
|
|
|
|
2016-02-26 Keith Seitz <keiths@redhat.com>
|
|
|
|
|
|
|
|
|
|
* rs6000-tdep.c (rs6000_frame_cache): Explicitly cast return result
|
|
|
|
|
to avoid invalid conversion from void *.
|
|
|
|
|
|
2016-02-26 16:00:36 +01:00
|
|
|
|
2016-02-26 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arm-tdep.c (arm_record_exreg_ld_st_insn): Set 'single_reg'
|
|
|
|
|
per bit 8. Check bit 20 instead of bit 4 for VMOV
|
|
|
|
|
instruction. Record D registers for instructions changing
|
|
|
|
|
S registers. Change of the order of length and address
|
|
|
|
|
in record_buf_mem array.
|
|
|
|
|
|
2016-02-26 16:00:36 +01:00
|
|
|
|
2016-02-26 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arm-tdep.c (thumb_record_ld_st_reg_offset): Fix the register
|
|
|
|
|
number of Rd.
|
|
|
|
|
|
2016-02-25 18:30:22 +01:00
|
|
|
|
2016-02-25 Doug Evans <dje@google.com>
|
|
|
|
|
|
|
|
|
|
* remote-m32r-sdi.c (recv_char_data): Initialize val to avoid
|
|
|
|
|
compiler warning.
|
|
|
|
|
(recv_long_data): Ditto.
|
|
|
|
|
|
2016-02-25 17:03:22 +01:00
|
|
|
|
2016-02-25 Simon Marchi <simon.marchi@ericsson.com>
|
|
|
|
|
|
|
|
|
|
* i386-linux-tdep.c (i386_linux_handle_segmentation_fault):
|
|
|
|
|
Initialize variables.
|
|
|
|
|
|
2016-02-24 21:00:17 +01:00
|
|
|
|
2016-02-25 Antoine Tremblay <antoine.tremblay@ericsson.com>
|
|
|
|
|
|
|
|
|
|
* ax-general.c (ax_reg): Call gdbarch_remote_register_number.
|
|
|
|
|
(ax_reg_mask): Likewise.
|
|
|
|
|
|
2016-02-24 23:52:06 +01:00
|
|
|
|
2016-02-24 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* linux-nat.c (save_sigtrap) Delete.
|
|
|
|
|
(stop_wait_callback): Call save_stop_reason instead of
|
|
|
|
|
save_sigtrap.
|
|
|
|
|
(check_stopped_by_breakpoint): Rename to ...
|
|
|
|
|
(save_stop_reason): ... this. Bits of save_sigtrap folded here.
|
|
|
|
|
Use GDB_ARCH_IS_TRAP_HWBKPT and handle ambiguous
|
|
|
|
|
GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT. Factor out
|
|
|
|
|
common code between the USE_SIGTRAP_SIGINFO and
|
|
|
|
|
!USE_SIGTRAP_SIGINFO blocks.
|
|
|
|
|
(linux_nat_filter_event): Call save_stop_reason instead of
|
|
|
|
|
save_sigtrap.
|
|
|
|
|
* nat/linux-ptrace.h: Check for both SI_KERNEL and TRAP_BRKPT
|
|
|
|
|
si_code for MIPS.
|
|
|
|
|
* nat/linux-ptrace.h: Fix "TRAP_HWBPT" typo in x86 table. Add
|
|
|
|
|
comments on MIPS behavior.
|
|
|
|
|
(GDB_ARCH_IS_TRAP_HWBKPT): Define for all archs.
|
|
|
|
|
|
2016-02-24 22:00:59 +01:00
|
|
|
|
2016-02-24 Marcin Kościelnicki <koriakin@0x04.net>
|
|
|
|
|
|
|
|
|
|
* rs6000-tdep.c (rs6000_frame_cache): Initialize frame and pc to 0
|
|
|
|
|
to avoid spurious warnings.
|
|
|
|
|
|
2016-02-24 12:31:58 +01:00
|
|
|
|
2016-02-24 Gary Benson <gbenson@redhat.com>
|
|
|
|
|
|
|
|
|
|
* exec.c (exec_file_locate_attach): Do not attempt to
|
|
|
|
|
locate main executable locally if not found in sysroot.
|
|
|
|
|
|
2016-02-24 11:07:27 +01:00
|
|
|
|
2016-02-24 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
|
|
|
|
|
|
GDB 7.11 released.
|
|
|
|
|
|
2015-03-30 18:30:31 +02:00
|
|
|
|
2016-02-24 Wei-cheng Wang <cole945@gmail.com>
|
|
|
|
|
|
|
|
|
|
* rs6000-tdep.c (rs6000_frame_cache, rs6000_frame_this_id): Handle
|
|
|
|
|
unavailable PC/SP to build unavailable frame.
|
|
|
|
|
|
Extend "skip" command to support -file, -gfile, -function, -rfunction.
gdb/ChangeLog:
Extend "skip" command to support -file, -gfile, -function, -rfunction.
* NEWS: Document new features.
* skip.c: #include "fnmatch.h", "gdb_regex.h".
(skiplist_entry) <file>: Renamed from filename.
<function>: Renamed from function_name.
<file_is_glob, function_is_regexp>: New members.
<compiled_function_regexp, compiled_function_regexp_is_valid>:
New members.
(make_skip_entry): New function.
(free_skiplist_entry, free_skiplist_entry_cleanup): New functions.
(make_free_skiplist_entry_cleanup): New function.
(skip_file_command): Update.
(skip_function, skip_function_command): Update.
(compile_skip_regexp): New functions.
(skip_command): Add support for new options.
(skip_info): Update.
(skip_file_p, skip_gfile_p): New functions.
(skip_function_p, skip_rfunction_p): New functions.
(function_name_is_marked_for_skip): Update and simplify.
(_initialize_step_skip): Update.
* symtab.c: #include "fnmatch.h".
(compare_glob_filenames_for_search): New function.
* symtab.h (compare_glob_filenames_for_search): Declare.
* utils.c (count_path_elements): New function.
(strip_leading_path_elements): New function.
* utils.h (count_path_elements): Declare.
(strip_leading_path_elements): Declare.
gdb/doc/ChangeLog:
* gdb.texinfo (Skipping Over Functions and Files): Document new
options to "skip" command. Update docs of output of "info skip".
gdb/testsuite/ChangeLog:
* gdb.base/skip.c (test_skip): New function.
(end_test_skip_file_and_function): New function.
(test_skip_file_and_function): New function.
* gdb.base/skip1.c (test_skip): New function.
(skip1_test_skip_file_and_function): New function.
* gdb.base/skip.exp: Add tests for new skip options.
* gdb.base/skip-solib.exp: Update expected output.
* gdb.perf/skip-command.cc: New file.
* gdb.perf/skip-command.exp: New file.
* gdb.perf/skip-command.py: New file.
2016-02-23 22:25:18 +01:00
|
|
|
|
2016-02-23 Doug Evans <dje@google.com>
|
|
|
|
|
|
|
|
|
|
Extend "skip" command to support -file, -gfile, -function, -rfunction.
|
|
|
|
|
* NEWS: Document new features.
|
|
|
|
|
* skip.c: #include "fnmatch.h", "gdb_regex.h".
|
|
|
|
|
(skiplist_entry) <file>: Renamed from filename.
|
|
|
|
|
<function>: Renamed from function_name.
|
|
|
|
|
<file_is_glob, function_is_regexp>: New members.
|
|
|
|
|
<compiled_function_regexp, compiled_function_regexp_is_valid>:
|
|
|
|
|
New members.
|
|
|
|
|
(make_skip_entry): New function.
|
|
|
|
|
(free_skiplist_entry, free_skiplist_entry_cleanup): New functions.
|
|
|
|
|
(make_free_skiplist_entry_cleanup): New function.
|
|
|
|
|
(skip_file_command): Update.
|
|
|
|
|
(skip_function, skip_function_command): Update.
|
|
|
|
|
(compile_skip_regexp): New functions.
|
|
|
|
|
(skip_command): Add support for new options.
|
|
|
|
|
(skip_info): Update.
|
|
|
|
|
(skip_file_p, skip_gfile_p): New functions.
|
|
|
|
|
(skip_function_p, skip_rfunction_p): New functions.
|
|
|
|
|
(function_name_is_marked_for_skip): Update and simplify.
|
|
|
|
|
(_initialize_step_skip): Update.
|
|
|
|
|
* symtab.c: #include "fnmatch.h".
|
|
|
|
|
(compare_glob_filenames_for_search): New function.
|
|
|
|
|
* symtab.h (compare_glob_filenames_for_search): Declare.
|
|
|
|
|
* utils.c (count_path_elements): New function.
|
|
|
|
|
(strip_leading_path_elements): New function.
|
|
|
|
|
* utils.h (count_path_elements): Declare.
|
|
|
|
|
(strip_leading_path_elements): Declare.
|
|
|
|
|
|
2016-02-23 19:21:10 +01:00
|
|
|
|
2016-02-23 Simon Marchi <simon.marchi@ericsson.com>
|
|
|
|
|
|
|
|
|
|
* arm-tdep.c (arm_decode_svc_copro): Remove "to" parameter.
|
|
|
|
|
(thumb_process_displaced_insn): Likewise.
|
|
|
|
|
(arm_process_displaced_insn): Adjust calls.
|
|
|
|
|
|
Process record for aarch64-linux syscall
This patch updates the syscalls in sync with syscalls/aarch64-linux.xml.
Some syscalls are still not supported by gdb/linux-record.c yet. Mark
them UNSUPPORTED_SYSCALL_MAP.
This patch fixes the following test fail,
Process record and replay target doesn't support syscall number 56^M
Process record: failed to record execution log.^M
^M
Program stopped.^M
0x00000020000e9dfc in open () from /lib/aarch64-linux-gnu/libc.so.6^M
(gdb) FAIL: gdb.reverse/fstatat-reverse.exp: continue to breakpoint: marker2
gdb:
2016-02-23 Yao Qi <yao.qi@linaro.org>
* aarch64-linux-tdep.c (enum aarch64_syscall) <aarch64_sys_mknod>:
Remove.
<aarch64_sys_mkdir, aarch64_sys_unlink, aarch64_sys_symlink>: Remove.
<aarch64_sys_link, aarch64_sys_rename, aarch64_sys_faccess>: Remove.
<aarch64_sys_mknodat, aarch64_sys_mkdirat>: New.
<aarch64_sys_unlinkat, aarch64_sys_symlinkat>: New.
<aarch64_sys_linkat, aarch64_sys_renameat, aarch64_sys_faccessat>: New.
<aarch64_sys_open, aarch64_sys_readlink, aarch64_sys_fstatat>: Remove.
<aarch64_sys_openat, aarch64_sys_readlinkat>: New.
<aarch64_sys_newfstatat>: New.
(UNSUPPORTED_SYSCALL_MAP): New macro.
(aarch64_canonicalize_syscall): Add missing syscalls.
2016-02-23 10:21:09 +01:00
|
|
|
|
2016-02-23 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* aarch64-linux-tdep.c (enum aarch64_syscall) <aarch64_sys_mknod>:
|
|
|
|
|
Remove.
|
|
|
|
|
<aarch64_sys_mkdir, aarch64_sys_unlink, aarch64_sys_symlink>: Remove.
|
|
|
|
|
<aarch64_sys_link, aarch64_sys_rename, aarch64_sys_faccess>: Remove.
|
|
|
|
|
<aarch64_sys_mknodat, aarch64_sys_mkdirat>: New.
|
|
|
|
|
<aarch64_sys_unlinkat, aarch64_sys_symlinkat>: New.
|
|
|
|
|
<aarch64_sys_linkat, aarch64_sys_renameat>: New.
|
|
|
|
|
<aarch64_sys_faccessat>: New.
|
|
|
|
|
<aarch64_sys_open, aarch64_sys_readlink, aarch64_sys_fstatat>: Remove.
|
|
|
|
|
<aarch64_sys_openat, aarch64_sys_readlinkat>: New.
|
|
|
|
|
<aarch64_sys_newfstatat>: New.
|
|
|
|
|
(UNSUPPORTED_SYSCALL_MAP): New macro.
|
|
|
|
|
(aarch64_canonicalize_syscall): Add missing syscalls.
|
|
|
|
|
|
2016-02-22 17:15:14 +01:00
|
|
|
|
2016-02-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
|
|
|
|
|
|
* gdb-gdb.py (class TypeFlagsPrinter): Use parentheses for print.
|
|
|
|
|
|
2016-02-22 13:08:51 +01:00
|
|
|
|
2016-02-22 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arm-tdep.c: Fix code format issues.
|
|
|
|
|
|
2016-02-21 21:38:10 +01:00
|
|
|
|
2016-02-21 Iain Buclaw <ibuclaw@gdcproject.org>
|
|
|
|
|
|
|
|
|
|
* d-namespace.c (d_lookup_symbol_imports): Remove argument
|
|
|
|
|
'search_parents'. All callers updated.
|
|
|
|
|
|
2016-01-23 23:53:41 +01:00
|
|
|
|
2016-02-18 Marcin Kościelnicki <koriakin@0x04.net>
|
|
|
|
|
|
|
|
|
|
* s390-linux-tdep.c (s390_guess_tracepoint_registers): New function.
|
|
|
|
|
(s390_gdbarch_init): Fill guess_tracepoint_registers hook.
|
|
|
|
|
|
Intel MPX bound violation handling
With Intel Memory Protection Extensions it was introduced the concept of
boundary violation. A boundary violations is presented to the inferior as
a segmentation fault having SIGCODE 3. This patch adds a
handler for a boundary violation extending the information displayed
when a bound violation is presented to the inferior. In the stop mode
case the debugger will also display the kind of violation: "upper" or
"lower", bounds and the address accessed.
On no stop mode the information will still remain unchanged. Additional
information about bound violations are not meaningful in that case user
does not know the line in which violation occurred as well.
When the segmentation fault handler is stop mode the out puts will be
changed as exemplified below.
The usual output of a segfault is:
Program received signal SIGSEGV, Segmentation fault
0x0000000000400d7c in upper (p=0x603010, a=0x603030, b=0x603050,
c=0x603070, d=0x603090, len=7) at i386-mpx-sigsegv.c:68
68 value = *(p + len);
In case it is a bound violation it will be presented as:
Program received signal SIGSEGV, Segmentation fault
Upper bound violation while accessing address 0x7fffffffc3b3
Bounds: [lower = 0x7fffffffc390, upper = 0x7fffffffc3a3]
0x0000000000400d7c in upper (p=0x603010, a=0x603030, b=0x603050,
c=0x603070, d=0x603090, len=7) at i386-mpx-sigsegv.c:68
68 value = *(p + len);
In mi mode the output of a segfault is:
*stopped,reason="signal-received",signal-name="SIGSEGV",
signal-meaning="Segmentation fault", frame={addr="0x0000000000400d7c",
func="upper",args=[{name="p", value="0x603010"},{name="a",value="0x603030"}
,{name="b",value="0x603050"}, {name="c",value="0x603070"},
{name="d",value="0x603090"},{name="len",value="7"}],
file="i386-mpx-sigsegv.c",fullname="i386-mpx-sigsegv.c",line="68"},
thread-id="1",stopped-threads="all",core="6"
in the case of a bound violation:
*stopped,reason="signal-received",signal-name="SIGSEGV",
signal-meaning="Segmentation fault",
sigcode-meaning="Upper bound violation",
lower-bound="0x603010",upper-bound="0x603023",bound-access="0x60302f",
frame={addr="0x0000000000400d7c",func="upper",args=[{name="p",
value="0x603010"},{name="a",value="0x603030"},{name="b",value="0x603050"},
{name="c",value="0x603070"},{name="d",value="0x603090"},
{name="len",value="7"}],file="i386-mpx-sigsegv.c",
fullname="i386-mpx-sigsegv.c",line="68"},thread-id="1",
stopped-threads="all",core="6"
2016-02-18 Walfred Tedeschi <walfred.tedeschi@intel.com>
gdb/ChangeLog:
* NEWS: Add entry for bound violation.
* amd64-linux-tdep.c (amd64_linux_init_abi_common):
Add handler for segmentation fault.
* gdbarch.sh (handle_segmentation_fault): New.
* gdbarch.c: Regenerate.
* gdbarch.h: Regenerate.
* i386-linux-tdep.c (i386_linux_handle_segmentation_fault): New.
(SIG_CODE_BONDARY_FAULT): New define.
(i386_linux_init_abi): Use i386_mpx_bound_violation_handler.
* i386-linux-tdep.h (i386_linux_handle_segmentation_fault) New.
* i386-tdep.c (i386_mpx_enabled): Add as external.
* i386-tdep.c (i386_mpx_enabled): Add as external.
* infrun.c (handle_segmentation_fault): New function.
(print_signal_received_reason): Use handle_segmentation_fault.
gdb/testsuite/ChangeLog:
* gdb.arch/i386-mpx-sigsegv.c: New file.
* gdb.arch/i386-mpx-sigsegv.exp: New file.
* gdb.arch/i386-mpx-simple_segv.c: New file.
* gdb.arch/i386-mpx-simple_segv.exp: New file.
gdb/doc/ChangeLog:
* gdb.texinfo (Signals): Add bound violation display hints for
a SIGSEGV.
2016-02-18 17:24:59 +01:00
|
|
|
|
2016-02-18 Walfred Tedeschi <walfred.tedeschi@intel.com>
|
|
|
|
|
|
|
|
|
|
* NEWS: Add entry for bound violation.
|
|
|
|
|
* amd64-linux-tdep.c (amd64_linux_init_abi_common):
|
|
|
|
|
Add handler for segmentation fault.
|
|
|
|
|
* gdbarch.sh (handle_segmentation_fault): New.
|
|
|
|
|
* gdbarch.c: Regenerate.
|
|
|
|
|
* gdbarch.h: Regenerate.
|
|
|
|
|
* i386-linux-tdep.c (i386_linux_handle_segmentation_fault): New.
|
|
|
|
|
(SIG_CODE_BONDARY_FAULT): New define.
|
|
|
|
|
(i386_linux_init_abi): Use i386_mpx_bound_violation_handler.
|
|
|
|
|
* i386-linux-tdep.h (i386_linux_handle_segmentation_fault) New.
|
|
|
|
|
* i386-tdep.c (i386_mpx_enabled): Add as external.
|
|
|
|
|
* i386-tdep.c (i386_mpx_enabled): Add as external.
|
|
|
|
|
* infrun.c (handle_segmentation_fault): New function.
|
|
|
|
|
(print_signal_received_reason): Use handle_segmentation_fault.
|
|
|
|
|
|
2016-02-18 09:21:38 +01:00
|
|
|
|
2016-02-18 Marcin Kościelnicki <koriakin@0x04.net>
|
|
|
|
|
|
|
|
|
|
* arch-utils.c (default_guess_tracepoint_registers): New function.
|
|
|
|
|
* arch-utils.h (default_guess_tracepoint_registers): New prototype.
|
|
|
|
|
* gdbarch.c: Regenerate.
|
|
|
|
|
* gdbarch.h: Regenerate.
|
|
|
|
|
* gdbarch.sh: Add guess_tracepoint_registers hook.
|
|
|
|
|
* tracefile.c (tracefile_fetch_registers): Use the new gdbarch hook.
|
|
|
|
|
|
2016-02-17 15:38:36 +01:00
|
|
|
|
2016-02-17 Gary Benson <gbenson@redhat.com>
|
|
|
|
|
|
|
|
|
|
* exec.c (exec_file_locate_attach): Add missing cleanup.
|
|
|
|
|
|
PR remote/19496, internal err forking-threads-plus-bkpt
This patch fixes an internal error that occurs in
gdb.threads/forking-threads-plus-breakpoint.exp:
/blah/binutils-gdb/gdb/target.c:2723: internal-error: Can't determine the
current address space of thread Thread 3170.3170
In default_thread_address_space, find_inferior_ptid couldn't find 3170.3170
because it had been overwritten in inferior_appeared, called as follows:
inferior_appeared
remote_add_inferior
remote_notice_new_inferior
remote_update_thread_list
The cause of the problem was the following sequence of events:
* GDB knows only about the main thread
* the first fork event is reported to GDB, saved as pending_event
* qXfer:threads:read gets the threads from the remote.
remove_new_fork_children id's the fork child from the pending event
and removes it from the list reported to GDB. All the rest of the
threads, including the fork parent, are added to the GDB thread list.
* GDB stops all the threads. All the stop events are pushed onto the
stop reply queue behind the pending fork event. The fork waitstatus
is saved in the fork parent thread's pending status field
thread_info.suspend.
* remote_wait_ns calls queued_stop_reply and process_stop_reply to
remove the fork event from the front of the stop reply queue and save
event information in the thread_info structure for the fork parent
thread. Unfortunately, none of the information saved in this way is
the fork-specific information.
* A subsequent qXfer:threads:read packet gets the thread list including
the fork parent and fork child. remove_new_fork_children checks the
thread list to see if there is a fork parent, doesn't find one, checks
the stop reply queue for a pending fork event, doesn't find one, and
allows the fork child thread to be reported to GDB before the fork
event has been handled. remote_update_thread_list calls
remote_notice_new_thread and overwrites the current (main) thread in
inferior_appeared.
So the fork event has been reported out of target_wait but it was left
pending on the infrun side (infrun.c:save_waitstatus). IOW, the fork
event hasn't been processed by handle_inferior_event yet, so it hasn't
made it to tp->pending_follow yet.
The fix is to check thread_info.suspend along with the
thread_info.pending_follow in remote.c:remove_new_fork_children, to
prevent premature reporting of the fork child thread creation.
gdb/ChangeLog:
PR remote/19496
* remote.c (remove_new_fork_children): Check for pending
fork status in thread_info.suspend.
gdb/testsuite/ChangeLog:
PR remote/19496
* gdb.threads/forking-threads-plus-breakpoint.exp (do_test):
Remove kfail for PR remote/19496.
2016-02-16 17:56:06 +01:00
|
|
|
|
2016-02-16 Don Breazeal <donb@codesourcery.com>
|
|
|
|
|
|
|
|
|
|
PR remote/19496
|
|
|
|
|
* remote.c (remove_new_fork_children): Check for pending
|
|
|
|
|
fork status in thread_info.suspend.
|
|
|
|
|
|
2016-02-16 14:53:35 +01:00
|
|
|
|
2016-02-16 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arm-linux-tdep.c (arm_linux_software_single_step): Assign
|
|
|
|
|
'old_chain' later.
|
|
|
|
|
|
2016-02-16 14:47:17 +01:00
|
|
|
|
2016-02-16 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arch/arm-get-next-pcs.h (struct arm_get_next_pcs_ops)
|
|
|
|
|
<syscall_next_pc>: Remove argument PC. Callers updated.
|
|
|
|
|
* arm-linux-tdep.c (arm_linux_get_next_pcs_syscall_next_pc):
|
|
|
|
|
Remove argument PC. Get pc from regcache_read_pc.
|
|
|
|
|
* arm-tdep.c (arm_get_next_pcs_syscall_next_pc): Remove
|
|
|
|
|
argument PC.
|
|
|
|
|
|
2016-02-15 11:05:56 +01:00
|
|
|
|
2016-02-15 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* aarch64-tdep.c (aarch64_analyze_prologue): Remove "0x".
|
|
|
|
|
|
[ARM] Software single step cross kernel helpers
GDB step cross kernel helpers only works if the kernel helpers are tail
called, which is the case how it is used in glibc. See __aeabi_read_tp
in sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S. In __aeabi_read_tp,
branch/jump to the kernel helper is the last instruction, and the next
instruction address is in LR, which is in caller function. GDB can
handle this correctly. For example, glibc function __GI___ctype_init
calls __aeabi_read_tp
0xb6e19b30 <__GI___ctype_init+4>: ldr r3, [pc, #80] ;
0xb6e19b34 <__GI___ctype_init+8>: bl 0xb6e0a6e0 <__aeabi_read_tp>
0xb6e19b38 <__GI___ctype_init+12>: ldr r3, [pc, r3]
and __aeabi_read_tp calls kernel helper,
(gdb) disassemble __aeabi_read_tp
0xb6fef5d0 <+0>: mvn r0, #61440 ; 0xf000
0xb6fef5d4 <+4>: sub pc, r0, #31
once GDB or GDBserver single step instruction on 0xb6fef5d4, LR is
0xb6e19b38, which is right address of next instruction to set breakpoint
on.
However, if the kernel helpers are not tail-called, the LR is still the
address in the caller function of kernel helper's caller, which isn't
the right address of next instruction to set breakpoint on. For example,
we use kernel helper in main,
(gdb) disassemble main
....
0x00008624 <+32>: mov r3, #4064 ; 0xfe0^M
0x00008628 <+36>: movt r3, #65535 ; 0xffff^M
0x0000862c <+40>: blx r3
0x00008630 <+44>: ldr r3, [r11, #-8]
kernel helper is called on 0x0000862c and the expected next instruction
address is 0x00008630, but the LR now is the return address of main.
The problem here is LR may not have the right address because when we
single step the instruction, it isn't executed yet, so the LR isn't
updated. This patch fix this problem by decoding instruction, if the
instruction updates LR (BL and BLX), the next instruction address is
PC + INSN_SIZE, otherwise, get the address of next instruction from LR.
gdb:
2016-02-12 Yao Qi <yao.qi@linaro.org>
* arch/arm-linux.c (arm_linux_get_next_pcs_fixup): Calculate
nextpc according to instruction.
gdb/testsuite:
2016-02-12 Yao Qi <yao.qi@linaro.org>
* gdb.arch/arm-single-step-kernel-helper.c: New.
* gdb.arch/arm-single-step-kernel-helper.exp: New.
2016-02-10 15:21:38 +01:00
|
|
|
|
2016-02-12 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arch/arm-linux.c (arm_linux_get_next_pcs_fixup): Calculate
|
|
|
|
|
nextpc according to instruction.
|
|
|
|
|
|
[ARM] Fixup PC in software single step
When I exercise GDBserver software single step, I see the following
error, which has been already handled by GDB properly.
In GDBserver log, we can see, GDBserver tries to single step instruction
on 0xb6e0a6e4, and destination address is 0xffff0fe0,
stop pc is 0xb6e0a6e4
Writing f001f0e7 to 0xffff0fe0 in process 7132
Failed to insert breakpoint at 0xffff0fe0 (Input/output error).
Failed to insert breakpoint at 0xffff0fe0 (-1).
(gdb) disassemble __aeabi_read_tp,+8
Dump of assembler code from 0xb6e0a6e0 to 0xb6e0a6e8:
0xb6e0a6e0 <__aeabi_read_tp+0>: mvn r0, #61440 ; 0xf000
0xb6e0a6e4 <__aeabi_read_tp+4>: sub pc, r0, #31
however, it fails inserting breakpoint there. This problem has already
fixed by GDB, see comments in arm-linux-tdep.c:arm_linux_software_single_step
/* The Linux kernel offers some user-mode helpers in a high page. We can
not read this page (as of 2.6.23), and even if we could then we
couldn't set breakpoints in it, and even if we could then the atomic
operations would fail when interrupted. They are all called as
functions and return to the address in LR, so step to there
instead. */
so we need to do the same thing in GDB side as well. This patch adds
a new field fixup in arm_get_next_pcs_ops, so that we can fix up PC
for arm-linux target. In this way, both GDB and GDBserver can single
step instructions going to kernel helpers.
gdb:
2016-02-12 Yao Qi <yao.qi@linaro.org>
* arch/arm-get-next-pcs.c (arm_get_next_pcs): Call
self->ops->fixup if it isn't NULL.
* arch/arm-get-next-pcs.h: Include gdb_vecs.h.
(struct arm_get_next_pcs_ops) <fixup>: New field.
* arch/arm-linux.c: Include common-regcache.h and
arch/arm-get-next-pcs.h.
(arm_linux_get_next_pcs_fixup): New function.
* arch/arm-linux.h (arm_linux_get_next_pcs_fixup): Declare.
* arm-linux-tdep.c (arm_linux_get_next_pcs_ops): Initialize
it with arm_linux_get_next_pcs_fixup.
(arm_linux_software_single_step): Move code to
arm_linux_get_next_pcs_fixup.
* arm-tdep.c (arm_get_next_pcs_ops): Initialize it.
gdb/gdbserver:
2016-02-12 Yao Qi <yao.qi@linaro.org>
* linux-arm-low.c (get_next_pcs_ops): Initialize it with
arm_linux_get_next_pcs_fixup.
2016-02-08 17:05:31 +01:00
|
|
|
|
2016-02-12 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arch/arm-get-next-pcs.c (arm_get_next_pcs): Call
|
|
|
|
|
self->ops->fixup if it isn't NULL.
|
|
|
|
|
* arch/arm-get-next-pcs.h: Include gdb_vecs.h.
|
|
|
|
|
(struct arm_get_next_pcs_ops) <fixup>: New field.
|
|
|
|
|
* arch/arm-linux.c: Include common-regcache.h and
|
|
|
|
|
arch/arm-get-next-pcs.h.
|
|
|
|
|
(arm_linux_get_next_pcs_fixup): New function.
|
|
|
|
|
* arch/arm-linux.h (arm_linux_get_next_pcs_fixup): Declare.
|
|
|
|
|
* arm-linux-tdep.c (arm_linux_get_next_pcs_ops): Initialize
|
|
|
|
|
it with arm_linux_get_next_pcs_fixup.
|
|
|
|
|
(arm_linux_software_single_step): Move code to
|
|
|
|
|
arm_linux_get_next_pcs_fixup.
|
|
|
|
|
* arm-tdep.c (arm_get_next_pcs_ops): Initialize it.
|
|
|
|
|
|
2016-02-11 23:52:44 +01:00
|
|
|
|
2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
|
|
|
|
|
|
|
|
|
|
* xml-tdesc.c (target_fetch_description_xml) [!HAVE_LIBEXPAT]: Warn
|
|
|
|
|
and return NULL.
|
|
|
|
|
|
2016-01-26 14:58:44 +01:00
|
|
|
|
2016-02-12 Markus Metzger <markus.t.metzger@intel.com>
|
|
|
|
|
|
|
|
|
|
* frame.h (skip_tailcall_frames): Update comment.
|
|
|
|
|
* frame.c (skip_artificial_frames, skip_tailcall_frames): Return NULL
|
|
|
|
|
if only artificial frames are found. Update comment.
|
|
|
|
|
(frame_unwind_caller_id): Handle NULL return.
|
|
|
|
|
(frame_unwind_caller_pc, frame_unwind_caller_arch): Assert that
|
|
|
|
|
skip_artificial_frames does not return NULL.
|
|
|
|
|
(frame_pop): Add an error if only tailcall frames are found.
|
|
|
|
|
* infcmd.c (finish_command): Move skip_tailcall_frames call into
|
|
|
|
|
forward-execution case. Add an error if only tailcall frames are
|
|
|
|
|
found.
|
|
|
|
|
|
2016-02-11 11:07:09 +01:00
|
|
|
|
2016-02-12 Markus Metzger <markus.t.metzger@intel.com>
|
|
|
|
|
|
|
|
|
|
* stack.c (frame_info): Check frame_unwind_caller_id.
|
|
|
|
|
|
2016-02-05 09:32:53 +01:00
|
|
|
|
2016-02-12 Markus Metzger <markus.t.metzger@intel.com>
|
|
|
|
|
|
|
|
|
|
* frame.h (skip_tailcall_frames): New.
|
|
|
|
|
* frame.c (skip_tailcall_frames): New.
|
|
|
|
|
(frame_pop): Call skip_tailcall_frames.
|
|
|
|
|
* infcmd.c (finish_command): Call skip_tailcall_frames.
|
|
|
|
|
|
2016-02-11 20:36:39 +01:00
|
|
|
|
2016-02-11 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* Makefile.in (check-parallel): New rule.
|
|
|
|
|
|
2016-02-11 20:09:25 +01:00
|
|
|
|
2016-02-11 Simon Marchi <simon.marchi@ericsson.com>
|
|
|
|
|
|
|
|
|
|
* arm-tdep.c (arm_skip_prologue): Remove unused variables.
|
|
|
|
|
(arm_analyze_prologue): Likewise.
|
|
|
|
|
(arm_scan_prologue): Likewise.
|
|
|
|
|
(arm_m_exception_prev_register): Likewise.
|
|
|
|
|
(arm_copy_block_xfer): Likewise.
|
|
|
|
|
(thumb2_copy_block_xfer): Likewise.
|
|
|
|
|
(arm_decode_miscellaneous): Likewise.
|
|
|
|
|
(arm_decode_ld_st_word_ubyte): Likewise.
|
|
|
|
|
(arm_decode_svc_copro): Likewise.
|
|
|
|
|
(thumb2_decode_svc_copro): Likewise.
|
|
|
|
|
(thumb_copy_16bit_ldr_literal): Likewise.
|
|
|
|
|
(thumb_copy_pop_pc_16bit): Likewise.
|
|
|
|
|
(decode_thumb_32bit_ld_mem_hints): Likewise.
|
|
|
|
|
(arm_show_force_mode): Likewise.
|
|
|
|
|
(_initialize_arm_tdep): Likewise.
|
|
|
|
|
(arm_record_strx): Likewise.
|
|
|
|
|
(arm_record_extension_space): Likewise.
|
|
|
|
|
(arm_record_data_proc_misc_ld_str): Likewise.
|
|
|
|
|
(arm_record_exreg_ld_st_insn): Likewise.
|
|
|
|
|
(arm_record_vfp_data_proc_insn): Likewise.
|
|
|
|
|
(arm_record_coproc_data_proc): Likewise.
|
|
|
|
|
(thumb_record_misc): Likewise.
|
|
|
|
|
(thumb_record_ldm_stm_swi): Likewise.
|
|
|
|
|
(thumb2_record_ld_st_dual_ex_tbb): Likewise.
|
|
|
|
|
(thumb2_record_ld_mem_hints): Likewise.
|
|
|
|
|
(thumb2_record_lmul_lmla_div): Likewise.
|
|
|
|
|
(thumb2_record_asimd_struct_ld_st): Likewise.
|
|
|
|
|
(arm_process_record): Likewise.
|
|
|
|
|
|
2016-02-11 20:08:53 +01:00
|
|
|
|
2016-02-11 Simon Marchi <simon.marchi@ericsson.com>
|
|
|
|
|
|
|
|
|
|
* arm-tdep.c (arm_displaced_step_copy_insn): Remove.
|
|
|
|
|
(ARM displaced stepping support): Remove reference to
|
|
|
|
|
arm_displaced_step_copy_insn in comment.
|
|
|
|
|
* arm-tdep.h (arm_displaced_step_copy_insn): Remove.
|
|
|
|
|
* arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Remove
|
|
|
|
|
reference to arm_displaced_step_copy_insn in comment.
|
|
|
|
|
|
2016-02-11 19:21:32 +01:00
|
|
|
|
2016-02-11 Simon Marchi <simon.marchi@ericsson.com>
|
|
|
|
|
|
|
|
|
|
* arm-tdep.c (thumb_copy_unmodified_16bit): Change type of insn.
|
|
|
|
|
(thumb_copy_b): Likewise.
|
|
|
|
|
(arm_decode_b_bl_ldmstm): Likewise.
|
|
|
|
|
(thumb_copy_16bit_ldr_literal): Likewise.
|
|
|
|
|
(thumb_copy_pop_pc_16bit): Likewise.
|
|
|
|
|
|
Use the target architecture when encoding tracepoint actions
This patch uses the target architecture rather then the objfile
architecture when encoding tracepoint actions.
The target architecture may contain additional registers. E.g. ARM VFP
registers. This information is needed to allow their collection. Since we
can never know whether the registers numbers in the target match the
binary's we have to use tdesc here.
One note about combined debuggers / multi-inferior from Pedro Alves:
In the combined debugger case taking Cell as the practical example that
gdb supports currently:
In that case, the main target_gdbarch() will be powerpc, but you may have set a
tracepoint on _spu_ code, which has a different gdbarch. so for that case,
target_gdbarch would be wrong. I think that in that case, we'd need to
find __the_ target/tdesc gdbarch that is (bfd) compatible with the
objfile's gdbarch.
I think cell/spu gdbserver doesn't support tracepoints, so we can ignore
this for now.
The multi-inferior/process case is somewhat related, but its simpler.
each inferior has its own gdbarch.
That is, target_gdbarch depends on the current inferior selected.
In fact, that just returns inferior->gdbarch nowaways.
No regressions, tested on ubuntu 14.04 ARMv7 and x86.
With gdbserver-{native,extended} / { -marm -mthumb }
gdb/ChangeLog:
* tracepoint.c (encode_actions_1): Use target_gdbarch () rather
than loc->gdbarch.
2016-02-11 14:14:12 +01:00
|
|
|
|
2016-02-11 Antoine Tremblay <antoine.tremblay@ericsson.com>
|
|
|
|
|
|
|
|
|
|
* tracepoint.c (encode_actions_1): Use target_gdbarch () rather
|
|
|
|
|
than loc->gdbarch.
|
|
|
|
|
|
2016-02-06 01:49:14 +01:00
|
|
|
|
2016-02-10 Marcin Kościelnicki <koriakin@0x04.net>
|
|
|
|
|
|
|
|
|
|
* tracefile-tfile.c (trace_tdesc): New static variable.
|
|
|
|
|
(tfile_open): Clear trace_tdesc, call target_find_description.
|
|
|
|
|
(tfile_interp_line): Recognize tdesc lines.
|
|
|
|
|
(tfile_close): Clear trace_tdesc.
|
|
|
|
|
(tfile_xfer_partial_features): New function.
|
|
|
|
|
(tfile_xfer_partial): Call tfile_xfer_partial_features.
|
|
|
|
|
(tfile_append_tdesc_line): New function.
|
|
|
|
|
|
2016-02-05 21:32:52 +01:00
|
|
|
|
2016-02-10 Marcin Kościelnicki <koriakin@0x04.net>
|
|
|
|
|
|
|
|
|
|
* ctf.c (ctf_write_tdesc): New function.
|
|
|
|
|
(ctf_write_ops): Wire in ctf_write_tdesc.
|
|
|
|
|
* tracefile-tfile.c (tfile_write_tdesc): New function.
|
|
|
|
|
(tfile_write_ops): Wire in tfile_write_tdesc.
|
|
|
|
|
* tracefile.c (trace_save): Call write_tdesc method.
|
|
|
|
|
* tracefile.h (struct trace_file_write_ops): Add write_tdesc method.
|
|
|
|
|
* xml-tdesc.c (target_fetch_description_xml): New function.
|
|
|
|
|
* xml-tdesc.h: Add target_fetch_description_xml prototype.
|
|
|
|
|
|
2016-02-10 16:10:18 +01:00
|
|
|
|
2016-02-10 Simon Marchi <simon.marchi@ericsson.com>
|
|
|
|
|
|
|
|
|
|
* arm-tdep.c (arm_copy_extra_ld_st): Fix "unpriveleged" typo.
|
|
|
|
|
(arm_decode_dp_misc): Likewise.
|
|
|
|
|
|
2016-02-06 18:17:07 +01:00
|
|
|
|
2016-02-10 Marcin Kościelnicki <koriakin@0x04.net>
|
|
|
|
|
|
|
|
|
|
* amd64-tdep.c (amd64_ax_pseudo_register_collect): New function.
|
|
|
|
|
(amd64_init_abi): Fill ax_pseudo_register_collect hook.
|
|
|
|
|
* gdb/i386-tdep.c (i386_pseudo_register_read_into_value): Remove
|
|
|
|
|
misleading comment.
|
|
|
|
|
(i386_pseudo_register_write): Ditto.
|
|
|
|
|
(i386_ax_pseudo_register_collect): New function.
|
|
|
|
|
(i386_gdbarch_init): Fill ax_pseudo_register_collect hook.
|
|
|
|
|
* i386-tdep.h: Add i386_ax_pseudo_register_collect prototype.
|
|
|
|
|
|
2016-02-06 16:26:07 +01:00
|
|
|
|
2016-02-10 Marcin Kościelnicki <koriakin@0x04.net>
|
|
|
|
|
|
|
|
|
|
* tracefile-tfile.c (tfile_fetch_registers): Use g packet order
|
|
|
|
|
instead of gdb order.
|
|
|
|
|
|
2016-02-06 16:30:01 +01:00
|
|
|
|
2016-02-10 Marcin Kościelnicki <koriakin@0x04.net>
|
|
|
|
|
|
|
|
|
|
* tracefile-tfile.c (tfile_fetch_registers): Fix off-by-one in bounds
|
|
|
|
|
check.
|
|
|
|
|
|
2016-02-10 04:28:01 +01:00
|
|
|
|
2016-02-10 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
|
|
|
|
|
|
* NEWS: Create a new section for the next release branch.
|
|
|
|
|
Rename the section of the current branch, now that it has
|
|
|
|
|
been cut.
|
|
|
|
|
|
2016-02-10 04:20:26 +01:00
|
|
|
|
2016-02-10 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
|
|
|
|
|
|
GDB 7.11 branch created (9ef9e6a6a0dd8f948708cb67c9afcfd0be40cb0a):
|
|
|
|
|
* version.in: Bump version to 7.11.50.DATE-git.
|
|
|
|
|
|
2016-02-08 21:57:22 +01:00
|
|
|
|
2016-02-09 Keith Seitz <keiths@redhat.com>
|
|
|
|
|
|
|
|
|
|
PR breakpoints/19546
|
|
|
|
|
* breakpoint.c (breakpoint_event_location_empty_p): New function.
|
|
|
|
|
(update_breakpoints_after_exec, bkpt_re_set): Use this new function
|
|
|
|
|
instead of event_location_empty_p.
|
|
|
|
|
|
2016-02-09 19:02:54 +01:00
|
|
|
|
2016-02-09 Keith Seitz <keiths@redhat.com>
|
|
|
|
|
|
|
|
|
|
* mi/mi-cmd-break.c (mi_cmd_break_insert_1): Use
|
|
|
|
|
string_to_event_location_basic instead of string_to_event_location.
|
|
|
|
|
|
2016-02-09 19:02:53 +01:00
|
|
|
|
2016-02-09 Keith Seitz <keiths@redhat.com>
|
|
|
|
|
|
|
|
|
|
* guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Skip
|
|
|
|
|
leading whitespace and use string_to_event_location_basic instead
|
|
|
|
|
of new_linespec_location.
|
|
|
|
|
|
2016-02-09 19:02:53 +01:00
|
|
|
|
2016-02-09 Keith Seitz <keiths@redhat.com>
|
|
|
|
|
|
|
|
|
|
PR python/19506
|
|
|
|
|
* python/py-breakpoint.c (bppy_init): Use
|
|
|
|
|
string_to_event_location_basic instead of new_linespec_location.
|
|
|
|
|
|
2016-02-09 19:02:53 +01:00
|
|
|
|
2016-02-09 Keith Seitz <keiths@redhat.com>
|
|
|
|
|
|
|
|
|
|
* location.c (string_to_explicit_location): Note that "-p" is
|
|
|
|
|
reserved for probe locations and return NULL for any input
|
|
|
|
|
that starts with that.
|
|
|
|
|
(string_to_event_location): Move "legacy" linespec code to ...
|
|
|
|
|
(string_to_event_location_basic): ... here.
|
|
|
|
|
* location.h (string_to_event_location): Update comment.
|
|
|
|
|
(string_to_event_location_basic): New function.
|
|
|
|
|
|
2016-02-09 15:01:58 +01:00
|
|
|
|
2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
|
|
|
|
|
|
|
|
|
|
* configure.ac: Use AC_CONFIG_FILES instead of passing arguments
|
|
|
|
|
to AC_OUTPUT. Remove "exit 0" at the end.
|
|
|
|
|
* configure: Regenerate.
|
|
|
|
|
|
2016-02-09 13:12:17 +01:00
|
|
|
|
2016-02-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
PR breakpoints/19548
|
|
|
|
|
* breakpoint.c (create_overlay_event_breakpoint): Don't update
|
|
|
|
|
global location list here.
|
|
|
|
|
(create_longjmp_master_breakpoint)
|
|
|
|
|
(create_std_terminate_master_breakpoint)
|
|
|
|
|
(create_exception_master_breakpoint, create_jit_event_breakpoint)
|
|
|
|
|
(update_breakpoint_locations):
|
|
|
|
|
(breakpoint_re_set): Update global location list after all
|
|
|
|
|
breakpoints are re-set.
|
|
|
|
|
|
2016-02-08 18:57:08 +01:00
|
|
|
|
2016-02-08 Simon Marchi <simon.marchi@ericsson.com>
|
|
|
|
|
|
|
|
|
|
* remote.c (remote_register_number_and_offset): Remove unused
|
|
|
|
|
variable(s).
|
|
|
|
|
(remote_thread_always_alive): Likewise.
|
|
|
|
|
(remote_update_thread_list): Likewise.
|
|
|
|
|
(process_initial_stop_replies): Likewise.
|
|
|
|
|
(remote_start_remote): Likewise.
|
|
|
|
|
(remote_check_symbols): Likewise.
|
|
|
|
|
(discard_pending_stop_replies): Likewise.
|
|
|
|
|
(process_stop_reply): Likewise.
|
|
|
|
|
(putpkt_binary): Likewise.
|
|
|
|
|
(getpkt): Likewise.
|
|
|
|
|
(remote_add_target_side_condition): Likewise.
|
|
|
|
|
(remote_insert_breakpoint): Likewise.
|
|
|
|
|
(remote_supports_stopped_by_sw_breakpoint): Likewise.
|
|
|
|
|
(remote_supports_stopped_by_hw_breakpoint): Likewise.
|
|
|
|
|
(remote_xfer_partial): Likewise.
|
|
|
|
|
(remote_read_btrace): Likewise.
|
|
|
|
|
(remote_async_serial_handler): Likewise.
|
|
|
|
|
(remote_thread_events): Likewise.
|
|
|
|
|
(_initialize_remote): Likewise.
|
|
|
|
|
|
2016-02-07 15:45:02 +01:00
|
|
|
|
2016-02-07 Simon Marchi <simon.marchi@polymtl.ca>
|
|
|
|
|
|
|
|
|
|
* varobj.h (varobj_delete): Remove dellist parameter, update and
|
|
|
|
|
move documentation here.
|
|
|
|
|
* varobj.c (struct cpstack, cppush, cppop): Remove.
|
|
|
|
|
(delete_variable): Remove resultp (first) parameter.
|
|
|
|
|
(delete_variable_1): Likewise.
|
|
|
|
|
(varobj_delete): Remove dellist parameter and unused code.
|
|
|
|
|
(update_dynamic_varobj_children): Adjust varobj_delete call.
|
|
|
|
|
(update_type_if_necessary): Likewise.
|
|
|
|
|
(varobj_set_visualizer): Likewise.
|
|
|
|
|
(varobj_update): Likewise.
|
|
|
|
|
(value_of_root): Likewise.
|
|
|
|
|
(varobj_invalidate_iter): Likewise.
|
|
|
|
|
* mi/mi-cmd-var.c (mi_cmd_var_delete): Likewise.
|
|
|
|
|
|
waiting_for_stop_reply around remote_fileio_request
Hi,
I see this error when GDB connects with qemu,
(gdb) n
....
Sending packet: $vCont;c#a8...Ack
Packet received: Ffstat,00000001,f6fff038
Cannot execute this command while the target is running.
Use the "interrupt" command to stop the target
and then try again.
looks we don't set rs->waiting_for_stop_reply to zero
before handle fileio request,
#10 0x00000000005edb64 in target_write (len=64, offset=4143968312, buf=0x7fffffffd570 "\375\377\377\377", annex=0x0, object=TARGET_OBJECT_MEMORY,
ops=<optimised out>) at /home/yao/SourceCode/gnu/gdb/git/gdb/target.c:1922
#11 target_write_memory (memaddr=memaddr@entry=4143968312, myaddr=myaddr@entry=0x7fffffffd6a0 "", len=len@entry=64)
at /home/yao/SourceCode/gnu/gdb/git/gdb/target.c:1500
#12 0x00000000004b2b41 in remote_fileio_func_fstat (buf=0x127b258 "") at /home/yao/SourceCode/gnu/gdb/git/gdb/remote-fileio.c:1037
#13 0x00000000004b1878 in do_remote_fileio_request (uiout=<optimised out>, buf_arg=buf_arg@entry=0x127b240)
at /home/yao/SourceCode/gnu/gdb/git/gdb/remote-fileio.c:1204
#14 0x00000000005b8c7c in catch_exceptions_with_msg (func_uiout=<optimised out>, func=func@entry=0x4b1800 <do_remote_fileio_request>,
func_args=func_args@entry=0x127b240, gdberrmsg=gdberrmsg@entry=0x0, mask=mask@entry=RETURN_MASK_ALL)
at /home/yao/SourceCode/gnu/gdb/git/gdb/exceptions.c:187
#15 0x00000000005b8dea in catch_exceptions (uiout=<optimised out>, func=func@entry=0x4b1800 <do_remote_fileio_request>, func_args=func_args@entry=0x127b240,
mask=mask@entry=RETURN_MASK_ALL) at /home/yao/SourceCode/gnu/gdb/git/gdb/exceptions.c:167
#16 0x00000000004b2fff in remote_fileio_request (buf=0x127b240 "Xf6fff038,0:", ctrlc_pending_p=0) at /home/yao/SourceCode/gnu/gdb/git/gdb/remote-fileio.c:1255
#17 0x0000000000496f12 in remote_wait_as (ptid=..., status=0x7fffffffdb20, options=1) at /home/yao/SourceCode/gnu/gdb/git/gdb/remote.c:6997
however, we did set rs->waiting_for_stop_reply to zero before Luis's
patch https://sourceware.org/ml/gdb-patches/2015-10/msg00336.html
In fact, Luis's patch v1
https://sourceware.org/ml/gdb-patches/2015-08/msg00809.html is about
setting rs->waiting_for_stop_reply back to one after
remote_fileio_request, which is correct. However during the review, the
patch is changed and ends up with "not setting rs->waiting_for_stop_reply
to zero".
I manually test GDB, but I don't have a way to run regression tests.
gdb:
2016-02-04 Yao Qi <yao.qi@linaro.org>
* remote.c (remote_wait_as): Set rs->waiting_for_stop_reply to
0 before handling 'F' and set it back afterwards.
2016-02-04 16:09:09 +01:00
|
|
|
|
2016-02-04 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* remote.c (remote_wait_as): Set rs->waiting_for_stop_reply to
|
|
|
|
|
0 before handling 'F' and set it back afterwards.
|
|
|
|
|
|
2016-02-02 22:39:06 +01:00
|
|
|
|
2016-02-02 Simon Marchi <simon.marchi@ericsson.com>
|
|
|
|
|
|
|
|
|
|
* ui-out.c (MAX_UI_OUT_LEVELS): Remove.
|
|
|
|
|
|
2016-02-02 12:02:16 +01:00
|
|
|
|
2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
|
|
|
|
|
|
|
|
|
|
* amd64-linux-siginfo.c (nat_siginfo_t, nat_sigval_t, nat_timeval):
|
|
|
|
|
New types.
|
|
|
|
|
(compat_siginfo): New bound fields added.
|
|
|
|
|
(compat_x32_siginfo): New field added.
|
|
|
|
|
(cpt_si_addr_lsb): New define.
|
|
|
|
|
(compat_siginfo_from_siginfo): Use nat_siginfo.
|
|
|
|
|
(siginfo_from_compat_siginfo): Use nat_siginfo.
|
|
|
|
|
(compat_x32_siginfo_from_siginfo): Likewise.
|
|
|
|
|
(siginfo_from_compat_x32_siginfo): Likewise.
|
|
|
|
|
|
2016-02-02 11:58:36 +01:00
|
|
|
|
2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
|
|
|
|
|
|
|
|
|
|
* linux-tdep.c (linux_get_siginfo_type): Add the _addr_bnd
|
|
|
|
|
structure to the siginfo if extra_fields contains
|
|
|
|
|
LINUX_SIGINFO_FIELD_ADDR_BND.
|
|
|
|
|
|
2016-02-02 11:50:17 +01:00
|
|
|
|
2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
|
|
|
|
|
|
|
|
|
|
* linux-tdep.h (linux_get_siginfo_type_with_fields): Make extern.
|
|
|
|
|
* linux-tdep.c (linux_get_siginfo_type_with_fields): Make extern.
|
|
|
|
|
* i386-linux-tdep.h (x86_linux_get_siginfo_type): New
|
|
|
|
|
function.
|
|
|
|
|
* amd64-linux-tdep.c (amd64_linux_init_abi_common): Add
|
|
|
|
|
x86_linux_get_siginfo_type for the amd64 abi.
|
|
|
|
|
* i386-linux-tdep.c (x86_linux_get_siginfo_type): New
|
|
|
|
|
function.
|
|
|
|
|
(i386_linux_init_abi): Add new function at the i386 ABI
|
|
|
|
|
initialization.
|
|
|
|
|
|
2016-02-02 11:46:28 +01:00
|
|
|
|
2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
|
|
|
|
|
|
|
|
|
|
* linux-tdep.h (linux_siginfo_extra_field_values): New enum values.
|
|
|
|
|
(linux_siginfo_extra_fields): New enum type.
|
|
|
|
|
* linux-tdep.c (linux_get_siginfo_type_with_fields): New function.
|
|
|
|
|
(linux_get_siginfo_type): Use new function.
|
|
|
|
|
|
Merge gdb and gdbserver implementations for siginfo
Extract the compatible siginfo handling from amd64-linux-nat.c and
gdbserver/linux-x86-low to a new file nat/amd64-linux-siginfo.c.
2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
gdb/ChangeLog:
* nat/amd64-linux-siginfo.c: New file.
* nat/amd64-linux-siginfo.h: New file.
* Makefile.in (HFILES_NO_SRCDIR): Add nat/amd64-linux-siginfo.h.
(amd64-linux-siginfo.o): New rule.
* config/i386/linux64.mh (NATDEPFILES): Add amd64-linux-siginfo.o.
* amd64-linux-nat.c (nat/amd64-linux-siginfo.h): New include.
(compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
(compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
(compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
(cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
(cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
(cpt_si_fd, si_timerid, si_overrun): Move to nat/amd64-linux-siginfo.c.
gdb/gdbserver/ChangeLog:
* configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
to srv_tgtobj.
(i[34567]86-*-linux*): Add amd64-linux-siginfo.o
to srv_tgtobj.
* linux-x86-low.c [__x86_64__]: Include
"nat/amd64-linux-siginfo.h".
(compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
(compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
(compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
(cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
(cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
(cpt_si_fd, si_timerid, si_overrun): Move from
nat/amd64-linux-siginfo.c.
* Makefile.in (amd64-linux-siginfo.o:): New rule.
2016-02-02 11:42:56 +01:00
|
|
|
|
2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
|
|
|
|
|
|
|
|
|
|
* nat/amd64-linux-siginfo.c: New file.
|
|
|
|
|
* nat/amd64-linux-siginfo.h: New file.
|
|
|
|
|
* Makefile.in (HFILES_NO_SRCDIR): Add nat/amd64-linux-siginfo.h.
|
|
|
|
|
(amd64-linux-siginfo.o): New rule.
|
|
|
|
|
* config/i386/linux64.mh (NATDEPFILES): Add amd64-linux-siginfo.o.
|
|
|
|
|
* amd64-linux-nat.c (nat/amd64-linux-siginfo.h): New include.
|
|
|
|
|
(compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
|
|
|
|
|
(compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
|
|
|
|
|
(compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
|
|
|
|
|
(cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
|
|
|
|
|
(cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
|
|
|
|
|
(cpt_si_fd, si_timerid, si_overrun): Move to nat/amd64-linux-siginfo.c.
|
|
|
|
|
|
2015-12-11 18:37:49 +01:00
|
|
|
|
2016-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
|
|
|
|
|
|
|
|
|
|
* value.c (max_value_size): New variable.
|
|
|
|
|
(MIN_VALUE_FOR_MAX_VALUE_SIZE): New define.
|
|
|
|
|
(set_max_value_size): New function.
|
|
|
|
|
(show_max_value_size): New function.
|
|
|
|
|
(check_type_length_before_alloc): New function.
|
|
|
|
|
(allocate_value_contents): Call check_type_length_before_alloc.
|
|
|
|
|
(set_value_enclosing_type): Likewise.
|
|
|
|
|
(_initialize_values): Add set/show handler for max-value-size.
|
|
|
|
|
* NEWS: Mention new set/show command.
|
|
|
|
|
|
2016-02-01 04:22:19 +01:00
|
|
|
|
2016-01-31 Simon Marchi <simon.marchi@polymtl.ca>
|
|
|
|
|
|
|
|
|
|
* varobj.h (struct varobj): Fix typos in comments.
|
|
|
|
|
(struct lang_varobj_ops): Likewise.
|
|
|
|
|
* varobj.c (VAROBJ_TABLE_SIZE): Likewise.
|
|
|
|
|
(varobj_create): Move misplaced comment.
|
|
|
|
|
|
2016-01-29 21:32:29 +01:00
|
|
|
|
2016-01-29 Simon Marchi <simon.marchi@ericsson.com>
|
|
|
|
|
|
|
|
|
|
* aarch64-tdep.c (aarch64_record_asimd_load_store): Add braces
|
|
|
|
|
to for include additional lines.
|
|
|
|
|
* xcoffread.c (scan_xcoff_symtab): Remove unnecessary braces.
|
|
|
|
|
|
2016-01-28 19:49:46 +01:00
|
|
|
|
2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
|
|
|
|
|
|
|
|
|
|
* gnulib/import/Makefile.am: Regenerate.
|
|
|
|
|
* gnulib/import/Makefile.in: Regenerate.
|
|
|
|
|
* gnulib/import/m4/gnulib-cache.m4: Regenerate.
|
|
|
|
|
* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add rawmemchr.
|
|
|
|
|
|
2016-01-28 16:28:56 +01:00
|
|
|
|
2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
|
|
|
|
|
|
|
|
|
|
* remote.c (skip_to_semicolon): Remove.
|
|
|
|
|
(remote_parse_stop_reply): Use strchrnul instead of
|
|
|
|
|
skip_to_semicolon.
|
|
|
|
|
* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
|
|
|
|
|
strchrnul.
|
|
|
|
|
* gnulib/aclocal.m4: Regenerate.
|
|
|
|
|
* gnulib/config.in: Regenerate.
|
|
|
|
|
* gnulib/configure: Regenerate.
|
|
|
|
|
* gnulib/import/Makefile.am: Regenerate.
|
|
|
|
|
* gnulib/import/Makefile.in: Regenerate.
|
|
|
|
|
* gnulib/import/m4/gnulib-cache.m4: Regenerate.
|
|
|
|
|
* gnulib/import/m4/gnulib-comp.m4: Regenerate.
|
|
|
|
|
* gnulib/import/m4/rawmemchr.m4: New file.
|
|
|
|
|
* gnulib/import/m4/strchrnul.m4: New file.
|
|
|
|
|
* gnulib/import/rawmemchr.c: New file.
|
|
|
|
|
* gnulib/import/rawmemchr.valgrind: New file.
|
|
|
|
|
* gnulib/import/strchrnul.c: New file.
|
|
|
|
|
* gnulib/import/strchrnul.valgrind: New file.
|
|
|
|
|
|
2016-01-28 15:16:42 +01:00
|
|
|
|
2016-01-28 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* breakpoint.c (build_target_command_list): Don't call continue
|
|
|
|
|
if aexpr is NULL.
|
|
|
|
|
(build_target_condition_list): Likewise.
|
|
|
|
|
|
rx: Treat scalars larger than 8 bytes as aggregates in rx_push_dummy_call.
This patch fixes the following failures (which are also GDB internal errors)
for the -m64bit-doubles multilib:
FAIL: gdb.base/callfuncs.exp: p t_double_complex_values(dc1, dc2) (GDB internal error)
FAIL: gdb.base/callfuncs.exp: p t_double_complex_values(dc3, dc4) (GDB internal error)
FAIL: gdb.base/callfuncs.exp: p t_double_complex_many_args(dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4) (GDB internal error)
FAIL: gdb.base/callfuncs.exp: p t_double_complex_many_args(dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1) (GDB internal error)
FAIL: gdb.base/callfuncs.exp: p t_long_double_complex_values(ldc1, ldc2) (GDB internal error)
FAIL: gdb.base/callfuncs.exp: p t_long_double_complex_values(ldc3, ldc4) (GDB internal error)
FAIL: gdb.base/callfuncs.exp: p t_long_double_complex_many_args(ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4) (GDB internal error)
FAIL: gdb.base/callfuncs.exp: p t_long_double_complex_many_args(ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1,ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1) (GDB internal error)
FAIL: gdb.base/callfuncs.exp: noproto: p t_double_complex_values(dc1, dc2) (GDB internal error)
FAIL: gdb.base/callfuncs.exp: noproto: p t_double_complex_values(dc3, dc4) (GDB internal error)
FAIL: gdb.base/callfuncs.exp: noproto: p t_double_complex_many_args(dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4) (GDB internal error)
FAIL: gdb.base/callfuncs.exp: noproto: p t_double_complex_many_args(dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1) (GDB internal error)
FAIL: gdb.base/callfuncs.exp: noproto: p t_long_double_complex_values(ldc1, ldc2) (GDB internal error)
FAIL: gdb.base/callfuncs.exp: noproto: p t_long_double_complex_values(ldc3, ldc4) (GDB internal error)
FAIL: gdb.base/callfuncs.exp: noproto: p t_long_double_complex_many_args(ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4) (GDB internal error)
FAIL: gdb.base/callfuncs.exp: noproto: p t_long_double_complex_many_args(ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1,ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1) (GDB internal error)
FAIL: gdb.base/varargs.exp: print find_max_double_real(4, dc1, dc2, dc3, dc4) (GDB internal error)
FAIL: gdb.base/varargs.exp: print find_max_long_double_real(4, ldc1, ldc2, ldc3, ldc4) (GDB internal error)
The assertion failure which is tripped is:
gdb_assert (arg_size <= 4);
While it may seem that the patch ought to disallow scalars larger than
4, scalars of size 8 are explicitly handled by the code elsewhere.
This came up because gcc has a complex type that is 16 bytes in length
when 64-bit doubles are used.
gdb/ChangeLog:
* rx-tdep.c (rx_push_dummy_call): Treat scalars larger than 8
bytes as aggregates.
2016-01-23 23:06:08 +01:00
|
|
|
|
2016-01-27 Kevin Buettner <kevinb@redhat.com>
|
|
|
|
|
|
|
|
|
|
* rx-tdep.c (rx_push_dummy_call): Treat scalars larger than 8
|
|
|
|
|
bytes as aggregates.
|
|
|
|
|
|
2016-01-27 10:54:37 +01:00
|
|
|
|
2016-01-27 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
|
|
|
|
|
|
* MAINTAINERS (Responsible Maintainers): Add Keith Seitz as
|
|
|
|
|
Linespec Maintainers.
|
|
|
|
|
|
2016-01-26 22:30:03 +01:00
|
|
|
|
2016-01-26 Simon Marchi <simon.marchi@ericsson.com>
|
|
|
|
|
|
|
|
|
|
* common/common-utils.c (skip_spaces): Fix comment.
|
|
|
|
|
(skip_to_space_const): Likewise.
|
|
|
|
|
|
2016-01-26 15:08:26 +01:00
|
|
|
|
2016-01-25 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
|
|
|
|
|
Remove argument pc. Get pc by regcache_read_pc. Callers updated.
|
|
|
|
|
(arm_deal_with_atomic_sequence_raw): Likewise.
|
|
|
|
|
(thumb_get_next_pcs_raw): Likewise.
|
|
|
|
|
(arm_get_next_pcs_raw): Likewise.
|
|
|
|
|
(arm_get_next_pcs): Remove argument pc. Callers updated.
|
|
|
|
|
* arch/arm-get-next-pcs.h (arm_get_next_pcs): Update declaration.
|
|
|
|
|
|
2016-01-25 20:29:54 +01:00
|
|
|
|
2016-01-25 Mark Wielaard <mjw@redhat.com>
|
|
|
|
|
|
|
|
|
|
* ada-lang.c (ada_evaluate_subexp): Add proper else block.
|
|
|
|
|
* c-typeprint.c (c_type_print_base): Fix misleading indentation of
|
|
|
|
|
if statement.
|
|
|
|
|
* inflow.c (child_terminal_ours_1): Fix misleading indentation of
|
|
|
|
|
statement block by introducing an else.
|
|
|
|
|
* linux-record.c (record_linux_sockaddr): Fix misleading indentation
|
|
|
|
|
of return statements.
|
|
|
|
|
(record_linux_msghdr): Likewise.
|
|
|
|
|
|
2016-01-25 13:00:20 +01:00
|
|
|
|
2016-01-25 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
PR threads/19461
|
|
|
|
|
* infrun.c (handle_inferior_event_1) <fork/vfork>: Update
|
|
|
|
|
parent/child running states.
|
|
|
|
|
|
Fix PR 19494: hang when killing unfollowed fork children
linux_nat_kill relies on get_last_target_status to determine whether
the current inferior is stopped at a unfollowed fork/vfork event.
This is bad because many things can happen ever since we caught the
fork/vfork event... This commit rewrites that code to instead walk
the thread list looking for unfollowed fork events, similarly to what
was done for remote.c.
New test included. The main idea of the test is make sure that when
the program stops for a fork catchpoint, and the user kills the
parent, gdb also kills the unfollowed fork child. Since the child
hasn't been added as an inferior at that point, we need some other
portable way to detect that the child is gone. The test uses a pipe
for that. The program forks twice, so you have grandparent, child and
grandchild. The grandchild inherits the write side of the pipe. The
grandparent hangs reading from the pipe, since nothing ever writes to
it. If, when GDB kills the child, it also kills the grandchild, then
the grandparent's pipe read returns 0/EOF and the test passes.
Otherwise, if GDB doesn't kill the grandchild, then the pipe read
never returns and the test times out, like:
FAIL: gdb.base/catch-fork-kill.exp: fork-kind=fork: exit-kind=kill: fork: kill parent (timeout)
FAIL: gdb.base/catch-fork-kill.exp: fork-kind=vfork: exit-kind=kill: vfork: kill parent (timeout)
No regressions on x86_64 Fedora 20. New test passes with gdbserver as
well.
gdb/ChangeLog:
2016-01-25 Pedro Alves <palves@redhat.com>
PR gdb/19494
* linux-nat.c (kill_one_lwp): New, factored out from ...
(kill_callback): ... this.
(kill_wait_callback): New, factored out from ...
(kill_wait_one_lwp): ... this.
(kill_unfollowed_fork_children): New function.
(linux_nat_kill): Use it.
gdb/testsuite/ChangeLog:
2016-01-25 Pedro Alves <palves@redhat.com>
PR gdb/19494
* gdb.base/catch-fork-kill.c: New file.
* gdb.base/catch-fork-kill.exp: New file.
2016-01-25 13:00:20 +01:00
|
|
|
|
2016-01-25 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
PR gdb/19494
|
|
|
|
|
* linux-nat.c (kill_one_lwp): New, factored out from ...
|
|
|
|
|
(kill_callback): ... this.
|
|
|
|
|
(kill_wait_callback): New, factored out from ...
|
|
|
|
|
(kill_wait_one_lwp): ... this.
|
|
|
|
|
(kill_unfollowed_fork_children): New function.
|
|
|
|
|
(linux_nat_kill): Use it.
|
|
|
|
|
|
2016-01-21 18:51:35 +01:00
|
|
|
|
2016-01-22 John Baldwin <jhb@FreeBSD.org>
|
|
|
|
|
|
|
|
|
|
* fbsd-nat.c (fbsd_pid_to_str): Adjust string format.
|
|
|
|
|
|
2016-01-22 10:01:09 +01:00
|
|
|
|
2016-01-22 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arm-linux-nat.c (fetch_fpregs): Call perror_with_name
|
|
|
|
|
instead of warning.
|
|
|
|
|
(store_fpregs, fetch_regs, store_regs): Likewise.
|
|
|
|
|
(fetch_wmmx_regs, store_wmmx_regs): Likewise.
|
|
|
|
|
(fetch_vfp_regs, store_vfp_regs): Likewise.
|
|
|
|
|
|
2016-01-22 02:02:39 +01:00
|
|
|
|
2016-01-21 Doug Evans <dje@google.com>
|
|
|
|
|
|
|
|
|
|
* breakpoint.c (init_breakpoint_sal): Add comment.
|
|
|
|
|
|
2016-01-21 16:58:12 +01:00
|
|
|
|
2016-01-21 Marcin Kościelnicki <koriakin@0x04.net>
|
|
|
|
|
|
|
|
|
|
* ax-gdb.c (gen_traced_pop): Use gen_fetch for string collection.
|
|
|
|
|
|
2016-01-21 12:56:25 +01:00
|
|
|
|
2016-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
|
|
|
|
|
|
|
|
|
|
* disasm.c (maybe_add_dis_line_entry): Rename to...
|
|
|
|
|
(add_dis_line_entry): ...this, and update header comment.
|
|
|
|
|
(do_mixed_source_and_assembly): Now use add_dis_line_entry.
|
|
|
|
|
|
2016-01-21 12:18:45 +01:00
|
|
|
|
2016-01-21 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* Makefile.in (COMPILER_CFLAGS): New.
|
|
|
|
|
(CXXFLAGS): Get it from configure.
|
|
|
|
|
(INTERNAL_CFLAGS_BASE, INTERNAL_LDFLAGS): Use COMPILER_CFLAGS
|
|
|
|
|
instead of CFLAGS.
|
|
|
|
|
* build-with-cxx.m4 (GDB_AC_BUILD_WITH_CXX): Set and AC_SUBST
|
|
|
|
|
COMPILER_CFLAGS.
|
|
|
|
|
* configure: Regenerate.
|
|
|
|
|
|
Fix regression introduced in "break *<EXPR>" by explicit location patches.
A relatively recent patch support for explicit locations, and part
of that patch cleaned up the way we parse breakpoint locations.
Unfortunatly, a small regression crept in for "*<EXPR>" breakpoint
locations. In particular, on PIE programs, one can see the issue by
doing the following, with any program:
(gdb) b *main
Breakpoint 1 at 0x51a: file hello.c, line 3.
(gdb) run
Starting program: /[...]/hello
Error in re-setting breakpoint 1: Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x51a
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x51a
Just for the record, this regression was introduced by:
commit a06efdd6effd149a1d392df8d62824e44872003a
Date: Tue Aug 11 17:09:35 2015 -0700
Subject: Explicit locations: introduce address locations
What happens is that the patch makes the implicit assumption that
the address computed the first time is static, as if it was designed
to only support litteral expressions (Eg. "*0x1234"). This allows
the shortcut of not re-computing the breakpoint location's address
when re-setting breakpoints.
However, this does not work in general, as demonstrated in the example
above.
This patch plugs that hole simply by saving the original expression
used to compute the address as part of the address location, so as
to then re-evaluate that expression during breakpoint re-set.
gdb/ChangeLog:
* location.h (new_address_location): Add new parameters
"addr_string" and "addr_string_len".
(get_address_string_location): Add declaration.
* location.c (new_address_location): Add new parameters
"addr_string" and "addr_string_len". If not NULL, store
a copy of the addr_string in the new location as well.
(get_address_string_location): New function.
(string_to_event_location): Update call to new_address_location.
* linespec.c (event_location_to_sals) <ADDRESS_LOCATION>:
Save the event location in the parser's state before
passing it to convert_address_location_to_sals.
* breakpoint.c (create_thread_event_breakpoint): Update call
to new_address_location.
(init_breakpoint_sal): Get the event location's string, if any,
and use it to update call to new_address_location.
* python/py-finishbreakpoint.c (bpfinishpy_init):
Update call to new_address_location.
* spu-tdep.c (spu_catch_start): Likewise.
* config/djgpp/fnchange.lst: Add entries for
gdb/testsuite/gdb.base/break-fun-addr1.c and
gdb/testsuite/gdb.base/break-fun-addr2.c.
gdb/testsuite/ChangeLog:
* gdb.base/break-fun-addr.exp: New file.
* gdb.base/break-fun-addr1.c: New file.
* gdb.base/break-fun-addr2.c: New file.
2015-12-08 19:04:56 +01:00
|
|
|
|
2016-01-21 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
|
|
|
|
|
|
* location.h (new_address_location): Add new parameters
|
|
|
|
|
"addr_string" and "addr_string_len".
|
|
|
|
|
(get_address_string_location): Add declaration.
|
|
|
|
|
* location.c (new_address_location): Add new parameters
|
|
|
|
|
"addr_string" and "addr_string_len". If not NULL, store
|
|
|
|
|
a copy of the addr_string in the new location as well.
|
|
|
|
|
(get_address_string_location): New function.
|
|
|
|
|
(string_to_event_location): Update call to new_address_location.
|
|
|
|
|
* linespec.c (event_location_to_sals) <ADDRESS_LOCATION>:
|
|
|
|
|
Save the event location in the parser's state before
|
|
|
|
|
passing it to convert_address_location_to_sals.
|
|
|
|
|
* breakpoint.c (create_thread_event_breakpoint): Update call
|
|
|
|
|
to new_address_location.
|
|
|
|
|
(init_breakpoint_sal): Get the event location's string, if any,
|
|
|
|
|
and use it to update call to new_address_location.
|
|
|
|
|
* python/py-finishbreakpoint.c (bpfinishpy_init):
|
|
|
|
|
Update call to new_address_location.
|
|
|
|
|
* spu-tdep.c (spu_catch_start): Likewise.
|
|
|
|
|
|
|
|
|
|
* config/djgpp/fnchange.lst: Add entries for
|
|
|
|
|
gdb/testsuite/gdb.base/break-fun-addr1.c and
|
|
|
|
|
gdb/testsuite/gdb.base/break-fun-addr2.c.
|
|
|
|
|
|
Detect the arm/thumb mode of code SIGRETURN or RT_SIGRETURN returns to
This patch fixes the following regression introduced by commit d0e59a68
step^M
39 } /* handler */^M
1: x/i $pc^M
=> 0x8740 <handler+80>: sub sp, r11, #0^M
(gdb) step^M
^M
Program received signal SIGSEGV, Segmentation fault.^M
setitimer () at ../sysdeps/unix/syscall-template.S:81^M
81 ../sysdeps/unix/syscall-template.S: No such file or directory.^M
1: x/i $pc^M
=> 0xb6eff9c0 <setitimer>: push {r7}^M
(gdb) FAIL: gdb.base/sigstep.exp: continue to handler, si+advance in handler, step from handler: leave handler
in my test setting, program is compiled in arm mode, but the glibc
is built in thumb mode, so when we do 'step' to step over syscall
instruction svc for SIGRETURN, GDB should set breakpoint for arm mode
in the program, even though the current program in glibc is in thumb
mode. Current GDB doesn't consider the case that the mode of program
SIGRETURN goes to can be different from current program mode.
In fact, GDB has taken care of this arm/thumb mode changes already,
see
/* Copy the value of next pc of sigreturn and rt_sigrturn into PC,
return 1. In addition, set IS_THUMB depending on whether we
will return to ARM or Thumb code. Return 0 if it is not a
rt_sigreturn/sigreturn syscall. */
static int
arm_linux_sigreturn_return_addr (struct frame_info *frame,
unsigned long svc_number,
CORE_ADDR *pc, int *is_thumb)
but in the commit d0e59a68
> - arm_linux_sigreturn_return_addr (frame, svc_number, &return_addr, &is_thumb);
> + if (svc_number == ARM_SIGRETURN || svc_number == ARM_RT_SIGRETURN)
> + next_pc = arm_linux_sigreturn_next_pc (regcache, svc_number);
the IS_THUMB setting is lost, so it is a regression.
gdb:
2016-01-21 Yao Qi <yao.qi@linaro.org>
* arm-linux-tdep.c (arm_linux_sigreturn_next_pc): Add parameter
is_thumb and set it according to CPSR saved on the stack.
(arm_linux_get_next_pcs_syscall_next_pc): Pass is_thumb to
arm_linux_sigreturn_next_pc.
gdb/gdbserver:
2016-01-21 Yao Qi <yao.qi@linaro.org>
* linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
is_thumb and set it according to CPSR saved on the stack.
(get_next_pcs_syscall_next_pc): Pass is_thumb to
arm_sigreturn_next_pc.
2016-01-21 08:48:50 +01:00
|
|
|
|
2016-01-21 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arm-linux-tdep.c (arm_linux_sigreturn_next_pc): Add parameter
|
|
|
|
|
is_thumb and set it according to CPSR saved on the stack.
|
|
|
|
|
(arm_linux_get_next_pcs_syscall_next_pc): Pass is_thumb to
|
|
|
|
|
arm_linux_sigreturn_next_pc.
|
|
|
|
|
|
Fix sorting of enum values in FlagEnumerationPrinter
The lambda function used to sort the enumerator list does not work
properly. This list consists of tuples, (enum label, enum value). The
key function returns x.enumval. enumval not being defined for a tuple,
we see this exception in the test log:
Python Exception <class 'AttributeError'> 'tuple' object has no attribute 'enumval'
The function should return the second item of the tuple, which is the
enumval.
The pretty-printer still worked mostly correctly, except that the
enumeration values were not sorted. The test still passed because the
enumeration values are already sorted where they are defined. The test
also passed despite the exception being printed, because the right output
was printed after the exception:
print (enum flag_enum) (FLAG_1)
Python Exception <type 'exceptions.AttributeError'> 'tuple' objecthas no attribute 'enumval':M
$7 = 0x1 [FLAG_1]
(gdb) PASS: gdb.python/py-pp-maint.exp: print FLAG_1
New in v2:
- Improved test case, I stole Pedro's example directly. It verifies
that the sorting of enumerators by value works, by checking that
printing FOO_MASK appears as FOO_1 | FOO_2 | FOO_3.
I noticed that I could change the regexps to almost anything and the
tests would still pass. I think it was because of the | in there. I
made them more robust by using string_to_regexp. I used curly braces
{ } instead of quoting marks " " for strings, so that I could use
square brackets [ ] in them without having to escape them all. I also
removed the "message" part of the tests, since they are redundant with
the command, and it's just more maintenance to have to update them.
Tested with Python 2.7 and 3.5.
gdb/ChangeLog:
* python/lib/gdb/printing.py (FlagEnumerationPrinter.__call__):
Fix enumerators sort key function.
gdb/testsuite/ChangeLog:
* gdb.python/py-pp-maint.exp: Change/add enum flag tests.
* gdb.python/py-pp-maint.c (enum flag_enum): Use more complex
enum flag values.
2016-01-20 19:42:53 +01:00
|
|
|
|
2016-01-20 Simon Marchi <simon.marchi@polymtl.ca>
|
|
|
|
|
|
|
|
|
|
* python/lib/gdb/printing.py (FlagEnumerationPrinter.__call__):
|
|
|
|
|
Fix enumerators sort key function.
|
|
|
|
|
|
2016-01-20 05:01:39 +01:00
|
|
|
|
2016-01-20 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
|
|
2016-01-20 14:10:41 +01:00
|
|
|
|
* printcmd.c (print_scalar_formatted): Move binary operator from
|
2016-01-20 05:01:39 +01:00
|
|
|
|
end of line to beginning of next line. Adjust formatting
|
|
|
|
|
accordingly.
|
|
|
|
|
|
2016-01-19 19:23:00 +01:00
|
|
|
|
2016-01-19 John Baldwin <jhb@FreeBSD.org>
|
|
|
|
|
|
|
|
|
|
* fbsd-nat.c (fbsd_pid_to_exec_file): Use new "buflen" instead of
|
|
|
|
|
"len" with sysctl.
|
|
|
|
|
|
2015-12-22 01:34:15 +01:00
|
|
|
|
2016-01-19 John Baldwin <jhb@FreeBSD.org>
|
|
|
|
|
|
|
|
|
|
* fbsd-tdep.c (find_stop_signal): Remove.
|
|
|
|
|
(struct fbsd_collect_regset_section_cb) <lwp>: New field.
|
|
|
|
|
<stop_signal>: New field.
|
|
|
|
|
<abort_iteration>: New field.
|
|
|
|
|
(fbsd_collect_regset_section_cb): Use new fields.
|
|
|
|
|
(fbsd_collect_thread_registers): New function.
|
|
|
|
|
(struct fbsd_corefile_thread_data): New structure.
|
|
|
|
|
(fbsd_corefile_thread): New function.
|
|
|
|
|
(fbsd_make_corefile_notes): Use new function to dump notes for each
|
|
|
|
|
non-exited thread in a process.
|
|
|
|
|
|
2015-04-29 17:53:43 +02:00
|
|
|
|
2016-01-19 John Baldwin <jhb@FreeBSD.org>
|
|
|
|
|
|
|
|
|
|
* configure.ac: Check for support for LWP names on FreeBSD.
|
|
|
|
|
* fbsd-nat.c [PT_LWPINFO] New variable debug_fbsd_lwp.
|
|
|
|
|
[TDP_RFPPWAIT || HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME]
|
|
|
|
|
(fbsd_fetch_kinfo_proc): Move function earlier.
|
|
|
|
|
[PT_LWPINFO] (fbsd_thread_alive): New function.
|
|
|
|
|
[PT_LWPINFO] (fbsd_pid_to_str): New function.
|
|
|
|
|
[HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME] (fbsd_thread_name): New function.
|
|
|
|
|
[PT_LWP_EVENTS] (fbsd_enable_lwp_events): New function.
|
|
|
|
|
[PT_LWPINFO] (fbsd_add_threads): New function.
|
|
|
|
|
[PT_LWPINFO] (fbsd_update_thread_list): New function.
|
|
|
|
|
[PT_LWPINFO] New variable super_resume.
|
|
|
|
|
[PT_LWPINFO] (resume_one_thread_cb): New function.
|
|
|
|
|
[PT_LWPINFO] (resume_all_threads_cb): New function.
|
|
|
|
|
[PT_LWPINFO] (fbsd_resume): New function.
|
|
|
|
|
(fbsd_remember_child): Save full ptid instead of plain pid.
|
|
|
|
|
(fbsd_is_child_pending): Return ptid of saved child process.
|
|
|
|
|
(fbsd_wait): Include lwp in returned ptid and switch to LWP ptid on
|
|
|
|
|
first stop.
|
|
|
|
|
[PT_LWP_EVENTS] Handle LWP events.
|
|
|
|
|
[TDP_RFPPWAIT] Include LWP in child ptid.
|
|
|
|
|
(fbsd_post_startup_inferior) [PT_LWP_EVENTS]: Enable LWP events.
|
|
|
|
|
(fbsd_post_attach) [PT_LWP_EVENTS]: Enable LWP events.
|
|
|
|
|
Add threads for existing processes.
|
|
|
|
|
(fbsd_nat_add_target) [PT_LWPINFO]: Set "to_thread_alive" to
|
|
|
|
|
"fbsd_thread_alive".
|
|
|
|
|
Set "to_pid_to_str" to "fbsd_pid_to_str".
|
|
|
|
|
[HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME]: Set "to_thread_name" to
|
|
|
|
|
"fbsd_thread_name".
|
|
|
|
|
[PT_LWPINFO]: Set "to_update_thread_list" to "fbsd_update_thread_list".
|
|
|
|
|
Set "to_has_thread_control" to "tc_schedlock".
|
|
|
|
|
Set "to_resume" to "fbsd_resume".
|
|
|
|
|
(_initialize_fbsd_nat): New function.
|
|
|
|
|
* configure: Regenerate.
|
|
|
|
|
* config.in: Regenerate.
|
|
|
|
|
|
2016-01-15 21:21:07 +01:00
|
|
|
|
2016-01-19 John Baldwin <jhb@FreeBSD.org>
|
|
|
|
|
|
|
|
|
|
* amd64bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
|
|
|
|
|
get_ptrace_pid.
|
|
|
|
|
(amd64bsd_store_inferior_registers): Use get_ptrace_pid.
|
|
|
|
|
(amd64bsd_dr_get): Use get_ptrace_pid.
|
|
|
|
|
(amd64bsd_dr_set): Use get_ptrace_pid.
|
|
|
|
|
* i386bsd-nat.c (i386bsd_fetch_inferior_registers): Use get_ptrace_pid.
|
|
|
|
|
(i386bsd_store_inferior_registers): Use get_ptrace_pid.
|
|
|
|
|
(i386bsd_dr_get): Use get_ptrace_pid.
|
|
|
|
|
(i386bsd_dr_set): Use get_ptrace_pid.
|
|
|
|
|
* inf-ptrace.c (get_ptrace_pid): Export.
|
|
|
|
|
* inf-ptrace.h (get_ptrace_pid): Declare.
|
|
|
|
|
* ppcfbsd-nat.c (ppcfbsd_fetch_inferior_registers): Use lwp id.
|
|
|
|
|
(ppcfbsd_store_inferior_registers): Use lwp id.
|
|
|
|
|
|
2015-12-14 06:49:52 +01:00
|
|
|
|
2016-01-19 John Baldwin <jhb@FreeBSD.org>
|
|
|
|
|
|
|
|
|
|
* fbsd_tdep.c (fbsd_core_pid_to_str): New function.
|
|
|
|
|
(fbsd_core_thread_name): New function.
|
|
|
|
|
(fbsd_init_abi): Add "core_pid_to_str" gdbarch method.
|
|
|
|
|
Add "core_thread_name" gdbarch method.
|
|
|
|
|
|
2016-01-18 18:49:23 +01:00
|
|
|
|
2016-01-19 John Baldwin <jhb@FreeBSD.org>
|
|
|
|
|
|
|
|
|
|
* corelow.c (core_thread_name): New function.
|
|
|
|
|
(init_core_ops): Use "core_thread_name" for the "to_thread_name"
|
|
|
|
|
target op.
|
|
|
|
|
* gdbarch.sh (core_thread_name): New gdbarch callback.
|
|
|
|
|
* gdbarch.h: Re-generate.
|
|
|
|
|
* gdbarch.c: Re-generate.
|
|
|
|
|
|
Fix enum flag with Python 3
Using Python 3.5 (I assume it's the same with 3.4 and lower, but I didn't
test), I see this:
print (enum flag_enum) (FLAG_1)^M
Python Exception <class 'TypeError'> %x format: an integer is required, not gdb.Value: ^M
$7 = ^M
(gdb) FAIL: gdb.python/py-pp-maint.exp: print FLAG_1
Apparently, this idiom, where v is a gdb.Value, was possible with Python 2,
but not with Python 3:
'%x' % v
In Python 2, it would automatically get converted to an integer. To solve
it, I simply added wrapped v in a call to int().
'%x' % int(v)
In Python 2, the int type is implemented with a "long" in C, so on x86-32 it's
32-bits. I was worried that doing int(v) would truncate the value and give
wrong results for enum values > 32-bits. However, the int type != the int
function. The int function does the right thing, selecting the right integer
type for the given value. I tested with large enum values on x86-32 and
Python 2, and everything works as expected.
gdb/ChangeLog:
* python/lib/gdb/printing.py (_EnumInstance.to_string): Explicitly
convert gdb.Value to integer type using int().
2016-01-19 17:07:07 +01:00
|
|
|
|
2016-01-19 Simon Marchi <simon.marchi@polymtl.ca>
|
|
|
|
|
|
|
|
|
|
* python/lib/gdb/printing.py (_EnumInstance.to_string): Explicitly
|
|
|
|
|
convert gdb.Value to integer type using int().
|
|
|
|
|
|
2016-01-18 20:59:45 +01:00
|
|
|
|
2016-01-19 John Baldwin <jhb@FreeBSD.org>
|
|
|
|
|
|
|
|
|
|
* configure.ac: Include <sys/types.h when checking for "r_fs" in
|
|
|
|
|
"struct reg".
|
|
|
|
|
* configure: Regenerate.
|
|
|
|
|
|
2016-01-20 14:03:40 +01:00
|
|
|
|
2016-01-19 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* ax-gdb.c (agent_command_1): Adjust call to decode_line_full.
|
|
|
|
|
* break-catch-throw.c (re_set_exception_catchpoint): Pass the
|
|
|
|
|
current program space down to linespec decoding and breakpoint
|
|
|
|
|
location updating.
|
|
|
|
|
* breakpoint.c (parse_breakpoint_sals): Adjust calls to
|
|
|
|
|
decode_line_full.
|
|
|
|
|
(until_break_command): Adjust calls to decode_line_1.
|
|
|
|
|
(base_breakpoint_decode_location, bkpt_decode_location): Add
|
|
|
|
|
'search_pspace' parameter. Pass it along.
|
|
|
|
|
(bkpt_probe_create_sals_from_location): Adjust calls to
|
|
|
|
|
parse_probes.
|
|
|
|
|
(tracepoint_decode_location, tracepoint_probe_decode_location)
|
|
|
|
|
(strace_marker_decode_location): Add 'search_pspace' parameter.
|
|
|
|
|
Pass it along.
|
|
|
|
|
(all_locations_are_pending): Rewrite to take a breakpoint and
|
|
|
|
|
program space as arguments instead.
|
|
|
|
|
(hoist_existing_locations): New function.
|
|
|
|
|
(update_breakpoint_locations): Add 'filter_pspace' parameter. Use
|
|
|
|
|
hoist_existing_locations instead of always removing all locations,
|
|
|
|
|
and adjust to all_locations_are_pending change.
|
|
|
|
|
(location_to_sals): Add 'search_pspace' parameter. Pass it along.
|
|
|
|
|
Don't disable the breakpoint if there are other locations in
|
|
|
|
|
another program space.
|
|
|
|
|
(breakpoint_re_set_default): Adjust to pass down the current
|
|
|
|
|
program space as filter program space.
|
|
|
|
|
(decode_location_default): Add 'search_pspace' parameter and pass
|
|
|
|
|
it along.
|
|
|
|
|
(prepare_re_set_context): Don't switch program space here.
|
|
|
|
|
(breakpoint_re_set): Use save_current_space_and_thread instead of
|
|
|
|
|
save_current_program_space.
|
|
|
|
|
* breakpoint.h (struct breakpoint_ops) <decode_location>: Add
|
|
|
|
|
'search_pspace' parameter.
|
|
|
|
|
(update_breakpoint_locations): Add 'filter_pspace' parameter.
|
|
|
|
|
* cli/cli-cmds.c (edit_command, list_command): Adjust calls to
|
|
|
|
|
decode_line_1.
|
|
|
|
|
* elfread.c (elf_gnu_ifunc_resolver_return_stop): Pass the current
|
|
|
|
|
program space as filter program space.
|
|
|
|
|
* linespec.c (struct linespec_state) <search_pspace>: New field.
|
|
|
|
|
(create_sals_line_offset, convert_explicit_location_to_sals)
|
|
|
|
|
(parse_linespec): Pass the search program space down.
|
|
|
|
|
(linespec_state_constructor): Add 'search_pspace' parameter.
|
|
|
|
|
Store it.
|
|
|
|
|
(linespec_parser_new): Add 'search_pspace' parameter and pass it
|
|
|
|
|
along.
|
|
|
|
|
(linespec_lex_to_end): Adjust.
|
|
|
|
|
(decode_line_full, decode_line_1): Add 'search_pspace' parameter
|
|
|
|
|
and pass it along.
|
|
|
|
|
(decode_line_with_last_displayed): Adjust.
|
|
|
|
|
(collect_symtabs_from_filename, symtabs_from_filename): New
|
|
|
|
|
'search_pspace' parameter. Use it.
|
|
|
|
|
(find_function_symbols): Pass the search program space down.
|
|
|
|
|
* linespec.h (decode_line_1, decode_line_full): Add
|
|
|
|
|
'search_pspace' parameter.
|
|
|
|
|
* probe.c (parse_probes_in_pspace): New function, factored out
|
|
|
|
|
from ...
|
|
|
|
|
(parse_probes): ... this. Add 'search_pspace' parameter and use
|
|
|
|
|
it.
|
|
|
|
|
* probe.h (parse_probes): Add pspace' parameter.
|
|
|
|
|
* python/python.c (gdbpy_decode_line): Adjust.
|
|
|
|
|
* tracepoint.c (scope_info): Adjust.
|
|
|
|
|
|
MIPS: Remove remnants of 48-bit microMIPS instruction support
The POOL48A major opcode was defined in early revisions of the 64-bit
microMIPS ISA, has never been implemented, and was removed before the
64-bit microMIPS ISA specification[1] has been finalized.
This complements commit a6c7053929dd ("MIPS/opcodes: Remove microMIPS
48-bit LI instruction").
References:
[1] "MIPS Architecture for Programmers, Volume II-B: The microMIPS64
Instruction Set", MIPS Technologies, Inc., Document Number: MD00594,
Revision 3.06, October 17, 2012, Table 6.2 "microMIPS64 Encoding of
Major Opcode Field", p. 578
gas/
* config/tc-mips.c (micromips_insn_length): Remove the mention
of 48-bit microMIPS instructions.
gdb/
* mips-tdep.c (mips_insn_size): Remove 48-bit microMIPS
instruction support.
(micromips_next_pc): Likewise.
(micromips_scan_prologue): Likewise.
(micromips_deal_with_atomic_sequence): Likewise.
(micromips_stack_frame_destroyed_p): Likewise.
(mips_breakpoint_from_pc): Likewise.
opcodes/
* mips-dis.c (print_insn_micromips): Remove 48-bit microMIPS
instruction support.
2016-01-18 22:29:37 +01:00
|
|
|
|
2016-01-18 Maciej W. Rozycki <macro@imgtec.com>
|
|
|
|
|
|
|
|
|
|
* mips-tdep.c (mips_insn_size): Remove 48-bit microMIPS
|
|
|
|
|
instruction support.
|
|
|
|
|
(micromips_next_pc): Likewise.
|
|
|
|
|
(micromips_scan_prologue): Likewise.
|
|
|
|
|
(micromips_deal_with_atomic_sequence): Likewise.
|
|
|
|
|
(micromips_stack_frame_destroyed_p): Likewise.
|
|
|
|
|
(mips_breakpoint_from_pc): Likewise.
|
|
|
|
|
|
2016-01-18 21:24:34 +01:00
|
|
|
|
2016-01-18 Maciej W. Rozycki <macro@imgtec.com>
|
|
|
|
|
|
|
|
|
|
* mips-tdep.c (micromips_insn_at_pc_has_delay_slot): Pass
|
|
|
|
|
unshifted 16-bit microMIPS instruction word to `mips_insn_size'.
|
|
|
|
|
|
Fix PR threads/19422 - show which thread caused stop
This commit changes GDB like this:
- Program received signal SIGINT, Interrupt.
+ Thread 1 "main" received signal SIGINT, Interrupt.
- Breakpoint 1 at 0x40087a: file threads.c, line 87.
+ Thread 3 "bar" hit Breakpoint 1 at 0x40087a: file threads.c, line 87.
... once the program goes multi-threaded. Until GDB sees a second
thread spawn, the output is still the same as before, per the
discussion back in 2012:
https://www.sourceware.org/ml/gdb/2012-11/msg00010.html
This helps non-stop mode, where you can't easily tell which thread hit
a breakpoint or received a signal:
(gdb) info threads
Id Target Id Frame
* 1 Thread 0x7ffff7fc1740 (LWP 19362) "main" (running)
2 Thread 0x7ffff7fc0700 (LWP 19366) "foo" (running)
3 Thread 0x7ffff77bf700 (LWP 19367) "bar" (running)
(gdb)
Program received signal SIGUSR1, User defined signal 1.
0x0000003616a09237 in pthread_join (threadid=140737353877248, thread_return=0x7fffffffd5b8) at pthread_join.c:92
92 lll_wait_tid (pd->tid);
(gdb) b threads.c:87
Breakpoint 1 at 0x40087a: file threads.c, line 87.
(gdb)
Breakpoint 1, thread_function1 (arg=0x1) at threads.c:87
87 usleep (1); /* Loop increment. */
The best the user can do is run "info threads" and try to figure
things out.
It actually also affects all-stop mode, in case of "handle SIG print
nostop":
...
Program received signal SIGUSR1, User defined signal 1.
Program received signal SIGUSR1, User defined signal 1.
Program received signal SIGUSR1, User defined signal 1.
Program received signal SIGUSR1, User defined signal 1.
...
The above doesn't give any clue that these were different threads
getting the SIGUSR1 signal.
I initially thought of lowercasing "breakpoint" in
"Thread 3 hit Breakpoint 1"
but then after trying it I realized that leaving "Breakpoint"
uppercase helps the eye quickly find the relevant information. It's
also easier to implement not showing anything about threads until the
program goes multi-threaded this way.
Here's a larger example session in non-stop mode:
(gdb) c -a&
Continuing.
(gdb) interrupt -a
(gdb)
Thread 1 "main" stopped.
0x0000003616a09237 in pthread_join (threadid=140737353877248, thread_return=0x7fffffffd5b8) at pthread_join.c:92
92 lll_wait_tid (pd->tid);
Thread 2 "foo" stopped.
0x0000003615ebc6ed in nanosleep () at ../sysdeps/unix/syscall-template.S:81
81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
Thread 3 "bar" stopped.
0x0000003615ebc6ed in nanosleep () at ../sysdeps/unix/syscall-template.S:81
81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
b threads.c:87
Breakpoint 4 at 0x40087a: file threads.c, line 87.
(gdb) b threads.c:67
Breakpoint 5 at 0x400811: file threads.c, line 67.
(gdb) c -a&
Continuing.
(gdb)
Thread 3 "bar" hit Breakpoint 4, thread_function1 (arg=0x1) at threads.c:87
87 usleep (1); /* Loop increment. */
Thread 2 "foo" hit Breakpoint 5, thread_function0 (arg=0x0) at threads.c:68
68 (*myp) ++;
info threads
Id Target Id Frame
* 1 Thread 0x7ffff7fc1740 (LWP 31957) "main" (running)
2 Thread 0x7ffff7fc0700 (LWP 31961) "foo" thread_function0 (arg=0x0) at threads.c:68
3 Thread 0x7ffff77bf700 (LWP 31962) "bar" thread_function1 (arg=0x1) at threads.c:87
(gdb) shell kill -SIGINT 31957
(gdb)
Thread 1 "main" received signal SIGINT, Interrupt.
0x0000003616a09237 in pthread_join (threadid=140737353877248, thread_return=0x7fffffffd5b8) at pthread_join.c:92
92 lll_wait_tid (pd->tid);
info threads
Id Target Id Frame
* 1 Thread 0x7ffff7fc1740 (LWP 31957) "main" 0x0000003616a09237 in pthread_join (threadid=140737353877248, thread_return=0x7fffffffd5b8) at pthread_join.c:92
2 Thread 0x7ffff7fc0700 (LWP 31961) "foo" thread_function0 (arg=0x0) at threads.c:68
3 Thread 0x7ffff77bf700 (LWP 31962) "bar" thread_function1 (arg=0x1) at threads.c:87
(gdb) t 2
[Switching to thread 2, Thread 0x7ffff7fc0700 (LWP 31961)]
#0 thread_function0 (arg=0x0) at threads.c:68
68 (*myp) ++;
(gdb) catch syscall
Catchpoint 6 (any syscall)
(gdb) c&
Continuing.
(gdb)
Thread 2 "foo" hit Catchpoint 6 (call to syscall nanosleep), 0x0000003615ebc6ed in nanosleep () at ../sysdeps/unix/syscall-template.S:81
81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
I'll work on documentation next if this looks agreeable.
This patch applies on top of the star wildcards thread IDs series:
https://sourceware.org/ml/gdb-patches/2016-01/msg00291.html
For convenience, I've pushed this to the
users/palves/show-which-thread-caused-stop branch.
gdb/doc/ChangeLog:
2016-01-18 Pedro Alves <palves@redhat.com>
* gdb.texinfo (Threads): Mention that GDB displays the ID and name
of the thread that hit a breakpoint or received a signal.
gdb/ChangeLog:
2016-01-18 Pedro Alves <palves@redhat.com>
* NEWS: Mention that GDB now displays the ID and name of the
thread that hit a breakpoint or received a signal.
* break-catch-sig.c (signal_catchpoint_print_it): Use
maybe_print_thread_hit_breakpoint.
* break-catch-syscall.c (print_it_catch_syscall): Likewise.
* break-catch-throw.c (print_it_exception_catchpoint): Likewise.
* breakpoint.c (maybe_print_thread_hit_breakpoint): New function.
(print_it_catch_fork, print_it_catch_vfork, print_it_catch_solib)
(print_it_catch_exec, print_it_ranged_breakpoint)
(print_it_watchpoint, print_it_masked_watchpoint, bkpt_print_it):
Use maybe_print_thread_hit_breakpoint.
* breakpoint.h (maybe_print_thread_hit_breakpoint): Declare.
* gdbthread.h (show_thread_that_caused_stop): Declare.
* infrun.c (print_signal_received_reason): Print which thread
received signal.
* thread.c (show_thread_that_caused_stop): New function.
gdb/testsuite/ChangeLog:
2016-01-18 Pedro Alves <palves@redhat.com>
* gdb.base/async-shell.exp: Adjust expected output.
* gdb.base/dprintf-non-stop.exp: Adjust expected output.
* gdb.base/siginfo-thread.exp: Adjust expected output.
* gdb.base/watchpoint-hw-hit-once.exp: Adjust expected output.
* gdb.java/jnpe.exp: Adjust expected output.
* gdb.threads/clone-new-thread-event.exp: Adjust expected output.
* gdb.threads/continue-pending-status.exp: Adjust expected output.
* gdb.threads/leader-exit.exp: Adjust expected output.
* gdb.threads/manythreads.exp: Adjust expected output.
* gdb.threads/pthreads.exp: Adjust expected output.
* gdb.threads/schedlock.exp: Adjust expected output.
* gdb.threads/siginfo-threads.exp: Adjust expected output.
* gdb.threads/signal-command-multiple-signals-pending.exp: Adjust
expected output.
* gdb.threads/signal-delivered-right-thread.exp: Adjust expected
output.
* gdb.threads/sigthread.exp: Adjust expected output.
* gdb.threads/watchpoint-fork.exp: Adjust expected output.
2016-01-18 16:15:18 +01:00
|
|
|
|
2016-01-18 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* NEWS: Mention that GDB now displays the ID and name of the
|
|
|
|
|
thread that hit a breakpoint or received a signal.
|
|
|
|
|
* break-catch-sig.c (signal_catchpoint_print_it): Use
|
|
|
|
|
maybe_print_thread_hit_breakpoint.
|
|
|
|
|
* break-catch-syscall.c (print_it_catch_syscall): Likewise.
|
|
|
|
|
* break-catch-throw.c (print_it_exception_catchpoint): Likewise.
|
|
|
|
|
* breakpoint.c (maybe_print_thread_hit_breakpoint): New function.
|
|
|
|
|
(print_it_catch_fork, print_it_catch_vfork, print_it_catch_solib)
|
|
|
|
|
(print_it_catch_exec, print_it_ranged_breakpoint)
|
|
|
|
|
(print_it_watchpoint, print_it_masked_watchpoint, bkpt_print_it):
|
|
|
|
|
Use maybe_print_thread_hit_breakpoint.
|
|
|
|
|
* breakpoint.h (maybe_print_thread_hit_breakpoint): Declare.
|
|
|
|
|
* gdbthread.h (show_thread_that_caused_stop): Declare.
|
|
|
|
|
* infrun.c (print_signal_received_reason): Print which thread
|
|
|
|
|
received signal.
|
|
|
|
|
* thread.c (show_thread_that_caused_stop): New function.
|
|
|
|
|
|
2016-01-18 10:45:10 +01:00
|
|
|
|
2016-01-18 Gary Benson <gbenson@redhat.com>
|
|
|
|
|
|
|
|
|
|
* nat/linux-namespaces.c (do_fork): New function.
|
|
|
|
|
(linux_mntns_get_helper): Use the above.
|
|
|
|
|
|
2016-01-06 07:10:39 +01:00
|
|
|
|
2016-01-17 Jonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de> (tiny change)
|
|
|
|
|
|
|
|
|
|
Pushed by Joel Brobecker <brobecker@adacore.com>.
|
|
|
|
|
PR gdb/19208
|
|
|
|
|
* dwarf2read.c (read_partial_die): Do not call set_objfile_main_name
|
|
|
|
|
if the function has no name.
|
|
|
|
|
|
2016-01-15 23:45:19 +01:00
|
|
|
|
2016-01-15 Sandra Loosemore <sandra@codesourcery.com>
|
|
|
|
|
|
|
|
|
|
* charset.c [PHONY_ICONV] (GDB_DEFAULT_HOST_CHARSET):
|
|
|
|
|
Conditionalize for Windows host.
|
|
|
|
|
(GDB_DEFAULT_TARGET_CHARSET): Match GDB_DEFAULT_HOST_CHARSET.
|
|
|
|
|
(GDB_DEFAULT_TARGET_WIDE_CHARSET): Use UTF-32.
|
|
|
|
|
(phony_iconv_open): Handle both UTF-32 endiannesses.
|
|
|
|
|
(phony_iconv): Likewise. Check for output overflow and clean up
|
|
|
|
|
out-of-input cases. Correct adjustment to input buffer pointer.
|
|
|
|
|
(set_be_le_names) [PHONY_ICONV]: Use hard-wired names to match
|
|
|
|
|
phony_iconv_open.
|
|
|
|
|
|
2016-01-15 22:46:23 +01:00
|
|
|
|
2016-01-15 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* NEWS: Mention star wildcard ranges.
|
|
|
|
|
* cli/cli-utils.c (get_number_or_range): Check state->in_range first.
|
|
|
|
|
(number_range_setup_range): New function.
|
|
|
|
|
* cli/cli-utils.h (number_range_setup_range): New declaration.
|
|
|
|
|
* thread.c (thread_apply_command): Support star TID ranges.
|
|
|
|
|
* tid-parse.c (tid_range_parser_finished)
|
|
|
|
|
(tid_range_parser_string, tid_range_parser_skip)
|
|
|
|
|
(get_tid_or_range, get_tid_or_range): Handle
|
|
|
|
|
TID_RANGE_STATE_STAR_RANGE.
|
|
|
|
|
(tid_range_parser_star_range): New function.
|
|
|
|
|
* tid-parse.h (enum tid_range_state) <TID_RANGE_STATE_STAR_RANGE>:
|
|
|
|
|
New value.
|
|
|
|
|
(tid_range_parser_star_range): New declaration.
|
|
|
|
|
|
2016-01-15 22:46:22 +01:00
|
|
|
|
2016-01-15 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* thread.c (thread_apply_command): Use the tid range parser to
|
|
|
|
|
advance past the thread ID list.
|
|
|
|
|
* tid-parse.c (get_positive_number_trailer): New function.
|
|
|
|
|
(parse_thread_id): Use it.
|
|
|
|
|
(get_tid_or_range): Use it. Return 0 instead of throwing invalid
|
|
|
|
|
thread ID error.
|
|
|
|
|
(get_tid_or_range): Detect negative values. Return 0 instead of
|
|
|
|
|
throwing invalid thread ID error.
|
|
|
|
|
|
2016-01-14 15:54:24 +01:00
|
|
|
|
2016-01-14 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arm-linux-tdep.c (arm_linux_get_next_pcs_syscall_next_pc):
|
|
|
|
|
Declare.
|
|
|
|
|
(arm_linux_get_next_pcs_ops): Install
|
|
|
|
|
arm_linux_get_next_pcs_syscall_next_pc.
|
|
|
|
|
(arm_linux_syscall_next_pc): Change to ...
|
|
|
|
|
(arm_linux_get_next_pcs_syscall_next_pc): ... it.
|
|
|
|
|
(arm_linux_init_abi): Don't set tdep->syscall_next_pc.
|
|
|
|
|
* arm-tdep.c (arm_get_next_pcs_syscall_next_pc): Declare.
|
|
|
|
|
(arm_get_next_pcs_syscall_next_pc): Make it static. Don't
|
|
|
|
|
call tdep->syscall_next_pc.
|
|
|
|
|
* arm-tdep.h (struct gdbarch_tdep) <syscall_next_pc>: Remove.
|
|
|
|
|
(arm_get_next_pcs_syscall_next_pc): Remove.
|
|
|
|
|
|
2016-01-14 13:28:02 +01:00
|
|
|
|
2016-01-14 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* remote.c (remote_set_syscall_catchpoint): Cast to char *.
|
|
|
|
|
* thread.c (do_captured_thread_select): Cast to const char *.
|
|
|
|
|
|
[ARM] Make thumb2_breakpoint static again
This patch makes thumb2_breakpoint static. When writing this patch,
I find the only reason we keep thumb2_breakpoint extern is that it
is used as an argument passed to arm_gdbserver_get_next_pcs. However,
field arm_thumb2_breakpoint is only used in a null check in
thumb_get_next_pcs_raw, so I wonder why do need to pass thumb2_breakpoint
to arm_gdbserver_get_next_pcs.
thumb2_breakpoint was added by Daniel Jacobowitz in order to support
single-step IT block
https://sourceware.org/ml/gdb-patches/2010-01/msg00624.html the logic
there was if we have 32-bit thumb-2 breakpoint defined, we can safely
single-step IT block, otherwise, we can't. Daniel didn't want to use
16-bit thumb BKPT instruction, because it triggers even on instruction
which should be executed. Secondly, using 16-bit thumb illegal
instruction on top of 32-bit thumb instruction may break the meaning of
original IT blocks, because the other 16-bit can be regarded as an
instruction. See more explanations from Daniel's kernel patch
http://www.spinics.net/lists/arm-kernel/msg80476.html
Let us back to this patch, GDB/GDBserver can safely single step
IT block if thumb2_breakpoint is defined, but the single step logic
doesn't have to know the thumb-2 breakpoint instruction. Only
breakpoint insertion mechanism decides to use which breakpoint
instruction. In the software single step code, instead of pass
thumb2_breakpoint, we can pass a boolean variable
has_thumb2_breakpoint indicate whether the target has thumb-2
breakpoint defined, which is equivalent to the original code.
Regression tested on arm-linux. No regression.
gdb:
2016-01-14 Yao Qi <yao.qi@linaro.org>
* arch/arm-get-next-pcs.c (arm_get_next_pcs_ctor): Change
argument arm_thumb2_breakpoint to has_thumb2_breakpoint.
(thumb_get_next_pcs_raw): Check has_thumb2_breakpoint
instead.
* arch/arm-get-next-pcs.h (struct arm_get_next_pcs)
<arm_thumb2_breakpoint>: Remove.
<has_thumb2_breakpoint>: New field.
(arm_get_next_pcs_ctor): Update declaration.
* arm-linux-tdep.c (arm_linux_software_single_step): Pass
1 to arm_get_next_pcs_ctor.
* arm-tdep.c (arm_software_single_step): Pass 0 to
arm_get_next_pcs_ctor.
gdb/gdbserver:
2016-01-14 Yao Qi <yao.qi@linaro.org>
* linux-aarch32-low.c (thumb2_breakpoint): Make it static.
* linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
* linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
arm_get_next_pcs_ctor.
2016-01-14 10:36:43 +01:00
|
|
|
|
2016-01-14 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arch/arm-get-next-pcs.c (arm_get_next_pcs_ctor): Change
|
|
|
|
|
argument arm_thumb2_breakpoint to has_thumb2_breakpoint.
|
|
|
|
|
(thumb_get_next_pcs_raw): Check has_thumb2_breakpoint
|
|
|
|
|
instead.
|
|
|
|
|
* arch/arm-get-next-pcs.h (struct arm_get_next_pcs)
|
|
|
|
|
<arm_thumb2_breakpoint>: Remove.
|
|
|
|
|
<has_thumb2_breakpoint>: New field.
|
|
|
|
|
(arm_get_next_pcs_ctor): Update declaration.
|
|
|
|
|
* arm-linux-tdep.c (arm_linux_software_single_step): Pass
|
|
|
|
|
1 to arm_get_next_pcs_ctor.
|
|
|
|
|
* arm-tdep.c (arm_software_single_step): Pass 0 to
|
|
|
|
|
arm_get_next_pcs_ctor.
|
|
|
|
|
|
2016-01-13 18:57:59 +01:00
|
|
|
|
2016-01-13 Ulrich Weigand <uweigand@de.ibm.com>
|
|
|
|
|
|
|
|
|
|
* MAINTAINERS: Add Andreas Arnez as s390 target maintainer.
|
|
|
|
|
|
2016-01-13 17:15:31 +01:00
|
|
|
|
2016-01-13 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arch/arm-get-next-pcs.c (arm_get_next_pcs_raw): Use
|
|
|
|
|
byte_order_for_code to read instruction.
|
|
|
|
|
|
2016-01-13 11:56:10 +01:00
|
|
|
|
2016-01-13 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* NEWS: Mention $_gthread.
|
|
|
|
|
* gdbthread.h (struct thread_info) <global_num>: Mention
|
|
|
|
|
$_gthread.
|
|
|
|
|
* thread.c (thread_num_make_value_helper): New function.
|
|
|
|
|
(thread_id_make_value): Delete.
|
|
|
|
|
(thread_id_per_inf_num_make_value, global_thread_id_make_value):
|
|
|
|
|
New.
|
|
|
|
|
(thread_funcs): Adjust.
|
|
|
|
|
(gthread_funcs): New.
|
|
|
|
|
(_initialize_thread): Register $_gthread variable.
|
|
|
|
|
|
2016-01-13 11:56:09 +01:00
|
|
|
|
2016-01-13 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* NEWS: Mention "info threads -gid".
|
|
|
|
|
* gdbthread.h (struct thread_info) <global_num>: Mention "info
|
|
|
|
|
threads -gid".
|
|
|
|
|
* thread.c (info_threads_command): Handle "-gid".
|
|
|
|
|
(_initialize_thread): Adjust "info threads" help string to mention
|
|
|
|
|
-gid.
|
|
|
|
|
|
2016-01-13 11:56:08 +01:00
|
|
|
|
2016-01-13 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* NEWS: Mention InferiorThread.global_num.
|
|
|
|
|
* python/py-infthread.c (thpy_get_global_num): New function.
|
|
|
|
|
(thread_object_getset): Register "global_num".
|
|
|
|
|
|
Per-inferior/Inferior-qualified thread IDs
This commit changes GDB to track thread numbers per-inferior. Then,
if you're debugging multiple inferiors, GDB displays
"inferior-num.thread-num" instead of just "thread-num" whenever it
needs to display a thread:
(gdb) info inferiors
Num Description Executable
1 process 6022 /home/pedro/gdb/tests/threads
* 2 process 6037 /home/pedro/gdb/tests/threads
(gdb) info threads
Id Target Id Frame
1.1 Thread 0x7ffff7fc2740 (LWP 6022) "threads" (running)
1.2 Thread 0x7ffff77c0700 (LWP 6028) "threads" (running)
1.3 Thread 0x7ffff7fc2740 (LWP 6032) "threads" (running)
2.1 Thread 0x7ffff7fc1700 (LWP 6037) "threads" (running)
2.2 Thread 0x7ffff77c0700 (LWP 6038) "threads" (running)
* 2.3 Thread 0x7ffff7fc2740 (LWP 6039) "threads" (running)
(gdb)
...
(gdb) thread 1.1
[Switching to thread 1.1 (Thread 0x7ffff7fc2740 (LWP 8155))]
(gdb)
...
etc.
You can still use "thread NUM", in which case GDB infers you're
referring to thread NUM of the current inferior.
The $_thread convenience var and Python's InferiorThread.num attribute
are remapped to the new per-inferior thread number. It's a backward
compatibility break, but since it only matters when debugging multiple
inferiors, I think it's worth doing.
Because MI thread IDs need to be a single integer, we keep giving
threads a global identifier, _in addition_ to the per-inferior number,
and make MI always refer to the global thread IDs. IOW, nothing
changes from a MI frontend's perspective.
Similarly, since Python's Breakpoint.thread and Guile's
breakpoint-thread/set-breakpoint-thread breakpoint methods need to
work with integers, those are adjusted to work with global thread IDs
too. Follow up patches will provide convenient means to access
threads' global IDs.
To avoid potencially confusing users (which also avoids updating much
of the testsuite), if there's only one inferior and its ID is "1",
IOW, the user hasn't done anything multi-process/inferior related,
then the "INF." part of thread IDs is not shown. E.g,.:
(gdb) info inferiors
Num Description Executable
* 1 process 15275 /home/pedro/gdb/tests/threads
(gdb) info threads
Id Target Id Frame
* 1 Thread 0x7ffff7fc1740 (LWP 15275) "threads" main () at threads.c:40
(gdb) add-inferior
Added inferior 2
(gdb) info threads
Id Target Id Frame
* 1.1 Thread 0x7ffff7fc1740 (LWP 15275) "threads" main () at threads.c:40
(gdb)
No regressions on x86_64 Fedora 20.
gdb/ChangeLog:
2016-01-13 Pedro Alves <palves@redhat.com>
* NEWS: Mention that thread IDs are now per inferior and global
thread IDs.
* Makefile.in (SFILES): Add tid-parse.c.
(COMMON_OBS): Add tid-parse.o.
(HFILES_NO_SRCDIR): Add tid-parse.h.
* ada-tasks.c: Adjust to use ptid_to_global_thread_id.
* breakpoint.c (insert_breakpoint_locations)
(remove_threaded_breakpoints, bpstat_check_breakpoint_conditions)
(print_one_breakpoint_location, set_longjmp_breakpoint)
(check_longjmp_breakpoint_for_call_dummy)
(set_momentary_breakpoint): Adjust to use global IDs.
(find_condition_and_thread, watch_command_1): Use parse_thread_id.
(until_break_command, longjmp_bkpt_dtor)
(breakpoint_re_set_thread, insert_single_step_breakpoint): Adjust
to use global IDs.
* dummy-frame.c (pop_dummy_frame_bpt): Adjust to use
ptid_to_global_thread_id.
* elfread.c (elf_gnu_ifunc_resolver_stop): Likewise.
* gdbthread.h (struct thread_info): Rename field 'num' to
'global_num. Add new fields 'per_inf_num' and 'inf'.
(thread_id_to_pid): Rename thread_id_to_pid to
global_thread_id_to_ptid.
(pid_to_thread_id): Rename to ...
(ptid_to_global_thread_id): ... this.
(valid_thread_id): Rename to ...
(valid_global_thread_id): ... this.
(find_thread_id): Rename to ...
(find_thread_global_id): ... this.
(ALL_THREADS, ALL_THREADS_BY_INFERIOR): Declare.
(print_thread_info): Add comment.
* tid-parse.h: New file.
* tid-parse.c: New file.
* infcmd.c (step_command_fsm_prepare)
(step_command_fsm_should_stop): Adjust to use the global thread
ID.
(until_next_command, until_next_command)
(finish_command_fsm_should_stop): Adjust to use the global thread
ID.
(attach_post_wait): Adjust to check the inferior number too.
* inferior.h (struct inferior) <highest_thread_num>: New field.
* infrun.c (handle_signal_stop)
(insert_exception_resume_breakpoint)
(insert_exception_resume_from_probe): Adjust to use the global
thread ID.
* record-btrace.c (record_btrace_open): Use global thread IDs.
* remote.c (process_initial_stop_replies): Also consider the
inferior number.
* target.c (target_pre_inferior): Clear the inferior's highest
thread num.
* thread.c (clear_thread_inferior_resources): Adjust to use the
global thread ID.
(new_thread): New inferior parameter. Adjust to use it. Set both
the thread's global ID and the thread's per-inferior ID.
(add_thread_silent): Adjust.
(find_thread_global_id): New.
(find_thread_id): Make static. Adjust to rename.
(valid_thread_id): Rename to ...
(valid_global_thread_id): ... this.
(pid_to_thread_id): Rename to ...
(ptid_to_global_thread_id): ... this.
(thread_id_to_pid): Rename to ...
(global_thread_id_to_ptid): ... this. Adjust.
(first_thread_of_process): Adjust.
(do_captured_list_thread_ids): Adjust to use global thread IDs.
(should_print_thread): New function.
(print_thread_info): Rename to ...
(print_thread_info_1): ... this, and add new show_global_ids
parameter. Handle it. Iterate over inferiors.
(print_thread_info): Reimplement as wrapper around
print_thread_info_1.
(show_inferior_qualified_tids): New function.
(print_thread_id): Use it.
(tp_array_compar): Compare inferior numbers too.
(thread_apply_command): Use tid_range_parser.
(do_captured_thread_select): Use parse_thread_id.
(thread_id_make_value): Adjust.
(_initialize_thread): Adjust "info threads" help string.
* varobj.c (struct varobj_root): Update comment.
(varobj_create): Adjust to use global thread IDs.
(value_of_root_1): Adjust to use global_thread_id_to_ptid.
* windows-tdep.c (display_tib): No longer accept an argument.
* cli/cli-utils.c (get_number_trailer): Make extern.
* cli/cli-utils.h (get_number_trailer): Declare.
(get_number_const): Adjust documentation.
* mi/mi-cmd-var.c (mi_cmd_var_update_iter): Adjust to use global
thread IDs.
* mi/mi-interp.c (mi_new_thread, mi_thread_exit)
(mi_on_normal_stop, mi_output_running_pid, mi_on_resume):
* mi/mi-main.c (mi_execute_command, mi_cmd_execute): Likewise.
* guile/scm-breakpoint.c (gdbscm_set_breakpoint_thread_x):
Likewise.
* python/py-breakpoint.c (bppy_set_thread): Likewise.
* python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
* python/py-infthread.c (thpy_get_num): Add comment and return the
per-inferior thread ID.
(thread_object_getset): Update comment of "num".
gdb/testsuite/ChangeLog:
2016-01-07 Pedro Alves <palves@redhat.com>
* gdb.base/break.exp: Adjust to output changes.
* gdb.base/hbreak2.exp: Likewise.
* gdb.base/sepdebug.exp: Likewise.
* gdb.base/watch_thread_num.exp: Likewise.
* gdb.linespec/keywords.exp: Likewise.
* gdb.multi/info-threads.exp: Likewise.
* gdb.threads/thread-find.exp: Likewise.
* gdb.multi/tids.c: New file.
* gdb.multi/tids.exp: New file.
gdb/doc/ChangeLog:
2016-01-07 Pedro Alves <palves@redhat.com>
* gdb.texinfo (Threads): Document per-inferior thread IDs,
qualified thread IDs, global thread IDs and thread ID lists.
(Set Watchpoints, Thread-Specific Breakpoints): Adjust to refer to
thread IDs.
(Convenience Vars): Document the $_thread convenience variable.
(Ada Tasks): Adjust to refer to thread IDs.
(GDB/MI Async Records, GDB/MI Thread Commands, GDB/MI Ada Tasking
Commands, GDB/MI Variable Objects): Update to mention global
thread IDs.
* guile.texi (Breakpoints In Guile)
<breakpoint-thread/set-breakpoint-thread breakpoint>: Mention
global thread IDs instead of thread IDs.
* python.texi (Threads In Python): Adjust documentation of
InferiorThread.num.
(Breakpoint.thread): Mention global thread IDs instead of thread
IDs.
2016-01-13 11:56:07 +01:00
|
|
|
|
2016-01-13 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* NEWS: Mention that thread IDs are now per inferior and global
|
|
|
|
|
thread IDs.
|
|
|
|
|
* Makefile.in (SFILES): Add tid-parse.c.
|
|
|
|
|
(COMMON_OBS): Add tid-parse.o.
|
|
|
|
|
(HFILES_NO_SRCDIR): Add tid-parse.h.
|
|
|
|
|
* ada-tasks.c: Adjust to use ptid_to_global_thread_id.
|
|
|
|
|
* breakpoint.c (insert_breakpoint_locations)
|
|
|
|
|
(remove_threaded_breakpoints, bpstat_check_breakpoint_conditions)
|
|
|
|
|
(print_one_breakpoint_location, set_longjmp_breakpoint)
|
|
|
|
|
(check_longjmp_breakpoint_for_call_dummy)
|
|
|
|
|
(set_momentary_breakpoint): Adjust to use global IDs.
|
|
|
|
|
(find_condition_and_thread, watch_command_1): Use parse_thread_id.
|
|
|
|
|
(until_break_command, longjmp_bkpt_dtor)
|
|
|
|
|
(breakpoint_re_set_thread, insert_single_step_breakpoint): Adjust
|
|
|
|
|
to use global IDs.
|
|
|
|
|
* dummy-frame.c (pop_dummy_frame_bpt): Adjust to use
|
|
|
|
|
ptid_to_global_thread_id.
|
|
|
|
|
* elfread.c (elf_gnu_ifunc_resolver_stop): Likewise.
|
|
|
|
|
* gdbthread.h (struct thread_info): Rename field 'num' to
|
|
|
|
|
'global_num. Add new fields 'per_inf_num' and 'inf'.
|
|
|
|
|
(thread_id_to_pid): Rename thread_id_to_pid to
|
|
|
|
|
global_thread_id_to_ptid.
|
|
|
|
|
(pid_to_thread_id): Rename to ...
|
|
|
|
|
(ptid_to_global_thread_id): ... this.
|
|
|
|
|
(valid_thread_id): Rename to ...
|
|
|
|
|
(valid_global_thread_id): ... this.
|
|
|
|
|
(find_thread_id): Rename to ...
|
|
|
|
|
(find_thread_global_id): ... this.
|
|
|
|
|
(ALL_THREADS, ALL_THREADS_BY_INFERIOR): Declare.
|
|
|
|
|
(print_thread_info): Add comment.
|
|
|
|
|
* tid-parse.h: New file.
|
|
|
|
|
* tid-parse.c: New file.
|
|
|
|
|
* infcmd.c (step_command_fsm_prepare)
|
|
|
|
|
(step_command_fsm_should_stop): Adjust to use the global thread
|
|
|
|
|
ID.
|
|
|
|
|
(until_next_command, until_next_command)
|
|
|
|
|
(finish_command_fsm_should_stop): Adjust to use the global thread
|
|
|
|
|
ID.
|
|
|
|
|
(attach_post_wait): Adjust to check the inferior number too.
|
|
|
|
|
* inferior.h (struct inferior) <highest_thread_num>: New field.
|
|
|
|
|
* infrun.c (handle_signal_stop)
|
|
|
|
|
(insert_exception_resume_breakpoint)
|
|
|
|
|
(insert_exception_resume_from_probe): Adjust to use the global
|
|
|
|
|
thread ID.
|
|
|
|
|
* record-btrace.c (record_btrace_open): Use global thread IDs.
|
|
|
|
|
* remote.c (process_initial_stop_replies): Also consider the
|
|
|
|
|
inferior number.
|
|
|
|
|
* target.c (target_pre_inferior): Clear the inferior's highest
|
|
|
|
|
thread num.
|
|
|
|
|
* thread.c (clear_thread_inferior_resources): Adjust to use the
|
|
|
|
|
global thread ID.
|
|
|
|
|
(new_thread): New inferior parameter. Adjust to use it. Set both
|
|
|
|
|
the thread's global ID and the thread's per-inferior ID.
|
|
|
|
|
(add_thread_silent): Adjust.
|
|
|
|
|
(find_thread_global_id): New.
|
|
|
|
|
(find_thread_id): Make static. Adjust to rename.
|
|
|
|
|
(valid_thread_id): Rename to ...
|
|
|
|
|
(valid_global_thread_id): ... this.
|
|
|
|
|
(pid_to_thread_id): Rename to ...
|
|
|
|
|
(ptid_to_global_thread_id): ... this.
|
|
|
|
|
(thread_id_to_pid): Rename to ...
|
|
|
|
|
(global_thread_id_to_ptid): ... this. Adjust.
|
|
|
|
|
(first_thread_of_process): Adjust.
|
|
|
|
|
(do_captured_list_thread_ids): Adjust to use global thread IDs.
|
|
|
|
|
(should_print_thread): New function.
|
|
|
|
|
(print_thread_info): Rename to ...
|
|
|
|
|
(print_thread_info_1): ... this, and add new show_global_ids
|
|
|
|
|
parameter. Handle it. Iterate over inferiors.
|
|
|
|
|
(print_thread_info): Reimplement as wrapper around
|
|
|
|
|
print_thread_info_1.
|
|
|
|
|
(show_inferior_qualified_tids): New function.
|
|
|
|
|
(print_thread_id): Use it.
|
|
|
|
|
(tp_array_compar): Compare inferior numbers too.
|
|
|
|
|
(thread_apply_command): Use tid_range_parser.
|
|
|
|
|
(do_captured_thread_select): Use parse_thread_id.
|
|
|
|
|
(thread_id_make_value): Adjust.
|
|
|
|
|
(_initialize_thread): Adjust "info threads" help string.
|
|
|
|
|
* varobj.c (struct varobj_root): Update comment.
|
|
|
|
|
(varobj_create): Adjust to use global thread IDs.
|
|
|
|
|
(value_of_root_1): Adjust to use global_thread_id_to_ptid.
|
|
|
|
|
* windows-tdep.c (display_tib): No longer accept an argument.
|
|
|
|
|
* cli/cli-utils.c (get_number_trailer): Make extern.
|
|
|
|
|
* cli/cli-utils.h (get_number_trailer): Declare.
|
|
|
|
|
(get_number_const): Adjust documentation.
|
|
|
|
|
* mi/mi-cmd-var.c (mi_cmd_var_update_iter): Adjust to use global
|
|
|
|
|
thread IDs.
|
|
|
|
|
* mi/mi-interp.c (mi_new_thread, mi_thread_exit)
|
|
|
|
|
(mi_on_normal_stop, mi_output_running_pid, mi_on_resume):
|
|
|
|
|
* mi/mi-main.c (mi_execute_command, mi_cmd_execute): Likewise.
|
|
|
|
|
* guile/scm-breakpoint.c (gdbscm_set_breakpoint_thread_x):
|
|
|
|
|
Likewise.
|
|
|
|
|
* python/py-breakpoint.c (bppy_set_thread): Likewise.
|
|
|
|
|
* python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
|
|
|
|
|
* python/py-infthread.c (thpy_get_num): Add comment and return the
|
|
|
|
|
per-inferior thread ID.
|
|
|
|
|
(thread_object_getset): Update comment of "num".
|
|
|
|
|
|
Centralize thread ID printing
Add a new function to print a thread ID, in the style of paddress,
plongest, etc. and adjust all CLI-reachable paths to use it.
This gives us a single place to tweak to print inferior-qualified
thread IDs later:
- [Switching to thread 1 (Thread 0x7ffff7fc2740 (LWP 8155))]
+ [Switching to thread 1.1 (Thread 0x7ffff7fc2740 (LWP 8155))]
etc., though for now, this has no user-visible change.
No regressions on x86_64 Fedora 20.
gdb/ChangeLog:
2016-01-13 Pedro Alves <palves@redhat.com>
* breakpoint.c (remove_threaded_breakpoints)
(print_one_breakpoint_location): Use print_thread_id.
* btrace.c (btrace_enable, btrace_disable, btrace_teardown)
(btrace_fetch, btrace_clear): Use print_thread_id.
* common/print-utils.c (CELLSIZE): Delete.
(get_cell): Rename to ...
(get_print_cell): ... this and made extern. Adjust call callers.
Adjust to use PRINT_CELL_SIZE.
* common/print-utils.h (get_print_cell): Declare.
(PRINT_CELL_SIZE): New.
* gdbthread.h (print_thread_id): Declare.
* infcmd.c (signal_command): Use print_thread_id.
* inferior.c (print_inferior): Use print_thread_id.
* infrun.c (handle_signal_stop)
(insert_exception_resume_breakpoint)
(insert_exception_resume_from_probe)
(print_signal_received_reason): Use print_thread_id.
* record-btrace.c (record_btrace_info)
(record_btrace_resume_thread, record_btrace_cancel_resume)
(record_btrace_step_thread, record_btrace_wait): Use
print_thread_id.
* thread.c (thread_apply_all_command): Use print_thread_id.
(print_thread_id): New function.
(thread_apply_command): Use print_thread_id.
(thread_command, thread_find_command, do_captured_thread_select):
Use print_thread_id.
2016-01-13 11:56:06 +01:00
|
|
|
|
2016-01-13 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* breakpoint.c (remove_threaded_breakpoints)
|
|
|
|
|
(print_one_breakpoint_location): Use print_thread_id.
|
|
|
|
|
* btrace.c (btrace_enable, btrace_disable, btrace_teardown)
|
|
|
|
|
(btrace_fetch, btrace_clear): Use print_thread_id.
|
|
|
|
|
* common/print-utils.c (CELLSIZE): Delete.
|
|
|
|
|
(get_cell): Rename to ...
|
|
|
|
|
(get_print_cell): ... this and made extern. Adjust call callers.
|
|
|
|
|
Adjust to use PRINT_CELL_SIZE.
|
|
|
|
|
* common/print-utils.h (get_print_cell): Declare.
|
|
|
|
|
(PRINT_CELL_SIZE): New.
|
|
|
|
|
* gdbthread.h (print_thread_id): Declare.
|
|
|
|
|
* infcmd.c (signal_command): Use print_thread_id.
|
|
|
|
|
* inferior.c (print_inferior): Use print_thread_id.
|
|
|
|
|
* infrun.c (handle_signal_stop)
|
|
|
|
|
(insert_exception_resume_breakpoint)
|
|
|
|
|
(insert_exception_resume_from_probe)
|
|
|
|
|
(print_signal_received_reason): Use print_thread_id.
|
|
|
|
|
* record-btrace.c (record_btrace_info)
|
|
|
|
|
(record_btrace_resume_thread, record_btrace_cancel_resume)
|
|
|
|
|
(record_btrace_step_thread, record_btrace_wait): Use
|
|
|
|
|
print_thread_id.
|
|
|
|
|
* thread.c (thread_apply_all_command): Use print_thread_id.
|
|
|
|
|
(print_thread_id): New function.
|
|
|
|
|
(thread_apply_command): Use print_thread_id.
|
|
|
|
|
(thread_command, thread_find_command, do_captured_thread_select):
|
|
|
|
|
Use print_thread_id.
|
|
|
|
|
|
2016-01-13 11:56:06 +01:00
|
|
|
|
2016-01-13 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* NEWS: Mention InferiorThread.inferior.
|
|
|
|
|
* python/py-infthread.c (thpy_get_inferior): New.
|
|
|
|
|
(thread_object_getset): Register "inferior".
|
|
|
|
|
|
2016-01-13 11:56:05 +01:00
|
|
|
|
2016-01-13 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* NEWS: Mention $_inferior.
|
|
|
|
|
* inferior.c (inferior_id_make_value): New.
|
|
|
|
|
(inferior_funcs): New.
|
|
|
|
|
(_initialize_inferior): Create $_inferior variable.
|
|
|
|
|
|
Fix PR19388: Can't access $_siginfo in breakpoint (catch signal) condition
This commit merges both the registers and $_siginfo "thread
running/executing" checks into a single function.
Accessing $_siginfo from a "catch signal" breakpoint condition doesn't
work. The condition always fails with "Selected thread is running":
(gdb) catch signal
Catchpoint 3 (standard signals)
(gdb)
condition $bpnum $_siginfo.si_signo == 5
(gdb) continue
Continuing.
Error in testing breakpoint condition:
Selected thread is running.
Catchpoint 3 (signal SIGUSR1), 0x0000003615e35877 in __GI_raise (sig=10) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb)
When accessing the $_siginfo object, we check whether the thread is
marked running (external/public) state and refuse the access if so.
This is so "print $_siginfo" at the prompt fails nicelly when the
current thread is running. While evaluating breakpoint conditionals,
we haven't decided yet whether the thread is going to stop, so
is_running still returns true, and we thus always error out.
Evaluating an expression that requires registers access is really
conceptually the same -- we could think of $_siginfo as a pseudo
register. However, in that case we check whether the thread is marked
executing (internal/private state), not running (external/public
state). Changing the $_siginfo validation to check is_executing as
well fixes the bug in question.
Note that checking is_executing is not fully correct, not even for
registers. See PR 19389. However, I think this is the lesser of two
evils and ends up as an improvement. We at least now have a single
place to fix.
Tested on x86_64 GNU/Linux.
gdb/ChangeLog:
2016-01-13 Pedro Alves <palves@redhat.com>
PR breakpoints/19388
* frame.c (get_current_frame): Use validate_registers_access.
* gdbthread.h (validate_registers_access): Declare.
* infrun.c (validate_siginfo_access): Delete.
(siginfo_value_read, siginfo_value_write): Use
validate_registers_access.
* thread.c (validate_registers_access): New function.
gdb/testsuite/ChangeLog:
2016-01-13 Pedro Alves <palves@redhat.com>
PR breakpoints/19388
* gdb.base/catch-signal-siginfo-cond.c: New file.
* gdb.base/catch-signal-siginfo-cond.exp: New file.
2016-01-13 11:40:33 +01:00
|
|
|
|
2016-01-13 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
PR breakpoints/19388
|
|
|
|
|
* frame.c (get_current_frame): Use validate_registers_access.
|
|
|
|
|
* gdbthread.h (validate_registers_access): Declare.
|
|
|
|
|
* infrun.c (validate_siginfo_access): Delete.
|
|
|
|
|
(siginfo_value_read, siginfo_value_write): Use
|
|
|
|
|
validate_registers_access.
|
|
|
|
|
* thread.c (validate_registers_access): New function.
|
|
|
|
|
|
2016-01-12 21:27:27 +01:00
|
|
|
|
2016-01-12 Josh Stone <jistone@redhat.com>
|
|
|
|
|
Philippe Waroquiers <philippe.waroquiers@skynet.be>
|
|
|
|
|
|
|
|
|
|
* NEWS (Changes since GDB 7.10): Mention QCatchSyscalls and the
|
|
|
|
|
syscall_entry and syscall_return stop reasons. Mention GDB
|
|
|
|
|
support for remote catch syscall.
|
|
|
|
|
* remote.c (PACKET_QCatchSyscalls): New enum.
|
|
|
|
|
(remote_set_syscall_catchpoint): New function.
|
|
|
|
|
(remote_protocol_features): New element for QCatchSyscalls.
|
|
|
|
|
(remote_parse_stop_reply): Parse syscall_entry/return stops.
|
|
|
|
|
(init_remote_ops): Install remote_set_syscall_catchpoint.
|
|
|
|
|
(_initialize_remote): Config QCatchSyscalls.
|
|
|
|
|
* linux-nat.h (struct lwp_info) <syscall_state>: Comment typo.
|
|
|
|
|
|
2016-01-12 17:29:30 +01:00
|
|
|
|
2016-01-12 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* nat/linux-ptrace.c (linux_child_function): Cast child_stack
|
|
|
|
|
to gdb_byte * and pass to linux_fork_to_function.
|
|
|
|
|
|
Change function signature passed to clone
I see the following compile error with an old bfin-uclinux gcc to
build GDBserver,
cc1: warnings being treated as errors
gdb/gdbserver/../nat/linux-ptrace.c: In function 'linux_fork_to_function':
gdb/gdbserver/../nat/linux-ptrace.c:283: error: passing argument 1 of 'clone' from incompatible pointer type
in glibc, clone's prototype is like this, and in uClibc, it is the same,
int clone(int (*fn)(void *), void *child_stack,
int flags, void *arg, ...
/* pid_t *ptid, struct user_desc *tls, pid_t *ctid */ );
so this patch changes function signature from 'void (*function) (gdb_byte *)'
to 'int (*function) (void *)'.
Note that I find Pedro advised to change argument type from 'void *'
to 'gdb_byte *' during the patch review
https://sourceware.org/ml/gdb-patches/2013-08/msg00611.html however,
I think fix compile error can justify the change back to 'void *'.
gdb:
2016-01-12 Yao Qi <yao.qi@linaro.org>
* nat/linux-ptrace.c (linux_fork_to_function): Change type
of argument 'function'.
(linux_grandchild_function): Change return type to 'int'.
Change child_stack's type to 'void *'.
(linux_child_function): Likewise.
2016-01-12 16:18:09 +01:00
|
|
|
|
2016-01-12 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* nat/linux-ptrace.c (linux_fork_to_function): Change type
|
|
|
|
|
of argument 'function'.
|
|
|
|
|
(linux_grandchild_function): Change return type to 'int'.
|
|
|
|
|
Change child_stack's type to 'void *'.
|
|
|
|
|
(linux_child_function): Likewise.
|
|
|
|
|
|
2016-01-12 16:03:11 +01:00
|
|
|
|
2016-01-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
Remove use of the registered trademark symbol throughout.
|
|
|
|
|
|
2016-01-12 12:53:09 +01:00
|
|
|
|
2016-01-12 Thomas Schwinge <thomas@codesourcery.com>
|
|
|
|
|
|
|
|
|
|
* reply_mig_hack.awk: Rewrite one regular expression.
|
|
|
|
|
|
2016-01-07 12:06:04 +01:00
|
|
|
|
2016-01-11 Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
* acinclude.m4: Include new warning.m4 file.
|
|
|
|
|
* configure: Regenerated.
|
|
|
|
|
* configure.ac: Move all warning logic ...
|
|
|
|
|
* warning.m4: ... here.
|
|
|
|
|
|
Change SIGINT handler for extension languages only when target terminal is ours
I see a timeout in gdb.base/random-signal.exp,
Continuing.^M
PASS: gdb.base/random-signal.exp: continue
^CPython Exception <type 'exceptions.KeyboardInterrupt'> <type
exceptions.KeyboardInterrupt'>: ^M
FAIL: gdb.base/random-signal.exp: stop with control-c (timeout)
it can be reproduced by running random-signal.exp with native-gdbserver
in a loop, like this, and the fail will be shown in about 20 runs,
$ (set -e; while true; do make check RUNTESTFLAGS="--target_board=native-gdbserver random-signal.exp"; done)
In the test, the program is being single-stepped for software watchpoint,
and in each internal stop, python unwinder sniffer is used,
#0 pyuw_sniffer (self=<optimised out>, this_frame=<optimised out>, cache_ptr=0xd554f8) at /home/yao/SourceCode/gnu/gdb/git/gdb/python/py-unwind.c:608
#1 0x00000000006a10ae in frame_unwind_try_unwinder (this_frame=this_frame@entry=0xd554e0, this_cache=this_cache@entry=0xd554f8, unwinder=0xecd540)
at /home/yao/SourceCode/gnu/gdb/git/gdb/frame-unwind.c:107
#2 0x00000000006a143f in frame_unwind_find_by_frame (this_frame=this_frame@entry=0xd554e0, this_cache=this_cache@entry=0xd554f8)
at /home/yao/SourceCode/gnu/gdb/git/gdb/frame-unwind.c:163
#3 0x000000000069dc6b in compute_frame_id (fi=0xd554e0) at /home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:454
#4 get_prev_frame_if_no_cycle (this_frame=this_frame@entry=0xd55410) at /home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:1781
#5 0x000000000069fdb9 in get_prev_frame_always_1 (this_frame=0xd55410) at /home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:1955
#6 get_prev_frame_always (this_frame=this_frame@entry=0xd55410) at /home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:1971
#7 0x00000000006a04b1 in get_prev_frame (this_frame=this_frame@entry=0xd55410) at /home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:2213
when GDB goes to python extension, or other language extension, the
SIGINT handler is changed, and is restored when GDB leaves extension
language. GDB only stays in extension language for a very short period
in this case, but if ctrl-c is pressed at that moment, python extension
will handle the SIGINT, and exceptions.KeyboardInterrupt is shown.
Language extension is used in GDB side rather than inferior side,
so GDB should only change SIGINT handler for extension language when
the terminal is ours (not inferior's). This is what this patch does.
With this patch applied, I run random-signal.exp in a loop for 18
hours, and no fail is shown.
gdb:
2016-01-08 Yao Qi <yao.qi@linaro.org>
* extension.c: Include target.h.
(set_active_ext_lang): Only call install_gdb_sigint_handler,
check_quit_flag, and set_quit_flag if target_terminal_is_ours
returns false.
(restore_active_ext_lang): Likewise.
* target.c (target_terminal_is_ours): New function.
* target.h (target_terminal_is_ours): Declare.
2016-01-08 12:06:00 +01:00
|
|
|
|
2016-01-08 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* extension.c: Include target.h.
|
|
|
|
|
(set_active_ext_lang): Only call install_gdb_sigint_handler,
|
|
|
|
|
check_quit_flag, and set_quit_flag if target_terminal_is_ours
|
|
|
|
|
returns false.
|
|
|
|
|
(restore_active_ext_lang): Likewise.
|
|
|
|
|
* target.c (target_terminal_is_ours): New function.
|
|
|
|
|
* target.h (target_terminal_is_ours): Declare.
|
|
|
|
|
|
2016-01-07 20:12:44 +01:00
|
|
|
|
2016-01-07 Maciej W. Rozycki <macro@imgtec.com>
|
|
|
|
|
|
|
|
|
|
* mips-tdep.c (mips_breakpoint_from_pc): Rename local `status'
|
|
|
|
|
to `err' in the little-endian leg.
|
|
|
|
|
|
2016-01-06 16:03:41 +01:00
|
|
|
|
2016-01-06 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arch/arm-get-next-pcs.c (arm_get_next_pcs): Move it to some
|
|
|
|
|
lines below.
|
|
|
|
|
(thumb_get_next_pcs_raw): Make it static.
|
|
|
|
|
(arm_get_next_pcs_raw): Likewise.
|
|
|
|
|
* arch/arm-get-next-pcs.h (thumb_get_next_pcs_raw): Remove the
|
|
|
|
|
declaration.
|
|
|
|
|
(arm_get_next_pcs_raw): Likewise.
|
|
|
|
|
|
2016-01-06 05:23:52 +01:00
|
|
|
|
2016-01-05 Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
* version.in: Change cvs to git.
|
|
|
|
|
|
2016-01-02 09:11:44 +01:00
|
|
|
|
2016-01-05 Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
* configure.tgt (score-*-*): Delete gdb_sim assignment.
|
|
|
|
|
|
2016-01-05 12:03:40 +01:00
|
|
|
|
2016-01-05 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
PR sim/13418
|
|
|
|
|
* configure.ac: Define WITH_PPC_SIM when linking in the sim and
|
|
|
|
|
the target is powerpc*.
|
2016-01-05 12:12:31 +01:00
|
|
|
|
* rs6000-tdep.c (init_sim_regno_table): Check WITH_PPC_SIM instead
|
|
|
|
|
of WITH_SIM.
|
2016-01-05 12:03:40 +01:00
|
|
|
|
* configure: Regenerate.
|
|
|
|
|
* config.in: Regenerate.
|
|
|
|
|
|
2015-12-23 13:53:53 +01:00
|
|
|
|
2016-01-04 Markus Metzger <markus.t.metzger@intel.com>
|
|
|
|
|
|
|
|
|
|
* btrace.c (btrace_pt_readmem_callback): Do not return in TRY/CATCH.
|
|
|
|
|
|
2016-01-02 09:10:57 +01:00
|
|
|
|
2016-01-02 Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
* configure.tgt (powerpc*-*-*): Delete test call and
|
|
|
|
|
always assign gdb_sim.
|
|
|
|
|
|
2016-01-01 05:33:14 +01:00
|
|
|
|
2016-01-01 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
|
|
|
|
|
|
Update year range in copyright notice of all files.
|
|
|
|
|
|
2016-01-01 05:22:36 +01:00
|
|
|
|
2016-01-01 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
|
|
|
|
|
|
* top.c (print_gdb_version): Change copyright year in version
|
|
|
|
|
message.
|
|
|
|
|
|
2016-01-01 05:19:16 +01:00
|
|
|
|
2016-01-01 Joel Brobecker <brobecker@adacore.com>
|
[win32] cannot automatically find executable file [...] warning at GDB startup
The following change...
commit 43499ea30db2a866412c86952c7e1d7b158d806f
Date: Tue Nov 17 15:17:44 2015 +0000
Subject: [C++/mingw] windows-nat.c casts
... causes a small regression in GDB, where we get the following
warning at startup:
% gdb
C:\[...]\gdb.exe: warning: cannot automatically find executable file or library to read symbols.
Use "file" or "dll" command to load executable/libraries directly.
GNU gdb (GDB) 7.10.50.20151218-cvs (with AdaCore local changes)
[...]
(gdb)
The warning comes from _initialize_loadable which tries to dynamically
load some symbols from kernel32.dll and psapi.dll, and in particular:
hm = LoadLibrary ("psapi.dll");
if (hm)
{
GPA (hm, EnumProcessModules);
GPA (hm, GetModuleInformation);
GPA (hm, GetModuleFileNameEx);
}
The problem is that the new GPA macro assumes that the name of
the variable we use to point to the function, and the name of
its associated symbol are the same. This is mostly the case,
except for GetModuleFileNameEx, where the name is provided by
the GetModuleFileNameEx_name macro (defined differently depending
on whether we are on cygwin or not). As a result, the dynamic
resolution for GetModuleFileNameEx returns NULL, and we trip
the following check which leads to the warning:
if (!EnumProcessModules || !GetModuleInformation || !GetModuleFileNameEx)
{
[...]
warning(_("[...]"));
}
This patch fixes the problem by calling GetProcAddress directly,
rather than through the GPA macro, but in a way which hopefully
avoids the C++ compilation warning that the previous patch was
trying to get rid of.
gdb/ChangeLog:
* windows-nat.c (_initialize_loadable): Fix computing of
GetModuleFileNameEx.
2015-12-19 15:21:01 +01:00
|
|
|
|
|
2016-01-01 05:19:16 +01:00
|
|
|
|
* config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2015.
|
[win32] cannot automatically find executable file [...] warning at GDB startup
The following change...
commit 43499ea30db2a866412c86952c7e1d7b158d806f
Date: Tue Nov 17 15:17:44 2015 +0000
Subject: [C++/mingw] windows-nat.c casts
... causes a small regression in GDB, where we get the following
warning at startup:
% gdb
C:\[...]\gdb.exe: warning: cannot automatically find executable file or library to read symbols.
Use "file" or "dll" command to load executable/libraries directly.
GNU gdb (GDB) 7.10.50.20151218-cvs (with AdaCore local changes)
[...]
(gdb)
The warning comes from _initialize_loadable which tries to dynamically
load some symbols from kernel32.dll and psapi.dll, and in particular:
hm = LoadLibrary ("psapi.dll");
if (hm)
{
GPA (hm, EnumProcessModules);
GPA (hm, GetModuleInformation);
GPA (hm, GetModuleFileNameEx);
}
The problem is that the new GPA macro assumes that the name of
the variable we use to point to the function, and the name of
its associated symbol are the same. This is mostly the case,
except for GetModuleFileNameEx, where the name is provided by
the GetModuleFileNameEx_name macro (defined differently depending
on whether we are on cygwin or not). As a result, the dynamic
resolution for GetModuleFileNameEx returns NULL, and we trip
the following check which leads to the warning:
if (!EnumProcessModules || !GetModuleInformation || !GetModuleFileNameEx)
{
[...]
warning(_("[...]"));
}
This patch fixes the problem by calling GetProcAddress directly,
rather than through the GPA macro, but in a way which hopefully
avoids the C++ compilation warning that the previous patch was
trying to get rid of.
gdb/ChangeLog:
* windows-nat.c (_initialize_loadable): Fix computing of
GetModuleFileNameEx.
2015-12-19 15:21:01 +01:00
|
|
|
|
|
2016-01-01 05:19:16 +01:00
|
|
|
|
For older changes see ChangeLog-2015.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
Local Variables:
|
|
|
|
|
mode: change-log
|
|
|
|
|
left-margin: 8
|
|
|
|
|
fill-column: 74
|
|
|
|
|
version-control: never
|
2007-08-10 00:44:38 +02:00
|
|
|
|
coding: utf-8
|
1999-04-16 03:35:26 +02:00
|
|
|
|
End:
|