2016-03-15 16:33:04 +00: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 16:33:04 +00: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 22:08:07 +00: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 10:03:32 +00: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 20:18:18 +00: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 22:12:30 +00: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 19:17:54 +00: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 18:25:00 +00: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 18:25:00 +00: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 18:25:00 +00: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 18:25:00 +00: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 18:24:59 +00: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 18:24:59 +00:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* utils.c (prompt_for_continue): Update comments.
|
|
|
|
|
|
2016-03-09 18:24:59 +00: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 18:24:59 +00: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 18:24:59 +00:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* top.c (window_hook): Delete.
|
|
|
|
|
(command_loop): Remove references to window_hook.
|
|
|
|
|
|
2016-03-09 18:24:58 +00:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* gdb.base/command-line-input.exp: New file.
|
|
|
|
|
|
2016-03-06 15:38:52 +00: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 16:24:48 +00: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 16:19:25 +00: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 16:12:29 +00: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 16:12:29 +00: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 15:52:43 +00:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* osabi.c (gdb_osabi_names): Avoid spaces in osabi names.
|
|
|
|
|
|
2016-03-09 15:46:31 +00:00
|
|
|
|
2016-03-09 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* frv-tdep.c (frv_gdbarch_init): Handle bfd_mach_fr300.
|
|
|
|
|
|
2016-03-08 01:45:09 +00: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 03:01:06 +00: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 02:29:39 +00: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 01:50:02 +00: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 00:10:30 +00: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 12:17:15 +00: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 16:02:15 +00: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 15:57:55 +00: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 15:03:06 +00: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 14:40:27 +00:00
|
|
|
|
2016-03-02 Bernhard Heckel <bernhard.heckel@intel.com>
|
|
|
|
|
|
|
|
|
|
* MAINTAINERS (Write After Approval): Add Bernhard Heckel.
|
|
|
|
|
|
2016-03-02 14:30:05 +00:00
|
|
|
|
2016-03-02 Bernhard Heckel <bernhard.heckel@intel.com>
|
|
|
|
|
|
|
|
|
|
* dwarf2read.c (new_symbol_full): Fix detection of gfortran compilers.
|
|
|
|
|
|
2016-03-01 11:43:55 +00: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 15:54:03 +00: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 15:51:03 +00: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 09:25:55 +00: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 20:22:24 +00: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 15:00:36 +00: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 15:00:36 +00: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 17:30:22 +00: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 16:03:22 +00:00
|
|
|
|
2016-02-25 Simon Marchi <simon.marchi@ericsson.com>
|
|
|
|
|
|
|
|
|
|
* i386-linux-tdep.c (i386_linux_handle_segmentation_fault):
|
|
|
|
|
Initialize variables.
|
|
|
|
|
|
2016-02-24 20:00:17 +00: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 22:52:06 +00: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 21:00:59 +00: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 11:31:58 +00: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 10:07:27 +00:00
|
|
|
|
2016-02-24 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
|
|
|
|
|
|
GDB 7.11 released.
|
|
|
|
|
|
2015-03-30 16:30:31 +00: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 21:25:18 +00: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 18:21:10 +00: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 09:21:09 +00: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 16:15:14 +00:00
|
|
|
|
2016-02-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
|
|
|
|
|
|
* gdb-gdb.py (class TypeFlagsPrinter): Use parentheses for print.
|
|
|
|
|
|
2016-02-22 12:08:51 +00:00
|
|
|
|
2016-02-22 Yao Qi <yao.qi@linaro.org>
|
|
|
|
|
|
|
|
|
|
* arm-tdep.c: Fix code format issues.
|
|
|
|
|
|
2016-02-21 20:38:10 +00: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 22:53:41 +00: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 16:24:59 +00: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 08:21:38 +00: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 14:38:36 +00: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 16:56:06 +00: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 13:53:35 +00: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 13:47:17 +00: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 10:05:56 +00: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 14:21:38 +00: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 16:05:31 +00: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 22:52:44 +00: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 13:58:44 +00: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 10:07:09 +00:00
|
|
|
|
2016-02-12 Markus Metzger <markus.t.metzger@intel.com>
|
|
|
|
|
|
|
|
|
|
* stack.c (frame_info): Check frame_unwind_caller_id.
|
|
|
|
|
|
2016-02-05 08:32:53 +00: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 19:36:39 +00:00
|
|
|
|
2016-02-11 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
* Makefile.in (check-parallel): New rule.
|
|
|
|
|
|
2016-02-11 19:09:25 +00: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 19:08:53 +00: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 18:21:32 +00: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 13:14:12 +00: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 00:49:14 +00: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 20:32:52 +00: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 15:10:18 +00: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 17:17:07 +00: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 15:26:07 +00: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 15:30:01 +00: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 03:28:01 +00: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 03:20:26 +00: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 20:57:22 +00: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 18:02:54 +00: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 18:02:53 +00: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 18:02:53 +00: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 18:02:53 +00: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 14:01:58 +00: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 12:12:17 +00: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 17:57:08 +00: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 14:45:02 +00: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 15:09:09 +00: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 21:39:06 +00:00
|
|
|
|
2016-02-02 Simon Marchi <simon.marchi@ericsson.com>
|
|
|
|
|
|
|
|
|
|
* ui-out.c (MAX_UI_OUT_LEVELS): Remove.
|
|
|
|
|
|
2016-02-02 11:02:16 +00: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 10:58:36 +00: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 10:50:17 +00: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 10:46:28 +00: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 10:42:56 +00: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 17:37:49 +00: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 03:22:19 +00: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 20:32:29 +00: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 18:49:46 +00: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 15:28:56 +00: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 14:16:42 +00: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 22:06:08 +00: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 09:54:37 +00:00
|
|
|
|
2016-01-27 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
|
|
|
|
|
|
* MAINTAINERS (Responsible Maintainers): Add Keith Seitz as
|
|
|
|
|
Linespec Maintainers.
|
|
|
|
|
|
2016-01-26 21:30:03 +00: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 14:08:26 +00: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 19:29:54 +00: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 12:00:20 +00: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 12:00:20 +00: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 17:51:35 +00:00
|
|
|
|
2016-01-22 John Baldwin <jhb@FreeBSD.org>
|
|
|
|
|
|
|
|
|
|
* fbsd-nat.c (fbsd_pid_to_str): Adjust string format.
|
|
|
|
|
|
2016-01-22 09:01:09 +00: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 01:02:39 +00:00
|
|
|
|
2016-01-21 Doug Evans <dje@google.com>
|
|
|
|
|
|
|
|
|
|
* breakpoint.c (init_breakpoint_sal): Add comment.
|
|
|
|
|
|
2016-01-21 15:58:12 +00: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 11:56:25 +00: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 11:18:45 +00: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 18:04:56 +00: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 07:48:50 +00: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 18:42:53 +00: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 04:01:39 +00:00
|
|
|
|
2016-01-20 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
|
|
2016-01-20 13:10:41 +00:00
|
|
|
|
* printcmd.c (print_scalar_formatted): Move binary operator from
|
2016-01-20 04:01:39 +00:00
|
|
|
|
end of line to beginning of next line. Adjust formatting
|
|
|
|
|
accordingly.
|
|
|
|
|
|
2016-01-19 18:23:00 +00: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 00:34:15 +00: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 15:53:43 +00: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 20:21:07 +00: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 05:49:52 +00: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 17:49:23 +00: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 16:07:07 +00: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 19:59:45 +00: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 13:03:40 +00: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 21:29:37 +00: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 20:24:34 +00: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 15:15:18 +00: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 09:45:10 +00: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 06:10:39 +00: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 22:45:19 +00: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 21:46:23 +00: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 21:46:22 +00: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 14:54:24 +00: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 12:28:02 +00: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 09:36:43 +00: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 17:57:59 +00:00
|
|
|
|
2016-01-13 Ulrich Weigand <uweigand@de.ibm.com>
|
|
|
|
|
|
|
|
|
|
* MAINTAINERS: Add Andreas Arnez as s390 target maintainer.
|
|
|
|
|
|
2016-01-13 16:15:31 +00: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 10:56:10 +00: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 10:56:09 +00: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 10:56:08 +00: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 10:56:07 +00: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 10:56:06 +00: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 10:56:06 +00: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 10:56:05 +00: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 10:40:33 +00: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 20:27:27 +00: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 16:29:30 +00: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 15:18:09 +00: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 15:03:11 +00:00
|
|
|
|
2016-01-12 Pedro Alves <palves@redhat.com>
|
|
|
|
|
|
|
|
|
|
Remove use of the registered trademark symbol throughout.
|
|
|
|
|
|
2016-01-12 11:53:09 +00:00
|
|
|
|
2016-01-12 Thomas Schwinge <thomas@codesourcery.com>
|
|
|
|
|
|
|
|
|
|
* reply_mig_hack.awk: Rewrite one regular expression.
|
|
|
|
|
|
2016-01-07 11:06:04 +00: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 11:06:00 +00: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 19:12:44 +00: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 15:03:41 +00: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 04:23:52 +00:00
|
|
|
|
2016-01-05 Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
* version.in: Change cvs to git.
|
|
|
|
|
|
2016-01-02 08:11:44 +00:00
|
|
|
|
2016-01-05 Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
* configure.tgt (score-*-*): Delete gdb_sim assignment.
|
|
|
|
|
|
2016-01-05 11:03:40 +00: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 11:12:31 +00:00
|
|
|
|
* rs6000-tdep.c (init_sim_regno_table): Check WITH_PPC_SIM instead
|
|
|
|
|
of WITH_SIM.
|
2016-01-05 11:03:40 +00:00
|
|
|
|
* configure: Regenerate.
|
|
|
|
|
* config.in: Regenerate.
|
|
|
|
|
|
2015-12-23 12:53:53 +00: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 08:10:57 +00:00
|
|
|
|
2016-01-02 Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
* configure.tgt (powerpc*-*-*): Delete test call and
|
|
|
|
|
always assign gdb_sim.
|
|
|
|
|
|
2016-01-01 04:33:14 +00:00
|
|
|
|
2016-01-01 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
|
|
|
|
|
|
Update year range in copyright notice of all files.
|
|
|
|
|
|
2016-01-01 04:22:36 +00:00
|
|
|
|
2016-01-01 Joel Brobecker <brobecker@adacore.com>
|
|
|
|
|
|
|
|
|
|
* top.c (print_gdb_version): Change copyright year in version
|
|
|
|
|
message.
|
|
|
|
|
|
2016-01-01 04:19:16 +00: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 14:21:01 +00:00
|
|
|
|
|
2016-01-01 04:19:16 +00: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 14:21:01 +00:00
|
|
|
|
|
2016-01-01 04:19:16 +00:00
|
|
|
|
For older changes see ChangeLog-2015.
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
|
|
Local Variables:
|
|
|
|
|
mode: change-log
|
|
|
|
|
left-margin: 8
|
|
|
|
|
fill-column: 74
|
|
|
|
|
version-control: never
|
2007-08-09 22:44:38 +00:00
|
|
|
|
coding: utf-8
|
1999-04-16 01:35:26 +00:00
|
|
|
|
End:
|