Fake VFORK_DONE events when following only the parent after a vfork.
[external/binutils.git] / gdb / ChangeLog
1 2016-07-01  John Baldwin  <jhb@FreeBSD.org>
2
3         * fbsd-nat.c (struct fbsd_fork_child_info): Rename to ...
4         (struct fbsd_fork_info): ... this.
5         (struct fbsd_fork_info) <child>: Rename to ...
6         (struct fbsd_fork_info) <ptid>: ... this.
7         (fbsd_pending_children): Update type.
8         (fbsd_remember_child): Update type and field name.
9         (fbsd_is_child_pending): Likewise.
10         (fbsd_pending_vfork_done): New variable.
11         (fbsd_is_vfork_done_pending): New function.
12         (fbsd_next_vfork_done): New function.
13         (fbsd_resume): Don't resume processes with a pending vfork done
14         event.
15         (fbsd_wait): Report pending vfork done events.
16         (fbsd_follow_fork): Delay and record a pending vfork done event
17         for a vfork parent when detaching the child.
18
19 2016-07-01  John Baldwin  <jhb@FreeBSD.org>
20
21         * fbsd-nat.c (super_resume): Move earlier next to "super_wait".
22         (resume_one_thread_cb): Move below fork following helper code.
23         (resume_all_threads_cb): Likewise.
24         (fbsd_resume): Likewise.
25
26 2016-07-01  John Baldwin  <jhb@FreeBSD.org>
27
28         * fbsd-nat.c (fbsd_follow_fork): Only detach child if
29         "detach_fork" is true.
30
31 2016-07-01  John Baldwin  <jhb@FreeBSD.org>
32
33         * x86bsd-nat.c: Include 'gdbthread.h'.
34         (x86bsd_dr_set): Set debug registers on all threads belonging to
35         the current inferior.
36
37 2016-07-01  John Baldwin  <jhb@FreeBSD.org>
38
39         * Makefile.in [HFILES_NO_SRCDIR]: Replace 'amd64bsd-nat.h' with
40         'x86bsd-nat.h'.
41         * amd64bsd-nat.c: Include 'x86bsd-nat.h' instead of
42         'amd64bsd-nat.h'.
43         (amd64bsd_xsave_len): Rename and move to x86bsd-nat.c.
44         (amd64bsd_fetch_inferior_registers): Replace 'amd64bsd_xsave_len'
45         with 'x86bsd_xsave_len'.
46         (amd64bsd_store_inferior_registers): Likewise.
47         (amd64bsd_target): Inherit from x86bsd_target.
48         (amd64bsd_dr_get): Rename and move to x86bsd-nat.c.
49         (amd64bsd_dr_set): Likewise.
50         (amd64bsd_dr_set_control): Likewise.
51         (amd64bsd_dr_set_addr): Likewise.
52         (amd64bsd_dr_get_addr): Likewise.
53         (amd64bsd_dr_get_status): Likewise.
54         (amd64bsd_dr_get_control): Likewise.
55         * amd64fbsd-nat.c: Include 'x86bsd-nat.h' instead of
56         'amd64bsd-nat.h'.
57         (super_mourn_inferior): Move to x86bsd-nat.c.
58         (amd64fbsd_mourn_inferior): Rename and move to x86bsd-nat.c.
59         (amd64fbsd_read_description): Replace 'amd64bsd_xsave_len' with
60         'x86bsd_xsave_len'.
61         (_initialize_amd64fbsd_nat): Remove x86 watchpoint setup and
62         mourn_inferior' target op.
63         * config/i386/fbsd.mh (NATDEPFILES): Add x86bsd-nat.o.
64         * config/i386/fbsd64.mh: Likewise.
65         * config/i386/nbsd64.mh: Likewise.
66         * config/i386/nbsdelf.mh: Likewise.
67         * config/i386/obsd.mh: Likewise.
68         * config/i386/obsd64.mh: Likewise.
69         * i386bsd-nat.c: Include 'x86bsd-nat.h'.
70         (i386bsd_xsave_len): Rename and move to x86bsd-nat.c.
71         (i386bsd_fetch_inferior_registers): Replace 'i386bsd_xsave_len'
72         with 'x86bsd_xsave_len'.
73         (i386bsd_store_inferior_registers): Likewise.
74         (i386bsd_target): Inherit from x86bsd_target.
75         (i386bsd_dr_get): Rename and move to x86bsd-nat.c.
76         (i386bsd_dr_set): Likewise.
77         (i386bsd_dr_set_control): Likewise.
78         (i386bsd_dr_set_addr): Likewise.
79         (i386bsd_dr_get_addr): Likewise.
80         (i386bsd_dr_get_status): Likewise.
81         (i386bsd_dr_get_control): Likewise.
82         * i386bsd-nat.h (i386bsd_xsave_len): Remove.
83         (i386bsd_dr_set_control): Remove.
84         (i386bsd_dr_set_addr): Remove.
85         (i386bsd_dr_get_addr): Remove.
86         (i386bsd_dr_get_status): Remove.
87         (i386bsd_dr_get_control): Remove.
88         * i386fbsd-nat.c: Include 'x86bsd-nat.h'.
89         (i386fbsd_read_description): Replace 'i386bsd_xsave_len' with
90         'x86bsd_xsave_len'.
91         (_initialize_i386fbsd_nat): Remove x86 watchpoint setup and
92         mourn_inferior' target op.
93         * x86bsd-nat.c: New file.
94         * x86bsd-nat.h: New file.
95
96 2016-07-01  Pedro Alves  <palves@redhat.com>
97             Tom Tromey  <tom@tromey.com>
98
99         * jit.c (jit_reader_load_command): Call reinit_frame_cache and
100         jit_inferior_created_hook.
101         (jit_reader_unload_command): Call reinit_frame_cache and
102         jit_inferior_exit_hook.
103         * jit.c (struct jit_unwind_private) <registers>: Delete field.
104         <regcache>: New field.
105         (jit_unwind_reg_set_impl): Set the register's value in the
106         regcache.  Free the passed-in gdb_reg_value.
107         (jit_dealloc_cache): Adjust to free the regcache.
108         (jit_frame_sniffer): Allocate a regcache instead of an array of
109         gdb_reg_value pointers.
110         (jit_frame_this_id): Adjust.
111         (jit_frame_prev_register): Read raw registers off of the regcache
112         instead of from the gdb_reg_value pointer array.  Use
113         gdbarch_pseudo_register_read_value to read pseudo registers.
114         * regcache.c (regcache_raw_set_cached_value): New function,
115         factored out from ...
116         (regcache_raw_write): ... here.
117         * regcache.h (regcache_raw_set_cached_value): Declare.
118
119 2016-07-01  Pedro Alves  <palves@redhat.com>
120             Antoine Tremblay  <antoine.tremblay@ericsson.com>
121
122         * inf-ptrace.c (inf_ptrace_detach_success): New function, factored
123         out from ...
124         (inf_ptrace_detach): ... here.
125         * inf-ptrace.h (inf_ptrace_detach_success): New declaration.
126         * linux-nat.c (get_pending_status): Rename to ...
127         (get_detach_signal): ... this, and return a host signal instead of
128         filling in a wait status.
129         (detach_one_lwp): New function, factored out from detach_callback
130         and adjusted to handle detaching from a zombie thread.
131         (detach_callback): Skip the leader thread.
132         (linux_nat_detach): No longer defer to inf_ptrace_detach to detach
133         the leader thread, nor build a signal string to pass down.
134         Instead, use target_announce_detach, detach_one_lwp and
135         inf_ptrace_detach_success.
136
137 2016-07-01  Pedro Alves  <palves@redhat.com>
138
139         * breakpoint.c (breakpoint_init_inferior): Discard watchpoint
140         locations.
141         * infcmd.c (detach_command): Call breakpoint_init_inferior.
142
143 2016-07-01  Pedro Alves  <palves@redhat.com>
144
145         * darwin-nat.c (darwin_detach): Use target_announce_detach.
146         * inf-ptrace.c (inf_ptrace_detach): Likewise.
147         * nto-procfs.c (procfs_detach): Likewise.
148         * remote.c (remote_detach_1): Likewise.
149         * target.c (target_announce_detach): New function.
150         * target.h (target_announce_detach): New declaration.
151
152 2016-06-29  Tom Tromey  <tom@tromey.com>
153
154         PR python/20129:
155         * python/lib/gdb/command/frame_filters.py (_do_enable_frame_filter)
156         (SetFrameFilterPriority._set_filter_priority): Use "frame_filter",
157         not "name".
158
159 2016-06-29  Tom Tromey  <tom@tromey.com>
160
161         PR gdb/17210:
162         * target.c (free_memory_read_result_vector): Take a pointer to the
163         VEC as an argument.
164         (read_memory_robust): Install a cleanup for "result".
165         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.
166
167 2016-06-29  Manish Goregaokar  <manish@mozilla.com>
168
169         * rust-lang.c (rust_get_disr_info): Initialize saveptr to NULL.
170
171 2016-06-29  Manish Goregaokar  <manish@mozilla.com>
172
173         * rust-lang.c (rust_get_disr_info): Use strtok_r instead of strsep.
174
175 2016-06-28  Yao Qi  <yao.qi@linaro.org>
176
177         * aarch64-tdep.c (aarch64_displaced_step_b): Use int64_t for
178         variable new_offset.
179
180 2016-06-27  Manish Goregaokar  <manish@mozilla.com>
181
182         * rust-lang.c (rust_print_type, rust_decorations): Print unit
183         types as "()".
184         (rust_print_type): Omit return type for functions returning unit.
185
186 2016-06-25  Pierre-Marie de Rodat  <derodat@adacore.com>
187
188         * python/py-breakpoint.c (bppy_init): Clear bppy_pending_object
189         when there is an error during the breakpoint creation.
190
191 2016-06-25  Tom Tromey  <tom@tromey.com>
192
193         * rust-lang.c (rust_get_disr_info, rust_print_type): Fix
194         formatting.
195
196 2016-06-25  Manish Goregaokar  <manish@mozilla.com>
197
198         PR gdb/20239
199         * rust-lang.c (rust_get_disr_info): Correctly interpret
200         NonZero-optimized enums of arbitrary depth.
201         (rust_print_type): Correctly print NonZero-optimized
202         enums.
203
204 2016-06-24  David Taylor  <dtaylor@emc.com>
205
206         PR gdb/17520 Structure offset wrong when 1/4 GB or greater.
207         * c-lang.h: Change all parameters, variables, and struct or union
208         members used as struct or union fie3ld offsets from int to
209         LONGEST.
210         * c-valprint.c: Likewise.
211         * cp-abi.c: Likewise.
212         * cp-abi.h: Likewise.
213         * cp-valprint.c: Likewise.
214         * d-valprint.c: Likewise.
215         * dwarf2loc.c: Likewise.
216         * eval.c: Likewise.
217         * extension-priv.h: Likewise.
218         * extension.c: Likewise.
219         * extension.h: Likewise.
220         * findvar.c: Likewise.
221         * gdbtypes.h: Likewise.
222         * gnu-v2-abi.c: Likewise.
223         * gnu-v3-abi.c: Likewise.
224         * go-valprint.c: Likewise.
225         * guile/guile-internal.h: Likewise.
226         * guile/scm-pretty-print.c: Likewise.
227         * jv-valprint.c Likewise.
228         * opencl-lang.c: Likewise.
229         * p-lang.h: Likewise.
230         * python/py-prettyprint.c: Likewise.
231         * python/python-internal.h: Likewise.
232         * spu-tdep.c: Likewise.
233         * typeprint.c: Likewise.
234         * valarith.c: Likewise.
235         * valops.c: Likewise.
236         * valprint.c: Likewise.
237         * valprint.h: Likewise.
238         * value.c: Likewise.
239         * value.h: Likewise.
240         * p-valprint.c: Likewise.
241         * c-typeprint.c (c_type_print_base): When printing offset, use
242         plongest, not %d.
243         * gdbtypes.c (recursive_dump_type): Ditto.
244
245 2016-06-24  David Taylor  <david.taylor@emc.com>
246
247         * MAINTAINERS (Write After Approval): Add David Taylor.
248
249 2016-06-24  John Baldwin  <jhb@FreeBSD.org>
250
251         * configure.ac: Check for support for system call LWP fields on
252         FreeBSD.
253         * config.in, configure: Rebuild.
254         * data-directory/Makefile.in (SYSCALLS_FILES): Add freebsd.xml.
255         * fbsd-nat.c (fbsd_wait) [HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE]:
256         Report system call events.
257         [HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE]
258         (fbsd_set_syscall_catchpoint): New function.
259         (fbsd_nat_add_target) [HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE]:
260         Set "to_set_syscall_catchpoint" to "fbsd_set_syscall_catchpoint".
261         * fbsd-tdep.c: Include xml-syscall.h
262         (fbsd_get_syscall_number): New function.
263         (fbsd_init_abi): Set XML system call file name.
264         Add "get_syscall_number" gdbarch method.
265         * syscalls/freebsd.xml: New file.
266
267 2016-06-24  John Baldwin  <jhb@FreeBSD.org>
268
269         * fbsd-tdep.c: Include "auxv.h".
270         (fbsd_print_auxv_entry): New function.
271         (fbsd_init_abi): Install gdbarch "print_auxv_entry" method.
272
273 2016-06-24  John Baldwin  <jhb@FreeBSD.org>
274
275         * auxv.c (fprint_auxv_entry): New function.
276         (default_print_auxv_entry): New function.
277         (fprint_target_auxv): Use gdbarch_print_auxv_entry.
278         * auxv.h (enum auxv_format): New enum.
279         (fprint_auxv_entry): Declare.
280         (default_print_auxv_entry): Declare.
281         * gdbarch.sh (print_auxv_entry): New.
282         * gdbarch.c, gdbarch.h: Re-generated.
283
284 2016-06-24  John Baldwin  <jhb@FreeBSD.org>
285
286         * fbsd-nat.c [KERN_PROC_AUXV] New variable super_xfer_partial.
287         (fbsd_xfer_partial): New function.
288         (fbsd_nat_add_target) [KERN_PROC_AUXV] Set "to_xfer_partial" to
289         "fbsd_xfer_partial".
290
291 2016-06-23  Tom Tromey  <tom@tromey.com>
292
293         * symtab.c (symbol_find_demangled_name): Loop over languages and
294         use language_sniff_from_mangled_name.
295         * rust-lang.c (rust_sniff_from_mangled_name): New function.
296         (rust_language_defn): Update.
297         * p-lang.c (pascal_language_defn): Update.
298         * opencl-lang.c (opencl_language_defn): Update.
299         * objc-lang.c (objc_sniff_from_mangled_name): New function.
300         (objc_language_defn): Update.
301         * m2-lang.c (m2_language_defn): Update.
302         * language.h (struct language_defn) <la_sniff_from_mangled_name>: New
303         field.
304         (language_sniff_from_mangled_name): Declare.
305         * language.c (language_sniff_from_mangled_name): New function.
306         (unknown_language_defn, auto_language_defn, local_language_defn):
307         Update.
308         * jv-lang.c (java_sniff_from_mangled_name): New function.
309         (java_language_defn): Use it.
310         * go-lang.c (go_sniff_from_mangled_name): New function.
311         (go_language_defn): Use it.
312         * f-lang.c (f_language_defn): Update.
313         * defs.h (enum language): Reorder.
314         * d-lang.c (d_sniff_from_mangled_name): New function.
315         (d_language_defn): Use it.
316         * cp-support.h (gdb_sniff_from_mangled_name): Declare.
317         * cp-support.c (gdb_sniff_from_mangled_name): New function.
318         * c-lang.c (c_language_defn, cplus_language_defn)
319         (asm_language_defn, minimal_language_defn): Update.
320         * ada-lang.c (ada_sniff_from_mangled_name): New function.
321         (ada_language_defn): Use it.
322
323 2016-06-23  Tom Tromey  <tom@tromey.com>
324
325         * ada-lang.c (ada_extensions): New array.
326         (ada_language_defn): Use it.
327         * c-lang.c (c_extensions): New array.
328         (c_language_defn): Use it.
329         (cplus_extensions): New array.
330         (cplus_language_defn): Use it.
331         (asm_extensions): New array.
332         (asm_language_defn): Use it.
333         (minimal_language_defn): Update.
334         * d-lang.c (d_extensions): New array.
335         (d_language_defn): Use it.
336         * f-lang.c (f_extensions): New array.
337         (f_language_defn): Use it.
338         * go-lang.c (go_language_defn): Update.
339         * jv-lang.c (java_extensions): New array.
340         (java_language_defn): Use it.
341         * language.c (add_language): Call add_filename_language.
342         (unknown_language_defn, auto_language_defn, local_language_defn):
343         Update.
344         * language.h (struct language_defn) <la_filename_extensions>: New
345         field.
346         * m2-lang.c (m2_language_defn): Update.
347         * objc-lang.c (objc_extensions): New array.
348         (objc_language_defn): Use it.
349         * opencl-lang.c (opencl_language_defn): Update.
350         * p-lang.c (p_extensions): New array.
351         (pascal_language_defn): Use it.
352         * rust-lang.c (rust_extensions): New array.
353         (rust_language_defn): Use it.
354         * symfile.c (add_filename_language): No longer static.  Make "ext"
355         const.
356         (init_filename_language_table): Remove.
357         (_initialize_symfile): Update.
358         * symfile.h (add_filename_language): Declare.
359
360 2016-06-23  Tom Tromey  <tom@tromey.com>
361
362         * symfile.c (filename_language_table): Now a VEC.
363         (fl_table_size, fl_table_next): Remove.
364         (add_filename_language): Use VEC_safe_push.
365         (set_ext_lang_command, info_ext_lang_command)
366         (deduce_language_from_filename): Use VEC_iterate.
367         (init_filename_language_table): Use VEC_empty.
368
369 2016-06-23  Tom Tromey  <tom@tromey.com>
370
371         * python/python.c (gdbpy_parameter): Now static.
372         * python/python-internal.h (gdbpy_parameter): Don't declare.
373
374 2016-06-23  Tom Tromey  <tom@tromey.com>
375
376         PR gdb/16483:
377         * python/lib/gdb/command/frame_filters.py
378         (InfoFrameFilter.list_frame_filters): Rename to print_list.  Print
379         nothing if no filters found.  Return value indicating whether
380         filters were printed.
381         (InfoFrameFilter.print_list): Remove.
382         (InfoFrameFilter.invoke): Print message if no frame filters
383         found.
384
385 2016-06-21  Walfred Tedeschi  <walfred.tedeschi@intel.com>
386
387         * f-valprint.c (f_val_print): Add field names for printing
388         derived types fields.
389
390 2016-06-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
391
392         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Fix typo
393         in name of last-break regset.
394
395 2016-06-21  Pedro Alves  <palves@redhat.com>
396
397         * fork-child.c (fork_inferior): Switch the child to the main UI
398         right after vfork.  Save/restore the current UI in the parent.
399         Flush outputs of the main UI instead of the current UI.
400
401 2016-06-21  Pedro Alves  <palves@redhat.com>
402
403         * breakpoint.c (watchpoint_check): Send watchpoint-deleted output
404         to all UIs.
405
406 2016-06-21  Pedro Alves  <palves@redhat.com>
407
408         * NEWS: Mention support for running interpreters on separate
409         UIs and the new new-ui command.
410
411 2016-06-21  Pedro Alves  <palves@redhat.com>
412
413         * interps.c (set_top_level_interpreter): New function, factored
414         out from captured_main.
415         (interpreter_completer): Make extern.
416         * interps.h (set_top_level_interpreter, interpreter_completer):
417         New declarations.
418         (captured_main): Use set_top_level_interpreter.
419         * top.c [!O_NOCTTY] (O_NOCTTY): Define as 0.
420         (open_terminal_stream, new_ui_command): New functions.
421         (init_main): Install the "new-ui" command.
422
423 2016-06-21  Pedro Alves  <palves@redhat.com>
424
425         * cli/cli-script.c (read_next_line): Adjust to per-UI stdin.
426         (read_command_lines): Use input_interactive_p instead of
427         input_from_terminal_p.
428         * defs.h (struct ui): Forward declare.
429         (input_from_terminal_p): Rename to ...
430         (input_interactive_p): ... this.
431         * event-top.c (stdin_event_handler): Pass 0 as from_tty argument
432         to quit_command.
433         (command_handler): Adjust to per-UI stdin.
434         (handle_line_of_input): Adjust to per-UI stdin and use
435         input_interactive_p instead of ISATTY and input_from_terminal_p.
436         (gdb_readline_no_editing_callback): Adjust to per-UI stdin.
437         (command_line_handler): Always pass true as "from_tty" parameter
438         of handle_line_of_input and execute_command.
439         (async_sigterm_handler): Pass 0 as from_tty argument to
440         quit_command.
441         * inflow.c (interactive_mode, show_interactive_mode): Moved to ...
442         (gdb_has_a_terminal): Don't check interactive_mode here.
443         (_initialize_inflow): Don't install "set interactive-mode" here.
444         * main.c (captured_command_loop): Adjust to per-UI stdin.
445         * mi/mi-interp.c (mi_execute_command_wrapper): Adjust to per-UI
446         stdin.
447         * top.c (new_ui): Save the stdin stream and whether it's a tty.
448         (dont_repeat): Adjust to per-UI stdin.
449         (command_line_input): Adjust to per-UI stdin and to use
450         input_interactive_p.
451         (quit_force): Write history if any UI supports interactive input.
452         (interactive_mode, show_interactive_mode): Move here, from
453         inflow.c.
454         (input_from_terminal_p): Rename to ...
455         (input_interactive_p): ... this, and check the "interactive_mode"
456         global instead of calling gdb_has_a_terminal.
457         (_initialize_top): Install "set interactive-mode" here.
458         * top.h (struct ui) <stdin_stream, input_interactive_p>: New
459         fields.
460         * utils.c (quit): Pass 0 as from_tty argument to quit_force.
461         (defaulted_query): Adjust to per-UI stdin and to use
462         input_interactive_p.
463
464 2016-06-21  Pedro Alves  <palves@redhat.com>
465
466         * event-top.c (stdin_event_handler): Don't quit gdb if it was a
467         secondary UI's input stream that closed.  Instead, just delete the
468         UI.
469
470 2016-06-21  Pedro Alves  <palves@redhat.com>
471
472         * event-top.c (main_ui_): Delete.
473         (main_ui, current_ui, ui_list): No longer initialize here.
474         * main.c (captured_main): UI initialization code factored out to
475         new new_ui function.
476         (gdb_main): Wrap captured_main with TRY/CATCH instead of
477         catch_errors.
478         * top.c (highest_ui_num): New global.
479         (new_ui): New function.
480         * top.h (struct ui) <num>: New field.
481         (new_ui): New declaration.
482
483 2016-06-21  Pedro Alves  <palves@redhat.com>
484
485         * cli/cli-interp.c (cli_on_normal_stop): Bail out early if there's
486         nothing to print.  Use should_print_stop_to_console.
487         * tui/tui-interp.c (tui_on_normal_stop): Likewise.
488
489 2016-06-21  Pedro Alves  <palves@redhat.com>
490
491         * breakpoint.c (new_until_break_fsm): Add 'cmd_interp' parameter.
492         (until_break_fsm_should_stop, until_break_fsm_clean_up): Add
493         thread parameter.
494         (until_break_command): Pass command interpreter to thread fsm
495         ctor.
496         * cli/cli-interp.c (should_print_stop_to_console): Adjust.
497         * gdbthread.h (struct thread_control_state) <command_interp>:
498         Delete field.
499         * infcall.c (new_call_thread_fsm): Add 'cmd_interp' parameter.
500         Pass it down.
501         (call_thread_fsm_should_stop): Add thread parameter.
502         (call_function_by_hand_dummy): Pass command interpreter to thread
503         fsm ctor.  Pass thread pointer to fsm clean up method.
504         * infcmd.c: Include interps.h.
505         (struct step_command_fsm) <thread>: Delete field.
506         (new_step_command_fsm): Add 'cmd_interp' parameter.  Pass it down.
507         (step_command_fsm_prepare): Remove references to fsm's thread
508         field.
509         (step_1): Pass command interpreter to thread
510         fsm ctor.  Pass thread pointer to fsm clean up method.
511         (step_command_fsm_should_stop, step_command_fsm_clean_up): Add
512         thread parameter and use it.
513         (new_until_next_fsm): Add 'cmd_interp' parameter.  Pass it down.
514         (until_next_fsm_should_stop, until_next_fsm_clean_up): Add thread
515         parameter and use it.
516         (until_next_command): Pass command interpreter to thread fsm ctor.
517         (struct finish_command_fsm) <thread>: Delete field.
518         (finish_command_fsm_ops): Add NULL slot for should_notify_stop.
519         (new_finish_command_fsm): Add 'cmd_interp' parameter and pass it
520         down.  Remove thread parameter and adjust.
521         (finish_command_fsm_should_stop, finish_command_fsm_clean_up): Add
522         thread parameter and use it.
523         (finish_command): Pass command interpreter to thread fsm ctor.
524         Don't pass thread.
525         * infrun.c (follow_fork): Move thread fsm to child fork instead of
526         command interpreter, only.
527         (clear_proceed_status_thread): Remove reference to command_interp.
528         (proceed): Don't record the thread's command interpreter.
529         (clean_up_just_stopped_threads_fsms): Pass thread to fsm clean_up
530         method.
531         (fetch_inferior_event): Pass thread to fsm should_stop method.
532         * thread-fsm.c (thread_fsm_ctor): Add 'cmd_interp' parameter.
533         Store it.
534         (thread_fsm_clean_up, thread_fsm_should_stop): Add thread
535         parameter and pass it down.
536         * thread-fsm.h (struct thread_fsm) <command_interp>: New field.
537         (struct thread_fsm_ops) <clean_up, should_stop>: Add thread
538         parameter.
539         (thread_fsm_ctor): Add 'cmd_interp' parameter.
540         (thread_fsm_clean_up, thread_fsm_should_stop): Add thread
541         parameter.
542         * thread.c (thread_cancel_execution_command): Pass thread to
543         thread fsm clean_up method.
544
545 2016-06-21  Pedro Alves  <palves@redhat.com>
546
547         * cli/cli-interp.c: Include gdbthread.h and thread-fsm.h.
548         (should_print_stop_to_console): New function, factored out from
549         mi_on_normal_stop_1.
550         * cli/cli-interp.h (should_print_stop_to_console): Declare.
551         * mi/mi-interp.c (mi_on_normal_stop_1): Use
552         should_print_stop_to_console.  Pass it the current UI's console
553         interpreter.
554         * mi/mi-main.c (captured_mi_execute_command): Use the
555         INTERP_CONSOLE symbol rather than explicit "console".
556
557 2016-06-21  Pedro Alves  <palves@redhat.com>
558
559         * infcmd.c (prepare_execution_command): Use
560         all_uis_on_sync_execution_starting.
561         * infrun.c (all_uis_on_sync_execution_starting): New function.
562         * infrun.h (all_uis_on_sync_execution_starting): Declare.
563
564 2016-06-21  Pedro Alves  <palves@redhat.com>
565
566         * annotate.c: Include top.h.
567         (async_background_execution_p): Delete.
568         (print_value_flags): Check the UI's prompt state rather then
569         async_background_execution_p.
570         * event-loop.c (start_event_loop): Set the prompt state to
571         PROMPT_NEEDED.
572         * event-top.c (display_gdb_prompt, async_enable_stdin)
573         (async_disable_stdin): Check the current UI's prompt state instead
574         of the sync_execution global.
575         (command_line_handler): Set the prompt state to PROMPT_NEEDED
576         before running a command, and display the prompt if still needed
577         afterwards.
578         * infcall.c (struct call_thread_fsm) <waiting_ui>: New field.
579         (new_call_thread_fsm): New parameter 'waiting_ui'.  Store it.
580         (call_thread_fsm_should_stop): Set the prompt state to
581         PROMPT_NEEDED.
582         (run_inferior_call): Adjust to temporarily set the prompt state to
583         PROMPT_BLOCKED instead of using the sync_execution global.
584         (call_function_by_hand_dummy): Pass the current UI to
585         new_call_thread_fsm.
586         * infcmd.c: Include top.h.
587         (continue_1): Check the current UI's prompt state instead of the
588         sync_execution global.
589         (continue_command): Validate global execution state before calling
590         prepare_execution_command.
591         (step_1): Call all_uis_check_sync_execution_done.
592         (attach_post_wait): Don't call async_enable_stdin here.  Remove
593         reference to sync_execution.
594         * infrun.c (sync_execution): Delete global.
595         (follow_fork_inferior)
596         (reinstall_readline_callback_handler_cleanup): Check the current
597         UI's prompt state instead of the sync_execution global.
598         (check_curr_ui_sync_execution_done)
599         (all_uis_check_sync_execution_done): New functions.
600         (fetch_inferior_event): Call all_uis_check_sync_execution_done
601         instead of trying to determine whether the global sync execution
602         changed.
603         (handle_no_resumed): Check the prompt state of all UIs.
604         (normal_stop): Emit the no unwait-for even to all PROMPT_BLOCKED
605         UIs.  Emit the "Switching to" notification to all UIs.  Enable
606         stdin in all UIs.
607         * infrun.h (sync_execution): Delete.
608         (all_uis_check_sync_execution_done): Declare.
609         * main.c (captured_command_loop): Don't call
610         interp_pre_command_loop if the prompt is blocked.
611         (catch_command_errors, catch_command_errors_const): Adjust.
612         (captured_main): Set the initial prompt state to PROMPT_NEEDED.
613         * mi/mi-interp.c (display_mi_prompt): Set the prompt state to
614         PROMPTED.
615         (mi_interpreter_resume): Don't clear sync_execution.  Remove hack
616         comment.
617         (mi_execute_command_input_handler): Set the prompt state to
618         PROMPT_NEEDED before executing the command, and only display the
619         prompt if the prompt state is PROMPT_NEEDED afterwards.
620         (mi_on_resume_1): Adjust to check the prompt state.
621         * target.c (target_terminal_inferior): Adjust to check the prompt
622         state.
623         * top.c (wait_sync_command_done, maybe_wait_sync_command_done)
624         (execute_command): Check the current UI's prompt state instead of
625         sync_execution.
626         * top.h (enum prompt_state): New.
627         (struct ui) <prompt_state>: New field.
628         (ALL_UIS): New macro.
629
630 2016-06-21  Pedro Alves  <palves@redhat.com>
631
632         * top.c (gdb_secondary_prompt_depth): Delete.
633         (gdb_in_secondary_prompt_p): Add ui parameter.  Use it.
634         (gdb_readline_wrapper_cleanup, gdb_readline_wrapper): Adjust to
635         per-UI gdb_secondary_prompt_depth.
636         * top.h (struct ui) <secondary_prompt_depth>: New field.
637
638 2016-06-21  Pedro Alves  <palves@redhat.com>
639
640         * cli/cli-interp.c (cli_interpreter_pre_command_loop): New
641         function.
642         (cli_interp_procs): Install it instead of cli_command_loop.
643         * cli/cli-interp.h (cli_interpreter_pre_command_loop): Declare.
644         * event-top.c (cli_command_loop): Delete.
645         * interps.c (interp_new): Remove reference to command_loop_proc.
646         (current_interp_command_loop): Delete.
647         (interp_pre_command_loop): New function.
648         (interp_command_loop_ftype): Delete.
649         * interps.h (interp_pre_command_loop_ftype): New typedef.
650         (struct interp_procs) <command_loop_proc>: Delele field.
651         <pre_command_loop_proc>: New field.
652         (current_interp_command_loop): Delete declaration.
653         (interp_pre_command_loop): New declaration.
654         * main.c (captured_command_loop): Call interp_pre_command_loop
655         instead of current_interp_command_loop and start an event loop.
656         * mi/mi-interp.c (mi_command_loop): Delete.
657         (mi_interpreter_pre_command_loop): New.
658         (mi_interp_procs): Update.
659         * tui/tui-interp.c (tui_interp_procs): Install
660         cli_interpreter_pre_command_loop instead of cli_command_loop.
661
662 2016-06-21  Pedro Alves  <palves@redhat.com>
663
664         * interps.c (current_interpreter): New function.
665         * interps.h (current_interpreter): New declaration.
666         * mi/mi-cmds.h (raw_stdout): Delete declaration.
667         * mi/mi-common.h (struct mi_interp) <raw_stdout,
668         saved_raw_stdout>: New field.
669         * mi/mi-interp.c (display_mi_prompt): New parameter 'mi'.  Adjust
670         to per-UI raw_stdout.
671         (mi_interpreter_init): Adjust to per-UI raw_stdout.
672         (mi_on_sync_execution_done, mi_execute_command_input_handler)
673         (mi_command_loop): Pass MI instance to display_mi_prompt.
674         (mi_on_normal_stop_1, mi_output_running_pid, mi_on_resume_1)
675         (mi_on_resume): Adjust to per-UI raw_stdout.
676         (saved_raw_stdout): Delete.
677         (mi_set_logging): Adjust to per-UI raw_stdout and
678         saved_raw_stdout.
679         * mi/mi-main.c (raw_stdout): Delete.
680         (mi_cmd_gdb_exit, captured_mi_execute_command)
681         (mi_print_exception, mi_load_progress): Adjust to per-UI
682         raw_stdout.
683         (print_diff_now, mi_print_timing_maybe): New ui_file parameter.
684         Pass it along.
685         (print_diff): New ui_file parameter.  Send output there instead of
686         raw_stdout.
687         * mi/mi-main.h (struct ui_file): Forward declare.
688         (mi_print_timing_maybe): Add ui_file parameter.
689
690 2016-06-21  Pedro Alves  <palves@redhat.com>
691
692         * mi/mi-interp.c (display_mi_prompt): New function.
693
694 2016-06-21  Pedro Alves  <palves@redhat.com>
695
696         * target.c (target_terminal_inferior): Bail out after
697         unregistering input_fd if not on the main UI.
698         (target_terminal_ours): Bail out after registering input_fd if not
699         on the main UI.
700         (target_terminal_ours_for_output): Bail out if not on the main UI.
701
702 2016-06-21  Pedro Alves  <palves@redhat.com>
703
704         * event-top.c (restore_ui_cleanup): Make extern.
705         * infrun.c (fetch_inferior_event): Always switch to the main UI.
706         * top.h (restore_ui_cleanup): Declare.
707
708 2016-06-21  Pedro Alves  <palves@redhat.com>
709
710         PR mi/20034
711         * cli/cli-interp.c: Include cli-interp.h and event-top.h.
712         (cli_interpreter_resume): Pass 1 to gdb_setup_readline.  Set the
713         UI's input_handler here.
714         (cli_interpreter_supports_command_editing): New function.
715         (cli_interp_procs): Install it.
716         * cli/cli-interp.h: New file.
717         * event-top.c (async_command_editing_p): Rename to ...
718         (set_editing_cmd_var): ... this.
719         (change_line_handler): Add parameter 'editing', and use it.  Bail
720         early if the interpreter doesn't support editing.  Don't touch
721         readline state if editing is off.
722         (gdb_rl_callback_handler_remove, gdb_rl_callback_handler_install)
723         (gdb_rl_callback_handler_reinstall): Assert the current UI is the
724         main UI.
725         (display_gdb_prompt): Don't call gdb_rl_callback_handler_remove if
726         not using readline.  Check whether the current UI is using command
727         editing instead of checking the async_command_editing_p global.
728         (set_async_editing_command): Delete.
729         (gdb_setup_readline): Add 'editing' parameter.  Only allow editing
730         on the main UI.  Don't touch readline state if editing is off.
731         (gdb_disable_readline): Don't touch readline state if editing is
732         off.
733         * event-top.h (gdb_setup_readline): Add 'int' parameter.
734         (set_async_editing_command): Delete declaration.
735         (change_line_handler, command_line_handler): Declare.
736         (async_command_editing_p): Rename to ...
737         (set_editing_cmd_var): ... this.
738         * infrun.c (reinstall_readline_callback_handler_cleanup): Check
739         whether the current UI has editing enabled rather than checking
740         the async_command_editing_p global.
741         * interps.c (interp_supports_command_editing): New function.
742         * interps.h (interp_supports_command_editing_ftype): New typedef.
743         (struct interp_procs) <supports_command_editing_proc>: New field.
744         (interp_supports_command_editing): Declare.
745         * mi/mi-interp.c (mi_interpreter_resume): Pass 0 to
746         gdb_setup_readline.  Don't clear the async_command_editing_p
747         global.  Update comments.
748         * top.c (gdb_readline_wrapper_line, gdb_readline_wrapper): Check
749         whether the current UI has editing enabled rather than checking
750         the async_command_editing_p global.  Don't touch readline state if
751         editing is off.
752         (undo_terminal_modifications_before_exit): Switch to the main UI.
753         Unconditionally call gdb_disable_readline.
754         (set_editing): New function.
755         (show_async_command_editing_p): Rename to ...
756         (show_editing): ... this.  Show the state of the current UI.
757         (_initialize_top): Adjust.
758         * top.h (struct ui) <command_editing>: New field.
759         * tui/tui-interp.c: Include cli/cli-interp.h.
760         (tui_resume): Pass 1 to gdb_setup_readline.  Set the UI's
761         input_handler.
762         (tui_interp_procs): Install
763         cli_interpreter_supports_command_editing.
764         * tui/tui-io.c (tui_getc): Check whether the current UI has
765         editing enabled rather than checking the async_command_editing_p
766         global.
767
768 2016-06-21  Pedro Alves  <palves@redhat.com>
769
770         * top.c: Call gen_ret_current_ui_field_ptr for current_uiout.
771         * top.h (struct ui) <m_current_uiout>: New field.
772         * ui-out.c (current_uiout): Delete.
773         * ui-out.h (current_uiout): Delete.
774         (current_ui_current_uiout_ptr): New declaration.
775         (current_uiout): Reimplement as wrapper around
776         current_ui_current_uiout_ptr.
777
778 2016-06-21  Pedro Alves  <palves@redhat.com>
779
780         * ui-out.c (default_ui_out_impl): Delete.
781         (def_uiout): Delete.
782         (current_uiout): Set to NULL.
783         (default_table_begin, default_table_body, default_table_end)
784         (default_table_header, default_begin, default_end)
785         (default_field_int, default_field_skip, default_field_string)
786         (default_field_fmt, default_spaces, default_text, default_message)
787         (default_wrap_hint, default_flush, default_data_destroy): Delete.
788
789 2016-06-21  Pedro Alves  <palves@redhat.com>
790
791         * event-top.c (gdb_setup_readline): Pass the UI's outstream and
792         errstream to stdout_fileopen and stderr_fileopen.
793         * exceptions.c: Include top.h.
794         (print_flush): Open the current UI's outstream file descriptor,
795         instead of hardcoding file descriptor 1.
796         * main.c (captured_main): Save the main UI's out and error
797         streams.  Adjust stderr_fileopen call.
798         * top.h (struct ui) <outstream, errstream>: New fields.
799         * ui-file.c (stderr_fileopen): Add stream parameter.  Use it
800         instead of stderr.
801         * ui-file.h (stderr_fileopen): Add stream parameter and update
802         comment.
803
804 2016-06-21  Pedro Alves  <palves@redhat.com>
805
806         * event-top.c (input_fd): Delete.
807         (stdin_event_handler): Switch to the UI whose input descriptor got
808         the event.  Adjust to per-UI input_fd.
809         (gdb_setup_readline): Don't set the input_fd global.  Adjust to
810         per-UI input_fd.
811         (gdb_disable_readline): Adjust to per-UI input_fd.
812         * event-top.h (input_fd): Delete declaration.
813         * linux-nat.c (linux_nat_terminal_inferior): Don't remove input_fd
814         from the event-loop here.
815         (linux_nat_terminal_ours): Don't register input_fd in the
816         event-loop here.
817         * main.c (captured_main): Adjust to per-UI input_fd.
818         * remote.c (remote_terminal_inferior): Don't remove input_fd from
819         the event-loop here.
820         (remote_terminal_ours): Don't register input_fd in the event-loop
821         here.
822         * target.c: Include top.h and event-top.h.
823         (target_terminal_inferior): Remove input_fd from the event-loop
824         here.
825         (target_terminal_ours): Register input_fd in the event-loop.
826         * top.h (struct ui) <input_fd>: New field.
827
828 2016-06-21  Pedro Alves  <palves@redhat.com>
829
830         * cli/cli-script.c (execute_user_command, read_next_line)
831         (read_next_line): Adjust to per-UI instream.
832         * event-top.c (stdin_event_handler, command_handler)
833         (handle_line_of_input, command_line_handler)
834         (gdb_readline_no_editing_callback, async_sigterm_handler)
835         (gdb_setup_readline): Likewise.
836         * inflow.c: Include top.h.
837         (gdb_has_a_terminal, child_terminal_init_with_pgrp)
838         (gdb_save_tty_state, child_terminal_inferior)
839         (child_terminal_ours_1, copy_terminal_info): Use the main UI.
840         (initialize_stdin_serial): Adjust to per-UI instream.
841         * main.c (captured_command_loop, captured_main): Adjust to per-UI
842         instream.
843         * mi/mi-interp.c (mi_execute_command_wrapper): Likewise.
844         * python/python.c (python_interactive_command): Likewise.
845         * terminal.h (struct ui): Forward declare.
846         (initialize_stdin_serial): Add struct ui parameter.
847         * top.c (instream): Delete.
848         (do_restore_instream_cleanup, read_command_file, dont_repeat)
849         (gdb_readline_no_editing, command_line_input)
850         (input_from_terminal_p, gdb_init): Adjust to per-UI instream.
851         * top.h (struct ui) <instream>: New field.
852         (instream): Delete declaration.
853         (quit): Adjust to per-UI instream.
854
855 2016-06-21  Pedro Alves  <palves@redhat.com>
856
857         * event-loop.c: Include top.h.
858         (invoke_async_signal_handlers): Switch to the main UI.
859         * event-top.c (main_ui_): Update comment.
860         (main_ui): New global.
861         * top.h (main_ui): Declare.
862
863 2016-06-21  Pedro Alves  <palves@redhat.com>
864
865         * cli/cli-interp.c (cli_interp): Delete.
866         (as_cli_interp): New function.
867         (cli_on_normal_stop, cli_on_signal_received)
868         (cli_on_end_stepping_range, cli_on_signal_exited, cli_on_exited)
869         (cli_on_no_history): Send output to all CLI UIs.
870         (cli_on_sync_execution_done, cli_on_command_error): Skip output if
871         the top level interpreter is not a CLI.
872         (cli_interpreter_init): Don't set cli_interp or install observers
873         here.
874         (_initialize_cli_interp): Install observers here.
875         * event-top.c (main_ui_, ui_list): New globals.
876         (current_ui): Point to main_ui_.
877         (restore_ui_cleanup, switch_thru_all_uis_init)
878         (switch_thru_all_uis_cond, switch_thru_all_uis_next): New
879         functions.
880         * mi/mi-interp.c (as_mi_interp): New function.
881         (mi_interpreter_init): Don't install observers here.
882         (mi_on_sync_execution_done): Skip output if the top level
883         interpreter is not a MI.
884         (mi_new_thread, mi_thread_exit, mi_record_changed)
885         (mi_inferior_added, mi_inferior_appeared, mi_inferior_exit)
886         (mi_inferior_removed): Send output to all MI UIs.
887         (find_mi_interpreter, mi_interp_data): Delete.
888         (find_mi_interp): New function.
889         (mi_on_signal_received, mi_on_end_stepping_range)
890         (mi_on_signal_exited, mi_on_exited, mi_on_no_history): Send output
891         to all MI UIs.
892         (mi_on_normal_stop): Rename to ...
893         (mi_on_normal_stop_1): ... this.
894         (mi_on_normal_stop): Reimplement, sending output to all MI UIs.
895         (mi_traceframe_changed, mi_tsv_created, mi_tsv_deleted)
896         (mi_tsv_modified, mi_breakpoint_created, mi_breakpoint_deleted)
897         (mi_breakpoint_modified, mi_output_running_pid): Send output to
898         all MI UIs.
899         (mi_on_resume): Rename to ...
900         (mi_on_resume_1): ... this.  Don't handle infcalls here.
901         (mi_on_resume): Reimplement, sending output to all MI UIs.
902         (mi_solib_loaded, mi_solib_unloaded, mi_command_param_changed)
903         (mi_memory_changed): Send output to all MI UIs.
904         (report_initial_inferior): Install observers here.
905         * top.h (struct ui) <next>: New field.
906         (ui_list): Declare.
907         (struct switch_thru_all_uis): New.
908         (switch_thru_all_uis_init, switch_thru_all_uis_cond)
909         (switch_thru_all_uis_next): Declare.
910         (SWITCH_THRU_ALL_UIS): New macro.
911         * tui/tui-interp.c (tui_interp): Delete global.
912         (as_tui_interp): New function.
913         (tui_on_normal_stop, tui_on_signal_received)
914         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
915         (tui_on_no_history): Send output to all TUI UIs.
916         (tui_on_sync_execution_done, tui_on_command_error): Skip output if
917         the top level interpreter is not a TUI.
918         (tui_init): Don't set tui_interp or install observers here.
919         (_initialize_tui_interp): Install observers here.
920
921 2016-06-21  Pedro Alves  <palves@redhat.com>
922
923         * cli/cli-interp.c (cli_uiout): Delete, moved into ...
924         (struct cli_interp): ... this new structure.
925         (cli_on_normal_stop, cli_on_signal_received)
926         (cli_on_end_stepping_range, cli_on_signal_exited, cli_on_exited)
927         (cli_on_no_history): Use interp_ui_out.
928         (cli_interpreter_init): If top level, set the cli_interp global.
929         (cli_interpreter_init): Return the interp's data instead of NULL.
930         (cli_interpreter_resume, cli_interpreter_exec, cli_ui_out): Adjust
931         to cli_uiout being in the interpreter's data.
932         (cli_interp_procs): New, factored out from _initialize_cli_interp.
933         (cli_interp_factory): New function.
934         (_initialize_cli_interp): Call interp_factory_register.
935         * interps.c (get_interp_info): New, factored out from ...
936         (get_current_interp_info): ... this.
937         (interp_new): Add parameter 'data'.  Store it.
938         (struct interp_factory): New function.
939         (interp_factory_p): New typedef.  Define a VEC_P.
940         (interpreter_factories): New global.
941         (interp_factory_register): New function.
942         (interp_add): Add 'ui' parameter.  Use get_interp_info and
943         interp_lookup_existing.
944         (interp_lookup): Rename to ...
945         (interp_lookup_existing): ... this.  Add 'ui' parameter.  Don't
946         check for NULL or empty name here.
947         (interp_lookup): Add 'ui' parameter and reimplement.
948         (interp_set_temp, interpreter_exec_cmd): Adjust.
949         (interpreter_completer): Complete on registered interpreter
950         factories instead of interpreters.
951         * interps.h (interp_factory_func): New typedef.
952         (interp_factory_register): Declare.
953         (interp_new, interp_add): Adjust.
954         (interp_lookup): Declare.
955         * main.c (captured_main): Adjust.
956         * mi/mi-interp.c (mi_cmd_interpreter_exec): Adjust.
957         (mi_interp_procs): New, factored out from
958         _initialize_mi_interp.
959         (mi_interp_factory): New function.
960         * python/python.c (execute_gdb_command): Adjust.
961         * tui/tui-interp.c (tui_init): If top level, set the tui_interp
962         global.
963         (tui_interp_procs): New.
964         (tui_interp_factory): New function.
965         (_initialize_tui_interp): Call interp_factory_register.
966
967 2016-06-21  Pedro Alves  <palves@redhat.com>
968
969         * breakpoint.c (bpstat_do_actions_1): Access the current UI's
970         async field instead of the interpreter_async global.
971         * cli/cli-script.c (execute_user_command, while_command)
972         (if_command, script_from_file): Likewise.
973         * compile/compile.c: Include top.h instead of interps.h.
974         (compile_file_command, compile_code_command)
975         (compile_print_command): Access the current UI's async field
976         instead of the interpreter_async global.
977         * guile/guile.c: Include top.h instead of interps.h.
978         (guile_repl_command, guile_command, gdbscm_execute_gdb_command):
979         Access the current UI's async field instead of the
980         interpreter_async global.
981         * guile/scm-ports.c: Include top.h instead of interps.h.
982         (ioscm_with_output_to_port_worker): Access the current UI's async
983         field instead of the interpreter_async global.
984         * inf-loop.c (inferior_event_handler): Likewise.
985         * infcall.c (run_inferior_call): Likewise.
986         * infrun.c (reinstall_readline_callback_handler_cleanup)
987         (fetch_inferior_event): Likewise.
988         * interps.c (interpreter_async): Delete.
989         (struct ui_interp_info): New.
990         (get_current_interp_info): New function.
991         (interp_list, current_interpreter, top_level_interpreter_ptr):
992         Delete.
993         (interp_add, interp_set, interp_lookup, interp_ui_out)
994         (current_interp_set_logging, interp_set_temp)
995         (current_interp_named_p): Adjust to per-UI interpreters.
996         (command_interpreter): Delete.
997         (command_interp, current_interp_command_loop, interp_quiet_p)
998         (interp_exec, interpreter_exec_cmd, interpreter_completer)
999         (top_level_interpreter, top_level_interpreter_data): Adjust to
1000         per-UI interpreters.
1001         * interps.h (interpreter_async): Delete.
1002         * main.c (captured_command_loop): Access the current UI's async
1003         field instead of the interpreter_async global.
1004         * python/python.c (python_interactive_command, python_command)
1005         (execute_gdb_command): Likewise.
1006         * top.c (maybe_wait_sync_command_done, execute_command_to_string):
1007         Access the current UI's async field instead of the
1008         interpreter_async global.
1009         * top.h (struct tl_interp_info): Forward declare.
1010         (struct ui) <interp_info, async>: New fields.
1011
1012 2016-06-21  Pedro Alves  <palves@redhat.com>
1013
1014         * main.c (gdb_stdout, gdb_stderr, gdb_stdlog, gdb_stdin): Delete
1015         globals.
1016         (gen_ret_current_ui_field_ptr): New macro.  Use it to generate
1017         wrappers for gdb_stdout, gdb_stderr, gdb_stdlog and gdb_stdin.
1018         * top.h (struct ui) <m_gdb_stdout, m_gdb_stdin, m_gdb_stderr,
1019         m_gdb_stdlog>: New fields.
1020         (current_ui_gdb_stdout_ptr, current_ui_gdb_stdin_ptr)
1021         (current_ui_gdb_stderr_ptr, current_ui_gdb_stdlog_ptr): Declare.
1022         (gdb_stdout, gdb_stdin, gdb_stderr, gdb_stdlog): Reimplement as
1023         macros.
1024
1025 2016-06-21  Pedro Alves  <palves@redhat.com>
1026
1027         * event-top.c: Update readline-related comments.
1028         (input_handler, call_readline): Delete globals.
1029         (gdb_rl_callback_handler): Call the current UI's input_handler
1030         method.
1031         (change_line_handler): Adjust to set current UI's properties
1032         instead of globals.
1033         (current_ui_, current_ui): New globals.
1034         (get_command_line_buffer): Rewrite to refer to the current UI.
1035         (stdin_event_handler): Adjust to call the call_readline method of
1036         the current UI.
1037         (gdb_readline_no_editing_callback): Adjust to call the current UI's
1038         input_handler method.
1039         (gdb_setup_readline): Adjust to set current UI's properties
1040         instead of globals.
1041         * event-top.h (call_readline, input_handler): Delete declarations.
1042         * mi/mi-interp.c (mi_interpreter_resume): Adjust to set current
1043         UI's properties instead of globals.
1044         * top.c (gdb_readline_wrapper_cleanup): Adjust to set current UI's
1045         properties instead of globals.
1046         (gdb_readline_wrapper): Adjust to call and set current UI's
1047         methods instead of globals.
1048         * top.h: Include buffer.h and event-loop.h.
1049         (struct ui): New struct.
1050         (current_ui): New declaration.
1051
1052 2016-06-21  Pedro Alves  <palves@redhat.com>
1053
1054         * ada-lang.c (ada_exception_name_addr_1): Add comment.
1055         (print_it_exception): Select the current frame.
1056
1057 2016-06-17  Yan-Ting Lin  <currygt52@gmail.com>
1058
1059         * Makefile.in (ALL_TARGET_OBS): Add nds32-tdep.o.
1060         (HFILES_NO_SRCDIR): Add nds32-tdep.h.
1061         (ALLDEPFILES): Add nds32-tdep.c.
1062         * NEWS: Mention new NDS32 port.
1063         * configure.tgt: Add NDS32.
1064         * nds32-tdep.c: New file.
1065         * nds32-tdep.h: New file.
1066         * features/Makefile (XMLTOC): Add nds32.xml.
1067         * features/nds32-core.xml: New file.
1068         * features/nds32-fpu.xml: New file.
1069         * features/nds32-system.xml: New file.
1070         * features/nds32.c: New file (generated).
1071         * features/nds32.xml: New file.
1072
1073 2016-06-14  John Baldwin  <jhb@FreeBSD.org>
1074
1075         * v850-tdep.c (v850_use_struct_convention): Trim type length checks.
1076
1077 2016-06-14  John Baldwin  <jhb@FreeBSD.org>
1078
1079         * tui/tui-stack.c (tui_show_frame_info): Fix type mismatch.
1080
1081 2016-06-14  John Baldwin  <jhb@FreeBSD.org>
1082
1083         * rs6000-tdep.c (ppc_process_record_op31): Initialize ra.
1084
1085 2016-06-13  Nick Clifton  <nickc@redhat.com>
1086
1087         * gdbtypes.c (replace_type): Fix assertion.
1088
1089 2016-06-10  Tom Tromey  <tom@tromey.com>
1090
1091         * gdbtypes.c (arch_type, arch_integer_type, arch_character_type)
1092         (arch_boolean_type, arch_float_type, arch_complex_type)
1093         (arch_flags_type, append_flags_type_field)
1094         (append_flags_type_flag, arch_composite_type)
1095         (append_composite_type_field_raw)
1096         (append_composite_type_field_aligned)
1097         (append_composite_type_field): Make "name" parameter const.
1098         * gdbtypes.h (arch_type, arch_integer_type, arch_character_type)
1099         (arch_boolean_type, arch_float_type, arch_complex_type)
1100         (append_composite_type_field, append_composite_type_field_aligned)
1101         (append_composite_type_field_raw, arch_flags_type)
1102         (append_flags_type_field, append_flags_type_flag): Constify.
1103
1104 2016-06-10  Tom Tromey  <tom@tromey.com>
1105
1106         PR rust/20110:
1107         * rust-exp.y (lex_number): Don't truncate large numbers to i32.
1108
1109 2016-06-10  Tom Tromey  <tom@tromey.com>
1110
1111         * Makefile.in (COMMON_OBS): Remove rust-exp.o.
1112         (YYFILES): Add rust-exp.c.
1113         (YYOBJ): Add rust-exp.o.
1114         (local-maintainer-clean): Remove rust-exp.c.
1115
1116 2016-06-09  Toshihito Kikuchi  <k.toshihito@yahoo.de>
1117
1118         * NEWS: Mention that GDB now supports a negative repeat count in
1119         the 'x' command.
1120         * printcmd.c (decode_format): Allow '-' in the parameter
1121         "string_ptr" to accept a negative repeat count.
1122         (find_instruction_backward): New function.
1123         (read_memory_backward): New function.
1124         (integer_is_zero): New function.
1125         (find_string_backward): New function.
1126         (do_examine): Use new functions to examine memory backward.
1127         (_initialize_printcmd): Mention that 'x' command supports a negative
1128         repeat count.
1129
1130 2016-06-09  Toshihito Kikuchi  <k.toshihito@yahoo.de>
1131
1132         * MAINTAINERS (Write After Approval): Add Toshihito Kikuchi.
1133
1134 2016-06-09  Tom Tromey  <tom@tromey.com>
1135
1136         PR python/19819:
1137         * python/py-xmethods.c (invoke_method_name)
1138         (py_get_result_type_method_name, py_invoke_method_name): Remove.
1139         (gdbpy_initialize_xmethods): Don't initialize
1140         py_invoke_method_name, py_get_result_type_method_name.
1141
1142 2016-06-07  Simon Marchi  <simon.marchi@ericsson.com>
1143
1144         * mi/mi-interp.c (mi_record_changed): Add missing braces.
1145
1146 2016-06-07  Bernhard Heckel  <bernhard.heckel@intel.com>
1147
1148         * findvar.c (follow_static_link): Check for valid pointer.
1149
1150 2016-06-06  Simon Marchi  <simon.marchi@ericsson.com>
1151
1152         * NEWS: Mention the new fields in =record-started.
1153         * common/btrace-common.h (btrace_format_short_string): New function
1154         declaration.
1155         * common/btrace-common.c (btrace_format_short_string): New
1156         function.
1157         * mi/mi-interp.c (mi_record_changed): Output method and format
1158         fields in the =record-started record.
1159         * record-btrace.c (record_btrace_open): Adapt record_changed
1160         notification.
1161         * record-full.c (record_full_open): Likewise.
1162         * record.c (cmd_record_stop): Likewise.
1163
1164 2016-06-02  Jon Turney  <jon.turney@dronecode.org.uk>
1165
1166         * windows-nat.c (handle_output_debug_string): Return type of
1167         gdb_signal_from_host() is gdb_signal, not an int.
1168         (windows_get_exec_module_filename): Add pointer casts for C++.
1169
1170 2016-06-02  Tom Tromey  <tom@tromey.com>
1171
1172         PR python/18984:
1173         * python/python.c (gdbpy_solib_name): Use GDB_PY_LLU_ARG.
1174
1175 2016-06-01  Pedro Alves  <palves@redhat.com>
1176
1177         * remote-fileio.c (remote_fio_ctrl_c_flag, remote_fio_sa)
1178         (remote_fio_osa)
1179         (remote_fio_ofunc, remote_fileio_sig_init, remote_fileio_sig_set)
1180         (remote_fileio_sig_exit, remote_fileio_ctrl_c_signal_handler):
1181         Delete.
1182         (remote_fileio_o_quit_handler): New global.
1183         (remote_fileio_quit_handler): New function.
1184         (remote_fileio_reply): Check the quit flag instead of the custom
1185         'remote_fio_ctrl_c_flag' flag.  Restore the quit handler instead
1186         of changing the SIGINT handler.
1187         (do_remote_fileio_request): Override the quit handler instead of
1188         changing the SIGINT handler.
1189
1190 2016-06-01  Nick Clifton  <nickc@redhat.com>
1191
1192         * common/common-utils.c (xmalloc_failed): New function.  Provided
1193         so that the version in libiberty is not linked in.
1194
1195 2016-06-01  Markus Metzger  <markus.t.metzger@intel.com>
1196
1197         * infcmd.c (skip_finish_frames): New.
1198         (finish_command): Call skip_finish_frames.
1199
1200 2016-06-01  Yao Qi  <yao.qi@linaro.org>
1201
1202         PR remote/19998
1203         * remote-fileio.c (remote_fileio_ctrl_c_signal_handler): Call
1204         quit_serial_event_set.
1205
1206 2016-06-01  Joel Brobecker  <brobecker@adacore.com>
1207
1208         GDB 7.11.1 released.
1209
1210 2016-05-31  Martin Galvan  <martin.galvan@tallertechnologies.com>
1211
1212         PR c++/19893
1213         * dwarf2loc.c (coerce_pieced_ref, indirect_synthetic_pointer,
1214         fetch_const_value_from_synthetic_pointer): New functions.
1215         (indirect_pieced_value): Move lower half to indirect_synthetic_pointer.
1216         (pieced_value_funcs): Implement coerce_ref.
1217         * valops.c (value_addr): Call coerce_ref for synthetic references.
1218         * valprint.c (valprint_check_validity): Return true for synthetic
1219         references.  Also, don't show "<synthetic pointer>" if they reference
1220         addressable values.
1221         (generic_val_print_ref): Handle synthetic references.  Also move some
1222         code to print_ref_address.
1223         (print_ref_address, get_value_addr_contents): New functions.
1224
1225 2016-05-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
1226
1227         PR c++/15231
1228         * dwarf2read.c (enum pc_bounds_kind): Add PC_BOUNDS_INVALID.
1229         (process_psymtab_comp_unit_reader, read_func_scope): Adjust callers.
1230         (read_lexical_block_scope): Import DIEs from bare DW_TAG_lexical_block.
1231         (read_call_site_scope): Adjust callers.
1232         (dwarf2_get_pc_bounds): Implement pc_bounds_invalid.
1233         (dwarf2_get_subprogram_pc_bounds, get_scope_pc_bounds): Adjust callers.
1234
1235 2016-05-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
1236
1237         Code cleanup: dwarf2_get_pc_bounds: -1/0/+1 -> enum
1238         * dwarf2read.c (enum pc_bounds_kind) New.
1239         (dwarf2_get_pc_bounds): Use it in the declaration.
1240         (process_psymtab_comp_unit_reader): Adjust caller.  Rename has_pc_info
1241         to cu_bounds_kind.
1242         (read_func_scope, read_lexical_block_scope, read_call_site_scope):
1243         Adjust callers.
1244         (dwarf2_get_pc_bounds): Use enum pc_bounds_kind in the definition.
1245         (dwarf2_get_subprogram_pc_bounds, get_scope_pc_bounds): Adjust callers.
1246
1247 2016-05-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
1248
1249         * NEWS (QCatchSyscalls): Remove the parameter.  Include ...
1250         (QCatchSyscalls:1 in qSupported) ... this separate entry which got
1251         deleted.
1252
1253 2016-05-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
1254
1255         * NEWS (N stop reply): Remove empty line.
1256
1257 2016-05-28  Alan Modra  <amodra@gmail.com>
1258
1259         * compile/compile-object-load.c (link_callbacks_multiple_definition,
1260         link_callbacks_warning, link_callbacks_undefined_symbol,
1261         link_callbacks_undefined_symbol, link_callbacks_reloc_overflow,
1262         link_callbacks_reloc_dangerous,
1263         link_callbacks_unattached_reloc): Return void.
1264
1265 2016-05-27  Andrew Burgess  <andrew.burgess@embecosm.com>
1266
1267         * opencl-lang.c (evaluate_subexp_opencl): If
1268         EVAL_AVOID_SIDE_EFFECTS mode, forward the VALUE_LVAL attribute to
1269         the returned value in the STRUCTOP_STRUCT case.
1270
1271 2016-05-27  Andrew Burgess  <andrew.burgess@embecosm.com>
1272
1273         * eval.c (evaluate_subexp_standard): If EVAL_AVOID_SIDE_EFFECTS
1274         mode, forward the VALUE_LVAL attribute to the returned value in
1275         the STRUCTOP_PTR case.
1276
1277 2016-05-25  Tom Tromey  <tom@tromey.com>
1278
1279         * python/py-value.c (value_object_as_number): Use correct spelling
1280         of HAVE_LIBPYTHON2_4.
1281
1282 2016-05-25  Bernhard Heckel  <bernhard.heckel@intel.com>
1283
1284         * f-typeprint.c (f_type_print_base): Replace 0 by show.
1285
1286 2016-05-25  Bernhard Heckel  <bernhard.heckel@intel.com>
1287
1288         * f-typeprint.c (f_type_print_base): Decrease show by one.
1289
1290 2016-05-25  Bernhard Heckel  <bernhard.heckel@intel.com>
1291
1292         * f-typeprint.c (f_type_print_base): Don't print fields when show < 0.
1293
1294 2016-05-25  Bernhard Heckel  <bernhard.heckel@intel.com>
1295
1296         * f-typeprint.c (f_type_print_base): Take print level into account.
1297
1298 2016-05-24  Tom Tromey  <tom@tromey.com>
1299
1300         PR python/17386:
1301         * python/py-value.c (value_object_as_number): Add
1302         nb_inplace_floor_divide, nb_inplace_true_divide, nb_index.
1303
1304 2016-05-24  Tom Tromey  <tom@tromey.com>
1305
1306         * python/py-value.c (value_object_as_number): Add
1307         nb_inplace_divide for Python 2.
1308
1309 2016-05-23  Tom Tromey  <tom@tromey.com>
1310
1311         PR python/17981:
1312         * python/py-breakpoint.c (gdbpy_breakpoints): Return a new tuple
1313         when there are no breakpoints.
1314
1315 2016-05-24  Pedro Alves  <palves@redhat.com>
1316
1317         PR gdb/19828
1318         * linux-nat.c (attach_proc_task_lwp_callback): Mark the lwp
1319         resumed, and add the thread to GDB's thread list.
1320
1321 2016-05-24  Pedro Alves  <palves@redhat.com>
1322
1323         PR gdb/19828
1324         * linux-nat.c (get_pending_status): If the thread reported the
1325         event to the core and it's pending, use the pending status signal
1326         number.
1327
1328 2016-05-24  Pedro Alves  <palves@redhat.com>
1329
1330         PR gdb/19828
1331         * linux-nat.c (lwp_lwpid_htab): New htab.
1332         (lwp_info_hash, lwp_lwpid_htab_eq, lwp_lwpid_htab_create)
1333         (lwp_lwpid_htab_add_lwp): New functions.
1334         (lwp_list): Tweak comment.
1335         (lwp_list_add, lwp_list_remove, lwp_lwpid_htab_remove_pid): New
1336         functions.
1337         (purge_lwp_list): Rewrite, using htab_traverse_noresize.
1338         (add_initial_lwp): Add lwp to htab too.  Use lwp_list_add.
1339         (delete_lwp): Use lwp_list_remove.  Remove htab too.
1340         (find_lwp_pid): Search in htab.
1341         (_initialize_linux_nat): Call lwp_lwpid_htab_create.
1342         * linux-nat.h (struct lwp_info) <prev>: New field.
1343
1344 2016-05-24  Pedro Alves  <palves@redhat.com>
1345
1346         PR gdb/19828
1347         * linux-nat.c (lwp_lwpid_htab): New htab.
1348         (lwp_info_hash, lwp_lwpid_htab_eq, lwp_lwpid_htab_create)
1349         (lwp_lwpid_htab_add_lwp): New functions.
1350         (lwp_list): Tweak comment.
1351         (lwp_list_add, lwp_list_remove, lwp_lwpid_htab_remove_pid): New
1352         functions.
1353         (purge_lwp_list): Rewrite, using htab_traverse_noresize.
1354         (add_initial_lwp): Add lwp to htab too.  Use lwp_list_add.
1355         (delete_lwp): Use lwp_list_remove.  Remove htab too.
1356         (find_lwp_pid): Search in htab.
1357         (_initialize_linux_nat): Call lwp_lwpid_htab_create.
1358         * linux-nat.h (struct lwp_info) <prev>: New field.
1359
1360 2016-05-24  Pedro Alves  <palves@redhat.com>
1361
1362         PR gdb/19828
1363         * linux-nat.c (linux_resume_one_lwp_throw): Clear the LWP's core
1364         field.
1365         (linux_nat_update_thread_list): Don't fetch the core if already
1366         known.
1367
1368 2016-05-24  Pedro Alves  <palves@redhat.com>
1369
1370         PR gdb/19828
1371         * linux-tdep.c (find_mapping_size): Delete.
1372         (linux_vsyscall_range_raw): Rewrite reading from
1373         /proc/PID/task/PID/maps directly instead of using
1374         gdbarch_find_memory_regions.
1375
1376 2016-05-24  Pedro Alves  <palves@redhat.com>
1377
1378         PR gdb/19828
1379         * linux-nat.c (report_thread_events): New global.
1380         (linux_handle_extended_wait): Report
1381         TARGET_WAITKIND_THREAD_CREATED if thread event reporting is
1382         enabled.
1383         (wait_lwp, linux_nat_filter_event): Report all thread exits if
1384         thread event reporting is enabled.  Remove comment.
1385         (filter_exit_event): New function.
1386         (linux_nat_wait_1): Use it.
1387         (linux_nat_thread_events): New function.
1388         (linux_nat_add_target): Install it as target_thread_events method.
1389
1390 2016-05-24  Yan-Ting Lin  <currygt52@gmail.com>
1391
1392         * MAINTAINERS (Write After Approval): Add "Yan-Ting Lin".
1393
1394 2016-05-23  Yao Qi  <yao.qi@arm.com>
1395
1396         * arch-utils.c (default_code_of_frame_writable): New function.
1397         * arch-utils.h (default_code_of_frame_writable): Declare.
1398         * arm-tdep.c (arm_code_of_frame_writable): New function.
1399         (arm_gdbarch_init): Install gdbarch method
1400         code_of_frame_writable if the target is M-profile.
1401         * frame.c (skip_unwritable_frames): New function.
1402         * frame.h (skip_unwritable_frames): Declare.
1403         * gdbarch.sh (code_of_frame_writable): New.
1404         * gdbarch.c, gdbarch.h: Re-generated.
1405         * infcmd.c (finish_command): Call skip_unwritable_frames.
1406
1407 2016-05-23  Tom Tromey  <tom@tromey.com>
1408
1409         PR python/19438, PR python/18393:
1410         * python/py-objfile.c (objfpy_initialize): Initialize self->dict.
1411         * python/py-progspace.c (pspy_initialize): Initialize self->dict.
1412
1413 2016-05-23  Gary Benson  <gbenson@redhat.com>
1414
1415         * nat/gdb_thread_db.h (td_thr_validate_ftype): Remove typedef.
1416         * linux-thread-db.c (struct thread_db_info) <td_thr_validate_p>:
1417         Remove field.
1418         (try_thread_db_load_1): Remove td_thr_validate initialization.
1419
1420 2016-05-23  Jon Boden  <jon@ubuntubsd.org>  (tiny change)
1421
1422         * configure.ac: Search for libutil-freebsd as alternative to libutil.
1423         * configure: Re-generated.
1424
1425 2016-05-19  Andreas Schwab  <schwab@suse.de>
1426
1427         * ia64-libunwind-tdep.c (libunwind_descr): Add cast from void *.
1428         (libunwind_frame_set_descr): Likewise.
1429         (libunwind_frame_cache): Likewise.
1430         (libunwind_frame_dealloc_cache): Likewise.
1431         (libunwind_frame_sniffer): Likewise.
1432         (libunwind_search_unwind_table): Likewise.
1433         (libunwind_sigtramp_frame_sniffer): Likewise.
1434         (libunwind_get_reg_special): Likewise.
1435         (libunwind_load): Likewise.
1436         * ia64-linux-nat.c (ia64_linux_fetch_register): Likewise.
1437         (ia64_linux_store_register): Likewise.
1438         (ia64_linux_xfer_partial): Likewise.
1439         * ia64-tdep.c (ia64_access_reg): Likewise.
1440         (ia64_access_fpreg): Likewise.
1441         (ia64_access_rse_reg): Likewise.
1442         (ia64_access_rse_fpreg): Likewise.
1443
1444 2016-05-18  Tom Tromey  <tom@tromey.com>
1445
1446         * rust-lang.c (rust_subscript): Initialize "high".
1447
1448 2016-05-17  Simon Marchi  <simon.marchi@ericsson.com>
1449
1450         PR gdb/20045
1451         * mi/mi-main.c (mi_on_resume): Call target_can_async_p instead
1452         of target_is_async_p.
1453
1454 2016-05-17  Simon Marchi  <simon.marchi@ericsson.com>
1455
1456         PR gdb/18077
1457         * mi/mi-main.c (run_one_inferior): Use run target to determine
1458         whether to run async or not.
1459         (mi_cmd_exec_run): Likewise.
1460
1461 2016-05-17  Tom Tromey  <tom@tromey.com>
1462
1463         * std-operator.def (OP_RANGE): Rename from OP_F90_RANGE.
1464         * rust-lang.c: Don't include f-lang.h.
1465         (rust_range, rust_compute_range, rust_subscript)
1466         (rust_evaluate_subexp): Update.
1467         * rust-exp.y: Don't include f-lang.h.
1468         (ast_range, convert_ast_to_expression): Update.
1469         * parse.c (operator_length_standard): Update.
1470         * f-lang.h (enum f90_range_type): Move to expression.h.
1471         * f-exp.y: Use OP_RANGE.
1472         * expression.h (enum range_type): New enum; renamed from
1473         f90_range_type.
1474         * expprint.c: Don't include f-lang.h.
1475         (print_subexp_standard, dump_subexp_body_standard): Use OP_RANGE.
1476         * eval.c (value_f90_subarray, evaluate_subexp_standard): Update.
1477
1478 2016-05-17  Tom Tromey  <tom@tromey.com>
1479
1480         * NEWS: Add Rust item.
1481
1482 2016-05-17  Tom Tromey  <tom@tromey.com>
1483             Manish Goregaokar <manishsmail@gmail.com>
1484
1485         * symtab.c (symbol_find_demangled_name): Handle Rust.
1486         * symfile.c (init_filename_language_table): Treat ".rs" as Rust.
1487         * std-operator.def (STRUCTOP_ANONYMOUS, OP_RUST_ARRAY): New
1488         constants.
1489         * rust-lang.h: New file.
1490         * rust-lang.c: New file.
1491         * rust-exp.y: New file.
1492         * dwarf2read.c (read_file_scope): Add Rust producer sniffing.
1493         (dwarf2_compute_name, read_func_scope, read_structure_type)
1494         (read_base_type, read_subrange_type, set_cu_language)
1495         (new_symbol_full, determine_prefix): Handle Rust.
1496         * defs.h (enum language) <language_rust>: New constant.
1497         * Makefile.in (SFILES): Add rust-exp.y, rust-lang.c.
1498         (COMMON_OBS): Add rust-exp.o, rust-lang.o.
1499
1500 2016-05-17  Tom Tromey  <tom@tromey.com>
1501
1502         * valprint.h (struct generic_val_print_array) <array_start,
1503         array_end>: New fields.
1504         * valprint.c (generic_val_print_array): Add "decorations"
1505         parameter.  Use "array_start", "array_end".
1506         (generic_val_print) <TYPE_CODE_ARRAY>: Update.
1507         * p-valprint.c (p_decorations): Update.
1508         * m2-valprint.c (m2_decorations): Update.
1509         * f-valprint.c (f_decorations): Update.
1510         * c-valprint.c (c_decorations): Update.
1511
1512 2016-05-17  Tom Tromey  <tom@tromey.com>
1513
1514         * NEWS: Add "maint selftest" entry.
1515         * selftest.h: New file.
1516         * selftest.c: New file.
1517         * maint.c: Include selftest.h.
1518         (maintenance_selftest): New function.
1519         (_initialize_maint_cmds): Add "maint selftest" command.
1520         * configure.ac (GDB_SELF_TEST): Maybe define.
1521         * config.in, configure: Rebuild.
1522         * Makefile.in (SFILES): Add selftest.c.
1523         (COMMON_OBS): Add selftest.o.
1524
1525 2016-05-17  Tom Tromey  <tom@tromey.com>
1526
1527         * expprint.c: Include f-lang.h.
1528         (print_subexp_standard, dump_subexp_body_standard): Handle
1529         OP_F90_RANGE.
1530
1531 2016-05-17  Tom Tromey  <tom@tromey.com>
1532
1533         * Makefile.in (init.c): Search .y files for initialization
1534         functions.
1535
1536 2016-05-12  Doug Evans  <dje@google.com>
1537
1538         PR symtab/19999
1539         * dwarf2loc.c (dwarf2_find_location_expression): For DWO files still
1540         add base_offset.
1541
1542 2016-05-10  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
1543
1544         * iq2000-tdep.c (iq2000_scan_prologue): Remove if that shouldn't guard
1545         anything.
1546         * linespec.c (add_sal_to_sals): Restore call to symtab_to_fullname.
1547
1548 2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1549
1550         * arm-tdep.c (arm_elf_make_msymbol_special): Use
1551         ARM_GET_SYM_BRANCH_TYPE to get branch type of a symbol.
1552
1553 2016-05-07  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
1554
1555         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Remove unused
1556         variables.
1557         * aarch64-tdep.c (aarch64_skip_prologue): Likewise.
1558         (aarch64_scan_prologue): Likewise.
1559         (aarch64_prologue_prev_register): Likewise.
1560         (aarch64_dwarf2_prev_register): Likewise.
1561         (pass_in_v): Likewise.
1562         (aarch64_push_dummy_call): Likewise.
1563         (aarch64_breakpoint_from_pc): Likewise.
1564         (aarch64_return_in_memory): Likewise.
1565         (aarch64_return_value): Likewise.
1566         (aarch64_displaced_step_b_cond): Likewise.
1567         (aarch64_displaced_step_cb): Likewise.
1568         (aarch64_displaced_step_tb): Likewise.
1569         (aarch64_gdbarch_init): Likewise.
1570         (aarch64_process_record): Likewise.
1571         * alpha-mdebug-tdep.c (alpha_mdebug_init_abi): Likewise.
1572         * alpha-tdep.c (_initialize_alpha_tdep): Likewise.
1573         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1574         * amd64-linux-tdep.c (amd64_dtrace_parse_probe_argument): Likewise.
1575         * amd64-tdep.c (fixup_riprel): Likewise.
1576         * amd64-windows-tdep.c (amd64_windows_frame_decode_epilogue): Likewise.
1577         (amd64_windows_frame_decode_insns): Likewise.
1578         (amd64_windows_frame_cache): Likewise.
1579         (amd64_windows_frame_prev_register): Likewise.
1580         (amd64_windows_frame_this_id): Likewise.
1581         (amd64_windows_init_abi): Likewise.
1582         * arm-linux-tdep.c (arm_linux_get_syscall_number): Likewise.
1583         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1584         * arm-symbian-tdep.c (arm_symbian_init_abi): Likewise.
1585         * arm-tdep.c (arm_make_epilogue_frame_cache): Likewise.
1586         (arm_epilogue_frame_prev_register): Likewise.
1587         (arm_record_vdata_transfer_insn): Likewise.
1588         (arm_record_exreg_ld_st_insn): Likewise.
1589         * auto-load.c (execute_script_contents): Likewise.
1590         (print_scripts): Likewise.
1591         * avr-tdep.c (avr_frame_prev_register): Likewise.
1592         (avr_push_dummy_call): Likewise.
1593         * bfin-linux-tdep.c (bfin_linux_sigframe_init): Likewise.
1594         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
1595         * blockframe.c (find_pc_partial_function_gnu_ifunc): Likewise.
1596         * break-catch-throw.c (fetch_probe_arguments): Likewise.
1597         * breakpoint.c (breakpoint_xfer_memory): Likewise.
1598         (breakpoint_init_inferior): Likewise.
1599         (breakpoint_inserted_here_p): Likewise.
1600         (software_breakpoint_inserted_here_p): Likewise.
1601         (hardware_breakpoint_inserted_here_p): Likewise.
1602         (bpstat_what): Likewise.
1603         (break_range_command): Likewise.
1604         (save_breakpoints): Likewise.
1605         * coffread.c (coff_symfile_read): Likewise.
1606         * cris-tdep.c (cris_push_dummy_call): Likewise.
1607         (cris_scan_prologue): Likewise.
1608         (cris_register_size): Likewise.
1609         (_initialize_cris_tdep): Likewise.
1610         * d-exp.y: Likewise.
1611         * dbxread.c (dbx_read_symtab): Likewise.
1612         (process_one_symbol): Likewise.
1613         (coffstab_build_psymtabs): Likewise.
1614         (elfstab_build_psymtabs): Likewise.
1615         * dicos-tdep.c (dicos_init_abi): Likewise.
1616         * disasm.c (do_mixed_source_and_assembly): Likewise.
1617         (gdb_disassembly): Likewise.
1618         * dtrace-probe.c (dtrace_process_dof): Likewise.
1619         * dwarf2read.c (error_check_comp_unit_head): Likewise.
1620         (build_type_psymtabs_1): Likewise.
1621         (skip_one_die): Likewise.
1622         (process_imported_unit_die): Likewise.
1623         (dwarf2_physname): Likewise.
1624         (read_file_scope): Likewise.
1625         (setup_type_unit_groups): Likewise.
1626         (create_dwo_cu_reader): Likewise.
1627         (create_dwo_cu): Likewise.
1628         (create_dwo_unit_in_dwp_v1): Likewise.
1629         (create_dwo_unit_in_dwp_v2): Likewise.
1630         (lookup_dwo_unit_in_dwp): Likewise.
1631         (free_dwo_file): Likewise.
1632         (check_producer): Likewise.
1633         (dwarf2_add_typedef): Likewise.
1634         (dwarf2_add_member_fn): Likewise.
1635         (read_unsigned_leb128): Likewise.
1636         (read_signed_leb128): Likewise.
1637         (dwarf2_const_value): Likewise.
1638         (follow_die_sig_1): Likewise.
1639         (dwarf_decode_macro_bytes): Likewise.
1640         * extension.c (restore_active_ext_lang): Likewise.
1641         * frv-linux-tdep.c (frv_linux_sigtramp_frame_cache): Likewise.
1642         * ft32-tdep.c (ft32_analyze_prologue): Likewise.
1643         * gdbtypes.c (lookup_typename): Likewise.
1644         (resolve_dynamic_range): Likewise.
1645         (check_typedef): Likewise.
1646         * h8300-tdep.c (h8300_is_argument_spill): Likewise.
1647         (h8300_gdbarch_init): Likewise.
1648         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
1649         (hppa_frame_this_id): Likewise.
1650         (_initialize_hppa_tdep): Likewise.
1651         * hppanbsd-tdep.c (hppanbsd_sigtramp_cache_init): Likewise.
1652         * hppaobsd-tdep.c (hppaobsd_supply_fpregset): Likewise.
1653         * i386-dicos-tdep.c (i386_dicos_init_abi): Likewise.
1654         * i386-tdep.c (i386_bnd_type): Likewise.
1655         (i386_gdbarch_init): Likewise.
1656         (i386_mpx_bd_base): Likewise.
1657         * i386nbsd-tdep.c (i386nbsd_sigtramp_cache_init): Likewise.
1658         * i386obsd-tdep.c (i386obsd_elf_init_abi): Likewise.
1659         * ia64-tdep.c (examine_prologue): Likewise.
1660         (ia64_frame_cache): Likewise.
1661         (ia64_push_dummy_call): Likewise.
1662         * infcmd.c (finish_command_fsm_async_reply_reason): Likewise.
1663         (default_print_one_register_info): Likewise.
1664         * infrun.c (infrun_thread_ptid_changed): Likewise.
1665         (thread_still_needs_step_over): Likewise.
1666         (stop_all_threads): Likewise.
1667         (restart_threads): Likewise.
1668         (keep_going_stepped_thread): Likewise.
1669         * iq2000-tdep.c (iq2000_scan_prologue): Likewise.
1670         * language.c (language_init_primitive_type_symbols): Likewise.
1671         * linespec.c (add_sal_to_sals): Likewise.
1672         * linux-nat.c (status_callback): Likewise.
1673         (kill_unfollowed_fork_children): Likewise.
1674         (linux_nat_kill): Likewise.
1675         * linux-tdep.c (linux_fill_prpsinfo): Likewise.
1676         * linux-thread-db.c (thread_db_notice_clone): Likewise.
1677         (record_thread): Likewise.
1678         * location.c (string_to_event_location_basic): Likewise.
1679         * m32c-tdep.c (m32c_prev_register): Likewise.
1680         * m32r-linux-tdep.c (m32r_linux_init_abi): Likewise.
1681         * m32r-tdep.c (decode_prologue): Likewise.
1682         * m68klinux-tdep.c (m68k_linux_sigtramp_frame_cache): Likewise.
1683         * machoread.c (macho_symtab_read): Likewise.
1684         (macho_symfile_read): Likewise.
1685         (macho_symfile_offsets): Likewise.
1686         * maint.c (set_per_command_cmd): Likewise.
1687         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals): Likewise.
1688         (mi_cmd_stack_list_variables): Likewise.
1689         * mi/mi-main.c (mi_cmd_exec_run): Likewise.
1690         (output_register): Likewise.
1691         (mi_cmd_execute): Likewise.
1692         (mi_cmd_trace_define_variable): Likewise.
1693         (print_variable_or_computed): Likewise.
1694         * minsyms.c (prim_record_minimal_symbol_full): Likewise.
1695         * mn10300-tdep.c (mn10300_frame_prev_register): Likewise.
1696         * msp430-tdep.c (msp430_pseudo_register_write): Likewise.
1697         * mt-tdep.c (mt_registers_info): Likewise.
1698         * nios2-tdep.c (nios2_analyze_prologue): Likewise.
1699         (nios2_push_dummy_call): Likewise.
1700         (nios2_frame_unwind_cache): Likewise.
1701         (nios2_stub_frame_cache): Likewise.
1702         (nios2_stub_frame_sniffer): Likewise.
1703         (nios2_gdbarch_init): Likewise.
1704         * ppc-ravenscar-thread.c: Likewise.
1705         * ppcfbsd-tdep.c (ppcfbsd_sigtramp_frame_cache): Likewise.
1706         * python/py-evts.c (add_new_registry): Likewise.
1707         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
1708         (bpfinishpy_detect_out_scope_cb): Likewise.
1709         * python/py-framefilter.c (py_print_value): Likewise.
1710         * python/py-inferior.c (infpy_write_memory): Likewise.
1711         * python/py-infevents.c (create_inferior_call_event_object): Likewise.
1712         * python/py-infthread.c (thpy_get_ptid): Likewise.
1713         * python/py-linetable.c (ltpy_get_pcs_for_line): Likewise.
1714         (ltpy_get_all_source_lines): Likewise.
1715         (ltpy_is_valid): Likewise.
1716         (ltpy_iternext): Likewise.
1717         * python/py-symtab.c (symtab_and_line_to_sal_object): Likewise.
1718         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Likewise.
1719         (unwind_infopy_str): Likewise.
1720         * python/py-varobj.c (py_varobj_get_iterator): Likewise.
1721         * ravenscar-thread.c (ravenscar_inferior_created): Likewise.
1722         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1723         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1724         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Likewise.
1725         * s390-linux-tdep.c (s390_supply_tdb_regset): Likewise.
1726         (s390_frame_prev_register): Likewise.
1727         (s390_dwarf2_frame_init_reg): Likewise.
1728         (s390_record_vr): Likewise.
1729         (s390_process_record): Likewise.
1730         * score-tdep.c (score_push_dummy_call): Likewise.
1731         (score3_analyze_prologue): Likewise.
1732         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1733         * sh64-tdep.c (sh64_analyze_prologue): Likewise.
1734         (sh64_push_dummy_call): Likewise.
1735         (sh64_extract_return_value): Likewise.
1736         (sh64_do_fp_register): Likewise.
1737         * solib-aix.c (solib_aix_get_section_offsets): Likewise.
1738         * solib-darwin.c (darwin_read_exec_load_addr_from_dyld): Likewise.
1739         (darwin_solib_read_all_image_info_addr): Likewise.
1740         * solib-dsbt.c (enable_break): Likewise.
1741         * solib-frv.c (enable_break2): Likewise.
1742         (frv_fdpic_find_canonical_descriptor): Likewise.
1743         * solib-svr4.c (svr4_handle_solib_event): Likewise.
1744         * sparc-tdep.c (sparc_skip_stack_check): Likewise.
1745         * sparc64-linux-tdep.c (sparc64_linux_get_longjmp_target): Likewise.
1746         * sparcobsd-tdep.c (sparc32obsd_init_abi): Likewise.
1747         * spu-tdep.c (info_spu_dma_cmdlist): Likewise.
1748         * stack.c (read_frame_local): Likewise.
1749         * symfile.c (symbol_file_add_separate): Likewise.
1750         (remove_symbol_file_command): Likewise.
1751         * symmisc.c (maintenance_print_one_line_table): Likewise.
1752         * symtab.c (symbol_cache_flush): Likewise.
1753         (basic_lookup_transparent_type): Likewise.
1754         (sort_search_symbols_remove_dups): Likewise.
1755         * target.c (target_memory_map): Likewise.
1756         (target_detach): Likewise.
1757         (target_resume): Likewise.
1758         (acquire_fileio_fd): Likewise.
1759         (target_store_registers): Likewise.
1760         * thread.c (print_thread_info_1): Likewise.
1761         * tic6x-tdep.c (tic6x_analyze_prologue): Likewise.
1762         * tilegx-linux-tdep.c (tilegx_linux_sigframe_init): Likewise.
1763         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
1764         (tilegx_analyze_prologue): Likewise.
1765         (tilegx_stack_frame_destroyed_p): Likewise.
1766         (tilegx_frame_cache): Likewise.
1767         * tracefile.c (trace_save): Likewise.
1768         * tracepoint.c (encode_actions_and_make_cleanup): Likewise.
1769         (start_tracing): Likewise.
1770         (print_one_static_tracepoint_marker): Likewise.
1771         * tui/tui.c (tui_enable): Likewise.
1772         * valops.c (value_struct_elt_bitpos): Likewise.
1773         (find_overload_match): Likewise.
1774         (find_oload_champ): Likewise.
1775         * value.c (value_contents_copy_raw): Likewise.
1776         * windows-tdep.c (windows_get_tlb_type): Likewise.
1777         * x86-linux-nat.c (x86_linux_enable_btrace): Likewise.
1778         * xcoffread.c (record_minimal_symbol): Likewise.
1779         (scan_xcoff_symtab): Likewise.
1780         * xtensa-tdep.c (execute_code): Likewise.
1781         (xtensa_gdbarch_init): Likewise.
1782         (_initialize_xtensa_tdep): Likewise.
1783
1784 2016-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
1785
1786         * spu-linux-nat.c (spu_bfd_iovec_pread): Add pointer cast for C++.
1787         (spu_bfd_open): Likewise.
1788
1789 2016-05-04  Yao Qi  <yao.qi@linaro.org>
1790
1791         PR gdb/19947
1792         * corefile.c (read_memory): Rename it to ...
1793         (read_memory_object): ... it.  Add parameter object.
1794         (read_memory): Call read_memory_object.
1795         (read_stack): Likewise.
1796         (read_code): Likewise.
1797
1798 2016-05-03  Yunlian Jiang <yunlian@google.com>
1799             Doug Evans  <dje@google.com>
1800
1801         PR symtab/19914
1802         * dwarf2read.c (open_and_init_dwp_file): Look at backlink if objfile
1803         is separate debug file.
1804
1805 2016-05-03  Don Breazeal <donb@codesourcery.com>
1806
1807         * serial.h (gdb_pipe): Fix argument names in comment.
1808
1809 2016-05-03  Pedro Alves <palves@redhat.com>
1810
1811         PR python/20037
1812         * python/python.c (_initialize_python) [IS_PY3K]: xstrdup/xfree
1813         oldloc.
1814
1815 2016-05-03  Pedro Alves <palves@redhat.com>
1816
1817         * python/python.c (_initialize_python) [IS_PY3K]: Remove dead
1818         code.
1819
1820 2016-05-03  Pedro Alves  <palves@redhat.com>
1821
1822         * configure.ac (PYTHON_LIBS): Sed away "-Xlinker -export-dynamic".
1823         * configure: Regenerate.
1824
1825 2016-05-03  Pedro Alves  <palves@redhat.com>
1826
1827         * configure.ac (checking for the dynamic export flag): Add
1828         $PYTHON_CPPFLAGS to CPPFLAGS.
1829         * configure: Regenerate.
1830
1831 2016-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1832
1833         * symfile.c (find_pc_overlay): Add braces to avoid -Wparentheses
1834         warning.
1835         (find_pc_mapped_section): Likewise.
1836         (list_overlays_command): Likewise.
1837
1838 2016-05-02  Eli Zaretskii  <eliz@gnu.org>
1839
1840         * windows-nat.c (_initialize_check_for_gdb_ini): Fix off-by-one
1841         error in allocation of space for "$HOME/.gdbinit" string.  This
1842         caused GDB to abort on startup whenever a '~/gdb.ini' file was
1843         actually found, because xsnprintf would hit an assertion
1844         violation.
1845
1846 2016-04-28  Simon Marchi  <simon.marchi@ericsson.com>
1847
1848         * cli/cli-decode.c (help_cmd_list): Do not list commands that
1849         are deprecated.
1850
1851 2016-04-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
1852
1853         * remote.c (remote_start_remote): Detect PACKET_vFile_setfs.support.
1854
1855 2016-04-27  Martin Galvan  <martin.galvan@tallertechnologies.com>
1856
1857         * c-valprint.c (c_value_print): Always convert val back to reference
1858         type if we converted it to a pointer type.
1859
1860 2016-04-27  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1861
1862         * configure.ac: Enhance configure check for babeltrace to reject
1863         non-C++-enabled versions.
1864         * configure: Regenerate.
1865
1866 2016-04-26  Sanimir Agovic  <sanimir.agovic@intel.com>
1867             Keven Boell  <keven.boell@intel.com>
1868             Bernhard Heckel  <bernhard.heckel@intel.com>
1869
1870         * f-valprint.c (f77_create_arrayprint_offset_tbl): Remove
1871         function.
1872         (F77_DIM_SIZE, F77_DIM_OFFSET): Remove macro.
1873         (f77_print_array_1): Use value_subscript to subscript a
1874         value array.
1875         (f77_print_array): Remove call to f77_create_arrayprint_offset_tbl.
1876         (f_val_print): Use value_field to construct a field value.
1877
1878 2016-04-26  Bernhard Heckel  <bernhard.heckel@intel.com>
1879
1880         * valarith.c (value_address): Resolve dynamic types.
1881
1882 2016-04-26  Bernhard Heckel  <bernhard.heckel@intel.com>
1883             Keven Boell  <kevel.boell@intel.com>
1884
1885         * NEWS: Add new supported features for fortran.
1886         * gdbtypes.c (remove_dyn_prop): New.
1887         (resolve_dynamic_struct): Keep type length for fortran structs.
1888         * gdbtypes.h: Forward declaration of new function.
1889         * value.c (value_address): Return dynamic resolved location of a value.
1890         (set_value_component_location): Adjust the value address
1891         for single value prints.
1892         (value_primitive_field): Support value types with a dynamic location.
1893         (set_internalvar): Remove dynamic location property of
1894         internal variables.
1895
1896 2016-04-25  Pedro Alves  <palves@redhat.com>
1897             Yao Qi  <yao.qi@linaro.org>
1898
1899         * mem-break.c (set_raw_breakpoint_at): Create a raw breakpoint
1900         object.  Insert it if it is not inserted yet.  Increase the
1901         refcount and link it into the proc's raw breakpoint list.
1902
1903 2016-04-25  Yao Qi  <yao.qi@linaro.org>
1904
1905         * breakpoint.c (should_be_inserted): Return 0 if the location's
1906         owner is not single step breakpoint or single step breakpoint's
1907         thread isn't the thread which is stepping past a breakpoint.
1908         * gdbarch.sh (software_single_step): Update comments.
1909         * gdbarch.h: Regenerated.
1910         * infrun.c (struct step_over_info) <thread>: New field.
1911         (set_step_over_info): New argument 'thread'.  Callers updated.
1912         (clear_step_over_info): Set field thread to -1.
1913         (thread_is_stepping_over_breakpoint): New function.
1914         * infrun.h (thread_is_stepping_over_breakpoint): Declaration.
1915
1916 2016-04-22  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1917
1918         * ppc-linux-nat.c (ppc_linux_read_description): Use PPC_FEATURE_HAS_VSX
1919         and PPC_FEATURE_HAS_ALTIVEC to check if such features are available.
1920
1921 2016-04-22  Yao Qi  <yao.qi@linaro.org>
1922
1923         * valops.c (read_value_memory): New local variable 'stack'.
1924         Set it to either TARGET_OBJECT_STACK_MEMORY or
1925         TARGET_OBJECT_MEMORY.
1926
1927 2016-04-22  Pedro Alves  <palves@redhat.com>
1928
1929         * ada-exp.y: Remove all yy symbol remappings.
1930         (GDB_YY_REMAP_PREFIX): Define.
1931         Include "yy-remap.h".
1932         * ada-lang.c (ada_language_defn): Adjust.
1933         * ada-lang.h (ada_error): Rename to ...
1934         (ada_yyerror): ... this.
1935         * c-exp.y: Remove all yy symbol remappings.
1936         (GDB_YY_REMAP_PREFIX): Define.
1937         Include "yy-remap.h".
1938         * c-lang.c (c_language_defn, cplus_language_defn)
1939         (asm_language_defn, minimal_language_defn): Adjust.
1940         * c-lang.h (c_error): Rename to ...
1941         (c_yyerror): ... this.
1942         * d-exp.y: Remove all yy symbol remappings.
1943         (GDB_YY_REMAP_PREFIX): Define.
1944         Include "yy-remap.h".
1945         * d-lang.c (d_language_defn): Adjust.
1946         * d-lang.h (d_error): Rename to ...
1947         (d_yyerror): ... this.
1948         * f-exp.y: Remove all yy symbol remappings.
1949         (GDB_YY_REMAP_PREFIX): Define.
1950         Include "yy-remap.h".
1951         * f-lang.c (f_language_defn): Adjust.
1952         * f-lang.h (f_error): Rename to ...
1953         (f_yyerror): ... this.
1954         * go-exp.y: Remove all yy symbol remappings.
1955         (GDB_YY_REMAP_PREFIX): Define.
1956         Include "yy-remap.h".
1957         * go-lang.c (go_language_defn): Adjust.
1958         * go-lang.h (go_error): Rename to ...
1959         (go_yyerror): ... this.
1960         * jv-exp.y: Remove all yy symbol remappings.
1961         (GDB_YY_REMAP_PREFIX): Define.
1962         Include "yy-remap.h".
1963         * jv-lang.c (java_language_defn): Adjust.
1964         * jv-lang.h (java_error): Rename to ...
1965         (java_yyerror): ... this.
1966         * m2-exp.y: Remove all yy symbol remappings.
1967         (GDB_YY_REMAP_PREFIX): Define.
1968         Include "yy-remap.h".
1969         * m2-lang.c (m2_language_defn): Adjust.
1970         * m2-lang.h (m2_error): Rename to ...
1971         (m2_yyerror): ... this.
1972         * objc-exp.y: Remove all yy symbol remappings.
1973         (GDB_YY_REMAP_PREFIX): Define.
1974         Include "yy-remap.h".
1975         * objc-lang.c (objc_language_defn): Adjust.
1976         * opencl-lang.c (opencl_language_defn): Adjust.
1977         * p-exp.y: Remove all yy symbol remappings.
1978         (GDB_YY_REMAP_PREFIX): Define.
1979         Include "yy-remap.h".
1980         * p-lang.c (pascal_language_defn): Adjust.
1981         * p-lang.h (pascal_error): Rename to ...
1982         (pascal_yyerror): ... this.
1983         * yy-remap.h: New file.
1984
1985 2016-04-22  Pedro Alves  <palves@redhat.com>
1986
1987         * common/common-exceptions.h (GDB_XCPT_TRY): Remove mention of
1988         the foreign frames issue.
1989         [__cplusplus] (GDB_XCPT): Define as GDB_XCPT_TRY.
1990
1991 2016-04-22  Pedro Alves  <palves@redhat.com>
1992
1993         * common/common-exceptions.c (enum catcher_state, struct catcher)
1994         (current_catcher): Define in C++ mode too.
1995         (exceptions_state_mc_catch): Call throw_exception_sjlj instead of
1996         throw_exception.
1997         (throw_exception_sjlj, throw_exception_cxx): New functions,
1998         factored out from throw_exception.
1999         (throw_exception): Reimplement.
2000         * common/common-exceptions.h (exceptions_state_mc_init)
2001         (exceptions_state_mc_action_iter)
2002         (exceptions_state_mc_action_iter_1, exceptions_state_mc_catch):
2003         Declare in C++ mode too.
2004         (TRY): Rename to ...
2005         (TRY_SJLJ): ... this.
2006         (CATCH): Rename to ...
2007         (CATCH_SJLJ): ... this.
2008         (END_CATCH): Rename to ...
2009         (END_CATCH_SJLJ): ... this.
2010         [GDB_XCPT == GDB_XCPT_SJMP] (TRY, CATCH, END_CATCH): Map to SJLJ
2011         equivalents.
2012         (throw_exception): Update comments.
2013         (throw_exception_sjlj): Declare.
2014         * event-top.c (gdb_rl_callback_read_char_wrapper): Extend intro
2015         comment.  Wrap body in TRY_SJLJ/CATCH_SJLJ and rethrow any
2016         intercepted exception.
2017         (gdb_rl_callback_handler): New function.
2018         (gdb_rl_callback_handler_install): Always install
2019         gdb_rl_callback_handler as readline callback.
2020
2021 2016-04-22  Pedro Alves  <palves@redhat.com>
2022
2023         * event-top.c (rl_callback_read_char_wrapper): Rename to ...
2024         (gdb_rl_callback_read_char_wrapper): ... this.
2025         (change_line_handler, gdb_setup_readline): Adjust.
2026
2027 2016-04-22  Yao Qi  <yao.qi@linaro.org>
2028
2029         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Clear CPSR
2030         bits 20 to 23.
2031
2032 2016-04-22  Joel Brobecker  <brobecker@adacore.com>
2033
2034         * MAINTAINER: Remove myself as AIX Maintainer.
2035
2036 2016-04-22  Maciej W. Rozycki  <macro@imgtec.com>
2037
2038         * mips-tdep.c (mips_gdbarch_init): For GDB_OSABI_LINUX set
2039         `num_regs' to 90 rather than 79.  Where a target description is
2040         present adjust the setting appropriately.
2041
2042 2016-04-21  Pedro Alves  <palves@redhat.com>
2043
2044         * common/common-exceptions.h (GDB_XCPT_TRY): Add comment.
2045         (GDB_XCPT): Always define as GDB_XCPT_SJMP.
2046
2047 2016-04-21  Pedro Alves  <palves@redhat.com>
2048
2049         * aix-thread.c (pdc_read_data, pdc_write_data): Add cast.
2050         (aix_thread_resume): Use PTRACE_TYPE_ARG5.
2051         * rs6000-nat.c (rs6000_ptrace64): Use PTRACE_TYPE_ARG5.
2052         (rs6000_ptrace_ldinfo): Change type of 'ldi' local to void
2053         pointer, and cast return to gdb_byte pointer.
2054
2055 2016-04-21  Pedro Alves  <palves@redhat.com>
2056
2057         * s390-linux-nat.c (fetch_regset, store_regset, check_regset): Use
2058         void * instead of gdb_byte *.
2059
2060 2016-04-21  Pedro Alves  <palves@redhat.com>
2061
2062         * dwarf2read.c (try_open_dwop_file, open_dwo_file)
2063         (file_file_name, file_full_name): Add char * cast to sentinel in
2064         concat/reconcat calls.
2065         * event-top.c (top_level_prompt): Likewise.
2066         * guile/guile.c (initialize_scheme_side): Likewise.
2067         * linux-tdep.c (linux_fill_prpsinfo): Likewise.
2068         * macrotab.c (macro_source_fullname): Likewise.
2069         * main.c (get_init_files, captured_main): Likewise.
2070         * psymtab.c (psymtab_to_fullname): Likewise.
2071         * python/python.c (_initialize_python)
2072         (gdbpy_finish_initialization): Likewise.
2073         * source.c (symtab_to_fullname): Likewise.
2074
2075 2016-04-20  Pedro Alves  <palves@redhat.com>
2076
2077         * build-with-cxx.m4 (GDB_AC_BUILD_WITH_CXX): Default to yes.
2078         * configure: Renegerate.
2079
2080 2016-04-20  Pedro Alves  <palves@redhat.com>
2081
2082         * darwin-nat.c (darwin_decode_message): Use gdb_signal_from_host.
2083
2084 2016-04-20  Pedro Alves  <palves@redhat.com>
2085
2086         * aarch64-tdep.c (aarch64_record_load_store): Change type of
2087         'reg_rm_val' local to ULONGEST.
2088
2089 2016-04-20  Pedro Alves  <palves@redhat.com>
2090
2091         * darwin-nat.c (darwin_resume_thread): Add uintptr_t cast.
2092
2093 2016-04-20  Doug Evans  <xdje42@gmail.com>
2094
2095         * symmisc.c (dump_symtab_1): Print owning compunit for identical
2096         blockvectors.
2097
2098 2016-04-20  Yao Qi  <yao.qi@linaro.org>
2099
2100         * aarch32-linux-nat.c: Include "arch/arm-linux.h".
2101
2102 2016-04-20  Yao Qi  <yao.qi@linaro.org>
2103
2104         * arm-linux-tdep.h (ARM_CPSR_GREGNUM): Move it to ...
2105         * arch/arm-linux.h: ... here.
2106
2107 2016-04-19  John Baldwin  <jhb@FreeBSD.org>
2108
2109         * amd64bsd-nat.c (amd64bsd_fetch_inferior_registers): Change xstateregs
2110         to void *.
2111         (amd64bsd_store_inferior_registers): Likewise.
2112         * fbsd-nat.c (resume_one_thread_cb): Explicitly cast data to ptid_t *.
2113         (resume_all_threads_cb): Likewise.
2114         * i386bsd-nat.c (i386bsd_supply_gregset): Cast gregs to char *.
2115         (i386bsd_collect_gregset): Likewise.
2116         (i386bsd_fetch_inferior_registers): Change xstateregs to void *.
2117         (i386bsd_store_inferior_registers): Likewise.
2118
2119 2016-04-19  John Baldwin  <jhb@FreeBSD.org>
2120
2121         * main.c (setup_alternate_signal_stack): Cast to char *.
2122
2123 2016-04-19  Doug Evans  <xdje42@gmail.com>
2124
2125         * symmisc.c (dump_symtab_1, dump_symtab): Delete arg objfile.
2126         All callers updated.
2127
2128 2016-04-19  Doug Evans  <xdje42@gmail.com>
2129
2130         PR gdb/17911
2131         * source.c (is_regular_file): New arg errno_ptr.
2132         All callers updated.
2133
2134 2016-04-19  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2135
2136         * linux-record.c (record_linux_system_call): Merge handling for
2137         readlink/recv/read and pipe/pipe2.
2138
2139 2016-04-14  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2140
2141         * features/i386/amd64-mpx-linux.xml: Remove AVX feature.
2142         * features/i386/amd64-mpx.xml: Remove AVX feature.
2143         * features/i386/i386-mpx-linux.xml: Remove AVX feature.
2144         * features/i386/i386-mpx.xml: Remove AVX feature.
2145         * features/i386/amd64-mpx-linux.c: Regenerate.
2146         * features/i386/amd64-mpx.c: Regenerate.
2147         * features/i386/i386-mpx-linux.c: Regenerate.
2148         * features/i386/i386-mpx.c: Regenerate.
2149         * regformats/i386/amd64-mpx-linux.dat: Regenerate.
2150         * regformats/i386/amd64-mpx.dat: Regenerate.
2151         * regformats/i386/i386-mpx-linux.dat: Regenerate.
2152         * regformats/i386/i386-mpx.dat: Regenerate.
2153
2154 2016-04-16  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2155
2156         * amd64-linux-tdep.c (features/i386/amd64-avx-mpx-linux.c):
2157         New include.
2158         (amd64_linux_core_read_description): Add case for
2159          X86_XSTATE_AVX_MPX_MASK.
2160         (_initialize_amd64_linux_tdep): Call initialize_tdesc_amd64_avx_mpx_linux.
2161         * amd64-linux-tdep.h (tdesc_amd64_avx_mpx_linux): New definition.
2162         * amd64-tdep.c (features/i386/amd64-avx-mpx.c): New include.
2163         (amd64_target_description): Add case for  X86_XSTATE_AVX_MPX_MASK.
2164         (_initialize_amd64_tdep): Call initialize_tdesc_amd64_avx_mpx.
2165         * common/x86-xstate.h (X86_XSTATE_MPX_MASK): Remove AVX bits.
2166         (X86_XSTATE_AVX_MPX_MASK): New case.
2167         * features/Makefile (i386/i386-avx-mpx, i386/i386-avx-mpx-linux)
2168         (i386/amd64-avx-mpx, i386/amd64-avx-mpx-linux): New rules.
2169         (i386/i386-avx-mpx-expedite, i386/i386-avx-mpx-linux-expedite)
2170         (i386/amd64-avx-mpx-expedite, i386/amd64-avx-mpx-linux-expedite):
2171         New expedites.
2172         * i386-linux-tdep.c (features/i386/i386-avx-mpx-linux.c): New
2173         include.
2174         (i386_linux_core_read_description): Add case
2175         X86_XSTATE_AVX_MPX_MASK.
2176         (_initialize_i386_linux_tdep): Call
2177         initialize_tdesc_i386_avx_mpx_linux.
2178         * i386-linux-tdep.h (tdesc_i386_avx_mpx_linux): New include.
2179         * i386-tdep.c (features/i386/i386-avx-mpx.c): New include.
2180         (i386_target_description): Add case for X86_XSTATE_AVX_MPX_MASK.
2181         * x86-linux-nat.c (x86_linux_read_description): Add case for
2182         X86_XSTATE_AVX_MPX_MASK.
2183         * features/i386/amd64-avx-mpx-linux.xml: New file.
2184         * features/i386/i386-avx-mpx-linux.xml: New file.
2185         * features/i386/i386-avx-mpx.xml: New file.
2186         * features/i386/amd64-avx-mpx.xml: New file.
2187         * features/i386/amd64-avx-mpx-linux.c: Generated.
2188         * features/i386/amd64-avx-mpx.c: Generated.
2189         * features/i386/i386-avx-mpx-linux.c: Generated.
2190         * features/i386/i386-avx-mpx.c: Generated.
2191         * regformats/i386/amd64-avx-mpx-linux.dat: Generated.
2192         * regformats/i386/amd64-avx-mpx.dat: Generated.
2193         * regformats/i386/i386-avx-mpx-linux.dat: Generated.
2194         * regformats/i386/i386-avx-mpx.dat: Generated.
2195
2196 2016-04-18  Pedro Alves  <palves@redhat.com>
2197
2198         * ptrace.m4 (GDB_AC_PTRACE): Don't run tests in C++ mode.
2199         * configure: Regenerate.
2200
2201 2016-04-18  Martin Galvan  <martin.galvan@tallertechnologies.com>
2202
2203         * valops.c (value_addr): For C++ references, set the copied value's
2204         enclosing_type as well.
2205
2206 2016-04-18  Yao Qi  <yao.qi@linaro.org>
2207
2208         Revert:
2209         2016-04-15  Yao Qi  <yao.qi@linaro.org>
2210
2211         * arm-tdep.c (thumb_stack_frame_destroyed_p): Return zero if
2212         PC is far from the end of function.
2213
2214 2016-04-16  Pedro Alves  <palves@redhat.com>
2215
2216         * ada-exp.y (yydefred): Define as ada_yydefred.
2217
2218 2016-04-15  Pedro Alves  <palves@redhat.com>
2219
2220         * ada-lang.c (ada_lookup_struct_elt_type): Constify 'type_str' and
2221         'name_str' locals.
2222
2223 2016-04-15  Pedro Alves  <palves@redhat.com>
2224
2225         * btrace.c (pt_btrace_insn_flags): Change return type to
2226         btrace_insn_flags.  Use btrace_insn_flags for local.
2227
2228 2016-04-15  Pedro Alves  <palves@redhat.com>
2229
2230         * nat/linux-ptrace.h [__mips__] (GDB_ARCH_IS_TRAP_BRKPT): Also
2231         accept TRAP_BRKPT.
2232          [__mips__] (GDB_ARCH_IS_TRAP_HWBKPT): Also accept TRAP_HWBKPT.
2233
2234 2016-04-15  Yao Qi  <yao.qi@linaro.org>
2235
2236         * arm-tdep.c (thumb_stack_frame_destroyed_p): Return zero if
2237         PC is far from the end of function.
2238
2239 2016-04-14  Pedro Alves  <palves@redhat.com>
2240
2241         * cli/cli-cmds.c (alias_usage_error): New function.
2242         (alias_command): Use it.
2243         * ctf.c (ctf_save_metadata_header): Inline metadata_fmt local in
2244         ctf_save_write_metadata call.
2245
2246 2016-04-14  Pedro Alves  <palves@redhat.com>
2247
2248         * ada-typeprint.c (print_fixed_point_type): Don't pass float as
2249         argument to function expecting LONGEST.
2250         * value.c (unpack_long): Add casts to LONGEST.
2251
2252 2016-04-13  Luis Machado  <lgustavo@codesourcery.com>
2253
2254         * exec.c (exec_file_locate_attach): Guard a couple functions
2255         that can throw errors.
2256         (exception_print_same): New helper function.
2257
2258 2016-04-13  Pedro Alves  <palves@redhat.com>
2259
2260         PR remote/19840
2261         * remote.c (struct remote_state) <last_resume_exec_dir>: New
2262         field.
2263         (new_remote_state): Default last_resume_exec_dir to EXEC_FORWARD.
2264         (remote_open_1): Reset last_resume_exec_dir to EXEC_FORWARD.
2265         (remote_resume): Store the last execution direction.
2266         (remote_execution_direction): New function.
2267         (init_remote_ops): Install it as to_execution_direction target_ops
2268         method.
2269
2270 2016-04-12  Pedro Alves  <palves@redhat.com>
2271
2272         * common/common-exceptions.h (GDB_XCPT_TRY): Update comment.
2273         [__cplusplus] (GDB_XCPT): Define as GDB_XCPT_TRY.
2274
2275 2016-04-12  Pedro Alves  <palves@redhat.com>
2276
2277         * common/common-exceptions.c (struct catcher) <buf>: Now a
2278         'jmp_buf' instead of SIGJMP_BUF.
2279         (exceptions_state_mc_init): Change return type to 'jmp_buf'.
2280         (throw_exception): Use longjmp instead of SIGLONGJMP.
2281         * common/common-exceptions.h: Include <setjmp.h> instead of
2282         "gdb_setjmp.h".
2283         (exceptions_state_mc_init): Change return type to 'jmp_buf'.
2284         [GDB_XCPT == GDB_XCPT_SJMP] (TRY): Use setjmp instead of
2285         SIGSETJMP.
2286         * cp-support.c: Include "gdb_setjmp.h".
2287
2288 2016-04-12  Pedro Alves  <palves@redhat.com>
2289
2290         * common/common-exceptions.c (exception_rethrow): Remove
2291         prepare_to_throw_exception call.
2292         * common/common-exceptions.h (prepare_to_throw_exception): Delete
2293         declaration.
2294         * exceptions.c (prepare_to_throw_exception): Delete.
2295
2296 2016-04-12  Pedro Alves  <palves@redhat.com>
2297
2298         * target.c (target_check_pending_interrupt): Delete.
2299         * target.h (struct target_ops) <to_check_pending_interrupt>:
2300         Remove method.
2301         (target_check_pending_interrupt): Remove declaration.
2302         * target-delegates.c: Regenerate.
2303
2304 2016-04-12  Pedro Alves  <palves@redhat.com>
2305
2306         * defs.h: Update comments on SIGINT handling.
2307         (immediate_quit): Delete declaration.
2308         * event-loop.c (call_async_signal_handler): Delete.
2309         * event-loop.h (call_async_signal_handler): Delete declaration.
2310         (mark_async_signal_handler): Update comments.
2311         (gdb_call_async_signal_handler): Delete declaration.
2312         * event-top.c (handle_sigint): Call mark_async_signal_handler
2313         instead of gdb_call_async_signal_handler.
2314         * exceptions.c (prepare_to_throw_exception): Remove reference to
2315         immediate_quit.
2316         (exception_fprintf): Remove comments about immediate_quit.
2317         * mingw-hdep.c (sigint_event, sigint_handler): Delete.
2318         (gdb_select): Don't wait on sigint_event.
2319         (gdb_call_async_signal_handler): Delete.
2320         (_initialize_mingw_hdep): Delete.
2321         * posix-hdep.c (gdb_call_async_signal_handler): Delete.
2322         * utils.c (immediate_quit): Delete.
2323
2324 2016-04-12  Pedro Alves  <palves@redhat.com>
2325
2326         * defs.h (quit_handler_ftype, quit_handler)
2327         (make_cleanup_override_quit_handler, default_quit_handler): New.
2328         (QUIT): Adjust comments.
2329         * event-top.c (default_quit_handler): New function.
2330         (quit_handler): New global.
2331         (struct quit_handler_cleanup_data): New.
2332         (restore_quit_handler, restore_quit_handler_dtor)
2333         (make_cleanup_override_quit_handler): New.
2334         (async_request_quit): Call QUIT.
2335         * remote.c (struct remote_state) <got_ctrlc_during_io>: New field.
2336         (async_sigint_remote_twice_token, async_sigint_remote_token):
2337         Delete.
2338         (remote_close): Update comments.
2339         (remote_start_remote): Don't set immediate_quit.  Set starting_up
2340         earlier.
2341         (remote_serial_quit_handler, remote_unpush_and_throw): New
2342         functions.
2343         (remote_open_1): Clear got_ctrlc_during_io.  Set
2344         remote_async_terminal_ours_p unconditionally.
2345         (async_initialize_sigint_signal_handler)
2346         (async_handle_remote_sigint, async_handle_remote_sigint_twice)
2347         (remote_check_pending_interrupt, async_remote_interrupt)
2348         (async_remote_interrupt_twice)
2349         (async_cleanup_sigint_signal_handler, ofunc)
2350         (sync_remote_interrupt, sync_remote_interrupt_twice): Delete.
2351         (remote_terminal_inferior, remote_terminal_ours): Remove async
2352         checks.
2353         (remote_wait_as): Don't install a SIGINT handler in sync mode.
2354         (readchar, remote_serial_write): Override the quit handler with
2355         remote_serial_quit_handler.
2356         (getpkt_or_notif_sane_1): Don't call QUIT.
2357         (initialize_remote_ops): Don't install
2358         remote_check_pending_interrupt.
2359         (_initialize_remote): Don't create async_sigint_remote_token and
2360         async_sigint_remote_twice_token.
2361         * ser-base.c (ser_base_wait_for): Call QUIT and use
2362         interruptible_select.
2363         (ser_base_write): Call QUIT.
2364         * ser-go32.c (dos_readchar, dos_write): Call QUIT.
2365         * ser-unix.c (wait_for): Don't use VTIME.  Always take the
2366         gdb_select path, but call QUIT and interruptible_select.
2367         * utils.c (maybe_quit): Call the current quit handler.  Don't call
2368         target_check_pending_interrupt.
2369         (defaulted_query, prompt_for_continue): Override the quit handler
2370         with the default quit handler.
2371
2372 2016-04-12  Pedro Alves  <palves@redhat.com>
2373
2374         * tui/tui-hooks.c (tui_target_has_run): Delete.
2375         (tui_about_to_proceed): Delete.
2376         (tui_about_to_proceed_observer): Delete.
2377         (tui_install_hooks, tui_remove_hooks): Don't install/remove an
2378         about_to_proceed observer.
2379
2380 2016-04-12  Pedro Alves  <palves@redhat.com>
2381
2382         * mi/mi-interp.c (mi_new_thread): Put
2383         target_terminal_ours_for_output in effect while outputting.
2384         (mi_thread_exit): Use target_terminal_ours_for_output instead of
2385         target_terminal_ours.
2386         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
2387         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
2388         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
2389         (mi_breakpoint_created, mi_breakpoint_deleted)
2390         (mi_breakpoint_modified, mi_solib_loaded, mi_solib_unloaded)
2391         (mi_command_param_changed, mi_memory_changed)
2392         (report_initial_inferior): Use target_terminal_ours_for_output
2393         instead of target_terminal_ours.  Restore terminal settings.
2394         * mi/mi-main.c (mi_execute_command): Use
2395         target_terminal_ours_for_output instead of target_terminal_ours.
2396         Restore terminal settings.
2397
2398 2016-04-12  Pedro Alves  <palves@redhat.com>
2399
2400         PR gdb/19828
2401         * gnu-nat.c (inf_validate_task_sc): Don't call
2402         target_terminal_ours / target_terminal_inferior around query.
2403         * i386-tdep.c (i386_record_lea_modrm, i386_process_record): Don't
2404         call target_terminal_ours / target_terminal_inferior around
2405         yquery.
2406         * linux-record.c (record_linux_system_call): Don't call
2407         target_terminal_ours / target_terminal_inferior around yquery.
2408         * nto-procfs.c (interrupt_query): Don't call target_terminal_ours
2409         / target_terminal_inferior around query.
2410         * record-full.c (record_full_check_insn_num): Remove
2411         'set_terminal' parameter.  Don't call target_terminal_ours /
2412         target_terminal_inferior around query.
2413         (record_full_message, record_full_registers_change)
2414         (record_full_xfer_partial): Adjust.
2415         * remote.c (interrupt_query): Don't call target_terminal_ours /
2416         target_terminal_inferior around query.
2417         * utils.c (defaulted_query): Install cleanup to restore target
2418         terminal.  Put target_terminal_ours_for_output in effect while
2419         defaulted producing, and target_terminal_ours in in effect while
2420         handling input.
2421         (prompt_for_continue): Install cleanup to restore target terminal.
2422         Put target_terminal_ours in in effect while handling input.
2423
2424 2016-04-12  Pedro Alves  <palves@redhat.com>
2425
2426         * utils.c (defaulted_query, prompt_for_continue): Free temporary
2427         strings with cleanups, instead of xfree.
2428
2429 2016-04-12  Pedro Alves  <palves@redhat.com>
2430
2431         * utils.c (vwarning, internal_vproblem): Use
2432         make_cleanup_restore_target_terminal and
2433         target_terminal_ours_for_output.
2434
2435 2016-04-12  Pedro Alves  <palves@redhat.com>
2436
2437         * infcmd.c (post_create_inferior, prepare_one_step): Use
2438         target_terminal_ours_for_output instead of target_terminal_ours.
2439
2440 2016-04-12  Pedro Alves  <palves@redhat.com>
2441
2442         * exceptions.c (print_flush): Use target_terminal_ours_for_output
2443         instead of target_terminal_ours, and restore target terminal with
2444         a cleanup.
2445
2446 2016-04-12  Pedro Alves  <palves@redhat.com>
2447
2448         * cp-support.c (gdb_demangle): Use target_terminal_ours_for_output
2449         instead of target_terminal_ours, and restore target terminal with
2450         a cleanup.
2451
2452 2016-04-12  Pedro Alves  <palves@redhat.com>
2453
2454         * ada-lang.c (type_as_string, type_as_string_and_cleanup): New
2455         functions.
2456         (ada_lookup_struct_elt_type): Use type_as_string_and_cleanup.
2457
2458 2016-04-12  Pedro Alves  <palves@redhat.com>
2459
2460         * ser-base.c (fd_event): Retry read_prim on EINTR.
2461         (do_ser_base_readchar): Retry read_prim on EINTR.
2462         (ser_base_write): Retry write_prim on EINTR.
2463         * ser-unix.c (ser_unix_read_prim): Don't retry on EINTR here.
2464         (ser_unix_write_prim): Remove comment.
2465
2466 2016-04-12  Pedro Alves  <palves@redhat.com>
2467
2468         * remote.c (remote_pass_ctrlc): New function.
2469         (init_remote_ops): Install it.
2470         * target.c (target_terminal_inferior): Pass pending Ctrl-C to the
2471         target.
2472         (target_pass_ctrlc, default_target_pass_ctrlc): New functions.
2473         * target.h (struct target_ops) <to_pass_ctrlc>: New method.
2474         (target_pass_ctrlc, default_target_pass_ctrlc): New declarations.
2475         * target-delegates.c: Regenerate.
2476
2477 2016-04-12  Pedro Alves  <palves@redhat.com>
2478
2479         * infcmd.c (interrupt_target_1): Call target_stop is in non-stop
2480         mode.
2481         * linux-nat.c (linux_nat_interrupt): Delete.
2482         (linux_nat_add_target): Don't install linux_nat_interrupt.
2483         * remote.c (remote_interrupt_ns): Change return type to void.
2484         Throw error if interrupting the target is not supported.
2485         (remote_interrupt): Don't call the remote_stop_ns/remote_stop_as.
2486
2487 2016-04-12  Pedro Alves  <palves@redhat.com>
2488
2489         * defs.h (clear_quit_flag): Remove declaration.
2490         * extension-priv.h (struct extension_language_ops)
2491         <clear_quit_flag>: Remove field and update comments.
2492         * extension.c (clear_quit_flag): Delete.
2493         * guile/guile.c (guile_extension_ops): Adjust.
2494         * python/python.c (python_extension_ops): Adjust.
2495         (gdbpy_clear_quit_flag): Delete.
2496
2497 2016-04-12  Pedro Alves  <palves@redhat.com>
2498
2499         * main.c (captured_main): Don't clear the quit flag.
2500
2501 2016-04-12  Pedro Alves  <palves@redhat.com>
2502
2503         * exceptions.c (prepare_to_throw_exception): Don't clear the quit
2504         flag.
2505
2506 2016-04-12  Pedro Alves  <palves@redhat.com>
2507
2508         * event-top.c (command_handler): Don't call clear_quit_flag.
2509
2510 2016-04-12  Pedro Alves  <palves@redhat.com>
2511
2512         * remote-sim.c (gdb_os_poll_quit): Don't call clear_quit_flag.
2513         * remote.c (remote_wait_as): Don't call clear_quit_flag.
2514
2515 2016-04-12  Pedro Alves  <palves@redhat.com>
2516
2517         * python/python.c: Include "ser-event.h".
2518         (gdbpy_event_fds): Delete.
2519         (gdbpy_serial_event): New.
2520         (gdbpy_run_events): Change prototype.  Use serial_event_clear
2521         instead of serial_readchar.
2522         (gdbpy_post_event): Use serial_event_set instead of serial_write.
2523         (gdbpy_initialize_events): Use make_serial_event instead of
2524         serial_pipe.
2525
2526 2016-04-12  Pedro Alves  <palves@redhat.com>
2527
2528         * defs.h: Extend QUIT-related comments to mention
2529         interruptible_select.
2530         (quit_serial_event_set, quit_serial_event_clear): Declare.
2531         * event-top.c: Include "ser-event.h" and "gdb_select.h".
2532         (quit_serial_event): New global.
2533         (async_init_signals): Make quit_serial_event.
2534         (quit_serial_event_set, quit_serial_event_clear)
2535         (quit_serial_event_fd, interruptible_select): New functions.
2536         * extension.c (set_quit_flag): Set the quit serial event.
2537         (check_quit_flag): Clear the quit serial event.
2538         * gdb_select.h (interruptible_select): New declaration.
2539         * guile/scm-ports.c (ioscm_input_waiting): Use
2540         interruptible_select instead of gdb_select.
2541         * top.c (gdb_readline_no_editing): Likewise.
2542         * ui-file.c (stdio_file_read): Likewise.
2543
2544 2016-04-12  Pedro Alves  <palves@redhat.com>
2545
2546         * event-loop.c: Include "ser-event.h".
2547         (async_signal_handlers_serial_event): New global.
2548         (async_signals_handler, initialize_async_signal_handlers): New
2549         functions.
2550         (mark_async_signal_handler): Set
2551         async_signal_handlers_serial_event.
2552         (invoke_async_signal_handlers): Clear
2553         async_signal_handlers_serial_event.
2554         * event-top.c (async_init_signals): Call
2555         initialize_async_signal_handlers.
2556
2557 2016-04-12  Pedro Alves  <palves@redhat.com>
2558
2559         * Makefile.in (SFILES): Add ser-event.c.
2560         (HFILES_NO_SRCDIR): Add ser-event.h.
2561         (COMMON_OBS): Add ser-event.o.
2562         * ser-event.c, ser-event.h: New files.
2563         * serial.c (new_serial): New function, factored out from
2564         (serial_fdopen_ops): ... this.
2565         (serial_open_ops_1): New function, factored out from
2566         (serial_open): ... this.
2567         (serial_open_ops): New function.
2568         * serial.h (struct serial): Forware declare.
2569         (serial_open_ops): New declaration.
2570
2571 2016-04-12  Pedro Alves  <palves@redhat.com>
2572
2573         * serial.c (serial_open, serial_fdopen_ops, do_serial_close):
2574         Remove references to name.
2575         * serial.h (struct serial) <name>: Delete.
2576
2577 2016-04-12  Pedro Alves  <palves@redhat.com>
2578
2579         * remote-fileio.c (sigint_fileio_token, remote_fio_no_longjmp):
2580         Delete.
2581         (async_remote_fileio_interrupt): Delete.
2582         (remote_fileio_ctrl_c_signal_handler): Don't call the async signal
2583         handler.  Instead just always set the ctrl_c flag.
2584         (remote_fileio_reply): Clear remote_fio_ctrl_c_flag before
2585         re-enabling the SIGINT handler.
2586         (remote_fileio_func_open, remote_fileio_func_close)
2587         (remote_fileio_func_read, remote_fileio_func_write)
2588         (remote_fileio_func_lseek, remote_fileio_func_rename)
2589         (remote_fileio_func_unlink, remote_fileio_func_stat)
2590         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2591         (remote_fileio_func_isatty, remote_fileio_func_system)
2592         (remote_fileio_request): Remove references to
2593         remote_fio_no_longjmp.
2594         (initialize_remote_fileio): Don't create an async signal handler.
2595
2596 2016-04-12  Pedro Alves  <palves@redhat.com>
2597
2598         * event-top.c (stdin_event_handler): Call QUIT;
2599         (prompt_for_continue): Don't run with immediate_quit set.
2600
2601 2016-04-12  Pedro Alves  <palves@redhat.com>
2602
2603         * tui/tui-io.c (tui_redisplay_readline): Check
2604         gdb_in_secondary_prompt_p instead of immediate_quit.
2605         * tui/tui.c: Include top.h.
2606         (tui_rl_startup_hook): Check gdb_in_secondary_prompt_p instead of
2607         immediate_quit.
2608
2609 2016-04-12  Pedro Alves  <palves@redhat.com>
2610
2611         * top.c (read_command_file): Inline command_loop here.
2612         (command_loop): Delete.
2613
2614 2016-04-12  Pedro Alves  <palves@redhat.com>
2615
2616         * top.c: Include "gdb_select.h".
2617         (gdb_readline_no_editing): Wait for input with gdb_select instead
2618         of blocking in fgetc.
2619         (command_line_input): Don't set immediate_quit.
2620
2621 2016-04-08  Martin Galvan  <martin.galvan@tallertechnologies.com>
2622
2623         * value.c (value_next): Make pass-by-reference parameters const-correct.
2624         (value_parent): Likewise.
2625         (value_enclosing_type): Likewise.
2626         (value_lazy): Likewise.
2627         (value_stack): Likewise.
2628         (value_embedded_offset): Likewise.
2629         (value_pointed_to_offset): Likewise.
2630         (value_raw_address): Likewise.
2631         (deprecated_value_modifiable): Likewise.
2632         (value_free_to_mark): Likewise.
2633         (value_release_to_mark): Likewise.
2634         (internalvar_name): Likewise.
2635         (readjust_indirect_value_type): Likewise.
2636         (value_initialized): Likewise.
2637         * value.h (value_next): Likewise.
2638         (value_parent): Likewise.
2639         (value_enclosing_type): Likewise.
2640         (value_lazy): Likewise.
2641         (value_stack): Likewise.
2642         (value_embedded_offset): Likewise.
2643         (value_pointed_to_offset): Likewise.
2644         (value_raw_address): Likewise.
2645         (deprecated_value_modifiable): Likewise.
2646         (value_free_to_mark): Likewise.
2647         (value_release_to_mark): Likewise.
2648         (internalvar_name): Likewise.
2649         (readjust_indirect_value_type): Likewise.
2650         (value_initialized): Likewise.
2651
2652 2016-04-07  Yao Qi  <yao.qi@linaro.org>
2653
2654         * record-full.c (record_full_insert_breakpoint): Return
2655         early if entry on the address is found in
2656         record_full_breakpoints.
2657
2658 2016-04-07  Yao Qi  <yao.qi@linaro.org>
2659
2660         * record-full.c (record_full_insert_breakpoint): Set
2661         bp_tgt->reqstd_address and bp_tgt->placed_size.
2662
2663 2016-04-06  Don Breazeal  <donb@codesourcery.com>
2664
2665         * value.c (value_actual_type): Don't try to get rtti type
2666         of the value if it has been optimized out.
2667         (value_optimized_out): If a memory access error occurs,
2668         just check vaue->optimized_out.
2669
2670 2016-04-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2671
2672         Revert the previous commit adding unknown_v_replies_ok.
2673
2674 2016-04-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2675
2676         * remote.c (struct remote_state): New field unknown_v_replies_ok.
2677         (packet_config_support): Read it.
2678         (remote_start_remote): Set it.
2679
2680 2016-04-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2681
2682         * remote.c: Revert check-in by a mistake in the previous commit.
2683
2684 2016-04-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2685             Pedro Alves  <palves@redhat.com>
2686
2687         * exec.c (exec_file_locate_attach): Print warning for unsupported
2688         target_pid_to_exec_file.
2689         * symfile-mem.c (add_vsyscall_page): Remove the "file" command
2690         message part.
2691
2692 2016-04-04  Simon Marchi  <simon.marchi@ericsson.com>
2693
2694         * cli/cli-decode.c (help_cmd_list): Fix function doc and remove
2695         trailing spaces.
2696
2697 2016-04-01  Artemiy Volkov  <artemiyv@acm.org>
2698
2699         PR gdb/19820
2700         * eval.c (evaluate_subexp_standard): Allow TYPE_CODE_ENUM to be
2701         the type of BINOP_REPEAT's second operand.
2702
2703 2016-03-31  Yichao Yu  <yyc1992@gmail.com>
2704
2705         PR gdb/19858
2706         * jit.c (jit_breakpoint_re_set_internal): Return 0 if we already
2707         got the breakpoint at the right address.
2708         (jit_inferior_created): New function.
2709         (_initialize_jit): Install jit_inferior_created as
2710         inferior_created observer.
2711
2712 2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2713
2714         * NEWS: Mention support for tracepoints on powerpc*-linux.
2715
2716 2016-03-31  Catalin Udma  <catalin.udma@freescale.com>
2717
2718         PR python/19743
2719         * python/python.c (execute_gdb_command): Use console uiout
2720         when executing gdb command.
2721         * utils.c (restore_ui_out_closure): New structure.
2722         (do_restore_ui_out): New function.
2723         (make_cleanup_restore_ui_out): Likewise.
2724         * utils.h (make_cleanup_restore_ui_out): Declare.
2725
2726 2016-03-31  Pedro Alves  <palves@redhat.com>
2727
2728         * NEWS: Mention that support for "target m32rsdi", "target mips",
2729         "target pmon", "target ddb", "target rockhopper", and "target lsi"
2730         was removed.
2731         * Makefile.in (ALL_TARGET_OBS): Remove remote-m32r-sdi.o and
2732         remote-mips.o.
2733         (ALLDEPFILES): Remove remote-m32r-sdi.c and remote-mips.c.
2734         * configure.tgt: Remove all references to remote-m32r-sdi.o and
2735         remote-mips.o.
2736         * mips-tdep.c (deprecated_mips_set_processor_regs_hack): Delete
2737         function.
2738         * mips-tdep.h (deprecated_mips_set_processor_regs_hack): Delete
2739         declaration.
2740         * remote-m32r-sdi.c, remote-mips.c: Delete files.
2741         * symfile.c (generic_load, generic_load): Remove comments.
2742
2743 2016-03-30  Yao Qi  <yao.qi@linaro.org>
2744
2745         * arm-tdep.c (arm_epilogue_frame_this_id): Check 'func' against
2746         0 rather than NULL.
2747
2748 2016-03-30  Yao Qi  <yao.qi@linaro.org>
2749
2750         * arm-tdep.c: (arm_make_epilogue_frame_cache): New function.
2751         (arm_epilogue_frame_this_id): New function.
2752         (arm_epilogue_frame_prev_register): New function.
2753         (arm_epilogue_frame_sniffer): New function.
2754         (arm_epilogue_frame_unwind): New.
2755         (arm_gdbarch_init): Append unwinder arm_epilogue_frame_unwind.
2756
2757 2016-03-30  Yao Qi  <yao.qi@linaro.org>
2758
2759         * arm-tdep.c (arm_stack_frame_destroyed_p): Rename it ...
2760         (arm_stack_frame_destroyed_p_1): ... here.  Don't call
2761         arm_pc_is_thumb.
2762         (arm_stack_frame_destroyed_p): Call
2763         thumb_stack_frame_destroyed_p and
2764         arm_stack_frame_destroyed_p_1.
2765
2766 2016-03-30  Doug Evans  <dje@google.com>
2767
2768         * python/py-utils.c (host_string_to_python_string): New function.
2769         * python/python-internal.h (host_string_to_python_string): Declare it.
2770         * python/py-*.c (*): Update all calls to
2771         PyString_Decode (str, strlen (str), host_charset (), NULL);
2772         to use host_string_to_python_string instead.
2773
2774 2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2775
2776         * remote.c (remote_check_symbols): Allocate own buffer for reply.
2777
2778 2016-03-29  Max Filippov  <jcmvbkbc@gmail.com>
2779
2780         * xtensa-tdep.c (xtensa_frame_cache): Change op1 type to LONGEST.
2781         Use safe_read_memory_integer instead of read_memory_integer.
2782
2783 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2784
2785         * NEWS: Mention support for tracepoints on s390*-linux.
2786
2787 2016-03-29  Don Breazeal  <donb@codesourcery.com>
2788
2789         * gdb/value.c (value_actual_type): Fix formatting issue.
2790
2791 2016-03-23  Yao Qi  <yao.qi@linaro.org>
2792
2793         * gdbarch.sh (software_single_step): Remove comments.
2794         * gdbarch.h: Regenerated.
2795
2796 2016-03-21  Yao Qi  <yao.qi@linaro.org>
2797
2798         * arm-tdep.c (arm_record_media): New.
2799         (arm_record_ld_st_reg_offset): Call arm_record_media.
2800
2801 2016-03-21  Yao Qi  <yao.qi@linaro.org>
2802
2803         * arm-linux-tdep.c (arm_canonicalize_syscall): Canonicalize
2804         more syscalls.
2805
2806 2016-03-18  Yao Qi  <yao.qi@linaro.org>
2807
2808         * sparc-tdep.c (sparc_software_single_step): Make it static.
2809         * sparc-tdep.h (sparc_software_single_step): Remove declaration.
2810
2811 2016-03-18  Yao Qi  <yao.qi@linaro.org>
2812
2813         * spu-tdep.c (spu_software_single_step): Throw error when
2814         target_read_memory fails.
2815
2816 2016-03-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
2817
2818         * linux-thread-db.c (check_pid_namespace_match): Extend the message.
2819
2820 2016-03-17  Pedro Alves  <palves@redhat.com>
2821             Don Breazeal  <donb@codesourcery.com>
2822
2823         PR remote/19496
2824         * infcmd.c (notice_new_inferior): Use the 'leave_running' argument
2825         instead of checking the 'non_stop' global.
2826         * remote.c (remote_add_thread): New parameter 'executing'.  Use it
2827         to set the new thread's executing state.
2828         (remote_notice_new_inferior): Rename parameter 'running' to
2829         'executing'.  Always set the thread state to THREAD_RUNNING in
2830         non-stop mode, and to THREAD_STOPPED in all-stop mode.  Pass
2831         EXECUTING to remote_add_thread and notice_new_inferior.
2832         (remote_update_thread_list): Update to pass executing state, not
2833         running state.
2834
2835 2016-03-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2836
2837         * syscalls/s390-linux.xml: Add NUMA syscalls and new syscalls up
2838         to 374.
2839         * syscalls/s390x-linux.xml: Likewise.
2840
2841 2016-03-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2842
2843         * linux-record.c (record_mem_at_reg): New helper function.
2844         (record_linux_system_call): Exploit new helper function where
2845         applicable.
2846
2847 2016-03-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2848
2849         * linux-record.c: Fix whitespace issues; tabify, remove trailing
2850         spaces.
2851
2852 2016-03-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2853
2854         * linux-record.c (record_linux_system_call): Add missing return
2855         statements to handling of pipe and pipe2 syscalls.
2856
2857 2016-03-16  Doug Evans  <dje@google.com>
2858
2859         * xml-tdesc.c (tdesc_start_enum): Fix c++ build.
2860
2861 2016-03-16  Yao Qi  <yao.qi@linaro.org>
2862
2863         * arm-linux-tdep.c (arm_linux_init_abi): Fix
2864         arm_linux_record_tdep.arg1, arm_linux_record_tdep.arg2 and
2865         arm_linux_record_tdep.arg3.  Set arm_linux_record_tdep.arg4,
2866         arm_linux_record_tdep.arg5, arm_linux_record_tdep.arg6, and
2867         arm_linux_record_tdep.arg7.
2868
2869 2016-03-15  Keith Seitz  <keiths@redhat.com>
2870
2871         PR breakpoints/18303
2872         * cp-namespace.c (cp_lookup_bare_symbol): Change assertion to
2873         look for "::" instead of simply ":".
2874         (cp_search_static_and_baseclasses): Return null_block_symbol for
2875         malformed input.
2876         Remove assertions.
2877         * cp-support.c (cp_find_first_component_aux): Do not return
2878         a prefix length for ':' unless the next character is also ':'.
2879
2880 2016-03-15  Doug Evans  <dje@google.com>
2881
2882         * features/aarch64-core.xml (cpsr_flags): New flags type.
2883         (cpsr): Use it.
2884         * features/aarch64.c: Regenerate.
2885
2886 2016-03-15  Doug Evans  <dje@google.com>
2887
2888         * features/i386/32bit-core.xml (i386_eflags): Remove "end" spec.
2889         * features/i386/32bit-sse.xml (i386_eflags): Ditto.
2890         * features/i386/64bit-core.xml (i386_eflags): Ditto.
2891         * features/i386/64bit-sse.xml (i386_eflags): Ditto.
2892         * features/i386/x32-core.xml (i386_eflags): Ditto.
2893
2894 2016-03-15  Doug Evans  <dje@google.com>
2895             Wei-cheng Wang  <cole945@gmail.com>
2896
2897         Extend flags to support multibit and enum bitfields.
2898         * NEWS: Document new features.
2899         * c-typeprint.c (c_type_print_varspec_prefix): Handle TYPE_CODE_FLAGS.
2900         (c_type_print_varspec_suffix, c_type_print_base): Ditto.
2901         * gdbtypes.c (arch_flags_type): Don't assume all fields are one bit.
2902         (append_flags_type_field): New function.
2903         (append_flags_type_flag): Call it.
2904         * gdbtypes.h (append_flags_type_field): Declare.
2905         * target-descriptions.c (struct tdesc_type_flag): Delete.
2906         (enum tdesc_type_kind) <TDESC_TYPE_BOOL>: New enum value.
2907         (enum tdesc_type_kind) <TDESC_TYPE_ENUM>: Ditto.
2908         (struct tdesc_type) <u.f>: Delete.
2909         (tdesc_predefined_types): Add "bool".
2910         (tdesc_predefined_type): New function.
2911         (tdesc_gdb_type): Handle TDESC_TYPE_BOOL, TDESC_TYPE_ENUM.
2912         Update TDESC_TYPE_FLAGS support.
2913         (tdesc_free_type): Handle TDESC_TYPE_ENUM.  Update TDESC_TYPE_FLAGS.
2914         (tdesc_create_flags): Update.
2915         (tdesc_create_enum): New function.
2916         (tdesc_add_field): Initialize start,end to -1.
2917         (tdesc_add_typed_bitfield): New function.
2918         (tdesc_add_bitfield): Call it.
2919         (tdesc_add_flag): Allow TDESC_TYPE_STRUCT.  Update.
2920         (tdesc_add_enum_value): New function.
2921         (maint_print_c_tdesc_cmd): Fold TDESC_TYPE_FLAGS support into
2922         TDESC_TYPE_STRUCT.  Handle TDESC_TYPE_ENUM.
2923         * target-descriptions.h (tdesc_create_enum): Declare.
2924         (tdesc_add_typed_bitfield, tdesc_add_enum_value): Declare.
2925         * valprint.c (generic_val_print_enum_1): New function.
2926         (generic_val_print_enum): Call it.
2927         (val_print_type_code_flags): Make static.  Handle multibit bitfields
2928         and enum bitfields.
2929         * valprint.h (val_print_type_code_flags): Delete.
2930         * xml-tdesc.c (struct tdesc_parsing_data) <current_type_is_flags>:
2931         Delete.  All uses removed.
2932         (tdesc_start_enum): New function.
2933         (tdesc_start_field): Handle multibit and enum bitfields.
2934         (tdesc_start_enum_value): New function.
2935         (enum_value_attributes, enum_children, enum_attributes): New static
2936         globals.
2937         (feature_children): Add "enum".
2938         * features/gdb-target.dtd (enum, evalue): New elements.
2939
2940 2016-03-15  Doug Evans  <dje@google.com>
2941
2942         * target-descriptions.c (struct tdesc_type) <u.u.size>: Change type
2943         from LONGEST to int.
2944         (struct tdesc_type) <u.f.size>: Ditto.
2945         (tdesc_set_struct_size): Change type of "size" arg from LONGEST
2946         to int.  Add assertion size > 0.
2947         (tdesc_create_flags): Ditto.
2948         * target-descriptions.h (tdesc_set_struct_size): Update.
2949         (tdesc_create_flags): Update.
2950         * xml-tdesc.c (MAX_FIELD_SIZE, MAX_FIELD_BITSIZE): New macros.
2951         (MAX_VECTOR_SIZE): New macro.
2952         (tdesc_start_struct): Catch conversion errors from LONGEST to int.
2953         (tdesc_start_flags, tdesc_start_field, tdesc_start_vector): Ditto.
2954
2955 2016-03-15  Doug Evans  <dje@google.com>
2956
2957         * target-descriptions.c (maint_print_c_tdesc_cmd): Use "type" for
2958         TYPE_CODE_FLAGS instead of "field_type", for consistency.
2959         * features/i386/amd64-avx-linux.c: Regenerate.
2960         * features/i386/amd64-avx.c: Regenerate.
2961         * features/i386/amd64-avx512-linux.c: Regenerate.
2962         * features/i386/amd64-avx512.c: Regenerate.
2963         * features/i386/amd64-linux.c: Regenerate.
2964         * features/i386/amd64-mpx-linux.c: Regenerate.
2965         * features/i386/amd64-mpx.c: Regenerate.
2966         * features/i386/amd64.c: Regenerate.
2967         * features/i386/i386-avx-linux.c: Regenerate.
2968         * features/i386/i386-avx.c: Regenerate.
2969         * features/i386/i386-avx512-linux.c: Regenerate.
2970         * features/i386/i386-avx512.c: Regenerate.
2971         * features/i386/i386-linux.c: Regenerate.
2972         * features/i386/i386-mmx-linux.c: Regenerate.
2973         * features/i386/i386-mmx.c: Regenerate.
2974         * features/i386/i386-mpx-linux.c: Regenerate.
2975         * features/i386/i386-mpx.c: Regenerate.
2976         * features/i386/i386.c: Regenerate.
2977         * features/i386/x32-avx-linux.c: Regenerate.
2978         * features/i386/x32-avx.c: Regenerate.
2979         * features/i386/x32-avx512-linux.c: Regenerate.
2980         * features/i386/x32-avx512.c: Regenerate.
2981         * features/i386/x32-linux.c: Regenerate.
2982         * features/i386/x32.c: Regenerate.
2983
2984 2016-03-15  Pedro Alves  <palves@redhat.com>
2985
2986         PR gdb/19676
2987         * linux-thread-db.c (try_thread_db_load_1): Leave
2988         info->td_ta_thr_iter_p NULL iff debugging a live process and we
2989         have /proc access.
2990         (find_new_threads_once): Assert that we have a non-NULL
2991         info->td_ta_thr_iter_p instead of checking whether the target has
2992         execution.
2993
2994 2016-03-15  Pedro Alves  <palves@redhat.com>
2995
2996         PR gdb/19676
2997         * infrun.c (displaced_step_prepare): Also disable displaced
2998         stepping on NOT_SUPPORTED_ERROR.
2999         * linux-tdep.c (linux_displaced_step_location): If reading auxv
3000         fails, throw NOT_SUPPORTED_ERROR instead of generic error.
3001
3002 2016-03-13  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3003
3004         * s390-linux-tdep.c (s390_gen_return_address): New function.
3005         (s390_gdbarch_init): Fill gen_return_address hook.
3006
3007 2016-03-11  Andrew Burgess  <andrew.burgess@embecosm.com>
3008
3009         * symmisc.c (maintenance_info_line_tables): New function.
3010         (maintenance_print_one_line_table): New function.
3011         (_initialize_symmisc): Register 'maint info line-table' command.
3012         * NEWS: Mention new command.
3013
3014 2016-03-11  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3015
3016         * s390-linux-tdep.c (s390_ax_pseudo_register_collect): New function.
3017         (s390_ax_pseudo_register_push_stack): New function.
3018         (s390_gdbarch_init): Fill ax_pseudo_register_collect and
3019         ax_pseudo_register_push_stack hooks.
3020
3021 2016-03-10  Simon Marchi  <simon.marchi@polymtl.ca>
3022
3023         * data-directory/Makefile.in (PYTHON_FILE_LIST): Install
3024         gdb/function/as_string.py.
3025         * python/lib/gdb/function/as_string.py: New file.
3026         * NEWS: Mention the new $_as_string function.
3027
3028 2016-03-09  Jose E. Marchesi  <jose.marchesi@oracle.com>
3029
3030         * target.h: Fix doc string of target_can_use_hardware_watchpoint.
3031
3032 2016-03-09  Pedro Alves  <palves@redhat.com>
3033
3034         * event-top.c (more_to_come): Delete.
3035         (struct readline_input_state): Delete.
3036         (readline_input_state): Delete.
3037         (get_command_line_buffer): New function.
3038         (command_handler): Update comments.  Don't handle NULL commands
3039         here.  Do not execute commented lines.
3040         (command_line_append_input_line): New function.
3041         (handle_line_of_input): New function, partly based on
3042         command_line_handler and command_line_input.
3043         (command_line_handler): Rewrite.
3044         * event-top.h (command_handler): New declaration.
3045         (command_loop): Defer command execution to command_handler.
3046         (command_line_input): Update comments.  Simplify, using struct
3047         buffer and handle_line_of_input.
3048         * top.h (struct buffer): New forward declaration.
3049         (handle_line_of_input): New declaration.
3050
3051 2016-03-09  Pedro Alves  <palves@redhat.com>
3052
3053         * event-top.c (command_line_handler): Use xfree + xstrdup instead
3054         of xrealloc + strcpy.
3055         * main.c (captured_main): Use xstrdup instead of xmalloc plus
3056         manual clear.
3057         * top.c (saved_command_line): Rewrite comment.
3058         (saved_command_line_size): Delete.
3059         (command_line_input): Use xfree + xstrdup instead of xrealloc +
3060         strcpy.
3061         * top.h (saved_command_line_size): Delete declaration.
3062
3063 2016-03-09  Pedro Alves  <palves@redhat.com>
3064
3065         * event-top.c: Include buffer.h.
3066         (gdb_readline_no_editing_callback): Use struct buffer instead
3067         of xrealloc.
3068
3069 2016-03-09  Pedro Alves  <palves@redhat.com>
3070
3071         * common/buffer.h (buffer_grow_char): New function.
3072         * top.c: Include buffer.h.
3073         (gdb_readline_no_editing): Rename 'prompt_arg' parameter to
3074         'prompt'.  Use struct buffer instead of xrealloc.
3075
3076 2016-03-09  Pedro Alves  <palves@redhat.com>
3077
3078         * defs.h (gdb_readline): Delete declaration.
3079         * top.c (gdb_readline): Rename to ...
3080         (gdb_readline_no_editing): ... this, and make static.
3081
3082 2016-03-09  Pedro Alves  <palves@redhat.com>
3083
3084         * utils.c (prompt_for_continue): Update comments.
3085
3086 2016-03-09  Pedro Alves  <palves@redhat.com>
3087
3088         * event-top.c (async_annotation_suffix): Delete.
3089         (top_level_prompt, command_line_handler): Don't use
3090         'async_annotation_suffix' and simplify.
3091         * event-top.h (async_annotation_suffix): Delete declaration.
3092         (init_main): Remove reference to 'async_annotation_suffix'.
3093
3094 2016-03-09  Pedro Alves  <palves@redhat.com>
3095
3096         * event-top.c (gdb_readline2): Rename to ...
3097         (gdb_readline_no_editing_callback): ... this.
3098         (change_line_handler, stdin_event_handler)
3099         (gdb_setup_readline): Adjust.
3100         * event-top.h (gdb_readline2): Rename to ...
3101         (gdb_readline_no_editing_callback): ... this, and move closer to
3102         other readline-related declarations.
3103         * mi/mi-interp.c (mi_interpreter_resume): Adjust.
3104
3105 2016-03-09  Pedro Alves  <palves@redhat.com>
3106
3107         * top.c (window_hook): Delete.
3108         (command_loop): Remove references to window_hook.
3109
3110 2016-03-09  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3111
3112         * corefile.c (safe_read_memory_unsigned_integer): New function.
3113         * gdbcore.h (safe_read_memory_unsigned_integer): New prototype.
3114         * rs6000-tdep.c (rs6000_frame_cache): Read backchain as unsigned.
3115
3116 2016-03-09  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3117
3118         * rs6000-tdep.c: Add "ax.h" and "ax-gdb.h" includes.
3119         (rs6000_gen_return_address): New function.
3120         (rs6000_gdbarch_init): Wire in the above.
3121
3122 2016-03-09  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3123
3124         * rs6000-tdep.c (rs6000_ax_pseudo_register_collect): New function.
3125         (rs6000_gdbarch_init): Wire in the above.
3126
3127 2016-03-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3128
3129         * s390-linux-tdep.c (s390_analyze_prologue): Ignore BRC and BRCL
3130         instructions that do nothing or are conditional traps.
3131
3132 2016-03-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3133
3134         * s390-linux-tdep.c (s390_prologue_frame_unwind_cache): Store
3135         frame func's PC in info->func before any other failure can occur.
3136         (s390_frame_this_id): Use frame_id_build_unavailable_stack if
3137         info->func has been filled out.
3138
3139 2016-03-09  Pedro Alves  <palves@redhat.com>
3140
3141         * osabi.c (gdb_osabi_names): Avoid spaces in osabi names.
3142
3143 2016-03-09  Pedro Alves  <palves@redhat.com>
3144
3145         * frv-tdep.c (frv_gdbarch_init): Handle bfd_mach_fr300.
3146
3147 2016-03-09  Pedro Alves  <palves@redhat.com>
3148
3149         * cris-tdep.c (cris_gdbarch_init): Return 0 if the info's byte
3150         order is BFD_ENDIAN_BIG or if the cris version is unsupported.
3151
3152 2016-03-09  Pedro Alves  <palves@redhat.com>
3153
3154         * doublest.c: Extend comments.
3155         (floatformat_to_doublest, floatformat_from_doublest): Copy the
3156         floatformat's total size, not the host type's size.
3157
3158 2016-03-09  Pedro Alves  <palves@redhat.com>
3159
3160         * doublest.c (floatformat_totalsize_bytes): New function.
3161         (floatformat_from_type): Assert that the type's length is at least
3162         as long as the floatformat's totalsize.
3163         * doublest.h (floatformat_totalsize_bytes): New declaration.
3164         * gdbtypes.c (arch_float_type): Assert that the type's length is
3165         at least as long as the floatformat's totalsize.
3166
3167 2016-03-09  Pedro Alves  <palves@redhat.com>
3168
3169         * hppa-linux-tdep.c (hppa_linux_init_abi): Set the long double
3170         format to floatformats_ieee_double.
3171
3172 2016-03-07  Pedro Alves  <palves@redhat.com>
3173
3174         * mips-tdep.c (mips_gdbarch_init): Check whether info.abfd is NULL
3175         before calling bfd_get_flavour.
3176
3177 2016-03-05  Pitchumani Sivanupandi  <pitchumani.s@atmel.com>
3178
3179         * avr-tdep.c (AVR_LAST_ARG_REGNUM): Define.
3180         (avr_push_dummy_call): Correct last needed argument register.
3181         Write MSB of argument into register and subsequent bytes into
3182         other registers in decreasing order.
3183
3184 2016-03-04  Yao Qi  <yao.qi@linaro.org>
3185
3186         * arm-tdep.c (arm_record_vdata_transfer_insn): Simplify the
3187         condition check.  Record the right D register number.
3188
3189 2016-03-04  Yao Qi  <yao.qi@linaro.org>
3190
3191         * arm-tdep.c (arm_record_extension_space): Remove code
3192         printing "Process record does not support".
3193         (arm_record_data_proc_misc_ld_str): Likewise.
3194         (decode_insn): Call arm_record_extension_space if condition
3195         is 0xf.  Call arm_record_unsupported_insn if ret isn't
3196         ARM_RECORD_SUCCESS.  Use 'ret' instead of 'insn_id' to hold
3197         the value of thumb2_record_decode_insn_handler.
3198
3199 2016-03-04  Simon Marchi  <simon.marchi@ericsson.com>
3200
3201         * features/feature_to_c.sh: Print the help when passing no
3202         argument.
3203
3204 2016-03-02  Bernhard Heckel  <bernhard.heckel@intel.com>
3205
3206         * MAINTAINERS (Write After Approval): Add Bernhard Heckel.
3207
3208 2016-03-02  Bernhard Heckel  <bernhard.heckel@intel.com>
3209
3210         * dwarf2read.c (new_symbol_full): Fix detection of gfortran compilers.
3211
3212 2016-03-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3213
3214         * s390-linux-tdep.c (s390_backchain_frame_unwind_cache): Avoid
3215         exception when attempting to access the inferior's backchain.
3216
3217 2016-02-29  Yao Qi  <yao.qi@linaro.org>
3218
3219         * aarch64-linux-tdep.c (aarch64_canonicalize_syscall): Support
3220         eventfd2, eventfd2, dup3, inotify_init1, fallocate and pipe2.
3221         Return gdb_sys_epoll_create1 instead of gdb_sys_epoll_create
3222         for aarch64_sys_epoll_create1.
3223
3224 2016-02-29  Yao Qi  <yao.qi@linaro.org>
3225
3226         * linux-record.h (enum gdb_syscall) <gdb_sys_fallocate>: New.
3227         <gdb_sys_eventfd2, gdb_sys_epoll_create1, gdb_sys_dup3>: New.
3228         <gdb_sys_pipe2, gdb_sys_inotify_init1>: New.
3229         * linux-record.c (record_linux_system_call): Handle them.
3230
3231 2016-02-28  Iain Buclaw  <ibuclaw@gdcproject.org>
3232
3233         * d-namespace.c (d_lookup_symbol_imports): Avoid recursive lookups from
3234         cyclic imports.
3235
3236 2016-02-26  Keith Seitz  <keiths@redhat.com>
3237
3238         * rs6000-tdep.c (rs6000_frame_cache): Explicitly cast return result
3239         to avoid invalid conversion from void *.
3240
3241 2016-02-26  Yao Qi  <yao.qi@linaro.org>
3242
3243         * arm-tdep.c (arm_record_exreg_ld_st_insn): Set 'single_reg'
3244         per bit 8.  Check bit 20 instead of bit 4 for VMOV
3245         instruction.  Record D registers for instructions changing
3246         S registers.  Change of the order of length and address
3247         in record_buf_mem array.
3248
3249 2016-02-26  Yao Qi  <yao.qi@linaro.org>
3250
3251         * arm-tdep.c (thumb_record_ld_st_reg_offset): Fix the register
3252         number of Rd.
3253
3254 2016-02-25  Doug Evans  <dje@google.com>
3255
3256         * remote-m32r-sdi.c (recv_char_data): Initialize val to avoid
3257         compiler warning.
3258         (recv_long_data): Ditto.
3259
3260 2016-02-25  Simon Marchi  <simon.marchi@ericsson.com>
3261
3262         * i386-linux-tdep.c (i386_linux_handle_segmentation_fault):
3263         Initialize variables.
3264
3265 2016-02-25  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3266
3267         * ax-general.c (ax_reg): Call gdbarch_remote_register_number.
3268         (ax_reg_mask): Likewise.
3269
3270 2016-02-24  Pedro Alves  <palves@redhat.com>
3271
3272         * linux-nat.c (save_sigtrap) Delete.
3273         (stop_wait_callback): Call save_stop_reason instead of
3274         save_sigtrap.
3275         (check_stopped_by_breakpoint): Rename to ...
3276         (save_stop_reason): ... this.  Bits of save_sigtrap folded here.
3277         Use GDB_ARCH_IS_TRAP_HWBKPT and handle ambiguous
3278         GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.  Factor out
3279         common code between the USE_SIGTRAP_SIGINFO and
3280         !USE_SIGTRAP_SIGINFO blocks.
3281         (linux_nat_filter_event): Call save_stop_reason instead of
3282         save_sigtrap.
3283         * nat/linux-ptrace.h: Check for both SI_KERNEL and TRAP_BRKPT
3284         si_code for MIPS.
3285         * nat/linux-ptrace.h: Fix "TRAP_HWBPT" typo in x86 table.  Add
3286         comments on MIPS behavior.
3287         (GDB_ARCH_IS_TRAP_HWBKPT): Define for all archs.
3288
3289 2016-02-24  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3290
3291         * rs6000-tdep.c (rs6000_frame_cache): Initialize frame and pc to 0
3292         to avoid spurious warnings.
3293
3294 2016-02-24  Gary Benson  <gbenson@redhat.com>
3295
3296         * exec.c (exec_file_locate_attach): Do not attempt to
3297         locate main executable locally if not found in sysroot.
3298
3299 2016-02-24  Joel Brobecker  <brobecker@adacore.com>
3300
3301         GDB 7.11 released.
3302
3303 2016-02-24  Wei-cheng Wang  <cole945@gmail.com>
3304
3305         * rs6000-tdep.c (rs6000_frame_cache, rs6000_frame_this_id): Handle
3306         unavailable PC/SP to build unavailable frame.
3307
3308 2016-02-23  Doug Evans  <dje@google.com>
3309
3310         Extend "skip" command to support -file, -gfile, -function, -rfunction.
3311         * NEWS: Document new features.
3312         * skip.c: #include "fnmatch.h", "gdb_regex.h".
3313         (skiplist_entry) <file>: Renamed from filename.
3314         <function>: Renamed from function_name.
3315         <file_is_glob, function_is_regexp>: New members.
3316         <compiled_function_regexp, compiled_function_regexp_is_valid>:
3317         New members.
3318         (make_skip_entry): New function.
3319         (free_skiplist_entry, free_skiplist_entry_cleanup): New functions.
3320         (make_free_skiplist_entry_cleanup): New function.
3321         (skip_file_command): Update.
3322         (skip_function, skip_function_command): Update.
3323         (compile_skip_regexp): New functions.
3324         (skip_command): Add support for new options.
3325         (skip_info): Update.
3326         (skip_file_p, skip_gfile_p): New functions.
3327         (skip_function_p, skip_rfunction_p): New functions.
3328         (function_name_is_marked_for_skip): Update and simplify.
3329         (_initialize_step_skip): Update.
3330         * symtab.c: #include "fnmatch.h".
3331         (compare_glob_filenames_for_search): New function.
3332         * symtab.h (compare_glob_filenames_for_search): Declare.
3333         * utils.c (count_path_elements): New function.
3334         (strip_leading_path_elements): New function.
3335         * utils.h (count_path_elements): Declare.
3336         (strip_leading_path_elements): Declare.
3337
3338 2016-02-23  Simon Marchi  <simon.marchi@ericsson.com>
3339
3340         * arm-tdep.c (arm_decode_svc_copro): Remove "to" parameter.
3341         (thumb_process_displaced_insn): Likewise.
3342         (arm_process_displaced_insn): Adjust calls.
3343
3344 2016-02-23  Yao Qi  <yao.qi@linaro.org>
3345
3346         * aarch64-linux-tdep.c (enum aarch64_syscall) <aarch64_sys_mknod>:
3347         Remove.
3348         <aarch64_sys_mkdir, aarch64_sys_unlink, aarch64_sys_symlink>: Remove.
3349         <aarch64_sys_link, aarch64_sys_rename, aarch64_sys_faccess>: Remove.
3350         <aarch64_sys_mknodat, aarch64_sys_mkdirat>: New.
3351         <aarch64_sys_unlinkat, aarch64_sys_symlinkat>: New.
3352         <aarch64_sys_linkat, aarch64_sys_renameat>: New.
3353         <aarch64_sys_faccessat>: New.
3354         <aarch64_sys_open, aarch64_sys_readlink, aarch64_sys_fstatat>: Remove.
3355         <aarch64_sys_openat, aarch64_sys_readlinkat>: New.
3356         <aarch64_sys_newfstatat>: New.
3357         (UNSUPPORTED_SYSCALL_MAP): New macro.
3358         (aarch64_canonicalize_syscall): Add missing syscalls.
3359
3360 2016-02-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
3361
3362         * gdb-gdb.py (class TypeFlagsPrinter): Use parentheses for print.
3363
3364 2016-02-22  Yao Qi  <yao.qi@linaro.org>
3365
3366         * arm-tdep.c: Fix code format issues.
3367
3368 2016-02-21  Iain Buclaw  <ibuclaw@gdcproject.org>
3369
3370         * d-namespace.c (d_lookup_symbol_imports): Remove argument
3371         'search_parents'.  All callers updated.
3372
3373 2016-02-18  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3374
3375         * s390-linux-tdep.c (s390_guess_tracepoint_registers): New function.
3376         (s390_gdbarch_init): Fill guess_tracepoint_registers hook.
3377
3378 2016-02-18  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3379
3380         * NEWS: Add entry for bound violation.
3381         * amd64-linux-tdep.c (amd64_linux_init_abi_common):
3382         Add handler for segmentation fault.
3383         * gdbarch.sh (handle_segmentation_fault): New.
3384         * gdbarch.c: Regenerate.
3385         * gdbarch.h: Regenerate.
3386         * i386-linux-tdep.c (i386_linux_handle_segmentation_fault): New.
3387         (SIG_CODE_BONDARY_FAULT): New define.
3388         (i386_linux_init_abi): Use i386_mpx_bound_violation_handler.
3389         * i386-linux-tdep.h (i386_linux_handle_segmentation_fault) New.
3390         * i386-tdep.c (i386_mpx_enabled): Add as external.
3391         * i386-tdep.c (i386_mpx_enabled): Add as external.
3392         * infrun.c (handle_segmentation_fault): New function.
3393         (print_signal_received_reason): Use handle_segmentation_fault.
3394
3395 2016-02-18  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3396
3397         * arch-utils.c (default_guess_tracepoint_registers): New function.
3398         * arch-utils.h (default_guess_tracepoint_registers): New prototype.
3399         * gdbarch.c: Regenerate.
3400         * gdbarch.h: Regenerate.
3401         * gdbarch.sh: Add guess_tracepoint_registers hook.
3402         * tracefile.c (tracefile_fetch_registers): Use the new gdbarch hook.
3403
3404 2016-02-17  Gary Benson  <gbenson@redhat.com>
3405
3406         * exec.c (exec_file_locate_attach): Add missing cleanup.
3407
3408 2016-02-16  Don Breazeal  <donb@codesourcery.com>
3409
3410         PR remote/19496
3411         * remote.c (remove_new_fork_children): Check for pending
3412         fork status in thread_info.suspend.
3413
3414 2016-02-16  Yao Qi  <yao.qi@linaro.org>
3415
3416         * arm-linux-tdep.c (arm_linux_software_single_step): Assign
3417         'old_chain' later.
3418
3419 2016-02-16  Yao Qi  <yao.qi@linaro.org>
3420
3421         * arch/arm-get-next-pcs.h (struct arm_get_next_pcs_ops)
3422         <syscall_next_pc>: Remove argument PC.  Callers updated.
3423         * arm-linux-tdep.c (arm_linux_get_next_pcs_syscall_next_pc):
3424         Remove argument PC.  Get pc from regcache_read_pc.
3425         * arm-tdep.c (arm_get_next_pcs_syscall_next_pc): Remove
3426         argument PC.
3427
3428 2016-02-15  Yao Qi  <yao.qi@linaro.org>
3429
3430         * aarch64-tdep.c (aarch64_analyze_prologue): Remove "0x".
3431
3432 2016-02-12  Yao Qi  <yao.qi@linaro.org>
3433
3434         * arch/arm-linux.c (arm_linux_get_next_pcs_fixup): Calculate
3435         nextpc according to instruction.
3436
3437 2016-02-12  Yao Qi  <yao.qi@linaro.org>
3438
3439         * arch/arm-get-next-pcs.c (arm_get_next_pcs): Call
3440         self->ops->fixup if it isn't NULL.
3441         * arch/arm-get-next-pcs.h: Include gdb_vecs.h.
3442         (struct arm_get_next_pcs_ops) <fixup>: New field.
3443         * arch/arm-linux.c: Include common-regcache.h and
3444         arch/arm-get-next-pcs.h.
3445         (arm_linux_get_next_pcs_fixup): New function.
3446         * arch/arm-linux.h (arm_linux_get_next_pcs_fixup): Declare.
3447         * arm-linux-tdep.c (arm_linux_get_next_pcs_ops): Initialize
3448         it with arm_linux_get_next_pcs_fixup.
3449         (arm_linux_software_single_step): Move code to
3450         arm_linux_get_next_pcs_fixup.
3451         * arm-tdep.c (arm_get_next_pcs_ops): Initialize it.
3452
3453 2016-02-12  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3454
3455         * xml-tdesc.c (target_fetch_description_xml) [!HAVE_LIBEXPAT]: Warn
3456         and return NULL.
3457
3458 2016-02-12  Markus Metzger  <markus.t.metzger@intel.com>
3459
3460         * frame.h (skip_tailcall_frames): Update comment.
3461         * frame.c (skip_artificial_frames, skip_tailcall_frames): Return NULL
3462         if only artificial frames are found.  Update comment.
3463         (frame_unwind_caller_id): Handle NULL return.
3464         (frame_unwind_caller_pc, frame_unwind_caller_arch): Assert that
3465         skip_artificial_frames does not return NULL.
3466         (frame_pop): Add an error if only tailcall frames are found.
3467         * infcmd.c (finish_command): Move skip_tailcall_frames call into
3468         forward-execution case.  Add an error if only tailcall frames are
3469         found.
3470
3471 2016-02-12  Markus Metzger  <markus.t.metzger@intel.com>
3472
3473         * stack.c (frame_info): Check frame_unwind_caller_id.
3474
3475 2016-02-12  Markus Metzger  <markus.t.metzger@intel.com>
3476
3477         * frame.h (skip_tailcall_frames): New.
3478         * frame.c (skip_tailcall_frames): New.
3479         (frame_pop): Call skip_tailcall_frames.
3480         * infcmd.c (finish_command): Call skip_tailcall_frames.
3481
3482 2016-02-11  Pedro Alves  <palves@redhat.com>
3483
3484         * Makefile.in (check-parallel): New rule.
3485
3486 2016-02-11  Simon Marchi  <simon.marchi@ericsson.com>
3487
3488         * arm-tdep.c (arm_skip_prologue): Remove unused variables.
3489         (arm_analyze_prologue): Likewise.
3490         (arm_scan_prologue): Likewise.
3491         (arm_m_exception_prev_register): Likewise.
3492         (arm_copy_block_xfer): Likewise.
3493         (thumb2_copy_block_xfer): Likewise.
3494         (arm_decode_miscellaneous): Likewise.
3495         (arm_decode_ld_st_word_ubyte): Likewise.
3496         (arm_decode_svc_copro): Likewise.
3497         (thumb2_decode_svc_copro): Likewise.
3498         (thumb_copy_16bit_ldr_literal): Likewise.
3499         (thumb_copy_pop_pc_16bit): Likewise.
3500         (decode_thumb_32bit_ld_mem_hints): Likewise.
3501         (arm_show_force_mode): Likewise.
3502         (_initialize_arm_tdep): Likewise.
3503         (arm_record_strx): Likewise.
3504         (arm_record_extension_space): Likewise.
3505         (arm_record_data_proc_misc_ld_str): Likewise.
3506         (arm_record_exreg_ld_st_insn): Likewise.
3507         (arm_record_vfp_data_proc_insn): Likewise.
3508         (arm_record_coproc_data_proc): Likewise.
3509         (thumb_record_misc): Likewise.
3510         (thumb_record_ldm_stm_swi): Likewise.
3511         (thumb2_record_ld_st_dual_ex_tbb): Likewise.
3512         (thumb2_record_ld_mem_hints): Likewise.
3513         (thumb2_record_lmul_lmla_div): Likewise.
3514         (thumb2_record_asimd_struct_ld_st): Likewise.
3515         (arm_process_record): Likewise.
3516
3517 2016-02-11  Simon Marchi  <simon.marchi@ericsson.com>
3518
3519         * arm-tdep.c (arm_displaced_step_copy_insn): Remove.
3520         (ARM displaced stepping support): Remove reference to
3521         arm_displaced_step_copy_insn in comment.
3522         * arm-tdep.h (arm_displaced_step_copy_insn): Remove.
3523         * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Remove
3524         reference to arm_displaced_step_copy_insn in comment.
3525
3526 2016-02-11  Simon Marchi  <simon.marchi@ericsson.com>
3527
3528         * arm-tdep.c (thumb_copy_unmodified_16bit): Change type of insn.
3529         (thumb_copy_b): Likewise.
3530         (arm_decode_b_bl_ldmstm): Likewise.
3531         (thumb_copy_16bit_ldr_literal): Likewise.
3532         (thumb_copy_pop_pc_16bit): Likewise.
3533
3534 2016-02-11  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3535
3536         * tracepoint.c (encode_actions_1): Use target_gdbarch () rather
3537         than loc->gdbarch.
3538
3539 2016-02-10  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3540
3541         * tracefile-tfile.c (trace_tdesc): New static variable.
3542         (tfile_open): Clear trace_tdesc, call target_find_description.
3543         (tfile_interp_line): Recognize tdesc lines.
3544         (tfile_close): Clear trace_tdesc.
3545         (tfile_xfer_partial_features): New function.
3546         (tfile_xfer_partial): Call tfile_xfer_partial_features.
3547         (tfile_append_tdesc_line): New function.
3548
3549 2016-02-10  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3550
3551         * ctf.c (ctf_write_tdesc): New function.
3552         (ctf_write_ops): Wire in ctf_write_tdesc.
3553         * tracefile-tfile.c (tfile_write_tdesc): New function.
3554         (tfile_write_ops): Wire in tfile_write_tdesc.
3555         * tracefile.c (trace_save): Call write_tdesc method.
3556         * tracefile.h (struct trace_file_write_ops): Add write_tdesc method.
3557         * xml-tdesc.c (target_fetch_description_xml): New function.
3558         * xml-tdesc.h: Add target_fetch_description_xml prototype.
3559
3560 2016-02-10  Simon Marchi  <simon.marchi@ericsson.com>
3561
3562         * arm-tdep.c (arm_copy_extra_ld_st): Fix "unpriveleged" typo.
3563         (arm_decode_dp_misc): Likewise.
3564
3565 2016-02-10  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3566
3567         * amd64-tdep.c (amd64_ax_pseudo_register_collect): New function.
3568         (amd64_init_abi): Fill ax_pseudo_register_collect hook.
3569         * gdb/i386-tdep.c (i386_pseudo_register_read_into_value): Remove
3570         misleading comment.
3571         (i386_pseudo_register_write): Ditto.
3572         (i386_ax_pseudo_register_collect): New function.
3573         (i386_gdbarch_init): Fill ax_pseudo_register_collect hook.
3574         * i386-tdep.h: Add i386_ax_pseudo_register_collect prototype.
3575
3576 2016-02-10  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3577
3578         * tracefile-tfile.c (tfile_fetch_registers): Use g packet order
3579         instead of gdb order.
3580
3581 2016-02-10  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3582
3583         * tracefile-tfile.c (tfile_fetch_registers): Fix off-by-one in bounds
3584         check.
3585
3586 2016-02-10  Joel Brobecker  <brobecker@adacore.com>
3587
3588         * NEWS: Create a new section for the next release branch.
3589         Rename the section of the current branch, now that it has
3590         been cut.
3591
3592 2016-02-10  Joel Brobecker  <brobecker@adacore.com>
3593
3594         GDB 7.11 branch created (9ef9e6a6a0dd8f948708cb67c9afcfd0be40cb0a):
3595         * version.in: Bump version to 7.11.50.DATE-git.
3596
3597 2016-02-09  Keith Seitz  <keiths@redhat.com>
3598
3599         PR breakpoints/19546
3600         * breakpoint.c (breakpoint_event_location_empty_p): New function.
3601         (update_breakpoints_after_exec, bkpt_re_set): Use this new function
3602         instead of event_location_empty_p.
3603
3604 2016-02-09  Keith Seitz  <keiths@redhat.com>
3605
3606         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Use
3607         string_to_event_location_basic instead of string_to_event_location.
3608
3609 2016-02-09  Keith Seitz  <keiths@redhat.com>
3610
3611         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Skip
3612         leading whitespace and use string_to_event_location_basic instead
3613         of new_linespec_location.
3614
3615 2016-02-09  Keith Seitz  <keiths@redhat.com>
3616
3617         PR python/19506
3618         * python/py-breakpoint.c (bppy_init): Use
3619         string_to_event_location_basic instead of new_linespec_location.
3620
3621 2016-02-09  Keith Seitz  <keiths@redhat.com>
3622
3623         * location.c (string_to_explicit_location): Note that "-p" is
3624         reserved for probe locations and return NULL for any input
3625         that starts with that.
3626         (string_to_event_location): Move "legacy" linespec code to ...
3627         (string_to_event_location_basic): ... here.
3628         * location.h (string_to_event_location): Update comment.
3629         (string_to_event_location_basic): New function.
3630
3631 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
3632
3633         * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3634         to AC_OUTPUT.  Remove "exit 0" at the end.
3635         * configure: Regenerate.
3636
3637 2016-02-09  Pedro Alves  <palves@redhat.com>
3638
3639         PR breakpoints/19548
3640         * breakpoint.c (create_overlay_event_breakpoint): Don't update
3641         global location list here.
3642         (create_longjmp_master_breakpoint)
3643         (create_std_terminate_master_breakpoint)
3644         (create_exception_master_breakpoint, create_jit_event_breakpoint)
3645         (update_breakpoint_locations):
3646         (breakpoint_re_set): Update global location list after all
3647         breakpoints are re-set.
3648
3649 2016-02-08  Simon Marchi  <simon.marchi@ericsson.com>
3650
3651         * remote.c (remote_register_number_and_offset): Remove unused
3652         variable(s).
3653         (remote_thread_always_alive): Likewise.
3654         (remote_update_thread_list): Likewise.
3655         (process_initial_stop_replies): Likewise.
3656         (remote_start_remote): Likewise.
3657         (remote_check_symbols): Likewise.
3658         (discard_pending_stop_replies): Likewise.
3659         (process_stop_reply): Likewise.
3660         (putpkt_binary): Likewise.
3661         (getpkt): Likewise.
3662         (remote_add_target_side_condition): Likewise.
3663         (remote_insert_breakpoint): Likewise.
3664         (remote_supports_stopped_by_sw_breakpoint): Likewise.
3665         (remote_supports_stopped_by_hw_breakpoint): Likewise.
3666         (remote_xfer_partial): Likewise.
3667         (remote_read_btrace): Likewise.
3668         (remote_async_serial_handler): Likewise.
3669         (remote_thread_events): Likewise.
3670         (_initialize_remote): Likewise.
3671
3672 2016-02-07  Simon Marchi  <simon.marchi@polymtl.ca>
3673
3674         * varobj.h (varobj_delete): Remove dellist parameter, update and
3675         move documentation here.
3676         * varobj.c (struct cpstack, cppush, cppop): Remove.
3677         (delete_variable): Remove resultp (first) parameter.
3678         (delete_variable_1): Likewise.
3679         (varobj_delete): Remove dellist parameter and unused code.
3680         (update_dynamic_varobj_children): Adjust varobj_delete call.
3681         (update_type_if_necessary): Likewise.
3682         (varobj_set_visualizer): Likewise.
3683         (varobj_update): Likewise.
3684         (value_of_root): Likewise.
3685         (varobj_invalidate_iter): Likewise.
3686         * mi/mi-cmd-var.c (mi_cmd_var_delete): Likewise.
3687
3688 2016-02-04  Yao Qi  <yao.qi@linaro.org>
3689
3690         * remote.c (remote_wait_as): Set rs->waiting_for_stop_reply to
3691         0 before handling 'F' and set it back afterwards.
3692
3693 2016-02-02  Simon Marchi  <simon.marchi@ericsson.com>
3694
3695         * ui-out.c (MAX_UI_OUT_LEVELS): Remove.
3696
3697 2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3698
3699         * amd64-linux-siginfo.c (nat_siginfo_t, nat_sigval_t, nat_timeval):
3700         New types.
3701         (compat_siginfo): New bound fields added.
3702         (compat_x32_siginfo): New field added.
3703         (cpt_si_addr_lsb): New define.
3704         (compat_siginfo_from_siginfo): Use nat_siginfo.
3705         (siginfo_from_compat_siginfo): Use nat_siginfo.
3706         (compat_x32_siginfo_from_siginfo): Likewise.
3707         (siginfo_from_compat_x32_siginfo): Likewise.
3708
3709 2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3710
3711         * linux-tdep.c (linux_get_siginfo_type): Add the _addr_bnd
3712         structure to the siginfo if extra_fields contains
3713         LINUX_SIGINFO_FIELD_ADDR_BND.
3714
3715 2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3716
3717         * linux-tdep.h (linux_get_siginfo_type_with_fields): Make extern.
3718         * linux-tdep.c (linux_get_siginfo_type_with_fields): Make extern.
3719         * i386-linux-tdep.h (x86_linux_get_siginfo_type): New
3720         function.
3721         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Add
3722         x86_linux_get_siginfo_type for the amd64 abi.
3723         * i386-linux-tdep.c (x86_linux_get_siginfo_type): New
3724         function.
3725         (i386_linux_init_abi): Add new function at the i386 ABI
3726         initialization.
3727
3728 2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3729
3730         * linux-tdep.h (linux_siginfo_extra_field_values): New enum values.
3731         (linux_siginfo_extra_fields): New enum type.
3732         * linux-tdep.c (linux_get_siginfo_type_with_fields): New function.
3733         (linux_get_siginfo_type): Use new function.
3734
3735 2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3736
3737         * nat/amd64-linux-siginfo.c: New file.
3738         * nat/amd64-linux-siginfo.h: New file.
3739         * Makefile.in (HFILES_NO_SRCDIR): Add nat/amd64-linux-siginfo.h.
3740         (amd64-linux-siginfo.o): New rule.
3741         * config/i386/linux64.mh (NATDEPFILES): Add amd64-linux-siginfo.o.
3742         * amd64-linux-nat.c (nat/amd64-linux-siginfo.h): New include.
3743         (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3744         (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3745         (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3746         (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3747         (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3748         (cpt_si_fd, si_timerid, si_overrun): Move to nat/amd64-linux-siginfo.c.
3749
3750 2016-02-01  Andrew Burgess  <andrew.burgess@embecosm.com>
3751
3752         * value.c (max_value_size): New variable.
3753         (MIN_VALUE_FOR_MAX_VALUE_SIZE): New define.
3754         (set_max_value_size): New function.
3755         (show_max_value_size): New function.
3756         (check_type_length_before_alloc): New function.
3757         (allocate_value_contents): Call check_type_length_before_alloc.
3758         (set_value_enclosing_type): Likewise.
3759         (_initialize_values): Add set/show handler for max-value-size.
3760         * NEWS: Mention new set/show command.
3761
3762 2016-01-31  Simon Marchi  <simon.marchi@polymtl.ca>
3763
3764         * varobj.h (struct varobj): Fix typos in comments.
3765         (struct lang_varobj_ops): Likewise.
3766         * varobj.c (VAROBJ_TABLE_SIZE): Likewise.
3767         (varobj_create): Move misplaced comment.
3768
3769 2016-01-29  Simon Marchi  <simon.marchi@ericsson.com>
3770
3771         * aarch64-tdep.c (aarch64_record_asimd_load_store): Add braces
3772         to for include additional lines.
3773         * xcoffread.c (scan_xcoff_symtab): Remove unnecessary braces.
3774
3775 2016-01-28  Simon Marchi  <simon.marchi@ericsson.com>
3776
3777         * gnulib/import/Makefile.am: Regenerate.
3778         * gnulib/import/Makefile.in: Regenerate.
3779         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3780         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add rawmemchr.
3781
3782 2016-01-28  Simon Marchi  <simon.marchi@ericsson.com>
3783
3784         * remote.c (skip_to_semicolon): Remove.
3785         (remote_parse_stop_reply): Use strchrnul instead of
3786         skip_to_semicolon.
3787         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3788         strchrnul.
3789         * gnulib/aclocal.m4: Regenerate.
3790         * gnulib/config.in: Regenerate.
3791         * gnulib/configure: Regenerate.
3792         * gnulib/import/Makefile.am: Regenerate.
3793         * gnulib/import/Makefile.in: Regenerate.
3794         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3795         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3796         * gnulib/import/m4/rawmemchr.m4: New file.
3797         * gnulib/import/m4/strchrnul.m4: New file.
3798         * gnulib/import/rawmemchr.c: New file.
3799         * gnulib/import/rawmemchr.valgrind: New file.
3800         * gnulib/import/strchrnul.c: New file.
3801         * gnulib/import/strchrnul.valgrind: New file.
3802
3803 2016-01-28  Yao Qi  <yao.qi@linaro.org>
3804
3805         * breakpoint.c (build_target_command_list): Don't call continue
3806         if aexpr is NULL.
3807         (build_target_condition_list): Likewise.
3808
3809 2016-01-27  Kevin Buettner  <kevinb@redhat.com>
3810
3811         * rx-tdep.c (rx_push_dummy_call): Treat scalars larger than 8
3812         bytes as aggregates.
3813
3814 2016-01-27  Joel Brobecker  <brobecker@adacore.com>
3815
3816         * MAINTAINERS (Responsible Maintainers): Add Keith Seitz as
3817         Linespec Maintainers.
3818
3819 2016-01-26  Simon Marchi  <simon.marchi@ericsson.com>
3820
3821         * common/common-utils.c (skip_spaces): Fix comment.
3822         (skip_to_space_const): Likewise.
3823
3824 2016-01-25  Yao Qi  <yao.qi@linaro.org>
3825
3826         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
3827         Remove argument pc.  Get pc by regcache_read_pc.  Callers updated.
3828         (arm_deal_with_atomic_sequence_raw): Likewise.
3829         (thumb_get_next_pcs_raw): Likewise.
3830         (arm_get_next_pcs_raw): Likewise.
3831         (arm_get_next_pcs): Remove argument pc.  Callers updated.
3832         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Update declaration.
3833
3834 2016-01-25  Mark Wielaard  <mjw@redhat.com>
3835
3836         * ada-lang.c (ada_evaluate_subexp): Add proper else block.
3837         * c-typeprint.c (c_type_print_base): Fix misleading indentation of
3838         if statement.
3839         * inflow.c (child_terminal_ours_1): Fix misleading indentation of
3840         statement block by introducing an else.
3841         * linux-record.c (record_linux_sockaddr): Fix misleading indentation
3842         of return statements.
3843         (record_linux_msghdr): Likewise.
3844
3845 2016-01-25  Pedro Alves  <palves@redhat.com>
3846
3847         PR threads/19461
3848         * infrun.c (handle_inferior_event_1) <fork/vfork>: Update
3849         parent/child running states.
3850
3851 2016-01-25  Pedro Alves  <palves@redhat.com>
3852
3853         PR gdb/19494
3854         * linux-nat.c (kill_one_lwp): New, factored out from ...
3855         (kill_callback): ... this.
3856         (kill_wait_callback): New, factored out from ...
3857         (kill_wait_one_lwp): ... this.
3858         (kill_unfollowed_fork_children): New function.
3859         (linux_nat_kill): Use it.
3860
3861 2016-01-22  John Baldwin  <jhb@FreeBSD.org>
3862
3863         * fbsd-nat.c (fbsd_pid_to_str): Adjust string format.
3864
3865 2016-01-22  Yao Qi  <yao.qi@linaro.org>
3866
3867         * arm-linux-nat.c (fetch_fpregs): Call perror_with_name
3868         instead of warning.
3869         (store_fpregs, fetch_regs, store_regs): Likewise.
3870         (fetch_wmmx_regs, store_wmmx_regs): Likewise.
3871         (fetch_vfp_regs, store_vfp_regs): Likewise.
3872
3873 2016-01-21  Doug Evans  <dje@google.com>
3874
3875         * breakpoint.c (init_breakpoint_sal): Add comment.
3876
3877 2016-01-21  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3878
3879         * ax-gdb.c (gen_traced_pop): Use gen_fetch for string collection.
3880
3881 2016-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
3882
3883         * disasm.c (maybe_add_dis_line_entry): Rename to...
3884         (add_dis_line_entry): ...this, and update header comment.
3885         (do_mixed_source_and_assembly): Now use add_dis_line_entry.
3886
3887 2016-01-21  Pedro Alves  <palves@redhat.com>
3888
3889         * Makefile.in (COMPILER_CFLAGS): New.
3890         (CXXFLAGS): Get it from configure.
3891         (INTERNAL_CFLAGS_BASE, INTERNAL_LDFLAGS): Use COMPILER_CFLAGS
3892         instead of CFLAGS.
3893         * build-with-cxx.m4 (GDB_AC_BUILD_WITH_CXX): Set and AC_SUBST
3894         COMPILER_CFLAGS.
3895         * configure: Regenerate.
3896
3897 2016-01-21  Joel Brobecker  <brobecker@adacore.com>
3898
3899         * location.h (new_address_location): Add new parameters
3900         "addr_string" and "addr_string_len".
3901         (get_address_string_location): Add declaration.
3902         * location.c (new_address_location): Add new parameters
3903         "addr_string" and "addr_string_len".  If not NULL, store
3904         a copy of the addr_string in the new location as well.
3905         (get_address_string_location): New function.
3906         (string_to_event_location): Update call to new_address_location.
3907         * linespec.c (event_location_to_sals) <ADDRESS_LOCATION>:
3908         Save the event location in the parser's state before
3909         passing it to convert_address_location_to_sals.
3910         * breakpoint.c (create_thread_event_breakpoint): Update call
3911         to new_address_location.
3912         (init_breakpoint_sal): Get the event location's string, if any,
3913         and use it to update call to new_address_location.
3914         * python/py-finishbreakpoint.c (bpfinishpy_init):
3915         Update call to new_address_location.
3916         * spu-tdep.c (spu_catch_start): Likewise.
3917
3918         * config/djgpp/fnchange.lst: Add entries for
3919         gdb/testsuite/gdb.base/break-fun-addr1.c and
3920         gdb/testsuite/gdb.base/break-fun-addr2.c.
3921
3922 2016-01-21  Yao Qi  <yao.qi@linaro.org>
3923
3924         * arm-linux-tdep.c (arm_linux_sigreturn_next_pc): Add parameter
3925         is_thumb and set it according to CPSR saved on the stack.
3926         (arm_linux_get_next_pcs_syscall_next_pc): Pass is_thumb to
3927         arm_linux_sigreturn_next_pc.
3928
3929 2016-01-20  Simon Marchi  <simon.marchi@polymtl.ca>
3930
3931         * python/lib/gdb/printing.py (FlagEnumerationPrinter.__call__):
3932         Fix enumerators sort key function.
3933
3934 2016-01-20  Joel Brobecker  <brobecker@adacore.com>
3935
3936         * printcmd.c (print_scalar_formatted): Move binary operator from
3937         end of line to beginning of next line.  Adjust formatting
3938         accordingly.
3939
3940 2016-01-19  John Baldwin  <jhb@FreeBSD.org>
3941
3942         * fbsd-nat.c (fbsd_pid_to_exec_file): Use new "buflen" instead of
3943         "len" with sysctl.
3944
3945 2016-01-19  John Baldwin  <jhb@FreeBSD.org>
3946
3947         * fbsd-tdep.c (find_stop_signal): Remove.
3948         (struct fbsd_collect_regset_section_cb) <lwp>: New field.
3949         <stop_signal>: New field.
3950         <abort_iteration>: New field.
3951         (fbsd_collect_regset_section_cb): Use new fields.
3952         (fbsd_collect_thread_registers): New function.
3953         (struct fbsd_corefile_thread_data): New structure.
3954         (fbsd_corefile_thread): New function.
3955         (fbsd_make_corefile_notes): Use new function to dump notes for each
3956         non-exited thread in a process.
3957
3958 2016-01-19  John Baldwin  <jhb@FreeBSD.org>
3959
3960         * configure.ac: Check for support for LWP names on FreeBSD.
3961         * fbsd-nat.c [PT_LWPINFO] New variable debug_fbsd_lwp.
3962         [TDP_RFPPWAIT || HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME]
3963         (fbsd_fetch_kinfo_proc): Move function earlier.
3964         [PT_LWPINFO] (fbsd_thread_alive): New function.
3965         [PT_LWPINFO] (fbsd_pid_to_str): New function.
3966         [HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME] (fbsd_thread_name): New function.
3967         [PT_LWP_EVENTS] (fbsd_enable_lwp_events): New function.
3968         [PT_LWPINFO] (fbsd_add_threads): New function.
3969         [PT_LWPINFO] (fbsd_update_thread_list): New function.
3970         [PT_LWPINFO] New variable super_resume.
3971         [PT_LWPINFO] (resume_one_thread_cb): New function.
3972         [PT_LWPINFO] (resume_all_threads_cb): New function.
3973         [PT_LWPINFO] (fbsd_resume): New function.
3974         (fbsd_remember_child): Save full ptid instead of plain pid.
3975         (fbsd_is_child_pending): Return ptid of saved child process.
3976         (fbsd_wait): Include lwp in returned ptid and switch to LWP ptid on
3977         first stop.
3978         [PT_LWP_EVENTS] Handle LWP events.
3979         [TDP_RFPPWAIT] Include LWP in child ptid.
3980         (fbsd_post_startup_inferior) [PT_LWP_EVENTS]: Enable LWP events.
3981         (fbsd_post_attach) [PT_LWP_EVENTS]: Enable LWP events.
3982         Add threads for existing processes.
3983         (fbsd_nat_add_target) [PT_LWPINFO]: Set "to_thread_alive" to
3984         "fbsd_thread_alive".
3985         Set "to_pid_to_str" to "fbsd_pid_to_str".
3986         [HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME]: Set "to_thread_name" to
3987         "fbsd_thread_name".
3988         [PT_LWPINFO]: Set "to_update_thread_list" to "fbsd_update_thread_list".
3989         Set "to_has_thread_control" to "tc_schedlock".
3990         Set "to_resume" to "fbsd_resume".
3991         (_initialize_fbsd_nat): New function.
3992         * configure: Regenerate.
3993         * config.in: Regenerate.
3994
3995 2016-01-19  John Baldwin  <jhb@FreeBSD.org>
3996
3997         * amd64bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
3998         get_ptrace_pid.
3999         (amd64bsd_store_inferior_registers): Use get_ptrace_pid.
4000         (amd64bsd_dr_get): Use get_ptrace_pid.
4001         (amd64bsd_dr_set): Use get_ptrace_pid.
4002         * i386bsd-nat.c (i386bsd_fetch_inferior_registers): Use get_ptrace_pid.
4003         (i386bsd_store_inferior_registers): Use get_ptrace_pid.
4004         (i386bsd_dr_get): Use get_ptrace_pid.
4005         (i386bsd_dr_set): Use get_ptrace_pid.
4006         * inf-ptrace.c (get_ptrace_pid): Export.
4007         * inf-ptrace.h (get_ptrace_pid): Declare.
4008         * ppcfbsd-nat.c (ppcfbsd_fetch_inferior_registers): Use lwp id.
4009         (ppcfbsd_store_inferior_registers): Use lwp id.
4010
4011 2016-01-19  John Baldwin  <jhb@FreeBSD.org>
4012
4013         * fbsd_tdep.c (fbsd_core_pid_to_str): New function.
4014         (fbsd_core_thread_name): New function.
4015         (fbsd_init_abi): Add "core_pid_to_str" gdbarch method.
4016         Add "core_thread_name" gdbarch method.
4017
4018 2016-01-19  John Baldwin  <jhb@FreeBSD.org>
4019
4020         * corelow.c (core_thread_name): New function.
4021         (init_core_ops): Use "core_thread_name" for the "to_thread_name"
4022         target op.
4023         * gdbarch.sh (core_thread_name): New gdbarch callback.
4024         * gdbarch.h: Re-generate.
4025         * gdbarch.c: Re-generate.
4026
4027 2016-01-19  Simon Marchi  <simon.marchi@polymtl.ca>
4028
4029         * python/lib/gdb/printing.py (_EnumInstance.to_string): Explicitly
4030         convert gdb.Value to integer type using int().
4031
4032 2016-01-19  John Baldwin  <jhb@FreeBSD.org>
4033
4034         * configure.ac: Include <sys/types.h when checking for "r_fs" in
4035         "struct reg".
4036         * configure: Regenerate.
4037
4038 2016-01-19  Pedro Alves  <palves@redhat.com>
4039
4040         * ax-gdb.c (agent_command_1): Adjust call to decode_line_full.
4041         * break-catch-throw.c (re_set_exception_catchpoint): Pass the
4042         current program space down to linespec decoding and breakpoint
4043         location updating.
4044         * breakpoint.c (parse_breakpoint_sals): Adjust calls to
4045         decode_line_full.
4046         (until_break_command): Adjust calls to decode_line_1.
4047         (base_breakpoint_decode_location, bkpt_decode_location): Add
4048         'search_pspace' parameter.  Pass it along.
4049         (bkpt_probe_create_sals_from_location): Adjust calls to
4050         parse_probes.
4051         (tracepoint_decode_location, tracepoint_probe_decode_location)
4052         (strace_marker_decode_location): Add 'search_pspace' parameter.
4053         Pass it along.
4054         (all_locations_are_pending): Rewrite to take a breakpoint and
4055         program space as arguments instead.
4056         (hoist_existing_locations): New function.
4057         (update_breakpoint_locations): Add 'filter_pspace' parameter.  Use
4058         hoist_existing_locations instead of always removing all locations,
4059         and adjust to all_locations_are_pending change.
4060         (location_to_sals): Add 'search_pspace' parameter.  Pass it along.
4061         Don't disable the breakpoint if there are other locations in
4062         another program space.
4063         (breakpoint_re_set_default): Adjust to pass down the current
4064         program space as filter program space.
4065         (decode_location_default): Add 'search_pspace' parameter and pass
4066         it along.
4067         (prepare_re_set_context): Don't switch program space here.
4068         (breakpoint_re_set): Use save_current_space_and_thread instead of
4069         save_current_program_space.
4070         * breakpoint.h (struct breakpoint_ops) <decode_location>: Add
4071         'search_pspace' parameter.
4072         (update_breakpoint_locations): Add 'filter_pspace' parameter.
4073         * cli/cli-cmds.c (edit_command, list_command): Adjust calls to
4074         decode_line_1.
4075         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Pass the current
4076         program space as filter program space.
4077         * linespec.c (struct linespec_state) <search_pspace>: New field.
4078         (create_sals_line_offset, convert_explicit_location_to_sals)
4079         (parse_linespec): Pass the search program space down.
4080         (linespec_state_constructor): Add 'search_pspace' parameter.
4081         Store it.
4082         (linespec_parser_new): Add 'search_pspace' parameter and pass it
4083         along.
4084         (linespec_lex_to_end): Adjust.
4085         (decode_line_full, decode_line_1): Add 'search_pspace' parameter
4086         and pass it along.
4087         (decode_line_with_last_displayed): Adjust.
4088         (collect_symtabs_from_filename, symtabs_from_filename): New
4089         'search_pspace' parameter.  Use it.
4090         (find_function_symbols): Pass the search program space down.
4091         * linespec.h (decode_line_1, decode_line_full): Add
4092         'search_pspace' parameter.
4093         * probe.c (parse_probes_in_pspace): New function, factored out
4094         from ...
4095         (parse_probes): ... this.  Add 'search_pspace' parameter and use
4096         it.
4097         * probe.h (parse_probes): Add pspace' parameter.
4098         * python/python.c (gdbpy_decode_line): Adjust.
4099         * tracepoint.c (scope_info): Adjust.
4100
4101 2016-01-18  Maciej W. Rozycki  <macro@imgtec.com>
4102
4103         * mips-tdep.c (mips_insn_size): Remove 48-bit microMIPS
4104         instruction support.
4105         (micromips_next_pc): Likewise.
4106         (micromips_scan_prologue): Likewise.
4107         (micromips_deal_with_atomic_sequence): Likewise.
4108         (micromips_stack_frame_destroyed_p): Likewise.
4109         (mips_breakpoint_from_pc): Likewise.
4110
4111 2016-01-18  Maciej W. Rozycki  <macro@imgtec.com>
4112
4113         * mips-tdep.c (micromips_insn_at_pc_has_delay_slot): Pass
4114         unshifted 16-bit microMIPS instruction word to `mips_insn_size'.
4115
4116 2016-01-18  Pedro Alves  <palves@redhat.com>
4117
4118         * NEWS: Mention that GDB now displays the ID and name of the
4119         thread that hit a breakpoint or received a signal.
4120         * break-catch-sig.c (signal_catchpoint_print_it): Use
4121         maybe_print_thread_hit_breakpoint.
4122         * break-catch-syscall.c (print_it_catch_syscall): Likewise.
4123         * break-catch-throw.c (print_it_exception_catchpoint): Likewise.
4124         * breakpoint.c (maybe_print_thread_hit_breakpoint): New function.
4125         (print_it_catch_fork, print_it_catch_vfork, print_it_catch_solib)
4126         (print_it_catch_exec, print_it_ranged_breakpoint)
4127         (print_it_watchpoint, print_it_masked_watchpoint, bkpt_print_it):
4128         Use maybe_print_thread_hit_breakpoint.
4129         * breakpoint.h (maybe_print_thread_hit_breakpoint): Declare.
4130         * gdbthread.h (show_thread_that_caused_stop): Declare.
4131         * infrun.c (print_signal_received_reason): Print which thread
4132         received signal.
4133         * thread.c (show_thread_that_caused_stop): New function.
4134
4135 2016-01-18  Gary Benson  <gbenson@redhat.com>
4136
4137         * nat/linux-namespaces.c (do_fork): New function.
4138         (linux_mntns_get_helper): Use the above.
4139
4140 2016-01-17  Jonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>  (tiny change)
4141
4142         Pushed by Joel Brobecker  <brobecker@adacore.com>.
4143         PR gdb/19208
4144         * dwarf2read.c (read_partial_die): Do not call set_objfile_main_name
4145         if the function has no name.
4146
4147 2016-01-15  Sandra Loosemore  <sandra@codesourcery.com>
4148
4149         * charset.c [PHONY_ICONV] (GDB_DEFAULT_HOST_CHARSET):
4150         Conditionalize for Windows host.
4151         (GDB_DEFAULT_TARGET_CHARSET): Match GDB_DEFAULT_HOST_CHARSET.
4152         (GDB_DEFAULT_TARGET_WIDE_CHARSET): Use UTF-32.
4153         (phony_iconv_open): Handle both UTF-32 endiannesses.
4154         (phony_iconv): Likewise.  Check for output overflow and clean up
4155         out-of-input cases.  Correct adjustment to input buffer pointer.
4156         (set_be_le_names) [PHONY_ICONV]: Use hard-wired names to match
4157         phony_iconv_open.
4158
4159 2016-01-15  Pedro Alves  <palves@redhat.com>
4160
4161         * NEWS: Mention star wildcard ranges.
4162         * cli/cli-utils.c (get_number_or_range): Check state->in_range first.
4163         (number_range_setup_range): New function.
4164         * cli/cli-utils.h (number_range_setup_range): New declaration.
4165         * thread.c (thread_apply_command): Support star TID ranges.
4166         * tid-parse.c (tid_range_parser_finished)
4167         (tid_range_parser_string, tid_range_parser_skip)
4168         (get_tid_or_range, get_tid_or_range): Handle
4169         TID_RANGE_STATE_STAR_RANGE.
4170         (tid_range_parser_star_range): New function.
4171         * tid-parse.h (enum tid_range_state) <TID_RANGE_STATE_STAR_RANGE>:
4172         New value.
4173         (tid_range_parser_star_range): New declaration.
4174
4175 2016-01-15  Pedro Alves  <palves@redhat.com>
4176
4177         * thread.c (thread_apply_command): Use the tid range parser to
4178         advance past the thread ID list.
4179         * tid-parse.c (get_positive_number_trailer): New function.
4180         (parse_thread_id): Use it.
4181         (get_tid_or_range): Use it.  Return 0 instead of throwing invalid
4182         thread ID error.
4183         (get_tid_or_range): Detect negative values.  Return 0 instead of
4184         throwing invalid thread ID error.
4185
4186 2016-01-14  Yao Qi  <yao.qi@linaro.org>
4187
4188         * arm-linux-tdep.c (arm_linux_get_next_pcs_syscall_next_pc):
4189         Declare.
4190         (arm_linux_get_next_pcs_ops): Install
4191         arm_linux_get_next_pcs_syscall_next_pc.
4192         (arm_linux_syscall_next_pc): Change to ...
4193         (arm_linux_get_next_pcs_syscall_next_pc): ... it.
4194         (arm_linux_init_abi): Don't set tdep->syscall_next_pc.
4195         * arm-tdep.c (arm_get_next_pcs_syscall_next_pc): Declare.
4196         (arm_get_next_pcs_syscall_next_pc): Make it static.  Don't
4197         call tdep->syscall_next_pc.
4198         * arm-tdep.h (struct gdbarch_tdep) <syscall_next_pc>: Remove.
4199         (arm_get_next_pcs_syscall_next_pc): Remove.
4200
4201 2016-01-14  Yao Qi  <yao.qi@linaro.org>
4202
4203         * remote.c (remote_set_syscall_catchpoint): Cast to char *.
4204         * thread.c (do_captured_thread_select): Cast to const char *.
4205
4206 2016-01-14  Yao Qi  <yao.qi@linaro.org>
4207
4208         * arch/arm-get-next-pcs.c (arm_get_next_pcs_ctor): Change
4209         argument arm_thumb2_breakpoint to has_thumb2_breakpoint.
4210         (thumb_get_next_pcs_raw): Check has_thumb2_breakpoint
4211         instead.
4212         * arch/arm-get-next-pcs.h (struct arm_get_next_pcs)
4213         <arm_thumb2_breakpoint>: Remove.
4214         <has_thumb2_breakpoint>: New field.
4215         (arm_get_next_pcs_ctor): Update declaration.
4216         * arm-linux-tdep.c (arm_linux_software_single_step): Pass
4217         1 to arm_get_next_pcs_ctor.
4218         * arm-tdep.c (arm_software_single_step): Pass 0 to
4219         arm_get_next_pcs_ctor.
4220
4221 2016-01-13  Ulrich Weigand  <uweigand@de.ibm.com>
4222
4223         * MAINTAINERS: Add Andreas Arnez as s390 target maintainer.
4224
4225 2016-01-13  Yao Qi  <yao.qi@linaro.org>
4226
4227         * arch/arm-get-next-pcs.c (arm_get_next_pcs_raw): Use
4228         byte_order_for_code to read instruction.
4229
4230 2016-01-13  Pedro Alves  <palves@redhat.com>
4231
4232         * NEWS: Mention $_gthread.
4233         * gdbthread.h (struct thread_info) <global_num>: Mention
4234         $_gthread.
4235         * thread.c (thread_num_make_value_helper): New function.
4236         (thread_id_make_value): Delete.
4237         (thread_id_per_inf_num_make_value, global_thread_id_make_value):
4238         New.
4239         (thread_funcs): Adjust.
4240         (gthread_funcs): New.
4241         (_initialize_thread): Register $_gthread variable.
4242
4243 2016-01-13  Pedro Alves  <palves@redhat.com>
4244
4245         * NEWS: Mention "info threads -gid".
4246         * gdbthread.h (struct thread_info) <global_num>: Mention "info
4247         threads -gid".
4248         * thread.c (info_threads_command): Handle "-gid".
4249         (_initialize_thread): Adjust "info threads" help string to mention
4250         -gid.
4251
4252 2016-01-13  Pedro Alves  <palves@redhat.com>
4253
4254         * NEWS: Mention InferiorThread.global_num.
4255         * python/py-infthread.c (thpy_get_global_num): New function.
4256         (thread_object_getset): Register "global_num".
4257
4258 2016-01-13  Pedro Alves  <palves@redhat.com>
4259
4260         * NEWS: Mention that thread IDs are now per inferior and global
4261         thread IDs.
4262         * Makefile.in (SFILES): Add tid-parse.c.
4263         (COMMON_OBS): Add tid-parse.o.
4264         (HFILES_NO_SRCDIR): Add tid-parse.h.
4265         * ada-tasks.c: Adjust to use ptid_to_global_thread_id.
4266         * breakpoint.c (insert_breakpoint_locations)
4267         (remove_threaded_breakpoints, bpstat_check_breakpoint_conditions)
4268         (print_one_breakpoint_location, set_longjmp_breakpoint)
4269         (check_longjmp_breakpoint_for_call_dummy)
4270         (set_momentary_breakpoint): Adjust to use global IDs.
4271         (find_condition_and_thread, watch_command_1): Use parse_thread_id.
4272         (until_break_command, longjmp_bkpt_dtor)
4273         (breakpoint_re_set_thread, insert_single_step_breakpoint): Adjust
4274         to use global IDs.
4275         * dummy-frame.c (pop_dummy_frame_bpt): Adjust to use
4276         ptid_to_global_thread_id.
4277         * elfread.c (elf_gnu_ifunc_resolver_stop): Likewise.
4278         * gdbthread.h (struct thread_info): Rename field 'num' to
4279         'global_num.  Add new fields 'per_inf_num' and 'inf'.
4280         (thread_id_to_pid): Rename thread_id_to_pid to
4281         global_thread_id_to_ptid.
4282         (pid_to_thread_id): Rename to ...
4283         (ptid_to_global_thread_id): ... this.
4284         (valid_thread_id): Rename to ...
4285         (valid_global_thread_id): ... this.
4286         (find_thread_id): Rename to ...
4287         (find_thread_global_id): ... this.
4288         (ALL_THREADS, ALL_THREADS_BY_INFERIOR): Declare.
4289         (print_thread_info): Add comment.
4290         * tid-parse.h: New file.
4291         * tid-parse.c: New file.
4292         * infcmd.c (step_command_fsm_prepare)
4293         (step_command_fsm_should_stop): Adjust to use the global thread
4294         ID.
4295         (until_next_command, until_next_command)
4296         (finish_command_fsm_should_stop): Adjust to use the global thread
4297         ID.
4298         (attach_post_wait): Adjust to check the inferior number too.
4299         * inferior.h (struct inferior) <highest_thread_num>: New field.
4300         * infrun.c (handle_signal_stop)
4301         (insert_exception_resume_breakpoint)
4302         (insert_exception_resume_from_probe): Adjust to use the global
4303         thread ID.
4304         * record-btrace.c (record_btrace_open): Use global thread IDs.
4305         * remote.c (process_initial_stop_replies): Also consider the
4306         inferior number.
4307         * target.c (target_pre_inferior): Clear the inferior's highest
4308         thread num.
4309         * thread.c (clear_thread_inferior_resources): Adjust to use the
4310         global thread ID.
4311         (new_thread): New inferior parameter.  Adjust to use it.  Set both
4312         the thread's global ID and the thread's per-inferior ID.
4313         (add_thread_silent): Adjust.
4314         (find_thread_global_id): New.
4315         (find_thread_id): Make static.  Adjust to rename.
4316         (valid_thread_id): Rename to ...
4317         (valid_global_thread_id): ... this.
4318         (pid_to_thread_id): Rename to ...
4319         (ptid_to_global_thread_id): ... this.
4320         (thread_id_to_pid): Rename to ...
4321         (global_thread_id_to_ptid): ... this.  Adjust.
4322         (first_thread_of_process): Adjust.
4323         (do_captured_list_thread_ids): Adjust to use global thread IDs.
4324         (should_print_thread): New function.
4325         (print_thread_info): Rename to ...
4326         (print_thread_info_1): ... this, and add new show_global_ids
4327         parameter.  Handle it.  Iterate over inferiors.
4328         (print_thread_info): Reimplement as wrapper around
4329         print_thread_info_1.
4330         (show_inferior_qualified_tids): New function.
4331         (print_thread_id): Use it.
4332         (tp_array_compar): Compare inferior numbers too.
4333         (thread_apply_command): Use tid_range_parser.
4334         (do_captured_thread_select): Use parse_thread_id.
4335         (thread_id_make_value): Adjust.
4336         (_initialize_thread): Adjust "info threads" help string.
4337         * varobj.c (struct varobj_root): Update comment.
4338         (varobj_create): Adjust to use global thread IDs.
4339         (value_of_root_1): Adjust to use global_thread_id_to_ptid.
4340         * windows-tdep.c (display_tib): No longer accept an argument.
4341         * cli/cli-utils.c (get_number_trailer): Make extern.
4342         * cli/cli-utils.h (get_number_trailer): Declare.
4343         (get_number_const): Adjust documentation.
4344         * mi/mi-cmd-var.c (mi_cmd_var_update_iter): Adjust to use global
4345         thread IDs.
4346         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4347         (mi_on_normal_stop, mi_output_running_pid, mi_on_resume):
4348         * mi/mi-main.c (mi_execute_command, mi_cmd_execute): Likewise.
4349         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_thread_x):
4350         Likewise.
4351         * python/py-breakpoint.c (bppy_set_thread): Likewise.
4352         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
4353         * python/py-infthread.c (thpy_get_num): Add comment and return the
4354         per-inferior thread ID.
4355         (thread_object_getset): Update comment of "num".
4356
4357 2016-01-13  Pedro Alves  <palves@redhat.com>
4358
4359         * breakpoint.c (remove_threaded_breakpoints)
4360         (print_one_breakpoint_location): Use print_thread_id.
4361         * btrace.c (btrace_enable, btrace_disable, btrace_teardown)
4362         (btrace_fetch, btrace_clear): Use print_thread_id.
4363         * common/print-utils.c (CELLSIZE): Delete.
4364         (get_cell): Rename to ...
4365         (get_print_cell): ... this and made extern.  Adjust call callers.
4366         Adjust to use PRINT_CELL_SIZE.
4367         * common/print-utils.h (get_print_cell): Declare.
4368         (PRINT_CELL_SIZE): New.
4369         * gdbthread.h (print_thread_id): Declare.
4370         * infcmd.c (signal_command): Use print_thread_id.
4371         * inferior.c (print_inferior): Use print_thread_id.
4372         * infrun.c (handle_signal_stop)
4373         (insert_exception_resume_breakpoint)
4374         (insert_exception_resume_from_probe)
4375         (print_signal_received_reason): Use print_thread_id.
4376         * record-btrace.c (record_btrace_info)
4377         (record_btrace_resume_thread, record_btrace_cancel_resume)
4378         (record_btrace_step_thread, record_btrace_wait): Use
4379         print_thread_id.
4380         * thread.c (thread_apply_all_command): Use print_thread_id.
4381         (print_thread_id): New function.
4382         (thread_apply_command): Use print_thread_id.
4383         (thread_command, thread_find_command, do_captured_thread_select):
4384         Use print_thread_id.
4385
4386 2016-01-13  Pedro Alves  <palves@redhat.com>
4387
4388         * NEWS: Mention InferiorThread.inferior.
4389         * python/py-infthread.c (thpy_get_inferior): New.
4390         (thread_object_getset): Register "inferior".
4391
4392 2016-01-13  Pedro Alves  <palves@redhat.com>
4393
4394         * NEWS: Mention $_inferior.
4395         * inferior.c (inferior_id_make_value): New.
4396         (inferior_funcs): New.
4397         (_initialize_inferior): Create $_inferior variable.
4398
4399 2016-01-13  Pedro Alves  <palves@redhat.com>
4400
4401         PR breakpoints/19388
4402         * frame.c (get_current_frame): Use validate_registers_access.
4403         * gdbthread.h (validate_registers_access): Declare.
4404         * infrun.c (validate_siginfo_access): Delete.
4405         (siginfo_value_read, siginfo_value_write): Use
4406         validate_registers_access.
4407         * thread.c (validate_registers_access): New function.
4408
4409 2016-01-12  Josh Stone  <jistone@redhat.com>
4410             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4411
4412         * NEWS (Changes since GDB 7.10): Mention QCatchSyscalls and the
4413         syscall_entry and syscall_return stop reasons.  Mention GDB
4414         support for remote catch syscall.
4415         * remote.c (PACKET_QCatchSyscalls): New enum.
4416         (remote_set_syscall_catchpoint): New function.
4417         (remote_protocol_features): New element for QCatchSyscalls.
4418         (remote_parse_stop_reply): Parse syscall_entry/return stops.
4419         (init_remote_ops): Install remote_set_syscall_catchpoint.
4420         (_initialize_remote): Config QCatchSyscalls.
4421         * linux-nat.h (struct lwp_info) <syscall_state>: Comment typo.
4422
4423 2016-01-12  Yao Qi  <yao.qi@linaro.org>
4424
4425         * nat/linux-ptrace.c (linux_child_function): Cast child_stack
4426         to gdb_byte * and pass to linux_fork_to_function.
4427
4428 2016-01-12  Yao Qi  <yao.qi@linaro.org>
4429
4430         * nat/linux-ptrace.c (linux_fork_to_function): Change type
4431         of argument 'function'.
4432         (linux_grandchild_function): Change return type to 'int'.
4433         Change child_stack's type to 'void *'.
4434         (linux_child_function): Likewise.
4435
4436 2016-01-12  Pedro Alves  <palves@redhat.com>
4437
4438         Remove use of the registered trademark symbol throughout.
4439
4440 2016-01-12  Thomas Schwinge  <thomas@codesourcery.com>
4441
4442         * reply_mig_hack.awk: Rewrite one regular expression.
4443
4444 2016-01-11  Mike Frysinger  <vapier@gentoo.org>
4445
4446         * acinclude.m4: Include new warning.m4 file.
4447         * configure: Regenerated.
4448         * configure.ac: Move all warning logic ...
4449         * warning.m4: ... here.
4450
4451 2016-01-08  Yao Qi  <yao.qi@linaro.org>
4452
4453         * extension.c: Include target.h.
4454         (set_active_ext_lang): Only call install_gdb_sigint_handler,
4455         check_quit_flag, and set_quit_flag if target_terminal_is_ours
4456         returns false.
4457         (restore_active_ext_lang): Likewise.
4458         * target.c (target_terminal_is_ours): New function.
4459         * target.h (target_terminal_is_ours): Declare.
4460
4461 2016-01-07  Maciej W. Rozycki  <macro@imgtec.com>
4462
4463         * mips-tdep.c (mips_breakpoint_from_pc): Rename local `status'
4464         to `err' in the little-endian leg.
4465
4466 2016-01-06  Yao Qi  <yao.qi@linaro.org>
4467
4468         * arch/arm-get-next-pcs.c (arm_get_next_pcs): Move it to some
4469         lines below.
4470         (thumb_get_next_pcs_raw): Make it static.
4471         (arm_get_next_pcs_raw): Likewise.
4472         * arch/arm-get-next-pcs.h (thumb_get_next_pcs_raw): Remove the
4473         declaration.
4474         (arm_get_next_pcs_raw): Likewise.
4475
4476 2016-01-05  Mike Frysinger  <vapier@gentoo.org>
4477
4478         * version.in: Change cvs to git.
4479
4480 2016-01-05  Mike Frysinger  <vapier@gentoo.org>
4481
4482         * configure.tgt (score-*-*): Delete gdb_sim assignment.
4483
4484 2016-01-05  Pedro Alves  <palves@redhat.com>
4485
4486         PR sim/13418
4487         * configure.ac: Define WITH_PPC_SIM when linking in the sim and
4488         the target is powerpc*.
4489         * rs6000-tdep.c (init_sim_regno_table): Check WITH_PPC_SIM instead
4490         of WITH_SIM.
4491         * configure: Regenerate.
4492         * config.in: Regenerate.
4493
4494 2016-01-04  Markus Metzger  <markus.t.metzger@intel.com>
4495
4496         * btrace.c (btrace_pt_readmem_callback): Do not return in TRY/CATCH.
4497
4498 2016-01-02  Mike Frysinger  <vapier@gentoo.org>
4499
4500         * configure.tgt (powerpc*-*-*): Delete test call and
4501         always assign gdb_sim.
4502
4503 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
4504
4505         Update year range in copyright notice of all files.
4506
4507 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
4508
4509         * top.c (print_gdb_version): Change copyright year in version
4510         message.
4511
4512 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
4513
4514         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2015.
4515
4516 For older changes see ChangeLog-2015.
4517 \f
4518 Local Variables:
4519 mode: change-log
4520 left-margin: 8
4521 fill-column: 74
4522 version-control: never
4523 coding: utf-8
4524 End: