Remove DEF_VEC_P (varobj_p)
[external/binutils.git] / gdb / ChangeLog
1 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
2
3         * varobj.h (DEF_VEC_P (varobj_p)): Remove.
4
5 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
6
7         * varobj.h (struct varobj_update_result): Add constructor, add
8         move constructor, disable copy and assign, initialize fields.
9         <newobj>: Change type to std::vector.
10         (varobj_update): Return std::vector.
11         * varobj.c (install_dynamic_child): Change VEC parameters to
12         std::vector and adjust.
13         (update_dynamic_varobj_children): Likewise.
14         (varobj_update): Return std::vector and adjust.
15         * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
16
17 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
18
19         * varobj.h (struct varobj) <parent>: Remove const.
20         <children>: Change type to std::vector.
21         (varobj_list_children): Return std::vector const reference.
22         (varobj_restrict_range): Change parameter type to std::vector
23         const reference.
24         * varobj.c (varobj_has_more): Adjust.
25         (varobj_restrict_range): Change parameter type to std::vector
26         const reference and adjust.
27         (install_dynamic_child): Adjust.
28         (update_dynamic_varobj_children): Adjust.
29         (varobj_list_children): Return std::vector const reference and
30         adjust.
31         (varobj_add_child): Adjust.
32         (update_type_if_necessary): Adjust.
33         (varobj_update): Adjust.
34         (delete_variable_1): Adjust.
35         * ada-varobj.c (ada_value_has_mutated): Adjust.
36         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
37
38 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
39
40         * varobj.h (struct varobj): Add constructor and destructor,
41         initialize fields.
42         * varobj.c (struct varobj_root): Initialize fields.
43         (struct varobj_dynamic): Initialize fields.
44         (varobj_create): Use unique_ptr instead of cleanup.  Create
45         varobj with new instead of new_root_variable.
46         (delete_variable_1): Free variable with delete instead of
47         free_variable.
48         (create_child_with_value): Create variable with new instead of
49         new_variable.
50         (varobj::varobj): New.
51         (varobj::~varobj): New (body mostly coming from free_variable).
52         (new_variable): Remove.
53         (free_variable): Remove.
54         (do_free_variable_cleanup): Remove.
55         (make_cleanup_free_variable): Remove.
56
57 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
58
59         * core-regset.c: Remove file.
60         * Makefile.in (ALLDEPFILES): Remove core-regset.c.
61
62 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
63
64         * NEWS: Document use of GNU MPFR.
65         * README: Likewise.
66
67         * Makefile.in (LIBMPFR): Add define.
68         (CLIBS): Add $(LIBMPFR).
69         * configure.ac: Add --with-mpfr configure option.
70         * configure: Regenerate.
71         * config.in: Regenerate.
72
73         * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
74         (class mpfr_float_ops): New type.
75         (mpfr_float_ops::from_target): Two new overloaded functions.
76         (mpfr_float_ops::to_target): Likewise.
77         (mpfr_float_ops::to_string): New function.
78         (mpfr_float_ops::from_string): Likewise.
79         (mpfr_float_ops::to_longest): Likewise.
80         (mpfr_float_ops::from_longest): Likewise.
81         (mpfr_float_ops::from_ulongest): Likewise.
82         (mpfr_float_ops::to_host_double): Likewise.
83         (mpfr_float_ops::from_host_double): Likewise.
84         (mpfr_float_ops::convert): Likewise.
85         (mpfr_float_ops::binop): Likewise.
86         (mpfr_float_ops::compare): Likewise.
87         (get_target_float_ops): Use mpfr_float_ops if available.
88
89 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
90
91         * target-float.c: Do not include <math.h>.
92         Include <cmath> and <limits>.
93         (DOUBLEST): Do not define.
94         (class target_float_ops): New type.
95         (class host_float_ops): New templated type.
96         (class decimal_float_ops): New type.
97
98         (floatformat_to_doublest): Rename to ...
99         (host_float_ops<T>::from_target): ... this.  Use template type T
100         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
101         (host_float_ops<T>::from_target): New overload using a type argument.
102         (floatformat_from_doublest): Rename to ...
103         (host_float_ops<T>::to_target): ... this.  Use template type T
104         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
105         (host_float_ops<T>::to_target): New overload using a type argument.
106         (floatformat_printf_format): New function.
107         (struct printf_length_modifier): New templated type.
108         (floatformat_to_string): Rename to ...
109         (host_float_ops<T>::to_string): ... this.  Use type instead of
110         floatformat argument.  Use floatformat_printf_format and
111         printf_length_modifier.  Remove special handling of invalid numbers,
112         infinities and NaN (moved to target_float_to_string).
113         (struct scanf_length_modifier): New templated type.
114         (floatformat_from_string): Rename to ...
115         (host_float_ops<T>::from_string): ... this.  Use type instead of
116         floatformat argument.  Use scanf_length_modifier.
117         (floatformat_to_longest): Rename to ...
118         (host_float_ops<T>::to_longest): ... this.  Use type instead of
119         floatformat argument.  Handle out-of-range values deterministically.
120         (floatformat_from_longest): Rename to ...
121         (host_float_ops<T>::from_longest): ... this.  Use type instead of
122         floatformat argument.
123         (floatformat_from_ulongest): Rename to ...
124         (host_float_ops<T>::from_ulongest): ... this.  Use type instead of
125         floatformat argument.
126         (floatformat_to_host_double): Rename to ...
127         (host_float_ops<T>::to_host_double): ... this.  Use type instead of
128         floatformat argument.
129         (floatformat_from_host_double): Rename to ...
130         (host_float_ops<T>::from_host_double): ... this.  Use type instead of
131         floatformat argument.
132         (floatformat_convert): Rename to ...
133         (host_float_ops<T>::convert): ... this.  Use type instead of
134         floatformat arguments.  Remove handling of no-op conversions.
135         (floatformat_binop): Rename to ...
136         (host_float_ops<T>::binop): ... this.  Use type instead of
137         floatformat arguments.
138         (floatformat_compare): Rename to ...
139         (host_float_ops<T>::compare): ... this.  Use type instead of
140         floatformat arguments.
141
142         (match_endianness): Use type instead of length/byte_order arguments.
143         (set_decnumber_context): Likewise.
144         (decimal_from_number): Likewise.  Update calls.
145         (decimal_to_number): Likewise.
146         (decimal_is_zero): Likewise.  Update calls.  Move to earlier in file.
147         (decimal_float_ops::to_host_double): New dummy function.
148         (decimal_float_ops::from_host_double): Likewise.
149         (decimal_to_string): Rename to ...
150         (decimal_float_ops::to_string): ... this.  Use type instead of
151         length/byte_order arguments.  Update calls.
152         (decimal_from_string): Rename to ...
153         (decimal_float_ops::from_string): ... this.  Use type instead of
154         length/byte_order arguments.  Update calls.
155         (decimal_from_longest): Rename to ...
156         (decimal_float_ops::from_longest): ... this.  Use type instead of
157         length/byte_order arguments.  Update calls.
158         (decimal_from_ulongest): Rename to ...
159         (decimal_float_ops::from_ulongest): ... this.  Use type instead of
160         length/byte_order arguments.  Update calls.
161         (decimal_to_longest): Rename to ...
162         (decimal_float_ops::to_longest): ... this.  Use type instead of
163         length/byte_order arguments.  Update calls.
164         (decimal_binop): Rename to ...
165         (decimal_float_ops::binop): ... this.  Use type instead of
166         length/byte_order arguments.  Update calls.
167         (decimal_compare): Rename to ...
168         (decimal_float_ops::compare): ... this.  Use type instead of
169         length/byte_order arguments.  Update calls.
170         (decimal_convert): Rename to ...
171         (decimal_float_ops::convert): ... this.  Use type instead of
172         length/byte_order arguments.  Update calls.
173
174         (target_float_same_category_p): New function.
175         (target_float_same_format_p): Likewise.
176         (target_float_format_length): Likewise.
177         (enum target_float_ops_kind): New type.
178         (get_target_float_ops_kind): New function.
179         (get_target_float_ops): Three new overloaded functions.
180
181         (target_float_is_zero): Update call.
182         (target_float_to_string): Add special handling of invalid numbers,
183         infinities and NaN (moved from floatformat_to_string).  Use
184         target_float_ops callback.
185         (target_float_from_string): Use target_float_ops callback.
186         (target_float_to_longest): Likewise.
187         (target_float_from_longest): Likewise.
188         (target_float_from_ulongest): Likewise.
189         (target_float_to_host_double): Likewise.
190         (target_float_from_host_double): Likewise.
191         (target_float_convert): Add special case for no-op conversions.
192         Use target_float_ops callback.
193         (target_float_binop): Use target_float_ops callback.
194         (target_float_compare): Likewise.
195
196 2017-11-22  Yao Qi  <yao.qi@linaro.org>
197
198         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
199
200 2017-11-22  Yao Qi  <yao.qi@linaro.org>
201
202         * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
203         * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
204
205 2017-11-21  Jerome Guitton  <guitton@adacore.com>
206
207         * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
208         with event ptid from the lower layer before doing the
209         ravenscar-specific update.
210
211 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
212
213         * ravenscar-thread.c (is_ravenscar_task): Also verify that
214         the ptid's TID is nonzero.
215
216 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
217
218         * ada-lang.h (ada_get_tcb_types_info): Add declaration.
219         * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
220         Make non-static.  Change return type to char *.  Adjust code
221         accordingly.  Rewrite the function's documentation.
222         (read_atcb): Adjust call to get_tcb_types_info accordingly.
223         * ravenscar-thread.c (ravenscar_inferior_created): Check that
224         we have enough debugging information in the runtime to support
225         Ada task debugging before we enable the ravenscar-thread layer.
226
227 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
228
229         * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
230         * ada-tasks.c (ada_get_task_info_from_ptid): New function.
231         * ravenscar-thread.c: Add into comment.
232         (base_magic_null_ptid): Delete.
233         (base_ptid): Change documentation.
234         (ravenscar_active_task): Renames ravenscar_running_thread.
235         All callers updated throughout.
236         (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
237         (ravenscar_task_is_currently_active): Likewise.
238         (get_base_thread_from_ravenscar_task): Ditto.
239         (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
240         (ravenscar_runtime_initialized): Likewise.
241         (get_running_thread_id): Add new parameter "cpu".  Adjust
242         implementation to handle this new parameter.
243         (ravenscar_fetch_registers): Small adjustment to use
244         is_ravenscar_task and ravenscar_task_is_currently_active in
245         order to decide whether to use the target beneath or this
246         module's arch_ops.
247         (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
248         (ravenscar_stopped_by_sw_breakpoint): Use
249         get_base_thread_from_ravenscar_task to get the underlying
250         thread, rather than using base_ptid.
251         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
252         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
253         Likewise.
254         (ravenscar_inferior_created): Do not set base_magic_null_ptid.
255
256 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
257
258         * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
259         * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
260         (get_tcb_types_info): Set fieldnos.base_cpu.
261         (read_atcb): Set task_info->base_cpu.
262         (info_task): Print "Base CPU" info if set by runtime.
263
264 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
265
266         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
267         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
268         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
269         New functions.
270         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
271         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
272         to_stopped_data_address and to_core_of_thread fields of
273         ravenscar_ops.
274
275 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
276
277         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
278         (struct gdbarch_tdep): New member long_double_abi.
279         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
280         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
281         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
282         format depending on long_double_abi tdep member.
283         (ppc_floatformat_for_type): Handle __ibm128 type.
284
285 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
286
287         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
288
289 2017-11-21  Pedro Alves  <palves@redhat.com>
290
291         * dwarf2read.c (mapped_index::find_name_components_bounds)
292         <completion mode, upper bound>: Use std::lower_bound instead of
293         std::upper_bound.
294         (test_mapped_index_find_name_component_bounds): Remove incorrect
295         "t1_fund" from expected symbols.
296
297 2017-11-21  Pedro Alves  <palves@redhat.com>
298
299         * dwarf2read.c (mapped_index::name_components_casing): New field.
300         (mapped_index) <build_name_components,
301         find_name_components_bounds): Declare new methods.
302         (mapped_index::find_name_components_bounds)
303         (mapped_index::build_name_components): New methods, factored out
304         from dw2_expand_symtabs_matching_symbol.
305         (check_find_bounds_finds)
306         (test_mapped_index_find_name_component_bounds): New.
307         (run_test): Rename to ...
308         (test_dw2_expand_symtabs_matching_symbol): ... this.
309         (run_test): Reimplement.
310
311 2017-11-21  Pedro Alves  <palves@redhat.com>
312
313         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
314         (symbol_end): Use cp_ident_is_alnum.
315         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
316         * dwarf2read.c (make_sort_after_prefix_name): New function.
317         (dw2_expand_symtabs_matching_symbol): Use it.
318         (test_symbols): Add more symbols.
319         (run_test): Add tests.
320
321 2017-11-17  Tom Tromey  <tom@tromey.com>
322
323         * symtab.h (enum symbol_subclass_kind): New.
324         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
325         Remove.
326         <subclass>: New member.
327         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
328         * rust-lang.c (rust_get_trait_object_pointer): Update.
329         * dwarf2read.c (read_func_scope): Update.
330         (read_variable): Update.
331
332 2017-11-17  Tom Tromey  <tom@tromey.com>
333
334         * dwarf2read.c (read_func_scope): Update.
335         * symtab.h (struct template_symbol): Derive from symbol.
336         <base>: Remove.
337
338 2017-11-17  Tom Tromey  <tom@tromey.com>
339
340         * symtab.h (struct symbol) <is_rust_vtable>: New member.
341         (struct rust_vtable_symbol): New.
342         (find_symbol_at_address): Declare.
343         * symtab.c (find_symbol_at_address): New function.
344         * symfile.h (struct quick_symbol_functions)
345         <find_compunit_symtab_by_address>: New member.
346         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
347         function.
348         (debug_sym_quick_functions): Link to
349         debug_qf_find_compunit_symtab_by_address.
350         * rust-lang.c (rust_get_trait_object_pointer): New function.
351         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
352         rust_get_trait_object_pointer.
353         * psymtab.c (psym_relocate): Clear psymbol_map.
354         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
355         functions.
356         (psym_functions): Link to psym_find_compunit_symtab_by_address.
357         * objfiles.h (struct objfile) <psymbol_map>: New member.
358         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
359         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
360         (rust_containing_type, read_variable): New functions.
361
362 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
363
364         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
365
366 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
367
368         * common/filestuff.c: Include <algorithm>.
369         (open_fds): Change type to std::vector<int>.
370         (do_mark_open_fd): Adjust.
371         (unmark_fd_no_cloexec): Adjust.
372         (do_close): Adjust.
373
374 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
375
376         * breakpoint.c (output_thread_groups): Take an std::vector.
377         (print_one_breakpoint_location): Adjust.
378
379 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
380
381         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
382         (ada_evaluate_subexp_for_cast): New function.
383         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
384         ada_evaluate_subexp_for_cast.
385         (ada_evaluate_subexp) <nosideret>: Replace code by call to
386         eval_skip_value.
387         * eval.c (evaluate_var_value): Make non-static.
388         (evaluate_var_msym_value, eval_skip_value): Likewise.
389         * value.h (evaluate_var_value, evaluate_var_msym_value)
390         (eval_skip_value): Declare.
391
392 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
393
394         * ada-lang.c (ada_value_cast): Remove parameter "noside".
395         Update all callers.
396
397 2017-11-16  Pedro Alves  <palves@redhat.com>
398
399         * python/py-unwind.c (pyuw_sniffer): Translate
400         PyExc_KeyboardInterrupt to a GDB Quit exception.
401
402 2017-11-16  Pedro Alves  <palves@redhat.com>
403
404         * infrun.c (resume_cleanups): Delete.
405         (resume): No longer install a resume_cleanups cleanup nor call
406         QUIT.
407         (proceed): Pass the terminal to the inferior.
408         (keep_going_pass_signal): No longer install a resume_cleanups
409         cleanup.
410
411 2017-11-16  Pedro Alves  <palves@redhat.com>
412
413         * inf-loop.c (inferior_event_handler): Don't swallow the exception
414         if the prompt is blocked.
415
416 2017-11-16  Pedro Alves  <palves@redhat.com>
417
418         * breakpoint.c (insert_bp_location): Replace bp_err and
419         bp_err_message locals by a gdb_exception local.
420
421 2017-11-16  Pedro Alves  <palves@redhat.com>
422
423         * inflow.c (scoped_ignore_sigttou): New class.
424         (child_terminal_ours_1, new_tty): Use it.
425
426 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
427
428         * target-float.c (decimal_from_number): Add byte_order argument and
429         call match_endianness.  Error if unknown floating-point type.
430         (decimal_to_number): Add byte_order argument and call match_endianness.
431         (decimal_from_longest): Update call.  Do not call match_endianness.
432         (decimal_from_ulongest): Likewise.
433         (decimal_binop): Likewise.
434         (decimal_is_zero): Likewise.
435         (decimal_compare): Likewise.
436         (decimal_convert): Likewise.
437
438 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
439
440         * python/python.c (gdbpy_rbreak): New function.
441         * NEWS: Document Python rbreak feature.
442
443 2017-11-16  Yao Qi  <yao.qi@linaro.org>
444
445         * features/tic6x-c62x.xml: Remove.
446         * features/tic6x-c64x.xml: Remove.
447         * features/tic6x-c64xp.xml: Remove.
448
449 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
450
451         * symtab.h: Include <array>.
452
453 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
454
455         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
456         (bsd_kvm_proc_cmd): Likewise.
457
458 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
459
460         * tui/tui-win.c (window_name_completer): Replace VEC with
461         std::vector.
462
463 2017-11-15  Andrew Cagney  <cagney@gnu.org>
464
465         * MAINTAINERS: Remove no-longer applicable entries.
466
467 2017-11-15  Andrew Cagney  <cagney@gnu.org>
468
469         * MAINTAINERS: Move self to Past Maintainers.
470
471 2017-11-15  Yao Qi  <yao.qi@linaro.org>
472
473         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
474         * features/nios2-linux.c: Remove.
475         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
476         initialize_tdesc_nios2_linux.
477
478 2017-11-15  Yao Qi  <yao.qi@linaro.org>
479
480         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
481         M68HC11_LAST_HARD_REG + 1.
482
483 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
484
485         PR gdb/22388
486         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
487         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
488         Return TARGET_XFER_EOF if size of returned data is 0.
489
490 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
491
492         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
493         memory-map-selftests.c.
494         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
495         * memory-map.c (memory_map_start_memory): Fix computation of hi
496         address.
497         * unittests/memory-map-selftests.c: New file.
498
499 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
500
501         * ada-lang.c: Fix some typos in the general command documenting
502         how Ada expressions are being evaluated and how their result
503         is printed.
504
505 2017-11-09  Tom Tromey  <tom@tromey.com>
506
507         * psymtab.c (psymbol_hash): Do not hash string contents.
508         (psymbol_compare): Add comment.
509
510 2017-11-09  Tom Tromey  <tom@tromey.com>
511
512         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
513
514 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
515
516         * ada-exp.y (write_var_from_sym): Remove parameter
517         "orig_left_context".  Update all callers.
518
519 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
520
521         * tracepoint.h (class collection_list) <stringify>: Return
522         std::vector<std::string>.
523         (encode_actions_rsp): Change parameters to
524         std::vector<std::string> *.
525         * tracepoint.c (collection_list::stringify): Return
526         std::vector<std::string> and adjust accordingly.
527         (encode_actions_rsp): Changee parameters to
528         std::vector<std::string> and adjust accordingly.
529         * remote.c (free_actions_list),
530         free_actions_list_cleanup_wrapper): Remove.
531         (remote_download_tracepoint): Adjust to std::vector.
532
533 2017-11-08  Tom Tromey  <tom@tromey.com>
534
535         * dwarf2read.c (symbolp): Remove typedef.
536         (read_func_scope): Use std::vector.
537         (process_structure_scope): Use std::vector.
538
539 2017-11-08  Pedro Alves  <palves@redhat.com>
540
541         * ada-lang.c (ada_make_symbol_completion_list): Use
542         completion_skip_symbol.
543         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
544         (symbol_is_function_or_method(symbol*)): New.
545         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
546         completion_skip_symbol.
547         (default_collect_symbol_completion_matches_break_on): Use
548         completion_skip_symbol.  Pass down mode.
549         (collect_file_symbol_completion_matches): Pass down mode.
550         * symtab.h (symbol_is_function_or_method): New declarations.
551         (completion_skip_symbol): New template function.
552
553 2017-11-08  Pedro Alves  <palves@redhat.com>
554
555         * linespec.c (iterate_over_all_matching_symtabs): Add
556         search_domain parameter.  Pass it down to expand_symtabs_matching.
557         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
558         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
559         search_domain.
560         (add_all_symbol_names_from_pspace): Add search_domain parameter.
561         Pass it down.
562         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
563         symbols.
564         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
565         it down.
566
567 2017-11-08  Pedro Alves  <palves@redhat.com>
568
569         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
570         text_len locals and don't pass them down.
571         * symtab.c (completion_list_add_name): Remove
572         sym_text/sym_text_len parameters and adjust.
573         (completion_list_add_symbol, completion_list_add_msymbol)
574         (completion_list_objc_symbol, completion_list_add_fields)
575         (add_symtab_completions): Likewise.
576         (default_collect_symbol_completion_matches_break_on)
577         (collect_file_symbol_completion_matches): Remove sym_text_len
578         local and don't pass it down.
579         * symtab.h (completion_list_add_name): Remove
580         sym_text/sym_text_len parameters.
581
582 2017-11-08  Pedro Alves  <palves@redhat.com>
583
584         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
585         unittests/lookup_name_info-selftests.c.
586         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
587         * cp-support.c: Include "selftest.h".
588         (cp_remove_params_1): Rename from cp_remove_params.  Add
589         'require_param' parameter, and handle it.
590         (cp_remove_params): Reimplement.
591         (cp_remove_params_if_any): New.
592         (selftests::quote): New.
593         (selftests::check_remove_params): New.
594         (selftests::test_cp_remove_params): New.
595         (_initialize_cp_support): Install
596         selftests::test_cp_remove_params.
597         * cp-support.h (cp_remove_params_if_any): Declare.
598         * dwarf2read.c :Include "selftest.h".
599         (dw2_expand_symtabs_matching_symbol): Use
600         lookup_name_info::make_ignore_params.
601         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
602         (selftests::dw2_expand_symtabs_matching::string_or_null)
603         (selftests::dw2_expand_symtabs_matching::check_match)
604         (selftests::dw2_expand_symtabs_matching::test_symbols)
605         (selftests::dw2_expand_symtabs_matching::run_test): New.
606         (_initialize_dwarf2_read): Register
607         selftests::dw2_expand_symtabs_matching::run_test.
608         * psymtab.c (psym_expand_symtabs_matching): Use
609         lookup_name_info::make_ignore_params.
610         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
611         If the lookup name wants to ignore parameters, strip them.
612         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
613         code handling '('.
614         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
615         (default_collect_symbol_completion_matches_break_on): Don't try to
616         strip parameters.
617         * symtab.h (lookup_name_info::lookup_name_info): Add
618         'ignore_parameters' parameter.
619         (lookup_name_info::ignore_parameters)
620         (lookup_name_info::make_ignore_params): New methods.
621         (lookup_name_info::m_ignore_parameters): New field.
622         * unittests/lookup_name_info-selftests.c: New file.
623
624 2017-11-08  Pedro Alves  <palves@redhat.com>
625
626         * dwarf2read.c (dw2_expand_marked_cus)
627         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
628         (dw2_expand_symtabs_matching): Move further below.
629         (dw2_expand_marked_cus): Reindent.
630
631 2017-11-08  Pedro Alves  <palves@redhat.com>
632
633         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
634         (struct name_component): New.
635         (mapped_index::name_components): New field.
636         (mapped_index::symbol_name_at): New method.
637         (dwarf2_read_index): Call mapped_index ctor.
638         (dw2_map_matching_symbols): Add comment about name_components
639         table.
640         (dw2_expand_symtabs_matching): Factor part to...
641         (dw2_expand_symtabs_matching_symbol): ... this new function.
642         Build name components table, and lookup symbols in it before
643         calling the name matcher.
644         (dw2_expand_marked_cus): New, factored out from
645         dw2_expand_symtabs_matching.
646         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
647
648 2017-11-08   Pedro Alves  <palves@redhat.com>
649
650         * ada-lang.c (ada_encode): Rename to ..
651         (ada_encode_1): ... this.  Add throw_errors parameter and handle
652         it.
653         (ada_encode): Reimplement.
654         (match_name): Delete, folded into full_name.
655         (resolve_subexp): No longer pass the encoded name to
656         ada_lookup_symbol_list.
657         (should_use_wild_match): Delete.
658         (name_match_type_from_name): New.
659         (ada_lookup_simple_minsym): Use lookup_name_info and the
660         language's symbol_name_matcher_ftype.
661         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
662         (ada_add_block_renamings): Adjust to use lookup_name_info.
663         (ada_lookup_name): New.
664         (add_nonlocal_symbols, ada_add_all_symbols)
665         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
666         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
667         (ada_name_for_lookup): Delete.
668         (ada_lookup_encoded_symbol): Construct a verbatim name.
669         (wild_match): Reverse sense of return type.  Use bool.
670         (full_match): Reverse sense of return type.  Inline bits of old
671         match_name here.
672         (ada_add_block_symbols): Adjust to use lookup_name_info.
673         (symbol_completion_match): Delete, folded into...
674         (ada_lookup_name_info::matches): ... .this new method.
675         (symbol_completion_add): Delete.
676         (ada_collect_symbol_completion_matches): Add name_match_type
677         parameter.  Adjust to use lookup_name_info and
678         completion_list_add_name.
679         (get_var_value, ada_add_global_exceptions): Adjust to use
680         lookup_name_info.
681         (ada_get_symbol_name_cmp): Delete.
682         (do_wild_match, do_full_match): New functions.
683         (ada_lookup_name_info::ada_lookup_name_info): New method.
684         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
685         functions.
686         (ada_language_defn): Install ada_get_symbol_name_matcher.
687         * ada-lex.l (processId): If name starts with '<', copy it
688         verbatim.
689         * block.c (block_iter_match_step, block_iter_match_first)
690         (block_iter_match_next, block_lookup_symbol)
691         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
692         lookup_name_info.
693         * block.h (block_iter_match_first, block_iter_match_next)
694         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
695         * c-lang.c (c_language_defn, cplus_language_defn)
696         (asm_language_defn, minimal_language_defn): Adjust comments to
697         refer to la_get_symbol_name_matcher.
698         * completer.c (complete_files_symbols)
699         (collect_explicit_location_matches, symbol_completer): Pass a
700         symbol_name_match_type down.
701         * completer.h (class completion_match, completion_match_result):
702         New classes.
703         (completion_tracker::reset_completion_match_result): New method.
704         (completion_tracker::m_completion_match_result): New field.
705         * cp-support.c (make_symbol_overload_list_block): Adjust to use
706         lookup_name_info.
707         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
708         functions.
709         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
710         * d-lang.c: Adjust comments to refer to
711         la_get_symbol_name_matcher.
712         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
713         Adjust to use lookup_name_info.
714         (dict_iter_match_first, dict_iter_match_next)
715         (iter_match_first_hashed, iter_match_next_hashed)
716         (iter_match_first_linear, iter_match_next_linear): Adjust to work
717         with a lookup_name_info.
718         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
719         Likewise.
720         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
721         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
722         (gdb_index_symbol_name_matcher): New class.
723         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
724         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
725         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
726         with a symbol_name_match_type.
727         (f_language_defn): Adjust comments to refer to
728         la_get_symbol_name_matcher.
729         * go-lang.c (go_language_defn): Adjust comments to refer to
730         la_get_symbol_name_matcher.
731         * language.c (default_symbol_name_matcher)
732         (language_get_symbol_name_matcher): New functions.
733         (unknown_language_defn, auto_language_defn): Adjust comments to
734         refer to la_get_symbol_name_matcher.
735         * language.h (symbol_name_cmp_ftype): Delete.
736         (language_defn) <la_collect_symbol_completion_matches>: Add match
737         type parameter.
738         <la_get_symbol_name_cmp>: Delete field.
739         <la_get_symbol_name_matcher>: New field.
740         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
741         (default_symbol_name_matcher, language_get_symbol_name_matcher):
742         Declare.
743         * linespec.c (iterate_over_all_matching_symtabs)
744         (iterate_over_file_blocks): Adjust to use lookup_name_info.
745         (find_methods): Add language parameter, and use lookup_name_info
746         and the language's symbol_name_matcher_ftype.
747         (linespec_complete_function): Adjust.
748         (lookup_prefix_sym): Use lookup_name_info.
749         (add_all_symbol_names_from_pspace): Adjust.
750         (find_superclass_methods): Add language parameter and pass it
751         down.
752         (find_method): Pass symbol language down.
753         (find_linespec_symbols): Don't demangle or Ada encode here.
754         (search_minsyms_for_name): Add lookup_name_info parameter.
755         (add_matching_symbols_to_info): Add name_match_type parameter.
756         Use lookup_name_info.
757         * m2-lang.c (m2_language_defn): Adjust comments to refer to
758         la_get_symbol_name_matcher.
759         * minsyms.c: Include <algorithm>.
760         (add_minsym_to_demangled_hash_table): Remove table parameter and
761         add objfile parameter.  Use search_name_hash, and add language to
762         demangled languages vector.
763         (struct found_minimal_symbols): New struct.
764         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
765         New functions.
766         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
767         input names here.  Use lookup_name_info instead.  Lookup up
768         demangled names once for each language in the demangled names
769         vector.
770         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
771         demangled names once for each language in the demangled names
772         vector.
773         (build_minimal_symbol_hash_tables): Adjust.
774         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
775         lookup_name_info.
776         * objc-lang.c (objc_language_defn): Adjust comment to refer to
777         la_get_symbol_name_matcher.
778         * objfiles.h: Include <vector>.
779         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
780         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
781         la_get_symbol_name_matcher.
782         * p-lang.c (pascal_language_defn): Adjust comment to refer to
783         la_get_symbol_name_matcher.
784         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
785         (match_partial_symbol): Use symbol_name_match_type,
786         lookup_name_info and psymbol_name_matches.
787         (lookup_partial_symbol): Use lookup_name_info.
788         (map_block): Use symbol_name_match_type and lookup_name_info.
789         (psym_map_matching_symbols): Use symbol_name_match_type.
790         (psymbol_name_matches): New.
791         (recursively_search_psymtabs): Use lookup_name_info and
792         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
793         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
794         'kind' parameter to 'domain'.
795         * rust-lang.c (rust_language_defn): Adjust comment to refer to
796         la_get_symbol_name_matcher.
797         * symfile-debug.c (debug_qf_map_matching_symbols)
798         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
799         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
800         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
801         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
802         Adjust to use symbol_name_match_type.
803         <expand_symtabs_matching>: Adjust to use lookup_name_info.
804         (expand_symtabs_matching): Adjust to use lookup_name_info.
805         * symmisc.c (maintenance_expand_symtabs): Use
806         lookup_name_info::match_any ().
807         * symtab.c (symbol_matches_search_name): New.
808         (eq_symbol_entry): Adjust to use lookup_name_info and the
809         language's matcher.
810         (demangle_for_lookup_info::demangle_for_lookup_info): New.
811         (lookup_name_info::match_any): New.
812         (iterate_over_symbols, search_symbols): Use lookup_name_info.
813         (compare_symbol_name): Add language, lookup_name_info and
814         completion_match_result parameters, and use them.
815         (completion_list_add_name): Make extern.  Add language and
816         lookup_name_info parameters.  Use them.
817         (completion_list_add_symbol, completion_list_add_msymbol)
818         (completion_list_objc_symbol): Add lookup_name_info parameters and
819         adjust.  Pass down language.
820         (completion_list_add_fields): Add lookup_name_info parameters and
821         adjust.  Pass down language.
822         (add_symtab_completions): Add lookup_name_info parameters and
823         adjust.
824         (default_collect_symbol_completion_matches_break_on): Add
825         name_match_type parameter, and use it.  Use lookup_name_info.
826         (default_collect_symbol_completion_matches)
827         (collect_symbol_completion_matches): Add name_match_type
828         parameter, and pass it down.
829         (collect_symbol_completion_matches_type): Adjust.
830         (collect_file_symbol_completion_matches): Add name_match_type
831         parameter, and use lookup_name_info.
832         * symtab.h: Include <string> and "common/gdb_optional.h".
833         (enum class symbol_name_match_type): New.
834         (class ada_lookup_name_info): New.
835         (struct demangle_for_lookup_info): New.
836         (class lookup_name_info): New.
837         (symbol_name_matcher_ftype): New.
838         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
839         (symbol_matches_search_name): Declare.
840         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
841         (default_collect_symbol_completion_matches)
842         (collect_symbol_completion_matches)
843         (collect_file_symbol_completion_matches): Add name_match_type
844         parameter.
845         (iterate_over_symbols): Use lookup_name_info.
846         (completion_list_add_name): Declare.
847         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
848         (strncmp_iw_with_mode): Now extern.
849         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
850         (strncmp_iw_with_mode): Declare.
851
852 2017-11-08  Keith Seitz  <keiths@redhat.com>
853             Pedro Alves  <palves@redhat.com>
854
855         * ada-lang.c (ada_language_defn): Install
856         default_search_name_hash.
857         * buildsym.c (struct buildsym_compunit): <language>: New field.
858         (finish_block_internal): Pass language when creating dictionaries.
859         (start_buildsym_compunit, start_symtab): New language parameters.
860         Use them.
861         (restart_symtab): Pass down compilation unit's language.
862         * buildsym.h (enum language): Forward declare.
863         (start_symtab): New 'language' parameter.
864         * c-lang.c (c_language_defn, cplus_language_defn)
865         (asm_language_defn, minimal_language_defn): Install
866         default_search_name_hash.
867         * coffread.c (coff_start_symtab): Adjust.
868         * d-lang.c (d_language_defn): Install default_search_name_hash.
869         * dbxread.c (struct symloc): Add 'pst_language' field.
870         (PST_LANGUAGE): Define.
871         (start_psymtab, read_ofile_symtab): Use it.
872         (process_one_symbol): New 'language' parameter.  Pass it down.
873         * dictionary.c (struct dictionary) <language>: New field.
874         (DICT_LANGUAGE): Define.
875         (dict_create_hashed, dict_create_hashed_expandable)
876         (dict_create_linear, dict_create_linear_expandable): New parameter
877         'language'.  Set the dictionary's language.
878         (iter_match_first_hashed): Adjust to rename.
879         (insert_symbol_hashed): Assert we don't see mismatching
880         languages.  Adjust to rename.
881         (dict_hash): Rename to ...
882         (default_search_name_hash): ... this and make extern.
883         * dictionary.h (struct language_defn): Forward declare.
884         (dict_create_hashed): New parameter 'language'.
885         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
886         * f-lang.c (f_language_defn): Install default_search_name_hash.
887         * go-lang.c (go_language_defn): Install default_search_name_hash.
888         * jit.c (finalize_symtab): Pass compunit's language to dictionary
889         creation.
890         * language.c (unknown_language_defn, auto_language_defn):
891         * language.h (language_defn::la_search_name_hash): New field.
892         (default_search_name_hash): Declare.
893         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
894         * mdebugread.c (new_block): New parameter 'language'.
895         * mdebugread.c (parse_symbol): Pass symbol language to block
896         allocation.
897         (psymtab_to_symtab_1): Pass down language.
898         (new_symtab): Pass compunit's language to block allocation.
899         * objc-lang.c (objc_language_defn): Install
900         default_search_name_hash.
901         * opencl-lang.c (opencl_language_defn):
902         * p-lang.c (pascal_language_defn): Install
903         default_search_name_hash.
904         * rust-lang.c (rust_language_defn): Install
905         default_search_name_hash.
906         * stabsread.h (enum language): Forward declare.
907         (process_one_symbol): Add 'language' parameter.
908         * symtab.c (search_name_hash): New function.
909         * symtab.h (search_name_hash): Declare.
910         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
911
912 2017-11-08  Pedro Alves  <palves@redhat.com>
913
914         * cp-name-parser.y (main): Don't initialize extra_chars.
915
916 2017-11-07  Tom Tromey  <tom@tromey.com>
917
918         * event-top.h (command_handler): Constify.
919         * record-full.c (cmd_record_full_start): Update.
920         * thread.c (thread_apply_all_command): Update.
921         * printcmd.c (eval_command): Update.
922         * mi/mi-main.c (mi_execute_cli_command): Update.
923         (mi_execute_async_cli_command): Update.
924         * tui/tui-stack.c (tui_update_command): Update.
925         * cli/cli-interp.c (safe_execute_command): Constify.
926         * record.c (record_start): Update.
927         (record_start, record_stop, cmd_record_start): Update.
928         * record-btrace.c (cmd_record_btrace_bts_start): Update.
929         (cmd_record_btrace_pt_start): Update.
930         (cmd_record_btrace_start): Update.
931         (cmd_record_btrace_start): Update.
932         * reverse.c (exec_reverse_once): Update.
933         * python/python.c (execute_gdb_command): Don't copy the command.
934         * event-top.c (command_line_handler): Update.
935         (command_handler): Constify.
936         * defs.h (deprecated_call_command_hook): Constify.
937         * cli/cli-script.h (execute_user_command): Constify.
938         * cli/cli-script.c (execute_user_command): Constify.
939         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
940         (enum command_control_type): Update.
941         * main.c (catch_command_errors): Remove non-const overload.
942         (catch_command_errors_ftype): Remove.
943         * python/py-cmd.c (cmdpy_function): Constify.
944         * guile/scm-cmd.c (cmdscm_function): Constify.
945         * cli/cli-dump.c (call_dump_func): Constify.
946         * cli/cli-decode.c (do_const_cfunc): Constify.
947         (do_sfunc): Constify.
948         (cmd_func): Constify.
949         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
950         * top.h (execute_command): Constify.
951         * top.c (execute_command): Constify.
952         (execute_command_to_string): Constify.
953         (deprecated_call_command_hook): Constify.
954         * command.h (cmd_func): Constify.
955         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
956
957 2017-11-07  Tom Tromey  <tom@tromey.com>
958
959         * ada-lang.c (catch_ada_exception_command): Constify.
960         (catch_assert_command): Constify.
961         * break-catch-throw.c (catch_catch_command, catch_throw_command)
962         (catch_rethrow_command): Constify.
963         (catch_exception_command_1): Constify.
964         * breakpoint.h (add_catch_command): Constify.
965         * break-catch-syscall.c (catch_syscall_command_1): Constify.
966         (catch_syscall_split_args): Constify.
967         * break-catch-sig.c (catch_signal_command): Constify.
968         (catch_signal_split_args): Constify.
969         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
970         cmd_const_sfunc_ftype.
971         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
972         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
973         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
974         (add_setshow_string_cmd, struct cmd_list_element)
975         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
976         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
977         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
978         Constify.
979         (set_cmd_sfunc): Constify.
980         (empty_sfunc): Constify.
981         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
982         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
983         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
984         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
985         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
986         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
987         Constify.
988         (set_cmd_sfunc): Constify.
989         (cmd_sfunc_ftype): Remove.
990         * compile/compile.c (set_compile_args): Constify.
991         * infrun.c (set_disable_randomization): Constify.
992         * infcmd.c (set_args_command, set_cwd_command): Constify.
993         * breakpoint.c (set_condition_evaluation_mode): Constify.
994         (add_catch_command): Constify.
995         (catch_fork_command_1, catch_exec_command_1)
996         (catch_load_command_1, catch_unload_command_1): Constify.
997         (catch_load_or_unload): Constify.
998         * guile/scm-param.c (pascm_set_func): Constify.
999         (add_setshow_generic): Constify.
1000         * python/py-param.c (get_set_value): Constify.
1001         * top.h (set_verbose): Constify.
1002         * tui/tui-win.c (tui_set_var_cmd): Constify.
1003         * mi/mi-main.c (set_mi_async_command): Constify.
1004         * cli/cli-logging.c (set_logging_overwrite)
1005         (set_logging_redirect): Constify.
1006         * value.c (set_max_value_size): Constify.
1007         * valprint.c (set_input_radix, set_output_radix): Constify.
1008         * utils.c (set_width_command, set_height_command): Constify.
1009         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1010         * tracepoint.c (set_disconnected_tracing)
1011         (set_circular_trace_buffer, set_trace_buffer_size)
1012         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1013         * top.c (set_history_size_command, set_verbose, set_editing)
1014         (set_gdb_datadir, set_history_filename): Constify.
1015         * target.c (set_targetdebug, maint_set_target_async_command)
1016         (maint_set_target_non_stop_command, set_target_permissions)
1017         (set_write_memory_permission): Constify.
1018         (open_target): Constify.
1019         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1020         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1021         * symtab.c (set_symbol_cache_size_handler): Constify.
1022         * symfile.c (set_ext_lang_command): Constify.
1023         * symfile-debug.c (set_debug_symfile): Constify.
1024         * source.c (set_directories_command): Constify.
1025         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1026         * serial.c (set_parity): Constify.
1027         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1028         * remote.c (set_remote_exec_file, set_remotebreak)
1029         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1030         * record.c (set_record_insn_history_size)
1031         (set_record_call_history_size): Constify.
1032         * record-full.c (set_record_full_insn_max_num): Constify.
1033         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1034         * osabi.c (set_osabi): Constify.
1035         * mips-tdep.c (set_mips64_transfers_32bit_regs)
1036         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1037         * maint.c (maintenance_set_profile_cmd): Constify.
1038         * linux-thread-db.c (set_libthread_db_search_path): Constify.
1039         * language.c (set_language_command, set_range_command)
1040         (set_case_command): Constify.
1041         * infrun.c (set_non_stop, set_observer_mode)
1042         (set_stop_on_solib_events, set_schedlock_func)
1043         (set_exec_direction_func): Constify.
1044         * infcmd.c (set_inferior_tty_command): Constify.
1045         * disasm.c (set_disassembler_options_sfunc): Constify.
1046         * demangle.c (set_demangling_command): Constify.
1047         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1048         * cris-tdep.c (set_cris_version, set_cris_mode)
1049         (set_cris_dwarf2_cfi): Constify.
1050         * corefile.c (set_gnutarget_command): Constify.
1051         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1052         (set_target_wide_charset_sfunc): Constify.
1053         * breakpoint.c (update_dprintf_commands): Constify.
1054         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1055         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1056         (set_disassembly_style_sfunc): Constify.
1057         * arch-utils.c (set_endian, set_architecture): Constify.
1058         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1059         * agent.c (set_can_use_agent): Constify.
1060
1061 2017-11-07  Tom Tromey  <tom@tromey.com>
1062
1063         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1064         (go32_pde, go32_pte, go32_pte_for_address): Constify.
1065         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1066         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1067         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1068         (parse_int_arg, show_thread_default_detach_sc_cmd)
1069         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1070         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1071         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1072         (show_task_pause_cmd, set_task_detach_sc_cmd)
1073         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1074         (set_noninvasive_cmd, set_thread_pause_cmd)
1075         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1076         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1077         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1078         * windows-nat.c (display_selectors): Constify.
1079         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1080         non-const "cfunc".
1081         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1082         (cmd_cfunc_eq): Likewise.
1083         (struct cmd_list_element): Likewise.
1084         (do_cfunc): Remove.
1085         (cli_user_command_p): Update.
1086         * command.h (add_cmd): Remove non-const overload.
1087         (cmd_cfunc_ftype): Remove typedef.
1088         (cmd_cfunc_eq): Remove non-const overload.
1089         * value.c (show_values): Constify.
1090         * thread.c (thread_apply_all_command): Constify.
1091         * symfile.c (load_command): Constify.
1092         * source.c (directory_command): Constify.
1093         * maint.c (maintenance_internal_error)
1094         (maintenance_demangler_warning, maintenance_space_display)
1095         (maintenance_print_architecture, maintenance_translate_address)
1096         (maintenance_info_selftests, maintenance_internal_warning):
1097         Constify.
1098         * breakpoint.c (disable_trace_command, enable_trace_command):
1099         Constify.
1100         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1101         Constify.
1102         (add_auto_load_safe_path): Constify.
1103         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1104         * top.h (show_commands): Constify.
1105         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1106         * sparc64-tdep.c (adi_examine_command): Constify.
1107         (adi_assign_command): Constify.
1108
1109 2017-11-07  Tom Tromey  <tom@tromey.com>
1110
1111         * frame.h (info_locals_command, info_args_command): Constify.
1112         * auto-load.h (auto_load_info_scripts): Constify.
1113         * inferior.h (registers_info): Constify.
1114         * copying.c: Rebuild.
1115         * copying.awk: Constify generated commands.
1116         * auto-load.c (auto_load_info_scripts)
1117         (info_auto_load_gdb_scripts): Constify.
1118         * cli/cli-decode.c (struct cmd_list_element): Take a
1119         cmd_const_cfunc_ftype.
1120         * command.h (add_info): Take a cmd_const_cfunc_ftype.
1121         * tui/tui-win.c (tui_all_windows_info): Constify.
1122         * python/py-auto-load.c (info_auto_load_python_scripts):
1123         Constify.
1124         * cli/cli-cmds.c (show_command): Remove non-const overload.
1125         * tracepoint.c (info_tvariables_command, info_scope_command):
1126         Constify.
1127         (info_static_tracepoint_markers_command): Constify.
1128         * thread.c (info_threads_command): Constify.
1129         (print_thread_info_1): Constify.
1130         * target.c (info_target_command): Constify.
1131         * symtab.c (info_sources_command, info_functions_command)
1132         (info_types_command): Constify.
1133         (info_variables_command): Remove non-const overload.
1134         * symfile.c (info_ext_lang_command): Constify.
1135         * stack.c (info_frame_command, info_locals_command)
1136         (info_args_command): Constify.
1137         (backtrace_command): Remove non-const overload.
1138         * source.c (info_source_command, info_line_command): Constify.
1139         * solib.c (info_sharedlibrary_command): Constify.
1140         * skip.c (info_skip_command): Constify.
1141         * ser-go32.c (info_serial_command): Constify.
1142         * reverse.c (info_bookmarks_command): Constify.
1143         * printcmd.c (info_symbol_command, info_address_command)
1144         (info_display_command): Constify.
1145         * osdata.c (info_osdata_command): Constify.
1146         * objc-lang.c (info_selectors_command, info_classes_command):
1147         Constify.
1148         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1149         * memattr.c (info_mem_command): Constify.
1150         * macrocmd.c (info_macro_command, info_macros_command): Constify.
1151         * linux-fork.c (info_checkpoints_command): Constify.
1152         * infrun.c (info_signals_command): Constify.
1153         * inflow.c (info_terminal_command): Constify.
1154         * inferior.c (info_inferiors_command): Constify.
1155         (print_inferior): Constify.
1156         * infcmd.c (info_program_command, info_all_registers_command)
1157         (info_registers_command, info_vector_command)
1158         (info_float_command): Constify.
1159         (registers_info): Constify.
1160         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1161         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1162         Constify.
1163         * f-valprint.c (info_common_command): Constify.
1164         * dcache.c (info_dcache_command): Constify.
1165         (dcache_info_1): Constify.
1166         * darwin-nat-info.c (info_mach_tasks_command)
1167         (info_mach_task_command, info_mach_ports_command)
1168         (info_mach_port_command, info_mach_threads_command)
1169         (info_mach_thread_command, info_mach_regions_command)
1170         (info_mach_regions_recurse_command, info_mach_region_command)
1171         (info_mach_exceptions_command): Constify.
1172         (get_task_from_args): Constify.
1173         * cp-support.c (info_vtbl_command): Constify.
1174         * breakpoint.c (info_watchpoints_command)
1175         (info_tracepoints_command): Constify.
1176         (info_breakpoints_command): Remove non-const overload.
1177         * avr-tdep.c (avr_io_reg_read_command): Constify.
1178         * auxv.c (info_auxv_command): Constify.
1179         * ada-tasks.c (info_tasks_command): Constify.
1180         (info_task): Constify.
1181         * ada-lang.c (info_exceptions_command): Constify.
1182
1183 2017-11-07  Tom Tromey  <tom@tromey.com>
1184
1185         * solib.h (no_shared_libraries): Constify.
1186         * frame.h (return_command): Constify.
1187         * cli/cli-cmds.h (quit_command): Constify.
1188         * top.h (quit_command, execute_command): Constify.
1189         * target.h (flash_erase_command): Constify.
1190         * inferior.h (set_inferior_args, attach_command): Constify.
1191         * tracepoint.h (start_tracing, stop_tracing): Constify.
1192         * breakpoint.h (break_command, tbreak_command)
1193         (hbreak_command_wrapper, thbreak_command_wrapper)
1194         (rbreak_command_wrapper, watch_command_wrapper)
1195         (awatch_command_wrapper, rwatch_command_wrapper)
1196         (get_tracepoint_by_number): Constify.
1197         * symtab.c (info_variables_command, rbreak_command)
1198         (symtab_symbol_info): Constify.
1199         (info_variables_command): Add non-const overload.
1200         * top.c (dont_repeat_command): Constify.
1201         * breakpoint.c (ignore_command, commands_command)
1202         (condition_command, tbreak_command, hbreak_command)
1203         (thbreak_command, clear_command, break_command)
1204         (info_breakpoints_command, watch_command, rwatch_command)
1205         (awatch_command, trace_command, ftrace_command, strace_command)
1206         (trace_pass_command, break_range_command, dprintf_command)
1207         (agent_printf_command, get_tracepoint_by_number)
1208         (watch_maybe_just_location, trace_pass_command): Constify.
1209         (info_breakpoints_command): Add non-const overload.
1210         * tracefile.c (tsave_command): Constify.
1211         * infcmd.c (attach_command, disconnect_command, signal_command)
1212         (queue_signal_command, stepi_command, nexti_command)
1213         (finish_command, next_command, step_command, until_command)
1214         (advance_command, jump_command, continue_command, run_command)
1215         (start_command, starti_command, interrupt_command)
1216         (run_command_1, set_inferior_args, step_1): Constify.
1217         * inferior.c (add_inferior_command, remove_inferior_command)
1218         (clone_inferior_command): Constify.
1219         * linux-fork.c (checkpoint_command, restart_command): Constify.
1220         * windows-nat.c (signal_event_command): Constify.
1221         * guile/guile.c (guile_repl_command, guile_command): Constify.
1222         * printcmd.c (x_command, display_command, printf_command)
1223         (output_command, set_command, call_command, print_command)
1224         (eval_command): Constify.
1225         (non_const_set_command): Remove.
1226         (_initialize_printcmd): Update.
1227         * source.c (forward_search_command, reverse_search_command):
1228         Constify.
1229         * jit.c (jit_reader_load_command, jit_reader_unload_command):
1230         Constify.
1231         * infrun.c (handle_command): Constify.
1232         * memattr.c (mem_command): Constify.
1233         * stack.c (return_command, up_command, up_silently_command)
1234         (down_command, down_silently_command, frame_command)
1235         (backtrace_command, func_command, backtrace_command_1): Constify.
1236         (backtrace_command): Add non-const overload.
1237         * remote-sim.c (simulator_command): Constify.
1238         * exec.c (set_section_command): Constify.
1239         * tracepoint.c (tdump_command, trace_variable_command)
1240         (tstatus_command, tstop_command, tstart_command)
1241         (end_actions_pseudocommand, while_stepping_pseudocommand)
1242         (collect_pseudocommand, teval_pseudocommand, actions_command)
1243         (start_tracing, stop_tracing): Constify.
1244         * value.c (init_if_undefined_command): Constify.
1245         * tui/tui-stack.c (tui_update_command): Constify.
1246         * tui/tui-win.c (tui_refresh_all_command)
1247         (tui_set_tab_width_command, tui_set_win_height_command)
1248         (tui_set_focus_command, tui_scroll_forward_command)
1249         (tui_scroll_backward_command, tui_scroll_left_command)
1250         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1251         (tui_set_win_height): Constify.
1252         * tui/tui-layout.c (tui_layout_command): Constify.
1253         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1254         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1255         (proc_untrace_sysexit_cmd): Constify.
1256         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1257         (threadset_test_cmd, threadlist_update_test_cmd)
1258         (threadalive_test): Constify.
1259         * objc-lang.c (print_object_command): Constify.
1260         * command.h (add_com): Constify.
1261         * cli/cli-dump.c (restore_command): Constify.
1262         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1263         (help_command, complete_command, shell_command, edit_command)
1264         (list_command, disassemble_command, make_command)
1265         (apropos_command, alias_command): Constify.
1266         * cli/cli-script.c (document_command, define_command)
1267         (while_command, if_command, validate_comname): Constify.
1268         * cli/cli-decode.c (struct cmd_list_element): Change type of
1269         "fun".
1270         * target.c (do_monitor_command, flash_erase_command): Constify.
1271         * regcache.c (reg_flush_command): Constify.
1272         * reverse.c (reverse_step, reverse_next, reverse_stepi)
1273         (reverse_nexti, reverse_continue, reverse_finish)
1274         (save_bookmark_command, goto_bookmark_command)
1275         (exec_reverse_once): Constify.
1276         * python/python.c (python_interactive_command, python_command):
1277         Constify.
1278         * typeprint.c (ptype_command, whatis_command, whatis_exp):
1279         Constify.
1280         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1281         * gcore.c (gcore_command): Constify.
1282
1283 2017-11-07  Tom Tromey  <tom@tromey.com>
1284
1285         * printcmd.c (x_command): Call set_repeat_arguments.
1286         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1287         * top.c (repeat_arguments): New global.
1288         (set_repeat_arguments): New function.
1289         (execute_command): Handle repeat_arguments.
1290         (show_commands): Calls set_repeat_arguments.
1291         * command.h (set_repeat_arguments): Declare.
1292
1293 2017-11-07  Tom Tromey  <tom@tromey.com>
1294
1295         * stack.c (backtrace_command): Use std::string.
1296         (backtrace_command_1): Make "count_exp" const.
1297
1298 2017-11-07  Tom Tromey  <tom@tromey.com>
1299
1300         * source.c (directory_switch, mod_path, add_path): Constify.
1301         * defs.h (add_path, mod_path, directory_switch): Constify.
1302         * mi/mi-cmd-env.c (env_mod_path): Constify.
1303
1304 2017-11-07  Tom Tromey  <tom@tromey.com>
1305
1306         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1307         (run_command_1, continue_command, step_1, jump_command)
1308         (signal_command, until_command, advance_command, finish_command)
1309         (attach_command): Update.
1310
1311 2017-11-07  Tom Tromey  <tom@tromey.com>
1312
1313         * command.h (set_cmd_cfunc): Don't declare.
1314         * cli/cli-decode.c (set_cmd_cfunc): Now static.
1315
1316 2017-11-07  Tom Tromey  <tom@tromey.com>
1317
1318         * stack.c (select_frame_command): Constify.
1319         * cli/cli-decode.c (add_com_suppress_notification): Constify.
1320         * command.h (add_com_suppress_notification): Constify.
1321
1322 2017-11-07  Tom Tromey  <tom@tromey.com>
1323
1324         * breakpoint.c (stop_command): Constify.
1325         * cli/cli-decode.c (struct cmd_list_element): Constify.
1326         * command.h (add_abbrev_prefix_cmd): Constify.
1327
1328 2017-11-07  Pedro Alves  <palves@redhat.com>
1329
1330         * breakpoint.c (extract_bp_kind): New enum.
1331         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1332         factored out from ...
1333         (extract_bp_number_and_location): ... here.
1334         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1335
1336 2017-11-07  Pedro Alves  <palves@redhat.com>
1337
1338         * breakpoint.c (extract_bp_number_and_location): Change return
1339         type to void.  Throw error instead of warning.
1340         (enable_disable_command): Adjust.
1341
1342 2017-11-07  Xavier Roirand  <roirand@adacore.com>
1343             Pedro Alves  <palves@redhat.com>
1344
1345         * breakpoint.c (map_breakpoint_number_range): New, factored out
1346         from ...
1347         (map_breakpoint_numbers): ... here.
1348         (find_location_by_number): Change parameters from string to
1349         breakpoint number and location.
1350         (extract_bp_number_and_location): New function.
1351         (enable_disable_bp_num_loc)
1352         (enable_disable_breakpoint_location_range)
1353         (enable_disable_command): New functions, factored out ...
1354         (enable_command, disable_command): ... these functions, and
1355         adjusted to support ranges.
1356         * NEWS: Document enable/disable breakpoint location range feature.
1357
1358 2017-11-06  Luis Machado  <luis.machado@linaro.org>
1359
1360         * MAINTAINERS (Write After Approval): Update my e-mail address.
1361
1362 2017-11-06  Pedro Alves  <palves@redhat.com>
1363
1364         * gnu-nat.c (gnu_terminal_init): Delete.
1365         (gnu_target): Don't install gnu_terminal_init.
1366         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1367         (child_terminal_init): ... this function.
1368
1369 2017-11-06  Pedro Alves  <palves@redhat.com>
1370
1371         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1372         sgtty.h.
1373         * config.in, configure: Regenerate.
1374
1375 2017-11-06  Pedro Alves  <palves@redhat.com>
1376
1377         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1378         (async_init_signals): Adjust.
1379         (handle_stop_sig): Rename to ...
1380         (handle_sigtstp): ... this.
1381         (async_stop_sig): Rename to ...
1382         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1383         SIGTSTP path.
1384         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
1385         instead of STOP_SIGNAL thoughout.
1386         (handle_stop_sig): Rename to ...
1387         (handle_sigtstp): ... this.
1388         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1389
1390 2017-11-06  Pedro Alves  <palves@redhat.com>
1391
1392         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1393         longer set flags twice in row.
1394
1395 2017-11-06  Pedro Alves  <palves@redhat.com>
1396
1397         * Makefile.in (SER_HARDWIRE): Update comment.
1398         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1399         * common/gdb_termios.h: Delete file.
1400         * common/job-control.c: Include termios.h and unistd.h instead of
1401         gdb_termios.h.
1402         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1403         check.
1404         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1405         Remove sgtty code.
1406         * configure.ac: No longer check for termio.h and sgtty.h.
1407         * configure: Regenerate.
1408         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
1409         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1410         Replace PROCESS_GROUP_TYPE references with pid_t references
1411         throughout.
1412         (gdb_getpgrp): Delete.
1413         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1414         (child_terminal_inferior): Remove comment.  Remove sgtty code.
1415         (child_terminal_ours_1): Use tcgetpgrp directly instead of
1416         gdb_getpgrp.  Use serial_set_tty_state instead aof
1417         serial_noflush_set_tty_state.  Remove sgtty code.
1418         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
1419         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1420         (inferior_process_group): Now returns pid_t.
1421         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1422         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1423         * ser-event.c (serial_event_ops): Update.
1424         * ser-go32.c (dos_noflush_set_tty_state): Delete.
1425         (dos_ops): Update.
1426         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1427         * ser-pipe.c (pipe_ops): Update.
1428         * ser-tcp.c (tcp_ops): Update.
1429         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
1430         HAVE_TERMIOS checks.
1431         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1432         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1433         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1434         assume termios.
1435         (hardwire_noflush_set_tty_state): Delete.
1436         (hardwire_print_tty_state, hardwire_drain_output)
1437         (hardwire_flush_output, hardwire_flush_input)
1438         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1439         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1440         code, and assume termios.
1441         (hardwire_ops): Update.
1442         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1443         * serial.c (serial_noflush_set_tty_state): Delete.
1444         * serial.h (serial_noflush_set_tty_state): Delete.
1445         (serial_ops::noflush_set_tty_state): Delete.
1446
1447 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1448
1449         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1450         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1451         (COMMON_OBS): Remove doublest.o and dfp.o.
1452         Do not build target-float.c (instead of doublest.c)
1453         with -Wformat-nonliteral.
1454
1455         * doublest.c: Remove file.
1456         * doublest.h: Remove file.
1457         * dfp.c: Remove file.
1458         * dfp.h: Remove file.
1459
1460         * target-float.c: Do not include "doublest.h" and "dfp.h".
1461         (DOUBLEST): Move here from doublest.h.
1462         (enum float_kind): Likewise.
1463         (FLOATFORMAT_CHAR_BIT): Likewise.
1464         (FLOATFORMAT_LARGEST_BYTES): Likewise.
1465         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
1466         (floatformat_precision): Likewise.
1467         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1468         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1469         Likewise.
1470         (host_float_format, host_double_format, host_long_double_format):
1471         Likewise.
1472         (floatformat_to_string, floatformat_from_string): Likewise.
1473         (floatformat_to_doublest): Likewise.  Also, inline the original
1474         convert_floatformat_to_doublest.
1475         (floatformat_from_doublest): Likewise.  Also, inline the original
1476         convert_floatformat_from_doublest.
1477
1478         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1479         (MAX_DECIMAL_STRING): Move here from dfp.c.
1480         (match_endianness): Likewise.
1481         (set_decnumber_context, decimal_check_errors): Likewise.
1482         (decimal_from_number, decimal_to_number): Likewise.
1483         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1484         (decimal_from_longest, decimal_from_ulongest): Likewise.
1485         (decimal_to_longest): Likewise.
1486         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1487         (decimal_convert): Likewise.
1488
1489 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1490
1491         * doublest.c: Do not include "gdbtypes.h".
1492         (extract_typed_floating): Remove.
1493         (store_typed_floating): Remove.
1494         (convert_typed_floating): Remove.
1495         * doublest.h (struct type): Remove.
1496         (DOUBLEST_PRINT_FORMAT): Remove.
1497         (DOUBLEST_SCAN_FORMAT): Remove.
1498         (extract_typed_floating): Remove.
1499         (store_typed_floating): Remove.
1500         (convert_typed_floating): Remove.
1501
1502         * dfp.c (decimal_from_doublest): Remove.
1503         (decimal_to_doublest): Remove.
1504         * dfp.h: Do not include "doublest.h".
1505         (decimal_from_doublest): Remove.
1506         (decimal_to_doublest): Remove.
1507
1508         * value.c: Do not include "doublest.h" and "dfp.h".
1509         (value_as_double): Remove.
1510         (unpack_double): Remove.
1511         (value_from_double): Remove.
1512         (value_from_decfloat): Remove.
1513         * value.h: Do not include "doublest.h".
1514         (value_as_double): Remove.
1515         (unpack_double): Remove.
1516         (value_from_double): Remove.
1517         (value_from_decfloat): Remove.
1518
1519 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1520
1521         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1522         (i386_extract_return_value): Use target_float_convert.
1523         (i386_store_return_value): Likewise.
1524         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1525         (i387_value_to_register): Likewise.
1526         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1527         (ia64_register_to_value): Use target_float_convert.
1528         (ia64_value_to_register): Likewise.
1529         (ia64_extract_return_value): Likewise.
1530         (ia64_store_return_value): Likewise.
1531         (ia64_push_dummy_call): Likewise.
1532         * m68k-tdep.c: Include "target-float.h".
1533         (m68k_register_to_value): Use target_float_convert.
1534         (m68k_value_to_register): Likewise.
1535         (m68k_svr4_extract_return_value): Likewise.
1536         (m68k_svr4_store_return_value): Likewise.
1537         * ppc-sysv-tdep.c: Include "target-float.h".
1538         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1539         (do_ppc_sysv_return_value): Likewise.
1540         (ppc64_sysv_abi_push_freg): Likewise.
1541         (ppc64_sysv_abi_return_value_base): Likewise.
1542         * rs6000-aix-tdep.c: Include "target-float.h".
1543         (rs6000_push_dummy_call): Use target_float_convert.
1544         (rs6000_return_value): Likewise.
1545         * rs6000-lynx178-tdep.c: Include "target-float.h".
1546         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1547         (rs6000_lynx178_return_value): Likewise.
1548         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1549         (rs6000_register_to_value): Use target_float_convert.
1550         (rs6000_value_to_register): Likewise.
1551         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1552         (arm_extract_return_value): Use target_float_convert.
1553         (arm_store_return_value): Likewise.
1554         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1555         (sh_register_convert_to_virtual): Use target_float_convert.
1556         (sh_register_convert_to_raw): Likewise.
1557         * sh64-tdep.c: Include "target-float.h".
1558         (sh64_extract_return_value): Use target_float_convert.
1559         (sh64_register_convert_to_virtual): Likewise.
1560         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1561
1562 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1563
1564         * target-float.c (floatformat_to_host_double): New function.
1565         (floatformat_from_host_double): Likewise.
1566         (target_float_to_host_double): Likewise.
1567         (target_float_from_host_double): Likewise.
1568         * target-float.h (target_float_to_host_double): Add prototype.
1569         (target_float_from_host_double): Likewise.
1570
1571         * guile/scm-value.c: Include "target-float.h".
1572         (gdbscm_value_to_real): Use target_float_to_host_double.
1573         Handle integer source values via value_as_long.
1574         * guile/scm-math.c: Include "target-float.h".  Do not include
1575         "doublest.h", "dfp.h", and "expression.h".
1576         (vlscm_convert_typed_number): Use target_float_from_host_double.
1577         (vlscm_convert_number): Likewise.
1578
1579         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1580         (convert_value_from_python): Use target_float_from_host_double.
1581
1582 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1583
1584         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1585         (cast_from_fixed): Likewise.
1586         (ada_scaling_type): New function.
1587         (ada_delta): Return value instead of DOUBLEST.  Perform target
1588         arithmetic instead of host arithmetic.
1589         (scaling_factor): Rename to ...
1590         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1591         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1592         (ada_fixed_to_float): Remove.
1593         (ada_float_to_fixed): Remove.
1594         * ada-lang.h (ada_fixed_to_float): Remove.
1595         (ada_float_to_fixed): Remove.
1596         (ada_delta): Return value instead of DOUBLEST.
1597         (ada_scaling_factor): Add prototype.
1598
1599         * ada-typeprint.c: Include "target-float.h".
1600         (print_fixed_point_type): Perform target arithmetic instead of
1601         host arithmetic.
1602         * ada-valprint.c: Include "target-float.h".
1603         (ada_val_print_num): Perform target arithmetic instead of
1604         host arithmetic for fixed-point types.
1605
1606 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1607
1608         * target-float.c: Include <math.h>.
1609         (floatformat_binop): New function.
1610         (floatformat_compare): Likewise.
1611         (target_float_binop): Likewise.
1612         (target_float_compare): Likewise.
1613         * target-float.h: Include "expression.h".
1614         (target_float_binop): Add prototype.
1615         (target_float_compare): Likewise.
1616
1617         * valarith.c: Do not include "doublest.h" and "dfp.h".
1618         Include "common/byte-vector.h".
1619         (value_args_as_decimal): Remove, replace by ...
1620         (value_args_as_target_float): ... this function.  Handle both
1621         binary and decimal target floating-point formats.
1622         (scalar_binop): Handle both binary and decimal FP using
1623         value_args_as_target_float and target_float_binop.
1624         (value_equal): Handle both binary and decimal FP using
1625         value_args_as_target_float and target_float_compare.
1626         (value_less): Likewise.
1627         (value_pos): Handle all scalar types as simple copy.
1628         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1629         * dfp.c (decimal_binop): Throw error instead of internal_error
1630         when called with an unsupported operation code.
1631
1632 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1633
1634         * target-float.c (target_float_to_string): New function.
1635         (target_float_from_string): New function.
1636         * target-float.h (target_float_to_string): Add prototype.
1637         (target_float_from_string): Add prototype.
1638
1639         * valprint.c: Include "target-float.h".  Do not include
1640         "doublest.h" and "dfp.h".
1641         (print_floating): Use target_float_to_string.
1642         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1643         (printf_floating): Use target_float_to_string.
1644         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1645         (print_i387_value): Use target_float_to_string.
1646         * mips-tdep.c: Include "target-float.h".
1647         (mips_print_fp_register): Use target_float_to_string.
1648         * sh64-tdep.c: Include "target-float.h".
1649         (sh64_do_fp_register): Use target_float_to_string.
1650
1651         * parse.c: Include "target-float.h".  Do not include
1652         "doublest.h" and "dfp.h".
1653         (parse_float): Use target_float_from_string.
1654         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1655         (define_symbol): Use target_float_from_string.
1656         * gdbarch-selftests.c: Include "target-float.h".
1657         (register_to_value_test): Use target_float_from_string.
1658
1659 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1660
1661         * Makefile.c (SFILES): Add target-float.c.
1662         (HFILES_NO_SRCDIR): Add target-float.h.
1663         (COMMON_OBS): Add target-float.o.
1664         * target-float.h: New file.
1665         * target-float.c: New file.
1666
1667         * doublest.c (floatformat_classify): Fix detection of float_zero.
1668
1669         * gdbtypes.c (is_floating_type): New function.
1670         * gdbtypes.h (is_floating_type): Add prototype.
1671
1672         * value.c: Do not include "floatformat.h".
1673         (unpack_double): Use target_float_is_valid.
1674         (is_floating_value): New function.
1675         * value.h (is_floating_value): Add prototype-
1676
1677         * valarith.c: Include "target-float.h".
1678         (value_logical_not): Use target_float_is_zero.
1679
1680         * python/py-value.c: Include "target-float.h".
1681         (valpy_nonzero): Use target_float_is_zero.
1682
1683 2017-11-04  Tom Tromey  <tom@tromey.com>
1684
1685         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1686
1687 2017-11-04  Tom Tromey  <tom@tromey.com>
1688
1689         * breakpoint.c (set_momentary_breakpoint): Return
1690         breakpoint_up.
1691         (until_break_command): Update.
1692         (new_until_break_fsm): Change argument types to
1693         breakpoint_up.
1694         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1695         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1696         Remove.
1697         * infcmd.c (finish_forward): Update.
1698         * breakpoint.h (set_momentary_breakpoint)
1699         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1700         (make_cleanup_delete_breakpoint): Remove.
1701         (struct breakpoint_deleter): New.
1702         (breakpoint_up): New typedef.
1703         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1704         (insert_exception_resume_breakpoint): Update.
1705         (insert_exception_resume_from_probe): Update.
1706         (insert_longjmp_resume_breakpoint): Update.
1707         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1708         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1709         * infcall.c (call_function_by_hand_dummy): Update
1710
1711 2017-11-04  Tom Tromey  <tom@tromey.com>
1712
1713         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1714
1715 2017-11-04  Tom Tromey  <tom@tromey.com>
1716
1717         * linux-tdep.c (linux_core_info_proc_mappings): Use
1718         gdb::def_vector.
1719         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1720         "size" argument.
1721         (linux_corefile_thread): Update.
1722         (linux_make_corefile_notes): Remove unused variable.
1723
1724 2017-11-04  Tom Tromey  <tom@tromey.com>
1725
1726         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1727         gdb::byte_vector.
1728
1729 2017-11-04  Tom Tromey  <tom@tromey.com>
1730
1731         * objfiles.c (do_free_objfile_cleanup): Remove.
1732         * compile/compile-object-load.c (compile_object_load): Update.
1733         * objfiles.h (make_cleanup_free_objfile): Remove.
1734
1735 2017-11-04  Tom Tromey  <tom@tromey.com>
1736
1737         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1738         (adi_read_versions): Change "tags" to "gdb_byte *".
1739         (adi_print_versions): Likewise.
1740
1741 2017-11-04  Tom Tromey  <tom@tromey.com>
1742
1743         * breakpoint.c
1744         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1745         from start_rbreak_breakpoints.
1746         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1747         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1748         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1749         * symtab.c (do_end_rbreak_breakpoints): Remove.
1750         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1751
1752 2017-11-04  Tom Tromey  <tom@tromey.com>
1753
1754         * cp-namespace.c (reset_directive_searched): Remove.
1755         (cp_lookup_symbol_via_imports): Use scoped_restore.
1756         * cp-support.c (reset_directive_searched): Remove.
1757         (make_symbol_overload_list_using): Use scoped_restore.
1758         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1759         (reset_directive_searched): Remove.
1760
1761 2017-11-04  Tom Tromey  <tom@tromey.com>
1762
1763         * symfile.c (find_separate_debug_file_by_debuglink): Use
1764         unique_xmalloc_ptr.
1765
1766 2017-11-04  Tom Tromey  <tom@tromey.com>
1767
1768         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1769         type of "info".
1770         (compute_stack_depth): Likewise.
1771         (do_compile_dwarf_expr_to_c): Use std::vector.
1772
1773 2017-11-04  Tom Tromey  <tom@tromey.com>
1774
1775         * compile/compile-object-load.c (link_callbacks_einfo): Use
1776         std::string.
1777
1778 2017-11-04  Tom Tromey  <tom@tromey.com>
1779
1780         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1781         Use scoped_free_pendings.
1782         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1783         scoped_free_pendings.
1784         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1785         (xcoff_initial_scan): Likewise.
1786         * buildsym.c (reset_symtab_globals): Update comment.
1787         (scoped_free_pendings): Rename from really_free_pendings.
1788         (prepare_for_building): Update comment.
1789         (buildsym_init): Likewise.
1790         * buildsym.h (class scoped_free_pendings): New class.
1791         (really_free_pendings): Don't declare.
1792
1793 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1794
1795         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1796         output when converting a zero value to a special byteorder format.
1797
1798 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1799
1800         * frame.c (do_frame_register_read): Remove aspace.
1801         * jit.c (jit_frame_sniffer): Likwise.
1802         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1803         * regcache.c (regcache::regcache): Pass nullptr.
1804         (regcache_print): Caller updated.
1805         * regcache.h (regcache::regcache): Remove one constructor
1806         parameter aspace.
1807
1808 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1809
1810         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1811
1812 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1813
1814         * breakpoint.c (insert_single_step_breakpoints): Update.
1815         * frame.c (struct frame_info) <aspace>: Add const.
1816         (frame_save_as_regcache): Add const.
1817         (get_frame_address_space): Return const address_space *.
1818         * frame.h (get_frame_address_space): Update declaration.
1819         * infrun.c (struct step_over_info) <aspace>: Add const.
1820         (set_step_over_info): Make aspace const.
1821         (displaced_step_prepare_throw): Change variable const.
1822         (resume): Likewise.
1823         (proceed): Likewise.
1824         (adjust_pc_after_break): Likewise.
1825         (save_waitstatus): Likewise.
1826         (handle_signal_stop): Likewise.
1827         (keep_going_pass_signal): Likewise.
1828         * jit.c (jit_frame_sniffer): Add const.
1829         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1830         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1831         * record-full.c (record_full_wait_1): Likewise.
1832         * regcache.c (regcache::regcache): Change parameter to const.
1833         * regcache.h (regcache::regcache): Likewise.
1834         (regcache::aspace): Return const address_space *.
1835         (regcache) <m_aspace>: Add const.
1836
1837 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1838
1839         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1840         * frame.c (create_sentinel_frame): Likewise.
1841         * infrun.c (displaced_step_prepare_throw): Likewise.
1842         (resume): Likewise.
1843         (thread_still_needs_step_over_bp): Likewise.
1844         (proceed): Likewise.
1845         (do_target_wait): Likewise.
1846         (adjust_pc_after_break): Likewise.
1847         (handle_syscall_event): Likewise.
1848         (save_waitstatus): Likewise.
1849         (handle_inferior_event_1): Likewise.
1850         (handle_signal_stop): Likewise.
1851         (keep_going_pass_signal): Likewise.
1852         * linux-nat.c (status_callback): Likewise.
1853         (save_stop_reason): Likewise.
1854         (resume_stopped_resumed_lwps): Likewise.
1855         * record-full.c (record_full_exec_insn): Likewise.
1856         (record_full_wait_1): Likewise.
1857         * regcache.c (get_regcache_aspace): Remove.
1858         * regcache.h (get_regcache_aspace): Remove.
1859
1860 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1861
1862         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1863         (init_regcache_descr): Use gdbarch_num_regs.
1864         (regcache::regcache): Likewise.
1865         (regcache::get_register_status): Likewise.
1866         (regcache::assert_raw_regnum): Likewise.
1867         (regcache::cooked_read): Likewise.
1868         (regcache::cooked_read_value): Likewise.
1869         (regcache::cooked_write): Likewise.
1870         (regcache::dump): Likewise.
1871         (regcache::num_raw_registers): New method.
1872         * regcache.h (class regcache) <num_raw_registers>: New.
1873
1874 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1875
1876         * regcache.c (regcache::assert_regnum): New method.
1877         (regcache::invalidate): Call assert_regnum.
1878         (regcache::raw_update): Likewise.
1879         (regcache::raw_write): Likewise.
1880         (regcache::raw_read_part): Likewise.
1881         (regcache::raw_write_part): Likewise.
1882         (regcache::raw_supply): Likewise.
1883         (regcache::raw_supply_integer): Likewise.
1884         (regcache::raw_supply_zeroed): Likewise.
1885         (regcache::raw_collect): Likewise.
1886         (regcache::raw_collect_integer): Likewise.
1887         * regcache.h (regcache::assert_regnum): Declare.
1888
1889 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1890
1891         * regcache.c (regcache::dump): Remove code.
1892
1893 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1894
1895         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1896         Remove.
1897         <sizeof_cooked_register_status>: Remove.
1898         (init_regcache_descr): Update.
1899         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1900         (regcache::save): Likewise.
1901         (regcache::dump): Likewise.
1902
1903 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1904
1905         * ft32-tdep.c (ft32_fetch_instruction): New function.
1906         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1907
1908 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1909
1910         * cli/cli-script.c (execute_control_command): Rename to ...
1911         (execute_control_command_1): ... this.
1912         (execute_control_command): New function.
1913
1914 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1915
1916         * tracepoint.c (tfind_command): Remove const_cast.
1917
1918 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1919
1920         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1921
1922 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1923
1924         * common/common-utils.h (in_inclusive_range): New function.
1925         * arm-tdep.c (arm_record_extension_space): Use
1926         in_inclusive_range.
1927         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1928         * cris-tdep.c (cris_spec_reg_applicable): Use
1929         in_inclusive_range.
1930
1931 2017-10-30  Pedro Alves  <palves@redhat.com>
1932             Simon Marchi <simon.marchi@ericsson.com>
1933
1934         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1935         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1936
1937 2017-10-30  Pedro Alves  <palves@redhat.com>
1938
1939         * common/common-utils.c (string_appendf, string_vappendf): New
1940         functions.
1941         * common/common-utils.h (string_appendf, string_vappendf): New
1942         declarations.
1943         * unittests/common-utils-selftests.c (string_appendf_func)
1944         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1945         (string_vappendf_tests): New functions.
1946         (_initialize_common_utils_selftests): Register "string_appendf" and
1947         "string_vappendf tests".
1948
1949 2017-10-30  Pedro Alves  <palves@redhat.com>
1950
1951         * unittests/common-utils-selftests.c (format_func): New typedef.
1952         (string_printf_tests, string_vprintf_tests): Tests factored out
1953         and merged to ...
1954         (test_format_func): ... this new function.
1955         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1956         test_format_func.
1957
1958 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1959
1960         * darwin-nat.c: Remove include of gdb.h.
1961
1962 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1963
1964         * xtensa-xtregs.c: Fix formatting issues.
1965
1966 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1967
1968         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1969
1970 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1971
1972         PR python/21213
1973         * python/py-infthread.c (thpy_get_inferior): Increment reference
1974         of inferior before returning it.
1975
1976 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1977
1978         * unittests/common-utils-selftests.c (format): Add
1979         ATTRIBUTE_PRINTF.
1980
1981 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1982
1983         * xml-syscall.c (struct syscall_desc): Add constructor.
1984         <name>: Change type to std::string.
1985         (syscall_desc_up): New typedef.
1986         (syscall_desc_p): Remove typeder.
1987         (DEF_VEC_P(syscall_desc_p)): Remove.
1988         (struct syscall_group_desc): Add constructor.
1989         <name>: Change type to std::string.
1990         <syscalls>: Change type to std::vector.
1991         (syscall_group_desc_up): New typedef.
1992         (syscall_group_desc_p): Remove typedef.
1993         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1994         (struct syscalls_info) <syscalls>: Change type to std::vector of
1995         unique_ptr.
1996         <groups>: Likewise.
1997         <my_gdb_datadir>: Change type to std::string.
1998         (syscalls_info_up): New typedef.
1999         (allocate_syscalls_info): Remove.
2000         (syscalls_info_free_syscalls_desc): Remove.
2001         (syscalls_info_free_syscall_group_desc): Remove.
2002         (free_syscalls_info): Remove.
2003         (make_cleanup_free_syscalls_info): Remove.
2004         (syscall_group_create_syscall_group_desc): Adjust.
2005         (syscall_group_add_syscall): Adjust.
2006         (syscall_create_syscall_desc): Adjust.
2007         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2008         (init_syscalls_info): Adjust.
2009         (syscall_group_get_group_by_name): Adjust.
2010         (xml_get_syscall_number): Adjust.
2011         (xml_get_syscall_name): Adjust.
2012         (xml_list_of_syscalls): Adjust.
2013         (xml_list_syscalls_by_group): Adjust.
2014         (xml_list_of_groups): Adjust.
2015
2016 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2017
2018         * probe.h: Don't include gdb_vecs.h.
2019         (DEF_VEC_P (probe_p)): Remove.
2020         (find_probes_in_objfile): Return an std::vector.
2021         * probe.c (find_probes_in_objfile): Likewise.
2022         * breakpoint.c (breakpoint_objfile_data)
2023         <longjmp_probes>: Change type to std::vector.
2024         <exception_probes>: Likewise.
2025         (free_breakpoint_probes): Don't manually free vectors.
2026         (create_longjmp_master_breakpoint): Adjust.
2027         (create_exception_master_breakpoint): Adjust.
2028         * solib-svr4.c (svr4_create_probe_breakpoints): Change
2029         parameter type, adjust.
2030         (svr4_create_solib_event_breakpoints): Adjust.
2031
2032 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2033
2034         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2035         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2036         with new.
2037         (free_breakpoint_probes): Rename to ...
2038         (free_breakpoint_objfile_data): ... this, and call delete on
2039         bp_objfile_data..
2040
2041 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
2042
2043         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2044         (loaded_script_ptr): Remove typedef.
2045         (DEF_VEC_P (loaded_script_ptr)): Remove.
2046         (struct collect_matching_scripts_data): Add constructor.
2047         <scripts_p>: Change type to (pointer to) std::vector.
2048         (collect_matching_scripts_data): Adjust.
2049         (sort_scripts_by_name): Make suitable for std::sort.
2050         (print_scripts): Don't sort vector, adjust to std::vector.
2051         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2052
2053 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2054
2055         * symfile.c (filename_language): Make struct, not typedef.  Add
2056         constructor.
2057         <ext>: Change type to std::string.
2058         (DEF_VEC_O (filename_language)): Remove.
2059         (filename_language_table): Change type to std::vector.
2060         (add_filename_language): Adjust.
2061         (set_ext_lang_command): Adjust.
2062         (info_ext_lang_command): Adjust.
2063         (deduce_language_from_filename): Adjust.
2064         (class scoped_restore_filename_language_table): Remove.
2065         (test_filename_language): Use scoped_restore.
2066         (test_set_ext_lang_command): Use scoped_restore, adjust to
2067         std::vector change.
2068
2069 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2070
2071         * symfile.c: Include selftest.h.
2072         (class scoped_restore_filename_language_table): New.
2073         (test_filename_language): New test.
2074         (test_set_ext_lang_command): New test.
2075         (_initialize_symfile): Register tests.
2076
2077 2017-10-27  Keith Seitz  <keiths@redhat.com>
2078
2079         * breakpoint.c (print_breakpoint_location): Use the symbol saved
2080         in the bp_location, falling back to find_pc_sect_function when
2081         needed.
2082         (add_location_to_breakpoint): Save sal->symbol.
2083         * breakpoint.h (struct bp_location) <symbol>: New field.
2084         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2085         * symtab.h (struct symtab_and_line) <symbol>: New field.
2086
2087 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
2088
2089         PR gdb/13669
2090         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2091         to rewind obstack.
2092
2093 2017-10-26  Pedro Alves  <palves@redhat.com>
2094
2095         * remote.c (remote_async_terminal_ours_p): Delete.
2096         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2097         Remove references to 'remote_async_terminal_ours_p'.
2098
2099 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2100
2101         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2102
2103 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2104
2105         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2106         aspace const.
2107         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2108         Likewise.
2109         * breakpoint.c (bpstat_check_location): Remove cast.
2110         (breakpoint_hit_catch_fork): Make aspce const.
2111         (breakpoint_hit_catch_solib): Likewise.
2112         (breakpoint_hit_catch_exec): Likewise.
2113         (breakpoint_hit_ranged_breakpoint): Likewise.
2114         (breakpoint_hit_watchpoint): Likewise.
2115         (base_breakpoint_breakpoint_hit): Likewise.
2116         (bkpt_breakpoint_hit): Likewise.
2117         (dprintf_breakpoint_hit): Likewise.
2118         (tracepoint_breakpoint_hit): Likewise.
2119         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2120
2121 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2122
2123         * breakpoint.c (breakpoint_location_address_match): Change
2124         "struct address_space *" to "const address_space".
2125         (breakpoint_location_address_range_overlap): Likewise.
2126         (breakpoint_here_p): Likewise.
2127         (breakpoint_in_range_p): Likewise.
2128         (moribund_breakpoint_here_p): Likewise.
2129         (bp_location_inserted_here_p): Likewise.
2130         (software_breakpoint_inserted_here_p): Likewise.
2131         (hardware_breakpoint_inserted_here_p): Likewise.
2132         (hardware_watchpoint_inserted_in_range): Likewise.
2133         (bpstat_check_location): Likewise.
2134         (bpstat_stop_status): Likewise.
2135         (breakpoint_address_match): Likewise.
2136         (breakpoint_address_match_range): Likewise.
2137         (breakpoint_location_address_match): Likewise.
2138         (breakpoint_location_address_range_overlap): Likewise.
2139         (insert_single_step_breakpoint): Likewise.
2140         (breakpoint_has_location_inserted_here): Likewise.
2141         (single_step_breakpoint_inserted_here_p): Likewise.
2142         (pc_at_non_inline_function): Likewise.
2143         * breakpoint.h (bpstat_stop_status): Update declaration.
2144         (breakpoint_here_p): Likewise.
2145         (breakpoint_in_range_p): Likewise.
2146         (moribund_breakpoint_here_p): Likewise.
2147         (breakpoint_inserted_here_p): Likewise.
2148         (software_breakpoint_inserted_here_p): Likewise.
2149         (hardware_breakpoint_inserted_here_p): Likewise.
2150         (breakpoint_has_location_inserted_here): Likewise.
2151         (single_step_breakpoint_inserted_here_p): Likewise.
2152         (hardware_watchpoint_inserted_in_range): Likewise.
2153         (breakpoint_address_match): Likewise.
2154         (insert_single_step_breakpoint): Likewise.
2155         (pc_at_non_inline_function): Likewise.
2156         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2157         * record.c (record_check_stopped_by_breakpoint): Likewise.
2158         * record.h (record_check_stopped_by_breakpoint): Likewise.
2159         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2160
2161 2017-10-25  Yao Qi  <yao.qi@linaro.org>
2162
2163         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2164         regcache->arch () instead get_regcache_arch.
2165         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2166         Likewise.
2167         (aarch64_fbsd_store_inferior_registers): Likewise.
2168         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2169         (store_gregs_to_thread): Likewise.
2170         (fetch_fpregs_from_thread): Likewise.
2171         (store_fpregs_to_thread): Likewise.
2172         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2173         (aarch64_store_return_value): Likewise.
2174         (aarch64_software_single_step): Likewise.
2175         * aix-thread.c (aix_thread_wait): Likewise.
2176         (supply_reg32): Likewise.
2177         (supply_sprs64): Likewise.
2178         (supply_sprs32): Likewise.
2179         (fill_gprs64): Likewise.
2180         (fill_gprs32): Likewise.
2181         (fill_sprs64): Likewise.
2182         (fill_sprs32): Likewise.
2183         (store_regs_user_thread): Likewise.
2184         (store_regs_kernel_thread): Likewise.
2185         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2186         (alphabsd_store_inferior_registers): Likewise.
2187         * alpha-tdep.c (alpha_extract_return_value): Likewise.
2188         (alpha_store_return_value): Likewise.
2189         (alpha_deal_with_atomic_sequence): Likewise.
2190         (alpha_next_pc): Likewise.
2191         (alpha_software_single_step): Likewise.
2192         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2193         (amd64bsd_store_inferior_registers): Likewise.
2194         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2195         Likewise.
2196         (amd64_linux_store_inferior_registers): Likewise.
2197         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2198         (amd64_collect_native_gregset): Likewise.
2199         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2200         (amd64obsd_collect_uthread): Likewise.
2201         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2202         (amd64_collect_fpregset): Likewise.
2203         (amd64_supply_fxsave): Likewise.
2204         (amd64_supply_xsave): Likewise.
2205         (amd64_collect_fxsave): Likewise.
2206         (amd64_collect_xsave): Likewise.
2207         * arc-tdep.c (arc_write_pc): Likewise.
2208         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2209         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2210         (arm_fbsd_store_inferior_registers): Likewise.
2211         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2212         (store_vfp_regs): Likewise.
2213         (arm_linux_fetch_inferior_registers): Likewise.
2214         (arm_linux_store_inferior_registers): Likewise.
2215         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2216         (arm_linux_sigreturn_next_pc): Likewise.
2217         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2218         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2219         (fetch_register): Likewise.
2220         (store_register): Likewise.
2221         * arm-tdep.c (arm_is_thumb): Likewise.
2222         (displaced_in_arm_mode): Likewise.
2223         (bx_write_pc): Likewise.
2224         (arm_get_next_pcs_addr_bits_remove): Likewise.
2225         (arm_software_single_step): Likewise.
2226         (arm_extract_return_value): Likewise.
2227         (arm_store_return_value): Likewise.
2228         (arm_write_pc): Likewise.
2229         * bfin-tdep.c (bfin_extract_return_value): Likewise.
2230         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2231         (bsd_uthread_store_registers): Likewise.
2232         * core-regset.c (fetch_core_registers): Likewise.
2233         * corelow.c (get_core_registers): Likewise.
2234         * cris-tdep.c (cris_store_return_value): Likewise.
2235         (cris_extract_return_value): Likewise.
2236         (find_step_target): Likewise.
2237         (find_step_target): Likewise.
2238         (cris_software_single_step): Likewise.
2239         * ctf.c (ctf_fetch_registers): Likewise.
2240         * darwin-nat.c (cancel_breakpoint): Likewise.
2241         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2242         * frv-tdep.c (frv_extract_return_value): Likewise.
2243         * ft32-tdep.c (ft32_store_return_value): Likewise.
2244         (ft32_extract_return_value): Likewise.
2245         * go32-nat.c (fetch_register): Likewise.
2246         (go32_fetch_registers): Likewise.
2247         (go32_store_registers): Likewise.
2248         (store_register): Likewise.
2249         * h8300-tdep.c (h8300_extract_return_value): Likewise.
2250         (h8300_store_return_value): Likewise.
2251         * hppa-linux-nat.c (fetch_register): Likewise.
2252         (store_register): Likewise.
2253         (hppa_linux_fetch_inferior_registers): Likewise.
2254         (hppa_linux_store_inferior_registers): Likewise.
2255         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2256         (i386_darwin_store_inferior_registers): Likewise.
2257         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2258         (gnu_store_registers): Likewise.
2259         * i386-linux-nat.c (fetch_register): Likewise.
2260         (store_register): Likewise.
2261         (supply_gregset): Likewise.
2262         (fill_gregset): Likewise.
2263         (i386_linux_fetch_inferior_registers): Likewise.
2264         (i386_linux_store_inferior_registers): Likewise.
2265         (i386_linux_resume): Likewise.
2266         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2267         Likewise.
2268         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2269         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2270         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2271         (i386obsd_collect_uthread): Likewise.
2272         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2273         (i386_supply_gregset): Likewise.
2274         (i386_collect_gregset): Likewise.
2275         (i386_supply_fpregset): Likewise.
2276         (i386_collect_fpregset): Likewise.
2277         (i386_mpx_bd_base): Likewise.
2278         * i386-v4-nat.c (supply_fpregset): Likewise.
2279         (fill_fpregset): Likewise.
2280         * i387-tdep.c (i387_supply_fsave): Likewise.
2281         (i387_collect_fsave): Likewise.
2282         (i387_supply_fxsave): Likewise.
2283         (i387_collect_fxsave): Likewise.
2284         (i387_supply_xsave): Likewise.
2285         (i387_collect_xsave): Likewise.
2286         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2287         (ia64_linux_store_registers): Likewise.
2288         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2289         (ia64_extract_return_value): Likewise.
2290         (ia64_store_return_value): Likewise.
2291         (find_func_descr): Likewise.
2292         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2293         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2294         (inf_ptrace_store_registers): Likewise.
2295         * infrun.c (use_displaced_stepping): Likewise.
2296         (displaced_step_prepare_throw): Likewise.
2297         (resume): Likewise.
2298         (proceed): Likewise.
2299         (do_target_wait): Likewise.
2300         (adjust_pc_after_break): Likewise.
2301         (handle_inferior_event_1): Likewise.
2302         (handle_signal_stop): Likewise.
2303         (save_infcall_suspend_state): Likewise.
2304         (restore_infcall_suspend_state): Likewise.
2305         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2306         * jit.c (jit_frame_prev_register): Likewise.
2307         * linux-nat.c (save_stop_reason): Likewise.
2308         (linux_nat_wait_1): Likewise.
2309         (resume_stopped_resumed_lwps): Likewise.
2310         * linux-record.c (record_linux_sockaddr): Likewise.
2311         (record_linux_msghdr): Likewise.
2312         (record_linux_system_call): Likewise.
2313         * linux-tdep.c (linux_collect_thread_registers): Likewise.
2314         * lm32-tdep.c (lm32_extract_return_value): Likewise.
2315         (lm32_store_return_value): Likewise.
2316         * m32c-tdep.c (m32c_read_flg): Likewise.
2317         (m32c_pseudo_register_read): Likewise.
2318         (m32c_pseudo_register_write): Likewise.
2319         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2320         (m32r_linux_collect_gregset): Likewise.
2321         * m32r-tdep.c (m32r_store_return_value): Likewise.
2322         (m32r_extract_return_value): Likewise.
2323         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2324         (m68kbsd_collect_fpregset): Likewise.
2325         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2326         * m68k-linux-nat.c (fetch_register): Likewise.
2327         (old_fetch_inferior_registers): Likewise.
2328         (old_store_inferior_registers): Likewise.
2329         (store_regs): Likewise.
2330         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2331         (m68k_svr4_store_return_value): Likewise.
2332         * m88k-tdep.c (m88k_store_arguments): Likewise.
2333         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2334         (mi_cmd_data_write_register_values): Likewise.
2335         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2336         (mips_fbsd_store_inferior_registers): Likewise.
2337         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2338         (mips_fbsd_supply_gregs): Likewise.
2339         (mips_fbsd_collect_fpregs): Likewise.
2340         (mips_fbsd_collect_gregs): Likewise.
2341         (mips_fbsd_supply_fpregset): Likewise.
2342         (mips_fbsd_collect_fpregset): Likewise.
2343         (mips_fbsd_supply_gregset): Likewise.
2344         (mips_fbsd_collect_gregset): Likewise.
2345         * mips-linux-nat.c (supply_gregset): Likewise.
2346         (fill_gregset): Likewise.
2347         (supply_fpregset): Likewise.
2348         (fill_fpregset): Likewise.
2349         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2350         (mips_fill_gregset): Likewise.
2351         (mips_supply_fpregset): Likewise.
2352         (mips_fill_fpregset): Likewise.
2353         (mips64_supply_gregset): Likewise.
2354         (micromips_linux_sigframe_validate): Likewise.
2355         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2356         (mipsnbsd_fetch_inferior_registers): Likewise.
2357         (mipsnbsd_store_inferior_registers): Likewise.
2358         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2359         (mipsnbsd_supply_gregset): Likewise.
2360         (mipsnbsd_iterate_over_regset_sections): Likewise.
2361         (mipsnbsd_supply_reg): Likewise.
2362         (mipsnbsd_supply_fpreg): Likewise.
2363         * mips-tdep.c (mips_in_frame_stub): Likewise.
2364         (mips_dummy_id): Likewise.
2365         (is_octeon_bbit_op): Likewise.
2366         (micromips_bc1_pc): Likewise.
2367         (extended_mips16_next_pc): Likewise.
2368         (mips16_next_pc): Likewise.
2369         (deal_with_atomic_sequence): Likewise.
2370         * moxie-tdep.c (moxie_process_readu): Likewise.
2371         * nios2-tdep.c (nios2_get_next_pc): Likewise.
2372         * nto-procfs.c (procfs_store_registers): Likewise.
2373         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2374         (ppcfbsd_store_inferior_registers): Likewise.
2375         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2376         (fetch_altivec_register): Likewise.
2377         (get_spe_registers): Likewise.
2378         (fetch_spe_register): Likewise.
2379         (fetch_altivec_registers): Likewise.
2380         (fetch_all_gp_regs): Likewise.
2381         (fetch_all_fp_regs): Likewise.
2382         (store_vsx_register): Likewise.
2383         (store_altivec_register): Likewise.
2384         (set_spe_registers): Likewise.
2385         (store_spe_register): Likewise.
2386         (store_altivec_registers): Likewise.
2387         (store_all_gp_regs): Likewise.
2388         (store_all_fp_regs): Likewise.
2389         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2390         (ppc_linux_collect_gregset): Likewise.
2391         (ppc_canonicalize_syscall): Likewise.
2392         (ppc_linux_record_signal): Likewise.
2393         (ppu2spu_prev_register): Likewise.
2394         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2395         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2396         (ppcobsd_store_registers): Likewise.
2397         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2398         Likewise.
2399         (ppc_ravenscar_generic_store_registers): Likewise.
2400         * procfs.c (procfs_fetch_registers): Likewise.
2401         (procfs_store_registers): Likewise.
2402         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2403         (ravenscar_store_registers): Likewise.
2404         (ravenscar_prepare_to_store): Likewise.
2405         * record-btrace.c (record_btrace_fetch_registers): Likewise.
2406         * record-full.c (record_full_wait_1): Likewise.
2407         (record_full_registers_change): Likewise.
2408         (record_full_store_registers): Likewise.
2409         (record_full_core_fetch_registers): Likewise.
2410         (record_full_save): Likewise.
2411         (record_full_goto_insn): Likewise.
2412         * regcache.c (regcache_register_size): Likewise.
2413         (get_regcache_arch): Remove.
2414         (regcache_read_pc): Likewise.
2415         * regcache.h (get_regcache_arch): Remove.
2416         * remote-sim.c (gdbsim_fetch_register): Likewise.
2417         (gdbsim_store_register): Likewise.
2418         * remote.c (fetch_register_using_p): Likewise.
2419         (send_g_packet): Likewise.
2420         (remote_prepare_to_store): Likewise.
2421         (store_registers_using_G): Likewise.
2422         * reverse.c (save_bookmark_command): Likewise.
2423         (goto_bookmark_command): Likewise.
2424         * rs6000-aix-tdep.c (branch_dest): Likewise.
2425         * rs6000-nat.c (rs6000_ptrace64): Likewise.
2426         (fetch_register): Likewise.
2427         * rs6000-tdep.c (ppc_supply_reg): Likewise.
2428         (ppc_collect_reg): Likewise.
2429         (ppc_collect_gregset): Likewise.
2430         (ppc_collect_fpregset): Likewise.
2431         (ppc_collect_vsxregset): Likewise.
2432         (ppc_collect_vrregset): Likewise.
2433         (ppc_displaced_step_hw_singlestep): Likewise.
2434         (rs6000_pseudo_register_read): Likewise.
2435         (rs6000_pseudo_register_write): Likewise.
2436         * s390-linux-nat.c (supply_gregset): Likewise.
2437         (fill_gregset): Likewise.
2438         (s390_linux_fetch_inferior_registers): Likewise.
2439         * s390-linux-tdep.c (s390_write_pc): Likewise.
2440         (s390_software_single_step): Likewise.
2441         (s390_all_but_pc_registers_record): Likewise.
2442         (s390_linux_syscall_record): Likewise.
2443         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2444         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2445         (shnbsd_store_inferior_registers): Likewise.
2446         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2447         (sh_extract_return_value_fpu): Likewise.
2448         (sh_store_return_value_nofpu): Likewise.
2449         (sh_corefile_supply_regset): Likewise.
2450         (sh_corefile_collect_regset): Likewise.
2451         * sh64-tdep.c (sh64_extract_return_value): Likewise.
2452         (sh64_store_return_value): Likewise.
2453         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2454         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2455         (sparc_store_inferior_registers): Likewise.
2456         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2457         (sparc_ravenscar_prepare_to_store): Likewise.
2458         * sparc-tdep.c (sparc32_store_arguments): Likewise.
2459         (sparc_analyze_control_transfer): Likewise.
2460         (sparc_step_trap): Likewise.
2461         (sparc_software_single_step): Likewise.
2462         (sparc32_gdbarch_init): Likewise.
2463         (sparc_supply_rwindow): Likewise.
2464         (sparc_collect_rwindow): Likewise.
2465         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2466         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2467         (sparc64nbsd_collect_gregset): Likewise.
2468         (sparc64nbsd_supply_fpregset): Likewise.
2469         (sparc64nbsd_collect_fpregset): Likewise.
2470         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2471         (sparc64_supply_gregset): Likewise.
2472         (sparc64_collect_gregset): Likewise.
2473         (sparc64_supply_fpregset): Likewise.
2474         (sparc64_collect_fpregset): Likewise.
2475         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2476         * spu-tdep.c (spu_unwind_sp): Likewise.
2477         (spu2ppu_prev_register): Likewise.
2478         (spu_memory_remove_breakpoint): Likewise.
2479         * stack.c (return_command): Likewise.
2480         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2481         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2482         * tracefile.c (trace_save_ctf): Likewise.
2483         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2484         (do_windows_store_inferior_registers): Likewise.
2485         (windows_resume): Likewise.
2486         * xtensa-linux-nat.c (fill_gregset): Likewise.
2487         (supply_gregset_reg): Likewise.
2488         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2489         (xtensa_register_read_masked): Likewise.
2490         (xtensa_supply_gregset): Likewise.
2491         (xtensa_extract_return_value): Likewise.
2492         (xtensa_store_return_value): Likewise.
2493
2494 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2495
2496         * doublest.c (floatformat_from_string): New function.
2497         * doublest.h (floatformat_from_string): Add prototype.
2498
2499         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2500         (OP_FLOAT): ... this.
2501         * expression.h: Do not include "doublest.h".
2502         (union exp_element): Replace doubleconst and decfloatconst by
2503         new element floatconst.
2504         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2505         (ada_evaluate_subexp): Likewise.
2506         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2507         OP_DOUBLE and OP_DECFLOAT.
2508         * expprint.c (print_subexp_standard): Likewise.
2509         (dump_subexp_body_standard): Likewise.
2510         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2511
2512         * parse.c: Include "dfp.h".
2513         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2514         (write_exp_elt_floatcst): New function.
2515         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2516         and OP_DECFLOAT.
2517         (operator_check_standard): Likewise.
2518         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2519         Return target format buffer instead of host DOUBLEST.
2520         Use floatformat_from_string and decimal_from_string to parse
2521         either binary or decimal floating-point types.
2522         (parse_c_float): Remove.
2523         * parser-defs.h: Do not include "doublest.h".
2524         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2525         (write_exp_elt_floatcst): Add prototype.
2526         (parse_float): Update prototype.
2527         (parse_c_float): Remove.
2528
2529         * c-exp.y: Do not include "dfp.h".
2530         (typed_val_float): Use byte buffer instead of DOUBLEST.
2531         (typed_val_decfloat): Remove.
2532         (DECFLOAT): Remove.
2533         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2534         (parse_number): Update to new parse_float interface.
2535         Parse suffixes and determine type before calling parse_float.
2536         Handle decimal and binary FP types the same way.
2537
2538         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2539         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2540         (parse_number): Update to new parse_float interface.
2541         Parse suffixes and determine type before calling parse_float.
2542
2543         * f-exp.y: Replace dval by typed_val_float.
2544         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2545         (parse_number): Use parse_float instead of atof.
2546
2547         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2548         (parse_go_float): Remove.
2549         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2550         (parse_number): Call parse_float instead of parse_go_float.
2551         Parse suffixes and determine type before calling parse_float.
2552
2553         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2554         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2555         (parse_number): Update to new parse_float interface.
2556         Parse suffixes and determine type before calling parse_float.
2557
2558         * m2-exp.y: Replace dval by byte buffer val.
2559         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2560         (parse_number): Call parse_float instead of atof.
2561
2562         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2563         (lex_number): Call parse_float instead of strtod.
2564         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2565         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2566         Use write_exp_elt_floatcst.
2567         (unit_testing): Remove static variable.
2568         (rust_type): Do not check unit_testing.
2569         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2570
2571         * ada-exp.y (type_float, type_double): Remove.
2572         (typed_val_float): Use byte buffer instead of DOUBLEST.
2573         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2574         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2575
2576 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2577
2578         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2579         * arch/aarch64.h: New file.
2580
2581 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2582
2583         * dfp.h (decimal_from_string): Use const reference for argument.
2584         * dfp.c (decimal_from_string): Likewise.
2585
2586 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2587
2588         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2589         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2590         * mips-tdep.c (mips_print_fp_register): Likewise.
2591
2592 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2593
2594         * common/format.h (enum argclass): Replace decfloat_arg by
2595         dec32float_arg, dec64float_arg, and dec128float_arg.
2596         * common/format.c (parse_format_string): Update to return
2597         new decimal float argument classes.
2598
2599         * printcmd.c (printf_decfloat): Rename to ...
2600         (printf_floating): ... this.  Add argclass argument, and use it
2601         instead of parsing the format string again.  Add support for
2602         binary floating-point values, using floatformat_to_string.
2603         Convert value to the target format if it doesn't already match.
2604         (ui_printf): Call printf_floating instead of printf_decfloat,
2605         also for double_arg / long_double_arg.  Pass argclass.
2606
2607         * dfp.c (decimal_to_string): Add format string argument.
2608         * dfp.h (decimal_to_string): Likewise.
2609
2610         * doublest.c (floatformat_to_string): Add format string argument.
2611         * doublest.h (floatformat_to_string): Likewise.
2612
2613 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2614
2615         * doublest.c (floatformat_precision): New routine.
2616         (floatformat_to_string): Likewise.
2617         * doublest.c (floatformat_to_string): Add prototype.
2618
2619         * printcmd.c (print_scalar_formatted): Only call print_floating
2620         on floating-point types.
2621         * valprint.c: Do not include "floatformat.h".
2622         (generic_val_print_decfloat): Remove.
2623         (generic_val_print): Call generic_val_print_float for both
2624         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2625         (print_floating): Use floatformat_to_string.  Handle decimal float.
2626         (print_decimal_floating): Remove, merge into floatformat_to_string.
2627         * value.h (print_decimal_floating): Remove.
2628
2629         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2630
2631 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2632
2633         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2634
2635 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2636
2637         * memattr.h: Don't include vec.h.
2638         (struct mem_attrib): Initialize fields.
2639         <unknown>: New static method.
2640         (struct mem_region): Add constructors, operator<, initialize
2641         fields.
2642         * memattr.c: Include algorithm.
2643         (default_mem_attrib, unknown_mem_attrib): Remove.
2644         (user_mem_region_list): New global.
2645         (target_mem_region_list, mem_region_list): Change type to
2646         std::vector<mem_region>.
2647         (mem_use_target): Now a function.
2648         (target_mem_regions_valid): Change type to bool.
2649         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2650         (require_user_regions): Adjust.
2651         (require_target_regions): Adjust.
2652         (create_mem_region): Adjust.
2653         (lookup_mem_region): Adjust.
2654         (invalidate_target_mem_regions): Adjust.
2655         (mem_clear): Rename to...
2656         (user_mem_clear): ... this, and adjust.
2657         (mem_command): Adjust.
2658         (info_mem_command): Adjust.
2659         (mem_enable, enable_mem_command, mem_disable,
2660         disable_mem_command): Adjust.
2661         (mem_delete): Adjust.
2662         (delete_mem_command): Adjust.
2663         * memory-map.h (parse_memory_map): Return an std::vector.
2664         * memory-map.c (parse_memory_map): Likewise.
2665         (struct memory_map_parsing_data): Add constructor.
2666         <memory_map>: Point to std::vector.
2667         (memory_map_start_memory): Adjust.
2668         (memory_map_end_memory): Adjust.
2669         (memory_map_end_property): Adjust.
2670         (clear_result): Remove.
2671         * remote.c (remote_memory_map): Return an std::vector.
2672         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2673         Remove.
2674         (target_debug_print_mem_region_vector): New.
2675         * target-delegates.c: Regenerate.
2676         * target.h (mem_region_vector): New typedef.
2677         (to_memory_map): Return mem_region_vector.
2678         (target_memory_map): Return an std::vector.
2679         * target.c (target_memory_map): Return an std::vector.
2680         (flash_erase_command): Adjust.
2681
2682 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2683
2684         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2685         Change type to std::string.
2686         (memory_map_start_property): Adjust.
2687         (memory_map_end_property): Adjust.
2688
2689 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2690
2691         * infrun.h: Include common/byte-vector.h.
2692         (struct displaced_step_closure): New struct.
2693         (struct buf_displaced_step_closure): New struct.
2694         * infrun.c (displaced_step_closure::~displaced_step_closure):
2695         Provide default implementation.
2696         (displaced_step_clear): Deallocate step closure with delete.
2697         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2698         (aarch64_displaced_step_closure): ... this, extend
2699         displaced_step_closure.
2700         (aarch64_displaced_step_data) <dsc>: Change type to
2701         aarch64_displaced_step_closure.
2702         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2703         unique_ptr.
2704         (aarch64_displaced_step_fixup): Add cast for displaced step
2705         closure.
2706         * amd64-tdep.c (displaced_step_closure): Rename to ...
2707         (amd64_displaced_step_closure): ... this, extend
2708         displaced_step_closure.
2709         <insn_buf>: Change type to std::vector<gdb_byte>.
2710         <max_len>: Remove.
2711         (fixup_riprel): Change type of DSC parameter, adjust to type
2712         change of insn_buf.
2713         (fixup_displaced_copy): Change type of DSC parameter.
2714         (amd64_displaced_step_copy_insn): Instantiate
2715         amd64_displaced_step_closure.
2716         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2717         to type change of insn_buf.
2718         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2719         parameter DSC.
2720         (arm_linux_copy_svc): Likewise.
2721         (cleanup_kernel_helper_return): Likewise.
2722         (arm_catch_kernel_helper_return): Likewise.
2723         (arm_linux_displaced_step_copy_insn): Instantiate
2724         arm_displaced_step_closure.
2725         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2726         (displaced_read_reg): Change type of parameter DSC.
2727         (branch_write_pc): Likewise.
2728         (load_write_pc): Likewise.
2729         (alu_write_pc): Likewise.
2730         (displaced_write_reg): Likewise.
2731         (arm_copy_unmodified): Likewise.
2732         (thumb_copy_unmodified_32bit): Likewise.
2733         (thumb_copy_unmodified_16bit): Likewise.
2734         (cleanup_preload): Likewise.
2735         (install_preload): Likewise.
2736         (arm_copy_preload): Likewise.
2737         (thumb2_copy_preload): Likewise.
2738         (install_preload_reg): Likewise.
2739         (arm_copy_preload_reg): Likewise.
2740         (cleanup_copro_load_store): Likewise.
2741         (install_copro_load_store): Likewise.
2742         (arm_copy_copro_load_store) Likewise.
2743         (thumb2_copy_copro_load_store): Likewise.
2744         (cleanup_branch): Likewise.
2745         (install_b_bl_blx): Likewise.
2746         (arm_copy_b_bl_blx): Likewise.
2747         (thumb2_copy_b_bl_blx): Likewise.
2748         (thumb_copy_b): Likewise.
2749         (install_bx_blx_reg): Likewise.
2750         (arm_copy_bx_blx_reg): Likewise.
2751         (thumb_copy_bx_blx_reg): Likewise.
2752         (cleanup_alu_imm): Likewise.
2753         (arm_copy_alu_imm): Likewise.
2754         (thumb2_copy_alu_imm): Likewise.
2755         (cleanup_alu_reg): Likewise.
2756         (install_alu_reg): Likewise.
2757         (arm_copy_alu_reg): Likewise.
2758         (thumb_copy_alu_reg): Likewise.
2759         (cleanup_alu_shifted_reg): Likewise.
2760         (install_alu_shifted_reg): Likewise.
2761         (arm_copy_alu_shifted_reg): Likewise.
2762         (cleanup_load): Likewise.
2763         (cleanup_store): Likewise.
2764         (arm_copy_extra_ld_st): Likewise.
2765         (install_load_store): Likewise.
2766         (thumb2_copy_load_literal): Likewise.
2767         (thumb2_copy_load_reg_imm): Likewise.
2768         (arm_copy_ldr_str_ldrb_strb): Likewise.
2769         (cleanup_block_load_all): Likewise.
2770         (cleanup_block_store_pc): Likewise.
2771         (cleanup_block_load_pc): Likewise.
2772         (arm_copy_block_xfer): Likewise.
2773         (thumb2_copy_block_xfer): Likewise.
2774         (cleanup_svc): Likewise.
2775         (install_svc): Likewise.
2776         (arm_copy_svc): Likewise.
2777         (thumb_copy_svc): Likewise.
2778         (arm_copy_undef): Likewise.
2779         (thumb_32bit_copy_undef): Likewise.
2780         (arm_copy_unpred): Likewise.
2781         (arm_decode_misc_memhint_neon): Likewise.
2782         (arm_decode_unconditional): Likewise.
2783         (arm_decode_miscellaneous): Likewise.
2784         (arm_decode_dp_misc): Likewise.
2785         (arm_decode_ld_st_word_ubyte): Likewise.
2786         (arm_decode_media): Likewise.
2787         (arm_decode_b_bl_ldmstm): Likewise.
2788         (arm_decode_ext_reg_ld_st): Likewise.
2789         (thumb2_decode_dp_shift_reg): Likewise.
2790         (thumb2_decode_ext_reg_ld_st): Likewise.
2791         (arm_decode_svc_copro): Likewise.
2792         (thumb2_decode_svc_copro): Likewise.
2793         (install_pc_relative): Likewise.
2794         (thumb_copy_pc_relative_16bit): Likewise.
2795         (thumb_decode_pc_relative_16bit): Likewise.
2796         (thumb_copy_pc_relative_32bit): Likewise.
2797         (thumb_copy_16bit_ldr_literal): Likewise.
2798         (thumb_copy_cbnz_cbz): Likewise.
2799         (thumb2_copy_table_branch): Likewise.
2800         (cleanup_pop_pc_16bit_all): Likewise.
2801         (thumb_copy_pop_pc_16bit): Likewise.
2802         (thumb_process_displaced_16bit_insn): Likewise.
2803         (decode_thumb_32bit_ld_mem_hints): Likewise.
2804         (thumb_process_displaced_32bit_insn): Likewise.
2805         (thumb_process_displaced_insn): Likewise.
2806         (arm_process_displaced_insn): Likewise.
2807         (arm_displaced_init_closure): Likewise.
2808         (arm_displaced_step_fixup): Add cast for closure.
2809         * arm-tdep.h: Include infrun.h.
2810         (displaced_step_closure): Rename to ...
2811         (arm_displaced_step_closure): ... this, extend
2812         displaced_step_closure.
2813         <u::svc::copy_svc_os>: Change type of parameter DSC.
2814         <cleanup>: Likewise.
2815         (arm_process_displaced_insn): Likewise.
2816         (arm_displaced_init_closure): Likewise.
2817         (displaced_read_reg): Likewise.
2818         (displaced_write_reg): Likewise.
2819         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2820         Adjust.
2821         * i386-tdep.h: Include infrun.h.
2822         (i386_displaced_step_closure): New typedef.
2823         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2824         i386_displaced_step_closure.
2825         (i386_displaced_step_fixup): Adjust.
2826         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2827         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2828         and unique_ptr.
2829         (ppc_displaced_step_fixup): Adjust.
2830         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2831         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2832         and unique_ptr.
2833         (s390_displaced_step_fixup): Adjust.
2834
2835 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2836
2837         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2838         Remove declarations.
2839
2840 2017-10-20  Tom Tromey  <tom@tromey.com>
2841
2842         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2843         std::vector.
2844         (gdb_bfd_record_inclusion): Update.
2845         (bfdp): Remove typedef.
2846
2847 2017-10-20  Tom Tromey  <tom@tromey.com>
2848
2849         * gdb_bfd.c (gdb_bfd_ref): Use new.
2850         (struct gdb_bfd_data): Add constructor, destructor, and member
2851         initializers.
2852         (gdb_bfd_unref): Use delete.
2853
2854 2017-10-20  Tom Tromey  <tom@tromey.com>
2855
2856         * exec.c (exec_file_attach): Use new_bfd_ref.
2857         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2858         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2859         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2860         new_bfd_ref.
2861         * gdb_bfd.h (new_bfd_ref): New function.
2862
2863 2017-10-20  Pedro Alves  <palves@redhat.com>
2864
2865         * main.c (captured_command_loop): Add attribute noinline.
2866
2867 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2868
2869         * interps.c (struct interp_factory): Add constructor.
2870         (interp_factory_p): Remove typedef.
2871         (DEF_VEC_P(interp_factory_p)): Remove.
2872         (interpreter_factories): Change type to std::vector.
2873         (interp_factory_register): Adjust.
2874         (interp_lookup): Adjust.
2875         (interpreter_completer): Adjust.
2876
2877 2017-10-19  Tom Tromey  <tom@tromey.com>
2878
2879         * break-catch-syscall.c (catch_syscall_completer): Use
2880         std::string, gdb::unique_xmalloc_ptr.
2881
2882 2017-10-19  Tom Tromey  <tom@tromey.com>
2883
2884         * infcall.c (call_function_by_hand_dummy): Use std::string.
2885
2886 2017-10-19  Tom Tromey  <tom@tromey.com>
2887
2888         * mi/mi-main.c (mi_cmd_execute): Update.
2889         * top.h (prepare_execute_command): Return scoped_value_mark.
2890         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2891         Add move constructor.
2892         * top.c (prepare_execute_command): Return scoped_value_mark.
2893         (execute_command): Update.
2894
2895 2017-10-19  Pedro Alves  <palves@redhat.com>
2896
2897         * xml-support.c (xml_fetch_content_from_file): Check fread's
2898         return.
2899
2900 2017-10-19  Pedro Alves  <palves@redhat.com>
2901
2902         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2903         async.
2904         (handle_error_fd): New function.
2905         (ser_base_async): Add/delete an event loop file handler for
2906         error_fd.
2907
2908 2017-10-19  Pedro Alves  <palves@redhat.com>
2909
2910         * xml-support.c (xml_fetch_content_from_file): Don't read in
2911         chunks.  Instead use fseek to determine the file's size, and read
2912         it in one go.
2913
2914 2017-11-18  Keith Seitz  <keiths@redhat.com>
2915
2916         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2917         types.
2918         Add whitespace to front of type name.
2919
2920 2017-10-18  Keith Seitz  <keiths@redhat.com>
2921
2922         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2923         DW_AT_accessibility.
2924
2925 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2926
2927         * features/tic6x-c62x-linux.c: Remove.
2928
2929 2017-10-17  Tom Tromey  <tom@tromey.com>
2930
2931         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2932         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2933         (do_mixed_source_and_assembly): Likewise.
2934
2935 2017-10-17  Tom Tromey  <tom@tromey.com>
2936
2937         * regcache.c (regcache::xfer_part): Remove assertion.
2938
2939 2017-10-17  Pedro Alves  <palves@redhat.com>
2940
2941         * xml-support.c (xml_fetch_content_from_file): Call
2942         unique_ptr::release() instead unique_ptr::get() when passing
2943         through xrealloc.
2944
2945 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2946
2947         * regcache.c (regcache::xfer_part): Remove parameters read and
2948         write, add parameter is_raw.  All callers are updated.
2949
2950 2017-10-16  Keith Seitz  <keiths@redhat.com>
2951
2952         * c-typeprint.c (enum access_specifier): Moved here from
2953         c_type_print_base.
2954         (output_access_specifier): New function.
2955         (c_type_print_base): Consider typedefs when assessing
2956         whether access labels are needed.
2957         Use output_access_specifier as needed.
2958         Output access specifier for typedefs, if needed.
2959         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2960         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2961         fields.
2962         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2963         accessor macros.
2964
2965 2017-10-16  Tom Tromey  <tom@tromey.com>
2966
2967         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2968         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2969         * target.c (target_fileio_read_stralloc): Update.
2970         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2971         * target.h (target_fileio_read_stralloc): Return
2972         unique_xmalloc_ptr.
2973
2974 2017-10-16  Tom Tromey  <tom@tromey.com>
2975
2976         * xml-syscall.c (xml_init_syscalls_info): Update.
2977         * xml-support.c (xinclude_start_include): Update.
2978         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2979         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2980         (xml_fetch_content_from_file): Likewise.
2981         * osdata.c (get_osdata): Update.
2982         * target.h (target_read_stralloc, target_get_osdata): Return
2983         unique_xmalloc_ptr.
2984         * solib-aix.c (solib_aix_get_library_list): Update.
2985         * solib-target.c (solib_target_current_sos): Update.
2986         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2987         * xml-tdesc.c (fetch_available_features_from_target): Update.
2988         (target_fetch_description_xml): Update.
2989         (file_read_description_xml): Update.
2990         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2991         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2992         (remote_pid_to_exec_file): Update.
2993         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2994         (target_get_osdata): Likewise.
2995
2996 2017-10-16  Tom Tromey  <tom@tromey.com>
2997
2998         * remote.c (remote_register_number_and_offset): Use std::vector.
2999         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3000         (putpkt_binary): Use gdb::def_vector.
3001         (compare_sections_command): Use gdb::byte_vector.
3002
3003 2017-10-16  Tom Tromey  <tom@tromey.com>
3004
3005         * ppc-linux-nat.c (hwdebug_insert_point): Use
3006         gdb::unique_xmalloc_ptr, XDUP.
3007
3008 2017-10-16  Tom Tromey  <tom@tromey.com>
3009
3010         * probe.c (parse_probes): Use std::string.
3011         (info_probes_for_ops, enable_probes_command)
3012         (disable_probes_command): Remove cleanups.
3013
3014 2017-10-16  Tom Tromey  <tom@tromey.com>
3015
3016         * buildsym.c (block_compar): Remove.
3017         (end_symtab_get_static_block): Use std::vector.
3018
3019 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
3020
3021         * memrange.h (struct mem_range): Define operator< and operator==.
3022         (mem_range_s): Remove.
3023         (DEF_VEC_O (mem_range_s)): Remove.
3024         (normalize_mem_ranges): Change parameter type to std::vector.
3025         * memrange.c (compare_mem_ranges): Remove.
3026         (normalize_mem_ranges): Change parameter type to std::vector,
3027         adjust to vector change.
3028         * exec.c (section_table_available_memory): Return vector, remove
3029         parameter.
3030         (section_table_read_available_memory): Adjust to std::vector
3031         change.
3032         * remote.c (remote_read_bytes): Adjust to std::vector
3033         change.
3034         * tracepoint.h (traceframe_available_memory): Change parameter
3035         type to std::vector.
3036         * tracepoint.c (traceframe_available_memory): Change parameter
3037         type to std::vector, adjust.
3038         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3039         std::vector change.
3040         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3041         unittests/memrange-selftests.c.
3042         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3043         * gdb/unittests/memrange-selftests.c: New file.
3044
3045 2017-10-16  Pedro Alves  <palves@redhat.com>
3046
3047         * elfread.c (probe_key_free): Rename range-for variable.
3048         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3049         (find_probe_by_pc, collect_probes): Rename range-for variable.
3050
3051 2017-10-16  Yao Qi  <yao.qi@linaro.org>
3052
3053         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3054         * features/tic6x-c62x.c: Remove.
3055         * features/tic6x-c64x-linux.c: Remove.
3056         * features/tic6x-c64x.c: Remove.
3057         * features/tic6x-c64xp-linux.c: Remove.
3058         * features/tic6x-c64xp.c: Remove.
3059         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3060         initialize_tdesc_tic6x_*_linux functions.
3061         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3062         initialize_tdesc_tic6x_* functions.
3063
3064 2017-10-16  Yao Qi  <yao.qi@linaro.org>
3065
3066         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3067         tic6x-c62x.
3068         * regformats/tic6x-c62x.dat: Remove.
3069         * regformats/tic6x-c64x.dat: Remove.
3070         * regformats/tic6x-c64xp.dat: Remove.
3071
3072 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
3073
3074         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3075         (the !HAVE_LIBEXPAT version).
3076
3077 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3078
3079         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3080         const.
3081
3082 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3083
3084         * target.h: Include tracepoint.h.
3085         (enum trace_find_type): Move to tracepoint.h.
3086         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3087         * tracepoint.h: Don't include target.h
3088         (enum trace_find_type): Move from target.h.
3089         (parse_traceframe_info): Return a unique ptr.
3090         * tracepoint.c (current_traceframe_info): Change type to unique
3091         ptr.
3092         (free_traceframe_info): Remove.
3093         (clear_traceframe_info): Don't manually free
3094         current_traceframe_info.
3095         (free_result): Remove.
3096         (parse_traceframe_info): Return a unique ptr.
3097         (get_traceframe_info): Adjust to unique ptr.
3098         * ctf.c (ctf_traceframe_info): Return a unique ptr.
3099         * remote.c (remote_traceframe_info): Return a unique ptr.
3100         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3101         ptr.
3102         * target-debug.h (target_debug_print_traceframe_info_up): New
3103         macro.
3104         * target-delegates.c: Regenerate.
3105
3106 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3107
3108         * memrange.h (struct mem_range): Add constructors.
3109         * tracepoint.h (struct traceframe_info) <memory>: Change type to
3110         std::vector<mem_range>.
3111         * tracepoint.c (free_traceframe_info): Don't manually free
3112         vector.
3113         (traceframe_info_start_memory): Adjust to vector change.
3114         (traceframe_available_memory): Likewise.
3115         * tracefile-tfile.c (build_traceframe_info): Likewise.
3116         * ctf.c (ctf_traceframe_info): Likewise.
3117
3118 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3119
3120         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3121         std::vector<int>.
3122         * tracepoint.c (free_traceframe_info): Deallocate with delete.
3123         (traceframe_info_start_tvar): Adjust to vector change.
3124         (parse_traceframe_info): Allocate with new.
3125         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3126         vector change.
3127         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3128         change.
3129         tfile_traceframe_info): Allocate with new.
3130         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3131         change.
3132
3133 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3134
3135         * tracepoint.c (traceframe_info): Rename to...
3136         (current_traceframe_info): ...this.
3137         (clear_traceframe_info): Adjust.
3138         (get_traceframe_info): Adjust.
3139
3140 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3141
3142         * nat/linux-osdata.c: Include algorithm.
3143         (compare_processes): Remove.
3144         (struct pid_pgid_entry): New struct.
3145         (linux_xfer_osdata_processgroups): Use std::vector instead of
3146         XNEWVEC.
3147
3148 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3149
3150         * objfiles.h: Don't include symfile.h.
3151         (struct partial_symbol): Remove forward-declaration.
3152         (struct objfile) <global_psymbols, static_psymbols>: Change type
3153         to std::vector<partial_symbol *>.
3154         * objfiles.c (objfile::objfile): Don't memset those fields.
3155         (objfile::~objfile): Don't free those fields.
3156         * psympriv.h (struct psymbol_allocation_list): Remove
3157         forward-declaration.
3158         (add_psymbol_to_list): Change psymbol_allocation_list parameter
3159         to std::vector.
3160         (start_psymtab_common): Change parameters to std::vector.
3161         * psymtab.c: Include algorithm.
3162         (require_partial_symbols): Call shrink_to_fit.
3163         (find_pc_sect_psymbol): Adjust to vector change.
3164         (match_partial_symbol): Likewise.
3165         (lookup_partial_symbol): Likewise.
3166         (psym_relocate): Likewise.
3167         (dump_psymtab): Likewise.
3168         (recursively_search_psymtabs): Likewise.
3169         (compare_psymbols): Remove.
3170         (sort_pst_symbols): Adjust to vector change.
3171         (start_psymtab_common): Likewise.
3172         (end_psymtab_common): Likewise.
3173         (psymbol_bcache_full): De-constify return value.
3174         (add_psymbol_to_bcache): Likewise.
3175         (extend_psymbol_list): Remove.
3176         (append_psymbol_to_list): Adjust to vector change.
3177         (add_psymbol_to_list): Likewise.
3178         (init_psymbol_list): Likewise.
3179         (maintenance_info_psymtabs): Likewise.
3180         (maintenance_check_psymtabs): Likewise.
3181         * symfile.h (struct psymbol_allocation_list): Remove.
3182         * symfile.c (reread_symbols): Adjust to vector change.
3183         * dbxread.c (start_psymtab): Change type of parameters.
3184         (dbx_symfile_read): Adjust to vector change.
3185         (read_dbx_symtab): Likewise.
3186         (start_psymtab): Change type of parameters.
3187         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3188         (create_partial_symtab): Likewise.
3189         (add_partial_symbol): Likewise.
3190         (write_one_signatured_type): Likewise.
3191         (recursively_write_psymbols): Likewise.
3192         * mdebugread.c (parse_partial_symbols): Likewise.
3193         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3194         (scan_xcoff_symtab): Adjust to vector change.
3195         (xcoff_initial_scan): Likewise.
3196
3197 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
3198
3199         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3200
3201 2017-10-13  Yao Qi  <yao.qi@linaro.org>
3202
3203         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3204         Remove s390x-*-expedite, add s390x-expedite.
3205
3206 2017-10-13  Yao Qi  <yao.qi@linaro.org>
3207
3208         * features/s390-gs-linux64.c: Regenerated.
3209         * features/s390x-gs-linux64.c: Regenerated.
3210
3211 2017-10-13  Tom Tromey  <tom@tromey.com>
3212
3213         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3214         * solib.c (update_solib_list, reload_shared_libraries_1): Use
3215         delete.
3216         * symfile.c (symbol_file_add_with_addrs): Use new.
3217         (symbol_file_add_separate): Update comment.
3218         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3219         * jit.c (jit_object_close_impl): Use new.
3220         (jit_unregister_code): Use delete.
3221         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3222         (~objfile): Rename from free_objfile.
3223         (free_objfile_separate_debug, do_free_objfile_cleanup)
3224         (free_all_objfiles, objfile_purge_solibs): Use delete.
3225         * objfiles.h (struct objfile): Add constructor and destructor.
3226         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
3227         (allocate_objfile, free_objfile): Don't declare.
3228         (struct objstats): Add initializers.
3229
3230 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3231
3232         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3233         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3234         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3235         * gdbarch.h: Regenerate.
3236         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3237         Adjust comment.
3238         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3239         (i386_displaced_step_fixup): Adjust comment.
3240         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3241
3242 2017-10-12  Tom Tromey  <tom@tromey.com>
3243
3244         * prologue-value.h (pv_area::store_would_trash): Return bool.
3245         (pv_area::find_reg): Likewise.
3246         * prologue-value.c (pv_area::store_would_trash): Return bool.
3247         (pv_area::find_reg): Likewise.
3248
3249 2017-10-12  Tom Tromey  <tom@tromey.com>
3250
3251         * s390-linux-tdep.c (s390_store, s390_load)
3252         (s390_check_for_saved, s390_analyze_prologue): Update.
3253         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3254         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3255         * prologue-value.h (class pv_area): Move from prologue-value.c.
3256         Change names of members.  Add constructor, destructor, member
3257         functions.
3258         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3259         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3260         (pv_area_fetch, pv_area_scan): Don't declare.
3261         * prologue-value.c (struct pv_area::area_entry): Now member of
3262         pv_area.
3263         (struct pv_area): Move to prologue-value.h.
3264         (pv_area::pv_area): Rename from make_pv_area.
3265         (pv_area::~pv_area): Rename from free_pv_area.
3266         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3267         (clear_entries, find_entry, overlaps, store_would_trash, store)
3268         (fetch, find_reg, scan): Now member of pv_area.
3269         Remove "area" argument.  Update.
3270         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3271         Update.
3272         * mn10300-tdep.c (push_reg, check_for_saved)
3273         (mn10300_analyze_prologue): Update.
3274         * mep-tdep.c (is_arg_spill, check_for_saved)
3275         (mep_analyze_prologue): Update.
3276         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3277         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3278         (m32c_is_struct_return, m32c_analyze_prologue): Update.
3279         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3280         Update.
3281         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3282         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3283
3284 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3285
3286         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3287         * linux-nat.c (linux_nat_delete_thread): New variable.
3288         (lwp_free): Invoke linux_nat_delete_thread if set.
3289         (linux_nat_set_delete_thread): New function.
3290         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3291         thread delete callback.
3292         * arm-linux-nat.c (arm_linux_delete_thread): New function.
3293         (_initialize_arm_linux_nat): Assign thread delete callback.
3294         * s390-linux-nat.c (s390_delete_thread): New function.
3295         (_initialize_s390_nat): Assign thread delete callback.
3296         * x86-linux-nat.c (x86_linux_add_target): Likewise.
3297         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3298         function.
3299         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3300         declaration.
3301         * nat/x86-linux.c (x86_linux_delete_thread): New function.
3302         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3303
3304 2017-10-09  Tom Tromey  <tom@tromey.com>
3305
3306         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3307         std::string.
3308         * tui/tui-layout.c (enum tui_status): Use std::string.
3309
3310 2017-10-11  Tom Tromey  <tom@tromey.com>
3311
3312         * gdbthread.h (thread_command): Constify.
3313         * inferior.h (detach_command): Constify.
3314         * top.h (set_history, show_history): Constify.
3315         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3316         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3317         * bsd-kvm.c (bsd_kvm_cmd): Constify.
3318         * printcmd.c (set_command): Constify.
3319         (non_const_set_command): New function.
3320         * dcache.c (set_dcache_command, show_dcache_command): Constify.
3321         * breakpoint.c (enable_command, disable_command, delete_command)
3322         (catch_command, tcatch_command, set_breakpoint_cmd)
3323         (show_breakpoint_cmd): Constify.
3324         * macrocmd.c (macro_command): Constify.
3325         * infcmd.c (unset_command, kill_command, detach_command)
3326         (info_proc_cmd): Constify.
3327         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3328         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3329         (info_auto_load_cmd): Constify.
3330         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3331         (unset_tdesc_cmd): Constify.
3332         * ada-lang.c (set_ada_command, show_ada_command)
3333         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3334         * guile/guile.c (set_guile_command, show_guile_command)
3335         (info_guile_command): Constify.
3336         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3337         Constify.
3338         * skip.c (skip_command): Constify.
3339         * compile/compile.c (_initialize_compile): Constify.
3340         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3341         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3342         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3343         (maint_btrace_pt_show_cmd): Constify.
3344         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3345         Constify.
3346         * python/python.c (user_show_python, user_set_python): Constify.
3347         * mips-tdep.c (set_mips_command, show_mips_command)
3348         (set_mipsfpu_command): Constify.
3349         * record-btrace.c (cmd_record_btrace_start)
3350         (cmd_set_record_btrace, cmd_show_record_btrace)
3351         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3352         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3353         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3354         Constify.
3355         * symfile.c (overlay_command): Constify.
3356         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3357         * cli/cli-logging.c (set_logging_command, show_logging_command):
3358         Constify.
3359         * cli/cli-dump.c (dump_command, append_command)
3360         (srec_dump_command, ihex_dump_command, verilog_dump_command)
3361         (tekhex_dump_command, binary_dump_command)
3362         (binary_append_command): Constify.
3363         * cli/cli-decode.c (struct cmd_list_element): Change type of
3364         "fun".
3365         * cli/cli-cmds.c (info_command, show_command, set_debug)
3366         (show_debug): Constify.
3367         (show_command): Add non-const overload.
3368         * top.c (set_history, show_history): Constify.
3369         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3370         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3371         * target.c (target_command): Constify.
3372         * sparc64-tdep.c (info_adi_command): Constify.
3373         * record-full.c (cmd_record_full_start): Constify.
3374         (set_record_full_command): Constify.  Fix typo.
3375         (show_record_full_command): Constify.
3376         * thread.c (thread_command, thread_apply_command): Constify.
3377         * memattr.c (dummy_cmd): Constify.
3378         * value.c (function_command): Constify.
3379         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3380         * probe.c (info_probes_command): Constify.
3381         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3382         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3383         (show_thread_cmd, set_thread_default_cmd)
3384         (show_thread_default_cmd): Constify.
3385         (check_empty): Constify.
3386         * tracepoint.c (tfind_command): Constify.
3387         * cp-support.c (maint_cplus_command): Constify.
3388         * windows-tdep.c (info_w32_command): Constify.
3389         * record.c (cmd_record_start, set_record_command)
3390         (show_record_command, info_record_command, cmd_record_goto):
3391         Constify.
3392         * ravenscar-thread.c (set_ravenscar_command)
3393         (show_ravenscar_command): Constify.
3394         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3395         Constify.
3396         (add_internal_problem_command): Remove casts.
3397         * arc-tdep.c (maintenance_print_arc_command): Constify.
3398         * valprint.c (set_print, show_print, set_print_raw)
3399         (show_print_raw): Constify.
3400         * maint.c (maintenance_command, maintenance_info_command)
3401         (maintenance_print_command, maintenance_set_cmd)
3402         (maintenance_show_cmd, set_per_command_cmd)
3403         (show_per_command_cmd, maintenance_check_command): Constify.
3404         * language.c (set_check, show_check): Constify.
3405         * typeprint.c (show_print_type, set_print_type): Constify.
3406         * go32-nat.c (go32_info_dos_command): Constify.
3407
3408 2017-10-11  Tom Tromey  <tom@tromey.com>
3409
3410         * breakpoint.c (prepare_re_set_context): Remove.
3411         (breakpoint_re_set_one): Update.  Don't use cleanups.
3412         (breakpoint_re_set): Use scoped_restore, std::string, and
3413         scoped_restore_current_language.
3414
3415 2017-10-11  Tom Tromey  <tom@tromey.com>
3416
3417         * breakpoint.c (commands_command_1): Use std::string.
3418         (cleanup_executing_breakpoints): Remove.
3419         (bpstat_do_actions_1): Use scoped_restore.
3420         (bpstat_check_watchpoint): Use std::string.
3421         (decode_static_tracepoint_spec): Likewise.
3422         (break_range_command): Likewise.
3423         (watch_command_1): Likewise.
3424         (compare_breakpoints): Change argument types.
3425         (clear_command): Use std::vector.
3426         (cleanup_executing_breakpoints): Remove.
3427         (update_global_location_list): Use unique_xmalloc_ptr.
3428         (strace_command): Remove unused declaration.
3429
3430 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3431
3432         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3433         * NEWS: Mention new FreeBSD/arm native configuration.
3434         * configure.host: Add arm*-*-freebsd*.
3435         * configure.nat: Likewise.
3436         * arm-fbsd-nat.c: New file.
3437
3438 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3439
3440         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3441         (ALLDEPFILES): Add arm-fbsd-tdep.c.
3442         * NEWS: Mention new FreeBSD/arm target.
3443         * configure.tgt: Add arm*-*-freebsd*.
3444         * arm-fbsd-tdep.c: New file.
3445         * arm-fbsd-tdep.h: New file.
3446
3447 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3448
3449         * linux-tdep.c (linux_make_corefile_notes): Remove call to
3450         `gdbarch_elfcore_write_linux_prpsinfo'.
3451         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3452         method.
3453         (elf_internal_linux_prpsinfo): Remove declaration.
3454         * gdbarch.h: Regenerate.
3455         * gdbarch.c: Regenerate.
3456
3457 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3458
3459         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3460         `set_gdbarch_elfcore_write_linux_prpsinfo'.
3461
3462 2017-10-11  Pedro Alves  <palves@redhat.com>
3463
3464         * breakpoint.c (reattach_breakpoints): Delete.
3465         * breakpoint.h (reattach_breakpoints): Delete.
3466
3467 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
3468
3469         * symfile.c (registered_sym_fns): Make struct, not typedef.
3470         (DEF_VEC_O (registered_sym_fns)): Remove.
3471         (symtab_fns): Change type to std::vector.
3472         (add_symtab_fns): Adjust.
3473         (find_sym_fns): Adjust.
3474
3475 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3476
3477         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3478         * arc-tdep.h (arc_arch_is_em): New function.
3479         (arc_arch_is_hs): Likewise.
3480
3481 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3482
3483         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3484         parentheses in the declaration.
3485         (macro_lookup_inclusion): Likewise.
3486         (macro_lookup_definition): Likewise.
3487         * p-lang.h (pascal_builtin_types): Likewise.
3488         * tui/tui-data.c (tui_win_list): Likewise.
3489         * tui/tui-data.h (tui_win_list): Likewise.
3490         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3491
3492 2017-10-11  Mark Rages  <markrages@gmail.com>
3493
3494         * target-memory.c (block_boundaries): Fix for block address not
3495         aligned on block size.
3496
3497 2017-10-10  Pedro Alves <palves@redhat.com>
3498             Tom Tromey  <tom@tromey.com>
3499
3500         * breakpoint.c (struct captured_breakpoint_query_args)
3501         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3502         (print_breakpoint): New.
3503         * breakpoint.h (print_breakpoint): Declare.
3504         * common/common-exceptions.h (enum return_reason): Remove
3505         references to catch_exceptions.
3506         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3507         Delete.
3508         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3509         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3510         * gdb.h: Delete.
3511         * gdbthread.h (thread_select): Declare.
3512         * mi/mi-cmd-break.c: Don't include gdb.h.
3513         (breakpoint_notify): Use print_breakpoint.
3514         * mi/mi-cmd-catch.c: Don't include gdb.h.
3515         * mi/mi-interp.c: Don't include gdb.h.
3516         (mi_print_breakpoint_for_event): New.
3517         (mi_breakpoint_created, mi_breakpoint_modified): Use
3518         mi_print_breakpoint_for_event.
3519         * mi/mi-main.c: Don't include gdb.h.
3520         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3521         thread_select instead of gdb_thread_select.
3522         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3523         of using gdb_list_thread_ids.
3524         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3525         FILEIO_ENOSYS here.
3526         (remote_fileio_request): Use TRY/CATCH instead of
3527         catch_exceptions.
3528         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3529         (symbol_file_add_from_memory_wrapper): Delete.
3530         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3531         * thread.c: Don't include gdb.h.
3532         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3533         (thread_alive): Use thread_select.
3534         (do_captured_thread_select): Delete, parts salvaged as ...
3535         (thread_select): ... this new function.
3536         (gdb_thread_select): Delete.
3537
3538 2017-10-10  Pedro Alves  <palves@redhat.com>
3539             Tom Tromey  <tom@tromey.com>
3540
3541         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3542         and reverse logic.
3543         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3544         No longer macros.  Instead ...
3545         (enum wp_check_result): They're now values of this new
3546         enumeration.
3547         (watchpoint_check): Change return type to wp_check_result and
3548         parameter type to bpstat.
3549         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3550         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3551         catch_errors.  Reverse logic of watchpoint_check call.
3552         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3553         pointer as parameter.
3554         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3555         * common/common-exceptions.c (throw_exception_sjlj): Update
3556         comments to avoid mentioning catch_errors.
3557         * exceptions.c (catch_errors): Delete.
3558         * exceptions.h: Update comments to avoid mentioning catch_errors.
3559         (catch_errors_ftype, catch_errors): Delete.
3560         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3561         (hook_stop_stub): Delete.
3562         (restore_selected_frame): Change return type to void, and
3563         parameter type to const frame_id &.
3564         (restore_infcall_control_state): Use TRY/CATCH instead of
3565         catch_errors.
3566         * main.c (captured_command_loop): Return void and remove
3567         parameter.  Remove references to catch_errors.
3568         (captured_main): Use TRY/CATCH instead of catch_errors.
3569         * objc-lang.c (objc_submethod_helper_data)
3570         (find_objc_msgcall_submethod_helper): Delete.
3571         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3572         catch_errors.
3573         * record-full.c (record_full_message): Return void.
3574         (record_full_message_args, record_full_message_wrapper): Delete.
3575         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3576         instead of catch_errors.
3577         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3578         parameter type to int.
3579         * solib-darwin.c (open_symbol_file_object): Ditto.
3580         * solib-dsbt.c (open_symbol_file_object): Ditto.
3581         * solib-frv.c (open_symbol_file_object): Ditto.
3582         * solib-svr4.c (open_symbol_file_object): Ditto.
3583         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3584         * solib.c (update_solib_list): Use TRY/CATCH instead of
3585         catch_errors.
3586         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3587         Change type.
3588         * symmisc.c (struct print_symbol_args): Remove.
3589         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3590         (print_symbol): Change type.
3591         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3592         and remove parameters.
3593         (catch_errors): New.
3594         (get_windows_debug_event): Adjust.
3595
3596 2017-10-09  Tom Tromey  <tom@tromey.com>
3597
3598         * mi/mi-main.c (free_splay_tree): Remove.
3599         (list_available_thread_groups): Use splay_tree_up.
3600         * common/gdb_splay_tree.h: New file.
3601
3602 2017-10-09  Tom Tromey  <tom@tromey.com>
3603
3604         * mi/mi-main.c (do_nothing): Remove.
3605         (list_available_thread_groups): Update.
3606
3607 2017-10-09  Pedro Alves  <palves@redhat.com>
3608
3609         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3610         reading registers when switching context.
3611
3612 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3613
3614         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3615         (fbsd_convert_siginfo): Likewise.
3616         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3617
3618 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3619
3620         * configure.ac (try_guile_versions): Remove guile-2.2.
3621         * configure: Regenerate.
3622
3623 2017-10-09  Tom Tromey  <tom@tromey.com>
3624
3625         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3626         (COMPILE.pre): Use $(CXX).
3627
3628 2017-10-09  Pedro Alves  <palves@redhat.com>
3629
3630         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3631         Use bool.
3632         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3633         * cp-support.h (cp_remove_params): Now returns a
3634         gdb::unique_xmalloc_ptr.
3635         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3636         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3637         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3638         returning a gdb::unique_xmalloc_ptr.
3639         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3640         * stack.c (find_frame_funname): Adjust to cp_remove_params
3641         returning a gdb::unique_xmalloc_ptr.
3642
3643 2017-10-08  Tom Tromey  <tom@tromey.com>
3644
3645         * dwarf2read.c (dwarf2_get_dwz_file): Use
3646         gdb::unique_xmalloc_ptr.
3647         (find_slot_in_mapped_hash): Likewise.
3648         (dwarf2_physname): Likewise.
3649         (create_dwo_unit_in_dwp_v1): Use std::string.
3650         (create_dwo_unit_in_dwp_v2): Likewise.
3651         (lookup_dwo_cutu): Likewise.
3652         (inherit_abstract_dies): Use std::vector.
3653         (read_array_type): Likewise.
3654         (dwarf_decode_macros): Remove unused declaration.
3655         (unsigned_int_compar): Remove.
3656         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3657         (psymtabs_addrmap_cleanup): Remove.
3658
3659 2017-10-08  Tom Tromey  <tom@tromey.com>
3660
3661         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3662         * frame.h (frame_cleanup_after_sniffer): Declare.
3663         (frame_prepare_for_sniffer): Return void.
3664         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3665         type of argument.
3666         (frame_prepare_for_sniffer): Return void.
3667
3668 2017-10-08  Tom Tromey  <tom@tromey.com>
3669
3670         * utils.h (make_cleanup_value_free): Remove.
3671         * utils.c (do_value_free, struct cleanup): Remove.
3672         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3673         Use gdb_value_up.
3674         * value.h (struct value_deleter): New.
3675         (gdb_value_up): New typedef.
3676
3677 2017-10-08  Tom Tromey  <tom@tromey.com>
3678
3679         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3680         (make_cleanup_free_search_symbols): Remove.
3681         (search_symbols): Return std::vector.
3682         (symbol_search::compare_search_syms): Now member of
3683         symbol_search.  Change arguments.
3684         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3685         (symtab_symbol_info, rbreak_command): Update.
3686         * symtab.h (struct symbol_search) <next>: Remove.
3687         Add constructors.
3688         (symbol_search::operator<): New function.
3689         (symbol_search::operator==): New function.
3690         (search_symbols): Remove std::vector.
3691         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3692         (symbol_search::compare_search_syms): Declare.
3693
3694 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3695
3696         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3697         arch/aarch64-insn.o.
3698         Remove one rule.
3699         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3700
3701 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3702
3703         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3704         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3705         arch/arm-linux.o respectively.
3706         * configure.tgt: Likewise.
3707
3708 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3709
3710         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3711         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3712
3713 2017-10-06  Pedro Alves  <palves@redhat.com>
3714
3715         * windows-nat.c: Include <algorithm>.
3716
3717 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3718
3719         * configure.tgt (i386_tobjs): New variable.
3720         (amd64_tobjs): New variable.
3721         Set $cpu_obs and $os_obs.
3722
3723 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3724
3725         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3726         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3727         (clean): Remove object files and dependency files.
3728         (distclean): Remove the directory.
3729         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3730         * configure: Re-generated.
3731         * configure.tgt: Replace amd64.o with arch/amd64.o.
3732
3733 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3734
3735         PR build/22188
3736         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3737         and SETEND.
3738
3739 2017-10-05  Pedro Alves  <palves@redhat.com>
3740
3741         * linux-nat.c (linux_child_follow_fork): When following the parent
3742         and detaching the child, consult the parent thread's architecture
3743         instead of the child's.
3744
3745 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3746
3747         * ax.h: Do not include "doublest.h".
3748         (union agent_val): Remove.
3749
3750 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3751
3752         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3753         (decimal_to_string): Return std::string object.
3754         (decimal_from_string): Accept std::string object.  Return bool.
3755         (decimal_from_integral, decimal_from_doublest): Remove.
3756         (decimal_from_longest): Add prototype.
3757         (decimal_from_ulongest): Likewise.
3758         (decimal_to_longest): Likewise.
3759         (decimal_from_doublest): Likewise.
3760         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3761         (MAX_DECIMAL_STRING): Move here.
3762         (decimal_to_string): Return std::string object.
3763         (decimal_from_string): Accept std::string object.  Return bool.
3764         (decimal_from_integral): Remove, replace by ...
3765         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3766         (decimal_to_longest): New function.
3767         (decimal_from_floating): Remove, replace by ...
3768         (decimal_from_doublest): ... this new function.
3769         (decimal_to_doublest): Update to new decimal_to_string interface.
3770
3771         * value.c (unpack_long): Use decimal_to_longest.
3772         * valops.c (value_cast): Use decimal_from_doublest instead of
3773         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3774         decimal_from_integral.
3775         * valarith.c (value_args_as_decimal): Likewise.
3776         * valprint.c (print_decimal_floating): Update to new
3777         decimal_to_string interface.
3778         * printcmd.c (printf_decfloat): Likewise.
3779         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3780
3781 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3782
3783         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3784         * gdbtypes.c: Include "floatformat.h".
3785         * value.c: Likewise.
3786         * m68k-tdep.c: Likewise.
3787
3788         * findvar.c: Do not include "floatformat.h".
3789         * amd64-darwin-tdep.c: Likewise.
3790         * arm-linux-tdep.c: Likewise.
3791         * i386-darwin-tdep.c: Likewise.
3792         * i387-tdep.c: Likewise.
3793         * m68k-linux-tdep.c: Likewise.
3794         * mep-tdep.c: Likewise.
3795         * mips-tdep.c: Likewise.
3796         * nios2-tdep.c: Likewise.
3797         * s390-linux-tdep.c: Likewise.
3798         * sparc-obsd-tdep.c: Likewise.
3799         * sparc-tdep.c: Likewise.
3800         * sparc64-tdep.c: Likewise.
3801         * spu-tdep.c: Likewise.
3802         * tic6x-tdep.c: Likewise.
3803         * tilegx-tdep.c: Likewise.
3804         * vax-tdep.c: Likewise.
3805         * xstormy16-tdep.c: Likewise.
3806         * xtensa-tdep.c: Likewise.
3807
3808         * top.c: Do not include "doublest.h".
3809         * aarch64-tdep.c: Likewise.
3810         * alpha-tdep.c: Likewise.
3811         * arm-linux-tdep.c: Likewise.
3812         * m68k-linux-tdep.c: Likewise.
3813         * tilegx-tdep.c: Likewise.
3814         * xstormy16-tdep.c: Likewise.
3815
3816 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3817
3818         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3819         (mipsn32_fbsd_sigframe): Define.
3820         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3821         for FreeBSD/mipsn32.
3822
3823 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3824
3825         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3826         AT_HWCAP.
3827
3828 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3829
3830         * MAINTAINERS (Misc): Update my email address.
3831
3832 2017-10-04  Pedro Alves  <palves@redhat.com>
3833
3834         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3835         it instead of target_gdbarch.
3836         (get_remote_state, get_remote_packet_size): Adjust
3837         get_remote_arch_state calls, passing down target_gdbarch
3838         explicitly.
3839         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3840         'gdbarch' and use it instead of target_gdbarch.
3841         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3842         passing down target_gdbarch explicitly.
3843         (struct stop_reply) <arch>: New field.
3844         (remote_parse_stop_reply): Use the stopped thread's architecture,
3845         not the current inferior's.  Save the architecture in the
3846         stop_reply.
3847         (process_stop_reply): Use the stop reply's architecture.
3848         (process_g_packet, remote_fetch_registers)
3849         (remote_prepare_to_store, store_registers_using_G)
3850         (remote_store_registers): Adjust get_remote_arch_state calls,
3851         using the regcache's architecture.
3852         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3853         passing down target_gdbarch explicitly.
3854         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3855         beneath instead of calling target_gdbarch.
3856         * target.c (default_thread_architecture): Use the specified
3857         inferior's architecture, instead of the current inferior's
3858         architecture (via target_gdbarch).
3859
3860 2017-10-04  Pedro Alves  <palves@redhat.com>
3861
3862         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3863         case.
3864         (regcache_print): Handle !target_has_registers here instead.
3865
3866 2017-10-04  Pedro Alves  <palves@redhat.com>
3867
3868         * frame.c (create_test_frame): Delete.
3869         * frame.h (create_test_frame): Delete.
3870         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3871         (class regcache_test): Delete.
3872         (test_target_has_registers, test_target_has_stack)
3873         (test_target_has_memory, test_target_prepare_to_store)
3874         (test_target_store_registers): New functions.
3875         (test_target_ops): New class.
3876         (register_to_value_test): Error out if there's already a
3877         process_stratum (or higher) target pushed.  Create a fuller mock
3878         environment, with mock target_ops, inferior, address space, thread
3879         and inferior_ptid.
3880         * progspace.c (struct address_space): Move to ...
3881         * progspace.h (struct address_space): ... here.
3882         * regcache.h (regcache::~regcache, regcache::raw_write)
3883         [GDB_SELF_TEST]: No longer virtual.
3884
3885 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3886
3887         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3888
3889 2017-10-04  Pedro Alves  <palves@redhat.com>
3890
3891         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3892         out of 'between TRY and CATCH'.
3893
3894 2017-10-04  Pedro Alves  <palves@redhat.com>
3895
3896         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3897         * common/common-exceptions.h (TRY): Open an outermost scope.
3898         Expand intro comment.
3899         (CATCH): Reindent.
3900         (END_CATCH): Close the outermost scope.
3901         * completer.c (complete_line_internal): Add missing END_CATCH.
3902
3903 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3904
3905         * NEWS (Changes since GDB 8.0): Add entry about new
3906         'set-cwd-on-gdbserver' feature.
3907         (New remote packets): Add entry for QSetWorkingDir.
3908         * common/common-inferior.h (set_inferior_cwd): New prototype.
3909         * infcmd.c (set_inferior_cwd): Remove "static".
3910         (show_cwd_command): Expand text to include remote debugging.
3911         * remote.c: Add PACKET_QSetWorkingDir.
3912         (remote_protocol_features) <QSetWorkingDir>: New entry for
3913         PACKET_QSetWorkingDir.
3914         (extended_remote_set_inferior_cwd): New function.
3915         (extended_remote_create_inferior): Call
3916         "extended_remote_set_inferior_cwd".
3917         (_initialize_remote): Call "add_packet_config_cmd" for
3918         QSetWorkingDir.
3919
3920 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3921
3922         * NEWS (New commands): Mention "set/show cwd".
3923         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3924         "cd" command's help text.
3925         * common/common-inferior.h (get_inferior_cwd): New prototype.
3926         * infcmd.c (inferior_cwd_scratch): New global variable.
3927         (set_inferior_cwd): New function.
3928         (get_inferior_cwd): Likewise.
3929         (set_cwd_command): Likewise.
3930         (show_cwd_command): Likewise.
3931         (_initialize_infcmd): Add "set/show cwd" commands.
3932         * inferior.h (class inferior) <cwd>: New field.
3933         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3934         (fork_inferior): Change inferior's cwd before its execution.
3935         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3936         to CreateProcess.
3937
3938 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3939
3940         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3941         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3942         (COMMON_OBS): Add gdb_tilde_expand.o.
3943         * common/gdb_tilde_expand.c: New file.
3944         * common/gdb_tilde_expand.h: Likewise.
3945
3946 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3947
3948         * gdbarch.sh (objfile): Remove duplicate declaration.
3949         * gdbarch.h: Regenerate.
3950
3951 2017-10-03  Tom Tromey  <tom@tromey.com>
3952
3953         * utils.c (internal_vproblem): Use string_vprintf.
3954
3955 2017-10-03  Tom Tromey  <tom@tromey.com>
3956
3957         * printcmd.c (info_symbol_command): Use std::string.
3958
3959 2017-10-03  Tom Tromey  <tom@tromey.com>
3960
3961         * top.c (gdb_safe_append_history): Use std::string.
3962
3963 2017-10-03  Tom Tromey  <tom@tromey.com>
3964
3965         * event-top.c (stdin_event_handler): Update.
3966         * main.c (captured_main_1): Update.
3967         * top.h (make_delete_ui_cleanup): Remove.
3968         (struct ui): Add constructor and destructor.
3969         (new_ui, delete_ui): Remove.
3970         * top.c (make_delete_ui_cleanup): Remove.
3971         (new_ui_command): Use std::unique_ptr.
3972         (delete_ui_cleanup): Remove.
3973         (ui::ui): Rename from new_ui.  Update.
3974         (free_ui): Remove.
3975         (ui::~ui): Rename from delete_ui.  Update.
3976
3977 2017-10-03  Tom Tromey  <tom@tromey.com>
3978
3979         * symfile.c (load_progress): Use gdb::byte_vector.
3980
3981 2017-10-03  Tom Tromey  <tom@tromey.com>
3982
3983         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3984         declaration.
3985         * printcmd.c (x_command): Remove unused declaration.
3986         * symfile.c (symbol_file_command): Remove unused declaration.
3987
3988 2017-10-03  Tom Tromey  <tom@tromey.com>
3989
3990         * utils.c (internal_vproblem): Use std::string.
3991         (defaulted_query): Likewise.
3992
3993 2017-10-03  Tom Tromey  <tom@tromey.com>
3994
3995         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3996         * top.c (execute_command_to_string): Update.
3997         * utils.c (make_cleanup_restore_page_info): Remove.
3998         (do_restore_page_info_cleanup): Remove.
3999         (set_batch_flag_and_restore_page_info):
4000         New.
4001         (make_cleanup_restore_page_info): Remove.
4002         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4003         (~set_batch_flag_and_restore_page_info): New
4004         (make_cleanup_restore_uinteger): Remove.
4005         (make_cleanup_restore_integer): Remove.
4006         (struct restore_integer_closure): Remove.
4007         (restore_integer): Remove.
4008         * utils.h (struct set_batch_flag_and_restore_page_info): New
4009         class.
4010         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4011         (make_cleanup_restore_page_info): Remove.
4012         (make_cleanup_restore_uinteger) Remove.
4013         (make_cleanup_restore_integer) Remove.
4014
4015 2017-10-03  Tom Tromey  <tom@tromey.com>
4016
4017         * record-full.h (record_full_gdb_operation_disable_set): Return
4018         scoped_restore_tmpl<int>.
4019         * infrun.c (adjust_pc_after_break): Update.
4020         (handle_signal_stop): Update.
4021         * record-full.c (record_full_gdb_operation_disable_set): Return
4022         scoped_restore_tmpl<int>.
4023         (record_full_wait_1, record_full_insert_breakpoint)
4024         (record_full_remove_breakpoint, record_full_save)
4025         (record_full_goto_insn): Update.
4026
4027 2017-10-02  Tom Tromey  <tom@tromey.com>
4028
4029         PR rust/22236:
4030         * rust-lang.c (rust_val_print_str): New function.
4031         (val_print_struct): Call it.
4032         (rust_subscript): Preserve name of slice type.
4033
4034 2017-10-02  Tom Tromey  <tom@tromey.com>
4035
4036         * rust-lang.c (rust_subscript): Handle slices in
4037         EVAL_AVOID_SIDE_EFFECTS case.
4038
4039 2017-10-02  Tom Tromey  <tom@tromey.com>
4040
4041         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4042
4043 2017-10-02  Tom Tromey  <tom@tromey.com>
4044
4045         * rust-lang.h (rust_slice_type): Add "extern".
4046
4047 2017-10-02  Tom Tromey  <tom@tromey.com>
4048             Pedro Alves  <palves@redhat.com>
4049
4050         * ada-lang.h (ada_exc_info::operator<): Make const.
4051         (ada_exc_info::operator==): Make const.
4052         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4053         Make const.
4054
4055 2017-09-29  Tom Tromey  <tom@tromey.com>
4056
4057         * target.c (read_whatever_is_readable): Change type of "result".
4058         Update.
4059         (free_memory_read_result_vector): Remove.
4060         (read_memory_robust): Change return type.  Update.
4061         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
4062         bin2hex, std::string.
4063         * target.h (memory_read_result_s): Remove typedef.
4064         (free_memory_read_result_vector): Remove.
4065         (read_memory_robust): Return std::vector.
4066
4067 2017-09-29  Tom Tromey  <tom@tromey.com>
4068
4069         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4070
4071 2017-09-29  Tom Tromey  <tom@tromey.com>
4072
4073         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4074         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
4075         operator< and operator==.
4076         (ada_exceptions_list): Return a std::vector.
4077         * ada-lang.c (ada_exc_info::operator<): Rename from
4078         compare_ada_exception_info.
4079         (ada_exc_info::operator==): New.
4080         (sort_remove_dups_ada_exceptions_list): Change type of
4081         "exceptions".
4082         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4083         (ada_add_global_exceptions): Likewise.
4084         (ada_exceptions_list_1): Return a std::vector.
4085         (ada_exceptions_list): Likewise.
4086
4087 2017-09-29  Tom Tromey  <tom@tromey.com>
4088
4089         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4090         'std::set *'.
4091         (print_one_inferior): Update.
4092         (free_vector_of_ints): Remove.
4093         (list_available_thread_groups): Change "ids" to std::set.
4094         (mi_cmd_list_thread_groups): Update.
4095         (struct collect_cores_data) <core>: Now a std::set.
4096         (collect_cores): Update.
4097         (unique): Remove.
4098         (print_one_inferior): Update.
4099
4100 2017-09-29  Tom Tromey  <tom@tromey.com>
4101
4102         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4103         (mi_execute_async_cli_command): Likewise.
4104         (mi_cmd_trace_frame_collected): Use field_fmt.
4105
4106 2017-09-29  Tom Tromey  <tom@tromey.com>
4107
4108         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4109         gdb::byte_vector.
4110
4111 2017-09-29  Tom Tromey  <tom@tromey.com>
4112
4113         * mi/mi-parse.c (mi_parse): Remove unused declaration.
4114
4115 2017-09-29  Tom Tromey  <tom@tromey.com>
4116
4117         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4118
4119 2017-09-29  Tom Tromey  <tom@tromey.com>
4120
4121         * varobj.h (varobj_gen_name): Return std::string.
4122         * varobj.c (varobj_gen_name): Return std::string.
4123         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4124         (mi_cmd_var_delete): Don't copy "name".
4125
4126 2017-09-29  Tom Tromey  <tom@tromey.com>
4127
4128         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4129         (mi_cmd_break_insert_1): Update.
4130
4131 2017-09-29  Tom Tromey  <tom@tromey.com>
4132
4133         * target.h (make_scoped_defer_target_commit_resume): Update.
4134         * target.c (make_scoped_defer_target_commit_resume): Rename from
4135         make_cleanup_defer_target_commit_resume.  Return a
4136         scoped_restore.
4137         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4138
4139 2017-09-29  Tom Tromey  <tom@tromey.com>
4140
4141         * main.c (captured_main_1): Remove unused declaration.
4142         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4143
4144 2017-09-29  Tom Tromey  <tom@tromey.com>
4145
4146         * symtab.c (search_symbols): Remove unused outer cleanup.
4147         (make_source_files_completion_list): Remove unused declaration.
4148
4149 2017-09-29  Tom Tromey  <tom@tromey.com>
4150
4151         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4152
4153 2017-09-29  Tom Tromey  <tom@tromey.com>
4154
4155         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4156         gdb::byte_vector.
4157
4158 2017-09-29  Tom Tromey  <tom@tromey.com>
4159
4160         * complaints.c (vcomplaint): Use std::string.
4161
4162 2017-09-29  Tom Tromey  <tom@tromey.com>
4163
4164         * tracepoint.c (trace_variable_command): Use std::string.
4165         (encode_actions_1): Remove unused declarations.
4166         (create_tsv_from_upload): Use std::string.
4167
4168 2017-09-29  Tom Tromey  <tom@tromey.com>
4169
4170         * cp-support.c (gdb_demangle): Use std::string.
4171
4172 2017-09-29  Tom Tromey  <tom@tromey.com>
4173
4174         * stack.c (parse_frame_specification): Use std::string
4175         (info_frame_command): Use gdb::unique_xmalloc_ptr.
4176
4177 2017-09-29  Tom Tromey  <tom@tromey.com>
4178
4179         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4180
4181 2017-09-29  Tom Tromey  <tom@tromey.com>
4182
4183         * utils.c (vfprintf_maybe_filtered): Use std::string.
4184         (vfprintf_unfiltered): Likewise.
4185
4186 2017-09-29  Tom Tromey  <tom@tromey.com>
4187
4188         * event-top.c (top_level_prompt): Return std::string.
4189         (display_gdb_prompt): Update.
4190
4191 2017-09-29  Tom Tromey  <tom@tromey.com>
4192
4193         * unittests/common-utils-selftests.c (format): New function.
4194         (string_vprintf_tests): New function.
4195         (_initialize_common_utils_selftests): Register new tests.
4196         * common/common-utils.c (string_vprintf): New function.
4197         * common/common-utils.h (string_vprintf): Declare.
4198
4199 2017-09-29  Pedro Alves  <palves@redhat.com>
4200
4201         * common/rsp-low.c (unpack_varlen_hex): Constify.
4202         * common/rsp-low.h (unpack_varlen_hex): Constify.
4203         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4204         Constify.
4205         * remote.c (remote_set_permissions, read_ptid)
4206         (remote_current_thread, remote_get_threads_with_qthreadinfo)
4207         (remote_static_tracepoint_marker_at)
4208         (remote_static_tracepoint_markers_by_strid)
4209         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4210         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4211         (parse_tracepoint_definition, parse_tsv_definition)
4212         (parse_static_tracepoint_marker_definition): Constify.
4213         * tracepoint.h (parse_static_tracepoint_marker_definition)
4214         (parse_trace_status, parse_tracepoint_status)
4215         (parse_tracepoint_definition, parse_tsv_definition): Constify.
4216
4217 2017-09-29  Pedro Alves  <palves@redhat.com>
4218
4219         * remote.c (target_buf, target_buf_size): Delete.
4220         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4221         Use the connection's packet buffer instead.
4222         All callers adjusted.
4223         (_initialize_remote): Remove references to target_buf and
4224         target_buf_size.
4225
4226 2017-09-28  Pedro Alves  <palves@redhat.com>
4227
4228         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4229         unittests/common-utils-selftests.c.
4230         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4231         (COMMON_OBS): Remove utils-selftests.o.
4232         * utils-selftests.c: Move to ...
4233         * unittests/common-utils-selftests.c: ... here and rename self
4234         test to "string_printf".
4235
4236 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4237
4238         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4239         having NULL cus or tus.
4240
4241 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4242
4243         * arm-tdep.c: (convert_from_extended): Remove.
4244         (convert_to_extended): Likewise.
4245         (arm_extract_return_value): Use convert_typed_floating.
4246         (arm_store_return_value): Likewise.
4247
4248         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4249         * sh-tdep.c: Do not include "floatformat.h".
4250         (sh_littlebyte_bigword_type): New function.
4251         (sh_register_convert_to_virtual): Use convert_typed_floating.
4252         (sh_register_convert_to_raw): Likewise.
4253         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4254         (sh64_littlebyte_bigword_type): New function.
4255         (sh64_extract_return_value): Use convert_typed_floating.
4256         (sh64_register_convert_to_virtual): Likewise.
4257         (sh64_register_convert_to_raw): Likewise.
4258
4259 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4260
4261         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4262         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4263
4264         * gdbtypes.h (union type_specific): Make field floatformat hold
4265         just a single struct floatformat, not an array.
4266         (floatformat_from_type): Move here.
4267         * gdbtypes.c (floatformat_from_type): Move here.  Update to
4268         changed TYPE_FLOATFORMAT definition.
4269         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4270         (recursive_dump_type): Likewise.
4271         (init_float_type): Install correct floatformat for byte order.
4272         (arch_float_type): Likewise.
4273
4274 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4275
4276         * gdbtypes.c (init_type): Change incoming argument from
4277         length-in-bytes to length-in-bits.  Assert length is a
4278         multiple of TARGET_CHAR_BITS.
4279         (arch_type, arch_flags_type): Likewise.
4280         (init_integer_type): Update call to init_type.
4281         (init_character_type): Likewise.
4282         (init_boolean_type): Likewise.
4283         (init_float_type): Likewise.
4284         (init_decfloat_type): Likewise.
4285         (init_complex_type): Likewise.
4286         (init_pointer_type): Likewise.
4287         (objfile_type): Likewise.
4288         (arch_integer_type): Update call to arch_type.
4289         (arch_character_type): Likewise.
4290         (arch_boolean_type): Likewise.
4291         (arch_float_type): Likewise.
4292         (arch_decfloat_type): Likewise.
4293         (arch_complex_type): Likewise.
4294         (arch_pointer_type): Likewise.
4295         (gdbtypes_post_init): Likewise.
4296
4297         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4298         (read_base_type): Likewise.
4299         * mdebugread.c (basic_type): Likewise.
4300         * stabsread.c (dbx_init_float_type): Likewise.
4301         (rs6000_builtin_type): Likewise.
4302         (read_range_type): Likewise.  Also, fix call to init_integer_type
4303         with erroneous length argument.
4304
4305         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4306         * d-lang.c (build_d_types): Likewise.
4307         * f-lang.c (build_fortran_types): Likewise.
4308         * go-lang.c (build_go_types): Likewise.
4309         * opencl-lang.c (build_opencl_types): Likewise.
4310         * jit.c (finalize_symtab): Likewise.
4311         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4312         (build_std_type_info_type): Likewise.
4313         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
4314         update call to arch_flags_type.
4315
4316         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4317         arch_type.
4318         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4319         * windows-tdep.c (windows_get_tlb_type): Likewise.
4320
4321         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4322         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4323         * m32c-tdep.c (make_types): Likewise.
4324         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4325         (rl78_psw_type): Update call to arch_flags_type.
4326         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4327         * rx-tdep.c (rx_psw_type): Likewise.
4328         (rx_fpsw_type): Likewise.
4329         * sparc-tdep.c (sparc_psr_type): Likewise.
4330         (sparc_fsr_type): Likewise.
4331         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4332         (sparc64_ccr_type): Likewise.
4333         (sparc64_fsr_type): Likewise.
4334         (sparc64_fprs_type): Likewise.
4335
4336 2017-09-27  Tom Tromey  <tom@tromey.com>
4337
4338         * findcmd.c (find_command): Constify.
4339
4340 2017-09-27  Tom Tromey  <tom@tromey.com>
4341
4342         * ada-tasks.c (task_command_1, task_command): Constify.
4343
4344 2017-09-27  Tom Tromey  <tom@tromey.com>
4345
4346         * symtab.c (maintenance_print_symbol_cache)
4347         (maintenance_flush_symbol_cache)
4348         (maintenance_print_symbol_cache_statistics): Constify.
4349
4350 2017-09-27  Tom Tromey  <tom@tromey.com>
4351
4352         * inferior.c (detach_inferior_command, kill_inferior_command)
4353         (inferior_command): Constify.
4354
4355 2017-09-27  Tom Tromey  <tom@tromey.com>
4356
4357         * regcache.c (regcache_print, maintenance_print_registers)
4358         (maintenance_print_raw_registers)
4359         (maintenance_print_cooked_registers)
4360         (maintenance_print_register_groups)
4361         (maintenance_print_remote_registers): Constify.
4362
4363 2017-09-27  Tom Tromey  <tom@tromey.com>
4364
4365         * printcmd.c (map_display_numbers, undisplay_command)
4366         (enable_disable_display_command, enable_display_command)
4367         (disable_display_command): Constify.
4368
4369 2017-09-27  Tom Tromey  <tom@tromey.com>
4370
4371         * breakpoint.h (delete_command): Don't declare.
4372         * breakpoint.c (delete_command, enable_once_command)
4373         (enable_count_command, enable_delete_command, breakpoint_1)
4374         (maintenance_info_breakpoints, stopin_command, stopat_command)
4375         (delete_command, delete_trace_command, save_breakpoints)
4376         (save_breakpoints_command, save_tracepoints_command): Constify.
4377
4378 2017-09-27  Tom Tromey  <tom@tromey.com>
4379
4380         * macrocmd.c (macro_expand_command, macro_expand_once_command)
4381         (skip_ws, extract_identifier, macro_define_command)
4382         (macro_undef_command, macro_list_command): Constify.
4383
4384 2017-09-27  Tom Tromey  <tom@tromey.com>
4385
4386         * infcmd.c (environment_info, set_environment_command)
4387         (unset_environment_command, path_info, info_proc_cmd_1)
4388         (info_proc_cmd_mappings, info_proc_cmd_stat)
4389         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4390         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4391
4392 2017-09-27  Tom Tromey  <tom@tromey.com>
4393
4394         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4395         Constify.
4396
4397 2017-09-27  Tom Tromey  <tom@tromey.com>
4398
4399         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4400
4401 2017-09-27  Tom Tromey  <tom@tromey.com>
4402
4403         * demangle.c (demangle_command): Constify.
4404
4405 2017-09-27  Tom Tromey  <tom@tromey.com>
4406
4407         * progspace.c (maintenance_info_program_spaces_command):
4408         Constify.
4409
4410 2017-09-27  Tom Tromey  <tom@tromey.com>
4411
4412         * compile/compile.c (check_raw_argument, compile_file_command)
4413         (compile_code_command, compile_print_command): Constify.
4414
4415 2017-09-27  Tom Tromey  <tom@tromey.com>
4416
4417         * reggroups.c (maintenance_print_reggroups): Constify.
4418
4419 2017-09-27  Tom Tromey  <tom@tromey.com>
4420
4421         * dwarf2read.c (save_gdb_index_command): Constify.
4422
4423 2017-09-27  Tom Tromey  <tom@tromey.com>
4424
4425         * stap-probe.c (info_probes_stap_command): Constify.
4426
4427 2017-09-27  Tom Tromey  <tom@tromey.com>
4428
4429         * fork-child.c (unset_exec_wrapper_command): Constify.
4430
4431 2017-09-27  Tom Tromey  <tom@tromey.com>
4432
4433         * btrace.c (get_uint, get_context_size, no_chunk)
4434         (maint_btrace_packet_history_cmd)
4435         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4436         (maint_info_btrace_cmd): Constify.
4437
4438 2017-09-27  Tom Tromey  <tom@tromey.com>
4439
4440         * reverse.c (delete_bookmark_command): Constify.
4441
4442 2017-09-27  Tom Tromey  <tom@tromey.com>
4443
4444         * remote.c (set_memory_packet_size)
4445         (set_memory_write_packet_size, show_memory_write_packet_size)
4446         (set_memory_read_packet_size, show_memory_read_packet_size)
4447         (compare_sections_command, packet_command, remote_put_command)
4448         (remote_get_command, remote_delete_command): Constify.
4449
4450 2017-09-27  Tom Tromey  <tom@tromey.com>
4451
4452         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4453         (set_mipsfpu_double_command, set_mipsfpu_none_command)
4454         (set_mipsfpu_auto_command): Constify.
4455
4456 2017-09-27  Tom Tromey  <tom@tromey.com>
4457
4458         * cli/cli-cmds.h (cd_command): Constify.
4459         * cli/cli-cmds.c (cd_command): Constify.
4460
4461 2017-09-27  Tom Tromey  <tom@tromey.com>
4462
4463         * thread.c (thread_name_command, thread_find_command): Constify.
4464
4465 2017-09-27  Tom Tromey  <tom@tromey.com>
4466
4467         * probe.c (enable_probes_command, disable_probes_command):
4468         Constify.
4469
4470 2017-09-27  Tom Tromey  <tom@tromey.com>
4471
4472         * symfile.c (symbol_file_command): Constify.
4473         * gdbcore.h (deprecated_file_changed_hook): Constify.
4474         * exec.c (deprecated_file_changed_hook, exec_file_command)
4475         (file_command): Constify.
4476         * defs.h (symbol_file_command): Constify.
4477
4478 2017-09-27  Tom Tromey  <tom@tromey.com>
4479
4480         * remote-fileio.c (set_system_call_allowed)
4481         (show_system_call_allowed): Constify.
4482
4483 2017-09-27  Tom Tromey  <tom@tromey.com>
4484
4485         * tracepoint.c (delete_trace_variable_command)
4486         (tfind_end_command, tfind_start_command, tfind_pc_command)
4487         (tfind_tracepoint_command, tfind_line_command)
4488         (tfind_range_command, tfind_outside_command): Constify.
4489
4490 2017-09-27  Tom Tromey  <tom@tromey.com>
4491
4492         * ax-gdb.c (maint_agent_printf_command, agent_command)
4493         (agent_eval_command): Constify.
4494
4495 2017-09-27  Tom Tromey  <tom@tromey.com>
4496
4497         * tracepoint.c (info_scope_command): Constify.
4498         * python/python.c (gdbpy_decode_line): Constify.
4499         * python/py-breakpoint.c (bppy_init): Constify.
4500         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4501         * location.h: (new_linespec_location)
4502         (string_to_event_location_basic, string_to_event_location):
4503         Constify.
4504         * location.c (new_linespec_location)
4505         (string_to_event_location_basic, string_to_event_location):
4506         Constify.
4507         * linespec.h (decode_line_with_current_source)
4508         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4509         * linespec.c (linespec_lex_to_end)
4510         (decode_line_with_current_source)
4511         (decode_line_with_last_displayed): Constify.
4512         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4513         Constify.
4514         * cli/cli-cmds.c (edit_command, list_command): Constify.
4515         * breakpoint.h (until_break_command, watch_command_wrapper)
4516         (awatch_command_wrapper, rwatch_command_wrapper)
4517         (init_ada_exception_breakpoint): Constify.
4518         * breakpoint.c (break_command_1, dprintf_command)
4519         (break_range_command, watch_command_wrapper)
4520         (rwatch_command_wrapper, awatch_command_wrapper)
4521         (until_break_command, init_ada_exception_breakpoint)
4522         (strace_marker_create_sals_from_location, trace_command)
4523         (ftrace_command, strace_command, struct tracepoint): Constify.
4524         * ax-gdb.c (agent_command_1): Constify.
4525         * ada-lang.c (ada_exception_sal): Constify.
4526
4527 2017-09-27  Tom Tromey  <tom@tromey.com>
4528
4529         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4530         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4531         (get_context_size, no_chunk, get_insn_history_modifiers)
4532         (cmd_record_insn_history, get_call_history_modifiers)
4533         (cmd_record_call_history): Constify.
4534
4535 2017-09-27  Tom Tromey  <tom@tromey.com>
4536
4537         * source.c (show_substitute_path_command)
4538         (unset_substitute_path_command, set_substitute_path_command):
4539         Constify.
4540
4541 2017-09-27  Tom Tromey  <tom@tromey.com>
4542
4543         * typeprint.c (maintenance_print_type): Constify.
4544         * maint.c (maintenance_dump_me, maintenance_demangle)
4545         (maintenance_time_display, maintenance_info_sections)
4546         (maintenance_print_statistics, maintenance_deprecate)
4547         (maintenance_undeprecate): Constify.
4548         (maintenance_do_deprecate): Constify.  Use std::string.
4549         (maintenance_selftest): Constify.
4550         * gdbtypes.h (maintenance_print_type): Constify.
4551
4552 2017-09-27  Tom Tromey  <tom@tromey.com>
4553
4554         * hppa-tdep.c (unwind_command): Constify.
4555
4556 2017-09-27  Tom Tromey  <tom@tromey.com>
4557
4558         * target-descriptions.c (unset_tdesc_filename_cmd)
4559         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4560         Constify.
4561
4562 2017-09-27  Tom Tromey  <tom@tromey.com>
4563
4564         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4565
4566 2017-09-27  Tom Tromey  <tom@tromey.com>
4567
4568         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4569
4570 2017-09-27  Tom Tromey  <tom@tromey.com>
4571
4572         * tui/tui-regs.c (tui_reg_command): Constify.
4573
4574 2017-09-27  Tom Tromey  <tom@tromey.com>
4575
4576         * skip.c (skip_file_command, skip_function_command)
4577         (skip_enable_command, skip_disable_command, skip_delete_command):
4578         Constify.
4579
4580 2017-09-27  Tom Tromey  <tom@tromey.com>
4581
4582         * record-btrace.c (cmd_record_btrace_bts_start)
4583         (cmd_record_btrace_pt_start): Constify.
4584
4585 2017-09-27  Tom Tromey  <tom@tromey.com>
4586
4587         * symmisc.c (maintenance_print_symbols)
4588         (maintenance_print_msymbols, maintenance_print_objfiles)
4589         (maintenance_info_symtabs, maintenance_check_symtabs)
4590         (maintenance_expand_symtabs, maintenance_info_line_tables):
4591         Constify.
4592
4593 2017-09-27  Tom Tromey  <tom@tromey.com>
4594
4595         * top.c (new_ui_command): Constify.
4596
4597 2017-09-27  Tom Tromey  <tom@tromey.com>
4598
4599         * symfile.c (add_symbol_file_command)
4600         (remove_symbol_file_command, list_overlays_command)
4601         (map_overlay_command, unmap_overlay_command)
4602         (overlay_auto_command, overlay_manual_command)
4603         (overlay_off_command, overlay_load_command): Constify.
4604
4605 2017-09-27  Tom Tromey  <tom@tromey.com>
4606
4607         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4608         (info_spu_mailbox_command, info_spu_dma_command)
4609         (info_spu_proxydma_command): Constify.
4610
4611 2017-09-27  Tom Tromey  <tom@tromey.com>
4612
4613         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4614
4615 2017-09-27  Tom Tromey  <tom@tromey.com>
4616
4617         * cli/cli-script.c (user_defined_command): Constify.
4618
4619 2017-09-27  Tom Tromey  <tom@tromey.com>
4620
4621         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4622         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4623         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4624         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4625         (dump_binary_value, append_binary_memory, append_binary_value):
4626         Constify.
4627         (struct dump_context) <func>: Constify.
4628         (add_dump_command): Update.
4629
4630 2017-09-27  Tom Tromey  <tom@tromey.com>
4631
4632         * cli/cli-cmds.c (show_version, show_configuration)
4633         (source_command, show_user): Constify.
4634
4635 2017-09-27  Tom Tromey  <tom@tromey.com>
4636
4637         * target.c (maintenance_print_target_stack): Constify.
4638
4639 2017-09-27  Tom Tromey  <tom@tromey.com>
4640
4641         * interps.c (interpreter_exec_cmd): Constify.
4642
4643 2017-09-27  Tom Tromey  <tom@tromey.com>
4644
4645         * record-full.c (cmd_record_full_restore): Constify.
4646
4647 2017-09-27  Tom Tromey  <tom@tromey.com>
4648
4649         * memattr.c (enable_mem_command, disable_mem_command)
4650         (delete_mem_command): Constify.
4651
4652 2017-09-27  Tom Tromey  <tom@tromey.com>
4653
4654         * value.c (show_convenience): Constify.
4655
4656 2017-09-27  Tom Tromey  <tom@tromey.com>
4657
4658         * gdbcore.h (core_file_command): Update.
4659         * corefile.c (core_file_command): Constify.
4660
4661 2017-09-27  Tom Tromey  <tom@tromey.com>
4662
4663         * user-regs.c (maintenance_print_user_registers): Constify.
4664
4665 2017-09-27  Tom Tromey  <tom@tromey.com>
4666
4667         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4668
4669 2017-09-27  Tom Tromey  <tom@tromey.com>
4670
4671         * cp-support.c (first_component_command): Constify.
4672
4673 2017-09-27  Tom Tromey  <tom@tromey.com>
4674
4675         * psymtab.c (maintenance_print_psymbols)
4676         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4677         Constify.
4678
4679 2017-09-27  Tom Tromey  <tom@tromey.com>
4680
4681         * windows-tdep.c (display_tib): Constify.
4682
4683 2017-09-27  Tom Tromey  <tom@tromey.com>
4684
4685         * linux-fork.c (delete_checkpoint_command)
4686         (detach_checkpoint_command): Constify.
4687
4688 2017-09-27  Tom Tromey  <tom@tromey.com>
4689
4690         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4691
4692 2017-09-27  Tom Tromey  <tom@tromey.com>
4693
4694         * arc-tdep.c (dump_arc_instruction_command): Constify.
4695
4696 2017-09-27  Tom Tromey  <tom@tromey.com>
4697
4698         * valprint.c (set_radix, show_radix): Constify.
4699
4700 2017-09-27  Tom Tromey  <tom@tromey.com>
4701
4702         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4703
4704 2017-09-27  Tom Tromey  <tom@tromey.com>
4705
4706         * command.h (not_just_help_class_command): Update.
4707         * cli/cli-decode.h (not_just_help_class_command): Update.
4708         * cli/cli-decode.c (not_just_help_class_command): Constify.
4709
4710 2017-09-27  Tom Tromey  <tom@tromey.com>
4711
4712         * gdb_bfd.c (maintenance_info_bfds): Constify.
4713
4714 2017-09-27  Tom Tromey  <tom@tromey.com>
4715
4716         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4717         overloads.
4718         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4719         (do_const_cfunc): New function.
4720         (cmd_cfunc_eq): New overload.
4721         (cli_user_command_p): Check do_const_cfunc.
4722         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4723         const_cfunc.
4724         * command.h (add_cmd): Add const overload and no-function
4725         overload.
4726         (set_cmd_cfunc): Add const overload.
4727         (cmd_const_cfunc_ftype): Declare.
4728         (cmd_cfunc_eq): Add const overload.
4729         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4730         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4731         overload.
4732
4733 2017-09-27  Tom Tromey  <tom@tromey.com>
4734
4735         * macroexp.c (get_next_token_for_substitution): New function.
4736         (substitute_args): Call it.  Check for __VA_OPT__.
4737
4738 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4739             Pedro Alves <palves@redhat.com>
4740
4741         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4742         producer_is_icc_lt_14.
4743         (producer_is_icc_lt_14): New function.
4744         (check_producer): Add code for checking version of ICC.
4745         (producer_is_icc): Move to producer.c.
4746         (read_structure_type): Restrict ICC workaround to ICC<14.
4747         * producer.c: Include selftest.h.
4748         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4749         New functions.
4750         * producer.h (producer_is_icc): New declaration.
4751
4752 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4753
4754         * Makefile.in (SFILES): Add producer.c.
4755         (COMMON_OBS): Add producer.o
4756         * amd64-tdep.c (producer.h): Add new include.
4757         * dwarf2read.c (producer.h): Add new include.
4758         * producer.c: New file.
4759         * producer.h: New file.
4760         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4761         producer.c.
4762         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4763         producer.h.
4764
4765 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4766
4767         * configure.ac: Search ncursesw before ncurses.
4768         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4769         * gdb_curses.h: Include <ncursesw/ncurses.h>
4770         * config.in, configure: Regenerate.
4771
4772 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4773
4774         PR gdb/22185
4775         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4776         obsolete.
4777         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4778         Remove i386sol2 support.
4779         * configure.nat <i386sol2>: Remove.
4780         <sol2-64>: Fold into ...
4781         <sol2>: ... this.
4782         Move common settings to default section.
4783         Add sol-thread.o.
4784         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4785         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4786         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4787         <i[34567]86-*-solaris*>: Remove.
4788         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4789
4790         * configure.ac: Remove wctype in libw check.
4791         (_MSE_INT_H): Don't define on Solaris 7-9.
4792         <solaris*>: Remove libthread_db.so.1 check.
4793         * configure: Regenerate.
4794         * config.in: Regenerate.
4795
4796         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4797         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4798         (gdb_ps_size_t): Remove.
4799         Use base types in users.
4800         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4801
4802         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4803
4804 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4805
4806         PR build/22206
4807         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4808         (adi_is_addr_mapped): Likewise.
4809         (PSR_ICC): Don't redefine.
4810         (PSR_IMPL): Likewise.
4811
4812 2017-09-25  Tom Tromey  <tom@tromey.com>
4813
4814         * regcache.c (regcache::dump): Use string_printf.
4815
4816 2017-09-25  Tom Tromey  <tom@tromey.com>
4817
4818         * regcache.c (class regcache_invalidator): New.
4819         (struct register_to_invalidate): Remove.
4820         (make_cleanup_regcache_invalidate): Remove.
4821         (regcache::raw_write): Use regcache_invalidator.
4822
4823 2017-09-25  Tom Tromey  <tom@tromey.com>
4824
4825         * spu-tdep.c (spu2ppu_sniffer): Update.
4826         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4827         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4828         Remove.
4829         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4830         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4831         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4832         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4833         (frame_pop): Update.
4834
4835 2017-09-25  Tom Tromey  <tom@tromey.com>
4836
4837         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4838         * regcache.h (regcache_xfree): Don't declare.
4839         * regcache.c (regcache_xfree): Remove.
4840         (do_regcache_xfree): Use delete.
4841         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4842         * linux-fork.c (free_fork): Use delete.
4843         (fork_save_infrun_state): Likewise.
4844         * jit.c (jit_dealloc_cache): Use delete.
4845         * infrun.c (discard_infcall_suspend_state): Use delete.
4846
4847 2017-09-25  Tom Tromey  <tom@tromey.com>
4848
4849         * regcache.h (regcache_xmalloc): Don't declare.
4850         (regcache_raw_set_cached_value): Update comment.
4851         * regcache.c (regcache_xmalloc): Remove.
4852         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4853         * jit.c (jit_frame_sniffer): Use new.
4854         * frame.c (frame_save_as_regcache): Use new.
4855
4856 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4857
4858         * NEWS: Advertise support for guarded-storage registers on IBM z.
4859
4860 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4861
4862         * s390-linux-nat.c (have_regset_gs): New static variable.
4863         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4864         control block and guarded-storage broadcast control regsets.
4865         (s390_read_description): Detect whether the target has
4866         guarded-storage support, return appropriate tdesc.
4867         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4868         (features/s390x-gs-linux64.c): Likewise.
4869         (struct gdbarch_tdep) <have_gs>: New field.
4870         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4871         (s390_gsbc_regset): New variables.
4872         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4873         and s390_gsbc_regset, if applicable.
4874         (s390_core_read_description): Check whether core file was from a
4875         target with guarded-storage support; include appropriate regsets.
4876         (s390_gdbarch_init): Add registers for guarded-storage support.
4877         (_initialize_s390_tdep): Initialize new target descriptions that
4878         include registers for guarded-storage support.
4879         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4880         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4881         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4882         (S390_NUM_REGS): Adjust macro definition.
4883         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4884         (tdesc_s390x_gs_linux64): New declarations.
4885
4886 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4887
4888         * features/s390-gs-linux64.xml: New file.
4889         * features/s390-gs.xml: New file.
4890         * features/s390-gsbc.xml: New file.
4891         * features/s390x-gs-linux64.xml: New file.
4892         * features/Makefile (WHICH): Add s390-gs-linux64 and
4893         s390x-gs-linux64.
4894         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4895         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4896         * features/s390-gs-linux64.c: New generated file.
4897         * features/s390x-gs-linux64.c: New file.
4898         * regformats/s390-gs-linux64.dat: New file.
4899         * regformats/s390x-gs-linux64.dat: New file.
4900
4901 2017-09-23  Tom Tromey  <tom@tromey.com>
4902
4903         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4904
4905 2017-09-22  Tom Tromey  <tom@tromey.com>
4906
4907         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4908         type to scoped_restore_tmpl.
4909         <scoped_input_handler>: Initialize m_quit_handler directly.
4910
4911 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4912
4913         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4914         (cd_command): Likewise.  Free "current_directory" before
4915         assigning to it.
4916         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4917         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4918         * top.c (gdb_dirbuf): Remove global declaration.
4919         * top.h (gdb_dirbuf): Likewise.
4920
4921 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4922
4923         * gnulib/aclocal.m4: Regenerate.
4924         * gnulib/config.in: Regenerate.
4925         * gnulib/configure: Regenerate.
4926         * gnulib/import/Makefile.am: Regenerate.
4927         * gnulib/import/Makefile.in: Regenerate.
4928         * gnulib/import/assure.h: New file.
4929         * gnulib/import/at-func.c: Likewise
4930         * gnulib/import/chdir-long.c: New file.
4931         * gnulib/import/chdir-long.h: New file.
4932         * gnulib/import/cloexec.c: New file.
4933         * gnulib/import/cloexec.h: New file.
4934         * gnulib/import/close.c: New file.
4935         * gnulib/import/closedir.c: New file.
4936         * gnulib/import/dirent-private.h: New file.
4937         * gnulib/import/dup-safer.c: New file.
4938         * gnulib/import/dup.c: New file.
4939         * gnulib/import/dup2.c: New file.
4940         * gnulib/import/error.c: New file.
4941         * gnulib/import/error.h: New file.
4942         * gnulib/import/exitfail.c: New file.
4943         * gnulib/import/exitfail.h: New file.
4944         * gnulib/import/fchdir.c: New file.
4945         * gnulib/import/fcntl.c: New file.
4946         * gnulib/import/fcntl.in.h: New file.
4947         * gnulib/import/fd-hook.c: New file.
4948         * gnulib/import/fd-hook.h: New file.
4949         * gnulib/import/fd-safer.c: New file.
4950         * gnulib/import/fdopendir.c: New file.
4951         * gnulib/import/filename.h: New file.
4952         * gnulib/import/filenamecat-lgpl.c: New file.
4953         * gnulib/import/filenamecat.h: New file.
4954         * gnulib/import/fstat.c: New file.
4955         * gnulib/import/fstatat.c: New file.
4956         * gnulib/import/getcwd-lgpl.c: New file.
4957         * gnulib/import/getcwd.c: New file.
4958         * gnulib/import/getdtablesize.c: New file.
4959         * gnulib/import/getlogin_r.c: New file.
4960         * gnulib/import/getprogname.c: New file.
4961         * gnulib/import/getprogname.h: New file.
4962         * gnulib/import/gettext.h: New file.
4963         * gnulib/import/glob-libc.h: New file.
4964         * gnulib/import/glob.c: New file.
4965         * gnulib/import/glob.in.h: New file.
4966         * gnulib/import/intprops.h: New file.
4967         * gnulib/import/m4/chdir-long.m4: New file.
4968         * gnulib/import/m4/close.m4: New file.
4969         * gnulib/import/m4/closedir.m4: New file.
4970         * gnulib/import/m4/d-ino.m4: New file.
4971         * gnulib/import/m4/d-type.m4: New file.
4972         * gnulib/import/m4/dup.m4: New file.
4973         * gnulib/import/m4/dup2.m4: New file.
4974         * gnulib/import/m4/error.m4: New file.
4975         * gnulib/import/m4/fchdir.m4: New file.
4976         * gnulib/import/m4/fcntl.m4: New file.
4977         * gnulib/import/m4/fcntl_h.m4: New file.
4978         * gnulib/import/m4/fdopendir.m4: New file.
4979         * gnulib/import/m4/filenamecat.m4: New file.
4980         * gnulib/import/m4/fstat.m4: New file.
4981         * gnulib/import/m4/fstatat.m4: New file.
4982         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4983         * gnulib/import/m4/getcwd-path-max.m4: New file.
4984         * gnulib/import/m4/getcwd.m4: New file.
4985         * gnulib/import/m4/getdtablesize.m4: New file.
4986         * gnulib/import/m4/getlogin_r.m4: New file.
4987         * gnulib/import/m4/getprogname.m4: New file.
4988         * gnulib/import/m4/glob.m4: New file.
4989         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4990         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4991         * gnulib/import/m4/mempcpy.m4: New file.
4992         * gnulib/import/m4/memrchr.m4: New file.
4993         * gnulib/import/m4/mode_t.m4: New file.
4994         * gnulib/import/m4/msvc-inval.m4: New file.
4995         * gnulib/import/m4/msvc-nothrow.m4: New file.
4996         * gnulib/import/m4/open.m4: New file.
4997         * gnulib/import/m4/openat.m4: New file.
4998         * gnulib/import/m4/opendir.m4: New file.
4999         * gnulib/import/m4/readdir.m4: New file.
5000         * gnulib/import/m4/realloc.m4: New file.
5001         * gnulib/import/m4/rewinddir.m4: New file.
5002         * gnulib/import/m4/save-cwd.m4: New file.
5003         * gnulib/import/m4/strdup.m4: New file.
5004         * gnulib/import/m4/strerror.m4: New file.
5005         * gnulib/import/m4/unistd-safer.m4: New file.
5006         * gnulib/import/mempcpy.c: New file.
5007         * gnulib/import/memrchr.c: New file.
5008         * gnulib/import/msvc-inval.c: New file.
5009         * gnulib/import/msvc-inval.h: New file.
5010         * gnulib/import/msvc-nothrow.c: New file.
5011         * gnulib/import/msvc-nothrow.h: New file.
5012         * gnulib/import/open.c: New file.
5013         * gnulib/import/openat-die.c: New file.
5014         * gnulib/import/openat-priv.h: New file.
5015         * gnulib/import/openat-proc.c: New file.
5016         * gnulib/import/openat.c: New file.
5017         * gnulib/import/openat.h: New file.
5018         * gnulib/import/opendir.c: New file.
5019         * gnulib/import/pipe-safer.c: New file.
5020         * gnulib/import/readdir.c: New file.
5021         * gnulib/import/realloc.c: New file.
5022         * gnulib/import/rewinddir.c: New file.
5023         * gnulib/import/save-cwd.c: New file.
5024         * gnulib/import/save-cwd.h: New file.
5025         * gnulib/import/strdup.c: New file.
5026         * gnulib/import/strerror-override.c: New file.
5027         * gnulib/import/strerror-override.h: New file.
5028         * gnulib/import/strerror.c: New file.
5029         * gnulib/import/unistd--.h: New file.
5030         * gnulib/import/unistd-safer.h: New file.
5031         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5032         "getcwd" and "glob".
5033         * ser-tcp.c: Undefine "close" before redefining it.
5034
5035 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5036
5037         * guile/scm-value.c (gdbscm_value_address): Initialize address,
5038         get rid of res_val.
5039
5040 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5041
5042         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5043         <sol2,sparc>: Likewise.
5044         <sol2-64,i386>: Likewise.
5045
5046         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5047         -Wdeprecated-declarations on *-*-solaris*.
5048         * configure: Regenerate.
5049
5050         * procfs.c: Include "nat/inferior.h".
5051         (procfs_info_proc): Fix typo.
5052
5053 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5054
5055         * remote.c (vector): Include.
5056         (struct private_thread_info): Add field, thread_handle.
5057         (free_private_thread_info): Deallocate storage associated with
5058         thread handle.
5059         (get_private_info_thread): Initialize `thread_handle' field.
5060         (struct thread_item): Add field, thread_handle.
5061         (clear_threads_listing_context): Deallocate storage associated
5062         with thread handle.
5063         (start_thread): Add support for "handle" attribute.
5064         (thread_attributes): Add "handle".
5065         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5066         field.
5067         (remote_update_thread_list): Update thread_handle.
5068         (remote_thread_handle_to_thread_info): New function.
5069         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5070
5071 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5072
5073         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5074         function.
5075         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5076         * python/python-internal.h (thread_object_type): Declare.
5077
5078 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5079
5080         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5081         (target_thread_handle_to_thread_info): Declare.
5082         * target.c (target_thread_handle_to_thread_info): New function.
5083         * target-delegates.c: Regenerate.
5084         * gdbthread.h (find_thread_by_handle): Declare.
5085         * thread.c (find_thread_by_handle): New function.
5086         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5087         function.
5088         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5089
5090 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5091
5092         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5093
5094 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5095
5096         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5097
5098 2017-09-21  Yao Qi  <yao.qi@linaro.org>
5099
5100         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5101         to gdb_target_obs.
5102
5103 2017-09-20  Tom Tromey  <tom@tromey.com>
5104
5105         * breakpoint.c (struct counted_command_line): Remove.
5106         (breakpoint_commands): Update.
5107         (alloc_counted_command_line, incref_counted_command_line)
5108         (decref_counted_command_line, do_cleanup_counted_command_line)
5109         (make_cleanup_decref_counted_command_line): Remove.
5110         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5111         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5112         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5113         (save_breakpoints): Update.
5114         * breakpoint.h (counted_command_line): Now a typedef to
5115         shared_ptr.
5116         (struct breakpoint) <commands>: Now a counted_command_line.
5117         (struct bpstats) <command>: Likewise.
5118
5119 2017-09-20  Tom Tromey  <tom@tromey.com>
5120
5121         * breakpoint.c (struct commands_info, do_map_commands_command):
5122         Remove.
5123         (commands_command_1): Update.
5124         (iterate_over_related_breakpoints): Take a function_view.
5125         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5126         (delete_command): Update.
5127         (map_breakpoint_numbers): Take a function_view.
5128         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5129         (disable_command): Update.
5130         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5131         (enable_command): Update.
5132         (struct disp_data, do_enable_breakpoint_disp)
5133         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5134         (do_map_enable_delete_breakpoint): Remove.
5135         (enable_once_command, enable_count_command, enable_delete_command)
5136         (delete_trace_variable_command): Update.
5137
5138 2017-09-20  Tom Tromey  <tom@tromey.com>
5139
5140         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
5141         (bpstat_clear): Use delete.
5142         (bpstats): New constructors.
5143         (bpstat_copy, bpstat_stop_status): Use new.
5144         (dprintf_after_condition_true): Update.
5145         * breakpoint.h (bpstats::bpstats): Add constructors.
5146         (bpstats::~bpstats): Add destructor.
5147
5148 2017-09-20  Pedro Alves  <palves@redhat.com>
5149
5150         * eval.c (make_params): Delete, refactored as ...
5151         (class fake_method): ... this new type's ctor.
5152         (fake_method::~fake_method): New.
5153         (evaluate_subexp_standard): Use 'fake_method'.
5154
5155 2017-09-20  Tom Tromey  <tom@tromey.com>
5156
5157         * windows-nat.c (get_windows_debug_event, windows_wait)
5158         (do_initial_windows_stuff, windows_attach): Update.
5159         * utils.c (vwarning, internal_vproblem): Update.
5160         (ui_unregister_input_event_handler_cleanup)
5161         (prepare_to_handle_input): Remove.
5162         (class scoped_input_handler): New.
5163         (defaulted_query, prompt_for_continue): Update.
5164         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5165         Update.
5166         * top.c (undo_terminal_modifications_before_exit): Update.
5167         * target/target.h (target_terminal_init, target_terminal_inferior)
5168         (target_terminal_ours): Don't declare.
5169         (class target_terminal): New.
5170         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5171         (target_terminal_ours_for_output)
5172         (make_cleanup_restore_target_terminal): Don't declare.
5173         (target_terminal_info): Remove.
5174         * target.c (enum terminal_state, terminal_state): Remove.
5175         (target_terminal::terminal_state): Define.
5176         (target_terminal::init): Rename from target_terminal_init.
5177         (target_terminal::inferior): Rename from
5178         target_terminal_inferior.
5179         (target_terminal::ours): Rename from target_terminal_ours.
5180         (target_terminal::ours_for_output): Rename from
5181         target_terminal_ours_for_output.
5182         (target_terminal::info): New method.
5183         (cleanup_restore_target_terminal)
5184         (make_cleanup_restore_target_terminal): Remove.
5185         * solib.c (handle_solib_event): Update.
5186         * remote.c (remote_serial_quit_handler): Update.
5187         (remote_terminal_inferior, remote_wait_as): Update.
5188         * record-full.c (record_full_wait_1): Update.
5189         * nto-procfs.c (procfs_create_inferior): Update.
5190         * nat/fork-inferior.c (startup_inferior): Update.
5191         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5192         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5193         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5194         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5195         (mi_breakpoint_created, mi_breakpoint_deleted)
5196         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5197         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5198         (mi_user_selected_context_changed, report_initial_inferior):
5199         Update.
5200         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5201         (linux_nat_terminal_inferior): Update.
5202         * infrun.c (follow_fork_inferior)
5203         (handle_vfork_child_exec_or_exit, do_target_resume)
5204         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5205         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5206         Update.
5207         * inflow.c (child_terminal_init, info_terminal_command): Update.
5208         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5209         (attach_command): Update.
5210         * infcall.c (call_thread_fsm_should_stop): Update.
5211         * gnu-nat.c (gnu_attach): Update.
5212         * extension.c (struct active_ext_lang_state)
5213         (restore_active_ext_lang): Update.
5214         * exceptions.c (print_flush): Update.
5215         * event-top.c (async_enable_stdin, default_quit_handler): Update.
5216         (struct quit_handler_cleanup_data, restore_quit_handler)
5217         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5218         Remove.
5219         * cp-support.c (gdb_demangle): Update.
5220         * breakpoint.c (update_inserted_breakpoint_locations)
5221         (insert_breakpoint_locations, handle_jit_event)
5222         (disable_breakpoints_in_unloaded_shlib): Update.
5223         * annotate.c (annotate_breakpoints_invalid)
5224         (annotate_frames_invalid): Update.
5225
5226 2017-09-20  Tom Tromey  <tom@tromey.com>
5227
5228         * main.c (catch_command_errors): Rename from
5229         catch_command_errors_const.
5230         (captured_main_1): Update.
5231
5232 2017-09-20  Pedro Alves  <palves@redhat.com>
5233
5234         * cli/cli-cmds.c (list_command): Use print_sal_location.
5235         (print_sal_location): New function.
5236         (ambiguous_line_spec): Use print_sal_location.
5237         * linespec.c (symbol_to_sal): Record the symbol in the sal.
5238         * symtab.c (find_function_start_sal): Likewise.
5239         * symtab.h (symtab_and_line::symbol): New field.
5240
5241 2017-09-20  Pedro Alves  <palves@redhat.com>
5242
5243         * linespec.c (minsym_found): Handle non-text minsyms.
5244         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5245
5246 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5247
5248         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5249         backslash.
5250
5251 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5252
5253         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5254         vmovups instead vmovaps.
5255         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5256
5257 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
5258
5259         * NEWS (Changes since GDB 8.0): Add starti.
5260         * infcmd.c (enum run_break): New.
5261         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5262         case.
5263         (run_command): Use enum run_how.
5264         (start_command): Likewise.
5265         (starti_command): New function.
5266         (RUN_ARGS_HELP): New macro.
5267         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5268         commands.  Add starti command.
5269
5270 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5271
5272         * Makefile.in (monitor.o): Remove the rule.
5273
5274 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5275
5276         * annotate.h (struct annotate_arg_emitter): Use
5277         DISABLE_COPY_AND_ASSIGN.
5278         * common/refcounted-object.h (refcounted_object): Likewise.
5279         * completer.h (struct completion_result): Likewise.
5280         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5281         * filename-seen-cache.h (filename_seen_cache): Likewise.
5282         * gdbcore.h (thread_section_name): Likewise.
5283         * gdb_regex.h (compiled_regex): Likewise.
5284         * gdbthread.h (scoped_restore_current_thread): Likewise.
5285         * inferior.h (scoped_restore_current_inferior): Likewise.
5286         * jit.c (jit_reader): Likewise.
5287         * linespec.h (struct linespec_result): Likewise.
5288         * mi/mi-parse.h (struct mi_parse): Likewise.
5289         * nat/fork-inferior.c (execv_argv): Likewise.
5290         * progspace.h (scoped_restore_current_program_space): Likewise.
5291         * python/python-internal.h (class gdbpy_enter): Likewise.
5292         * regcache.h (regcache): Likewise.
5293         * target-descriptions.c (struct tdesc_reg): Likewise.
5294         (struct tdesc_type): Likewise.
5295         (struct tdesc_feature): Likewise.
5296         * ui-out.h (ui_out_emit_type): Likewise.
5297
5298 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
5299
5300         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5301         label abort_expression.
5302
5303 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5304
5305         * common/buffer.c (buffer_xml_printf): Adjust.
5306         * common/xml-utils.c (xml_escape_text): Change return type to
5307         std::string, update code accordingly.
5308         * common/xml-utils.h (xml_escape_text): Change return type to
5309         std::string.
5310         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5311         * windows-tdep.c (windows_xfer_shared_library): Adjust.
5312         * unittests/xml-utils-selftests.c (test_xml_escape_text):
5313         Adjust.
5314
5315 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5316
5317         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5318         (SUBDIR_UNITTESTS_OBS): Add new object file.
5319         * unittests/xml-utils-selftests.c: New file.
5320
5321 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5322
5323         * common/selftest.h (selftest): New struct/interface.
5324         (register_test): Add name parameter, add new overload.
5325         (run_tests): Add filter parameter.
5326         (for_each_selftest_ftype): New typedef.
5327         (for_each_selftest): New declaration.
5328         * common/selftest.c (tests): Change type to
5329         map<string, unique_ptr<selftest>>.
5330         (simple_selftest): New struct.
5331         (register_test): New function.
5332         (register_test): Add name parameter and use it.
5333         (run_tests): Add filter parameter and use it.  Add prints.
5334         Adjust to vector -> map change.
5335         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5336         registering selftests.
5337         * arm-tdep.c (_initialize_arm_tdep): Likewise.
5338         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5339         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5340         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5341         * findvar.c (_initialize_findvar): Likewise.
5342         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5343         * maint.c (maintenance_selftest): Update call to run_tests.
5344         (maintenance_info_selftests): New function.
5345         (_initialize_maint_cmds): Register "maintenance info selftests"
5346         command.  Update "maintenance selftest" doc.
5347         * regcache.c (_initialize_regcache): Add names when registering
5348         selftests.
5349         * rust-exp.y (_initialize_rust_exp): Likewise.
5350         * selftest-arch.c (gdbarch_selftest): New struct.
5351         (gdbarch_tests): Remove.
5352         (register_test_foreach_arch): Add name parameter.  Call
5353         register_test.
5354         (tests_with_arch): Remove, move most content to
5355         gdbarch_selftest::operator().
5356         (_initialize_selftests_foreach_arch): Remove.
5357         * selftest-arch.h (register_test_foreach_arch): Add name
5358         parameter.
5359         (run_tests_with_arch): New declaration.
5360         * utils-selftests.c (_initialize_utils_selftests): Add names
5361         when registering selftests.
5362         * utils.c (_initialize_utils): Likewise.
5363         * unittests/array-view-selftests.c
5364         (_initialize_array_view_selftests): Likewise.
5365         * unittests/environ-selftests.c (_initialize_environ_selftests):
5366         Likewise.
5367         * unittests/function-view-selftests.c
5368         (_initialize_function_view_selftests): Likewise.
5369         * unittests/offset-type-selftests.c
5370         (_initialize_offset_type_selftests): Likewise.
5371         * unittests/optional-selftests.c
5372         (_initialize_optional_selftests): Likewise.
5373         * unittests/scoped_restore-selftests.c
5374         (_initialize_scoped_restore_selftests): Likewise.
5375         * NEWS: Document "maintenance selftest" and "maint info
5376         selftests".
5377
5378 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5379
5380         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5381         scoped_restore.
5382
5383 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5384
5385         * mi/mi-main.c (mi_load_progress): Make uiout variable
5386         a unique_ptr.
5387
5388 2017-09-15  Pedro Alves  <palves@redhat.com>
5389
5390         * compile/compile-c-types.c (convert_enum, convert_int)
5391         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5392
5393 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
5394
5395         * dwarf2read.c (copy_string): Remove.
5396         (parse_macro_definition): Replace copy_string with savestring.
5397
5398 2017-09-15  Yao Qi  <yao.qi@linaro.org>
5399
5400         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5401         gdb_target_obs.
5402         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5403         Likewise.
5404         (i[34567]86-*-linux*): Likewise.
5405
5406 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5407
5408         * dwarf2expr.h (dwarf_stack_value): Add constructor.
5409         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5410         <stack>: Change type to std::vector.
5411         <stack_len, stack_allocated>: Remove.
5412         <grow_stack>: Remove.
5413         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5414         (dwarf_expr_context::~dwarf_expr_context): Remove.
5415         (dwarf_expr_context::grow_stack): Remove.
5416         (dwarf_expr_context::push): Adjust.
5417         (dwarf_expr_context::pop): Adjust.
5418         (dwarf_expr_context::fetch): Adjust.
5419         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5420         (dwarf_expr_context::stack_empty_p): Adjust.
5421         (dwarf_expr_context::execute_stack_op): Adjust.
5422
5423 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5424
5425         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5426         return type to bool.
5427         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5428
5429 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5430
5431         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5432         Change type to bool.
5433         (dwarf_stack_value) <in_stack_memory>: Likewise.
5434         (dwarf_expr_context) <push_address>: Change parameter type to
5435         bool.
5436         <fetch_in_stack_memory>: Change return type to bool.
5437         <push>: Change parameter type to bool.
5438         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5439         to bool.
5440         (dwarf_expr_context::push_address): Likewise.
5441         (dwarf_expr_context::fetch_in_stack_memory): Change return type
5442         to bool.
5443         (dwarf_expr_context::execute_stack_op): Adjust.
5444         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5445
5446 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5447
5448         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5449         (struct dwarf_expr_context) <n_pieces>: Remove.
5450         <pieces>: Change type to std::vector.
5451         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5452         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5453         pieces.
5454         (dwarf_expr_context::add_piece): Adjust.
5455         * dwarf2loc.c (struct piece_closure): Initialize fields.
5456         <n_pieces>: Remove.
5457         <pieces>: Change type to std::vector.
5458         (allocate_piece_closure): Adjust, change parameter to
5459         std::vector rvalue and std::move it to piece_closure.
5460         (rw_pieced_value): Adjust.
5461         (check_pieced_synthetic_pointer): Adjust.
5462         (indirect_synthetic_pointer): Adjust.
5463         (coerce_pieced_ref): Adjust.
5464         (free_pieced_value_closure):  Adjust.  Use delete to free
5465         piece_closure.
5466         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
5467         to allocate_piece_closure.
5468         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5469
5470 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5471
5472         * probe.h (probe_ops_cp): Remove typedef.
5473         (DEF_VEC_P (probe_ops_cp)): Remove.
5474         (all_probe_ops): Change type to std::vector.
5475         * probe.c (info_probes_for_ops): Adjust to vector change.
5476         (probe_linespec_to_ops): Likewise.
5477         (all_probe_ops): Change type to std::vector.
5478         (_initialize_probe): Adjust to vector change.
5479         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5480         * elfread.c (elf_get_probes): Likewise.
5481         * stap-probe.c (_initialize_stap_probe): Likewise.
5482
5483 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5484
5485         * probe.h (struct bound_probe): Define constructors.
5486         * probe.c (bound_probe_s): Remove typedef.
5487         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5488         (collect_probes): Change return type to std::vector, remove
5489         cleanup.
5490         (compare_probes): Return bool, change parameter type.  Change
5491         semantic to "less than".
5492         (gen_ui_out_table_header_info): Change parameter to std::vector
5493         and update.
5494         (exists_probe_with_pops): Likewise.
5495         (info_probes_for_ops): Update to std::vector change.
5496         (enable_probes_command): Likewise.
5497         (disable_probes_command): Likewise.
5498
5499 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5500
5501         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5502         vec to std::vector.
5503         * probe.c (parse_probes_in_pspace): Update.
5504         (find_probes_in_objfile): Update.
5505         (find_probe_by_pc): Update.
5506         (collect_probes): Update.
5507         (probe_any_get_probes): Update.
5508         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5509         return type to reference to std::vector.
5510         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5511         std::vector and update.
5512         (dtrace_process_dof): Likewise.
5513         (dtrace_get_probes): Likewise.
5514         * elfread.c (elf_get_probes): Change return type to std::vector,
5515         store an std::vector in bfd_data.
5516         (probe_key_free): Update to std::vector.
5517         * stap-probe.c (handle_stap_probe): Change parameter to
5518         std::vector and update.
5519         (stap_get_probes): Likewise.
5520         * symfile-debug.c (debug_sym_get_probes): Change return type to
5521         std::vector and update.
5522
5523 2017-09-11  Tom Tromey  <tom@tromey.com>
5524
5525         * breakpoint.c (program_breakpoint_here_p): Update.
5526         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5527         from make_show_memory_breakpoints_cleanup.  Return a
5528         scoped_restore_tmpl<int>.
5529         (restore_show_memory_breakpoints): Remove.
5530         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5531         * mem-break.c (memory_validate_breakpoint): Update.
5532         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5533         (ia64_memory_remove_breakpoint): Update.
5534         (ia64_breakpoint_from_pc): Update.
5535         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5536         from make_show_memory_breakpoints_cleanup.
5537
5538 2017-09-11  Tom Tromey  <tom@tromey.com>
5539
5540         * d-namespace.c (d_lookup_symbol): Use std::string.
5541         (find_symbol_in_baseclass): Likewise.
5542
5543 2017-09-11  Tom Tromey  <tom@tromey.com>
5544
5545         * ctf.c (ctf_start): Use std::string.
5546
5547 2017-09-11  Tom Tromey  <tom@tromey.com>
5548
5549         * ada-lang.c (is_known_support_routine): Update.
5550         (ada_unhandled_exception_name_addr_from_raise): Update.
5551         * guile/scm-frame.c (gdbscm_frame_name): Update.
5552         * python/py-frame.c (frapy_name): Update.
5553         (frapy_function): Update.
5554         * stack.h (find_frame_funname): Update.
5555         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5556         (print_frame): Update.
5557
5558 2017-09-11  Tom Tromey  <tom@tromey.com>
5559
5560         * findcmd.c (put_bits): Take a gdb::byte_vector.
5561         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5562         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5563         cleanups.
5564         (find_command): Update.
5565
5566 2017-09-11  Tom Tromey  <tom@tromey.com>
5567
5568         * cli/cli-script.c (class scoped_restore_hook_in): New.
5569         (clear_hook_in_cleanup): Remove.
5570         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5571         scoped_restore_hook_in.
5572
5573 2017-09-11  Tom Tromey  <tom@tromey.com>
5574
5575         * cli/cli-script.c (restore_interp): Remove.
5576         (read_command_lines): Use scoped_restore_interp.
5577         * interps.c (scoped_restore_interp::set_temp): Rename from
5578         interp_set_temp.
5579         * interps.h (class scoped_restore_interp): New.
5580         (interp_set_temp): Remove.
5581
5582 2017-09-11  Tom Tromey  <tom@tromey.com>
5583
5584         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5585         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5586         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5587         scoped_restore.
5588         (mi_cmd_break_insert_1): Update.
5589         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5590         scoped_restore.
5591
5592 2017-09-11  Tom Tromey  <tom@tromey.com>
5593
5594         * demangle.c (demangle_command): Update.
5595         * breakpoint.c (disable_command): Update.
5596         (enable_command): Update.
5597         (find_location_by_number): Make "number" const.  Use
5598         get_number_trailer.
5599         * cli/cli-utils.c (extract_arg): Return std::string.
5600         * probe.c (parse_probe_linespec): Update.  Change types.
5601         (collect_probes): Take string arguments.
5602         (parse_probe_linespec): Likewise.
5603         (info_probes_for_ops): Update.
5604         (enable_probes_command): Update.
5605         (disable_probes_command): Update.
5606         * break-catch-sig.c (catch_signal_split_args): Update.
5607         * mi/mi-parse.c (mi_parse): Update.
5608
5609 2017-09-11  Tom Tromey  <tom@tromey.com>
5610
5611         * language.h (language_enum): Make argument const.
5612         * language.c (language_enum): Make argument const.
5613
5614 2017-09-11  Tom Tromey  <tom@tromey.com>
5615
5616         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5617         as function.
5618         (skip_to_space): Rename from skip_to_space_const.
5619         * common/common-utils.c (skip_to_space): New function.
5620         (skip_to_space): Rename from skip_to_space_const.
5621         * cli/cli-utils.h (get_number): Rename from get_number_const.
5622         (extract_arg): Rename from extract_arg_const.
5623         * cli/cli-utils.c (get_number): Rename from get_number_const.
5624         (extract_arg): Rename from extract_arg_const.
5625         (number_or_range_parser::get_number): Use ::get_number.
5626         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5627         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5628         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5629         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5630         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5631         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5632         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5633         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5634
5635 2017-09-11  Tom Tromey  <tom@tromey.com>
5636
5637         * python/python.c (do_start_initialization): Use
5638         py-event-types.def to initialize types.
5639         Define all object type structures.
5640         * python/python-internal.h: Don't declare event initialization
5641         functions.
5642         * python/py-threadevent.c (thread_event_object_type): Don't
5643         define.
5644         * python/py-stopevent.c (stop_event_object_type): Don't define.
5645         * python/py-signalevent.c (signal_event_object_type): Don't
5646         declare or define.
5647         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5648         (clear_objfiles_event_object_type): Don't declare or define.
5649         * python/py-infevents.c (inferior_call_pre_event_object_type)
5650         (inferior_call_post_event_object_type)
5651         (register_changed_event_object_type)
5652         (memory_changed_event_object_type): Don't declare or define.
5653         * python/py-inferior.c (new_thread_event_object_type)
5654         (new_inferior_event_object_type)
5655         (inferior_deleted_event_object_type): Don't declare or define.
5656         * python/py-exitedevent.c (exited_event_object_type): Don't
5657         declare or define.
5658         * python/py-evts.c (gdbpy_initialize_py_events): Use
5659         py-all-events.def.
5660         * python/py-events.h (thread_event_object_type): Don't declare.
5661         (events_object): Use py-all-events.def.
5662         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5663         py-event-types.def.
5664         * python/py-event-types.def: New file.
5665         * python/py-continueevent.c (create_continue_event_object): Don't
5666         declare or define.
5667         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5668         declare or define.
5669         * python/py-all-events.def: New file.
5670
5671 2017-09-11  Tom Tromey  <tom@tromey.com>
5672
5673         * python/py-threadevent.c (create_thread_event_object): Return
5674         gdbpy_ref.
5675         * python/py-stopevent.h (create_stop_event_object)
5676         (create_breakpoint_event_object, create_signal_event_object):
5677         Update.
5678         * python/py-stopevent.c (create_stop_event_object): Return
5679         gdbpy_ref.
5680         (emit_stop_event): Update.
5681         * python/py-signalevent.c (create_signal_event_object): Return
5682         gdbpy_ref.
5683         * python/py-infevents.c (create_inferior_call_event_object):
5684         Update.
5685         * python/py-event.h (create_event_object)
5686         (create_thread_event_object): Update.
5687         * python/py-event.c (create_event_object): Return gdbpy_ref.
5688         * python/py-continueevent.c: Return gdbpy_ref.
5689         * python/py-bpevent.c (create_breakpoint_event_object): Return
5690         gdbpy_ref.
5691
5692 2017-09-11  Tom Tromey  <tom@tromey.com>
5693
5694         PR python/15622:
5695         * NEWS: Add entry.
5696         * python/python.c (do_start_initialization): Initialize new event
5697         types.
5698         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5699         (gdbpy_initialize_inferior_deleted_event)
5700         (gdbpy_initialize_new_thread_event): Declare.
5701         * python/py-threadevent.c (create_thread_event_object): Add option
5702         "thread" parameter.
5703         * python/py-inferior.c (new_thread_event_object_type)
5704         (new_inferior_event_object_type)
5705         (inferior_deleted_event_object_type): Declare.
5706         (python_new_inferior, python_inferior_deleted): New functions.
5707         (add_thread_object): Emit new_thread event.
5708         (gdbpy_initialize_inferior): Attach new functions to corresponding
5709         observers.
5710         (new_thread, new_inferior, inferior_deleted): Define new event
5711         types.
5712         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5713         registries.
5714         * python/py-events.h (events_object) <new_inferior,
5715         inferior_deleted, new_thread>: New fields.
5716         * python/py-event.h (create_thread_event_breakpoint): Add optional
5717         "thread" parameter.
5718
5719 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5720
5721         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5722         check current_ui instead.
5723         (internal_vproblem): Likewise.
5724
5725 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5726
5727         * thread.c (print_thread_info_1): Remove unnecessary calls to
5728         uiout->is_mi_like_p.
5729
5730 2017-09-09  Tom Tromey  <tom@tromey.com>
5731
5732         * namespace.h (add_using_directive): Update.
5733         * namespace.c (add_using_directive): Change type of excludes to
5734         std::vector.
5735         * dwarf2read.c (read_import_statement): Use std::vector.
5736         (read_namespace): Update.
5737         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5738
5739 2017-09-09  Tom Tromey  <tom@tromey.com>
5740
5741         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5742
5743 2017-09-09  Tom Tromey  <tom@tromey.com>
5744
5745         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5746
5747 2017-09-09  Tom Tromey  <tom@tromey.com>
5748
5749         * stack.c (func_command): Use gdb::def_vector.
5750
5751 2017-09-09  Tom Tromey  <tom@tromey.com>
5752
5753         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5754         ui_out_emit_list, ui_out_emit_tuple.
5755         (mi_cmd_var_update): Likewise.
5756
5757 2017-09-09  Tom Tromey  <tom@tromey.com>
5758
5759         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5760         ui_out_redirect_pop.
5761         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5762         ui_out_redirect_pop.
5763         * utils.c (do_ui_out_redirect_pop)
5764         (make_cleanup_ui_out_redirect_pop): Remove.
5765         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5766         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5767         * ui-out.h (ui_out_redirect_pop): New class.
5768
5769 2017-09-09  Tom Tromey  <tom@tromey.com>
5770
5771         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5772         (list_available_thread_groups, mi_cmd_list_thread_groups)
5773         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5774         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5775         Likewise.
5776
5777 2017-09-09  Tom Tromey  <tom@tromey.com>
5778
5779         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5780         ui_out_emit_tuple.
5781
5782 2017-09-09  Tom Tromey  <tom@tromey.com>
5783
5784         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5785         * stack.c (print_frame): Use ui_out_emit_tuple.
5786         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5787         (info_spu_mailbox_command, info_spu_dma_command)
5788         (info_spu_proxydma_command): Likewise.
5789         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5790         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5791         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5792         ui_out_emit_tuple.
5793         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5794
5795 2017-09-09  Tom Tromey  <tom@tromey.com>
5796
5797         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5798         (class ui_out_emit_table): Update comment.
5799         * ui-out.c (do_cleanup_table_end)
5800         (make_cleanup_ui_out_table_begin_end): Remove.
5801         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5802         (info_spu_dma_cmdlist): Likewise.
5803         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5804         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5805         ui_out_emit_table.
5806
5807 2017-09-09  Tom Tromey  <tom@tromey.com>
5808
5809         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5810         ui_out_emit_list, gdb::optional.
5811
5812 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5813
5814         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5815         prototype.
5816         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5817         prototype.
5818         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5819         prototype.
5820         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5821         * ada-exp.y: Remove _initialize_ada_exp prototype.
5822         * ada-lang.c: Remove _initialize_ada_language prototype.
5823         * ada-tasks.c: Remove _initialize_tasks prototype.
5824         * addrmap.c: Remove _initialize_addrmap prototype.
5825         * agent.c: Remove _initialize_agent prototype.
5826         * aix-thread.c: Remove _initialize_aix_thread prototype.
5827         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5828         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5829         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5830         prototype.
5831         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5832         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5833         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5834         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5835         prototype.
5836         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5837         prototype.
5838         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5839         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5840         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5841         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5842         prototype.
5843         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5844         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5845         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5846         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5847         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5848         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5849         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5850         prototype.
5851         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5852         prototype.
5853         * annotate.c: Remove _initialize_annotate prototype.
5854         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5855         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5856         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5857         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5858         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5859         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5860         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5861         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5862         prototype.
5863         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5864         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5865         * auto-load.c: Remove _initialize_auto_load prototype.
5866         * auxv.c: Remove _initialize_auxv prototype.
5867         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5868         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5869         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5870         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5871         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5872         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5873         prototype.
5874         * break-catch-throw.c: Remove _initialize_break_catch_throw
5875         prototype.
5876         * breakpoint.c: Remove _initialize_breakpoint prototype.
5877         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5878         * btrace.c: Remove _initialize_btrace prototype.
5879         * charset.c: Remove _initialize_charset prototype.
5880         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5881         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5882         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5883         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5884         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5885         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5886         * coffread.c: Remove _initialize_coffread prototype.
5887         * compile/compile.c: Remove _initialize_compile prototype.
5888         * complaints.c: Remove _initialize_complaints prototype.
5889         * completer.c: Remove _initialize_completer prototype.
5890         * copying.awk: Remove _initialize_copying prototype.
5891         * copying.c: Regenerate.
5892         * core-regset.c: Remove _initialize_core_regset prototype.
5893         * corefile.c: Remove _initialize_core prototype.
5894         * corelow.c: Remove _initialize_corelow prototype.
5895         * cp-abi.c: Remove _initialize_cp_abi prototype.
5896         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5897         * cp-support.c: Remove _initialize_cp_support prototype.
5898         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5899         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5900         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5901         * ctf.c: Remove _initialize_ctf prototype.
5902         * d-lang.c: Remove _initialize_d_language prototype.
5903         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5904         prototype.
5905         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5906         * dbxread.c: Remove _initialize_dbxread prototype.
5907         * dcache.c: Remove _initialize_dcache prototype.
5908         * demangle.c: Remove _initialize_demangler prototype.
5909         * disasm-selftests.c: Remove _initialize_disasm_selftests
5910         prototype.
5911         * disasm.c: Remove _initialize_disasm prototype.
5912         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5913         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5914         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5915         prototype.
5916         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5917         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5918         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5919         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5920         * elfread.c: Remove _initialize_elfread prototype.
5921         * exec.c: Remove _initialize_exec prototype.
5922         * extension.c: Remove _initialize_extension prototype.
5923         * f-lang.c: Remove _initialize_f_language prototype.
5924         * f-valprint.c: Remove _initialize_f_valprint prototype.
5925         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5926         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5927         * filesystem.c: Remove _initialize_filesystem prototype.
5928         * findcmd.c: Remove _initialize_mem_search prototype.
5929         * fork-child.c: Remove _initialize_fork_child prototype.
5930         * frame-base.c: Remove _initialize_frame_base prototype.
5931         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5932         * frame.c: Remove _initialize_frame prototype.
5933         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5934         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5935         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5936         * gcore.c: Remove _initialize_gcore prototype.
5937         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5938         * gdbarch.c: Regenerate.
5939         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5940         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5941         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5942         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5943         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5944         * go-lang.c: Remove _initialize_go_language prototype.
5945         * go32-nat.c: Remove _initialize_go32_nat prototype.
5946         * guile/guile.c: Remove _initialize_guile prototype.
5947         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5948         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5949         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5950         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5951         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5952         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5953         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5954         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5955         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5956         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5957         prototype.
5958         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5959         prototype.
5960         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5961         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5962         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5963         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5964         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5965         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5966         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5967         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5968         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5969         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5970         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5971         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5972         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5973         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5974         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5975         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5976         prototype.
5977         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5978         prototype.
5979         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5980         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5981         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5982         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5983         * infcall.c: Remove _initialize_infcall prototype.
5984         * infcmd.c: Remove _initialize_infcmd prototype.
5985         * inferior.c: Remove _initialize_inferiors prototype.
5986         * inflow.c: Remove _initialize_inflow prototype.
5987         * infrun.c: Remove _initialize_infrun prototype.
5988         * interps.c: Remove _initialize_interpreter prototype.
5989         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5990         * jit.c: Remove _initialize_jit prototype.
5991         * language.c: Remove _initialize_language prototype.
5992         * linux-fork.c: Remove _initialize_linux_fork prototype.
5993         * linux-nat.c: Remove _initialize_linux_nat prototype.
5994         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5995         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5996         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5997         * m2-lang.c: Remove _initialize_m2_language prototype.
5998         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5999         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6000         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6001         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6002         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6003         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6004         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6005         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6006         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6007         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6008         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6009         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6010         * machoread.c: Remove _initialize_machoread prototype.
6011         * macrocmd.c: Remove _initialize_macrocmd prototype.
6012         * macroscope.c: Remove _initialize_macroscope prototype.
6013         * maint.c: Remove _initialize_maint_cmds prototype.
6014         * mdebugread.c: Remove _initialize_mdebugread prototype.
6015         * memattr.c: Remove _initialize_mem prototype.
6016         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6017         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6018         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6019         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6020         * mi/mi-main.c: Remove _initialize_mi_main prototype.
6021         * microblaze-linux-tdep.c: Remove
6022         _initialize_microblaze_linux_tdep prototype.
6023         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6024         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6025         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6026         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6027         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6028         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6029         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6030         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6031         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6032         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6033         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6034         prototype.
6035         * mipsread.c: Remove _initialize_mipsread prototype.
6036         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6037         prototype.
6038         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6039         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6040         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6041         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6042         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6043         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6044         prototype.
6045         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6046         * nto-procfs.c: Remove _initialize_procfs prototype.
6047         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6048         * objc-lang.c: Remove _initialize_objc_language prototype.
6049         * objfiles.c: Remove _initialize_objfiles prototype.
6050         * observer.c: Remove observer_test_first_notification_function,
6051         observer_test_second_notification_function,
6052         observer_test_third_notification_function, and
6053         _initialize_observer prototypes.
6054         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6055         * osabi.c: Remove _initialize_gdb_osabi prototype.
6056         * osdata.c: Remove _initialize_osdata prototype.
6057         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6058         * parse.c: Remove _initialize_parse prototype.
6059         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6060         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6061         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6062         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6063         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6064         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6065         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6066         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6067         * printcmd.c: Remove _initialize_printcmd prototype.
6068         * probe.c: Remove _initialize_probe prototype.
6069         * proc-api.c: Remove _initialize_proc_api prototype.
6070         * proc-events.c: Remove _initialize_proc_events prototype.
6071         * proc-service.c: Remove _initialize_proc_service prototype.
6072         * procfs.c: Remove _initialize_procfs prototype.
6073         * psymtab.c: Remove _initialize_psymtab prototype.
6074         * python/python.c: Remove _initialize_python prototype.
6075         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6076         * record-btrace.c: Remove _initialize_record_btrace prototype.
6077         * record-full.c: Remove _initialize_record_full prototype.
6078         * record.c: Remove _initialize_record prototype.
6079         * regcache.c: Remove _initialize_regcache prototype.
6080         * reggroups.c: Remove _initialize_reggroup prototype.
6081         * remote-notif.c: Remove _initialize_notif prototype.
6082         * remote-sim.c: Remove _initialize_remote_sim prototype.
6083         * remote.c: Remove _initialize_remote prototype.
6084         * reverse.c: Remove _initialize_reverse prototype.
6085         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6086         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6087         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6088         prototype.
6089         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6090         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6091         * rust-exp.y: Remove _initialize_rust_exp prototype.
6092         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6093         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6094         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6095         * score-tdep.c: Remove _initialize_score_tdep prototype.
6096         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6097         prototype.
6098         * ser-go32.c: Remove _initialize_ser_dos prototype.
6099         * ser-mingw.c: Remove _initialize_ser_windows prototype.
6100         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6101         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6102         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6103         * serial.c: Remove _initialize_serial prototype.
6104         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6105         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6106         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6107         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6108         * skip.c: Remove _initialize_step_skip prototype.
6109         * sol-thread.c: Remove _initialize_sol_thread prototype.
6110         * solib-aix.c: Remove _initialize_solib_aix prototype.
6111         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6112         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6113         * solib-frv.c: Remove _initialize_frv_solib prototype.
6114         * solib-spu.c: Remove _initialize_spu_solib prototype.
6115         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6116         * solib-target.c: Remove _initialize_solib_target prototype.
6117         * solib.c: Remove _initialize_solib prototype.
6118         * source.c: Remove _initialize_source prototype.
6119         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6120         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6121         prototype.
6122         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6123         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6124         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6125         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6126         prototype.
6127         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6128         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6129         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6130         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6131         prototype.
6132         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6133         prototype.
6134         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6135         prototype.
6136         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6137         prototype.
6138         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6139         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6140         prototype.
6141         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6142         prototype.
6143         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6144         prototype.
6145         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6146         prototype.
6147         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6148         prototype.
6149         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6150         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6151         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6152         * stabsread.c: Remove _initialize_stabsread prototype.
6153         * stack.c: Remove _initialize_stack prototype.
6154         * stap-probe.c: Remove _initialize_stap_probe prototype.
6155         * std-regs.c: Remove _initialize_frame_reg prototype.
6156         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6157         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6158         * symfile.c: Remove _initialize_symfile prototype.
6159         * symmisc.c: Remove _initialize_symmisc prototype.
6160         * symtab.c: Remove _initialize_symtab prototype.
6161         * target-dcache.c: Remove _initialize_target_dcache prototype.
6162         * target-descriptions.c: Remove _initialize_target_descriptions
6163         prototype.
6164         * thread.c: Remove _initialize_thread prototype.
6165         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6166         prototype.
6167         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6168         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6169         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6170         prototype.
6171         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6172         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6173         * tracefile.c: Remove _initialize_tracefile prototype.
6174         * tracepoint.c: Remove _initialize_tracepoint prototype.
6175         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6176         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6177         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6178         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6179         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6180         * tui/tui-win.c: Remove _initialize_tui_win prototype.
6181         * tui/tui.c: Remove _initialize_tui prototype.
6182         * typeprint.c: Remove _initialize_typeprint prototype.
6183         * user-regs.c: Remove _initialize_user_regs prototype.
6184         * utils.c: Remove _initialize_utils prototype.
6185         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6186         * valarith.c: Remove _initialize_valarith prototype.
6187         * valops.c: Remove _initialize_valops prototype.
6188         * valprint.c: Remove _initialize_valprint prototype.
6189         * value.c: Remove _initialize_values prototype.
6190         * varobj.c: Remove _initialize_varobj prototype.
6191         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6192         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6193         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6194         * windows-nat.c: Remove _initialize_windows_nat,
6195         _initialize_check_for_gdb_ini, and _initialize_loadable
6196         prototypes.
6197         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6198         * xcoffread.c: Remove _initialize_xcoffread prototype.
6199         * xml-support.c: Remove _initialize_xml_support prototype.
6200         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6201         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6202         prototype.
6203         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6204         prototype.
6205         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6206
6207 2017-09-08  Keith Seitz  <keiths@redhat.com>
6208
6209         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6210         field.
6211
6212 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
6213
6214         * f-valprint.c (f_val_print): Remove check for one byte
6215         sized integers. Remove printing of character type.
6216
6217 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
6218             Christoph Weinmann  <christoph.t.weinmann@intel.com>
6219             Bernhard Heckel  <bernhard.heckel@intel.com>
6220
6221         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6222         to maintain proper indentation when printing pointers/refs.
6223
6224 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6225
6226         GDB 8.0.1 released.
6227
6228 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6229
6230         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6231
6232 2017-09-05  Tom Tromey  <tom@tromey.com>
6233
6234         * parse.c (funcall_chain): Now a std::vector.
6235         (start_arglist, end_arglist): Simplify.
6236         (free_funcalls): Remove.
6237         (parse_exp_in_context_1): Remove cleanup.
6238
6239 2017-09-05  Tom Tromey  <tom@tromey.com>
6240
6241         * go-exp.y (go_parse): Don't create a cleanup.
6242
6243 2017-09-05  Tom Tromey  <tom@tromey.com>
6244
6245         * d-exp.y (PrimaryExpression): Use std::string.
6246         (d_parse): Don't create a cleanup.
6247
6248 2017-09-05  Tom Tromey  <tom@tromey.com>
6249
6250         * utils.c (do_clear_parser_state): Remove.
6251         (make_cleanup_clear_parser_state): Remove.
6252         * p-exp.y (pascal_parse): Use scoped_restore.
6253         * m2-exp.y (m2_parse): Use scoped_restore.
6254         * f-exp.y (f_parse): Use scoped_restore.
6255         * d-exp.y (d_parse): Use scoped_restore.
6256         * c-exp.y (c_parse): Use scoped_restore.
6257         * ada-exp.y (ada_parse): Use scoped_restore.
6258         * utils.h (make_cleanup_clear_parser_state): Remove.
6259
6260 2017-09-06  Keith Seitz  <keiths@redhat.com>
6261
6262         * dwarf2read.c (dw2_linkage_name_attr): New function.
6263         (dw2_linkage_name): New function.
6264         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6265         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6266         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6267
6268 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6269
6270         * config/djgpp/djconfig.sh: Correct shell portability issue.
6271
6272 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6273
6274         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6275
6276 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6277
6278         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6279         * NEWS: Mention new FreeBSD/mips native configuration.
6280         * configure.host: Add aarch64*-*-freebsd*.
6281         * configure.nat: Likewise.
6282         * aarch64-fbsd-nat.c: New file.
6283
6284 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6285
6286         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6287         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6288         * NEWS: Mention new FreeBSD/aarch64 target.
6289         * configure.tgt: Add aarch64*-*-freebsd*.
6290         * aarch64-fbsd-tdep.c: New file.
6291         * aarch64-fbsd-tdep.h: New file.
6292
6293 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6294
6295         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6296
6297 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6298
6299         * parse.c (find_minsym_type_and_address): Don't relocate addresses
6300         of TLS symbols.
6301
6302 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6303
6304         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6305         call.
6306
6307 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6308
6309         * infrun.c (follow_exec): Call add_thread after
6310         target_find_description.
6311
6312 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6313
6314         * infrun.c (handle_inferior_event_1): When exec'ing, read
6315         stop_pc after follow_exec.
6316
6317 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6318
6319         * remote.c (process_g_packet): Update error message.
6320
6321 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6322
6323         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6324         targets.
6325
6326 2017-09-05  Pedro Alves  <palves@redhat.com>
6327
6328         * eval.c (eval_call, evaluate_funcall): New functions, factored
6329         out from ...
6330         (evaluate_subexp_standard): ... this.
6331
6332 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6333
6334         * amd64-tdep.c (amd64_target_description): Create target
6335         descriptions.
6336         (_initialize_amd64_tdep): Don't call functions
6337         initialize_tdesc_amd64_*.  Add self tests.
6338         * arch/amd64.c (amd64_create_target_description): Add parameter
6339         is_linux.  Call set_tdesc_osabi if is_linux is true.
6340         * arch/amd64.h (amd64_create_target_description): Update the
6341         declaration.
6342         * arch/i386.c (i386_create_target_description): Add parameter
6343         is_linux.  Call set_tdesc_osabi if is_linux is true.
6344         * arch/i386.h (i386_create_target_description): Update
6345         declaration.
6346         * configure.tgt: Add i386.o to gdb_target_obs.
6347         * features/Makefile (XMLTOC): Remove i386/*.xml.
6348         * features/i386/amd64-avx-avx512.c: Remove.
6349         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6350         * features/i386/amd64-avx-mpx.c: Remove.
6351         * features/i386/amd64-avx.c: Remove.
6352         * features/i386/amd64-mpx.c: Remove.
6353         * features/i386/amd64.c: Remove.
6354         * features/i386/i386-avx-avx512.c: Remove.
6355         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6356         * features/i386/i386-avx-mpx.c: Remove.
6357         * features/i386/i386-avx.c: Remove.
6358         * features/i386/i386-mmx.c: Remove.
6359         * features/i386/i386-mpx.c: Remove.
6360         * features/i386/i386.c: Remove.
6361         * i386-tdep.c: Don't include features/i386/i386*.c., include
6362         target-descriptions.h and arch/i386.h.
6363         (i386_target_description): Create target descriptions.
6364         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6365         functions.  Do self tests.
6366
6367 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6368
6369         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6370         * features/i386/amd64-avx-avx512-linux.c: Removed.
6371         * features/i386/amd64-avx-linux.c: Removed.
6372         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6373         * features/i386/amd64-avx-mpx-linux.c: Removed.
6374         * features/i386/amd64-linux.c: Removed.
6375         * features/i386/amd64-mpx-linux.c: Removed.
6376         * features/i386/x32-avx-avx512-linux.c: Removed.
6377         * features/i386/x32-avx-linux.c: Removed.
6378         * features/i386/x32-linux.c: Removed.
6379
6380 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6381
6382         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
6383         features/i386/*.c.
6384         (amd64_linux_read_description): Call
6385         amd64_create_target_description.
6386         * arch/amd64.c: New file.
6387         * arch/amd64.h: New file.
6388         * configure.tgt (x86_64-*-linux*): Append amd64.o.
6389         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6390
6391 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6392
6393         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6394         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
6395         (amd64_linux_read_description): Create target descriptions.
6396         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6397         functions.  Add unit tests.
6398         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6399         x32-core.xml.
6400         * features/i386/64bit-avx.c: Generated.
6401         * features/i386/64bit-avx512.c: Generated.
6402         * features/i386/64bit-core.c: Generated.
6403         * features/i386/64bit-linux.c: Generated.
6404         * features/i386/64bit-mpx.c: Generated.
6405         * features/i386/64bit-pkeys.c: Generated.
6406         * features/i386/64bit-segments.c: Generated.
6407         * features/i386/64bit-sse.c: Generated.
6408         * features/i386/x32-core.c: Generated.
6409         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6410         c files for amd64-linux and x32-linux.
6411
6412 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6413
6414         * amd64-linux-tdep.c (amd64_linux_read_description): New
6415         function.
6416         (amd64_linux_core_read_description): Call
6417         amd64_linux_read_description.
6418         (amd64_linux_init_abi): Likewise.
6419         (amd64_x32_linux_init_abi): Likewise.
6420         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6421         * x86-linux-nat.c (x86_linux_read_description): Call
6422         amd64_linux_read_description.
6423
6424 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6425
6426         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6427         comments.
6428
6429 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6430
6431         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6432         * features/i386/i386-avx-avx512-linux.c: Remove.
6433         * features/i386/i386-avx-linux.c: Remove.
6434         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6435         * features/i386/i386-avx-mpx-linux.c: Remove.
6436         * features/i386/i386-linux.c: Remove.
6437         * features/i386/i386-mmx-linux.c: Remove.
6438         * features/i386/i386-mpx-linux.c: Remove.
6439
6440 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6441
6442         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6443         (SFILES): Add arch/i386.c.
6444         (HFILES_NO_SRCDIR): Add arch/i386.h.
6445         * arch/i386.c: New file.
6446         * arch/i386.h: New file.
6447         * arch/tdesc.h (allocate_target_description): Declare.
6448         (set_tdesc_architecture): Declare.
6449         (set_tdesc_osabi): Declare.
6450         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6451         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6452         include arch/i386.h.
6453         (i386_linux_read_description): Remove code and call
6454         i386_create_target_description.
6455         (set_tdesc_architecture): New function.
6456         (set_tdesc_osabi): New function.
6457         * target-descriptions.h (allocate_target_description): Remove.
6458
6459 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6460
6461         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6462         * target-descriptions.c (tdesc_create_feature): Likewise, and
6463         adjust code.
6464         * features/i386/32bit-avx.c: Re-generated.
6465         * features/i386/32bit-avx512.c: Re-generated.
6466         * features/i386/32bit-core.c: Re-generated.
6467         * features/i386/32bit-linux.c: Re-generated.
6468         * features/i386/32bit-mpx.c: Re-generated.
6469         * features/i386/32bit-pkeys.c: Re-generated.
6470         * features/i386/32bit-sse.c: Re-generated.
6471
6472 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6473
6474         * regformats/regdef.h (struct reg): Override operator == and !=.
6475
6476 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6477
6478         * arch/tdesc.h: New file.
6479         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6480         * target-descriptions.c: Update comments.
6481         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6482         declarations.
6483         * features/i386/32bit-avx.c: Re-generated.
6484         * features/i386/32bit-avx512.c: Re-generated.
6485         * features/i386/32bit-core.c: Re-generated.
6486         * features/i386/32bit-linux.c: Re-generated.
6487         * features/i386/32bit-mpx.c: Re-generated.
6488         * features/i386/32bit-pkeys.c: Re-generated.
6489         * features/i386/32bit-sse.c: Re-generated.
6490
6491 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6492
6493         * regformats/regdat.sh: Update generated code.
6494
6495 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6496
6497         * regformats/regdat.sh: Adjust code order.
6498
6499 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6500
6501         * expprint.c (dump_subexp_body_standard): Use constant format
6502         string in fprintf_filtered call.
6503
6504 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6505
6506         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6507         NetBSD/i386.
6508         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6509
6510 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6511
6512         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6513
6514 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6515
6516         * bsd-kvm.o: Define _KMEMUSER.
6517         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6518         * configure: Regenerate.
6519
6520 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6521
6522         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6523         * i386-fbsd-nat.c: Likewise.
6524
6525 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6526
6527         * unittests/array-view-selftests.c: Add include of <array>.
6528
6529 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6530
6531         * spu-tdep.c (flush_ea_cache): Add missing argument to
6532         call_function_by_hand.
6533
6534 2017-09-04  Pedro Alves  <palves@redhat.com>
6535
6536         * NEWS (Safer support for debugging with no debug info): New.
6537
6538 2017-09-04  Pedro Alves  <palves@redhat.com>
6539
6540         * c-exp.y (function_method, function_method_void): Add current
6541         instance flags to TYPE_INSTANCE.
6542         * dwarf2read.c (check_modifier): New.
6543         (compute_delayed_physnames): Assert that only C++ adds delayed
6544         physnames.  Mark fn_fields as const/volatile depending on
6545         physname.
6546         * eval.c (make_params): New type_instance_flags parameter.  Use
6547         it as the new type's instance flags.
6548         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6549         flags element and pass it to make_params.
6550         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6551         instance flags element.
6552         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6553         * gdbtypes.h: Include "enum-flags.h".
6554         (type_instance_flags): New enum-flags type.
6555         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6556         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6557         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6558         (follow_type_instance_flags): New function.
6559         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6560         * parser-defs.h (follow_type_instance_flags): Declare.
6561         * valops.c (value_struct_elt_for_reference): const/volatile must
6562         match too.
6563
6564 2017-09-04  Pedro Alves  <palves@redhat.com>
6565
6566         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6567         function/method scopes; lookup the nested name as a function local
6568         static variable.
6569
6570 2017-09-04  Pedro Alves  <palves@redhat.com>
6571
6572         (%type <voidval>): Add function_method.
6573         * c-exp.y (exp): New production for calls with no arguments.
6574         (function_method, function_method_void_or_typelist): New
6575         productions.
6576         (exp): New production for "method()::static_var".
6577         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6578         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6579         Handle OP_FUNC_STATIC_VAR.
6580         * parse.c (operator_length_standard):
6581         Handle OP_FUNC_STATIC_VAR.
6582
6583 2017-09-04  Pedro Alves  <palves@redhat.com>
6584
6585         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6586         handling.
6587         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6588         Ditto.
6589         * parse.c (operator_length_standard, operator_check_standard):
6590         Ditto.
6591         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6592
6593 2017-09-04  Pedro Alves  <palves@redhat.com>
6594
6595         * ax-gdb.c: Include "typeprint.h".
6596         (gen_expr_for_cast): New function.
6597         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6598         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6599         type is unknown.
6600         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6601         nodebug_data_symbol.
6602         * eval.c: Include "typeprint.h".
6603         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6604         Error out if symbol has unknown type.
6605         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6606         evaluate_subexp_for_cast.
6607         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6608         OP_VAR_MSYM_VALUE.
6609         (evaluate_subexp_for_cast): New function.
6610         * gdbtypes.c (init_nodebug_var_type): New function.
6611         (objfile_type): Use it to initialize types of variables with no
6612         debug info.
6613         * typeprint.c (error_unknown_type): New.
6614         * typeprint.h (error_unknown_type): New declaration.
6615         * compile/compile-c-types.c (convert_type_basic): Handle
6616         TYPE_CODE_ERROR; warn and fallback to int for variables with
6617         unknown type.
6618
6619 2017-09-04  Pedro Alves  <palves@redhat.com>
6620
6621         * eval.c (evaluate_var_value): New function, factored out from ...
6622         (evaluate_subexp_standard): ... here.
6623
6624 2017-09-04  Pedro Alves  <palves@redhat.com>
6625
6626         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6627         Remove useless assignments to 'op'.
6628
6629 2017-09-04  Pedro Alves  <palves@redhat.com>
6630
6631         * eval.c (eval_skip_value): New function.
6632         (evaluate_subexp_standard): Use it.
6633
6634 2017-09-04  Pedro Alves  <palves@redhat.com>
6635
6636         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6637         function name from symbol/minsym and pass it to
6638         error_call_unknown_return_type.
6639
6640 2017-09-04  Pedro Alves  <palves@redhat.com>
6641
6642         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6643         * ax-gdb.c (gen_msym_var_ref): New function.
6644         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6645         * eval.c (evaluate_var_msym_value): New function.
6646         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6647         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6648         to call_function_by_hand.
6649         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6650         Handle OP_VAR_MSYM_VALUE.
6651         (union exp_element) <msymbol>: New field.
6652         * minsyms.h (struct type): Forward declare.
6653         (find_minsym_type_and_address): Declare.
6654         * parse.c (write_exp_elt_msym): New function.
6655         (write_exp_msymbol): Delete, refactored as ...
6656         (find_minsym_type_and_address): ... this new function.
6657         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6658         (operator_length_standard, operator_check_standard): Handle
6659         OP_VAR_MSYM_VALUE.
6660         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6661
6662 2017-09-04  Pedro Alves  <palves@redhat.com>
6663
6664         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6665         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6666         unknown.
6667         * ada-typeprint.c (print_func_type): Handle functions with unknown
6668         return type.
6669         * c-typeprint.c (c_type_print_base): Handle functions and methods
6670         with unknown return type.
6671         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6672         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6673         * compile/compile-c-types.c: Include "objfiles.h".
6674         (convert_func): For functions with unknown return type, warn and
6675         default to int.
6676         * compile/compile-object-run.c (compile_object_run): Adjust call
6677         to call_function_by_hand_dummy.
6678         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6679         call_function_by_hand.
6680         * eval.c (evaluate_subexp_standard): Adjust calls to
6681         call_function_by_hand.  Handle functions and methods with unknown
6682         return type.  Pass expect_type to call_function_by_hand.
6683         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6684         return type.
6685         * gcore.c (call_target_sbrk): Adjust call to
6686         call_function_by_hand.
6687         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6688         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6689         an integer address type instead of nodebug.
6690         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6691         call_function_by_hand.
6692         * infcall.c (error_call_unknown_return_type): New function.
6693         (call_function_by_hand): New "default_return_type" parameter.
6694         Pass it down.
6695         (call_function_by_hand_dummy): New "default_return_type"
6696         parameter.  Use it instead of defaulting to int.  If there's no
6697         default and the return type is unknown, throw an error.  If
6698         there's a default return type, and the called function has no
6699         debug info, then assume the function is prototyped.
6700         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6701         New "default_return_type" parameter.
6702         (error_call_unknown_return_type): New declaration.
6703         * linux-fork.c (call_lseek): Cast return type of lseek.
6704         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6705         call_function_by_hand.
6706         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6707         calls to call_function_by_hand.
6708         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6709         return type.
6710         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6711         (value_nsstring, print_object_command): Adjust calls to
6712         call_function_by_hand.
6713         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6714         functions with unknown return type.
6715         (pascal_type_print_func_varspec_suffix): New function.
6716         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6717         TYPE_CODE_METHOD>: Use it.
6718         * python/py-value.c (valpy_call): Adjust call to
6719         call_function_by_hand.
6720         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6721         call_function_by_hand.
6722         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6723         call_function_by_hand.
6724         * valops.c (value_allocate_space_in_inferior): Adjust call to
6725         call_function_by_hand.
6726         * typeprint.c (type_print_unknown_return_type): New function.
6727         * typeprint.h (type_print_unknown_return_type): New declaration.
6728
6729 2017-09-04  Pedro Alves  <palves@redhat.com>
6730
6731         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6732         types with more than one parameter as prototyped.
6733
6734 2017-09-04  Pedro Alves  <palves@redhat.com>
6735
6736         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6737         (disassemble_command): Use gdb_disassembly_flags instead of bare
6738         int.
6739         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6740         (dump_insns, do_mixed_source_and_assembly_deprecated)
6741         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6742         Use gdb_disassembly_flags instead of bare int.
6743         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6744         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6745         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6746         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6747         (enum gdb_disassembly_flag): ... values of this new enumeration.
6748         (gdb_disassembly_flags): Define.
6749         (gdb_disassembly)
6750         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6751         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6752         gdb_disassembly_flags instead of bare int.
6753         * record-btrace.c (btrace_insn_history)
6754         (record_btrace_insn_history, record_btrace_insn_history_range)
6755         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6756         instead of bare int.
6757         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6758         Use gdb_disassembly_flags instead of bare int.
6759         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6760         Define.
6761         * target-delegates.c: Regenerate.
6762         * target.c (target_insn_history, target_insn_history_from)
6763         (target_insn_history_range): Use gdb_disassembly_flags instead of
6764         bare int.
6765         * target.h: Include "disasm.h".
6766         (struct target_ops) <to_insn_history, to_insn_history_from,
6767         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6768         int.
6769         (target_insn_history, target_insn_history_from)
6770         (target_insn_history_range): Use gdb_disassembly_flags instead of
6771         bare int.
6772
6773 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6774
6775         * cli/cli-script.c (build_command_line): For if/while commands,
6776         check whether args is empty.
6777
6778 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6779
6780         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6781         (enum command_control_type): Likewise.
6782         (struct command_line): Likewise.
6783         (free_command_lines): Likewise.
6784         (struct command_lines_deleter): Likewise.
6785         (command_line_up): Likewise.
6786         (read_command_lines): Likewise.
6787         (read_command_lines_1): Likewise.
6788         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6789         (enum command_control_type): Likewise.
6790         (struct command_line): Likewise.
6791         (free_command_lines): Likewise.
6792         (struct command_lines_deleter): Likewise.
6793         (command_line_up): Likewise.
6794         (read_command_lines): Likewise.
6795         (read_command_lines_1): Likewise.
6796         * breakpoint.h: Include cli/cli-script.h.
6797         * extension-priv.h: Likewise.
6798         * gdbcmd.h: Likewise.
6799
6800 2017-09-04  Pedro Alves  <palves@redhat.com>
6801
6802         * ada-lang.c (is_known_support_routine): Move sal declaration to
6803         where it is initialized.
6804         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6805         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6806         (clear_command, update_static_tracepoint): Remove init_sal
6807         references.  Move declarations closer to initializations.
6808         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6809         initializations.
6810         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6811         references.  Move sal declarations closer to initializations.
6812         * frame.c (find_frame_sal): Return a symtab_and_line via function
6813         return instead of output parameter.  Remove init_sal references.
6814         * frame.h (find_frame_sal): Return a symtab_and_line via function
6815         return instead of output parameter.
6816         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6817         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6818         instead of memset.
6819         (gdbscm_find_pc_line): Remove init_sal reference.
6820         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6821         references.  Move declarations closer to initializations.
6822         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6823         initializations.
6824         (finish_backward): Remove init_sal references.  Move declarations
6825         closer to initializations.
6826         * infrun.c (process_event_stop_test, handle_step_into_function)
6827         (insert_hp_step_resume_breakpoint_at_frame)
6828         (insert_step_resume_breakpoint_at_caller): Likewise.
6829         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6830         (symbol_to_sal): Likewise.
6831         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6832         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6833         to its initialization.
6834         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6835         init_sal references.  Move declarations closer to initializations.
6836         * source.c (get_current_source_symtab_and_line): Remove brace
6837         initialization.
6838         (set_current_source_symtab_and_line): Now takes the sal by const
6839         reference.  Remove brace initialization.
6840         (line_info): Remove init_sal reference.
6841         * source.h (set_current_source_symtab_and_line): Now takes a
6842         symtab_and_line via const reference.
6843         * stack.c (set_current_sal_from_frame): Adjust.
6844         (print_frame_info): Adjust.
6845         (get_last_displayed_sal): Return the sal via function return
6846         instead of via output parameter.  Simplify.
6847         (frame_info): Adjust.
6848         * stack.h (get_last_displayed_sal): Return the sal via function
6849         return instead of via output parameter.
6850         * symtab.c (init_sal): Delete.
6851         (find_pc_sect_line): Remove init_sal references.  Move
6852         declarations closer to initializations.
6853         (find_function_start_sal): Remove init_sal references.  Move
6854         declarations closer to initializations.
6855         * symtab.h (struct symtab_and_line): In-class initialize all
6856         fields.
6857         * tracepoint.c (set_traceframe_context)
6858         (print_one_static_tracepoint_marker): Remove init_sal references.
6859         Move declarations closer to initializations.
6860         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6861         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6862         declarations closer to initializations.
6863         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6864         init_sal references.  Adjust.
6865
6866 2017-09-04  Pedro Alves  <palves@redhat.com>
6867
6868         * ax-gdb.c (agent_command_1): Use range-for.
6869         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6870         * breakpoint.c: Include "common/array-view.h".
6871         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6872         parameter from struct symtabs_and_lines to
6873         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6874         (breakpoint_sals_to_pc): Change sals parameter from struct
6875         symtabs_and_lines to std::vector reference.
6876         (check_fast_tracepoint_sals): Change sals parameter from struct
6877         symtabs_and_lines to std::array_view.  Use range-for.
6878         (decode_static_tracepoint_spec): Return a std::vector instead of
6879         symtabs_and_lines.  Update.
6880         (create_breakpoint): Update.
6881         (break_range_command, until_break_command, clear_command): Update.
6882         (base_breakpoint_decode_location, bkpt_decode_location)
6883         (bkpt_probe_create_sals_from_location)
6884         (bkpt_probe_decode_location, tracepoint_decode_location)
6885         (tracepoint_probe_decode_location)
6886         (strace_marker_create_sals_from_location): Return a std::vector
6887         instead of symtabs_and_lines.
6888         (strace_marker_create_breakpoints_sal): Update.
6889         (strace_marker_decode_location): Return a std::vector instead of
6890         symtabs_and_lines.  Update.
6891         (update_breakpoint_locations): Change struct symtabs_and_lines
6892         parameters to gdb::array_view.  Adjust.
6893         (location_to_sals): Return a std::vector instead of
6894         symtabs_and_lines.  Update.
6895         (breakpoint_re_set_default): Use std::vector instead of struct
6896         symtabs_and_lines.
6897         (decode_location_default): Return a std::vector instead of
6898         symtabs_and_lines.  Update.
6899         * breakpoint.h: Include "common/array-view.h".
6900         (struct breakpoint_ops) <decode_location>: Now returns a
6901         std::vector instead of returning a symtabs_and_lines via output
6902         parameter.
6903         (update_breakpoint_locations): Change sals parameters to use
6904         gdb::array_view.
6905         * cli/cli-cmds.c (edit_command, list_command): Update to use
6906         std::vector and gdb::array_view.
6907         (ambiguous_line_spec): Adjust to use gdb::array_view and
6908         range-for.
6909         (compare_symtabs): Rename to ...
6910         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6911         const reference and adjust.
6912         (filter_sals): Rewrite using std::vector and standard algorithms.
6913         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6914         (jump_command): Update to use std::vector.
6915         * linespec.c (struct linespec_state) <canonical_names>: Update
6916         comment.
6917         (add_sal_to_sals_basic): Delete.
6918         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6919         (decode_line_2, create_sals_line_offset)
6920         (convert_address_location_to_sals, convert_linespec_to_sals)
6921         (convert_explicit_location_to_sals, parse_linespec)
6922         (event_location_to_sals, decode_line_full, decode_line_1)
6923         (decode_line_with_current_source)
6924         (decode_line_with_last_displayed, decode_objc)
6925         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6926         (linespec_result::~linespec_result): Adjust to use std::vector
6927         instead of symtabs_and_lines.
6928         * linespec.h (linespec_sals::sals): Now a std::vector.
6929         (struct linespec_result): Use std::vector, bool, and in-class
6930         initialization.
6931         (decode_line_1, decode_line_with_current_source)
6932         (decode_line_with_last_displayed): Return std::vector.
6933         * macrocmd.c (info_macros_command): Use std::vector.
6934         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6935         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6936         std::vector.
6937         * probe.h (parse_probes): Return a std::vector.
6938         * python/python.c (gdbpy_decode_line): Use std::vector and
6939         gdb::array_view.
6940         * source.c (select_source_symtab, line_info): Use std::vector.
6941         * stack.c (func_command): Use std::vector.
6942         * symtab.h (struct symtabs_and_lines): Delete.
6943         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6944
6945 2017-09-04  Pedro Alves  <palves@redhat.com>
6946
6947         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6948         unittests/array-view-selftests.c.
6949         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6950         * common/array-view.h: New file.
6951         * unittests/array-view-selftests.c: New file.
6952
6953 2017-09-04  Pedro Alves  <palves@redhat.com>
6954
6955         * cli/cli-cmds.c (edit_command): Pass message to
6956         ambiguous_line_spec.
6957         (list_command): Pass message to ambiguous_line_spec.  Say
6958         "first"/"last" instead of "start" and "end" to be consistent with
6959         the manual.
6960         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6961         them to print formatted message.
6962
6963 2017-09-04  Pedro Alves  <palves@redhat.com>
6964
6965         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6966         ftrace_update_insns by reference instead of pointer.
6967
6968 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6969
6970         * i386-go32-tdep.c: Include x86-xstate.h.
6971         (i386_go32_init_abi): Call i386_target_description.
6972         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6973         if xcr0 is X86_XSTATE_X87_MASK.
6974         * i386-tdep.h (tdesc_i386): Remove the declaration.
6975         (tdesc_i386_mmx): Likewise.
6976
6977 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6978
6979         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6980         X86_XSTATE_SSE_MASK instead of 0.
6981
6982 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6983
6984         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6985         i386_target_description.
6986         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6987         i386_target_description.
6988         * i386-tdep.c (i386_gdbarch_init): Likewise.
6989
6990 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6991
6992         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6993         (x86_darwin_init_abi_64): Call amd64_target_description.
6994         * amd64-dicos-tdep.c: Likewise.
6995         * amd64-fbsd-nat.c: Likewise.
6996         * amd64-fbsd-tdep.c: Likewise.
6997         * amd64-nbsd-tdep.c: Likewise.
6998         * amd64-obsd-tdep.c: Likewise.
6999         * amd64-sol2-tdep.c: Likewise.
7000         * amd64-windows-tdep.c: Likewise.
7001         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7002
7003 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
7004
7005         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7006         (btrace_function) <insn>: Change type to use std::vector.
7007         * btrace.c (ftrace_debug, ftrace_call_num_insn,
7008         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7009         ftrace_update_insns, ftrace_compute_global_level_offset,
7010         btrace_stitch_bts, btrace_clear, btrace_insn_get,
7011         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7012         change to std::vector.
7013         (ftrace_update_insns): Adjust to change to std::vector, change
7014         type of INSN parameter.
7015         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7016         * record-btrace.c (btrace_call_history_insn_range,
7017         btrace_compute_src_line_range,
7018         record_btrace_frame_prev_register): Adjust to change to
7019         std::vector.
7020         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7021         to change to std::vector.
7022
7023 2017-09-03  Tom Tromey  <tom@tromey.com>
7024
7025         * corefile.c (reopen_exec_file): Use std::string.
7026
7027 2017-09-03  Tom Tromey  <tom@tromey.com>
7028
7029         * compile/compile.c (compile_register_name_mangled): Return
7030         std::string.
7031         * compile/compile-loc2c.c (pushf_register_address): Update.
7032         (pushf_register): Update.
7033         * compile/compile-c-types.c (convert_array): Update.
7034         * compile/compile-c-symbols.c (generate_vla_size): Update.
7035         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7036         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7037         (convert_one_symbol): Update.
7038         (generate_c_for_for_one_variable): Update.
7039         * compile/compile-c-support.c (c_get_range_decl_name): Return a
7040         std::string.
7041         (generate_register_struct): Update.
7042         * compile/compile-internal.h (c_get_range_decl_name): Return a
7043         std::string.
7044         (compile_register_name_mangled): Return std::string.
7045
7046 2017-09-03  Tom Tromey  <tom@tromey.com>
7047
7048         * utils.c (perror_string): Return a std::string.
7049         (throw_perror_with_name, perror_warning_with_name): Update.
7050
7051 2017-09-03  Tom Tromey  <tom@tromey.com>
7052
7053         * demangle.c (demangle_command): Use std::string,
7054         unique_xmalloc_ptr.
7055
7056 2017-09-03  Tom Tromey  <tom@tromey.com>
7057
7058         * cli/cli-setshow.c (do_set_command): Use std::string.
7059
7060 2017-09-03  Tom Tromey  <tom@tromey.com>
7061
7062         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7063
7064 2017-09-03  Tom Tromey  <tom@tromey.com>
7065
7066         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7067
7068 2017-09-03  Tom Tromey  <tom@tromey.com>
7069
7070         * mi/mi-cmd-env.c (env_execute_cli_command): Use
7071         gdb::unique_xmalloc_ptr.
7072
7073 2017-09-03  Tom Tromey  <tom@tromey.com>
7074
7075         * thread.c (print_thread_info_1): Use string_printf.
7076         (thread_apply_command, thread_apply_all_command): Use
7077         std::string.
7078
7079 2017-09-03  Tom Tromey  <tom@tromey.com>
7080
7081         * valprint.c (val_print_string): Update.
7082         * gdbcore.h (memory_error_message): Return std::string.
7083         * corefile.c (memory_error_message): Return std::string.
7084         (memory_error): Update.
7085         * breakpoint.c (insert_bp_location): Update.
7086
7087 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
7088
7089         * target/waitstatus.h (target_waitstatus_to_string): Change
7090         return type to std::string.
7091         * target/waitstatus.c (target_waitstatus_to_string): Return
7092         std::string.
7093         * target.h (target_waitstatus_to_string): Remove declaration.
7094         * infrun.c (resume, clear_proceed_status_thread,
7095         print_target_wait_results, do_target_wait, save_waitstatus,
7096         stop_all_threads): Adjust.
7097         * record-btrace.c (record_btrace_wait): Adjust.
7098         * target-debug.h
7099         (target_debug_print_struct_target_waitstatus_p): Adjust.
7100
7101 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
7102
7103         PR gdb/22046
7104         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7105         detection.
7106
7107 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
7108
7109         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7110         for setting/unsetting environment variables on the remote target.
7111         (New remote packets): Add entries for QEnvironmentHexEncoded,
7112         QEnvironmentUnset and QEnvironmentReset.
7113         * common/environ.c (gdb_environ::operator=): Extend method to
7114         handle m_user_set_env_list and m_user_unset_env_list.
7115         (gdb_environ::clear): Likewise.
7116         (match_var_in_string): Change type of first parameter from 'char
7117         *' to 'const char *'.
7118         (gdb_environ::set): Extend method to handle
7119         m_user_set_env_list and m_user_unset_env_list.
7120         (gdb_environ::unset): Likewise.
7121         (gdb_environ::clear_user_set_env): New method.
7122         (gdb_environ::user_set_envp): Likewise.
7123         (gdb_environ::user_unset_envp): Likewise.
7124         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7125         m_user_unset_env_list on move constructor/assignment.
7126         (unset): Add new default parameter 'update_unset_list = true'.
7127         (clear_user_set_env): New method.
7128         (user_set_envp): Likewise.
7129         (user_unset_envp): Likewise.
7130         (m_user_set_env_list): New std::set.
7131         (m_user_unset_env_list): Likewise.
7132         * common/rsp-low.c (hex2str): New function.
7133         (bin2hex): New overload for bin2hex function.
7134         * common/rsp-low.c (hex2str): New prototype.
7135         (str2hex): New overload prototype.
7136         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7137         QEnvironmentUnset and QEnvironmentReset.
7138         (remote_protocol_features): Add QEnvironmentHexEncoded,
7139         QEnvironmentUnset and QEnvironmentReset packets.
7140         (send_environment_packet): New function.
7141         (extended_remote_environment_support): Likewise.
7142         (extended_remote_create_inferior): Call
7143         extended_remote_environment_support.
7144         (_initialize_remote): Add QEnvironmentHexEncoded,
7145         QEnvironmentUnset and QEnvironmentReset packet configs.
7146         * unittests/environ-selftests.c (gdb_selftest_env_var):
7147         New variable.
7148         (test_vector_initialization): New function.
7149         (test_init_from_host_environ): Likewise.
7150         (test_reinit_from_host_environ): Likewise.
7151         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7152         Likewise.
7153         (test_unset_set_empty_vector): Likewise.
7154         (test_vector_clear): Likewise.
7155         (test_std_move): Likewise.
7156         (test_move_constructor):
7157         (test_self_move): Likewise.
7158         (test_set_unset_reset): Likewise.
7159         (run_tests): Rewrite in terms of the functions above.
7160
7161 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
7162
7163         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7164         (adi_available): Use a temp variable of type CORE_ADDR as argument
7165         3 when calling target_auxv_search.
7166         (adi_normalize_address): Use masks and xor operators to calculate
7167         normalized address.
7168         (adi_read_versions, adi_write_versions, adi_print_versions)
7169         (do_examine, do_assign): Use paddress.
7170
7171 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
7172
7173         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7174         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7175         out of loop and add supply of FIR.
7176         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7177         add collect of FIR.
7178
7179 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
7180
7181         PR gdb/21827
7182         * cli/cli-script.c (define_command): Don't convert command name
7183         to lower case.
7184
7185 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
7186
7187         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7188         Update all callers accordingly. Remove all code blocks handling
7189         the case where DISPP is not NULL.
7190
7191 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7192
7193         PR symtab/22003
7194         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7195         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7196         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7197
7198 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7199
7200         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7201         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7202         (read_comp_units_from_section): New parameter abbrev_section, use
7203         read_and_check_comp_unit_head, allocate signatured_type if needed.
7204         (create_all_comp_units): Update read_comp_units_from_section caller.
7205
7206 2017-08-23  Pedro Alves  <palves@redhat.com>
7207
7208         PR remote/21852
7209         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7210         to null_ptid and switch to thread without reading the registers
7211         after adding the inferior.
7212
7213 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7214
7215         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7216         compile-gcc.
7217         * compile/compile.c (compile_gcc, show_compile_gcc): New.
7218         (compile_to_object): Implement compile_gcc.
7219         (_initialize_compile): Install "set compile-gcc".  Initialize
7220         compile_gcc.
7221
7222 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7223
7224         * compile/compile.c (compile_to_object): Conditionally call
7225         set_verbose.  Conditionally call compile or compile_v0.
7226
7227 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
7228
7229         * sparc64-tdep.h: (adi_normalize_address): New export.
7230         * sparc-nat.h: (open_adi_tag_fd): New export.
7231         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7232         * sparc64-linux-tdep.c:
7233         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7234         (sparc64_linux_handle_segmentation_fault): New function.
7235         (sparc64_linux_init_abi): Register
7236         sparc64_linux_handle_segmentation_fault
7237         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7238         (sparc64_addr_bits_remove): New function.
7239         (sparc64_init_abi): Register sparc64_addr_bits_remove.
7240         (MAX_PROC_NAME_SIZE): New macro.
7241         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7242         (sparc64adilist): New variable.
7243         (adi_proc_list): New variable.
7244         (find_adi_info): New function.
7245         (add_adi_info): New function.
7246         (get_adi_info_proc): New function.
7247         (get_adi_info): New function.
7248         (info_adi_command): New function.
7249         (read_maps_entry): New function.
7250         (adi_available): New function.
7251         (adi_normalize_address): New function.
7252         (adi_align_address): New function.
7253         (adi_convert_byte_count): New function.
7254         (adi_tag_fd): New function.
7255         (adi_is_addr_mapped): New function.
7256         (adi_read_versions): New function.
7257         (adi_write_versions): New function.
7258         (adi_print_versions): New function.
7259         (do_examine): New function.
7260         (do_assign): New function.
7261         (adi_examine_command): New function.
7262         (adi_assign_command): New function.
7263         (_initialize_sparc64_adi_tdep): New function.
7264
7265 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
7266
7267         * breakpoint.c (breakpoints_info): Rename to ...
7268         (info_breakpoints_command): ... this.
7269         (watchpoints_info): Rename to ...
7270         (info_watchpoints_command): ... this.
7271         (tracepoints_info): Rename to ...
7272         (info_tracepoints_command): ... this.
7273         (_initialize_breakpoint): Adjust.
7274         * dcache.c (dcache_info): Rename to ...
7275         (info_display_command): ... this.
7276         (_initialize_dcache): Adjust.
7277         * frame.h (args_info): Rename to ...
7278         (info_args_command): ... this.
7279         (locals_info): Rename to ...
7280         (info_locals_command): ... this.
7281         * infcmd.c (nofp_registers_info): Rename to ...
7282         (info_registers_command): ... this.
7283         (float_info): Rename to ...
7284         (info_float_command): ... this.
7285         (program_info): Rename to ...
7286         (info_program_command): ... this.
7287         (all_registers_info): Rename to ...
7288         (info_all_registers_command): ... this.
7289         (vector_info): Rename to ...
7290         (info_vector_command): ... this.
7291         (float_info): Rename to ...
7292         (info_float_command): ... this.
7293         (_initialize_infcmd): Adjust.
7294         * inferior.h (term_info): Rename to ...
7295         (info_terminal_command): ... this.
7296         * inflow.c (term_info): Rename to ...
7297         (info_terminal_command): ... this.
7298         (_initialize_inflow): Adjust.
7299         * infrun.c (signals_info): Rename to ...
7300         (info_signals_command): ... this.
7301         (_initialize_infrun): Adjust.
7302         * objc-lang.c (classes_info): Rename to ...
7303         (info_classes_command): ... this.
7304         (selectors_info): Rename to ...
7305         (info_selectors_command): ... this.
7306         (_initialize_objc_language): Adjust.
7307         * printcmd.c (sym_info): Rename to ...
7308         (info_symbol_command): ... this.
7309         (address_info): Rename to ...
7310         (info_address_command): ... this.
7311         (display_info): Rename to ...
7312         (info_display_command): ... this.
7313         (_initialize_printcmd): Adjust.
7314         * reverse.c (bookmarks_info): Rename to ...
7315         (info_breakpoints_command): ... this.
7316         (_initialize_reverse): Adjust.
7317         * ser-go32.c (dos_info): Rename to ...
7318         (info_serial_command): ... this.
7319         (_initialize_ser_dos): Adjust.
7320         * skip.c (skip_info): Rename to ...
7321         (info_skip_command): ... this.
7322         (_initialize_step_skip): Adjust.
7323         * source.c (line_info): Rename to ...
7324         (info_line_command): ... this.
7325         (source_info): Rename to ...
7326         (info_source_command)
7327         * stack.c (frame_info): Rename to ...
7328         (info_frame_command): ... this.
7329         (locals_info): Rename to ...
7330         (info_locals_command): ... this.
7331         (args_info): Rename to ...
7332         (info_args_command): ... this.
7333         (_initialize_stack): Adjust.
7334         * symtab.c (sources_info): Rename to ...
7335         (info_sources_command): ... this.
7336         (variables_info): Rename to ...
7337         (info_variables_command): ... this.
7338         (functions_info): Rename to ...
7339         (info_functions_command): ... this.
7340         (types_info): Rename to ...
7341         (info_types_command): ... this.
7342         (_initialize_symtab): Adjust.
7343         * target.c (target_info): Rename to ...
7344         (info_target_command): ... this.
7345         (initialize_targets): Adjust.
7346         * tracepoint.c (tvariables_info): Rename to ...
7347         (info_tvariables_command): ... this.
7348         (scope_info): Rename to ...
7349         (info_scope_command): ... this.
7350         (trace_dump_actions): Adjust.
7351         (_initialize_tracepoint): Adjust.
7352
7353 2017-08-22  Tom Tromey  <tom@tromey.com>
7354
7355         * breakpoint.h (install_breakpoint): Update.
7356         * breakpoint.c (add_solib_catchpoint): Update.
7357         (install_breakpoint): Change argument to a std::unique_ptr.
7358         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7359         (create_breakpoint_sal, create_breakpoint): Update.
7360         (watch_command_1, catch_exec_command_1)
7361         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7362         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7363         Return the breakpoint.
7364         (set_raw_breakpoint_without_location, set_raw_breakpoint)
7365         (new_single_step_breakpoint): Update.
7366         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7367         std::unique_ptr.
7368         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7369         std::unique_ptr.
7370         * break-catch-sig.c (create_signal_catchpoint): Use
7371         std::unique_ptr.
7372         * ada-lang.c (create_ada_exception_catchpoint): Use
7373         std::unique_ptr.
7374
7375 2017-08-22  Tom Tromey  <tom@tromey.com>
7376
7377         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7378
7379 2017-08-22  Tom Tromey  <tom@tromey.com>
7380
7381         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7382         (lookup_partial_symbol): Update.
7383
7384 2017-08-22  Tom Tromey  <tom@tromey.com>
7385
7386         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7387         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7388         (find_and_open_source, symtab_to_fullname): Update.
7389         * psymtab.c (psymtab_to_fullname): Update.
7390
7391 2017-08-22  Tom Tromey  <tom@tromey.com>
7392
7393         * exec.c (exec_file_attach): Update.
7394         * linux-thread-db.c (try_thread_db_load): Update.
7395         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7396         * utils.c (gdb_realpath): Change return type.
7397         (gdb_realpath_keepfile): Update.
7398         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7399         (_initialize_utils): Register the new self test.
7400         * source.c (openp): Update.
7401         (find_and_open_source): Update.
7402         * nto-tdep.c (nto_find_and_open_solib): Update.
7403         * main.c (set_gdb_data_directory): Update.
7404         (captured_main_1): Update.
7405         * dwarf2read.c (dwarf2_get_dwz_file): Update
7406         (dw2_map_symbol_filenames): Update.
7407         * auto-load.c (auto_load_safe_path_vec_update): Update.
7408         (filename_is_in_auto_load_safe_path_vec): Change type of
7409         "filename_realp".
7410         (auto_load_objfile_script): Update.
7411         (file_is_auto_load_safe): Update.  Use std::string.
7412         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7413
7414 2017-08-22  Tom Tromey  <tom@tromey.com>
7415
7416         * utils.c (gdb_realpath_keepfile): Return a
7417         gdb::unique_xmalloc_ptr.
7418         * exec.c (exec_file_attach): Update.
7419         * utils.h (gdb_realpath_keepfile): Return a
7420         gdb::unique_xmalloc_ptr.
7421
7422 2017-08-22  Tom Tromey  <tom@tromey.com>
7423
7424         * compile/compile.c (compile_file_command): Use
7425         gdb::unique_xmalloc_ptr, std::string.
7426         * utils.c (gdb_abspath): Change return type.
7427         * source.c (openp): Update.
7428         * objfiles.c (allocate_objfile): Update.
7429         * main.c (set_gdb_data_directory): Update.
7430         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7431
7432 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
7433
7434         * cli-cmds.c (list_commands): List actual code around more than
7435         one location.
7436
7437 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
7438
7439         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7440
7441 2017-08-21  Pedro Alves  <palves@redhat.com>
7442
7443         PR gdb/19487
7444         * c-exp.y (variable production): Handle function aliases.
7445         * minsyms.c (msymbol_is_text): New function.
7446         * minsyms.h (msymbol_is_text): Declare.
7447         * symtab.c (find_function_alias_target): New function.
7448         * symtab.h (find_function_alias_target): Declare.
7449
7450 2017-08-21  Pedro Alves  <palves@redhat.com>
7451
7452         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7453         typedefs.
7454         * typeprint.c (whatis_exp): If handling "whatis", and expression
7455         is OP_TYPE, strip one typedef level.  Otherwise don't strip
7456         typedefs here.
7457         * valops.c (value_cast): Save "to" type before resolving
7458         stubs/typedefs.  Use that type as resulting value's type.
7459
7460 2017-08-18  Tom Tromey  <tom@tromey.com>
7461             Pedro Alves  <palves@redhat.com>
7462
7463         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7464         * sol-thread.c (sol_thread_resume, sol_thread_wait)
7465         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7466         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7467         * proc-service.c (ps_xfer_memory): Use scoped_restore.
7468         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7469         (linux_get_siginfo_data): Add "thread" argument.  Use
7470         scoped_restore.
7471         * linux-nat.c (linux_child_follow_fork)
7472         (check_stopped_by_watchpoint): Use scoped_restore.
7473         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7474         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7475         (restore_inferior_ptid, save_inferior_ptid): Remove.
7476         * btrace.c (btrace_fetch): Use scoped_restore.
7477         * bsd-uthread.c (bsd_uthread_fetch_registers)
7478         (bsd_uthread_store_registers): Use scoped_restore.
7479         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7480         scoped_restore.
7481         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7482         (aix_thread_xfer_partial): Use scoped_restore.
7483         * inferior.h (save_inferior_ptid): Remove.
7484
7485 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7486
7487         PR tdep/21818
7488         * arm-tdep.c (gdb_print_insn_arm): Mark
7489         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7490
7491 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7492
7493         * NEWS: Mention GDBserver's new option "--selftest".
7494         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7495         * selftest.c: Move it to common/selftest.c.
7496         * selftest.h: Move it to common/selftest.h.
7497         * selftest-arch.c (reset): New function.
7498         (tests_with_arch): Call reset.
7499
7500 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7501
7502         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7503         instead of exception_fprintf and printf_filtered.
7504
7505 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7506
7507         * selftest.c (register_self_test): Rename it to
7508         selftests::register_test.
7509         (run_self_tests): selftest::run_tests.
7510         * selftest.h: Update declarations.
7511         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7512         selftests::register_test_foreach_arch.
7513         * selftest-arch.h: Update declaration.
7514         * aarch64-tdep.c: Update.
7515         * arm-tdep.c: Likewise.
7516         * disasm-selftests.c: Likewise.
7517         * dwarf2loc.c: Likewise.
7518         * dwarf2-frame.c: Likewise.
7519         * findvar.c: Likewise.
7520         * gdbarch-selftests.c: Likewise.
7521         * maint.c (maintenance_selftest): Likewise.
7522         * regcache.c: Likewise.
7523         * rust-exp.y: Likewise.
7524         * selftest-arch.c: Likewise.
7525         * unittests/environ-selftests.c: Likewise.
7526         * unittests/function-view-selftests.c: Likewise.
7527         * unittests/offset-type-selftests.c: Likewise.
7528         * unittests/optional-selftests.c: Likewise.
7529         * unittests/scoped_restore-selftests.c: Likewise.
7530         * utils-selftests.c: Likewise.
7531
7532 2017-08-17  Pedro Alves  <palves@redhat.com>
7533
7534         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7535         local.
7536
7537 2017-08-17  Pedro Alves  <palves@redhat.com>
7538
7539         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7540         field.
7541         (reset_die_in_process): Delete, replaced by ...
7542         (process_die_scope): ... this new class.  Make it responsible for
7543         freeing cu->line_header too.
7544         (process_die): Use process_die_scope.
7545         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7546         cu->line_header_die_owner.  Don't release the line header if it's
7547         owned by the CU.
7548         (setup_type_unit_groups): Make the CU/DIE own the line header.
7549         Don't release the line header here.
7550
7551 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7552
7553         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7554
7555 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7556
7557         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7558         Single-Key mode
7559
7560 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7561
7562         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7563         mode command list.
7564
7565 2017-08-15  Stafford Horne  <shorne@gmail.com>
7566
7567         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7568
7569 2017-08-15  Stafford Horne  <shorne@gmail.com>
7570
7571         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7572
7573 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7574
7575         PR gdb/21954
7576         * infcmd.c (unset_environment_command): Use the 'clear' method on
7577         the environment instead of resetting it.
7578
7579 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7580
7581         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7582         platforms.
7583
7584 2017-08-14  Tom Tromey  <tom@tromey.com>
7585
7586         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7587         (print_binary_chars): Likewise.
7588         (BITS_IN_BYTES): Remove.
7589
7590 2017-08-14  Tom Tromey  <tom@tromey.com>
7591
7592         PR gdb/21675
7593         * valprint.c (LOW_ZERO): Change value to 034.
7594         (print_octal_chars): Add static_asserts for octal constants.
7595         * printcmd.c (print_scalar_formatted): Add 'd' case.
7596
7597 2017-08-11  Tom Tromey  <tom@tromey.com>
7598
7599         * symfile.c (add_symbol_file_command): Use std::vector.
7600
7601 2017-08-14  Tom Tromey  <tom@tromey.com>
7602
7603         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7604         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7605         std::move.
7606         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7607
7608 2017-08-11  Pedro Alves  <palves@redhat.com>
7609
7610         * infrun.c (process_event_stop_test): Adjust
7611         function_name_is_marked_for_skip call.
7612         * skip.c: Include <list>.
7613         (skiplist_entry): Make it a class with private fields, and
7614         getters/setters.
7615         (skiplist_entry_chain): Delete.
7616         (skiplist_entries): New.
7617         (skiplist_entry_count): Delete.
7618         (highest_skiplist_entry_num): New.
7619         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7620         (add_skiplist_entry): Delete.
7621         (skiplist_entry::skiplist_entry): New.
7622         (skiplist_entry::add_entry): New.
7623         (skip_file_command, skip_function): Adjust.
7624         (compile_skip_regexp): Delete.
7625         (skip_command): Don't compile regexp here.  Adjust to use
7626         skiplist_entry::add_entry.
7627         (skip_info): Adjust to use range-for and getters.
7628         (skip_enable_command, skip_disable_command): Adjust to use
7629         range-for and setters.
7630         (skip_delete_command): Adjust to use std::list.
7631         (add_skiplist_entry): Delete.
7632         (skip_file_p): Delete, refactored as ...
7633         (skiplist_entry::do_skip_file_p): ... this new method.
7634         (skip_gfile_p): Delete, refactored as ...
7635         (skiplist_entry::do_gskip_file_p): ... this new method.
7636         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7637         (skiplist_entry::skip_function_p): ... this new method.
7638         (function_name_is_marked_for_skip): Now returns bool, and takes
7639         the function sal by const reference.  Adjust to use range-for and
7640         skiplist_entry methods.
7641         (_initialize_step_skip): Remove references to
7642         skiplist_entry_chain, skiplist_entry_count.
7643         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7644         takes the function sal by const reference.
7645
7646 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7647
7648         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7649         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7650         (dwarf2_frame_cache):
7651         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7652         RETURN_MASK_ALL and set *this_case to NULL.
7653         * frame-unwind.h: Update comments.
7654
7655 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7656
7657         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7658         (dwarf2_frame_state_copy_regs): Remove.
7659         (dwarf2_frame_state_free_regs): Remove.
7660         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7661         (dwarf2_restore_rule): Call method .alloc_regs instead of
7662         dwarf2_frame_state_alloc_regs.
7663         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7664         constructor.  Call std::move.
7665         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7666         (dwarf2_frame_cache): Likewise.
7667
7668         [GDB_SELF_TEST]: Include selftest.h and
7669         selftest-arch.h.
7670         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7671         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7672         execute_cfa_program_test.
7673
7674         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7675         copy ctor, assignment operator, move assignment.
7676         <alloc_regs>: New method.
7677         <swap>: New method.
7678         (struct dwarf2_frame_state): Delete dtor.
7679         (dwarf2_frame_state_alloc_regs): Remove declaration.
7680         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7681         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7682
7683 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7684
7685         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7686         (dwarf2_frame_state::dwarf2_frame_state): New.
7687         (dwarf2_frame_state::~dwarf2_frame_state): New.
7688         (dwarf2_fetch_cfa_info): Update.
7689         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7690         rather than a pointer.  Update code.
7691         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7692         dtor.
7693         <data_align, code_align, retaddr_column>: Change them to const.
7694         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7695         to bool.
7696
7697 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7698
7699         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7700         <loc.exp>: New field.
7701         * dwarf2-frame.c (execute_cfa_program): Update.
7702         (dwarf2_frame_prev_register): Update.
7703
7704 2017-08-10  Pedro Alves  <palves@redhat.com>
7705
7706         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7707
7708 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7709
7710         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7711         (fbsd_pending_children): Use std::list.
7712         (fbsd_remember_child): Likewise.
7713         (fbsd_is_child_pending): Likewise.
7714         (fbsd_pending_vfork_done): Use std::forward_list.
7715         (fbsd_add_vfork_done): Likewise.
7716         (fbsd_is_vfork_done_pending): Likewise.
7717         (fbsd_next_vfork_done): Likewise.
7718
7719 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7720
7721         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7722         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7723         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7724         for `mapfilename'.
7725         (fbsd_xfer_partial): Use gdb::byte_vector.
7726         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7727
7728 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7729
7730         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7731         "filestuff.h".
7732         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7733
7734 2017-08-09  Tom Tromey  <tom@tromey.com>
7735
7736         * skip.c (skiplist_entry): New constructor.
7737         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7738         (skiplist_entry::file_is_glob): Now bool.
7739         (skiplist_entry::file, skiplist_entry::function): Now
7740         std::string.
7741         (make_skip_entry): Return a unique_ptr.  Use new.
7742         (free_skiplist_entry, free_skiplist_entry_cleanup)
7743         (make_free_skiplist_entry_cleanup): Remove.
7744         (skip_command, skip_disable_command, add_skiplist_entry)
7745         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7746         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7747         (function_name_is_marked_for_skip): Update.
7748         (skip_delete_command): Update.  Use delete.
7749
7750 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7751
7752         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7753         (aarch64_linux_core_read_description): New function.
7754         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7755
7756 2017-08-09  Pedro Alves  <palves@redhat.com>
7757
7758         * cp-name-parser.y (cp_comp_to_string): Return a
7759         gdb::unique_xmalloc_ptr<char>.
7760         * cp-support.c (replace_typedefs_qualified_name)
7761         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7762         (cp_canonicalize_string_full): Use op= instead of explicit
7763         convertion.
7764         (cp_class_name_from_physname, method_name_from_physname)
7765         (cp_func_name, cp_remove_params): Adjust to use
7766         gdb::unique_xmalloc_ptr<char>.
7767         * cp-support.h (cp_comp_to_string): Return a
7768         gdb::unique_xmalloc_ptr<char>.
7769         * python/py-type.c (typy_lookup_type): Adjust to use
7770         gdb::unique_xmalloc_ptr<char>.
7771
7772 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7773
7774         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7775
7776 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7777             Yao Qi  <yao.qi@linaro.org>
7778
7779         * cp-support.c (cp_canonicalize_string_full): Use
7780         gdb::unique_xmalloc_ptr<char>.
7781         (cp_canonicalize_string): Likewise.
7782
7783 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7784
7785         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7786         * regformats/i386/amd64-avx-avx512.dat: Remove.
7787         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7788         * regformats/i386/amd64-avx-mpx.dat:Remove.
7789         * regformats/i386/amd64-avx.dat: Remove.
7790         * regformats/i386/amd64-mpx.dat: Remove.
7791         * regformats/i386/i386-avx-avx512.dat: Remove.
7792         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7793         * regformats/i386/i386-avx-mpx.dat: Remove.
7794         * regformats/i386/i386-mmx.dat: Remove.
7795         * regformats/i386/i386-mpx.dat: Remove.
7796
7797 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7798
7799         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7800         * amd64-tdep.c: Don't include features/i386/x32*.c.
7801         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7802         functions.
7803         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7804         and i386/x32-avx-avx512.
7805         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7806         and i386/x32.xml.
7807         * features/i386/x32-avx-avx512.c: Removed.
7808         * features/i386/x32-avx-avx512.xml: Removed.
7809         * features/i386/x32-avx.c: Removed.
7810         * features/i386/x32-avx.xml: Removed.
7811         * features/i386/x32.c: Removed.
7812         * features/i386/x32.xml: Removed.
7813         * regformats/i386/x32-avx-avx512.dat: Removed.
7814         * regformats/i386/x32-avx.dat: Removed.
7815         * regformats/i386/x32.dat: Removed.
7816
7817 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7818
7819         PR breakpoints/21886
7820         * mem-break.c (default_memory_insert_breakpoint): Use
7821         `->placed_address' rather than `->reqstd_address' for the
7822         breakpoint location.
7823
7824 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7825
7826         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7827         assertions.
7828
7829 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7830
7831         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7832         a union of `tdep_info', `tdesc_data' and `id'.
7833         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7834         rather than `info.tdep_info'.
7835         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7836         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7837         * i386-tdep.c (i386_gdbarch_init): Likewise.
7838         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7839         * mips-tdep.c (mips_gdbarch_init): Likewise.
7840         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7841         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7842         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7843         `info.tdep_info'.
7844         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7845         `info.tdep_info'.
7846         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7847         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7848         `info.tdep_info'.
7849         * spu-tdep.c (spu_gdbarch_init): Likewise.
7850         * gdbarch.h: Regenerate.
7851
7852 2017-08-07  Leszek Swirski  <leszeks@google.com>
7853
7854         PR symtab/20899
7855         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7856
7857 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7858
7859         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7860         (gdbsim_open): Rename gdb_argv args object to argv.
7861
7862 2017-08-05  Tom Tromey  <tom@tromey.com>
7863
7864         * compile/compile-object-load.c (compile_object_load): Use
7865         gdb::unique_xmalloc_ptr.
7866         * cli/cli-dump.c (scan_filename): Rename from
7867         scan_filename_with_cleanup.  Change return type.
7868         (scan_expression): Rename from scan_expression_with_cleanup.
7869         Change return type.
7870         (dump_memory_to_file, dump_value_to_file, restore_command):
7871         Use gdb::unique_xmalloc_ptr.  Update.
7872         * cli/cli-cmds.c (find_and_open_script): Use
7873         gdb::unique_xmalloc_ptr.
7874         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7875         * symmisc.c (maintenance_print_symbols)
7876         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7877         * symfile.c (symfile_bfd_open, generic_load)
7878         (add_symbol_file_command, remove_symbol_file_command): Use
7879         gdb::unique_xmalloc_ptr.
7880         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7881         * psymtab.c (maintenance_print_psymbols): Use
7882         gdb::unique_xmalloc_ptr.
7883         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7884         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7885         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7886         (reload_shared_libraries_1): Likewise.
7887
7888 2017-08-05  Tom Tromey  <tom@tromey.com>
7889
7890         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7891         (rust_op_vector, rust_set_vector): New typedefs.
7892         (current_parser): New global.
7893         (work_obstack): Change to pointer type.  Update all users.
7894         (rust_ast, pstate): Remove globals.
7895         (struct rust_parser): New.
7896         (%union) <params, field_inits>: Change type.
7897         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7898         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7899         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7900         (convert_params_to_types, convert_params_to_expression): Change
7901         type of "params".
7902         (ast_string): Change type of "fields".
7903         (rust_parse): Make a rust_parser.  Remove cleanups.
7904         (rust_lex_tests): Make and install an auto_obstack.
7905
7906 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7907
7908         * configure.srv (ipa_x32_linux_regobj): New.
7909         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7910         instead of X86_TDESC_AVX512.
7911         (initialize_low_tracepoint): Call
7912         init_registers_x32_avx_avx512_linux.
7913
7914 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7915
7916         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7917
7918 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7919
7920         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7921
7922 2017-08-03  Tom Tromey  <tom@tromey.com>
7923
7924         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7925         Remove.
7926         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7927
7928 2017-08-03  Tom Tromey  <tom@tromey.com>
7929
7930         * python/py-param.c (compute_enum_values): Use gdb_argv.
7931
7932 2017-08-03  Tom Tromey  <tom@tromey.com>
7933
7934         * utils.h (struct gdb_argv_deleter): New.
7935         (gdb_argv): New class.
7936         * utils.c (gdb_argv::reset): New method.
7937         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7938         * tracefile.c (tsave_command): Use gdb_argv.
7939         * top.c (new_ui_command): Use gdb_argv.
7940         * symmisc.c (maintenance_print_symbols)
7941         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7942         * symfile.c (symbol_file_command, generic_load)
7943         (remove_symbol_file_command): Use gdb_argv.
7944         * stack.c (backtrace_command): Use gdb_argv.
7945         * source.c (add_path, show_substitute_path_command)
7946         (unset_substitute_path_command, set_substitute_path_command):
7947         Use gdb_argv.
7948         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7949         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7950         * remote.c (extended_remote_run, remote_put_command)
7951         (remote_get_command, remote_delete_command): Use gdb_argv.
7952         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7953         (gdbsim_open): Use gdb_argv.
7954         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7955         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7956         * procfs.c (procfs_info_proc): Use gdb_argv.
7957         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7958         * infrun.c (handle_command): Use gdb_argv.
7959         * inferior.c (add_inferior_command, clone_inferior_command):
7960         Use gdb_argv.
7961         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7962         * exec.c (exec_file_command): Use gdb_argv.
7963         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7964         * compile/compile.c (build_argc_argv): Use gdb_argv.
7965
7966 2017-08-03  Tom Tromey  <tom@tromey.com>
7967
7968         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7969
7970 2017-08-03  Tom Tromey  <tom@tromey.com>
7971
7972         * python/python.c (compute_python_string): Return std::string.
7973         (gdbpy_eval_from_control_command): Update.
7974         (do_start_initialization): Use std::string.
7975         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7976         xstrprintf.
7977         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7978         xstrprintf.
7979
7980 2017-08-03  Tom Tromey  <tom@tromey.com>
7981
7982         * top.h (do_restore_instream_cleanup): Remove.
7983         * top.c (do_restore_instream_cleanup): Remove.
7984         (read_command_file): Use scoped_restore.
7985         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7986
7987 2017-08-03  Tom Tromey  <tom@tromey.com>
7988
7989         * cli/cli-script.c (execute_user_command)
7990         (execute_control_command): Use scoped_restore.
7991
7992 2017-08-03  Tom Tromey  <tom@tromey.com>
7993
7994         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7995         (execute_user_command): Remove user_call_depth; use
7996         user_args_stack's size instead.
7997
7998 2017-08-03  Tom Tromey  <tom@tromey.com>
7999
8000         * top.h (in_user_command): Remove.
8001         * top.c (in_user_command): Remove.
8002         * cli/cli-script.c (do_restore_user_call_depth)
8003         (execute_user_command): Update.
8004
8005 2017-08-03  Tom Tromey  <tom@tromey.com>
8006
8007         * valops.c (search_struct_method): Use gdb::byte_vector.
8008         * valarith.c (value_concat): Use std::vector.
8009         * target.c (memory_xfer_partial): Use gdb::byte_vector.
8010         (simple_search_memory): Likewise.
8011         * printcmd.c (find_string_backward): Use gdb::byte_vector.
8012         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8013         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8014         * elfread.c (elf_rel_plt_read): Use std::string.
8015         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8016         * cli/cli-dump.c (restore_section_callback): Use
8017         gdb::byte_vector.
8018
8019 2017-08-03  Tom Tromey  <tom@tromey.com>
8020
8021         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8022
8023 2017-08-03  Tom Tromey  <tom@tromey.com>
8024
8025         * tui/tui-regs.c (tui_restore_gdbout): Remove.
8026         (tui_register_format): Use scoped_restore.
8027
8028 2017-08-03  Tom Tromey  <tom@tromey.com>
8029
8030         * reverse.c (exec_direction_default): Remove.
8031         (exec_reverse_once): Use scoped_restore.
8032         * remote.c (restore_remote_timeout): Remove.
8033         (remote_flash_erase, remote_flash_write, remote_flash_done)
8034         (readchar, remote_serial_write): Use scoped_restore.
8035         * cli/cli-script.c (struct source_cleanup_lines_args)
8036         (source_cleanup_lines): Remove.
8037         (script_from_file): Use scoped_restore.
8038         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8039         (source_command): Use scoped_restore.
8040
8041 2017-08-03  Tom Tromey  <tom@tromey.com>
8042
8043         * utils.h (make_cleanup_free_so): Remove.
8044         * utils.c (do_free_so, make_cleanup_free_so): Remove.
8045         * solist.h (struct so_deleter): New.
8046         (so_list_up): New typedef.
8047         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8048
8049 2017-08-03  Tom Tromey  <tom@tromey.com>
8050
8051         * utils.h (make_cleanup_restore_current_language): Remove.
8052         * utils.c (do_restore_current_language)
8053         (make_cleanup_restore_current_language): Remove.
8054         * parse.c (parse_exp_in_context_1)
8055         (parse_expression_with_language): Use
8056         scoped_restore_current_language.
8057         * mi/mi-main.c (mi_cmd_execute): Use
8058         scoped_restore_current_language.
8059         * language.h (scoped_restore_current_language): New class.
8060
8061 2017-08-03  Tom Tromey  <tom@tromey.com>
8062
8063         * compile/compile.c (cleanup_unlink_file): Remove.
8064         (compile_to_object): Use gdb::unlinker.
8065         (eval_compile_command): Likewise.
8066
8067 2017-08-03  Tom Tromey  <tom@tromey.com>
8068
8069         * utils.h (make_cleanup_fclose): Remove.
8070         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8071
8072 2017-08-03  Tom Tromey  <tom@tromey.com>
8073
8074         * top.c (open_terminal_stream): Return gdb_file_up.
8075         (new_ui_command): Update.
8076
8077 2017-08-03  Tom Tromey  <tom@tromey.com>
8078
8079         * source.c (print_source_lines_base, forward_search_command)
8080         (reverse_search_command): Use gdb_file_up.
8081
8082 2017-08-03  Tom Tromey  <tom@tromey.com>
8083
8084         * fbsd-nat.c (fbsd_find_memory_regions): Update.
8085
8086 2017-08-03  Tom Tromey  <tom@tromey.com>
8087
8088         * cli/cli-cmds.c (find_and_open_script): Change return type.
8089         Remove "streamp" and "full_path" parameters.
8090         (source_script_with_search): Update.
8091         * auto-load.c (source_script_file): Update.
8092         * cli/cli-cmds.h (find_and_open_script): Change type.
8093         (open_script): New struct.
8094
8095 2017-08-03  Tom Tromey  <tom@tromey.com>
8096
8097         * xml-support.c (xml_fetch_content_from_file): Update.
8098         * ui-file.c (stdio_file::open): Update.
8099         * tracefile-tfile.c (tfile_start): Update.
8100         * remote.c (remote_file_put, remote_file_get): Update.
8101         * nat/linux-procfs.c (linux_proc_get_int)
8102         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8103         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8104         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8105         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8106         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8107         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8108         * linux-nat.c (linux_proc_pending_signals): Update.
8109         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8110         (file_closer): Remove.
8111         * compile/compile.c (compile_to_object): Update.
8112         * common/filestuff.h (struct gdb_file_deleter): New.
8113         (gdb_file_up): New typedef.
8114         (gdb_fopen_cloexec): Change return type.
8115         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8116         * cli/cli-dump.c (fopen_with_cleanup): Remove.
8117         (dump_binary_file, restore_binary_file): Update.
8118         * auto-load.c (auto_load_objfile_script_1): Update.
8119
8120 2017-08-03  Tom Tromey  <tom@tromey.com>
8121
8122         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8123         (info_static_tracepoint_markers_command): Likewise.
8124         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8125         * skip.c (skip_info): Use ui_out_emit_table.
8126         * progspace.c (print_program_space): Use ui_out_emit_table.
8127         * osdata.c (info_osdata): Use ui_out_emit_table.
8128         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8129         ui_out_emit_table.
8130         * linux-thread-db.c (info_auto_load_libthread_db): Use
8131         ui_out_emit_table.
8132         * inferior.c (print_inferior): Use ui_out_emit_table.
8133         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8134         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8135         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8136         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8137         * ui-out.h (class ui_out_emit_table): New.
8138
8139 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
8140
8141         * mips-tdep.c (mips_fpu_type_str): New function.
8142         (mips_dump_tdep): Call it.
8143
8144 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
8145
8146         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8147         `->mips_fpu_type'.
8148
8149 2017-07-31  Xavier Roirand  <roirand@adacore.com>
8150
8151         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8152
8153 2017-07-27  Xavier Roirand  <roirand@adacore.com>
8154
8155         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8156
8157 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8158
8159         * cli/cli-cmds.c (maintenancechecklist): New variable.
8160         * gdbcmd.h (maintenancechecklist): Declare it.
8161         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8162         Call i386_linux_read_description with different masks.
8163         * maint.c (maintenance_check_command): New function.
8164         (_initialize_maint_cmds): Call add_prefix_cmd.
8165         * target-descriptions.c (tdesc_reg): override operator != and ==.
8166         (tdesc_type): Likewise.
8167         (tdesc_feature): Likewise.
8168         (target_desc): Likewise.
8169         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8170         (maintenance_check_xml_descriptions): New function.
8171         (_initialize_target_descriptions) Add command "xml-descriptions".
8172         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8173
8174 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8175
8176         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8177         Include features/i386/32bit-*.c.
8178         (i386_linux_read_description): Generate target description if it
8179         doesn't exist.
8180         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8181         functions.
8182         * features/i386/32bit-linux.c: Re-generated.
8183         * features/i386/32bit-sse.c: Likewise.
8184         * target-descriptions.c (print_c_feature::visit): Print code to
8185         set register number if needed.
8186         (print_c_feature) <m_next_regnum>: New field.
8187
8188 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8189
8190         * features/Makefile (CFILES): Rename with TDESC_CFILES.
8191         (FEATURE_XMLFILES): New.
8192         (FEATURE_CFILES): New.
8193         New rules.
8194         (clean-cfiles): Remove generated c files.
8195         * features/i386/32bit-avx.c: Generated.
8196         * features/i386/32bit-avx512.c: Generated.
8197         * features/i386/32bit-core.c: Generated.
8198         * features/i386/32bit-linux.c: Generated.
8199         * features/i386/32bit-mpx.c: Generated.
8200         * features/i386/32bit-pkeys.c: Generated.
8201         * features/i386/32bit-sse.c: Generated.
8202         * target-descriptions.c: Include algorithm.
8203         (tdesc_element_visitor): Add method visit_end.
8204         (print_c_tdesc): Implement visit_end.
8205         (print_c_tdesc:: m_filename_after_features): Move it to
8206         protected.
8207         (print_c_feature): New class.
8208         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8209         name starts with "i386/32bit-".
8210
8211 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8212
8213         * target-descriptions.c (tdesc_element_visitor): New class.
8214         (tdesc_element): New class.
8215         (tdesc_reg): Inherit from tdesc_element.
8216         (tdesc_reg::accept): New function.
8217         (tdesc_type): Inherit from tdesc_element.
8218         (tdesc_type::accept): New function.
8219         (tdesc_feature): Inherit from tdesc_element.
8220         (tdesc_feature::accept): New function.
8221         (target_desc): Inherit from tdesc_element.
8222         (target_desc::target_desc): New.
8223         (target_desc::~target_desc): New.
8224         (target_desc::accept): New.
8225         (allocate_target_description): Use new.
8226         (free_target_description): Use delete.
8227         (print_c_tdesc): New class.
8228         (maint_print_c_tdesc_cmd): Adjust.
8229
8230         * features/aarch64.c: Re-generated.
8231         * features/arc-arcompact.c: Re-generated.
8232         * features/arc-v2.c: Re-generated.
8233         * features/arm/arm-with-iwmmxt.c: Re-generated.
8234         * features/arm/arm-with-m.c: Re-generated.
8235         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8236         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8237         * features/arm/arm-with-neon.c: Re-generated.
8238         * features/arm/arm-with-vfpv2.c: Re-generated.
8239         * features/arm/arm-with-vfpv3.c: Re-generated.
8240         * features/i386/amd64-avx-avx512.c: Re-generated.
8241         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8242         * features/i386/amd64-avx.c: Re-generated.
8243         * features/i386/amd64-avx-linux.c: Re-generated.
8244         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8245         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8246         * features/i386/amd64-avx-mpx.c: Re-generated.
8247         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8248         * features/i386/amd64.c: Re-generated.
8249         * features/i386/amd64-linux.c: Re-generated.
8250         * features/i386/amd64-mpx.c: Re-generated.
8251         * features/i386/amd64-mpx-linux.c: Re-generated.
8252         * features/i386/i386-avx-avx512.c: Re-generated.
8253         * features/i386/i386-avx-avx512-linux.c: Re-generated.
8254         * features/i386/i386-avx.c: Re-generated.
8255         * features/i386/i386-avx-linux.c: Re-generated.
8256         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8257         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8258         * features/i386/i386-avx-mpx.c: Re-generated.
8259         * features/i386/i386-avx-mpx-linux.c: Re-generated.
8260         * features/i386/i386.c: Re-generated.
8261         * features/i386/i386-linux.c: Re-generated.
8262         * features/i386/i386-mmx.c: Re-generated.
8263         * features/i386/i386-mmx-linux.c: Re-generated.
8264         * features/i386/i386-mpx.c: Re-generated.
8265         * features/i386/i386-mpx-linux.c: Re-generated.
8266         * features/i386/x32-avx-avx512.c: Re-generated.
8267         * features/i386/x32-avx-avx512-linux.c: Re-generated.
8268         * features/i386/x32-avx.c: Re-generated.
8269         * features/i386/x32-avx-linux.c: Re-generated.
8270         * features/i386/x32.c: Re-generated.
8271         * features/i386/x32-linux.c: Re-generated.
8272         * features/microblaze.c: Re-generated.
8273         * features/microblaze-with-stack-protect.c: Re-generated.
8274         * features/mips64-dsp-linux.c: Re-generated.
8275         * features/mips64-linux.c: Re-generated.
8276         * features/mips-dsp-linux.c: Re-generated.
8277         * features/mips-linux.c: Re-generated.
8278         * features/nds32.c: Re-generated.
8279         * features/nios2.c: Re-generated.
8280         * features/nios2-linux.c: Re-generated.
8281         * features/rs6000/powerpc-32.c: Re-generated.
8282         * features/rs6000/powerpc-32l.c: Re-generated.
8283         * features/rs6000/powerpc-403.c: Re-generated.
8284         * features/rs6000/powerpc-403gc.c : Re-generated.
8285         * features/rs6000/powerpc-405.c: Re-generated.
8286         * features/rs6000/powerpc-505.c: Re-generated.
8287         * features/rs6000/powerpc-601.c: Re-generated.
8288         * features/rs6000/powerpc-602.c: Re-generated.
8289         * features/rs6000/powerpc-603.c: Re-generated.
8290         * features/rs6000/powerpc-604.c: Re-generated.
8291         * features/rs6000/powerpc-64.c: Re-generated.
8292         * features/rs6000/powerpc-64l.c: Re-generated.
8293         * features/rs6000/powerpc-7400.c: Re-generated.
8294         * features/rs6000/powerpc-750.c: Re-generated.
8295         * features/rs6000/powerpc-860.c: Re-generated.
8296         * features/rs6000/powerpc-altivec32.c: Re-generated.
8297         * features/rs6000/powerpc-altivec32l.c: Re-generated.
8298         * features/rs6000/powerpc-altivec64.c: Re-generated.
8299         * features/rs6000/powerpc-altivec64l.c: Re-generated.
8300         * features/rs6000/powerpc-cell32l.c: Re-generated.
8301         * features/rs6000/powerpc-cell64l.c: Re-generated.
8302         * features/rs6000/powerpc-e500.c: Re-generated.
8303         * features/rs6000/powerpc-e500l.c: Re-generated.
8304         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8305         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8306         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8307         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8308         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8309         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8310         * features/rs6000/powerpc-vsx32.c: Re-generated.
8311         * features/rs6000/powerpc-vsx32l.c: Re-generated.
8312         * features/rs6000/powerpc-vsx64.c: Re-generated.
8313         * features/rs6000/powerpc-vsx64l.c: Re-generated.
8314         * features/rs6000/rs6000.c: Re-generated.
8315         * features/s390-linux32.c: Re-generated.
8316         * features/s390-linux32v1.c: Re-generated.
8317         * features/s390-linux32v2.c: Re-generated.
8318         * features/s390-linux64.c: Re-generated.
8319         * features/s390-linux64v1.c: Re-generated.
8320         * features/s390-linux64v2.c: Re-generated.
8321         * features/s390-te-linux64.c: Re-generated.
8322         * features/s390-tevx-linux64.c: Re-generated.
8323         * features/s390-vx-linux64.c: Re-generated.
8324         * features/s390x-linux64.c: Re-generated.
8325         * features/s390x-linux64v1.c: Re-generated.
8326         * features/s390x-linux64v2.c: Re-generated.
8327         * features/s390x-te-linux64.c: Re-generated.
8328         * features/s390x-tevx-linux64.c: Re-generated.
8329         * features/s390x-vx-linux64.c: Re-generated.
8330         * features/sparc/sparc32-solaris.c: Re-generated.
8331         * features/sparc/sparc64-solaris.c: Re-generated.
8332         * features/tic6x-c62x.c: Re-generated.
8333         * features/tic6x-c62x-linux.c: Re-generated.
8334         * features/tic6x-c64x.c: Re-generated.
8335         * features/tic6x-c64x-linux.c: Re-generated.
8336         * features/tic6x-c64xp.c: Re-generated.
8337         * features/tic6x-c64xp-linux.c: Re-generated.
8338
8339 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8340
8341         * i386-linux-tdep.c (i386_linux_read_description): New function.
8342         (i386_linux_core_read_description): Call
8343         i386_linux_read_description.
8344         * i386-linux-tdep.h (i386_linux_read_description): Declare.
8345         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8346         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8347         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8348         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8349         * x86-linux-nat.c (x86_linux_read_description): Call
8350         i386_linux_read_description.
8351
8352 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8353
8354         * NEWS: Mention it.
8355         * features/Makefile (%.c: %.xml): Pass the xml file name to
8356         command "maint print c-tdesc".
8357         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8358         name from 'arg'.
8359
8360 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8361
8362         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
8363         in-class initialization.
8364         (tdesc_create_feature): Call new instead of XCNEW.
8365         (free_target_description): Ue delete.
8366
8367 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
8368
8369         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8370
8371 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8372
8373         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8374         constant.
8375         (amd64_x32_init_abi): Likewise.
8376         * amd64-tdep.h (amd64_init_abi): Update declaration.
8377         (amd64_x32_init_abi): Likewise.
8378
8379 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8380
8381         PR tdep/21717
8382         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8383         condition for FPSCR.
8384         (arm_linux_store_inferior_registers): Likewise.
8385
8386 2017-07-22  Tom Tromey  <tom@tromey.com>
8387
8388         * break-catch-syscall.c (struct catch_syscall_inferior_data)
8389         <syscalls_counts>: Now a std::vector.
8390         (get_catch_syscall_inferior_data): Use "new".
8391         (catch_syscall_inferior_data_cleanup): Use "delete".
8392         (insert_catch_syscall, remove_catch_syscall)
8393         (clear_syscall_counts): Update.
8394
8395 2017-07-22  Tom Tromey  <tom@tromey.com>
8396
8397         * break-catch-syscall.c (syscall_catchpoint)
8398         <syscalls_to_be_caught>: Now a std::vector<int>
8399         (~syscall_catchpoint): Remove.
8400         (insert_catch_syscall, remove_catch_syscall)
8401         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8402         (print_mention_catch_syscall, print_recreate_catch_syscall):
8403         Update.
8404         (create_syscall_event_catchpoint): Change type of "filter"
8405         parameter.
8406         (catch_syscall_split_args): Return a std::vector.
8407         (catch_syscall_command_1, catching_syscall_number_1): Update.
8408
8409 2017-07-22  Tom Tromey  <tom@tromey.com>
8410
8411         * break-catch-throw.c (struct exception_catchpoint)
8412         <exception_rx>: Now a std::string.
8413         (~exception_catchpoint): Remove.
8414         (print_one_detail_exception_catchpoint): Update.
8415         (handle_gnu_v3_exceptions): Change type of except_rx.
8416         (extract_exception_regexp): Return a std::string.
8417         (catch_exception_command_1): Update.
8418
8419 2017-07-22  Tom Tromey  <tom@tromey.com>
8420
8421         * break-catch-sig.c (gdb_signal_type): Remove typedef.
8422         (struct signal_catchpoint) <signals_to_be_caught>: Now a
8423         std::vector.
8424         <catch_all>: Now a bool.
8425         (~signal_catchpoint): Remove.
8426         (signal_catchpoint_insert_location)
8427         (signal_catchpoint_remove_location)
8428         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8429         (signal_catchpoint_print_mention)
8430         (signal_catchpoint_print_recreate)
8431         (signal_catchpoint_explains_signal): Update.
8432         (create_signal_catchpoint): Change type of "filter" and
8433         "catch_all".
8434         (catch_signal_split_args): Return a std::vector.  Change type of
8435         "catch_all".
8436         (catch_signal_command): Update.
8437
8438 2017-07-20  Pedro Alves  <palves@redhat.com>
8439
8440         * ada-lang.c (ada_language_defn): Make extern.
8441         (_initialize_ada_language): Remove add_language call.
8442         * c-lang.c (c_language_defn, cplus_language_defn)
8443         (asm_language_defn, minimal_language_defn): Make extern.
8444         (_initialize_c_language): Delete.
8445         * completer.c (compare_cstrings): Delete, moved to utils.h.
8446         * d-lang.c (d_language_defn): Make extern.
8447         (_initialize_d_language): Remove add_language calls.
8448         * defs.h (enum language): Add comment.
8449         * f-lang.c (f_language_defn): Make extern.
8450         (_initialize_f_language): Remove add_language call.
8451         * go-lang.c (go_language_defn): Make extern.
8452         (_initialize_go_language): Remove add_language call.
8453         * language.c: Include <algorithm>.
8454         (languages): Redefine as const array.
8455         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8456         (set_language_command): Handle "local".  Use for-range loop.
8457         (set_language): Remove loop.
8458         (language_enum): Rewrite.
8459         (language_def, language_str): Remove loops.
8460         (add_language): Delete.
8461         (add_set_language_command): New, based on add_languages.
8462         (skip_language_trampoline): Adjust.
8463         (local_language_defn): Delete.
8464         (language_gdbarch_post_init): Adjust.
8465         (_initialize_language): Remove add_language calls.  Call
8466         add_set_language_command.
8467         * language.h (add_language): Delete.
8468         (auto_language_defn)
8469         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8470         (asm_language_defn, c_language_defn, cplus_language_defn)
8471         (d_language_defn, f_language_defn, go_language_defn)
8472         (m2_language_defn, objc_language_defn, opencl_language_defn)
8473         (pascal_language_defn, rust_language_defn): Declare.
8474         * m2-lang.c (m2_language_defn): Make extern.
8475         (_initialize_m2_language): Remove add_language call.
8476         * objc-lang.c (objc_language_defn): Make extern.
8477         (_initialize_objc_language): Remove add_language call.
8478         * opencl-lang.c (opencl_language_defn): Make extern.
8479         (_initialize_opencl_language): Remove add_language call.
8480         * p-lang.c (pascal_language_defn): Make extern.
8481         (_initialize_pascal_language): Delete.
8482         * rust-lang.c (rust_language_defn): Make extern.
8483         (_initialize_rust_language): Delete.
8484         * utils.h (compare_cstrings): New static inline function.
8485
8486 2017-07-20  Pedro Alves  <palves@redhat.com>
8487
8488         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8489         (get_var_value): Constify parameters.
8490         (get_int_var_value): Change prototype.
8491         (to_fixed_range_type): Adjust.
8492         * ada-lang.h (get_int_var_value): Change prototype.
8493
8494 2017-07-20  Pedro Alves  <palves@redhat.com>
8495
8496         * dwarf2read.c (dw2_lookup_symbol): Use
8497         SYMBOL_MATCHES_SEARCH_NAME.
8498         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8499
8500 2017-07-20  Pedro Alves  <palves@redhat.com>
8501
8502         * block.c (block_iter_name_step, block_iter_name_first)
8503         (block_iter_name_next): Delete.
8504         (block_lookup_symbol_primary): Adjust to use
8505         dict_iter_match_first/dict_iter_match_next.
8506         * block.h (block_iter_name_first, block_iter_name_next): Delete
8507         declarations.
8508         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8509         dict_iter_match_first/dict_iter_match_next.
8510
8511 2017-07-20  Pedro Alves  <palves@redhat.com>
8512
8513         * cp-support.c (cp_find_first_component_aux): Add missing case for
8514         end of string.
8515
8516 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8517
8518         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8519         of dwo_cu's dwo_file.
8520
8521 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8522
8523         * remote.c (store_registers_using_G): Remove one line comment.
8524
8525 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8526
8527         * regcache.c (regcache_cpy): Simplify it.
8528         (regcache::cpy_no_passthrough): Remove it.
8529         * regcache.h (cpy_no_passthrough): Remove it.
8530         (regcache_dup, regcache_cpy): Update comments.
8531
8532 2017-07-18  Pedro Alves  <palves@redhat.com>
8533
8534         * remote-sim.c (sim_command_completer): Adjust to work with a
8535         completion_tracker instead of a VEC.
8536
8537 2017-07-17  Pedro Alves  <palves@redhat.com>
8538
8539         * completer.c (complete_source_filenames): New function.
8540         (complete_address_and_linespec_locations): New function.
8541         (location_completer): Use complete_address_and_linespec_locations.
8542         (completion_tracker::build_completion_result): Honor the tracker's
8543         request to suppress append.
8544         * completer.h (completion_tracker::suppress_append_ws)
8545         (completion_tracker::set_suppress_append_ws): New methods.
8546         (completion_tracker::m_suppress_append_ws): New field.
8547         (complete_source_filenames): New declaration.
8548         * linespec.c (linespec_complete_what): New.
8549         (struct ls_parser) <complete_what, completion_word,
8550         completion_quote_char, completion_quote_end, completion_tracker>:
8551         New fields.
8552         (string_find_incomplete_keyword_at_end): New.
8553         (linespec_lexer_lex_string): Record quote char.  If in completion
8554         mode, don't throw.
8555         (linespec_lexer_consume_token): Advance the completion word point.
8556         (linespec_lexer_peek_token): Save/restore completion info.
8557         (save_stream_and_consume_token): New.
8558         (set_completion_after_number): New.
8559         (linespec_parse_basic): Set what to complete next depending on
8560         token.  Handle function and label completions specially.
8561         (parse_linespec): Disable objc shortcut in completion mode.  Set
8562         what to complete next depending on token type.  Skip keyword if in
8563         completion mode.
8564         (complete_linespec_component, linespec_complete): New.
8565         * linespec.h (linespec_complete): Declare.
8566
8567 2017-07-17  Pedro Alves  <palves@redhat.com>
8568
8569         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8570         Handle 'operator<' / 'operator<<'.
8571
8572 2017-07-17  Pedro Alves  <palves@redhat.com>
8573
8574         * completer.c (collect_explicit_location_matches): Handle
8575         MATCH_LABEL.
8576         (convert_explicit_location_to_linespec): New, factored out from
8577         ...
8578         (convert_explicit_location_to_sals): ... this.
8579         (complete_label): New.
8580         (linespec_complete_label, find_label_symbols_in_block): New.
8581         (find_label_symbols): Add completion_mode parameter and adjust to
8582         call find_label_symbols_in_block.
8583         * linespec.h (linespec_complete_label): Declare.
8584
8585 2017-07-17  Pedro Alves  <palves@redhat.com>
8586
8587         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8588         complete_symbol_mode parameter.
8589         * cli/cli-cmds.c (complete_command): Get the completion result out
8590         of the handle_brkchars tracker if used a custom word point.
8591         * completer.c: Include "linespec.h".
8592         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8593         (advance_to_expression_complete_word_point): New.
8594         (completion_tracker::completes_to_completion_word): New.
8595         (complete_files_symbols): Pass down
8596         complete_symbol_mode::EXPRESSION.
8597         (explicit_options, probe_options): New.
8598         (collect_explicit_location_matches): Complete on the
8599         explictit_loc->foo instead of word.  Use
8600         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8601         keyword and options completions.
8602         (backup_text_ptr): Delete.
8603         (skip_keyword): New.
8604         (complete_explicit_location): Remove 'word' parameter.  Add
8605         language, quoted_arg_start and quoted_arg_end parameters.
8606         Rewrite, parsing left to right.
8607         (location_completer): Rewrite.
8608         (location_completer_handle_brkchars): New function.
8609         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8610         (enum complete_line_internal_reason): Adjust comments.
8611         (completion_tracker::discard_completions): New.
8612         (completer_handle_brkchars_func_for_completer): Handle
8613         location_completer.
8614         (gdb_custom_word_point_brkchars)
8615         (gdb_org_rl_basic_quote_characters): New.
8616         (gdb_completion_word_break_characters_throw)
8617         (completion_find_completion_word): Handle trackers that use a
8618         custom word point.
8619         (completion_tracker::advance_custom_word_point_by): New.
8620         (completion_tracker::build_completion_result): Don't rely on
8621         readline appending the quote char.
8622         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8623         use a custom word point.
8624         (gdb_rl_attempted_completion_function): Restore
8625         rl_basic_quote_characters.
8626         * completer.h (class completion_tracker): Extend intro comment.
8627         (completion_tracker::set_quote_char)
8628         (completion_tracker::quote_char)
8629         (completion_tracker::set_use_custom_word_point)
8630         (completion_tracker::use_custom_word_point)
8631         (completion_tracker::custom_word_point)
8632         (completion_tracker::set_custom_word_point)
8633         (completion_tracker::advance_custom_word_point_by)
8634         (completion_tracker::completes_to_completion_word)
8635         (completion_tracker::discard_completions): New methods.
8636         (completion_tracker::m_quote_char)
8637         (completion_tracker::m_use_custom_word_point)
8638         (completion_tracker::m_custom_word_point): New fields.
8639         (advance_to_expression_complete_word_point): Declare.
8640         * f-lang.c (f_collect_symbol_completion_matches): Add
8641         complete_symbol_mode parameter.
8642         * language.h (struct language_defn)
8643         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8644         parameter.
8645         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8646         (linespec_complete_function): New function.
8647         (linespec_lexer_lex_keyword): Adjust.
8648         * linespec.h (linespec_keywords, linespec_complete_function): New
8649         declarations.
8650         * location.c (find_end_quote): New function.
8651         (explicit_location_lex_one): Add explicit_completion_info
8652         parameter.  Save quoting info.  Don't throw if being called for
8653         completion.  Don't handle Ada operators here.
8654         (is_cp_operator, skip_op_false_positives, first_of)
8655         (explicit_location_lex_one_function): New function.
8656         (string_to_explicit_location): Replace 'dont_throw' parameter with
8657         an explicit_completion_info pointer parameter.  Handle it.  Don't
8658         use explicit_location_lex_one to lex function names.  Use
8659         explicit_location_lex_one_function instead.
8660         * location.h (struct explicit_completion_info): New.
8661         (string_to_explicit_location): Replace 'dont_throw' parameter with
8662         an explicit_completion_info pointer parameter.
8663         * symtab.c (default_collect_symbol_completion_matches_break_on):
8664         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8665         (default_collect_symbol_completion_matches)
8666         (collect_symbol_completion_matches): Add complete_symbol_mode
8667         parameter.
8668         (collect_symbol_completion_matches_type): Pass down
8669         complete_symbol_mode::EXPRESSION.
8670         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8671         parameter.  Handle LINESPEC mode.
8672         * symtab.h (complete_symbol_mode): New.
8673         (default_collect_symbol_completion_matches_break_on)
8674         (default_collect_symbol_completion_matches)
8675         (collect_symbol_completion_matches)
8676         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8677         parameter.
8678
8679 2017-07-17  Pedro Alves  <palves@redhat.com>
8680
8681         * utils.c (enum class strncmp_iw_mode): New.
8682         (strcmp_iw): Rename to ...
8683         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8684         parameters.  Handle them.
8685         (strncmp_iw): New.
8686         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8687         * utils.h (strncmp_iw): Declare.
8688         (strcmp_iw): Move describing comments here.
8689
8690 2017-07-17  Pedro Alves  <palves@redhat.com>
8691
8692         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8693         CP_OPERATOR_STR.
8694         * c-typeprint.c (is_type_conversion_operator): Use
8695         CP_OPERATOR_STR.
8696         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8697         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8698         CP_OPERATOR_LEN.
8699         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8700         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8701         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8702         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8703         CP_OPERATOR_STR.
8704         * location.c: Include "cp-support.h".
8705         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8706         CP_OPERATOR_STR.
8707         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8708         CP_OPERATOR_LEN.
8709
8710 2017-07-17  Pedro Alves  <palves@redhat.com>
8711
8712         * cli/cli-cmds.c (complete_command): Use a completion tracker
8713         along with completion_find_completion_word for handle_brkchars
8714         phase.
8715         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8716         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8717         (struct gdb_rl_completion_word_info): New.
8718         (gdb_rl_find_completion_word): New.
8719         (completion_find_completion_word): New.
8720         * completer.h (completion_find_completion_word): Declare.
8721
8722 2017-07-17  Pedro Alves  <palves@redhat.com>
8723
8724         * ada-lang.c (symbol_completion_match): Adjust comments.
8725         (symbol_completion_add): Replace vector parameter with
8726         completion_tracker parameter.  Use it.
8727         (ada_make_symbol_completion_list): Rename to...
8728         (ada_collect_symbol_completion_matches): ... this.  Add
8729         completion_tracker parameter and use it.
8730         (ada_language_defn): Adjust.
8731         * break-catch-syscall.c (catch_syscall_completer): Adjust
8732         prototype and work with completion_tracker instead of VEC.
8733         * breakpoint.c (condition_completer): Adjust prototype and work
8734         with completion_tracker instead of VEC.
8735         * c-lang.c (c_language_defn, cplus_language_defn)
8736         (asm_language_defn, minimal_language_defn): Adjust to renames.
8737         * cli/cli-cmds.c (complete_command): Rework using
8738         completion_tracker.  Catch exceptions when completing.
8739         * cli/cli-decode.c (integer_unlimited_completer)
8740         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8741         with completion_tracker instead of VEC.
8742         * command.h (struct completion_tracker): Forward declare.
8743         (completer_ftype, completer_handle_brkchars_ftype): Change
8744         types.
8745         (complete_on_cmdlist, complete_on_enum): Adjust.
8746         * completer.c: Include <algorithm>.
8747         (struct gdb_completer_state): New.
8748         (current_completion): New global.
8749         (readline_line_completion_function): Delete.
8750         (noop_completer, filename_completer)
8751         (filename_completer_handle_brkchars, complete_files_symbols)
8752         (linespec_location_completer): Adjust to work with a
8753         completion_tracker instead of a VEC.
8754         (string_or_empty): New.
8755         (collect_explicit_location_matches): Adjust to work with a
8756         completion_tracker instead of a VEC.
8757         (explicit_location_completer): Rename to ...
8758         (complete_explicit_location): ... this and adjust to work with a
8759         completion_tracker instead of a VEC.
8760         (location_completer): Adjust to work with a completion_tracker
8761         instead of a VEC.
8762         (add_struct_fields): Adjust to work with a completion_list instead
8763         of VEC.
8764         (expression_completer): Rename to ...
8765         (complete_expression): ... this and adjust to work with a
8766         completion_tracker instead of a VEC.  Use complete_files_symbols.
8767         (expression_completer): Reimplement on top of complete_expression.
8768         (symbol_completer): Adjust to work with a completion_tracker
8769         instead of a VEC.
8770         (enum complete_line_internal_reason): Add describing comments.
8771         (complete_line_internal_normal_command): Adjust to work with a
8772         completion_tracker instead of a VEC.
8773         (complete_line_internal): Rename to ...
8774         (complete_line_internal_1): ... this and adjust to work with a
8775         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8776         handle_brkchars phase.
8777         (new_completion_tracker): Delete.
8778         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8779         complete_line_internal_1.
8780         (free_completion_tracker): Delete.
8781         (INITIAL_COMPLETION_HTAB_SIZE): New.
8782         (completion_tracker::completion_tracker)
8783         (completion_tracker::~completion_tracker): New.
8784         (maybe_add_completion): Delete.
8785         (completion_tracker::maybe_add_completion)
8786         (completion_tracker::add_completion)
8787         (completion_tracker::add_completions): New.
8788         (throw_max_completions_reached_error): Delete.
8789         (complete_line): Adjust to work with a completion_tracker instead
8790         of a VEC.  Don't create a completion_tracker_t or check for max
8791         completions here.
8792         (command_completer, command_completer_handle_brkchars)
8793         (signal_completer, reg_or_group_completer_1)
8794         (reg_or_group_completer, default_completer_handle_brkchars):
8795         Adjust to work with a completion_tracker.
8796         (gdb_completion_word_break_characters_throw): New.
8797         (gdb_completion_word_break_characters): Reimplement.
8798         (line_completion_function): Delete.
8799         (completion_tracker::recompute_lowest_common_denominator)
8800         (expand_preserving_ws)
8801         (completion_tracker::build_completion_result)
8802         (completion_result::completion_result)
8803         (completion_result::completion_result)
8804         (completion_result::~completion_result)
8805         (completion_result::completion_result)
8806         (completion_result::release_match_list, compare_cstrings)
8807         (completion_result::sort_match_list)
8808         (completion_result::reset_match_list)
8809         (gdb_rl_attempted_completion_function_throw)
8810         (gdb_rl_attempted_completion_function): New.
8811         * completer.h (completion_list, struct completion_result)
8812         (class completion_tracker): New.
8813         (complete_line): Add completion_tracker parameter.
8814         (readline_line_completion_function): Delete.
8815         (gdb_rl_attempted_completion_function): New.
8816         (noop_completer, filename_completer, expression_completer)
8817         (location_completer, symbol_completer, command_completer)
8818         (signal_completer, reg_or_group_completer): Update prototypes.
8819         (completion_tracker_t, new_completion_tracker)
8820         (make_cleanup_free_completion_tracker): Delete.
8821         (enum maybe_add_completion_enum): Delete.
8822         (maybe_add_completion): Delete.
8823         (throw_max_completions_reached_error): Delete.
8824         * corefile.c (complete_set_gnutarget): Adjust to work with a
8825         completion_tracker instead of a VEC.
8826         * cp-abi.c (cp_abi_completer): Adjust to work with a
8827         completion_tracker instead of a VEC.
8828         * d-lang.c (d_language_defn): Adjust.
8829         * disasm.c (disassembler_options_completer): Adjust to work with a
8830         completion_tracker instead of a VEC.
8831         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8832         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8833         with a completion_tracker instead of a VEC.
8834         (f_language_defn): Adjust.
8835         * go-lang.c (go_language_defn): Adjust.
8836         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8837         Adjust to work with a completion_tracker instead of a VEC.
8838         * infrun.c (handle_completer): Likewise.
8839         * interps.c (interpreter_completer): Likewise.
8840         * interps.h (interpreter_completer): Likewise.
8841         * language.c (unknown_language_defn, auto_language_defn)
8842         (local_language_defn): Adjust.
8843         * language.h (language_defn::la_make_symbol_completion_list):
8844         Rename to ...
8845         (language_defn::la_collect_symbol_completion_matches): ... this
8846         and adjust to work with a completion_tracker instead of a VEC.
8847         * m2-lang.c (m2_language_defn): Adjust.
8848         * objc-lang.c (objc_language_defn): Adjust.
8849         * opencl-lang.c (opencl_language_defn): Adjust.
8850         * p-lang.c (pascal_language_defn): Adjust.
8851         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8852         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8853         with a completion_tracker.
8854         * rust-lang.c (rust_language_defn): Adjust.
8855         * symtab.c (free_completion_list, do_free_completion_list)
8856         (return_val, completion_tracker): Delete.
8857         (completion_list_add_name, completion_list_add_symbol)
8858         (completion_list_add_msymbol, completion_list_objc_symbol)
8859         (completion_list_add_fields, add_symtab_completions): Add
8860         completion_tracker parameter and use it.
8861         (default_make_symbol_completion_list_break_on_1): Rename to...
8862         (default_collect_symbol_completion_matches_break_on): ... this.
8863         Add completion_tracker parameter and use it instead of allocating
8864         a completion tracker here.
8865         (default_make_symbol_completion_list_break_on): Delete old
8866         implementation.
8867         (default_make_symbol_completion_list): Delete.
8868         (default_collect_symbol_completion_matches): New.
8869         (make_symbol_completion_list): Delete.
8870         (collect_symbol_completion_matches): New.
8871         (make_symbol_completion_type): Rename to ...
8872         (collect_symbol_completion_matches_type): ... this.  Add
8873         completion_tracker parameter and use it instead of VEC.
8874         (make_file_symbol_completion_list_1): Rename to...
8875         (collect_file_symbol_completion_matches): ... this.  Add
8876         completion_tracker parameter and use it instead of VEC.
8877         (make_file_symbol_completion_list): Delete.
8878         (add_filename_to_list): Use completion_list instead of a VEC.
8879         (add_partial_filename_data::list): Now a completion_list.
8880         (make_source_files_completion_list): Work with a completion_list
8881         instead of a VEC.
8882         * symtab.h: Include "completer.h".
8883         (default_make_symbol_completion_list_break_on)
8884         (default_make_symbol_completion_list, make_symbol_completion_list)
8885         (make_symbol_completion_type, make_file_symbol_completion_list)
8886         (make_source_files_completion_list): Delete.
8887         (default_collect_symbol_completion_matches_break_on)
8888         (default_collect_symbol_completion_matches)
8889         (collect_symbol_completion_matches)
8890         (collect_symbol_completion_matches_type)
8891         (collect_file_symbol_completion_matches)
8892         (make_source_files_completion_list): New.
8893         * top.c (init_main): Don't install a rl_completion_entry_function
8894         hook.  Install a rl_attempted_completion_function hook instead.
8895         * tui/tui-layout.c (layout_completer): Adjust to work with a
8896         completion_tracker.
8897         * tui/tui-regs.c (tui_reggroup_completer):
8898         * tui/tui-win.c (window_name_completer, focus_completer)
8899         (winheight_completer): Adjust to work with a completion_tracker.
8900         * value.c: Include "completer.h".
8901         (complete_internalvar): Adjust to work with a completion_tracker.
8902         * value.h (complete_internalvar): Likewise.
8903
8904 2017-07-17  Pedro Alves  <palves@redhat.com>
8905
8906         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8907         renames.
8908         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8909         comments to completer_ftype's declaration.
8910         <completer_handle_brkchars>: Change type to
8911         completer_handle_brkchars_ftype.
8912         * command.h (completer_ftype): Add describing comment and give
8913         names to parameters.
8914         (completer_ftype_void): Rename to ...
8915         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8916         (set_cmd_completer_handle_brkchars): Adjust.
8917         * completer.c (filename_completer_handle_brkchars): New function.
8918         (complete_line_internal_normal_command): New function, factored
8919         out from ...
8920         (complete_line_internal): ... here.
8921         (command_completer_handle_brkchars)
8922         (default_completer_handle_brkchars)
8923         (completer_handle_brkchars_func_for_completer): New functions.
8924         * completer.h (set_gdb_completion_word_break_characters): Delete
8925         declaration.
8926         (completer_handle_brkchars_func_for_completer): New declaration.
8927         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8928         completer_handle_brkchars_func_for_completer.
8929
8930 2017-07-17  Pedro Alves  <palves@redhat.com>
8931
8932         * completer.c (symbol_completer): New function, based on
8933         make_symbol_completion_list_fn.
8934         * completer.h (symbol_completer): New declaration.
8935         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8936         * python/py-cmd.c (completers): Adjust.
8937         * symtab.c (make_symbol_completion_list_fn): Delete.
8938         * symtab.h (make_symbol_completion_list_fn): Delete.
8939         * cli/cli-decode.c (add_cmd): Adjust.
8940
8941 2017-07-17  Pedro Alves  <palves@redhat.com>
8942
8943         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8944         * dwarf2read.c: Include "filename-seen-cache.h".
8945         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8946         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8947         * filename-seen-cache.c: New file.
8948         * filename-seen-cache.h: New file.
8949         * symtab.c: Include "filename-seen-cache.h".
8950         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8951         (create_filename_seen_cache, clear_filename_seen_cache)
8952         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8953         to filename-seen-cache.h/filename-seen-cache.c.
8954         (output_source_filename, sources_info)
8955         (maybe_add_partial_symtab_filename)
8956         (make_source_files_completion_list): Adjust to use
8957         filename_seen_cache.
8958
8959 2017-07-17  Pedro Alves  <palves@redhat.com>
8960
8961         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8962         fields.
8963         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8964         dwarf2_debug_sections*)): New.
8965         (dwarf2_per_objfile::dwarf2_per_objfile(const
8966         dwarf2_per_objfile&)): Declare as deleted.
8967         (dwarf2_per_objfile::operator=): Declare as deleted.
8968         (dwarf2_per_objfile::dwarf2_per_objfile)
8969         (dwarf2_per_objfile::~dwarf2_per_objfile)
8970         (dwarf2_per_objfile::free_cached_comp_units): New.
8971         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8972         ctor.  Call dwarf2_per_objfile's ctor manually.
8973         (dwarf2_locate_sections): Deleted/refactored as ...
8974         (dwarf2_per_objfile::locate_sections): ... this new method.
8975         (free_cached_comp_units): Defer to
8976         dwarf2_per_objfile::free_cached_comp_units.
8977         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8978
8979 2017-07-14  Tom Tromey  <tom@tromey.com>
8980
8981         PR rust/21764:
8982         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8983         parameter.
8984         <UNOP_SIZEOF>: Split into separate case.
8985         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8986
8987 2017-07-14  Tom Tromey  <tom@tromey.com>
8988
8989         PR rust/21763:
8990         * symtab.c (symbol_matches_domain): Add language_rust to special
8991         case.
8992         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8993         treat LOC_TYPEDEF symbols as variables.
8994
8995 2017-07-14  Pedro Alves  <palves@redhat.com>
8996
8997         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8998         symtabs matching all symtabs with SRCFILE as file name instead of
8999         only considering the first hit, with lookup_symtab.
9000
9001 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9002
9003         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9004         operator_name parameters.
9005         (gen_expr): Update function call.
9006
9007 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9008
9009         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9010         parameter.
9011         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9012         Likewise.
9013         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9014         parameter, use agent_expr::gdbarch instead, update function
9015         calls.
9016         (locexpr_tracepoint_var_ref): Likewise.
9017         (loclist_tracepoint_var_ref): Likewise.
9018         * ax-gdb.c (gen_trace_static_fields): Likewise.
9019         (gen_traced_pop): Likewise.
9020         (gen_frame_args_address): Likewise.
9021         (gen_frame_locals_address): Likewise.
9022         (gen_var_ref): Likewise.
9023         (gen_struct_ref_recursive): Likewise.
9024         (gen_static_field): Likewise.
9025         (gen_maybe_namespace_elt): Likewise.
9026         (gen_expr): Likewise.
9027         (gen_trace_for_var): Likewise.
9028         (gen_trace_for_expr): Likewise.
9029         (gen_trace_for_return_address): Likewise.
9030
9031 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9032
9033         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9034         parameter.
9035         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9036
9037 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9038
9039         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9040         from ax, update calls.
9041         (gen_usual_arithmetic): Likewise.
9042         (gen_integral_promotions): Likewise.
9043         (gen_bitfield_ref): Likewise.
9044         (gen_primitive_field): Likewise.
9045         (gen_struct_ref_recursive): Likewise.
9046         (gen_struct_ref): Likewise.
9047         (gen_maybe_namespace_elt): Likewise.
9048         (gen_struct_elt_for_reference): Likewise.
9049         (gen_namespace_elt): Likewise.
9050         (gen_aggregate_elt_ref): Likewise.
9051         (gen_expr): Get gdbarch from ax, update calls.
9052         (gen_expr_binop_rest): Likewise.
9053
9054 2017-07-13  Pedro Alves  <palves@redhat.com>
9055
9056         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9057         as default tdesc.
9058         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9059         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9060         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9061         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
9062         tdep.
9063         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9064         Get final tdesc from the tdep.
9065         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9066         default tdesc.
9067         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9068         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9069         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9070         Use it as default tdesc.
9071         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9072         down to amd_init_abi.  No longer handle fallback tdesc here.
9073         * amd64-tdep.h (tdesc_x32): Declare.
9074         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9075         parameter.
9076         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9077         as default tdesc.
9078
9079 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9080
9081         * s390-linux-tdep.c (s390_process_record): Add support for
9082         instructions new in arch12.
9083
9084 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
9085
9086         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9087         PT_GETFSBASE and PT_GETGSBASE.
9088         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9089         PT_SETGSBASE.
9090
9091 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
9092
9093         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9094         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9095         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9096         those rules.
9097         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9098         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9099         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9100         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9101         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9102         * features/i386/amd64.xml: Add 64bit-segments.xml.
9103         * features/i386/amd64-avx-avx512.c: Regenerated.
9104         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9105         * features/i386/amd64-avx-mpx.c: Regenerated.
9106         * features/i386/amd64-avx.c: Regenerated.
9107         * features/i386/amd64-mpx.c: Regenerated.
9108         * features/i386/amd64.c: Regenerated.
9109         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9110         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9111         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9112         * regformats/i386/amd64-avx.dat: Regenerated.
9113         * regformats/i386/amd64-mpx.dat: Regenerated.
9114         * regformats/i386/amd64.dat: Regenerated.
9115
9116 2017-07-10  Yao Qi  <yao.qi@linaro.org>
9117
9118         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9119         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9120
9121 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
9122
9123         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9124         unsetenv.
9125         * gnulib/aclocal.m4: Regenerate.
9126         * gnulib/config.in: Regenerate.
9127         * gnulib/configure: Regenerate.
9128         * gnulib/import/Makefile.am: Regenerate.
9129         * gnulib/import/Makefile.in: Regenerate.
9130         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9131         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9132         * gnulib/import/m4/environ.m4: New file.
9133         * gnulib/import/m4/setenv.m4: New file.
9134         * gnulib/import/setenv.c: New file.
9135         * gnulib/import/unsetenv.c: New file.
9136
9137 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
9138
9139         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9140         address when op is DW_OP_addr.
9141
9142 2017-07-09  Tom Tromey  <tom@tromey.com>
9143
9144         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9145         check and apply to outer type.
9146
9147 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9148
9149         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9150         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9151         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9152         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9153
9154 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9155
9156         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9157
9158 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9159
9160         * corelow.c (get_core_siginfo): Remove.
9161         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9162         instead of get_core_siginfo.
9163         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9164         * gdbarch.h: Re-generate.
9165         * gdbarch.c: Re-generate.
9166         * linux-tdep.c (linux_core_xfer_siginfo): New.
9167         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9168
9169 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9170
9171         * corelow.c (thread_section_name): Move to ...
9172         * gdbcore.h (thread_section_name): ... here.
9173
9174 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9175
9176         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9177         (struct siginfo32): New.
9178         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9179         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9180         via ptrace(PT_LWPINFO).
9181
9182 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9183
9184         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9185         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9186         (fbsd_get_siginfo_type): New.
9187         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9188         (_initialize_fbsd_tdep): New.
9189
9190 2017-07-06  David Blaikie  <dblaikie@gmail.com>
9191
9192         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9193         a singular dwo_unit*) to support multiple CUs in the same way that
9194         multiple TUs are supported.
9195         (create_cus_hash_table): Replace create_dwo_cu with a function for
9196         parsing multiple CUs from a DWO file.
9197         (open_and_init_dwo_file): Use create_cus_hash_table rather than
9198         create_dwo_cu.
9199         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9200         htab_find, rather than comparing the signature to a singleton CU in
9201         the dwo_file.
9202
9203 2017-07-06  Pedro Alves  <palves@redhat.com>
9204
9205         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9206
9207 2017-07-04  Pedro Alves  <palves@redhat.com>
9208
9209         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9210         * gdbtypes.h (TYPE_STATIC): Delete.
9211         (struct fn_field) <is_public, is_abstract, is_static, is_final,
9212         is_synchronized, is_native>: Delete.
9213         <dummy>: Bump.
9214         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9215         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9216         (TYPE_FN_FIELD_ABSTRACT): Delete.
9217
9218 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
9219
9220         * buffer.h (buffer_finish): Fix spelling mistakes.
9221
9222 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
9223
9224         * .dir-locals.el: Automatically switch to C-style comments in
9225         versions of Emacs that support the feature.
9226
9227 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9228             Pedro Alves  <palves@redhat.com>
9229
9230         PR cli/21688
9231         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9232         (process_next_line): New variable 'inline_cmd'.
9233         Adjust 'if' clauses for "python", "compile" and "guile" to use
9234         'command_name_equals' and check for '!inline_cmd'.
9235
9236 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9237
9238         PR cli/21688
9239         * cli/cli-script.c (command_name_equals_not_inline): New function.
9240         (process_next_line): Adjust 'if' clauses for "python", "compile"
9241         and "guile" to use command_name_equals_not_inline.
9242
9243 2017-06-29  Pedro Alves  <palves@redhat.com>
9244
9245         * completer.c (expression_completer): Call
9246         linespec_location_completer instead of location_completer.
9247
9248 2017-06-29  Pedro Alves  <palves@redhat.com>
9249
9250         * completer.c (expression_completer): Remove code that recomputes
9251         'text' from 'word'.
9252
9253 2017-06-29  Yao Qi  <yao.qi@linaro.org>
9254
9255         * regformats/regdat.sh: Generate code with
9256         "ifndef IN_PROCESS_AGENT".
9257
9258 2017-06-28  Pedro Alves  <palves@redhat.com>
9259
9260         * command.h: Include "common/scoped_restore.h".
9261
9262 2017-06-28  Yao Qi  <yao.qi@linaro.org>
9263
9264         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9265         instead of obstack_grow.
9266
9267 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
9268
9269         PR gdb/21337
9270         * symfile.c (reread_symbols): Call objfiles_changed just before
9271         read_symbols.
9272
9273 2017-06-27  Pedro Alves  <palves@redhat.com>
9274
9275         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9276         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9277         (completion_list_add_symbol, completion_list_add_msymbol):
9278         ... these new functions.
9279         (add_symtab_completions)
9280         (default_make_symbol_completion_list_break_on_1): Adjust.
9281
9282 2017-06-27  Pedro Alves  <palves@redhat.com>
9283
9284         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9285         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
9286         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9287         dtor.
9288         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
9289         'storage_obstack' field an auto_obstack.  In-class initialize all
9290         non-bitfield fields.  Make minsyms_read bool.
9291         * symfile.c (read_symbols): Adjust.
9292
9293 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
9294
9295         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9296         (gdbsim_store_register): Likewise.
9297
9298 2017-06-27  Pedro Alves  <palves@redhat.com>
9299
9300         * c-exp.y (name_obstack): Now an auto_obstack.
9301         (yylex): Use auto_obstack::clear.
9302         (c_parse): Use auto_obstack::clear instead of reinitializing and
9303         freeing the obstack.
9304         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9305         * d-exp.y (name_obstack): Now an auto_obstack.
9306         (yylex): Use auto_obstack::clear.
9307         (d_parse): Use auto_obstack::clear instead of reinitializing and
9308         freeing the obstack.
9309         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9310         auto_obstack.
9311         * dwarf2read.c (create_addrmap_from_index)
9312         (dwarf2_build_psymtabs_hard)
9313         (update_enumeration_type_from_children): Likewise.
9314         * gdb_obstack.h (auto_obstack): New type.
9315         * go-exp.y (name_obstack): Now an auto_obstack.
9316         (build_packaged_name): Use auto_obstack::clear.
9317         (go_parse): Use auto_obstack::clear instead of reinitializing and
9318         freeing the obstack.
9319         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9320         auto_obstack.
9321         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9322         * rust-exp.y (work_obstack): Now an auto_obstack.
9323         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9324         reinitializing and freeing the obstack.
9325         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9326         (host_char_to_target): Use auto_obstack.
9327         * utils.h (make_cleanup_obstack_free): Delete declaration.
9328         * valprint.c (generic_emit_char, generic_printstr): Use
9329         auto_obstack.
9330
9331 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
9332
9333         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9334         thread.
9335         (darwin_init_thread_list): Don't update dummy thread.
9336         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9337
9338 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9339
9340         * record-full.c (netorder16): Remove.
9341
9342 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9343
9344         * common/diagnostics.h: Define macros for GCC.
9345         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9346         * common/vec.h: Include diagnostics.h.
9347         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9348         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9349         warning.
9350
9351 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9352
9353         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9354         New macro.
9355         * ada-lex.l: Ignore deprecated register warnings.
9356
9357 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9358
9359         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9360         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9361
9362 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9363
9364         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9365         its own line.
9366
9367 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9368
9369         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9370
9371 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
9372
9373         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9374         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9375         (xtensa_register_read_masked): Likewise.
9376
9377 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
9378
9379         * common/environ.c (gdb_environ::unset): Update comment.
9380
9381 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9382
9383         * python/py-unwind.c (pyuw_sniffer): Allocate space for
9384         registers.
9385
9386 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9387
9388         * record-full.c (record_full_exec_insn): Use byte_vector.
9389
9390 2017-06-22  Yao Qi  <yao.qi@linaro.org>
9391
9392         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9393         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9394
9395 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9396
9397         * remote.c (cached_reg): Move from here...
9398         * regcache.h (cached_reg): ...to here.
9399         * python/py-unwind.c (struct reg_info): Remove.
9400         (cached_frame_info): Use cached_reg_t.
9401         (pyuw_prev_register): Likewise.
9402         (pyuw_sniffer): Use cached_reg_t and allocate registers.
9403         (pyuw_dealloc_cache): Free all registers.
9404
9405 2017-06-22  Pedro Alves  <palves@redhat.com>
9406             Simon Marchi  <simon.marchi@ericsson.com>
9407
9408         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9409         warning.
9410         * common/diagnostics.h: New file.
9411
9412 2017-06-22  Pedro Alves  <palves@redhat.com>
9413
9414         * common/agent.h: Add include guards.
9415
9416 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
9417
9418         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9419         talk about addressable units instead of bytes.
9420
9421 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9422
9423         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9424         of '::const_iterator'.
9425
9426 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9427
9428         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9429         'unittests/environ-selftests.c'.
9430         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9431         * charset.c (find_charset_names): Declare object 'iconv_env'.
9432         Update code to use 'iconv_env' object.  Remove call to
9433         'free_environ'.
9434         * common/environ.c: Include <utility>.
9435         (make_environ): Delete function.
9436         (free_environ): Delete function.
9437         (gdb_environ::clear): New function.
9438         (gdb_environ::operator=): New function.
9439         (gdb_environ::get): Likewise.
9440         (environ_vector): Delete function.
9441         (set_in_environ): Delete function.
9442         (gdb_environ::set): New function.
9443         (unset_in_environ): Delete function.
9444         (gdb_environ::unset): New function.
9445         (gdb_environ::envp): Likewise.
9446         * common/environ.h: Include <vector>.
9447         (struct gdb_environ): Delete; transform into...
9448         (class gdb_environ): ... this class.
9449         (free_environ): Delete prototype.
9450         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9451         environ_vector): Likewise.
9452         * infcmd.c (run_command_1): Update code to call
9453         'envp' from 'gdb_environ' class.
9454         (environment_info): Update code to call methods from 'gdb_environ'
9455         class.
9456         (unset_environment_command): Likewise.
9457         (path_info): Likewise.
9458         (path_command): Likewise.
9459         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9460         (inferior::inferior): Initialize 'environment' using the host's
9461         information.
9462         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9463         Include "environ.h".
9464         (class inferior) <environment>: Change type from 'struct
9465         gdb_environ' to 'gdb_environ'.
9466         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9467         methods from 'gdb_environ' class.
9468         * solib.c (solib_find_1): Likewise
9469         * unittests/environ-selftests.c: New file.
9470
9471 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9472
9473         * features/i386/i386-linux.xml: Exchange the order of including
9474         32bit-linux.xml and 32bit-sse.xml.
9475         * features/i386/i386-linux.c: Regenerated.
9476
9477 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9478
9479         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9480         Delete copy ctor and assignment operator.
9481         (tdesc_type): Likewise.
9482         (tdesc_feature): Likewise.
9483         (tdesc_free_reg): Remove.
9484         (tdesc_create_reg): Use new.
9485         (tdesc_free_type): Remove.
9486         (tdesc_create_vector): Use new.
9487         (tdesc_create_union): Likewise.
9488         (tdesc_create_flags): Likewise.
9489         (tdesc_create_enum): Likewise.
9490         (tdesc_free_feature): Delete.
9491         (free_target_description): Use delete.
9492
9493 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9494
9495         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9496         registers.
9497
9498 2017-06-19  Pedro Alves  <palves@redhat.com>
9499
9500         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9501         after gdb::unlinker.
9502
9503 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9504
9505         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9506         gdb_environ to access an environment variable.
9507
9508 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9509
9510         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9511         gdb_byte*.
9512
9513 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9514
9515         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9516
9517 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9518
9519         * configure: Re-generate.
9520         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9521
9522 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9523
9524         * configure: Re-generate.
9525         * warning.m4: Pass -Werror to compiler when checking for
9526         supported warning flags.
9527
9528 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9529
9530         * Makefile.in (COMPILE.pre): Add "-x c++".
9531
9532 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9533             Pedro Alves  <palves@redhat.com>
9534             Yao Qi  <yao.qi@linaro.org>
9535
9536         * defs.h (RequireLongest): New.
9537         (extract_integer): Declare function template.
9538         (extract_signed_integer): Remove the declaration, but define it
9539         static inline.
9540         (extract_unsigned_integer): Likewise.
9541         (store_integer): Declare function template.
9542         (store_signed_integer): Remove the declaration, but define it
9543         static inline.
9544         (store_unsigned_integer): Likewise.
9545         * findvar.c (extract_integer): New function template.
9546         (extract_signed_integer): Remove.
9547         (extract_unsigned_integer): Remove.
9548         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9549         instantiations.
9550         (store_integer): New function template.
9551         (store_signed_integer): Remove.
9552         (store_unsigned_integer): Remove.
9553         (store_integer): Explicit instantiations.
9554         * regcache.c (regcache_raw_read_signed): Update.
9555         (regcache::raw_read): New function.
9556         (regcache::raw_read_signed): Remove.
9557         (regcache::raw_read_unsigned): Remove.
9558         (regcache_raw_read_unsigned): Update.
9559         (regcache_raw_write_unsigned): Update.
9560         (regcache::raw_write_signed): Remove.
9561         (regcache::raw_write): New function.
9562         (regcache_cooked_read_signed): Update.
9563         (regcache::raw_write_unsigned): Remove.
9564         (regcache::cooked_read_signed): Remove.
9565         (regcache_cooked_read_unsigned): Update.
9566         (regcache::cooked_read_unsigned): Remove.
9567         (regcache_cooked_write_signed): Update.
9568         (regcache_cooked_write_unsigned): Update.
9569         * regcache.h (regcache) <raw_read_signed>: Remove.
9570         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9571         <raw_read, raw_write>: New.
9572         <cooked_read_signed, cooked_write_signed>: Remove.
9573         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9574         <cooked_read, cooked_write>: New.
9575         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9576         (sh64_pseudo_register_write): Update.
9577
9578 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9579
9580         * arc-tdep.c (arc_disassembler_options): New variable.
9581         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9582         of default_print_insn.
9583         (arc_delayed_print_insn): Set info->section when needed,
9584         use default_print_insn to retrieve a disassembler.
9585
9586 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9587
9588         PR gdb/21574
9589         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9590         to mention $SHELL and startup-with-shell.
9591
9592 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9593
9594         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9595
9596 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9597
9598         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9599         default_print_insn instead of print_insn_aarch64.
9600         * arm-tdep.c (gdb_print_insn_arm): Call
9601         default_print_insn instead of print_insn_big_arm
9602         and print_insn_little_arm.
9603         * i386-tdep.c (i386_print_insn): Call default_print_insn
9604         instead of print_insn_i386.
9605         * ia64-tdep.c (ia64_print_insn): Call
9606         default_print_insn instead of print_insn_ia64.
9607         * mips-tdep.c (gdb_print_insn_mips): Call
9608         default_print_insn instead of print_insn_big_mips
9609         and print_insn_little_mips.
9610         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9611         instead of print_insn_spu.
9612
9613 2017-06-14  Pedro Alves  <palves@redhat.com>
9614
9615         * ada-lang.c: Include "common/byte-vector.h".
9616         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9617         * charset.c (wchar_iterator::iterate): Resize the vector instead
9618         of reserving it.
9619         * common/byte-vector.h: Include "common/def-vector.h".
9620         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9621         * cli/cli-dump.c: Include "common/byte-vector.h".
9622         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9623         * common/byte-vector.h: New file.
9624         * common/def-vector.h: New file.
9625         * common/default-init-alloc.h: New file.
9626         * dwarf2loc.c: Include "common/byte-vector.h".
9627         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9628         instead of reserving it.
9629         * dwarf2read.c: Include "common/byte-vector.h".
9630         (data_buf::m_vec): Now a gdb::byte_vector.
9631         * gdb_regex.c: Include "common/def-vector.h".
9632         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9633         * mi/mi-main.c: Include "common/byte-vector.h".
9634         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9635         * printcmd.c: Include "common/byte-vector.h".
9636         (print_scalar_formatted): Use gdb::byte_vector.
9637         * valprint.c: Include "common/byte-vector.h".
9638         (maybe_negate_by_bytes, print_decimal_chars): Use
9639         gdb::byte_vector.
9640
9641 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9642
9643         * darwin-nat.c: Include "nat/fork-inferior.h".
9644
9645 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9646
9647         * configure.nat: Factor out Darwin bits that are not
9648         architecture-specific.  Add fork-inferior.o.
9649
9650 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9651
9652         * configure.nat: Factor out AIX bits that are not
9653         architecture-specific.  Add fork-inferior.o.
9654
9655 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9656
9657         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9658         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9659         wrappers that just call rw_pieced_value.
9660
9661 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9662
9663         * dwarf2loc.c (write_pieced_value): When writing the data for a
9664         memory piece, use write_memory_with_notification instead of
9665         write_memory.
9666
9667 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9668
9669         * valops.c (read_value_memory): Change embedded_offset to
9670         represent a bit offset instead of a byte offset.
9671         * value.h (read_value_memory): Adjust comment.
9672
9673 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9674
9675         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9676         dest_offset_bits and source_offset_bits.
9677         (write_pieced_value): Likewise.
9678
9679 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9680
9681         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9682         given by DW_OP_bit_piece.
9683         (write_pieced_value): Likewise.
9684
9685 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9686
9687         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9688         some other preparations to the places where sufficient information
9689         is available.
9690         (write_pieced_value): Likewise.
9691
9692 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9693
9694         * dwarf2loc.c (bits_to_bytes): New function.
9695         (read_pieced_value): Fix offset calculations for register pieces
9696         on big-endian targets.
9697         (write_pieced_value): Likewise.
9698
9699 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9700
9701         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9702         (write_pieced_value): Likewise.
9703
9704 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9705
9706         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9707         transfer the source value's least significant bits, instead of its
9708         lowest-addressed ones.  Rename type_len to max_offset.
9709         (read_pieced_value): Mirror above changes to write_pieced_value as
9710         applicable.
9711
9712 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9713
9714         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9715         truncate full bytes from dest_offset_bits before using it as an
9716         offset into the buffer.
9717
9718 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9719
9720         * dwarf2loc.c (write_pieced_value): Include transfer size in
9721         byte-wise check.
9722
9723 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9724
9725         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9726         calculation of this_size.
9727
9728 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9729
9730         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9731         when targeting a bit-field.
9732         (write_pieced_value): Likewise.
9733
9734 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9735
9736         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9737         (allocate_piece_closure): Drop addr_size parameter.
9738         (dwarf2_evaluate_loc_desc_full): Adjust call to
9739         allocate_piece_closure.
9740
9741 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9742
9743         PR gdb/21226
9744         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9745         the LSB end, independent of endianness.
9746
9747 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9748
9749         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9750         size capping.
9751
9752 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9753
9754         * mips-linux-nat.c: Move include features/mips*-linux.c to
9755         mips-linux-tdep.c.
9756         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9757         to mips-linux-tdep.c.
9758         * mips-linux-tdep.c: Include features/mips*-linux.c
9759         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9760         functions.
9761         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9762         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9763         (tdesc_mips64_dsp_linux): Declare.
9764
9765 2017-06-12  Tom Tromey  <tom@tromey.com>
9766
9767         * valprint.h (val_print_type_code_int): Remove.
9768         * valprint.c (generic_val_print_int): Always call
9769         val_print_scalar_formatted.
9770         (val_print_type_code_int): Remove.
9771         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9772         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9773         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9774         * ada-valprint.c (ada_val_print_num): Use
9775         val_print_scalar_formatted.
9776
9777 2017-06-12  Tom Tromey  <tom@tromey.com>
9778
9779         * printcmd.c (print_scalar_formatted): Unify the two switches.
9780         Don't convert scalars to LONGEST.
9781
9782 2017-06-12  Tom Tromey  <tom@tromey.com>
9783
9784         PR exp/16225:
9785         * valprint.h (print_decimal_chars): Update.
9786         * valprint.c (maybe_negate_by_bytes): New function.
9787         (print_decimal_chars): Add "is_signed" argument.
9788         * printcmd.c (print_scalar_formatted): Update.
9789
9790 2017-06-12  Tom Tromey  <tom@tromey.com>
9791
9792         PR exp/16225:
9793         * valprint.h (print_binary_chars, print_hex_chars): Update.
9794         * valprint.c (val_print_type_code_int): Update.
9795         (print_binary_chars): Add "zero_pad" argument.
9796         (emit_octal_digit): New function.
9797         (print_octal_chars): Don't zero-pad.
9798         (print_decimal_chars): Likewise.
9799         (print_hex_chars): Add "zero_pad" argument.
9800         * sh64-tdep.c (sh64_do_fp_register): Update.
9801         * regcache.c (regcache::dump): Update.
9802         * printcmd.c (print_scalar_formatted): Update.
9803         * infcmd.c (default_print_one_register_info): Update.
9804
9805 2017-06-12  Pedro Alves  <palves@redhat.com>
9806             Alan Hayward  <alan.hayward@arm.com>
9807
9808         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9809         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9810         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9811         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9812         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9813
9814 2017-06-12  Pedro Alves  <palves@redhat.com>
9815
9816         * dwarf2read.c (mapped_symtab::data): Now a vector of
9817         symtab_index_entry instead of vector of
9818         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9819         whether an element's name is NULL instead of checking whether the
9820         element itself is NULL.
9821         (find_slot): Change return type.  Adjust.
9822         (hash_expand, , add_index_entry, uniquify_cu_indices)
9823         (write_hash_table): Adjust.
9824
9825 2017-06-12  Pedro Alves  <palves@redhat.com>
9826
9827         * dwarf2read.c (recursively_count_psymbols): New function.
9828         (write_psymtabs_to_index): Call it to compute number of psyms and
9829         pass estimate size of psyms_seen to unordered_set's ctor.
9830
9831 2017-06-12  Pedro Alves  <palves@redhat.com>
9832
9833         * dwarf2read.c (write_hash_table): Check if key already exists
9834         before emplacing.
9835
9836 2017-06-12  Pedro Alves  <palves@redhat.com>
9837
9838         * dwarf2read.c (data_buf::append_space): Rename to...
9839         (data_buf::grow): ... this, and make private.  Adjust all callers.
9840         (data_buf::append_uint): New method.
9841         (add_address_entry, write_one_signatured_type)
9842         (write_psymtabs_to_index): Use it.
9843
9844 2017-06-12  Pedro Alves  <palves@redhat.com>
9845
9846         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9847         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9848         (data_buf::file_write): Call ::fwrite directly.
9849
9850 2017-06-12  Pedro Alves  <palves@redhat.com>
9851
9852         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9853         std::vector::erase.
9854
9855 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9856
9857         Code cleanup: C++ify .gdb_index producer.
9858         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9859         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9860         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9861         (create_strtab, add_string): Remove.
9862         (file_write, data_buf): New.
9863         (struct symtab_index_entry): Use std::vector for cu_indices.
9864         (struct mapped_symtab): Use std::vector for data.
9865         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9866         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9867         Remove.
9868         (find_slot): Change return type.  Update it to the new data structures.
9869         (hash_expand, add_index_entry): Update it to the new data structures.
9870         (offset_type_compare): Remove.
9871         (uniquify_cu_indices): Update it to the new data structures.
9872         (c_str_view, c_str_view_hasher, vector_hasher): New.
9873         (add_indices_to_cpool): Remove.
9874         (write_hash_table): Update it to the new data structures.
9875         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9876         (eq_psymtab_cu_index): Remove.
9877         (psym_index_map): New typedef.
9878         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9879         reference and std::unordered_map for cu_index_htab.
9880         (add_address_entry, add_address_entry_worker, write_address_map)
9881         (write_psymbols): Update it to the new data structures.
9882         (write_obstack): Remove.
9883         (struct signatured_type_index_data): Change types_list to a data_buf
9884         reference and psyms_seen to a std::unordered_set reference.
9885         (write_one_signatured_type, recursively_write_psymbols)
9886         (write_psymtabs_to_index): Update it to the new data structures.
9887
9888 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9889
9890         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9891         separate-debug-file commands.
9892         * symfile.h (separate_debug_file_debug): New global.
9893         * symfile.c (separate_debug_file_debug): New global.
9894         (separate_debug_file_exists, find_separate_debug_file): Add
9895         debug output.
9896         (_initialize_symfile): Add "set debug separate-debug-file"
9897         command.
9898         * build-id.c (build_id_to_debug_bfd,
9899         find_separate_debug_file_by_buildid): Add debug output.
9900
9901 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9902
9903         * gdbarch.sh (displaced_step_free_closure): Remove.
9904         * gdbarch.h, gdbarch.c: Re-generate.
9905         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9906         displaced_step_free_closure.
9907         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9908         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9909         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9910         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9911         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9912         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9913         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9914         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9915         * infrun.c (displaced_step_clear): Call xfree instead of
9916         gdbarch_displaced_step_free_closure.
9917
9918 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9919
9920         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9921         NULL".
9922
9923 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9924
9925         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9926         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9927         (mn10300_push_dummy_call): Likewise.
9928
9929 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9930
9931         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9932
9933 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9934
9935         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9936
9937 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9938
9939         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9940         able to start inferiors using a shell.
9941         (New remote packets): Announce new packet "QStartupWithShell".
9942         * remote.c: Add PACKET_QStartupWithShell.
9943         (extended_remote_create_inferior): Handle new
9944         PACKET_QStartupWithShell.
9945         (remote_protocol_features) <QStartupWithShell>: New entry for
9946         PACKET_QStartupWithShell.
9947         (_initialize_remote): Call "add_packet_config_cmd" for
9948         QStartupShell.
9949
9950 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9951             Pedro Alves  <palves@redhat.com>
9952
9953         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9954         and "nat/fork-inferior.h".
9955         * common/common-inferior.h: New file, with contents from
9956         "gdb/inferior.h".
9957         * commom/common-utils.c: Include "common-utils.h".
9958         (stringify_argv): New function.
9959         * common/common-utils.h (stringify_argv): New prototype.
9960         * configure.nat: Add "fork-inferior.o" as a dependency for
9961         "*linux*", "fbsd*" and "nbsd*" hosts.
9962         * corefile.c (get_exec_file): Update comment.
9963         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9964         instead of "startup_inferior".
9965         (darwin_create_inferior): Call "add_thread_silent" after
9966         "fork_inferior".
9967         * fork-child.c: Cleanup unnecessary includes.
9968         (SHELL_FILE): Move to "common/common-fork-child.c".
9969         (environ): Likewise.
9970         (exec_wrapper): Initialize.
9971         (get_exec_wrapper): New function.
9972         (breakup_args): Move to "common/common-fork-child.c"; rename to
9973         "breakup_args_for_exec".
9974         (escape_bang_in_quoted_argument): Move to
9975         "common/common-fork-child.c".
9976         (saved_ui): New variable.
9977         (prefork_hook): New function.
9978         (postfork_hook): Likewise.
9979         (postfork_child_hook): Likewise.
9980         (gdb_startup_inferior): Likewise.
9981         (fork_inferior): Move to "common/common-fork-child.c".  Update
9982         function to support gdbserver.
9983         (startup_inferior): Likewise.
9984         * gdbcore.h (get_exec_file): Remove declaration.
9985         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9986         instead of "startup_inferior".  Call "add_thread_silent" after
9987         "fork_inferior".
9988         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9989         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9990         instead of "startup_inferior".  Call "add_thread_silent" after
9991         "fork_inferior".
9992         * inferior.h: Include "common-inferior.h".
9993         (trace_start_error): Move to "common/common-utils.h".
9994         (trace_start_error_with_name): Likewise.
9995         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9996         (startup_inferior): Likewise.
9997         (gdb_startup_inferior): New prototype.
9998         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9999         * nat/fork-inferior.h: New file.
10000         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10001         instead of "startup_inferior".  Call "add_thread_silent" after
10002         "fork_inferior".
10003         * target.h (target_terminal_init): Move prototype to
10004         "target/target.h".
10005         (target_terminal_inferior): Likewise.
10006         (target_terminal_ours): Likewise.
10007         * target/target.h (target_terminal_init): New prototype, moved
10008         from "target.h".
10009         (target_terminal_inferior): Likewise.
10010         (target_terminal_ours): Likewise.
10011         * utils.c (gdb_flush_out_err): New function.
10012
10013 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10014
10015         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10016         * common/common-gdbthread.h: New file, with parts from
10017         "gdb/gdbthread.h".
10018         * gdbthread.h: Include "common-gdbthread.h".
10019         (switch_to_thread): Moved to "common/common-gdbthread.h".
10020
10021 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10022
10023         * Makefile.in (SFILES): Add "common/job-control.c".
10024         (HFILES_NO_SRCDIR): Add "common/job-control.h".
10025         (COMMON_OBS): Add "job-control.o".
10026         * common/job-control.c: New file, with contents from
10027         "gdb/inflow.c".
10028         * common/job-control.h: New file, with contents from "terminal.h".
10029         * fork-child.c: Include "job-control.h".
10030         * inflow.c: Include "job-control.h".
10031         (gdb_setpgid): Move to "common/common-inflow.c".
10032         (_initialize_inflow): Move setting of "job_control" to
10033         "handle_job_control".
10034         * terminal.h (job_control): Moved to "common/common-terminal.h".
10035         (gdb_setpgid): Likewise.
10036         * top.c: Include "job_control.h".
10037         * utils.c: Likewise.
10038         (job_control): Moved to "job-control.c".
10039
10040 2017-06-07  Pedro Alves  <palves@redhat.com>
10041
10042         * Makefile.in (SFILES): Add gdb_regex.c.
10043         (COMMON_OBS): Add gdb_regex.o.
10044         * ada-lang.c (ada_add_standard_exceptions)
10045         (ada_add_exceptions_from_frame, name_matches_regex)
10046         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10047         parameter type to compiled_regex.  Adjust.
10048         (ada_exceptions_list): Use compiled_regex.
10049         * break-catch-throw.c (exception_catchpoint::pattern): Now a
10050         std::unique_ptr<compiled_regex>.
10051         (exception_catchpoint::~exception_catchpoint): Remove regfree
10052         call.
10053         (check_status_exception_catchpoint): Adjust to use compiled_regex.
10054         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10055         * breakpoint.c (solib_catchpoint::compiled): Now a
10056         std::unique_ptr<compiled_regex>.
10057         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10058         (check_status_catch_solib): Adjust to use compiled_regex.
10059         (add_solib_catchpoint): Adjust to use compiled_regex.
10060         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10061         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10062         compiled_regex reference.  Adjust to use it.
10063         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10064         declaration.  Include "gdb_regex.h".
10065         (apropos_cmd): Change regex parameter to compiled_regex reference.
10066         * gdb_regex.c: New file.
10067         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10068         declarations.
10069         (class compiled_regex): New.
10070         * linux-tdep.c: Include "common/gdb_optional.h".
10071         (struct mapping_regexes): New, factored out from
10072         mapping_is_anonymous_p, and adjusted to use compiled_regex.
10073         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10074         gdb::optional and remove cleanups.  Adjust to compiled_regex.
10075         * probe.c: Include "common/gdb_optional.h".
10076         (collect_probes): Use compiled_regex and gdb::optional and remove
10077         cleanups.
10078         * skip.c: Include "common/gdb_optional.h".
10079         (skiplist_entry::compiled_function_regexp): Now a
10080         gdb::optional<compiled_regex>.
10081         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10082         (free_skiplist_entry): Remove regfree call.
10083         (compile_skip_regexp, skip_rfunction_p): Adjust to use
10084         compiled_regex and gdb::optional.
10085         * symtab.c: Include "common/gdb_optional.h".
10086         (search_symbols): Use compiled_regex and gdb::optional.
10087         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10088         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
10089         to gdb_regex.c.
10090
10091 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10092
10093         * regcache.c (regcache::save): Avoid buffer use.
10094         (regcache::dump): Likewise.
10095
10096 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10097
10098         * sh-tdep.c (sh_pseudo_register_read): Remove
10099         MAX_REGISTER_SIZE.
10100         (sh_pseudo_register_write): Likewise.
10101         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10102         (sh64_pseudo_register_write): Likewise
10103
10104 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10105
10106         * aarch64-tdep.c (aarch64_store_return_value): Use
10107         V_REGISTER_SIZE.
10108         (aarch64_pseudo_read_value): Likewise.
10109         (aarch64_pseudo_write): Likewise.
10110
10111 2017-06-06  Yao Qi  <yao.qi@linaro.org>
10112
10113         * regformats/regdef.h (set_register_cache): Remove the
10114         declaration.
10115
10116 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
10117
10118         * frame.c (frame_unwind_register_signed): Use
10119         frame_unwind_register_value.
10120
10121 2017-06-06  Pedro Alves  <palves@redhat.com>
10122
10123         PR breakpoints/21553
10124         * breakpoint.c (create_breakpoints_sal_default)
10125         (init_breakpoint_sal, create_breakpoint_sal): Use
10126         gdb::unique_xmalloc_ptr for string parameters.
10127         (create_breakpoint): Constify 'extra_string' and 'cond_string'
10128         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
10129         (base_breakpoint_create_breakpoints_sal)
10130         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10131         (strace_marker_create_breakpoints_sal)
10132         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10133         string parameters.
10134         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10135         gdb::unique_xmalloc_ptr for string parameters.
10136         (create_breakpoint): Constify 'extra_string' and 'cond_string'
10137         parameters.
10138
10139 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
10140
10141         * alpha-tdep.c (alpha_register_to_value): Use
10142         get_frame_register_value.
10143         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10144
10145 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
10146
10147         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10148         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10149         (ia64_value_to_register): Likewise.
10150         (ia64_extract_return_value): Likewise.
10151         (ia64_store_return_value): Likewise.
10152         (ia64_push_dummy_call): Likewise.
10153
10154 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
10155
10156         GDB 8.0 released.
10157
10158 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
10159
10160         * x86-linux-nat.c (struct arch_lwp_info): Remove.
10161
10162 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
10163
10164         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10165         parameter.
10166         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10167
10168 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
10169
10170         * event-loop.c (poll_timers): Unallocate timer using delete
10171         instead of xfree.
10172
10173 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10174
10175         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10176         (struct breakpoint) <~breakpoint>: New.
10177         (struct watchpoint): Inherit from breakpoint.
10178         <~watchpoint>: New.
10179         <base>: Remove.
10180         (struct tracepoint): Inherit from breakpoint.
10181         <base>: Remove.
10182         * breakpoint.c (longjmp_breakpoint_ops): Remove.
10183         (struct longjmp_breakpoint): Inherit from breakpoint.
10184         <~longjmp_breakpoint>: New.
10185         <base>: Remove.
10186         (new_breakpoint_from_type): Remove casts.
10187         (watchpoint_in_thread_scope): Remove reference to base field.
10188         (watchpoint_del_at_next_stop): Likewise.
10189         (update_watchpoint): Likewise.
10190         (watchpoint_check): Likewise.
10191         (bpstat_check_watchpoint): Likewise.
10192         (set_longjmp_breakpoint): Likewise.
10193         (struct fork_catchpoint): Inherit from breakpoint.
10194         <base>: Remove.
10195         (struct solib_catchpoint): Inherit from breakpoint.
10196         <~solib_catchpoint>: New.
10197         <base>: Remove.
10198         (dtor_catch_solib): Change to ...
10199         (solib_catchpoint::~solib_catchpoint): ... this.
10200         (breakpoint_hit_catch_solib): Remove reference to base field.
10201         (add_solib_catchpoint): Likewise.
10202         (create_fork_vfork_event_catchpoint): Likewise.
10203         (struct exec_catchpoint): Inherit from breakpoint.
10204         <~exec_catchpoint>: New.
10205         <base>: Remove.
10206         (dtor_catch_exec): Change to ...
10207         (exec_catchpoint::~exec_catchpoint): ... this.
10208         (dtor_watchpoint): Change to ...
10209         (watchpoint::~watchpoint): ... this.
10210         (watch_command_1): Remove reference to base field.
10211         (catch_exec_command_1): Likewise.
10212         (base_breakpoint_dtor): Change to ...
10213         (breakpoint::~breakpoint): ... this.
10214         (base_breakpoint_ops): Remove dtor field value.
10215         (longjmp_bkpt_dtor): Change to ...
10216         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10217         (strace_marker_create_breakpoints_sal): Remove reference to base
10218         field.
10219         (delete_breakpoint): Don't manually call breakpoint destructor.
10220         (create_tracepoint_from_upload): Remove reference to base field.
10221         (trace_pass_set_count): Likewise.
10222         (initialize_breakpoint_ops): Don't initialize
10223         momentary_breakpoint_ops, don't set dtors.
10224         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10225         <~ada_catchpoint>: New.
10226         <base>: Remove.
10227         (create_excep_cond_exprs): Remove reference to base field.
10228         (dtor_exception): Change to ...
10229         (ada_catchpoint::~ada_catchpoint): ... this.
10230         (dtor_catch_exception): Remove.
10231         (dtor_catch_exception_unhandled): Remove.
10232         (dtor_catch_assert): Remove.
10233         (create_ada_exception_catchpoint): Remove reference to base
10234         field.
10235         (initialize_ada_catchpoint_ops): Don't set dtors.
10236         * break-catch-sig.c (struct signal_catchpoint): Inherit from
10237         breakpoint.
10238         <~signal_catchpoint>: New.
10239         <base>: Remove.
10240         (signal_catchpoint_dtor): Change to ...
10241         (signal_catchpoint::~signal_catchpoint): ... this.
10242         (create_signal_catchpoint): Remove reference to base field.
10243         (initialize_signal_catchpoint_ops): Don't set dtor.
10244         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10245         from breakpoint.
10246         <~syscall_catchpoint>: New.
10247         <base>: Remove.
10248         (dtor_catch_syscall): Change to ...
10249         (syscall_catchpoint::~syscall_catchpoint): ... this.
10250         (create_syscall_event_catchpoint): Remove reference to base
10251         field.
10252         (initialize_syscall_catchpoint_ops): Don't set dtor.
10253         * break-catch-throw.c (struct exception_catchpoint): Inherit
10254         from breakpoint.
10255         <~exception_catchpoint>: New.
10256         <base>: Remove.
10257         (dtor_exception_catchpoint): Change to ...
10258         (exception_catchpoint::~exception_catchpoint): ... this.
10259         (handle_gnu_v3_exceptions): Remove reference to base field.
10260         (initialize_throw_catchpoint_ops): Don't set dtor.
10261         * ctf.c (ctf_get_traceframe_address): Remove reference to base
10262         field.
10263         * remote.c (remote_get_tracepoint_status): Likewise.
10264         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10265         * tracefile.c (tracefile_fetch_registers): Likewise.
10266         * tracepoint.c (actions_command): Likewise.
10267         (validate_actionline): Likewise.
10268         (tfind_1): Likewise.
10269         (get_traceframe_location): Likewise.
10270         (find_matching_tracepoint_location): Likewise.
10271         (parse_tracepoint_status): Likewise.
10272         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10273
10274 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10275
10276         * breakpoint.c (struct longjmp_breakpoint): New struct.
10277         (is_tracepoint_type): Change return type to bool.
10278         (is_longjmp_type): New function.
10279         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10280         (set_raw_breakpoint_without_location): Use
10281         new_breakpoint_from_type.
10282         (set_raw_breakpoint): Likewise.
10283
10284 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10285
10286         * breakpoint.c (new_breakpoint_from_type): New function.
10287         (create_breakpoint_sal): Use new_breakpoint_from_type and
10288         unique_ptr.
10289         (create_breakpoint): Likewise.
10290
10291 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
10292
10293         * memattr.c (mem_info_command): Rename to ...
10294         (info_mem_command): ... this.
10295         (mem_enable_command): Rename to ...
10296         (enable_mem_command): ... this.
10297         (mem_disable_command): Rename to ...
10298         (disable_mem_command): ... this.
10299         (mem_delete_command): Rename to ...
10300         (delete_mem_command): ... this.
10301         (_initialize_mem): Adjust function names.
10302
10303 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10304
10305         * btrace.c (handle_pt_insn_events): New.
10306         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
10307         STATUS.  Split into this and ...
10308         (handle_pt_insn_event_flags): ... this.
10309
10310 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10311
10312         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10313         and struct pt_insn.resynced.
10314         * configure: Regenerated.
10315         * config.in: Regenerated.
10316
10317 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10318
10319         * btrace.c (ftrace_find_call_by_number): New function.
10320         (ftrace_new_function): Store objects, not pointers.
10321         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10322         ftrace_new_gap, ftrace_update_function,
10323         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10324         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10325         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10326         btrace_ends_with_single_insn, btrace_call_get): Account for
10327         btrace_thread_info::functions now storing objects.
10328         * btrace.h (struct btrace_thread_info): Add constructor.
10329         (struct btrace_thread_info) <functions>: Make std::vector.
10330         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10331         Initialize with default values.
10332         * record-btrace.c (record_btrace_frame_sniffer): Account for
10333         btrace_thread_info::functions now storing objects.
10334
10335 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10336
10337         * btrace.c: Remove typedef bfun_s.
10338         (ftrace_new_gap): Directly add gaps to the list of gaps.
10339         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10340         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10341         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10342         instead of gdb VEC.
10343
10344 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10345
10346         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10347         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10348         with btrace_thread_info::next_segment and
10349         btrace_thread_info::prev_segment.
10350         * btrace.h: Remove struct btrace_func_link.
10351         (struct btrace_function): Replace pair of function segment pointers
10352         with pair of indices.
10353         * python/py-record-btrace.c (btpy_call_prev_sibling,
10354         btpy_call_next_sibling): Replace references to
10355         btrace_thread_info::segment with btrace_thread_info::next_segment and
10356         btrace_thread_info::prev_segment.
10357         * record-btrace.c (record_btrace_frame_this_id): Use
10358         btrace_find_call_by_number.
10359
10360 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10361
10362         * btrace.c (ftrace_new_function, ftrace_fixup_level,
10363         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10364         btrace_insn_next, btrace_insn_prev): Remove references to
10365         btrace_thread_info::flow.
10366         * btrace.h (struct btrace_function): Remove FLOW.
10367
10368 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10369
10370         * btrace.c (ftrace_find_call_by_number): New function.
10371         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10372         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10373         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10374         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10375         index.
10376         * btrace.h (struct btrace_function): Turn UP into an index.
10377         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10378         as an index.
10379         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10380         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10381         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10382
10383 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10384
10385         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10386         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10387         ftrace_update_function, ftrace_compute_global_level_offset,
10388         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10389         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10390         btrace_insn_end, btrace_is_empty): Remove references to
10391         btrace_thread_info::begin and btrace_thread_info::end.
10392         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10393         (struct btrace_thread_info) <functions>: Adjust comment.
10394         * record-btrace.c (record_btrace_start_replaying): Remove reference to
10395         btrace_thread_info::begin.
10396
10397 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10398
10399         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10400         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10401         ftrace_update_function): Remove arguments that implicitly were always
10402         BTINFO->END.
10403         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10404         Don't pass BTINFO->END.
10405
10406 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10407
10408         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10409         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10410         btrace_find_insn_by_number): Replace function segment pointer with
10411         index.
10412         (btrace_insn_cmp): Simplify.
10413         * btrace.h: (struct btrace_insn_iterator) Rename index to
10414         insn_index.  Replace function segment pointer with index into function
10415         segment vector.
10416         * record-btrace.c (record_btrace_call_history): Replace function
10417         segment pointer use with index.
10418         (record_btrace_frame_sniffer): Retrieve function call segment through
10419         vector.
10420         (record_btrace_set_replay): Remove defunc't safety check.
10421
10422 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10423
10424         * btrace.c (btrace_ends_with_single_insn): New function.
10425         (btrace_call_get, btrace_call_number, btrace_call_begin,
10426         btrace_call_end, btrace_call_next, btrace_call_prev,
10427         btrace_find_call_by_number): Use index into call segment vector
10428         instead of pointer.
10429         (btrace_call_cmp): Simplify.
10430         * btrace.h (struct btrace_call_iterator): Replace function call segment
10431         pointer with index into vector.
10432         * record-btrace.c (record_btrace_call_history): Use index instead of
10433         pointer.
10434
10435 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10436
10437         * btrace.c (btrace_insn_begin, btrace_insn_end,
10438         btrace_find_insn_by_number): Add btinfo to iterator.
10439         * btrace.h (struct btrace_insn_iterator): Add btinfo.
10440
10441 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10442
10443         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10444         and save pointers directly.
10445         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10446         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10447         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
10448         changed signature of functions.
10449         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10450         (btrace_fetch): Remove code that adds btrace_function pointers to
10451         vector of btrace_functions.
10452         (btrace_clear): Simplify freeing vector of btrace_functions.
10453
10454 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10455
10456         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10457         Replace VEC_* with std::vector functions.
10458         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10459         (struct btrace_thread_info)<functions>: Change type to std::vector.
10460
10461 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
10462
10463         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
10464         "Removed targets and native configurations" up.  Merge duplicate
10465         "New commands" sub-sections.  Add "New options" sub-sections.
10466
10467 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
10468
10469         * defs.h (copy_integer_to_size): New declaration.
10470         * findvar.c (copy_integer_to_size): New function.
10471         (do_cint_test): New selftest function.
10472         (copy_integer_to_size_test): Likewise.
10473         (_initialize_findvar): Likewise.
10474         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10475         (mips_fbsd_collect_reg): Use raw_collect_integer.
10476         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10477         (mips64_fill_gregset): Use raw_collect_integer
10478         (mips64_fill_fpregset): Use raw_supply_integer.
10479         * regcache.c (regcache::raw_supply_integer): New function.
10480         (regcache::raw_collect_integer): Likewise.
10481         * regcache.h: (regcache::raw_supply_integer): New declaration.
10482         (regcache::raw_collect_integer): Likewise.
10483
10484 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10485
10486         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10487         (COMMON_OBS): Add gdbarch-selftests.o.
10488         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10489         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10490         * gdbarch-selftests.c: New file.
10491         * regcache.h (regcache) <~regcache>: Mark it virtual if
10492         GDB_SELF_TEST.
10493         <raw_write>: Likewise.
10494
10495 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10496
10497         * regcache.c (current_regcache): Change it to
10498         regcache::current_regcache.
10499         (regcache_observer_target_changed): Update.
10500         (regcache_thread_ptid_changed): Make it a regcache static
10501         method.
10502         (regcache_thread_ptid_changed): Update.
10503         (class regcache_access): New.
10504         (current_regcache_test): Update.
10505         (_initialize_regcache): Update.
10506         * regcache.h: Include forward_list.
10507         (regcache): Declare regcache_thread_ptid_changed and declare
10508         registers_changed_ptid as friend.
10509
10510 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10511
10512         * i387-tdep.c (i387_register_to_value): Use register_size
10513         instead of TYPE_LENGTH.
10514         * m68k-tdep.c (m68k_register_to_value): Likewise.
10515
10516 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10517
10518         * i387-tdep.c (i387_convert_register_p): Return false if type
10519         code isn't TYPE_CODE_FLT.
10520
10521 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10522
10523         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10524         length is 4.
10525         (alpha_register_to_value): Remove type length check.
10526         (alpha_value_to_register): Likewise.
10527
10528 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10529
10530         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10531         TYPE_CODE_FLT.
10532
10533 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10534
10535         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10536         TYPE_CODE_FLT or not.
10537
10538 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10539
10540         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10541         * avr-tdep.c (avr_gdbarch_init): Likewise.
10542         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10543         * cris-tdep.c (cris_gdbarch_init): Likewise.
10544         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10545         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10546         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10547         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10548         * mep-tdep.c (mep_gdbarch_init): Likewise.
10549         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10550         * mips-tdep.c (mips_gdbarch_init): Likewise.
10551         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10552         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10553         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10554         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10555         * v850-tdep.c (v850_gdbarch_init): Likewise.
10556
10557 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10558
10559         * selftest-arch.c (tests_with_arch): Call registers_changed
10560         and reinit_frame_cache.
10561         * selftest.c (run_self_tests): Likewise.
10562
10563 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10564
10565         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10566         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10567
10568 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10569
10570         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10571         set_gdbarch_print_insn.
10572
10573 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10574
10575         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10576         set_gdbarch_print_insn.
10577
10578 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10579
10580         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10581         set_gdbarch_print_insn.
10582         * arc-tdep.c (arc_gdbarch_init): Likewise.
10583         * arch-utils.c: include dis-asm.h.
10584         (default_print_insn): New function.
10585         * arch-utils.h (default_print_insn): Declare.
10586         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10587         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10588         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10589         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10590         * frv-tdep.c (frv_gdbarch_init): Likewise.
10591         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10592         * gdbarch.sh (print_insn): Use default_print_insn.
10593         * gdbarch.c: Regenerated.
10594         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10595         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10596         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10597         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10598         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10599         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10600         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10601         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10602         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10603         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10604         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10605         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10606         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10607         * mt-tdep.c (mt_gdbarch_init): Likewise.
10608         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10609         * nios2-tdep.c (nios2_print_insn): Remove.
10610         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10611         * rx-tdep.c (rx_gdbarch_init): Likewise.
10612         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10613         * score-tdep.c (score_print_insn): Remove.
10614         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10615         * sh-tdep.c (sh_gdbarch_init): Likewise.
10616         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10617         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10618         * tic6x-tdep.c (tic6x_print_insn): Remove.
10619         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10620         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10621         * v850-tdep.c (v850_gdbarch_init): Likewise.
10622         * vax-tdep.c (vax_gdbarch_init): Likewise.
10623         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10624         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10625
10626 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10627
10628         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10629         (MIPS_FP0_REGNUM): Remove.
10630         (MIPS_FSR_REGNUM): Remove.
10631         (mips_fbsd_supply_fpregs): Use mips_regnum.
10632         (mips_fbsd_supply_gregs): Likewise.
10633         (mips_fbsd_collect_fpregs): Likewise.
10634         (mips_fbsd_collect_gregs): Likewise.
10635
10636 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10637
10638         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10639         (getpfpregs_supplies): New function.
10640         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10641         getfpregs_supplies.
10642         (mips_fbsd_store_inferior_registers): Likewise.
10643
10644 2017-05-22  Pedro Alves <palves@redhat.com>
10645
10646         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10647         maintainer.
10648
10649 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10650
10651         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10652         (store_register): Likewise.
10653         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10654         (get_decimal_float_return_value): Likewise.
10655         (do_ppc_sysv_return_value): Likewise.
10656         (ppc64_sysv_abi_push_integer): Likewise.
10657         (ppc64_sysv_abi_push_freg): Likewise.
10658         (ppc64_sysv_abi_return_value_base): Likewise.
10659         (ppc64_sysv_abi_return_value): Likewise.
10660         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10661         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10662         * rs6000-nat.c: Likewise.
10663         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10664         (rs6000_value_to_register): Likewise.
10665         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10666
10667 2017-05-21  Tom Tromey  <tom@tromey.com>
10668
10669         PR rust/21466:
10670         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10671         arrays as "[T]", not "[T; ]".
10672
10673 2017-05-19  Tom Tromey  <tom@tromey.com>
10674
10675         PR rust/21484:
10676         * rust-lang.c (exp_descriptor_rust): New function.
10677         (rust_language_defn): Use it.
10678         * p-lang.c (pascal_language_defn): Update.
10679         * opencl-lang.c (opencl_language_defn): Update.
10680         * objc-lang.c (objc_language_defn): Update.
10681         * m2-lang.c (m2_language_defn): Update.
10682         * language.h (struct language_defn)
10683         <la_watch_location_expression>: New member.
10684         * language.c (unknown_language_defn, auto_language_defn)
10685         (local_language_defn): Update.
10686         * go-lang.c (go_language_defn): Update.
10687         * f-lang.c (f_language_defn): Update.
10688         * d-lang.c (d_language_defn): Update.
10689         * c-lang.h (c_watch_location_expression): Declare.
10690         * c-lang.c (c_watch_location_expression): New function.
10691         (c_language_defn, cplus_language_defn, asm_language_defn)
10692         (minimal_language_defn): Use it.
10693         * breakpoint.c (watch_command_1): Call
10694         la_watch_location_expression.
10695         * ada-lang.c (ada_language_defn): Update.
10696
10697 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10698
10699         PR tui/21482
10700         * gdb_curses.h (NOMACROS): Define.
10701         (NCURSES_NOMACROS): Define.
10702
10703 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10704
10705         PR tui/21482
10706         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10707         arg to char *.
10708         * tui/tui-wingeneral.c (box_win): Likewise.
10709         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10710         (tui_show_source_line): Likewise.
10711         (tui_show_exec_info_content): Likewise.
10712
10713 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10714
10715         * sparc-tdep.c (sparc_structure_return_p)
10716         (sparc_arg_on_registers_p): New functions.
10717         (sparc32_store_arguments): Use them.
10718         * sparc64-tdep.c (sparc64_16_byte_align_p)
10719         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10720         Handle TYPE_CODE_ARRAY.
10721
10722 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10723
10724         * cli/cli-decode.c (add_alias_cmd): New function.
10725         * command.h (add_alias_cmd): Declare.
10726         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10727         instead call add_alias_cmd.
10728
10729 2017-05-17  Pedro Alves  <palves@redhat.com>
10730
10731         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10732         (nat_makefile_frag): ... this.  All references updated.
10733         * configure.ac: Likewise.
10734         * configure.nat: Likewise.  Enhance comments.
10735         * configure: Regenerate.
10736
10737 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10738
10739         * procfs.c (procfs_create_inferior): Change prototype to match
10740         definition.
10741
10742 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10743
10744         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10745         C++ compiler warning.
10746
10747 2017-05-12  Tom Tromey  <tom@tromey.com>
10748
10749         PR rust/21483:
10750         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10751         recurse, just call value_struct_elt directly.
10752
10753 2017-05-12  Tom Tromey  <tom@tromey.com>
10754
10755         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10756         OP_RUST_ARRAY>: Fix.
10757
10758 2017-05-12  Tom Tromey  <tom@tromey.com>
10759
10760         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10761
10762 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10763
10764         * regcache.c: Include <forward_list>.
10765         (struct regcache_list): Remove.
10766         (current_regcache): Update.
10767         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10768         (regcache_thread_ptid_changed): Likewise.
10769         (registers_changed_ptid): Likewise.
10770         (current_regcache_size): Likewise.
10771
10772 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10773
10774         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10775         (current_regcache_size): New function.
10776         (current_regcache_test): New function.
10777         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10778
10779 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10780
10781         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10782         (print_gp_register_row): Use get_frame_register_value.
10783
10784 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10785
10786         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10787         (mips_supply_fpregset): Likewise.
10788         (mips64_supply_gregset): Likewise.
10789
10790 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10791
10792         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10793         regcache->raw_supply_zeroed.
10794
10795 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10796
10797         * configure.nat: Rearrange 'case' statements to match
10798         host before cpu.
10799
10800 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10801
10802         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10803         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10804         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10805         "@nat_extra_makefile_frag@".
10806         (Makefile): Remove dependency on "@frags@".
10807         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10808         (data-directory/Makefile): Likewise.
10809         * config/aarch64/linux.mh: Deleted; moved contents to
10810         "gdb/configure.nat".
10811         * config/alpha/alpha-linux.mh: Likewise.
10812         * config/alpha/nbsd.mh: Likewise.
10813         * config/arm/linux.mh: Likewise.
10814         * config/arm/nbsdelf.mh: Likewise.
10815         * config/i386/cygwin.mh: Likewise.
10816         * config/i386/cygwin64.mh: Likewise.
10817         * config/i386/darwin.mh: Likewise.
10818         * config/i386/fbsd.mh: Likewise.
10819         * config/i386/fbsd64.mh: Likewise.
10820         * config/i386/go32.mh: Likewise.
10821         * config/i386/i386gnu.mh: Likewise.
10822         * config/i386/i386sol2.mh: Likewise.
10823         * config/i386/linux.mh: Likewise.
10824         * config/i386/linux64.mh: Likewise.
10825         * config/i386/mingw.mh: Likewise.
10826         * config/i386/mingw64.mh: Likewise.
10827         * config/i386/nbsd64.mh: Likewise.
10828         * config/i386/nbsdelf.mh: Likewise.
10829         * config/i386/nto.mh: Likewise.
10830         * config/i386/obsd.mh: Likewise.
10831         * config/i386/obsd64.mh: Likewise.
10832         * config/i386/sol2-64.mh: Likewise.
10833         * config/ia64/linux.mh: Likewise.
10834         * config/m32r/linux.mh: Likewise.
10835         * config/m68k/linux.mh: Likewise.
10836         * config/m68k/nbsdelf.mh: Likewise.
10837         * config/m68k/obsd.mh: Likewise.
10838         * config/m88k/obsd.mh: Likewise.
10839         * config/mips/fbsd.mh: Likewise.
10840         * config/mips/linux.mh: Likewise.
10841         * config/mips/nbsd.mh: Likewise.
10842         * config/mips/obsd64.mh: Likewise.
10843         * config/pa/linux.mh: Likewise.
10844         * config/pa/nbsd.mh: Likewise.
10845         * config/pa/obsd.mh: Likewise.
10846         * config/powerpc/aix.mh: Likewise.
10847         * config/powerpc/fbsd.mh: Likewise.
10848         * config/powerpc/linux.mh: Likewise.
10849         * config/powerpc/nbsd.mh: Likewise.
10850         * config/powerpc/obsd.mh: Likewise.
10851         * config/powerpc/ppc64-linux.mh: Likewise.
10852         * config/powerpc/spu-linux.mh: Likewise.
10853         * config/s390/linux.mh: Likewise.
10854         * config/sh/nbsd.mh: Likewise.
10855         * config/sparc/fbsd.mh: Likewise.
10856         * config/sparc/linux.mh: Likewise.
10857         * config/sparc/linux64.mh: Likewise.
10858         * config/sparc/nbsd64.mh: Likewise.
10859         * config/sparc/nbsdelf.mh: Likewise.
10860         * config/sparc/obsd64.mh: Likewise.
10861         * config/sparc/sol2.mh: Likewise.
10862         * config/tilegx/linux.mh: Likewise.
10863         * config/vax/nbsdelf.mh: Likewise.
10864         * config/vax/obsd.mh: Likewise.
10865         * config/xtensa/linux.mh: Likewise.
10866         * config/i386/i386gnu.mn: New file, with excerpts from
10867         "config/i386/i386gnu.mh".
10868         * configure: Regenerate.
10869         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10870         *.mh files under "gdb/config".
10871         * configure.nat: New file, with contents from the
10872         "gdb/config/*/*.mh" files.
10873
10874 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10875
10876         * btrace.c (btrace_clear): Free insn vector.
10877
10878 2017-05-05  Pedro Alves  <palves@redhat.com>
10879
10880         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10881         * configure: Regenerate.
10882
10883 2017-05-04  Pedro Alves  <palves@redhat.com>
10884
10885         * Makefile.in (SFILES): Add progspace-and-thread.c.
10886         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10887         (COMMON_OBS): Add progspace-and-thread.o.
10888         * breakpoint.c: Include "progspace-and-thread.h".
10889         (update_inserted_breakpoint_locations)
10890         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10891         Use scoped_restore_current_pspace_and_thread.
10892         (create_std_terminate_master_breakpoint): Use
10893         scoped_restore_current_program_space.
10894         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10895         (print_breakpoint_location): Use
10896         scoped_restore_current_program_space.
10897         (bp_loc_is_permanent): Use
10898         scoped_restore_current_pspace_and_thread.
10899         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10900         (download_tracepoint_locations): Use
10901         scoped_restore_current_pspace_and_thread.
10902         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10903         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10904         (enum step_over_calls_kind): Moved from inferior.h.
10905         (class scoped_restore_current_thread): New class.
10906         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10907         declaration.
10908         (scoped_restore_current_thread): New class.
10909         * infcmd.c: Include "common/gdb_optional.h".
10910         (continue_1, proceed_after_attach): Use
10911         scoped_restore_current_thread.
10912         (notice_new_inferior): Use scoped_restore_current_thread.
10913         * inferior.c: Include "progspace-and-thread.h".
10914         (restore_inferior, save_current_inferior): Delete.
10915         (add_inferior_command, clone_inferior_command): Use
10916         scoped_restore_current_pspace_and_thread.
10917         * inferior.h (scoped_restore_current_inferior): New class.
10918         * infrun.c: Include "progspace-and-thread.h" and
10919         "common/gdb_optional.h".
10920         (follow_fork_inferior): Use
10921         scoped_restore_current_pspace_and_thread.
10922         (scoped_restore_exited_inferior): New class.
10923         (handle_vfork_child_exec_or_exit): Use
10924         scoped_restore_exited_inferior,
10925         scoped_restore_current_pspace_and_thread,
10926         scoped_restore_current_thread and scoped_restore.
10927         (fetch_inferior_event): Use scoped_restore_current_thread.
10928         * linespec.c (decode_line_full, decode_line_1): Use
10929         scoped_restore_current_program_space.
10930         * mi/mi-main.c: Include "progspace-and-thread.h".
10931         (exec_continue): Use scoped_restore_current_thread.
10932         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10933         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10934         * proc-service.c (ps_pglobal_lookup): Use
10935         scoped_restore_current_program_space.
10936         * progspace-and-thread.c: New file.
10937         * progspace-and-thread.h: New file.
10938         * progspace.c (release_program_space, clone_program_space): Use
10939         scoped_restore_current_program_space.
10940         (restore_program_space, save_current_program_space)
10941         (save_current_space_and_thread): Delete.
10942         (switch_to_program_space_and_thread): Moved to
10943         progspace-and-thread.c.
10944         * progspace.h (save_current_program_space)
10945         (save_current_space_and_thread): Delete declarations.
10946         (scoped_restore_current_program_space): New class.
10947         * remote.c (remote_btrace_maybe_reopen): Use
10948         scoped_restore_current_thread.
10949         * symtab.c: Include "progspace-and-thread.h".
10950         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10951         * thread.c (print_thread_info_1): Use
10952         scoped_restore_current_thread.
10953         (struct current_thread_cleanup): Delete.
10954         (do_restore_current_thread_cleanup)
10955         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10956         (scoped_restore_current_thread::~scoped_restore_current_thread):
10957         ... this new dtor.
10958         (make_cleanup_restore_current_thread): Rename/convert to ...
10959         (scoped_restore_current_thread::scoped_restore_current_thread):
10960         ... this new ctor.
10961         (thread_apply_all_command): Use scoped_restore_current_thread.
10962         (thread_apply_command): Use scoped_restore_current_thread.
10963         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10964         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10965
10966 2017-05-04  Pedro Alves  <palves@redhat.com>
10967
10968         * thread.c (make_cleanup_restore_current_thread): Move
10969         find_thread_ptid call before the is_stopped call.  Assert that the
10970         thread is found.  Replace is_stopped call by checking the thread's
10971         state directly.  Remove unnecessary NULL-thread check.
10972
10973 2017-05-04  Pedro Alves  <palves@redhat.com>
10974
10975         * corelow.c (thread_section_name): New class.
10976         (get_core_register_section, get_core_siginfo): Use it.
10977
10978 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10979
10980         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10981         (get_core_register_section): Remove xfree of NULL pointer.
10982
10983 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10984
10985         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10986         * regcache.c (regcache::raw_supply_zeroed): New function.
10987         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10988
10989 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10990
10991         * gdbarch.sh: Remove commented out definition of
10992         TARGET_CHAR_BIT.
10993         * gdbarch.h: Re-generate.
10994
10995 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10996
10997         * configure: Regenerate.
10998
10999 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
11000
11001         * solib-target.c (solib_target_relocate_section_addresses):
11002         Remove num_section_bases, num_bases, segment_bases variables.
11003
11004 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11005
11006         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11007
11008 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11009
11010         * solib-target.c: Include <vector>
11011         (struct lm_info_target) <~lm_info_target>: Remove.
11012         <segment_bases, section_bases>: Change type to
11013         std::vector<CORE_ADDR>.
11014         (library_list_start_segment, library_list_start_section,
11015         library_list_end_library,
11016         solib_target_relocate_section_addresses): Adjust.
11017
11018 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11019
11020         * gdbarch.sh (software_single_step): Change return type to
11021         std::vector<CORE_ADDR>.
11022         * gdbarch.c, gdbarch.h: Re-generate.
11023         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11024         Adjust.
11025         (arm_deal_with_atomic_sequence_raw): Adjust.
11026         (thumb_get_next_pcs_raw): Adjust.
11027         (arm_get_next_pcs_raw): Adjust.
11028         (arm_get_next_pcs): Adjust.
11029         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11030         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11031         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11032         (alpha_software_single_step): Adjust.
11033         * alpha-tdep.h (alpha_software_single_step): Adjust.
11034         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11035         * arm-tdep.c (arm_software_single_step): Adjust.
11036         (arm_breakpoint_kind_from_current_state): Adjust.
11037         * arm-tdep.h (arm_software_single_step): Adjust.
11038         * breakpoint.c (insert_single_step_breakpoint): Adjust.
11039         * cris-tdep.c (cris_software_single_step): Adjust.
11040         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11041         (micromips_deal_with_atomic_sequence): Adjust.
11042         (deal_with_atomic_sequence): Adjust.
11043         (mips_software_single_step): Adjust.
11044         * mips-tdep.h (mips_software_single_step): Adjust.
11045         * moxie-tdep.c (moxie_software_single_step): Adjust.
11046         * nios2-tdep.c (nios2_software_single_step): Adjust.
11047         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11048         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11049         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11050         * s390-linux-tdep.c (s390_software_single_step): Adjust.
11051         * sparc-tdep.c (sparc_software_single_step): Adjust.
11052         * spu-tdep.c (spu_software_single_step): Adjust.
11053         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11054
11055 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11056
11057         * gdbarch.sh: Use semi-colon as field separator instead of colon.
11058         * gdbarch.h: Re-generate.
11059
11060 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11061
11062         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11063         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11064         * python/py-instruction.c, python/py-instruction.h: New file.
11065         * python/py-record.c: Add py-instruction.h include.
11066         (gdbpy_initialize_record): Make gdb.Instruction a super class of
11067         gdb.RecordInstruction.
11068         * python/python-internal.h: Add gdbpy_initialize_instruction
11069         declaration.
11070         * python/python.c (do_start_initialization): Add
11071         gdbpy_initialize_instruction.
11072
11073 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11074
11075         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11076         Remove.
11077         (btrace_func_from_recpy_func): New function.
11078         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11079         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11080         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11081         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11082         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11083         Also, use new helper functions.
11084         (btpy_list_item): Use new helper functions.
11085         (recpy_bt_function_call_history): Use new type name.
11086         (btpy_call_getset): Remove.
11087         (gdbpy_initialize_btrace): Remove code to initialize
11088         gdb.BtraceFunctionCall.
11089         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11090         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11091         recpy_bt_func_prev, recpy_bt_func_next): New export.
11092         * python/py-record.c (recpy_func_type): New static object.
11093         (recpy_func_new, recpy_func_level, recpy_func_symbol,
11094         recpy_func_instructions, recpy_func_up, recpy_func_prev,
11095         recpy_func_next): New function.
11096         (recpy_element_hash, recpy_element_richcompare): Updated comment.
11097         (recpy_func_getset): New static object.
11098         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11099         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11100
11101 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11102
11103         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11104         (btpy_object, btpy_insn_type, btpy_new): Remove.
11105         (btpy_list_object): Use gdb.RecordInstruction type instead of
11106         gdb.BtraceInstruction type.
11107         (btrace_insn_from_recpy_insn): New function.
11108         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11109         btpy_new.
11110         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11111         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11112         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11113         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11114         instead of btpy_object.
11115         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11116         btpy_insn_data, btpy_insn_decode): Rename to ...
11117         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11118         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11119         recpy_bt_insn_decode): This.  Also, use new helper functions.
11120         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11121         recpy_insn_type.
11122         (btpy_insn_getset): Remove.
11123         (gdbpy_initialize_btrace): Remove code to initialize
11124         gdb.BtraceInstruction.  Use recpy_element_object.
11125         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11126         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11127         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11128         * python/py-record.c (recpy_insn_type): New static object.
11129         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11130         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11131         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11132         New function.
11133         (recpy_insn_getset): New static object.
11134         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11135         * python/py-record.h (recpy_element_object): New typedef.
11136         (recpy_insn_type, recpy_insn_new): New export.
11137
11138 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11139
11140         * py-record-btrace.c (btpy_insn_new): Removed.
11141         (btpy_insn_or_gap_new): New function.
11142         (btpy_insn_error): Removed.
11143         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11144         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11145         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11146         btpy_insn_or_gap_new instead of btpy_insn_new.
11147         (btpy_insn_getset): Remove btpy_insn_error.
11148         * py-record.c (recpy_gap_type): New static object.
11149         (recpy_gap_object): New typedef.
11150         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11151         recpy_gap_reason_string): New function.
11152         (recpy_gap_getset): New static object.
11153         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11154         * py-record.h (recpy_gap_new): New export.
11155
11156 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11157
11158         * python/py-record.c (recpy_ptid): Remove.
11159         (recpy_record_getset): Remove recpy_ptid.
11160
11161 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11162
11163         * btrace.c (btrace_fetch): Set inferior_ptid.
11164         * python/py-record-btrace.c: Add "py-record.h" include.
11165         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11166         recpy_bt_end, recpy_bt_instruction_history,
11167         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11168         in gdb.Record object instead of current ptid.
11169         * python/py-record.c: Include new "py-record.h" file.
11170         (recpy_record_object): Moved to py-record.h.
11171         * python/py-record.h: New file.
11172
11173 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11174
11175         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11176         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11177         indentation.
11178
11179 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
11180
11181         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11182         the past maintainers section.
11183
11184 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11185
11186         * infcmd.c (get_return_value): Use regcache ctor, and remove
11187         cleanup.
11188
11189 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11190             Pedro Alves  <palves@redhat.com>
11191
11192         * regcache.c (regcache::regcache): New tag dispatch ctor.
11193         (do_cooked_read): Moved above.
11194         (regcache_dup): Use the tag dispatch ctor..
11195         * regcache.h (regcache): Declare ctor, delete copy ctor and
11196         assignment operator, remove friend regcache_dup.
11197
11198 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11199
11200         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11201         call method save instead of regcache_cpy.
11202         * regcache.h (struct regcache): Make regcache_dup a friend.
11203
11204 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11205
11206         * regcache.c (struct regcache): Move to regcache.h
11207         (regcache::arch): New method.
11208         (regcache_get_ptid): Update.
11209         (get_regcache_arch): Call arch method.
11210         (get_regcache_aspace): Call method aspace.
11211         (register_buffer): Change it to method.
11212         (regcache_save): Change it to regcache::save.
11213         (regcache_restore): Likewise.
11214         (regcache_cpy_no_passthrough): Remove the declaration.
11215         (regcache_cpy): Call methods restore and cpy_no_passthrough.
11216         (regcache_cpy_no_passthrough): Change it to method
11217         cpy_no_passthrough.
11218         (regcache_register_status): Change it to method
11219         get_register_status.
11220         (regcache_invalidate): Change it to method invalidate.
11221         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11222         (regcache_raw_update): Change it to method raw_update.
11223         (regcache_raw_read): Likewise.
11224         (regcache_raw_read_signed): Likewise.
11225         (regcache_raw_read_unsigned): Likewise.
11226         (regcache_raw_write_signed): Likewise.
11227         (regcache_raw_write_unsigned): Likewise.
11228         (regcache_cooked_read): Likewise.
11229         (regcache_cooked_read_value): Likewise.
11230         (regcache_cooked_read_signed): Likewise.
11231         (regcache_cooked_read_unsigned): Likewise.
11232         (regcache_cooked_write_signed): Likewise.
11233         (regcache_cooked_write_unsigned): Likewise.
11234         (regcache_raw_set_cached_value): Likewise.
11235         (regcache_raw_write): Likewise.
11236         (regcache_cooked_write): Likewise.
11237         (regcache_xfer_part): Likewise.
11238         (regcache_raw_read_part): Likewise.
11239         (regcache_raw_write_part): Likewise.
11240         (regcache_cooked_read_part): Likewise.
11241         (regcache_cooked_write_part): Likewise.
11242         (regcache_raw_supply): Likewise.
11243         (regcache_raw_collect): Likewise.
11244         (regcache_transfer_regset): Likewise.
11245         (regcache_supply_regset): Likewise.
11246         (regcache_collect_regset): Likewise.
11247         (regcache_debug_print_register): Likewise.
11248         (enum regcache_dump_what): Move it to regcache.h.
11249         (regcache_dump): Change it to method dump.
11250         * regcache.h (enum regcache_dump_what): New.
11251         (class regcache): New.
11252         * target.c (target_fetch_registers): Call method
11253         debug_print_register.
11254         (target_store_registers): Likewise.
11255
11256 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11257
11258         * windows-nat.c (struct lm_info_windows): Initialize field.
11259         (windows_make_so): Allocate lm_info_windows with new.
11260         (windows_free_so): Free lm_info_windows with delete.
11261
11262 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11263
11264         * solib-darwin.c (struct lm_info_darwin): Initialize field.
11265         (darwin_current_sos): Allocate lm_info_darwin with new, remove
11266         cleanup.
11267         (darwin_free_so): Free lm_info_darwin with delete.
11268
11269 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11270
11271         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11272         <l_addr_p>: Change type to bool.
11273         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11274         (svr4_free_so): Free lm_info_svr4 with delete.
11275         (svr4_copy_library_list): Replace memcpy with call to copy
11276         constructor.
11277         (library_list_start_library, svr4_default_sos): Allocate
11278         lm_info_svr4 with new.
11279
11280 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11281
11282         * solib-target.c (struct lm_info_target): Add destructor,
11283         initialize fields.
11284         <name>: Change type to std::string.
11285         (library_list_start_library): Allocate lm_info_target with new.
11286         (solib_target_free_library_list): Free lm_info_target with
11287         delete.
11288         (solib_target_current_sos): Adapt to std::string.
11289         (solib_target_free_so): Free lm_info_target with delete.
11290
11291 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11292
11293         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11294         fields.
11295         (frv_current_sos): Allocate lm_info_frv with new.
11296         (frv_relocate_main_executable): Free lm_info_frv with delete,
11297         allocate with new.
11298         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11299
11300 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11301
11302         * solib-frv.c (struct lm_info_frv): Fix indentation.
11303
11304 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11305
11306         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11307         map field.
11308         (dsbt_current_sos): Allocate lm_info_dsbt with new.
11309         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11310         and allocate with new.
11311         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11312
11313 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11314
11315         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11316         <filename, member_name>: Change type to std::string.
11317         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11318         (library_list_start_library): Allocate lm_info_aix with new.
11319         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11320         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11321         with copy constructor.
11322
11323 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11324
11325         * solist.h (struct lm_info): Remove.
11326         (struct lm_info_base): New class.
11327         (struct so_list) <lm_info>: Change type to lm_info_base *.
11328         * nto-tdep.c (struct lm_info): Remove.
11329         (lm_addr): Adjust.
11330         * solib-aix.c (struct lm_info): Rename to ...
11331         (struct lm_info_aix): ... this.  Extend lm_info_base.
11332         (lm_info_p): Rename to ...
11333         (lm_info_aix_p): ... this, and adjust.
11334         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11335         solib_aix_parse_libraries, library_list_start_library,
11336         solib_aix_free_library_list, solib_aix_parse_libraries,
11337         solib_aix_get_library_list,
11338         solib_aix_relocate_section_addresses, solib_aix_free_so,
11339         solib_aix_get_section_offsets,
11340         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11341         Adjust.
11342         (struct solib_aix_inferior_data) <library_list>: Adjust.
11343         * solib-darwin.c (struct lm_info): Rename to ...
11344         (struct lm_info_darwin): ... this.  Extend lm_info_base.
11345         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11346         * solib-dsbt.c (struct lm_info): Rename to ...
11347         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
11348         (struct dsbt_info) <main_executable_lm_info): Adjust.
11349         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11350         dsbt_relocate_section_addresses): Adjust.
11351         * solib-frv.c (struct lm_info): Rename to ...
11352         (struct lm_info_frv): ... this.  Extend lm_info_base.
11353         (main_executable_lm_info): Adjust.
11354         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11355         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11356         find_canonical_descriptor_in_load_object,
11357         frv_fdpic_find_canonical_descriptor): Adjust.
11358         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11359         to lm_info_svr4.
11360         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11361         svr4_clear_so, svr4_copy_library_list,
11362         library_list_start_library, svr4_default_sos, svr4_read_so_list,
11363         svr4_current_sos, svr4_fetch_objfile_link_map,
11364         solist_update_incremental): Adjust.
11365         * solib-svr4.h (struct lm_info_svr4): Move here from
11366         solib-svr4.c.
11367         * solib-target.c (struct lm_info): Rename to ...
11368         (struct lm_info_target): ... this.  Extend lm_info_base.
11369         (lm_info_p): Rename to ...
11370         (lm_info_target_p): ... this.
11371         (solib_target_parse_libraries, library_list_start_segment,
11372         library_list_start_section, library_list_start_library,
11373         library_list_end_library, solib_target_free_library_list,
11374         solib_target_current_sos, solib_target_free_so,
11375         solib_target_relocate_section_addresses): Adjust.
11376         * windows-nat.c (struct lm_info): Rename to ...
11377         (struct lm_info_windows): ... this.  Extend lm_info_base.
11378         (windows_make_so, handle_load_dll, handle_unload_dll,
11379         windows_xfer_shared_libraries): Adjust.
11380
11381 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11382
11383         * solib-darwin.c (struct darwin_so_list): Remove.
11384         (darwin_current_sos): Allocate an so_list object instead of a
11385         darwin_so_list, separately allocate an lm_info object.
11386         (darwin_free_so): Free lm_info.
11387
11388 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
11389
11390         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11391         with fprintf_filtered.
11392
11393 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11394
11395         * regcache.c (regcache::regcache): New function.
11396         (regcache::~regcache): New function.
11397         (regcache_xmalloc_1): Remove.
11398         (regcache_xmalloc): Call new regcache.
11399         (regcache_xfree): Call delete regcache.
11400         (get_thread_arch_aspace_regcache): Call new regcache.
11401
11402 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11403
11404         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11405         lwp instead of ptid_get_lwp.
11406
11407 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11408
11409         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11410         lwp_info instead of getting from inferior_ptid.
11411
11412 2017-04-27  Keith Seitz  <keiths@redhat.com>
11413
11414         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11415         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11416         (CV_CONVERSION_BADNESS): Define.
11417         (rank_one_type): Remove overly restrictive rvalue reference
11418         rank checks.
11419         Add cv-qualifier checks and subranks for type equality.
11420         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11421         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11422         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11423
11424 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
11425
11426         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11427         count when creating the object.
11428
11429 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
11430             Ulrich Weigand  <uweigand@de.ibm.com>
11431
11432         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11433         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11434         is used in AIX.
11435         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11436         (process_xcoff_symbol): Likewise.
11437         (scan_xcoff_symtab): Likewise.
11438
11439 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11440
11441         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11442         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11443         (ia64_access_reg): Use get_frame_register_unsigned.
11444         (ia64_access_rse_reg): Likewise.
11445         (ia64_libunwind_frame_prev_register): Likewise.
11446
11447 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
11448
11449         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11450         * gdbarch.c: Regenerated.
11451         * gdbarch.h: Regenerated.
11452         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11453         visibility external.
11454         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11455         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11456         (enum cfa_how_kind): Move to ...
11457         (struct dwarf2_frame_state_reg_info): Likewise.
11458         (struct dwarf2_frame_state): Likewise.
11459         * dwarf2-frame.h: ... here.
11460         (dwarf2_frame_state_alloc_regs): New declaration.
11461         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11462         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11463
11464 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11465
11466         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11467         regcache_raw_read_unsigned.
11468         (xtensa_pseudo_register_write): Likewise.
11469
11470 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11471
11472         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11473         (nds32_pseudo_register_write): Likewise.
11474
11475 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11476
11477         * regcache.c (struct regcache) <readonly_p>: Change its type
11478         to bool.
11479         (regcache_xmalloc_1): Update parameter type and callers update.
11480
11481 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11482
11483         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11484         set_gdbarch_wchar_bit.
11485         * arm-tdep.c (arm_gdbarch_init): Likewise.
11486
11487 2017-04-25  Pedro Alves  <palves@redhat.com>
11488
11489         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11490         (BothAreRelocatable, memcopy, memmove): Don't define.
11491         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11492         macros.
11493
11494 2017-04-25  Pedro Alves  <palves@redhat.com>
11495
11496         * common/common-defs.h: Include "common/poison.h".
11497         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11498         and adjust.
11499         * common/poison.h: New file.
11500         * common/traits.h: Include <type_traits>.
11501         (Not, Or, Requires): New, moved from common/function-view.h.
11502
11503 2017-04-25  Pedro Alves  <palves@redhat.com>
11504
11505         * breakpoint.h (struct breakpoint): In-class initialize all
11506         fields.  Make boolean fields "bool".
11507         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11508         memset call and initializations no longer necessary.
11509
11510 2017-04-25  Pedro Alves  <palves@redhat.com>
11511
11512         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11513         reference.
11514         (pt_btrace_insn): New function.
11515         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11516
11517 2017-04-25  Pedro Alves  <palves@redhat.com>
11518
11519         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11520         "base" field and inherit from "bp_location" instead.  Add
11521         non-default ctor.
11522         (allocate_location_exception): Use new non-default ctor.
11523         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11524         (init_bp_location): Convert to ...
11525         (bp_location::bp_location): ... this new ctor, and remove memset
11526         call.
11527         (base_breakpoint_allocate_location): Use the new non-default ctor.
11528         * breakpoint.h (bp_location): Now a class.  Declare default and
11529         non-default ctors.  In-class initialize all members.
11530         (init_bp_location): Remove declaration.
11531
11532 2017-04-25  Pedro Alves  <palves@redhat.com>
11533
11534         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11535         assignment operator.
11536
11537 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11538
11539         * doublest.c (convert_doublest_to_floatformat): Call
11540         floatformat_totalsize_bytes.
11541
11542 2017-04-22  Tom Tromey  <tom@tromey.com>
11543
11544         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11545         ui_out_emit_list.
11546         * stack.c (print_frame): Use ui_out_emit_list.
11547         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11548         ui_out_emit_list.
11549         * mi/mi-main.c (print_one_inferior)
11550         (mi_cmd_data_list_register_names)
11551         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11552         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11553         ui_out_emit_list.
11554         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11555         (mi_output_solib_attribs): Use ui_out_emit_list,
11556         ui_out_emit_tuple.
11557         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11558         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11559         (mi_cmd_stack_list_args, list_args_or_locals): Use
11560         ui_out_emit_list.
11561         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11562         * breakpoint.c (print_solib_event, output_thread_groups): Use
11563         ui_out_emit_list.
11564
11565 2017-04-22  Tom Tromey  <tom@tromey.com>
11566
11567         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11568         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11569         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11570
11571 2017-04-22  Tom Tromey  <tom@tromey.com>
11572
11573         * tracepoint.c (tvariables_info_1)
11574         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11575
11576 2017-04-22  Tom Tromey  <tom@tromey.com>
11577
11578         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11579         annotate_arg_emitter.
11580         * breakpoint.c (print_mention_watchpoint)
11581         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11582         * annotate.h (struct annotate_arg_emitter): New.
11583
11584 2017-04-22  Tom Tromey  <tom@tromey.com>
11585
11586         * record-btrace.c (record_btrace_insn_history)
11587         (record_btrace_insn_history_range, record_btrace_call_history)
11588         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11589         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11590         ui_out_emit_tuple.
11591         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11592         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11593         * skip.c (skip_info): Use ui_out_emit_tuple.
11594         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11595         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11596         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11597         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11598         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11599         ui_out_emit_tuple.
11600         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11601         (output_register, mi_cmd_data_read_memory)
11602         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11603         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11604         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11605         Use ui_out_emit_tuple.
11606         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11607         ui_out_emit_tuple.
11608         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11609         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11610         * linux-thread-db.c (info_auto_load_libthread_db): Use
11611         ui_out_emit_tuple.
11612         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11613         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11614         * disasm.c (do_mixed_source_and_assembly_deprecated)
11615         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11616         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11617         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11618         * breakpoint.c (print_one_breakpoint_location)
11619         (print_one_breakpoint): Use ui_out_emit_tuple.
11620         * auto-load.c (print_script, info_auto_load_cmd): Use
11621         ui_out_emit_tuple.
11622         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11623
11624 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11625
11626         * thread.c (print_thread_info_1): Remove dead code.
11627
11628 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11629
11630         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11631         GDB_SELF_TEST.
11632         * arm-tdep.c (selftests::arm_record_test): Likewise.
11633
11634 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11635
11636         * regcache.c (regcache_restore): Remove argument 2.  Replace
11637         argument 3 with regcache.  Get register status from
11638         src->register_status and get register contents from
11639         register_buffer (src, regnum).
11640         (regcache_cpy): Update.
11641
11642 2017-04-19  Pedro Alves  <palves@redhat.com>
11643
11644         * gdbthread.h (thread): Add missing closing parenthesis in
11645         comment.
11646
11647 2017-04-19  Pedro Alves  <palves@redhat.com>
11648
11649         * common/refcounted-object.h: New file.
11650         * gdbthread.h: Include "common/refcounted-object.h".
11651         (thread_info): Inherit from refcounted_object and add comments.
11652         (thread_info::incref, thread_info::decref)
11653         (thread_info::m_refcount): Delete.
11654         (thread_info::deletable): Use the refcounted_object::refcount()
11655         method.
11656         * inferior.c (current_inferior_): Add comment.
11657         (set_current_inferior): Increment/decrement refcounts.
11658         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11659         not-deletable instead of comparing with the current inferior.
11660         (initialize_inferiors): Increment the initial inferior's refcount.
11661         * inferior.h (struct inferior): Forward declare.
11662         Include "common/refcounted-object.h".
11663         (current_inferior, set_current_inferior): Move declaration to
11664         before struct inferior's definition, and fix comment.
11665         (inferior): Inherit from refcounted_object.  Add comments.
11666         * thread.c (switch_to_thread_no_regs): Reference the thread's
11667         inferior pointer directly instead of doing a ptid lookup.
11668         (switch_to_no_thread): New function.
11669         (switch_to_thread(thread_info *)): New function, factored out
11670         from ...
11671         (switch_to_thread(ptid_t)): ... this.
11672         (restore_current_thread): Delete.
11673         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11674         fields, and add 'inf' field.
11675         (do_restore_current_thread_cleanup): Check whether old->inf is
11676         alive instead of looking up an inferior by ptid.  Use
11677         switch_to_thread and switch_to_no_thread.
11678         (restore_current_thread_cleanup_dtor): Use old->inf directly
11679         instead of lookup up an inferior by id.  Decref the inferior.
11680         Don't restore 'removable'.
11681         (make_cleanup_restore_current_thread): Same the inferior pointer
11682         in old, instead of the inferior number.  Incref the inferior.
11683         Don't save/clear 'removable'.
11684
11685 2017-04-19  Pedro Alves  <palves@redhat.com>
11686
11687         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11688         unittests/scoped_restore-selftests.c.
11689         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11690         * common/scoped_restore.h (scoped_restore_base): Make "class".
11691         (scoped_restore_base::release): New public method.
11692         (scoped_restore_base::scoped_restore_base): New protected ctor.
11693         (scoped_restore_base::m_saved_var): New protected field.
11694         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11695         scoped_restore_base base class instead of m_saved_var directly.
11696         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11697         (scoped_restore_tmpl::scoped_restore_tmpl(const
11698         scoped_restore_tmpl<T>&)): Likewise.
11699         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11700         method.
11701         (scoped_restore_tmpl::saved_var): New method.
11702         (scoped_restore_tmpl::m_saved_var): Delete.
11703         * inferior.h (inferior::detaching): Now a bool.
11704         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11705         cleanup.
11706         * unittests/scoped_restore-selftests.c: New file.
11707
11708 2017-04-19  Pedro Alves  <palves@redhat.com>
11709
11710         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11711         Re-sort in alphabetic order.
11712
11713 2017-04-18  Pedro Alves  <palves@redhat.com>
11714
11715         * xml-support.c (obstack_xml_printf): Delete.
11716         * xml-support.h (obstack_xml_printf): Delete.
11717
11718 2017-04-18  Pedro Alves  <palves@redhat.com>
11719
11720         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11721         vdebug, verror, body_text, start_element, end_element, name,
11722         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11723         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11724         is_xinclude>: Make private and add m_ prefix.
11725         (gdb_xml_parser::body_text): New method, based on ...
11726         (gdb_xml_body_text): ... this.  Adjust.
11727         (gdb_xml_parser::vdebug): New method, based on ...
11728         (gdb_xml_debug): ... this.  Adjust.
11729         (gdb_xml_parser::verror): New method, based on ...
11730         (gdb_xml_error): ... this.  Adjust.
11731         (gdb_xml_parser::start_element): New method, based on ...
11732         (gdb_xml_start_element): ... this.  Adjust.
11733         (gdb_xml_start_element_wrapper): Defer to
11734         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11735         (gdb_xml_parser::end_element): New method, based on ...
11736         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11737         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11738         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11739         (gdb_xml_parser::use_dtd): New method, based on ...
11740         (gdb_xml_use_dtd): ... this.  Adjust.
11741         (gdb_xml_parser::parse): New method, based on ...
11742         (gdb_xml_parse): ... this.  Adjust.
11743         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11744         (xinclude_start_include): Adjust to call the parser's name method.
11745         (xml_xinclude_default, xml_xinclude_start_doctype)
11746         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11747         method.
11748         (xml_process_xincludes): Adjust to call parser methods.
11749         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11750         declarations.
11751
11752 2017-04-18  Pedro Alves  <palves@redhat.com>
11753
11754         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11755         gdb::optional<std::string>.
11756         * xml-support.c: Include <string>.
11757         (scope_level::scope_level(scope_level &&))
11758         (scope_level::~scope_level): Delete.
11759         (scope_level::body): Now a std::string.
11760         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11761         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11762         parameter.
11763         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11764         (xinclude_parsing_data::output): Now a std::string reference.
11765         (xinclude_start_include): Adjust.
11766         (xml_xinclude_default): Adjust.
11767         (xml_process_xincludes): Add 'output' parameter, and return bool.
11768         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11769         and return bool.
11770         * xml-tdesc.c: Include <unordered_map> and <string>.
11771         (tdesc_xml_cache): Delete.
11772         (tdesc_xml_cache_s): Delete.
11773         (xml_cache): Now an std::unordered_map.
11774         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11775         (target_fetch_description_xml): Change return type to
11776         gdb::optional<std::string>, and adjust.
11777         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11778         (target_fetch_description_xml): Change return type to
11779         gdb::optional<std::string>.
11780
11781 2017-04-18  Pedro Alves  <palves@redhat.com>
11782
11783         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11784         unittests/optional-selftests.c.
11785         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11786         * unittests/optional-selftests.c: New file.
11787         * unittests/optional/assignment/1.cc: New file.
11788         * unittests/optional/assignment/2.cc: New file.
11789         * unittests/optional/assignment/3.cc: New file.
11790         * unittests/optional/assignment/4.cc: New file.
11791         * unittests/optional/assignment/5.cc: New file.
11792         * unittests/optional/assignment/6.cc: New file.
11793         * unittests/optional/assignment/7.cc: New file.
11794         * unittests/optional/cons/copy.cc: New file.
11795         * unittests/optional/cons/default.cc: New file.
11796         * unittests/optional/cons/move.cc: New file.
11797         * unittests/optional/cons/value.cc: New file.
11798         * unittests/optional/in_place.cc: New file.
11799         * unittests/optional/observers/1.cc: New file.
11800         * unittests/optional/observers/2.cc: New file.
11801
11802 2017-04-18  Pedro Alves  <palves@redhat.com>
11803
11804         * common/gdb_optional.h: Include common/traits.h.
11805         (in_place_t): New type.
11806         (in_place): New constexpr variable.
11807         (optional::optional): Remove member initialization of
11808         m_instantiated.
11809         (optional::optional(in_place_t...)): New constructor.
11810         (optional::~optional): Use reset.
11811         (optional::optional(const optional&)): New.
11812         (optional::optional(const optional&&)): New.
11813         (optional::optional(T &)): New.
11814         (optional::optional(T &&)): New.
11815         (operator::operator=(const optional &)): New.
11816         (operator::operator=(optional &&)): New.
11817         (operator::operator= (const T &))
11818         (operator::operator= (T &&))
11819         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11820         (operator::reset): New.
11821         (operator::m_instantiated):: Add in-class initializer.
11822         * common/traits.h: Include <type_traits>.
11823         (struct And): New types.
11824
11825 2017-04-18  Pedro Alves  <palves@redhat.com>
11826
11827         * xml-support.c: Include <vector>.
11828         (scope_level::scope_level(const gdb_xml_element *))
11829         (scope_level::scope_level(scope_level&&)): New.
11830         (scope_level::~scope_level): New.
11831         (scope_level_s): Delete.
11832         (gdb_xml_parser::scopes): Now a std::vector.
11833         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11834         Use std::vector.
11835         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11836         scope cleanup code.
11837         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11838         of the scopes member.  Use std::vector::emplace_back.
11839
11840 2017-04-18  Pedro Alves  <palves@redhat.com>
11841
11842         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11843         a bool.
11844         (gdb_xml_end_element): Change type of first parameter.
11845         (gdb_xml_cleanup): Rename to ...
11846         (gdb_xml_parser::~gdb_xml_parser): ... this.
11847         (gdb_xml_create_parser_and_cleanup): Delete with ...
11848         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11849         to this new ctor.
11850         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11851         using gdb_xml_create_parser_and_cleanup.
11852         (xinclude_parsing_data): Add ctor/dtor.
11853         (xml_xinclude_cleanup): Delete.
11854         (xml_process_xincludes): Create a local xinclude_parsing_data
11855         instead of heap-allocating one.  Create a local gdb_xml_parser
11856         instead of heap-allocating one with
11857         gdb_xml_create_parser_and_cleanup.
11858
11859 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11860
11861         PR threads/20743
11862         * fbsd-nat.c (resume_one_thread_cb): Remove.
11863         (resume_all_threads_cb): Remove.
11864         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11865         iterate_over_threads.
11866
11867 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11868
11869         * NEWS: Create a new section for the next release branch.
11870         Rename the section of the current branch, now that it has
11871         been cut.
11872
11873 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11874
11875         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11876         * version.in: Bump version to 8.0.50.DATE-git.
11877
11878 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11879
11880         PR gdb/21385
11881         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11882         independently of the host, and fix build breakage on Cygwin.
11883
11884 2017-04-13  Pedro Alves  <palves@redhat.com>
11885
11886         * inferior.c (free_inferior): Convert to ...
11887         (inferior::~inferior): ... this dtor.
11888         (inferior::inferior): New ctor, factored out from ...
11889         (add_inferior_silent): ... here.  Allocate the inferior with a new
11890         expression.
11891         (delete_inferior): Call delete instead of free_inferior.
11892         * inferior.h (gdb_environ, continuation): Forward declare.
11893         (inferior): Now a class.  Add in-class initialization to all
11894         members.  Make boolean fields bool, except 'detaching'.
11895         (inferior::inferior): New explicit ctor.
11896         (inferior::~inferior): New.
11897
11898 2017-04-13  Pedro Alves  <palves@redhat.com>
11899
11900         * inferior.c (init_inferior_list): Delete.
11901         * inferior.h (init_inferior_list): Delete.
11902
11903 2017-04-13  Pedro Alves  <palves@redhat.com>
11904
11905         PR threads/13217
11906         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11907         (top level): Call it twice, with different thread sets.
11908
11909 2017-04-13  Pedro Alves  <palves@redhat.com>
11910
11911         * thread.c: Include <algorithm>.
11912         (thread_array_cleanup): Delete.
11913         (scoped_inc_dec_ref): New class.
11914         (live_threads_count): New function.
11915         (set_thread_refcount): Delete.
11916         (tp_array_compar_ascending): Now a bool.
11917         (tp_array_compar): Convert to a std::sort comparison function.
11918         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11919         and live_threads_count.
11920
11921 2017-04-13  Pedro Alves  <palves@redhat.com>
11922
11923         * infrun.c (follow_fork_inferior): Also switch the current
11924         inferior.
11925
11926 2017-04-13  Pedro Alves  <palves@redhat.com>
11927
11928         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11929         before calling create_internal_breakpoint.
11930
11931 2017-04-13  Pedro Alves  <palves@redhat.com>
11932
11933         * fork-child.c (execv_argv): New class.
11934         (breakup_args): Refactored as ...
11935         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11936         Copy arguments to storage and replace separators with NULL
11937         terminators in place.
11938         (escape_bang_in_quoted_argument): Adjust to return bool.
11939         (execv_argv::execv_argv): New ctor.
11940         (execv_argv::init_for_shell): New method, factored out from
11941         fork_inferior.  Don't strdup strings into the vector.
11942         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11943         Remove free_vector_argv call.
11944
11945 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11946
11947         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11948         tdep->rx_psw_type.
11949
11950 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11951
11952         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11953         * rx-tdep.c (rx_gdbarch_init): Likewise.
11954
11955 2017-04-13  Pedro Alves  <palves@redhat.com>
11956
11957         * breakpoint.h (struct breakpoint): Reindent.
11958
11959 2017-04-13  Pedro Alves  <palves@redhat.com>
11960
11961         * breakpoint.c (bp_location): Rename to ...
11962         (bp_locations): ... this.  All references updated.
11963         (bp_location_count): Rename to ...
11964         (bp_locations_count): ... this.  All references updated.
11965         (bp_location_placed_address_before_address_max): Rename to ...
11966         (bp_locations_placed_address_before_address_max): ... this.  All
11967         references updated.
11968         (bp_location_shadow_len_after_address_max): Rename to ...
11969         (bp_locations_shadow_len_after_address_max): ... this.  All
11970         references updated.
11971         (bp_location_compare_addrs): Rename to ...
11972         (bp_locations_compare_addrs): ... this.  All references updated.
11973         (bp_location_compare):Rename to ...
11974         (bp_locations_compare): ... this.  All references updated.
11975         (bp_location_target_extensions_update): Rename to ...
11976         (bp_locations_target_extensions_update): ... this.  All references
11977         updated.
11978
11979 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11980
11981         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11982         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11983         'sgtty.h'.
11984         * common/gdb_termios.h: New file, with parts of "terminal.h".
11985         * inflow.c: Include "gdb_termios.h".
11986         * ser-unix.c: Include "gdb_termios.h".
11987         * terminal.h: Move terminal-related defines to
11988         "common/gdb_termios.h".
11989
11990 2017-04-12  Tom Tromey  <tom@tromey.com>
11991
11992         * probe.c (parse_probes): Update.
11993         * location.h (delete_event_location): Don't declare.
11994         (event_location_deleter::operator()): Update.
11995         * location.c (event_location_deleter::operator()): Rename from
11996         delete_event_location.
11997         * linespec.h (linespec_result) <location>: Change type to
11998         event_location_up.
11999         * linespec.c (canonicalize_linespec, event_location_to_sals)
12000         (decode_objc): Update.
12001         (linespec_result): Don't call delete_event_location.
12002         * breakpoint.c (create_breakpoints_sal)
12003         (bkpt_probe_create_sals_from_location)
12004         (strace_marker_create_sals_from_location): Update.
12005
12006 2017-04-12  Tom Tromey  <tom@tromey.com>
12007
12008         * linespec.h (struct linespec_result): Add constructor and
12009         destructor.
12010         (init_linespec_result, destroy_linespec_result)
12011         (make_cleanup_destroy_linespec_result): Don't declare.
12012         * linespec.c (init_linespec_result): Remove.
12013         (linespec_result::~linespec_result): Rename from
12014         destroy_linespec_result.  Update.
12015         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12016         Remove.
12017         * breakpoint.c (create_breakpoint, break_range_command)
12018         (decode_location_default): Update.
12019         * ax-gdb.c (agent_command_1): Update.
12020
12021 2017-04-12  Tom Tromey  <tom@tromey.com>
12022
12023         * remote.c (remote_download_tracepoint): Update.
12024         * python/py-breakpoint.c (bppy_get_location): Update.
12025         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12026         (gdbscm_breakpoint_location): Update.
12027         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12028         * breakpoint.h (struct breakpoint) <location, location_range_end>:
12029         Change type to event_location_up.
12030         * breakpoint.c (create_overlay_event_breakpoint)
12031         (create_longjmp_master_breakpoint)
12032         (create_std_terminate_master_breakpoint)
12033         (create_exception_master_breakpoint)
12034         (breakpoint_event_location_empty_p, print_breakpoint_location)
12035         (print_one_breakpoint_location, create_thread_event_breakpoint)
12036         (init_breakpoint_sal, create_breakpoint)
12037         (print_recreate_ranged_breakpoint, break_range_command)
12038         (init_ada_exception_breakpoint, say_where): Update.
12039         (base_breakpoint_dtor): Don't call delete_event_location.
12040         (bkpt_print_recreate, tracepoint_print_recreate)
12041         (dprintf_print_recreate, update_static_tracepoint)
12042         (breakpoint_re_set_default): Update.
12043
12044 2017-04-12  Tom Tromey  <tom@tromey.com>
12045
12046         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12047         type of "to_do".  Update.
12048         (compute_stack_depth): Use std::vector.
12049
12050 2017-04-12  Tom Tromey  <tom@tromey.com>
12051
12052         * printcmd.c (find_instruction_backward): Use std::vector.
12053
12054 2017-04-12  Tom Tromey  <tom@tromey.com>
12055
12056         * symfile.c (objfilep): Remove typedef.
12057         (reread_symbols): Use a std::vector.
12058
12059 2017-04-12  Tom Tromey  <tom@tromey.com>
12060
12061         * mi/mi-main.c (exec_direction_forward): Remove.
12062         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12063         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12064         scoped_restore.
12065         * guile/guile.c (guile_repl_command, guile_command)
12066         (gdbscm_execute_gdb_command): Use scoped_restore.
12067         * go-exp.y (go_parse): Use scoped_restore.
12068         * d-exp.y (d_parse): Use scoped_restore.
12069         * cli/cli-decode.c (cmd_func): Use scoped_restore.
12070         * c-exp.y (c_parse): Use scoped_restore.
12071
12072 2017-04-12  Tom Tromey  <tom@tromey.com>
12073
12074         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12075         (mi_parse): Update return type.
12076         (mi_parse_free): Remove.
12077         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12078         (mi_parse::~mi_parse): Rename from mi_parse_free.
12079         (mi_parse_cleanup): Remove.
12080         (mi_parse): Return a unique_ptr.  Use new.
12081         * mi/mi-main.c (mi_execute_command): Update.
12082
12083 2017-04-12  Tom Tromey  <tom@tromey.com>
12084
12085         * location.c (explicit_location_lex_one): Return a
12086         unique_xmalloc_ptr.
12087         (string_to_explicit_location): Update.  Remove cleanups.
12088
12089 2017-04-12  Tom Tromey  <tom@tromey.com>
12090
12091         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12092         (compare_value_and_voffset): Change type.  Update.
12093         (compute_vtable_size): Change type of "offset_vec".
12094         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
12095         (gnuv3_get_typeid): Remove extraneous declaration.
12096
12097 2017-04-12  Tom Tromey  <tom@tromey.com>
12098
12099         * charset.h (wchar_iterator): Fix comment.
12100
12101 2017-04-12  Tom Tromey  <tom@tromey.com>
12102
12103         * charset.c (iconv_wrapper): New class.
12104         (cleanup_iconv): Remove.
12105         (convert_between_encodings): Use it.
12106
12107 2017-04-12  Tom Tromey  <tom@tromey.com>
12108
12109         * symfile.h (increment_reading_symtab): Update type.
12110         * symfile.c (decrement_reading_symtab): Remove.
12111         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12112         * psymtab.c (psymtab_to_symtab): Update.
12113         * dwarf2read.c (dw2_instantiate_symtab): Update.
12114
12115 2017-04-12  Tom Tromey  <tom@tromey.com>
12116
12117         * jit.c (struct jit_reader): Declare separately.  Add constructor
12118         and destructor.  Change type of "handle".
12119         (loaded_jit_reader): Define separately.
12120         (jit_reader_load): Update.  New "new".
12121         (jit_reader_unload_command): Use "delete".
12122         * gdb-dlfcn.h (struct dlclose_deleter): New.
12123         (gdb_dlhandle_up): New typedef.
12124         (gdb_dlopen, gdb_dlsym): Update types.
12125         (gdb_dlclose): Remove.
12126         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12127         (gdb_dlsym): Change type of "handle".
12128         (make_cleanup_dlclose): Remove.
12129         (dlclose_deleter::operator()): Rename from gdb_dlclose.
12130         * compile/compile-c-support.c (load_libcc): Update.
12131
12132 2017-04-12  Tom Tromey  <tom@tromey.com>
12133
12134         * symtab.h (find_pcs_for_symtab_line): Change return type.
12135         * symtab.c (find_pcs_for_symtab_line): Change return type.
12136         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12137         type of "vec".  Update.
12138         (ltpy_get_pcs_for_line): Update.
12139         * linespec.c (decode_digits_ordinary): Update.
12140
12141 2017-04-12  Tom Tromey  <tom@tromey.com>
12142
12143         * tracepoint.c (actions_command): Update.
12144         * python/python.c (python_command, python_interactive_command):
12145         Update.
12146         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12147         * guile/guile.c (guile_command): Update.
12148         * defs.h (read_command_lines, read_command_lines_1): Return
12149         command_line_up.
12150         (command_lines_deleter): New struct.
12151         (command_line_up): New typedef.
12152         * compile/compile.c (compile_code_command)
12153         (compile_print_command): Update.
12154         * cli/cli-script.h (get_command_line, copy_command_lines): Return
12155         command_line_up.
12156         (make_cleanup_free_command_lines): Remove.
12157         * cli/cli-script.c (get_command_line, read_command_lines_1)
12158         (copy_command_lines): Return command_line_up.
12159         (while_command, if_command, read_command_lines, define_command)
12160         (document_command): Update.
12161         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12162         Remove.
12163         * breakpoint.h (breakpoint_set_commands): Change type of
12164         "commands".
12165         * breakpoint.c (breakpoint_set_commands): Change type of
12166         "commands".  Update.
12167         (do_map_commands_command, update_dprintf_command_list)
12168         (create_tracepoint_from_upload): Update.
12169
12170 2017-04-12  Tom Tromey  <tom@tromey.com>
12171
12172         * tracepoint.c (scope_info): Update.
12173         * spu-tdep.c (spu_catch_start): Update.
12174         * python/python.c (gdbpy_decode_line): Update.
12175         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12176         * python/py-breakpoint.c (bppy_init): Update.
12177         * probe.c (parse_probes): Update.
12178         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12179         * location.h (event_location_deleter): New struct.
12180         (event_location_up): New typedef.
12181         (new_linespec_location, new_address_location, new_probe_location)
12182         (new_explicit_location, copy_event_location)
12183         (string_to_event_location, string_to_event_location_basic)
12184         (string_to_explicit_location): Update return type.
12185         (make_cleanup_delete_event_location): Remove.
12186         * location.c (new_linespec_location, new_address_location)
12187         (new_probe_location, new_explicit_location, copy_event_location):
12188         Return event_location_up.
12189         (delete_event_location_cleanup)
12190         (make_cleanup_delete_event_location): Remove.
12191         (string_to_explicit_location, string_to_event_location_basic)
12192         (string_to_event_location): Return event_location_up.
12193         * linespec.c (canonicalize_linespec, event_location_to_sals)
12194         (decode_line_with_current_source)
12195         (decode_line_with_last_displayed, decode_objc): Update.
12196         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12197         * completer.c (location_completer): Update.
12198         * cli/cli-cmds.c (edit_command, list_command): Update.
12199         * breakpoint.c (create_overlay_event_breakpoint)
12200         (create_longjmp_master_breakpoint)
12201         (create_std_terminate_master_breakpoint)
12202         (create_exception_master_breakpoint)
12203         (create_thread_event_breakpoint): Update.
12204         (init_breakpoint_sal): Update.  Remove some dead code.
12205         (create_breakpoint_sal): Change type of "location".  Update.
12206         (create_breakpoints_sal, create_breakpoint, break_command_1)
12207         (dprintf_command, break_range_command, until_break_command)
12208         (init_ada_exception_breakpoint)
12209         (strace_marker_create_sals_from_location)
12210         (update_static_tracepoint, trace_command, ftrace_command)
12211         (strace_command, create_tracepoint_from_upload): Update.
12212         * break-catch-throw.c (re_set_exception_catchpoint): Update.
12213         * ax-gdb.c (agent_command_1): Update.
12214
12215 2017-04-12  Pedro Alves  <palves@redhat.com>
12216
12217         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12218         * configure.tgt: Handle i[34567]86-*-go32* and
12219         i[34567]86-*-msdosdjgpp*.
12220         * i386-tdep.c (i386_svr4_reg_to_regnum):
12221         Make extern.
12222         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12223         i386-go32-tdep.c.
12224         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12225         * i386-go32-tdep.c: New file.
12226         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12227         declarations.
12228
12229 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
12230
12231         * aix-thread.c (pd_status2str): Change return type to const char *.
12232
12233 2017-04-12  Pedro Alves  <palves@redhat.com>
12234
12235         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12236         calls to set_gdbarch_gnu_triplet_regexp.
12237
12238 2017-04-12  Pedro Alves  <palves@redhat.com>
12239
12240         PR gdb/21323
12241         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12242         New enum value.
12243         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12244         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12245         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12246         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12247         * gdbarch.h, gdbarch.c: Regenerate.
12248         * aarch64-tdep.c (aarch64_gdbarch_init): Override
12249         gdbarch_wchar_bit and gdbarch_wchar_signed.
12250         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12251         * arm-tdep.c (arm_gdbarch_init): Likewise.
12252         * avr-tdep.c (avr_gdbarch_init): Likewise.
12253         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12254         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12255         * i386-tdep.c (i386_go32_init_abi): Likewise.
12256         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12257         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12258         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12259         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12260         * sh-tdep.c (sh_gdbarch_init): Likewise.
12261         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12262         * sparc64-tdep.c (sparc64_init_abi): Likewise.
12263         * windows-tdep.c (windows_init_abi): Likewise.
12264         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12265
12266 2017-04-12  Pedro Alves  <palves@redhat.com>
12267
12268         PR c++/21323
12269         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12270         cplus_primitive_type_char32_t>: New enum values.
12271         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12272         and cplus_primitive_type_char32_t.
12273         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12274         32, use the archtecture's built-in type for char16_t and char32_t,
12275         respectively.  Otherwise, fallback to init_integer_type as before,
12276         but make the type unsigned, and issue a complaint.
12277         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12278
12279 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
12280
12281         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12282         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12283
12284 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12285
12286         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12287         'const char *'.
12288
12289 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12290
12291         * common/common-utils.c (free_vector_argv): New function.
12292         * common/common-utils.h: Include <vector>.
12293         (free_vector_argv): New prototype.
12294         * darwin-nat.c (darwin_create_inferior): Rewrite function
12295         prototype in order to constify "exec_file" and accept a
12296         "std::string" for "allargs".
12297         * fork-child.c: Include <vector>.
12298         (breakup_args): Rewrite function, using C++.
12299         (fork_inferior): Rewrite function header, constify "exec_file_arg"
12300         and accept "std::string" for "allargs".  Update the code to
12301         calculate "argv" based on "allargs".  Update calls to "exec_fun"
12302         and "execvp".
12303         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12304         order to constify "exec_file" and accept a "std::string" for
12305         "allargs".
12306         * go32-nat.c (go32_create_inferior): Likewise.
12307         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12308         * infcmd.c (run_command_1): Constify "exec_file".  Use
12309         "std::string" for inferior arguments.
12310         * inferior.h (fork_inferior): Update prototype.
12311         * linux-nat.c (linux_nat_create_inferior): Rewrite function
12312         prototype in order to constify "exec_file" and accept a
12313         "std::string" for "allargs".
12314         * nto-procfs.c (procfs_create_inferior): Likewise.
12315         * procfs.c (procfs_create_inferior): Likewise.
12316         * remote-sim.c (gdbsim_create_inferior): Likewise.
12317         * remote.c (extended_remote_run): Update code to accept
12318         "std::string" as argument.
12319         (extended_remote_create_inferior): Rewrite function prototype in
12320         order to constify "exec_file" and accept a "std::string" for
12321         "allargs".
12322         * rs6000-nat.c (super_create_inferior): Likewise.
12323         (rs6000_create_inferior): Likewise.
12324         * target.h (struct target_ops) <to_create_inferior>: Likewise.
12325         * windows-nat.c (windows_create_inferior): Likewise.
12326
12327 2017-04-11  Pedro Alves  <palves@redhat.com>
12328
12329         * thread.c: Fix whitespace throughout.
12330
12331 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12332
12333         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12334
12335 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
12336
12337         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12338
12339 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
12340
12341         PR gdb/21364
12342         * osdata.c (info_osdata): Check if 'type' is an empty string
12343         instead of NULL.
12344
12345 2017-04-10  Pedro Alves  <palves@redhat.com>
12346
12347         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12348         (ptid_to_global_thread_id, in_thread_list)
12349         (do_captured_list_thread_ids, set_resumed, set_running)
12350         (set_executing, set_stop_requested, finish_thread_state)
12351         (validate_registers_access, can_access_registers_ptid)
12352         (print_thread_info_1, switch_to_thread)
12353         (do_restore_current_thread_cleanup)
12354         (make_cleanup_restore_current_thread, thread_command)
12355         (thread_name_command): Use operator== instead of ptid_equal.
12356
12357 2017-04-10  Pedro Alves  <palves@redhat.com>
12358
12359         * thread.c (struct current_thread_cleanup) <next>: Delete field.
12360         (current_thread_cleanup_chain): Delete.
12361         (restore_current_thread_cleanup_dtor)
12362         (make_cleanup_restore_current_thread): Remove references to
12363         current_thread_cleanup_chain.
12364
12365 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
12366
12367         * msp430-tdep.c (msp430_pseudo_register_read): Never return
12368         REG_UNKNOWN.
12369
12370 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12371
12372         PR gdb/19942
12373         * gdbthread.h (thread_info::deletable): New method.
12374         (thread_info::incref): New method.
12375         (thread_info::decref): New method.
12376         (thread_info::refcount): Move it to private.
12377         * infrun.c (save_stop_context): Call inc_refcount.
12378         (release_stop_context_cleanup): Likewise.
12379         * thread.c (set_thread_exited): New function.
12380         (init_thread_list): Delete "tp" only it is deletable, otherwise
12381         call set_thread_exited.
12382         (delete_thread_1): Call set_thread_exited.
12383         (current_thread_cleanup) <inferior_pid>: Remove.
12384         <thread>: New field.
12385         (restore_current_thread_ptid_changed): Removed.
12386         (do_restore_current_thread_cleanup): Adjust.
12387         (restore_current_thread_cleanup_dtor): Don't call
12388         find_thread_ptid.
12389         (set_thread_refcount): Use dec_refcount.
12390         (make_cleanup_restore_current_thread): Adjust.
12391         (thread_apply_all_command): Call inc_refcount.
12392         (_initialize_thread): Don't call
12393         observer_attach_thread_ptid_changed.
12394
12395 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12396
12397         * thread.c (delete_thread_1): Hoist code on marking thread as
12398         exited.
12399
12400 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12401
12402         * windows-nat.c (windows_detach): Initialize ptid with
12403         minus_one_ptid.
12404
12405 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12406
12407         * unittests/ptid-selftests.c: Fix erroneous assert messages.
12408
12409 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
12410
12411         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12412         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12413         (bfin_pseudo_register_write): Likewise
12414
12415 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
12416
12417         * common/ptid.h (struct ptid): Change to...
12418         (class ptid_t): ... this.
12419         <ptid_t>: New constructors.
12420         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12421         matches>: New methods.
12422         <make_null, make_minus_one>: New static methods.
12423         <pid>: Rename to...
12424         <m_pid>: ...this.
12425         <lwp>: Rename to...
12426         <m_lwp>: ...this.
12427         <tid>: Rename to...
12428         <m_tid>: ...this.
12429         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12430         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12431         as references, move comment to class ptid_t.
12432         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12433         ptid_t static methods.
12434         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12435         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12436         Take ptid arguments as references, implement using ptid_t methods.
12437         * unittests/ptid-selftests.c: New file.
12438         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12439         unittests/ptid-selftests.c.
12440         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12441
12442 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12443
12444         * python/python.c (python_run_simple_file): Cast mode literal to
12445         non-const char pointer as expected by PyFile_FromString.
12446
12447 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
12448
12449         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12450         minus_one_ptid and null_ptid.
12451
12452 2017-04-05  Pedro Alves  <palves@redhat.com>
12453
12454         * warning.m4 (build_warnings): Remove -Wno-write-strings.
12455         * configure: Regenerate.
12456
12457 2017-04-05  Pedro Alves  <palves@redhat.com>
12458
12459         * ada-exp.y (yyerror): Constify.
12460         * ada-lang.c (bound_name, get_selections)
12461         (ada_variant_discrim_type)
12462         (ada_variant_discrim_name, ada_value_struct_elt)
12463         (ada_lookup_struct_elt_type, is_unchecked_variant)
12464         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12465         (catch_ada_exception_command_split)
12466         (catch_ada_assert_command_split, catch_assert_command)
12467         (ada_op_name): Constify.
12468         * ada-lang.h (ada_yyerror, get_selections)
12469         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12470         * arc-tdep.c (arc_print_frame_cache): Constify.
12471         * arm-tdep.c (arm_skip_stub): Constify.
12472         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12473         (gen_aggregate_elt_ref): Constify.
12474         * bcache.c (print_bcache_statistics): Constify.
12475         * bcache.h (print_bcache_statistics): Constify.
12476         * break-catch-throw.c (catch_exception_command_1):
12477         * breakpoint.c (struct ep_type_description::description):
12478         Constify.
12479         (add_solib_catchpoint): Constify.
12480         (catch_fork_command_1): Add cast.
12481         (add_catch_command): Constify.
12482         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12483         Constify.
12484         * bsd-uthread.c (bsd_uthread_state): Constify.
12485         * buildsym.c (patch_subfile_names): Constify.
12486         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12487         Constify.
12488         * c-exp.y (yyerror): Constify.
12489         (token::oper): Constify.
12490         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12491         * c-varobj.c (cplus_describe_child): Constify.
12492         * charset.c (find_charset_names): Add cast.
12493         (find_charset_names): Constify array and add const_cast.
12494         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12495         (edit_command): Constify.
12496         * cli/cli-decode.c (lookup_cmd): Constify.
12497         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12498         Constify.
12499         (struct dump_context): Constify.
12500         (add_dump_command, restore_command): Constify.
12501         * cli/cli-script.c (get_command_line): Constify.
12502         * cli/cli-script.h (get_command_line): Constify.
12503         * cli/cli-utils.c (check_for_argument): Constify.
12504         * cli/cli-utils.h (check_for_argument): Constify.
12505         * coff-pe-read.c (struct read_pe_section_data): Constify.
12506         * command.h (lookup_cmd): Constify.
12507         * common/print-utils.c (decimal2str): Constify.
12508         * completer.c (gdb_print_filename): Constify.
12509         * corefile.c (set_gnutarget): Constify.
12510         * cp-name-parser.y (yyerror): Constify.
12511         * cp-valprint.c (cp_print_class_member): Constify.
12512         * cris-tdep.c (cris_register_name, crisv32_register_name):
12513         Constify.
12514         * d-exp.y (yyerror): Constify.
12515         (struct token::oper): Constify.
12516         * d-lang.h (d_yyerror): Constify.
12517         * dbxread.c (struct header_file_location::name): Constify.
12518         (add_old_header_file, add_new_header_file, last_function_name)
12519         (dbx_next_symbol_text, add_bincl_to_list)
12520         (find_corresponding_bincl_psymtab, set_namestring)
12521         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12522         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12523         * defs.h (command_line_input, print_address_symbolic)
12524         (deprecated_readline_begin_hook): Constify.
12525         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12526         Constify.
12527         * event-top.c (handle_line_of_input): Constify and add cast.
12528         * exceptions.c (catch_errors): Constify.
12529         * exceptions.h (catch_errors): Constify.
12530         * expprint.c (print_subexp_standard, op_string, op_name)
12531         (op_name_standard, dump_raw_expression, dump_raw_expression):
12532         * expression.h (op_name, op_string, dump_raw_expression):
12533         Constify.
12534         * f-exp.y (yyerror): Constify.
12535         (struct token::oper): Constify.
12536         (struct f77_boolean_val::name): Constify.
12537         * f-lang.c (f_word_break_characters): Constify.
12538         * f-lang.h (f_yyerror): Constify.
12539         * fork-child.c (fork_inferior): Add cast.
12540         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12541         (new_variant): Constify.
12542         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12543         * gdbarch.c: Regenerate.
12544         * gdbcore.h (set_gnutarget): Constify.
12545         * go-exp.y (yyerror): Constify.
12546         (token::oper): Constify.
12547         * go-lang.h (go_yyerror): Constify.
12548         * go32-nat.c (go32_sysinfo): Constify.
12549         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12550         * guile/scm-cmd.c (cmdscm_function): Constify.
12551         * guile/scm-param.c (pascm_param_value): Constify.
12552         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12553         (h8300sx_register_name): Constify.
12554         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12555         Constify.
12556         * ia64-tdep.c (ia64_register_names): Constify.
12557         * infcmd.c (construct_inferior_arguments): Constify.
12558         (path_command, attach_post_wait): Constify.
12559         * language.c (show_range_command, show_case_command)
12560         (unk_lang_error): Constify.
12561         * language.h (language_defn::la_error)
12562         (language_defn::la_name_of_this): Constify.
12563         * linespec.c (decode_line_2): Constify.
12564         * linux-thread-db.c (thread_db_err_str): Constify.
12565         * lm32-tdep.c (lm32_register_name): Constify.
12566         * m2-exp.y (yyerror): Constify.
12567         * m2-lang.h (m2_yyerror): Constify.
12568         * m32r-tdep.c (m32r_register_names): Constify and make static.
12569         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12570         * m88k-tdep.c (m88k_register_name): Constify.
12571         * macroexp.c (appendmem): Constify.
12572         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12573         (upgrade_type, parse_external, parse_partial_symbols)
12574         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12575         (new_symbol): Constify.
12576         * memattr.c (mem_info_command): Constify.
12577         * mep-tdep.c (register_name_from_keyword): Constify.
12578         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12579         Constify.
12580         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12581         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12582         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12583         cast.
12584         (mi_execute_async_cli_command): Constify.
12585         * mips-tdep.c (mips_register_name): Constify.
12586         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12587         (am33_register_name, am33_2_register_name)
12588         * moxie-tdep.c (moxie_register_names): Constify.
12589         * nat/linux-osdata.c (osdata_type): Constify fields.
12590         * nto-tdep.c (nto_parse_redirection): Constify.
12591         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12592         (lookup_child_selector): Constify.
12593         (objc_methcall::name): Constify.
12594         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12595         (lookup_struct_typedef): Constify.
12596         * objfiles.c (pc_in_section): Constify.
12597         * objfiles.h (pc_in_section): Constify.
12598         * p-exp.y (struct token::oper): Constify.
12599         (yyerror): Constify.
12600         * p-lang.h (pascal_yyerror): Constify.
12601         * parser-defs.h (op_name_standard): Constify.
12602         (op_print::string): Constify.
12603         (exp_descriptor::op_name): Constify.
12604         * printcmd.c (print_address_symbolic): Constify.
12605         * psymtab.c (print_partial_symbols): Constify.
12606         * python/py-breakpoint.c (stop_func): Constify.
12607         (bppy_get_expression): Constify.
12608         * python/py-cmd.c (cmdpy_completer::name): Constify.
12609         (cmdpy_function): Constify.
12610         * python/py-event.c (evpy_add_attribute)
12611         (gdbpy_initialize_event_generic): Constify.
12612         * python/py-event.h (evpy_add_attribute)
12613         (gdbpy_initialize_event_generic): Constify.
12614         * python/py-evts.c (add_new_registry): Constify.
12615         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12616         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12617         * python/py-inferior.c (get_buffer): Add cast.
12618         * python/py-param.c (parm_constant::name): Constify.
12619         * python/py-unwind.c (fprint_frame_id): Constify.
12620         * python/python.c (gdbpy_parameter_value): Constify.
12621         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12622         * remote.c (memory_packet_config::name): Constify.
12623         (show_packet_config_cmd, remote_write_bytes)
12624         (remote_buffer_add_string):
12625         * reverse.c (exec_reverse_once): Constify.
12626         * rs6000-tdep.c (variant::name, variant::description): Constify.
12627         * rust-exp.y (rustyyerror): Constify.
12628         * rust-lang.c (rust_op_name): Constify.
12629         * rust-lang.h (rustyyerror): Constify.
12630         * serial.h (serial_ops::name): Constify.
12631         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12632         (sh_sh3e_register_name, sh_sh2e_register_name)
12633         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12634         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12635         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12636         (sh_sh4al_dsp_register_name): Constify.
12637         * sh64-tdep.c (sh64_register_name): Constify.
12638         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12639         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12640         * stabsread.c (patch_block_stabs, read_type_number)
12641         (ref_map::stabs, ref_add, process_reference)
12642         (symbol_reference_defined, define_symbol, define_symbol)
12643         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12644         (read_one_struct_field, read_struct_fields, read_baseclasses)
12645         (read_tilde_fields, read_struct_type, read_array_type)
12646         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12647         (read_huge_number, read_range_type, read_args, common_block_start)
12648         (find_name_end): Constify.
12649         * stabsread.h (common_block_start, define_symbol)
12650         (process_one_symbol, symbol_reference_defined, ref_add):
12651         * symfile.c (get_section_index, add_symbol_file_command):
12652         * symfile.h (get_section_index): Constify.
12653         * target-descriptions.c (tdesc_type::name): Constify.
12654         (tdesc_free_type): Add cast.
12655         * target.c (find_default_run_target):
12656         (add_deprecated_target_alias, find_default_run_target)
12657         (target_announce_detach): Constify.
12658         (do_option): Constify.
12659         * target.h (add_deprecated_target_alias): Constify.
12660         * thread.c (print_thread_info_1): Constify.
12661         * top.c (deprecated_readline_begin_hook, command_line_input):
12662         Constify.
12663         (init_main): Add casts.
12664         * top.h (handle_line_of_input): Constify.
12665         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12666         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12667         (tfind_command): Rename to ...
12668         (tfind_command_1): ... this and constify.
12669         (tfind_command): New function.
12670         (tfind_end_command, tfind_start_command): Adjust.
12671         (encode_source_string): Constify.
12672         * tracepoint.h (encode_source_string): Constify.
12673         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12674         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12675         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12676         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12677         * tui/tui-win.c (parse_scrolling_args): Constify.
12678         * tui/tui-windata.c (tui_erase_data_content): Constify.
12679         * tui/tui-windata.h (tui_erase_data_content): Constify.
12680         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12681         * tui/tui.c (tui_enable): Add cast.
12682         * utils.c (defaulted_query): Constify.
12683         (init_page_info): Add cast.
12684         (puts_debug, subset_compare): Constify.
12685         * utils.h (subset_compare): Constify.
12686         * varobj.c (varobj_format_string): Constify.
12687         * varobj.h (varobj_format_string): Constify.
12688         * vax-tdep.c (vax_register_name): Constify.
12689         * windows-nat.c (windows_detach): Constify.
12690         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12691         * xml-support.c (gdb_xml_end_element): Constify.
12692         * xml-tdesc.c (tdesc_start_reg): Constify.
12693         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12694         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12695         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12696
12697 2017-04-05  Pedro Alves  <palves@redhat.com>
12698
12699         * proc-api.c (struct trans): Constify.
12700         (procfs_note): Constify.
12701         * proc-events.c (struct trans, syscall_table):
12702         * proc-flags.c (struct trans): Constify.
12703         * proc-utils.h (procfs_note): Constify.
12704         * proc-why.c (struct trans): Constify.
12705         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12706         (procfs_detach): Constify.
12707         * sol-thread.c (struct string_map): Constify.
12708         (td_err_string, td_state_string): Constify.
12709
12710 2017-04-05  Pedro Alves  <palves@redhat.com>
12711
12712         * proc-api.c (procfs_filename): Don't initialize
12713         procfs_filename.
12714         (prepare_to_trace): Assume procfs_filename is non-NULL.
12715         (_initialize_proc_api): Give procfs_filename a default value here.
12716
12717 2017-04-05  Pedro Alves  <palves@redhat.com>
12718
12719         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12720         'cond_string' parameter.
12721         (extract_exception_regexp): Constify 'string' parameter.
12722         (catch_exception_command_1): Constify.
12723         * breakpoint.c (init_catchpoint)
12724         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12725         parameter.
12726         (ep_parse_optional_if_clause, catch_fork_command_1)
12727         (catch_exec_command_1): Constify.
12728         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12729         parameter.
12730         (ep_parse_optional_if_clause): Constify.
12731         * cli/cli-utils.c (remove_trailing_whitespace)
12732         (check_for_argument): Constify.
12733         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12734         non-const overload.
12735         (check_for_argument): Likewise.
12736
12737 2017-04-05  Pedro Alves  <palves@redhat.com>
12738
12739         * event-top.c (command_line_handler): Add cast to execute_command
12740         call.
12741         * record-btrace.c (cmd_record_btrace_bts_start)
12742         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12743         (cmd_record_btrace_start): Add cast to execute_command call.
12744         * record-full.c (record_full_goto_insn):
12745         * record.c (record_start, record_stop): Add cast to
12746         execute_command_to_string calls.
12747         (cmd_record_start): Add cast to execute_command calls.
12748
12749 2017-04-05  Pedro Alves  <palves@redhat.com>
12750
12751         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12752         static inline function.
12753         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12754         array and use gdb_PyArg_ParseTupleAndKeywords.
12755         * python/py-cmd.c (cmdpy_init): Likewise.
12756         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12757         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12758         (infpy_search_memory): Likewise.
12759         * python/py-objfile.c (objfpy_add_separate_debug_file)
12760         (gdbpy_lookup_objfile): Likewise.
12761         * python/py-symbol.c (gdbpy_lookup_symbol)
12762         (gdbpy_lookup_global_symbol): Likewise.
12763         * python/py-type.c (gdbpy_lookup_type): Likewise.
12764         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12765         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12766         Likewise.
12767
12768 2017-04-05  Pedro Alves  <palves@redhat.com>
12769
12770         * python/python-internal.h (gdb_PyGetSetDef): New type.
12771         * python/py-block.c (block_object_getset)
12772         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12773         * python/py-event.c (event_object_getset)
12774         (finish_breakpoint_object_getset): Likewise.
12775         * python/py-inferior.c (inferior_object_getset): Likewise.
12776         * python/py-infthread.c (thread_object_getset): Likewise.
12777         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12778         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12779         * python/py-objfile.c (objfile_getset): Likewise.
12780         * python/py-progspace.c (pspace_getset): Likewise.
12781         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12782         Likewise.
12783         * python/py-record.c (recpy_record_getset): Likewise.
12784         * python/py-symbol.c (symbol_object_getset): Likewise.
12785         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12786         Likewise.
12787         * python/py-type.c (type_object_getset, field_object_getset):
12788         Likewise.
12789         * python/py-value.c (value_object_getset): Likewise.
12790
12791 2017-04-05  Pedro Alves  <palves@redhat.com>
12792
12793         * python/python-internal.h (gdb_PyObject_CallMethod)
12794         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12795         New functions.
12796         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12797         (PySys_GetObject, PySys_SetPath): New macros.
12798
12799 2017-04-05  Pedro Alves  <palves@redhat.com>
12800
12801         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12802         info_osdata_command.
12803         * osdata.c (info_osdata_command): Rename to ...
12804         (info_osdata): ... this.  Constify 'type' parameter, and remove
12805         the 'from_tty' parameter.  Accept NULL TYPE.
12806         (info_osdata_command): New function.
12807         * osdata.h (info_osdata_command): Remove declaration.
12808         (info_osdata): New declaration.
12809
12810 2017-04-05  Pedro Alves  <palves@redhat.com>
12811
12812         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12813         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12814         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12815         parameter.
12816         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12817         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12818         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12819         parameter.
12820         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12821         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12822         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12823         (mi_cmd_file_list_exec_source_files)
12824         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12825         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12826         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12827         parameter.
12828         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12829         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12830         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12831         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12832         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12833         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12834         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12835         'command' parameter.
12836         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12837         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12838         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12839         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12840         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12841         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12842         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12843         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12844         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12845         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12846         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12847         parameter.
12848         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12849         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12850         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12851         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12852         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12853         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12854         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12855         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12856         (mi_cmd_data_list_changed_registers)
12857         (mi_cmd_data_write_register_values)
12858         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12859         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12860         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12861         (mi_cmd_list_features, mi_cmd_list_target_features)
12862         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12863         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12864         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12865         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12866         (mi_cmd_trace_frame_collected): Constify 'command'
12867         parameter.
12868         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12869         'command' parameter.
12870
12871 2017-04-05  Pedro Alves  <palves@redhat.com>
12872
12873         * ada-lang.c (ada_completer_word_break_characters): Now a const
12874         array.
12875         (ada_get_gdb_completer_word_break_characters): Constify.
12876         * completer.c (gdb_completer_command_word_break_characters)
12877         (gdb_completer_file_name_break_characters)
12878         (gdb_completer_quote_characters): Now const arrays.
12879         (get_gdb_completer_quote_characters): Constify.
12880         (set_rl_completer_word_break_characters): New function.
12881         (set_gdb_completion_word_break_characters)
12882         (complete_line_internal): Use it.
12883         * completer.h (get_gdb_completer_quote_characters): Constify.
12884         (set_rl_completer_word_break_characters): Declare.
12885         * f-lang.c (f_word_break_characters): Constify.
12886         * language.c (default_word_break_characters): Constify.
12887         * language.h (language_defn::la_word_break_characters): Constify.
12888         (default_word_break_characters): Constify.
12889         * top.c (init_main): Use set_rl_completer_word_break_characters.
12890
12891 2017-04-05  Pedro Alves  <palves@redhat.com>
12892
12893         * aix-thread.c (aix_thread_pid_to_str)
12894         (aix_thread_extra_thread_info): Constify.
12895         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12896         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12897         (bsd_uthread_pid_to_str): Constify.
12898         * corelow.c (core_pid_to_str): Constify.
12899         * darwin-nat.c (darwin_pid_to_str): Constify.
12900         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12901         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12902         Constify.
12903         * gnu-nat.c (gnu_pid_to_str): Constify.
12904         * go32-nat.c (go32_pid_to_str): Constify.
12905         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12906         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12907         * inferior.c (inferior_pid_to_str): Constify.
12908         * linux-nat.c (linux_nat_pid_to_str): Constify.
12909         * linux-tdep.c (linux_core_pid_to_str): Constify.
12910         * linux-thread-db.c (thread_db_pid_to_str)
12911         (thread_db_extra_thread_info): Constify.
12912         * nto-tdep.c (nto_extra_thread_info): Constify.
12913         * nto-tdep.h (nto_extra_thread_info): Constify.
12914         * obsd-nat.c (obsd_pid_to_str): Constify.
12915         * procfs.c (procfs_pid_to_str): Constify.
12916         * ravenscar-thread.c (ravenscar_extra_thread_info)
12917         (ravenscar_pid_to_str): Constify.
12918         * remote-sim.c (gdbsim_pid_to_str): Constify.
12919         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12920         Constify.
12921         * sol-thread.c (solaris_pid_to_str): Constify.
12922         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12923         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12924         * target.c (default_pid_to_str, target_pid_to_str)
12925         (normal_pid_to_str, default_pid_to_str): Constify.
12926         * target.h (target_ops::to_pid_to_str)
12927         (target_ops::to_extra_thread_info): Constify.
12928         (target_pid_to_str, normal_pid_to_str): Constify.
12929         * windows-nat.c (windows_pid_to_str): Constify.
12930         * gdbarch.sh (core_pid_to_str): Constify.
12931         * target-delegates.c: Regenerate.
12932         * gdbarch.h, gdbarch.c: Regenerate.
12933
12934 2017-04-05  Pedro Alves  <palves@redhat.com>
12935
12936         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12937         the memory of the temporary warning_pre_print override.
12938         * utils.c (warning_pre_print): Constify.
12939         * utils.h (warning_pre_print): Constify.
12940
12941 2017-04-05  Pedro Alves  <palves@redhat.com>
12942
12943         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12944         (shell_command): New function.
12945         (make_command): Use std::string.
12946         (init_cli_cmds): Register shell_command instead of shell_escape.
12947
12948 2017-04-05  Pedro Alves  <palves@redhat.com>
12949
12950         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12951         * tracepoint.c (default_collect): Don't initialize.
12952
12953 2017-04-05  Pedro Alves  <palves@redhat.com>
12954
12955         * macroexp.c (macro_buffer::shared): Now a bool.
12956         (init_buffer): Update.
12957         (init_shared_buffer): Constify 'addr' parameter.
12958         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12959         casts.
12960
12961 2017-04-05  Pedro Alves  <palves@redhat.com>
12962
12963         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12964         * disasm.c (set_disassembler_options): Constify local.
12965         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12966
12967 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12968
12969         PR gdb/21352
12970         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12971         option.
12972
12973 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12974
12975         * frame.c (frame_unwind_register_unsigned): Call
12976         frame_unwind_register_value.
12977
12978 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12979
12980         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12981         Use gdb_test_multiple, and don't match anchor.
12982
12983 2017-04-05  Pedro Alves  <palves@redhat.com>
12984
12985         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12986         (Write After Approval): Remove Simon Marchi.
12987
12988 2017-04-05  Pedro Alves  <palves@redhat.com>
12989
12990         * common/gdb_optional.h (optional::optional): Make constexpr and
12991         initialize m_dummy.
12992
12993 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12994
12995         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12996         (amd64fbsd_jmp_buf_reg_offset): Remove.
12997         (amd64fbsd_supply_uthread): Remove function.
12998         (amd64fbsd_collect_uthread): Remove function.
12999         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13000         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13001         (x86_64-*-freebsd*): Remove bsd-uthread.o.
13002         (fbsd-nat.c): Update comment.
13003         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13004         (i386fbsd_jmp_buf_reg_offset): Remove.
13005         (i386fbsd_supply_uthread): Remove function.
13006         (i386fbsd_collect_uthread): Remove function.
13007         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13008
13009 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
13010
13011         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13012         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13013         * NEWS: Mention that support for FreeBSD/alpha was removed.
13014         * alpha-fbsd-tdep.c: Delete file.
13015         * config/alpha/fbsd.mh: Delete file.
13016         * configure.host: Delete alpha*-*-freebsd* and
13017         alpha*-*-kfreebsd*-gnu.
13018         * configure.tgt: Delete alpha*-*-freebsd* and
13019         alpha*-*-kfreebsd*-gnu.
13020
13021 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
13022
13023         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13024         amd64bsd_store_inferior_registers): Use ptid from regcache.
13025
13026 2017-04-04  Pedro Alves  <palves@redhat.com>
13027
13028         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
13029         data fields, make them private and add "m_" prefixes.
13030         (lnp_state_machine::lnp_state_machine): New ctor.
13031         (record_line, check_line_address, handle_set_discriminator)
13032         (handle_set_address, handle_advance_pc, handle_special_opcode)
13033         (handle_advance_line, handle_set_file, handle_negate_stmt)
13034         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13035         (end_sequence, advance_line): New methods.
13036         (m_gdbarch, m_record_lines_p): New fields.
13037         (lnp_reader_state): Delete.
13038         (dwarf_record_line): Rename to ...
13039         (lnp_state_machine::record_line): ... adjust.
13040         (init_lnp_state_machine): Delete.
13041         (lnp_state_machine::lnp_state_machine): New.
13042         (check_line_address): Rename to ...
13043         (lnp_state_machine::check_line_address): This.
13044         (dwarf_decode_lines_1): Remove reference to "reader_state".
13045         Adjust lnp_state_machine having a non-default ctor.  Use bool.
13046         State machine internal state manipulation moved to
13047         lnp_state_machine methods.
13048
13049 2017-04-04  Pedro Alves  <palves@redhat.com>
13050
13051         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13052         unittests/offset-type-selftests.c.
13053         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13054         * common/offset-type.h: New file.
13055         * common/preprocessor.h: New file.
13056         * common/traits.h: New file.
13057         * common/valid-expr.h: New file.
13058         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
13059         sect_offset and cu_offset strong typedefs throughout.
13060         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13061         typedefs throughout.
13062         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
13063         sect_offset and cu_offset strong typedefs throughout.
13064         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13065         typedefs throughout.
13066         * gdbtypes.h: Include "common/offset-type.h".
13067         (cu_offset): Now an offset type (strong typedef) instead of a
13068         struct.
13069         (sect_offset): Likewise.
13070         (union call_site_parameter_u): Rename "param_offset" field to
13071         "param_cu_off".
13072         * unittests/offset-type-selftests.c: New file.
13073
13074 2017-04-04  Pedro Alves  <palves@redhat.com>
13075
13076         * common/underlying.h: New file.
13077         * dwarf2read.c: Include "common/gdb_optional.h" and
13078         "common/underlying.h".
13079         (dir_index, file_name_index): New types.
13080         (file_entry): Use them.
13081         (file_entry::include): Use to_underlying.
13082         (line_header::add_file_name): Use dir_index.
13083         (read_formatted_entries): Use gdb::optional.  Read form before
13084         writting to file_entry.
13085         (dwarf_decode_line_header): Use dir_index.
13086         (lnp_state_machine::current_file): Use to_underlying.
13087         (lnp_state_machine::file): Change type to file_name_index.
13088         (dwarf_record_line): Use to_underlying.
13089         (init_lnp_state_machine): Use file_name_index.
13090         (dwarf_decode_lines_1): Use dir_index and file_name_index.
13091
13092 2017-04-04  Pedro Alves  <palves@redhat.com>
13093
13094         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13095         operator bool, has_value and get methods.
13096
13097 2017-04-04  Pedro Alves  <palves@redhat.com>
13098
13099         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13100         fields.
13101         (line_header): Initialize all data fields.  Change type of
13102         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13103         Change type of include_dirs to std::vector<const char *>.  Remove
13104         num_include_dirs, include_dirs_size.  Change type of file_names to
13105         std::vector<file_entry>.  Remove num_file_names, file_names_size.
13106         (line_header::line_header): New.
13107         (line_header::add_include_dir, line_header::add_file_name): New
13108         methods.
13109         (line_header::include_dir_at): Remove NULL check.
13110         (line_header::file_name_at): Add const overload.
13111         (line_header_up): New unique_ptr typedef.
13112         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
13113         std::vector.  Remove free_line_header call.
13114         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
13115         free_line_header call.
13116         (free_cu_line_header): Delete.
13117         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13118         (setup_type_unit_groups): Use line_header_up instead of cleanups.
13119         Adjust to use std::vector.
13120         (free_line_header): Delete.
13121         (free_line_header_voidp): Use delete.
13122         (add_include_dir): Replace with ...
13123         (line_header::add_include_dir): ... this method.  Use std::vector.
13124         (add_file_name): Replace with ...
13125         (line_header::add_file_name): ... this method.  Use std::vector.
13126         (add_include_dir_stub): Delete.
13127         (read_formatted_entries): Remove memset.
13128         (dwarf_decode_line_header): Return a line_header_up instead of a
13129         raw pointer.  Remove cleanup handling.  Pass lambdas to
13130         read_formatted_entries.  Adjust to use line_header methods.
13131         (dwarf_decode_lines_1): Adjust to use line_header methods.
13132         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13133         use std::vector.
13134
13135 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
13136
13137         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13138         instead of struct ptid.
13139
13140 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
13141
13142         * frame.c (get_frame_register_bytes): Unwind using value.
13143         (put_frame_register_bytes): Likewise.
13144
13145 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
13146
13147         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13148         aggregate-like.
13149
13150 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
13151
13152         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13153
13154 2017-03-29  Yao Qi  <yao.qi@linaro.org>
13155
13156         * gdbthread.h (struct thread_info): Declare constructor and
13157         destructor.  Add some in-class member initializers.
13158         * thread.c (free_thread): Remove.
13159         (init_thread_list): Call delete instead of free_thread.
13160         (new_thread): Call thread_info constructor.
13161         (thread_info::thread_info): New function.
13162         (thread_info::~thread_info): New function.
13163         (delete_thread_1): Call delete instead of free_thread.
13164         (make_cleanup_restore_current_thread): Move tp and frame to
13165         inner block.
13166
13167 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13168
13169         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13170         (arc_skip_prologue): Likewise.
13171         (arc_make_frame_cache): Likewise.
13172         (arc_pv_get_operand): New function.
13173         (arc_is_in_prologue): Likewise.
13174         (arc_analyze_prologue): Likewise.
13175         (arc_print_frame_cache): Likewise.
13176         (MAX_PROLOGUE_LENGTH): New constant.
13177
13178 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13179
13180         * configure.tgt: Add arc-insn.o.
13181         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13182         (dump_arc_instruction_command): New function.
13183         (arc_fprintf_disasm): Likewise.
13184         (arc_disassemble_info): Likewise.
13185         (arc_insn_get_operand_value): Likewise.
13186         (arc_insn_get_operand_value_signed): Likewise.
13187         (arc_insn_get_memory_base_reg): Likewise.
13188         (arc_insn_get_memory_offset): Likewise.
13189         (arc_insn_get_branch_target): Likewise.
13190         (arc_insn_dump): Likewise.
13191         (arc_insn_get_linear_next_pc): Likewise.
13192         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13193         (arc_disassemble_info): Likewise.
13194         (arc_insn_get_branch_target): Likewise.
13195         (arc_insn_get_linear_next_pc): Likewise.
13196         * NEWS: Mention new "maint print arc arc-instruction".
13197
13198 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13199
13200         * arc-tdep (maintenance_print_arc_list): New variable.
13201         (maintenance_print_arc_command): New function.
13202
13203 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13204
13205         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13206         Add "limm" and "reserved".
13207         (arc_cannot_fetch_register, arc_cannot_store_register): Add
13208         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13209         * arc-tdep.h (arc_regnum): Likewise.
13210
13211 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13212
13213         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13214         for THREADPTR register.
13215         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13216         register.
13217         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13218         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13219         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13220
13221 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13222
13223         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13224         registers above gdbarch_num_regs (gdbarch) as privileged in
13225         call0 ABI.
13226
13227 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13228
13229         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13230         for a single specified register or for all registers in
13231         a0_base..a0_base + C0_NREGS range.
13232         (supply_gregset_reg): Call regcache_raw_supply for a single
13233         specified register or for all registers in a0_base..a0_base +
13234         C0_NREGS range.
13235
13236 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13237
13238         * arch/xtensa.h (C0_NREGS): Add definition.
13239         * xtensa-tdep.c (C0_NREGS): Remove definition.
13240
13241 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13242
13243         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13244         Drop xtensa_default_isa initialization.
13245         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13246
13247 2017-03-27  Pedro Alves  <palves@redhat.com>
13248
13249         * dwarf2read.c (file_entry) <dir_index>: Add comment.
13250         (file_entry::include_dir): New method.
13251         (line_header::include_dir_at, line_header::file_name_at): New
13252         methods.
13253         (setup_type_unit_groups, setup_type_unit_groups)
13254         (psymtab_include_file_name): Simplify using the new methods.
13255         (lnp_state_machine) <the_line_header>: New field.
13256         <file>: Add comment.
13257         (lnp_state_machine::current_file): New method.
13258         (dwarf_record_line): Simplify using the new methods.
13259         (init_lnp_state_machine): Initialize the "the_line_header" field.
13260         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13261         Simplify using the new methods.
13262
13263 2017-03-27  Pedro Alves  <palves@redhat.com>
13264
13265         * cp-name-parser.y (make_empty): Delete.
13266         (demangler_special, nested_name, ptr_operator, array_indicator)
13267         (direct_declarator, declarator_1): Use fill_comp instead of
13268         make_empty.
13269
13270 2017-03-27  Pedro Alves  <palves@redhat.com>
13271
13272         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13273         to ATTRIBUTE_PRINTF.
13274         * solib-target.c (library_list_start_list): Print "string" not
13275         "version".
13276         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13277         gdb_xml_error call.
13278
13279 2017-03-27  Pedro Alves  <palves@redhat.com>
13280
13281         * dwarf2read.c (struct file_and_directory): New.
13282         (dwarf2_get_dwz_file): Adjust to use std::string.
13283         (dw2_get_file_names_reader): Adjust to use file_and_directory.
13284         (find_file_and_directory): Adjust to return a file_and_directory
13285         object.
13286         (read_file_scope): Adjust to use file_and_directory.  Remove
13287         make_cleanup/do_cleanups calls.
13288         (open_and_init_dwp_file): Adjust to use std::string.  Remove
13289         make_cleanup/do_cleanups calls.
13290         * python/python.c (do_start_initialization): Adjust to ldirname
13291         returning a std::string.
13292         * utils.c (ldirname): Now returns a std::string.
13293         * utils.h (ldirname): Change return type to std::string.
13294         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13295         returning a std::string.
13296         * xml-tdesc.c (file_read_description_xml): Likewise.
13297
13298 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
13299
13300         * regcache.c (regcache_debug_print_register): New function.
13301         * regcache.h (regcache_debug_print_register): New declaration.
13302         * target.c (debug_print_register): Remove.
13303         (target_fetch_registers): Call regcache_debug_print_register.
13304         (target_store_registers): Likewise.
13305
13306 2017-03-24  Pádraig Brady  <pbrady@fb.com>
13307
13308         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13309         reference beyond the 'lh->include_dirs' array before accessing to
13310         it.
13311         (psymtab_include_file_name): Likewise.
13312         (dwarf_decode_lines_1): Likewise.
13313         (dwarf_decode_lines): Likewise.
13314         (file_file_name): Likewise.
13315
13316 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
13317
13318         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13319         inferior_ptid.
13320         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13321         ps_lsetfpregs): Likewise.
13322         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13323         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13324         ps_lsetfpregs): Likewise.
13325         * target.c (target_fetch_registers, target_store_registers):
13326         Remove asserts.
13327
13328 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
13329
13330         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13331
13332 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13333
13334         * aarch64-tdep.c (aarch64_process_record_test): Declare.
13335         (_initialize_aarch64_tdep): Register it.
13336         (aarch64_record_load_store): Handle PRFM instruction.
13337         (aarch64_process_record_test): New function.
13338
13339 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13340
13341         * aarch64-tdep.c (aarch64_record_load_store): Fix code
13342         indentation.
13343
13344 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13345
13346         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13347
13348 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13349
13350         python/python.c (do_start_initialization): Fix memory leak.
13351
13352 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13353
13354         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13355         using get_ptrace_pid.
13356         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13357         inferior_ptid.
13358         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13359         inferior_ptid instead of pid.
13360
13361 2017-03-22  Yao Qi  <yao.qi@linaro.org>
13362
13363         * aarch64-tdep.c: Wrap locally used classes in anonymous
13364         namespace.
13365         * arm-tdep.c: Likewise.
13366         * linespec.c: Likewise.
13367         * ui-out.c: Likewise.
13368
13369 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
13370
13371         PR gdb/19637
13372         * python/lib/gdb/printer/bound_registers.py: Import sys.
13373
13374 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13375
13376         * windows-nat.c (do_windows_fetch_inferior_registers): Add
13377         windows_thread_info parameter and use it instead of
13378         current_thread.
13379         (windows_fetch_inferior_registers): Don't set current_thread,
13380         pass the thread to do_windows_fetch_inferior_registers.  Use
13381         ptid from regcache instead of inferior_ptid.
13382         (do_windows_store_inferior_registers): Add windows_thread_info
13383         parameter and use it instead of current_thread.
13384         (windows_store_inferior_registers): Don't set current_thread,
13385         pass the thread to do_windows_store_inferior_registers.  Use
13386         ptid from regcache instead of inferior_ptid.
13387
13388 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13389
13390         * ser-mingw.c (ser_windows_raw): Remove reference to
13391         struct serial::current_timeout.
13392
13393 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
13394
13395         PR tdep/20928
13396         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13397         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13398         (sparc64_fsr_type): Fix %fsr decoding.
13399
13400 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
13401
13402         * python/py-record-btrace.c (btpy_insn_data): Change return type
13403         for Python 2.
13404
13405 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13406
13407         * spu-linux-nat.c (spu_fetch_inferior_registers,
13408         spu_store_inferior_registers): Use ptid from regcache, set and
13409         restore inferior_ptid.
13410         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13411         Likewise.
13412
13413 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13414
13415         * i386-linux-nat.c (fetch_register, store_register,
13416         i386_linux_fetch_inferior_registers,
13417         i386_linux_store_inferior_registers): Use ptid from regcache.
13418         * ia64-linux-nat.c (ia64_linux_fetch_register,
13419         ia64_linux_store_register): Likewise.
13420         * inf-ptrace.c (inf_ptrace_fetch_register,
13421         inf_ptrace_store_register): Likewise.
13422         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13423         m32r_linux_store_inferior_registers): Likewise.
13424         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13425         m68kbsd_store_inferior_registers): Likewise.
13426         * m68k-linux-nat.c (fetch_register, store_register,
13427         m68k_linux_fetch_inferior_registers,
13428         m68k_linux_store_inferior_registers): Likewise.
13429         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13430         m88kbsd_store_inferior_registers): Likewise.
13431         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13432         mips_fbsd_store_inferior_registers): Likewise.
13433         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13434         mips64_linux_regsets_store_registers): Likewise.
13435         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13436         mipsnbsd_store_inferior_registers): Likewise.
13437         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13438         mips64obsd_store_inferior_registers): Likewise.
13439         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13440         Likewise.
13441         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13442         ppcfbsd_store_inferior_registers): Likewise.
13443         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13444         ppc_linux_store_inferior_registers): Likewise.
13445         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13446         ppcnbsd_store_inferior_registers): Likewise.
13447         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13448         ppcobsd_store_registers): Likewise.
13449         * procfs.c (procfs_fetch_registers, procfs_store_registers):
13450         Likewise.
13451         * ravenscar-thread.c (ravenscar_fetch_registers,
13452         ravenscar_store_registers, ravenscar_prepare_to_store):
13453         Likewise.
13454         * record-btrace.c (record_btrace_fetch_registers,
13455         record_btrace_store_registers, record_btrace_prepare_to_store):
13456         Likewise.
13457         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13458         Lookup inferior using ptid from regcache, instead of
13459         current_inferior.
13460         * remote.c (remote_fetch_registers, remote_store_registers): Use
13461         ptid from regcache.
13462         * rs6000-nat.c (fetch_register, store_register): Likewise.
13463         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13464         s390_linux_store_inferior_registers): Likewise.
13465         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13466         shnbsd_store_inferior_registers): Likewise.
13467         * sol-thread.c (sol_thread_fetch_registers,
13468         sol_thread_store_registers): Likewise.
13469         * sparc-nat.c (sparc_fetch_inferior_registers,
13470         sparc_store_inferior_registers): Likewise.
13471         * tilegx-linux-nat.c (fetch_inferior_registers,
13472         store_inferior_registers): Likewise.
13473         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13474         vaxbsd_store_inferior_registers): Likewise.
13475         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13476         store_xtregs): Likewise.
13477
13478 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13479
13480         PR gdb/14441
13481         * NEWS: Mention support for rvalue references in GDB and python.
13482         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13483         supports both lvalue and rvalue references.
13484
13485 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13486
13487         PR gdb/14441
13488         * gdbtypes.c (rank_one_type): Implement overloading
13489         resolution rules regarding rvalue references.
13490
13491 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13492
13493         PR gdb/14441
13494         * aarch64-tdep.c (aarch64_type_align)
13495         (aarch64_extract_return_value, aarch64_store_return_value): Change
13496         lvalue reference type checks to general reference type checks.
13497         * amd64-tdep.c (amd64_classify): Likewise.
13498         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13499         Likewise.
13500         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13501         (arm_store_return_value): Likewise.
13502         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13503         * c-typeprint.c (c_print_type): Likewise.
13504         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13505         (cplus_number_of_children, cplus_describe_child): Likewise.
13506         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13507         * completer.c (expression_completer): Likewise.
13508         * cp-support.c (make_symbol_overload_list_adl_namespace):
13509         Likewise.
13510         * darwin-nat-info.c (info_mach_region_command): Likewise.
13511         * dwarf2loc.c (entry_data_value_coerce_ref)
13512         (value_of_dwarf_reg_entry): Likewise.
13513         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13514         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13515         Likewise.
13516         * findvar.c (extract_typed_address, store_typed_address):
13517         Likewise.
13518         * gdbtypes.c (rank_one_type): Likewise.
13519         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13520         * infcall.c (value_arg_coerce): Likewise.
13521         * language.c (pointer_type): Likewise.
13522         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13523         Likewise.
13524         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13525         * mn10300-tdep.c (mn10300_type_align): Likewise.
13526         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13527         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13528         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13529         Likewise.
13530         * printcmd.c (print_formatted, x_command): Likewise.
13531         * python/py-type.c (typy_get_composite, typy_template_argument):
13532         Likewise.
13533         * python/py-value.c (valpy_referenced_value)
13534         (valpy_get_dynamic_type, value_has_field): Likewise.
13535         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13536         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13537         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13538         * spu-tdep.c (spu_scalar_value_p): Likewise.
13539         * symtab.c (lookup_symbol_aux): Likewise.
13540         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13541         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13542         Likewise.
13543         * valops.c (value_cast_pointers, value_cast)
13544         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13545         (value_struct_elt, value_struct_elt_bitpos)
13546         (value_find_oload_method_list, find_overload_match)
13547         (value_rtti_indirect_type): Likewise.
13548         * valprint.c (val_print_scalar_type_p, generic_val_print):
13549         Likewise.
13550         * value.c (value_actual_type, value_as_address, unpack_long)
13551         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13552         (coerce_ref): Likewise.
13553         * varobj.c (varobj_get_value_type): Likewise.
13554
13555 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13556
13557         PR gdb/14441
13558         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13559         table of constants.
13560         * python/lib/gdb/command/explore.py: Support exploring values
13561         of rvalue reference types.
13562         * python/lib/gdb/types.py: Implement get_basic_type() for
13563         rvalue reference types.
13564         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13565         constant.
13566         * python/py-value.c (valpy_getitem): Add an rvalue reference
13567         check.
13568         (valpy_reference_value): Add new parameter "refcode".
13569         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13570         New wrappers for valpy_reference_value().
13571         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13572         (gdbpy_invoke_xmethod): Likewise.
13573
13574 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13575
13576         PR gdb/14441
13577         * dwarf2read.c (process_die, read_type_die_1): Handle the
13578         DW_TAG_rvalue_reference_type DIE.
13579         (read_tag_reference_type): Add new parameter "refcode".
13580
13581 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13582
13583         PR gdb/14441
13584         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13585         (c_type_print_modifier, c_type_print_varspec_suffix)
13586         (c_type_print_base): Support printing rvalue reference types.
13587         * c-valprint.c (c_val_print, c_value_print): Support printing
13588         rvalue reference values.
13589
13590 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13591
13592         PR gdb/14441
13593         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13594         typename.
13595         * cp-support.c (replace_typedefs): Handle
13596         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13597         * python/py-type.c (typy_lookup_type): Likewise.
13598
13599 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13600
13601         PR gdb/14441
13602         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13603         * parse.c (insert_type): Change assert statement.
13604         (follow_types): Handle rvalue reference types.
13605         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13606         constant.
13607
13608 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13609
13610         PR gdb/14441
13611         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13612         value_ref() interface.
13613         * c-valprint.c (c_value_print): Likewise.
13614         * infcall.c (value_arg_coerce): Likewise.
13615         * python/py-value.c (valpy_reference_value): Likewise.
13616         * valops.c (value_cast, value_reinterpret_cast)
13617         (value_dynamic_cast, typecmp): Likewise.
13618         (value_ref): Parameterize by kind of return value reference type.
13619         * value.h (value_ref): Add new parameter "refcode".
13620
13621 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13622
13623         PR gdb/14441
13624         * dwarf2read.c (read_tag_reference_type): Use
13625         lookup_lvalue_reference_type() instead of lookup_reference_type().
13626         * eval.c (evaluate_subexp_standard): Likewise.
13627         * f-exp.y: Likewise.
13628         * gdbtypes.c (make_reference_type, lookup_reference_type):
13629         Generalize with rvalue reference types.
13630         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13631         convenience wrappers for lookup_reference_type().
13632         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13633         reference kind parameter.
13634         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13635         wrappers for lookup_reference_type().
13636         * guile/scm-type.c (gdbscm_type_reference): Use
13637         lookup_lvalue_reference_type() instead of lookup_reference_type().
13638         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13639         * parse.c (follow_types): Likewise.
13640         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13641         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13642         Likewise.
13643         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13644         (gdbpy_invoke_xmethod): Likewise.
13645         * stabsread.c: Provide extra argument to make_reference_type()
13646         call.
13647         * valops.c (value_ref, value_rtti_indirect_type): Use
13648         lookup_lvalue_reference_type() instead of lookup_reference_type().
13649
13650 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13651
13652         PR gdb/14441
13653         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13654         (TYPE_IS_REFERENCE): New macro.
13655         (struct type): Add rvalue_reference_type field.
13656         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13657
13658 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13659
13660         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13661         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13662         New function definition.
13663         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13664         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13665         New function declaration.
13666         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13667         * mi/mi-interp.h: New file.
13668         * solib.c (info_sharedlibrary_command): Replace for loop with
13669         ALL_SO_LIBS macro
13670         * solib.h (update_solib_list): New function declaration.
13671         (so_list_head): Move macro.
13672         * solist.h (ALL_SO_LIBS): New macro.
13673
13674 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13675
13676         * infcmd.c (post_create_inferior): Remove unused argument in
13677         call to solib_add.
13678         * remote.c (remote_start_remote): Likewise.
13679         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13680         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13681         (enable_break): Likewise.
13682         * solib.c (update_solib_list): Remove unused target argument
13683         and its documentation.
13684         (solib_add): Remove unused target argument.  Remove unused
13685         argument in call to update_solib_list.
13686         (info_sharedlibrary_command): Remove unused argument in call
13687         to update_solib_list.
13688         (sharedlibrary_command): Remove unused argument in call to
13689         solib_add.
13690         (handle_solib_event): Likewise.
13691         (reload_shared_libraries): Likewise.
13692         * solib.h (solib_add): Remove unused target argument.
13693
13694 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13695
13696         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13697         (s390_displaced_step_fixup): Cover relative branches with the
13698         default fixup handling.  This fixes lack of support for some
13699         relative branch instructions.
13700
13701 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13702
13703         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13704         ptid from regcache.
13705
13706 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13707
13708         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13709         i386_darwin_store_inferior_registers): Use ptid from regcache.
13710
13711 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13712
13713         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13714         i386bsd_store_inferior_registers): Use ptid from regcache.
13715
13716 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13717
13718         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13719         hppaobsd_store_registers): Use ptid from regcache.
13720
13721 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13722
13723         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13724         hppanbsd_store_registers): Use ptid from regcache.
13725
13726 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13727
13728         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13729         from regcache.  Use get_ptrace_pid.
13730
13731 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13732
13733         * corelow.c (get_core_register_section): Use ptid from regcache,
13734         update doc.
13735
13736 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13737
13738         * bsd-uthread.c (bsd_uthread_fetch_registers,
13739         bsd_uthread_store_registers): Use ptid from regcache, set and
13740         restore inferior_ptid.
13741
13742 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13743
13744         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13745         fetch_fp_regs, store_register, store_regs, store_fp_register,
13746         store_fp_regs): Use ptid from regcache.
13747
13748 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13749
13750         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13751         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13752         store_vfp_regs): Use ptid from regcache.
13753
13754 2017-03-17  Pedro Alves  <palves@redhat.com>
13755
13756         PR remote/21188
13757         * ser-base.c (ser_base_wait_for): Add comment.
13758         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13759         version.
13760         * ser-unix.c (hardwire_raw): Remove reference to
13761         scb->current_timeout.
13762         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13763         (hardwire_ops): Install ser_base_readchar instead of
13764         hardwire_readchar.
13765         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13766         Remove fields.
13767
13768 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13769
13770         PR gdb/19637
13771         * python/lib/gdb/printer/bound_registers.py: Add support for
13772         Python 3.
13773
13774 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13775
13776         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13777         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13778         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13779         byte_offset to subobj_byte_offset.  Fix the handling of
13780         DWARF_VALUE_STACK on big-endian targets when coming via an
13781         implicit pointer.
13782         (dwarf2_evaluate_loc_desc): Adjust call to
13783         dwarf2_evaluate_loc_desc_full.
13784         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13785         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13786
13787 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13788
13789         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13790         and REVSH instructions.
13791
13792 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13793
13794         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13795         (arm_record_test): Declare.
13796         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13797         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13798         align with the manual.
13799         (thumb_record_misc): Adjust the code order to align with the
13800         manual.
13801         (thumb2_record_decode_insn_handler): Fix instruction matching.
13802         (instruction_reader_thumb): New class.
13803         (arm_record_test): New function.
13804
13805 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13806
13807         * arm-tdep.c (abstract_memory_reader): New class.
13808         (instruction_reader): New class.
13809         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13810         (decode_insn): Likewise.
13811
13812 2017-03-16  Doug Evans  <dje@google.com>
13813
13814         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13815         member.  Change type of TYPE member to SCM.  All uses updated.
13816         (lsscm_make_lazy_string_smob): Add assert.
13817         (lsscm_make_lazy_string): Flag bad length values.
13818         (lsscm_elt_type): New function.
13819         (gdbscm_lazy_string_to_value): Rewrite to use
13820         lsscm_safe_lazy_string_to_value.
13821         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13822         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13823         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13824         in incoming type.
13825         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13826         * guile/scm-type.c (tyscm_scm_to_type): New function.
13827
13828 2017-03-15  Doug Evans  <dje@google.com>
13829
13830         PR python/17728, python/18439, python/18779
13831         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13832         member.  Change type of TYPE member to PyObject *.  All uses updated.
13833         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13834         (gdbpy_create_lazy_string_object): Flag bad length values.
13835         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13836         Handle typedefs in incoming type.
13837         (stpy_lazy_string_elt_type): New function.
13838         (gdbpy_extract_lazy_string): Call it.
13839         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13840         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13841         typedefs in incoming type.
13842
13843 2017-03-16  Doug Evans  <dje@google.com>
13844
13845         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13846         * guile/scm-type.c (tyscm_scm_to_type): New function.
13847
13848 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13849
13850         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13851         "ULONGEST" for "skip".
13852
13853 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13854
13855         PR gdb/21220
13856         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13857         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13858         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13859         over ptrace peek/poke until end of buffer or error.
13860
13861 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13862
13863         * parse.c (length_of_subexp): Make static.
13864         * parser-defs.h (length_of_subexp): Remove.
13865
13866 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13867
13868         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13869         as well.
13870
13871 2017-03-14  Pedro Alves  <palves@redhat.com>
13872
13873         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13874         (main): Use std::unique_ptr.  Remove calls to
13875         cp_demangled_name_parse_free.
13876
13877 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13878
13879         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13880         alphabsd_store_inferior_registers): Use regcache->ptid instead
13881         of inferior_ptid.
13882
13883 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13884
13885         * aix-thread.c (aix_thread_fetch_registers,
13886         aix_thread_store_registers): Use regcache->ptid instead of
13887         inferior_ptid.
13888
13889 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13890
13891         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13892         store_gregs_to_thread, fetch_fpregs_from_thread,
13893         store_fpregs_to_thread): Use regcache->ptid instead of
13894         inferior_ptid.
13895
13896 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13897
13898         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13899         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13900         instead of inferior_ptid.
13901
13902 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13903
13904         * target.c (target_fetch_registers, target_store_registers): Add
13905         assert.
13906
13907 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13908
13909         * regcache.h (regcache_get_ptid): New function.
13910         * regcache.c (regcache_get_ptid): New function.
13911
13912 2017-03-13  Mark Wielaard  <mark@klomp.org>
13913
13914         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13915
13916 2017-03-10  Keith Seitz  <keiths@redhat.com>
13917
13918         PR c++/8218
13919         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13920
13921 2017-03-08  Pedro Alves  <palves@redhat.com>
13922
13923         PR gdb/18360
13924         * infrun.c (start_step_over, do_target_resume, resume)
13925         (restart_threads): Assert we're not resuming a thread that is
13926         meant to be stopped.
13927         (infrun_thread_stop_requested_callback): Delete.
13928         (infrun_thread_stop_requested): If the thread is internally
13929         stopped, queue a pending stop event and clear the thread's
13930         inline-frame state.
13931         (handle_stop_requested): New function.
13932         (handle_syscall_event, handle_inferior_event_1): Use
13933         handle_stop_requested.
13934         (handle_stop_requested): New function.
13935         (handle_signal_stop): Set the thread's stop_signal here instead of
13936         at caller.
13937         (finish_step_over): Clear step over info unconditionally.
13938         (handle_signal_stop): If the user had interrupted the event
13939         thread, consider the stop a random signal.
13940         (handle_signal_stop) <signal arrived while stepping over
13941         breakpoint>: Don't restart threads here.
13942         (stop_waiting): Don't clear step-over info here.
13943
13944 2017-03-08  Pedro Alves  <palves@redhat.com>
13945
13946         PR 21206
13947         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13948         goes to argument 2, not 1.
13949
13950 2017-03-08  Pedro Alves  <palves@redhat.com>
13951
13952         PR cli/21218
13953         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13954         display_gdb_prompt.
13955         (command_line_input): Add comment.
13956
13957 2017-03-08  Pedro Alves  <palves@redhat.com>
13958
13959         PR tui/21216
13960         * tui/tui-file.c (tui_file::write): New.
13961         * tui/tui-file.h (tui_file): Override "write".
13962         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13963         factored out from ...
13964         (tui_puts): ... here.
13965         (tui_putc): Use them.
13966         (tui_write): New function.
13967         * tui/tui-io.h (tui_write): Declare.
13968
13969 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13970
13971         * Makefile.in (SFILES): Replace "environ.c" with
13972         "common/environ.c".
13973         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13974         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13975         to...
13976         * common/environ.c: ... here.
13977         * environ.h: Moved to...
13978         * common/environ.h: ... here.
13979
13980 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13981
13982         * gdbarch.sh (pstring_ptr): New static function.
13983         (gdbarch_disassembler_options): Use it.
13984         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13985         not valid_disassembler_option->name.
13986         * gdbarch.c: Regenerate.
13987
13988 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13989
13990         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13991
13992 2017-03-07  Pedro Alves  <palves@redhat.com>
13993
13994         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13995
13996 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13997
13998         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13999         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14000         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
14001         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
14002
14003 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
14004
14005         * xtensa-linux-nat.c (fetch_gregs): Remove const.
14006
14007 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
14008
14009         * remote.c (remote_add_target_side_commands): Use range-based
14010         for loop.
14011
14012 2017-03-03  Yao Qi  <yao.qi@linaro.org>
14013
14014         PR gdb/21165
14015         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14016         value is lazy.
14017         * valprint.c (common_val_print): Likewise.
14018
14019 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
14020
14021         * NEWS: Mention new set/show disassembler-options commands.
14022         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14023         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14024         (prospective_options): New static variable.
14025         (gdb_disassembler::gdb_disassembler): Initialize
14026         m_di.disassembler_options.
14027         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14028         (get_disassembler_options): New function.
14029         (set_disassembler_options): Likewise.
14030         (set_disassembler_options_sfunc): Likewise.
14031         (show_disassembler_options_sfunc): Likewise.
14032         (disassembler_options_completer): Likewise.
14033         (_initialize_disasm): Likewise.
14034         * disasm.h (get_disassembler_options): New prototype.
14035         (set_disassembler_options): Likewise.
14036         * gdbarch.sh (gdbarch_disassembler_options): New variable.
14037         (gdbarch_verify_disassembler_options): Likewise.
14038         * gdbarch.c: Regenerate.
14039         * gdbarch.h: Likewise.
14040         * arm-tdep.c (num_disassembly_options): Delete.
14041         (set_disassembly_style): Likewise.
14042         (arm_disassembler_options): New static variable.
14043         (set_disassembly_style_sfunc): Convert short style name into long
14044         option name.  Call set_disassembler_options.
14045         (show_disassembly_style_sfunc): New function.
14046         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14047         set_gdbarch_verify_disassembler_options.
14048         (_initialize_arm_tdep): Delete regnames variable and update callers.
14049         (arm_disassembler_options): Initialize.
14050         (disasm_options): New variable.
14051         (num_disassembly_options): Rename from this...
14052         (num_disassembly_styles): ...to this.  Compute by scanning through
14053         disasm_options.
14054         (valid_disassembly_styles): Initialize using disasm_options.
14055         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14056         set_arm_regname_option.
14057         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14058         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14059         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14060         set_gdbarch_verify_disassembler_options.
14061         * s390-tdep.c (s390_disassembler_options): New static variable.
14062         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14063         set_gdbarch_verify_disassembler_options.
14064
14065 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
14066
14067         * remote.c (remote_add_target_side_condition): Remove "struct"
14068         keyword from range-based for loop.
14069
14070 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
14071
14072         * remote.c (remote_add_target_side_condition): Use range-based
14073         for loop.  Update comment.
14074
14075 2017-02-27  Yao Qi  <yao.qi@linaro.org>
14076
14077         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14078
14079 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
14080
14081         * regcache.c (regcache_raw_update): New function.
14082         (regcache_raw_read): Move code to regcache_raw_update.
14083         * regcache.h (regcache_raw_update): New declaration.
14084         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14085
14086 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
14087
14088         * dwarf2read.c (create_debug_type_hash_table): Initialize
14089         header.signature and header.type_offset_in_tu.
14090
14091 2017-02-24  Pedro Alves  <palves@redhat.com>
14092
14093         * symtab.c (make_file_symbol_completion_list_1): Use
14094         add_symtab_completions.
14095
14096 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
14097
14098         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14099
14100 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
14101
14102         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14103         I386_MAX_REGISTER_SIZE.
14104         (i386_pseudo_register_write): Likewise.
14105         (i386_process_record): Likewise.
14106         * i387-tdep.c (i387_supply_xsave): Likewise.
14107         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14108         (store_register): Likewise.
14109
14110 2017-02-23  Pedro Alves  <palves@redhat.com>
14111
14112         * ada-lang.c: Include "common/function-view.h".
14113         (ada_iterate_over_symbols): Adjust to use function_view as
14114         callback type.
14115         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14116         (ada_make_symbol_completion_list): Use a lambda.
14117         (ada_exc_search_name_matches): Delete.
14118         (name_matches_regex): New.
14119         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14120         * compile/compile-c-support.c: Include "common/function-view.h".
14121         (print_one_macro): Change prototype to accept a ui_file pointer.
14122         (write_macro_definitions): Use a lambda.
14123         * dwarf2read.c: Include "common/function-view.h".
14124         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14125         (dw2_expand_symtabs_matching): Adjust to use function_view as
14126         callback type.
14127         * language.h: Include "common/function-view.h".
14128         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14129         function_view as callback type.
14130         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14131         * linespec.c: Include "common/function-view.h".
14132         (collect_info::add_symbol): New method.
14133         (struct symbol_and_data_callback, iterate_inline_only, struct
14134         symbol_matcher_data, iterate_name_matcher): Delete.
14135         (iterate_over_all_matching_symtabs): Adjust to use function_view
14136         as callback type and lambdas.
14137         (iterate_over_file_blocks): Adjust to use function_view as
14138         callback type.
14139         (decode_compound_collector): Now a class with private fields.
14140         (decode_compound_collector::release_symbols): New method.
14141         (collect_one_symbol): Rename to...
14142         (decode_compound_collector::operator()): ... this and adjust.
14143         (lookup_prefix_sym): decode_compound_collector construction bits
14144         move to decode_compound_collector ctor.  Pass the
14145         decode_compound_collector object directly as callback.  Remove
14146         cleanups and use decode_compound_collector::release_symbols
14147         instead.
14148         (symtab_collector): Now a class with private fields.
14149         (symtab_collector::release_symtabs): New method.
14150         (add_symtabs_to_list): Rename to...
14151         (symtab_collector::operator()): ... this and adjust.
14152         (collect_symtabs_from_filename): symtab_collector construction
14153         bits move to symtab_collector ctor.  Pass the symtab_collector
14154         object directly as callback.  Remove cleanups and use
14155         symtab_collector::release_symtabs instead.
14156         (collect_symbols): Delete.
14157         (add_matching_symbols_to_info): Use lambdas.
14158         * macrocmd.c (print_macro_callback): Delete.
14159         (info_macro_command): Use a lambda.
14160         (info_macros_command): Pass print_macro_definition as callable
14161         directly.
14162         (print_one_macro): Remove 'ignore' parameter.
14163         (macro_list_command): Adjust.
14164         * macrotab.c (macro_for_each_data::fn): Now a function_view.
14165         (macro_for_each_data::user_data): Delete field.
14166         (foreach_macro): Adjust to call the function_view.
14167         (macro_for_each): Adjust to use function_view as callback type.
14168         (foreach_macro_in_scope): Adjust to call the function_view.
14169         (macro_for_each_in_scope): Adjust to use function_view as callback
14170         type.
14171         * macrotab.h: Include "common/function-view.h".
14172         (macro_callback_fn): Declare a prototype instead of a pointer.
14173         Remove "user_data" parameter.
14174         (macro_for_each, macro_for_each_in_scope): Adjust to use
14175         function_view as callback type.
14176         * psymtab.c (partial_map_expand_apply)
14177         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14178         Adjust to use function_view as callback type and to return bool.
14179         (psym_expand_symtabs_matching): Adjust to use function_view as
14180         callback types.
14181         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14182         to use function_view as callback type and to return bool.
14183         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14184         callback types.
14185         * symfile.c (expand_symtabs_matching): Adjust to use function_view
14186         as callback types.
14187         * symfile.h: Include "common/function-view.h".
14188         (expand_symtabs_file_matcher_ftype)
14189         (expand_symtabs_symbol_matcher_ftype)
14190         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14191         return bool.
14192         (quick_symbol_functions::map_symtabs_matching_filename)
14193         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14194         function_view as callback type and return bool.
14195         (expand_symtabs_matching): Adjust to use function_view as callback
14196         type.
14197         (maintenance_expand_name_matcher)
14198         (maintenance_expand_file_matcher): Delete.
14199         (maintenance_expand_symtabs): Use lambdas.
14200         * symtab.c (iterate_over_some_symtabs): Adjust to use
14201         function_view as callback types and return bool.
14202         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
14203         of a cleanup.
14204         (lookup_symtab_callback): Delete.
14205         (lookup_symtab): Use a lambda.
14206         (iterate_over_symbols): Adjust to use function_view as callback
14207         type.
14208         (struct search_symbols_data, search_symbols_file_matches)
14209         (search_symbols_name_matches): Delete.
14210         (search_symbols): Use a pair of lambdas.
14211         (struct add_name_data, add_macro_name, symbol_completion_matcher)
14212         (symtab_expansion_callback): Delete.
14213         (default_make_symbol_completion_list_break_on_1): Use lambdas.
14214         * symtab.h: Include "common/function-view.h".
14215         (iterate_over_some_symtabs): Adjust to use function_view as
14216         callback type and return bool.
14217         (iterate_over_symtabs): Adjust to use function_view as callback
14218         type.
14219         (symbol_found_callback_ftype): Remove 'data' parameter and return
14220         bool.
14221         (iterate_over_symbols): Adjust to use function_view as callback
14222         type.
14223
14224 2017-02-23  Pedro Alves  <palves@redhat.com>
14225
14226         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14227         (%.o) <unittests/%.c>: New pattern.
14228         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14229         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14230         * common/function-view.h: New file.
14231         * unittests/function-view-selftests.c: New file.
14232         * configure: Regenerate.
14233
14234 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
14235
14236         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14237         inferior_ptid.
14238         * go32-nat.c (go32_thread_alive): Likewise.
14239
14240 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14241
14242         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14243         delete.
14244
14245 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14246
14247         * varobj.c (varobj_clear_saved_item): Use delete instead of
14248         xfree.
14249         (update_dynamic_varobj_children): Likewise.
14250
14251 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14252
14253         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14254
14255 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
14256
14257         * common/enum-flags.h (enum_flags::enum_flags): Initialize
14258         m_enum_value to 0 in default constructor.
14259
14260 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
14261
14262         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14263         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14264         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14265         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14266         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14267         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14268         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14269         IS_STORE_CONDITIONAL_INSN.
14270
14271 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14272
14273         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14274
14275 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14276
14277         * NEWS (Changes since GDB 7.12): Add DWARF-5.
14278
14279 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14280
14281         * dwarf2read.c (skip_one_die, read_attribute_value)
14282         (dwarf2_const_value_attr, dump_die_shallow)
14283         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14284         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14285
14286 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14287
14288         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14289         (dwarf_parse_macro_header): Accept DWARF version 5.
14290         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14291
14292 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14293
14294         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14295         DW_AT_GNU_*.
14296         * common/common-exceptions.h (enum errors): Likewise.
14297         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14298         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14299         (dwarf_expr_context::execute_stack_op): Likewise.
14300         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14301         Likewise.
14302         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14303         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14304         (show_entry_values_debug, call_site_to_target_addr)
14305         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14306         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14307         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14308         (value_of_dwarf_block_entry, indirect_pieced_value)
14309         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14310         (disassemble_dwarf_expression): Likewise.
14311         * dwarf2read.c (process_die, inherit_abstract_dies)
14312         (read_call_site_scope): Likewise.
14313         * gdbtypes.h (struct func_type, struct call_site_parameter)
14314         (struct call_site): Likewise.
14315         * stack.c (read_frame_arg): Likewise.
14316         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14317
14318 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14319
14320         * defs.h (read_unsigned_leb128): New declaration.
14321         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14322         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14323         (dwarf2_find_location_expression): Call also
14324         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
14325         * dwarf2loc.h (dwarf2_version): New declaration.
14326         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14327         rnglists.
14328         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14329         .debug_rnglists.
14330         (struct dwop_section_names): Add loclists_dwo.
14331         (dwop_section_names): Add .debug_loclists.dwo.
14332         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14333         (struct dwarf2_per_cu_data): Add dwarf_version.
14334         (struct dwo_sections): Add loclists.
14335         (struct attr_abbrev): Add implicit_const.
14336         (read_indirect_line_string): New declaration.
14337         (read_unsigned_leb128): Delete declaration.
14338         (rcuh_kind): New definition.
14339         (read_and_check_comp_unit_head): Change parameter
14340         is_debug_types_section to section_kind.
14341         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14342         (read_comp_unit_head): Change parameter abfd to section, add parameter
14343         section_kind.  Handle DWARF-5.
14344         (error_check_comp_unit_head): Accept also DWARF version 5.
14345         (read_and_check_comp_unit_head): Change parameter
14346         is_debug_types_section to section_kind.
14347         (read_and_check_type_unit_head): Delete function.
14348         (read_abbrev_offset): Handle DWARF-5.
14349         (create_debug_type_hash_table): Add parameter section_kind.  Process
14350         only DW_UT_type.  Use signature and type_offset_in_tu from struct
14351         comp_unit_head.
14352         (create_debug_types_hash_table): Update create_debug_type_hash_table
14353         caller.
14354         (create_all_type_units): Call create_debug_type_hash_table.
14355         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14356         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14357         caller.
14358         (skip_one_die): Handle DW_FORM_implicit_const.
14359         (dwarf2_rnglists_process): New function.
14360         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14361         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14362         (read_attribute_value): Handle DW_FORM_implicit_const,
14363         DW_FORM_line_strp.
14364         (read_attribute): Handle DW_FORM_implicit_const.
14365         (read_indirect_string_at_offset_from): New function from
14366         read_indirect_string_at_offset.
14367         (read_indirect_string_at_offset): Call
14368         read_indirect_string_at_offset_from.
14369         (read_indirect_line_string_at_offset): New function.
14370         (read_indirect_string): New function comment.
14371         (read_indirect_line_string): New function.
14372         (read_unsigned_leb128): Make it global.
14373         (dwarf2_string_attr): Handle DWARF-5.
14374         (add_include_dir_stub, read_formatted_entries): New functions.
14375         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14376         Handle DWARF-5.
14377         (per_cu_header_read_in): Update read_comp_unit_head caller.
14378         (dwarf2_version): New function.
14379         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14380         rnglists.
14381         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14382         fields.
14383
14384 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14385
14386         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14387
14388 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14389
14390         * dwarf2read.c (dwarf2_ranges_process): New function from
14391         dwarf2_ranges_read.
14392         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14393         dwarf2_ranges_process.
14394
14395 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14396
14397         * dwarf2read.c (create_debug_type_hash_table): New function from
14398         create_debug_types_hash_table.
14399         (create_debug_types_hash_table): Call create_debug_type_hash_table.
14400         (create_all_type_units, open_and_init_dwo_file): Update
14401         create_debug_types_hash_table callers.
14402
14403 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14404
14405         PR gdb/16188
14406         * fork-child.c (trace_start_error): Fix thinko.  va_end should
14407         refer to 'ap', not 'args'.
14408
14409 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14410             Pedro Alves  <palves@redhat.com>
14411
14412         PR gdb/16188
14413         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14414         calls succeeded.
14415         * fork-child.c (trace_start_error): New function.
14416         (trace_start_error_with_name): Likewise.
14417         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14418         * inf-ptrace.c (inf_ptrace_me): Likewise.
14419         * inferior.h (trace_start_error): New prototype.
14420         (trace_start_error_with_name): Likewise.
14421
14422 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
14423
14424         PR gdb/21164
14425         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14426         NULL before using it.
14427         * symmisc.c (maintenance_print_symbols): Likewise.
14428         (maintenance_print_msymbols): Likewise.
14429
14430 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14431
14432         * NEWS: Add record Python bindings entry.
14433
14434 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14435
14436         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14437         py-record-full.o.
14438         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14439         * python/py-record-btrace.c, python/py-record-btrace.h,
14440         python/py-record-full.c, python/py-record-full.h: New file.
14441         * python/py-record.c: Add include for py-record-btrace.h and
14442         py-record-full.h.
14443         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14444         recpy_instruction_history, recpy_function_call_history, recpy_begin,
14445         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14446         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14447         New definition.
14448         (gdbpy_initialize_btrace): New export.
14449         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14450
14451 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14452
14453         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14454         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14455         * python/py-record.c: New file.
14456         * python/python-internal.h (gdbpy_start_recording,
14457         gdbpy_current_recording, gdpy_stop_recording,
14458         gdbpy_initialize_record): New export.
14459         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14460         (python_GdbMethods): Add gdbpy_start_recording,
14461         gdbpy_current_recording and gdbpy_stop_recording.
14462
14463 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14464
14465         * record-btrace.c (record_btrace_record_method): New function.
14466         (init_record_btrace_ops): Initialize to_record_method.
14467         * record-full.c (record_full_record_method): New function.
14468         (init_record_full_ops, init_record_full_core_ops): Add
14469         record_full_record_method.
14470         * record.h (enum record_method): New enum.
14471         * target-debug.h (target_debug_print_enum_record_method: New define.
14472         * target-delegates.c: Regenerate.
14473         * target.c (target_record_method): New function.
14474         * target.h: Include record.h.
14475         (struct target_ops) <to_record_method>: New field.
14476         (target_record_method): New export.
14477
14478 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14479
14480         * record.h (record_start, record_stop): New export.
14481         * record.c (record_start, record_stop): New function.
14482
14483 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14484
14485         * btrace.c (btrace_fetch): Copy function call segments pointer
14486         into a vector.
14487         (btrace_clear): Clear the vector.
14488         (btrace_find_insn_by_number): Use binary search to find the correct
14489         function call segment.
14490         * btrace.h (brace_fun_p): New typedef.
14491         (struct btrace_thread_info) <functions>: New field.
14492
14493 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14494
14495         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14496         * btrace.c (btrace_decode_error): ... here.  New function.
14497         * btrace.h (btrace_decode_error): New export.
14498
14499 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14500
14501         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14502         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14503         btrace_find_insn_by_number): Remove special case for gaps.
14504         * btrace.h (btrace_insn_get_error): New export.
14505         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14506         * record-btrace.c (btrace_insn_history): Print number for gaps.
14507         (record_btrace_info, record_btrace_goto): Handle gaps.
14508
14509 2017-02-14  Tom Tromey  <tom@tromey.com>
14510
14511         PR python/13598:
14512         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14513         event.
14514         * python/py-evts.c (gdbpy_initialize_py_events): Add
14515         before_prompt registry.
14516         * python/py-events.h (events_object) <before_prompt>: New field.
14517
14518 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14519
14520         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14521
14522 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14523
14524         * symfile (_initialize_symfile): Add usage text to the load command's
14525         help text.
14526
14527 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14528
14529         * utils.c (defaulted_query): Don't query on secondary UIs.
14530
14531 2017-02-10  Tom Tromey  <tom@tromey.com>
14532
14533         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14534
14535 2017-02-10  Tom Tromey  <tom@tromey.com>
14536
14537         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14538         "cleanup" local.
14539         * python/py-type.c (typy_legacy_template_argument): Remove
14540         unnecessary "cleanup" local.
14541
14542 2017-02-10  Tom Tromey  <tom@tromey.com>
14543
14544         * python/python.c (do_start_initialization): New function, from
14545         _initialize_python.
14546         (_initialize_python): Call do_start_initialization.
14547         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14548         goto.
14549
14550 2017-02-10  Tom Tromey  <tom@tromey.com>
14551
14552         * python/py-prettyprint.c (pretty_print_one_value): Use
14553         gdbpy_ref.
14554
14555 2017-02-10  Tom Tromey  <tom@tromey.com>
14556
14557         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14558         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14559         gdbpy_ref.
14560         * python/py-type.c (field_new): Use gdbpy_ref.
14561         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14562         gdbpy_ref.
14563         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14564         (py_free_pspace): Likewise.
14565         (pspace_to_pspace_object): Likewise.
14566         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14567         (py_free_objfile): Likewise.
14568         (objfile_to_objfile_object): Likewise.
14569         * python/py-inferior.c (delete_thread_object): Use
14570         gdbpy_ref.
14571         (infpy_read_memory): Likewise.
14572         (py_free_inferior): Likewise.
14573         * python/py-evtregistry.c (create_eventregistry_object): Use
14574         gdbpy_ref.
14575         * python/py-event.c (create_event_object): Use gdbpy_ref.
14576
14577 2017-02-10  Tom Tromey  <tom@tromey.com>
14578
14579         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14580         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14581         used.
14582         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14583         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14584         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14585         python/py-framefilter.c, python/py-function.c,
14586         python/py-inferior.c, python/py-infevents.c,
14587         python/py-linetable.c, python/py-newobjfileevent.c,
14588         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14589         python/py-signalevent.c, python/py-stopevent.c,
14590         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14591         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14592         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14593         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14594
14595 2017-02-10  Tom Tromey  <tom@tromey.com>
14596
14597         * ui-out.h (ui_out_emit_type): New class.
14598         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14599         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14600         and ui_out_emit_tuple.
14601         (enumerate_locals): Likewise.
14602         (py_mi_print_variables, py_print_locals, py_print_args): Use
14603         ui_out_emit_list.
14604         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14605         ui_out_emit_list.
14606         * common/gdb_optional.h: New file.
14607
14608 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14609
14610         * MAINTAINERS (Write After Approval): Update my e-mail address.
14611
14612 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14613
14614         PR gdb/21122
14615         * breakpoint.c (_initialize_breakpoint): Update the help description
14616         of the 'commands' command to indicate that it takes a list argument.
14617
14618 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14619
14620         * interps.c (current_interp_set_logging): Remove "return".
14621
14622 2017-02-09  Gary Benson  <gbenson@redhat.com>
14623
14624         * symtab.c (add_symtab_completions): Prevent NULL pointer
14625         dereference.
14626
14627 2017-02-08  Pedro Alves  <palves@redhat.com>
14628
14629         * interps.c (interp::interp): Remove reference to quiet_p.
14630         (interp_set): Make static.  Remove dead "Switching to" output
14631         code.
14632         (interp_quiet_p, interp_set_quiet): Delete.
14633         (interpreter_exec_cmd): Don't set the interpreter quiet.
14634         * interps.h (interp_quiet_p): Make static.
14635         (class interp) <quiet_p>: Remove field
14636
14637 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14638
14639         * cli/cli-decode.c (find_command_name_length): Make it extern.
14640         * cli/cli-decode.h (find_command_name_length): Declare.
14641         * cli/cli-script.c (command_name_equals, line_first_arg):
14642         New functions.
14643         (process_next_line): Use cli-decode to parse command names.
14644         (build_command_line): Make args a constant pointer.
14645
14646 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14647
14648         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14649         Remove case-insensitive search.
14650
14651 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14652
14653         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14654         at the end of the line.  Avoids an ARI warning.
14655
14656 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14657
14658         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14659         rdseed instructions.
14660         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14661
14662 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14663
14664         PR tdep/20936
14665         Provide and use sparc32 and sparc64 target description XML files.
14666         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14667         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14668         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14669         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14670         * features/sparc/sparc32-solaris.xml: New file.
14671         * features/sparc/sparc64-solaris.xml: New file.
14672         * features/sparc/sparc32-solaris.c: Generated.
14673         * features/sparc/sparc64-solaris.c: Generated.
14674         * sparc-tdep.h: Account for differences in target descriptions.
14675         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14676         (sparc32_register_type): Use target provided registers.
14677         (validate_tdesc_registers): New function.
14678         (sparc32_gdbarch_init): Use tdesc_has_registers.
14679         Set pseudoregister functions.
14680         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14681         (sparc64_register_type): Use target provided registers.
14682         (sparc64_init_abi): Set pseudoregister functions.
14683
14684 2017-02-03  Tom Tromey  <tom@tromey.com>
14685
14686         PR rust/21097:
14687         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14688         with a single member.
14689
14690 2017-02-03  Pedro Alves  <palves@redhat.com>
14691
14692         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14693         (cli_interp_base::~cli_interp_base): New.
14694         (cli_interp): New struct.
14695         (as_cli_interp): Cast the interp itself to cli_interp.
14696         (cli_interpreter_pre_command_loop): Rename to ...
14697         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14698         parameter.
14699         (cli_interpreter_init): Rename to ...
14700         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14701         boolean.  Make extern.
14702         (cli_interpreter_resume): Rename to ...
14703         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14704         extern.
14705         (cli_interpreter_suspend): Rename to ...
14706         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14707         extern.
14708         (cli_interpreter_exec): Rename to ...
14709         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14710         extern.
14711         (cli_interpreter_supports_command_editing): Rename to ...
14712         (cli_interp_base::supports_command_editing): ... this.  Remove
14713         'interp' parameter.  Make extern.
14714         (cli_ui_out): Rename to ...
14715         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14716         Make extern.
14717         (cli_set_logging): Rename to ...
14718         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14719         parameter.  Make extern.
14720         (cli_interp_procs): Delete.
14721         (cli_interp_factory): Adjust to use "new".
14722         * cli/cli-interp.h: Include "interps.h".
14723         (struct cli_interp_base): New struct.
14724         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14725         (interp_new): Delete.
14726         (interp::interp, interp::~interp): New.
14727         (interp_set): Use bool, and return void.  Assume the interpreter
14728         has suspend, init and resume methods, and that the all return
14729         void.
14730         (set_top_level_interpreter): interp_set returns void.
14731         (interp_ui_out): Adapt.
14732         (current_interp_set_logging): Adapt.
14733         (interp_data): Delete.
14734         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14735         (interp_exec): Adapt.
14736         (top_level_interpreter_data): Delete.
14737         * interps.h (interp_init_ftype, interp_resume_ftype)
14738         (interp_suspend_ftype, interp_exec_ftype)
14739         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14740         (class interp): New.
14741         (interp_new): Delete.
14742         (interp_set): Now returns void.  Use bool.
14743         (interp_data, top_level_interpreter_data): Delete.
14744         * mi/mi-common.h: Include interps.h.
14745         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14746         init, resume, suspect, exec, interp_ui_out, set_logging and
14747         pre_command_loop methods.
14748         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14749         (mi_interpreter_init): Rename to ...
14750         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14751         bool, return void and make extern.  Adjust.
14752         (mi_interpreter_resume): ... Rename to ...
14753         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14754         return void and make extern.  Adjust.
14755         (mi_interpreter_suspend): ... Rename to ...
14756         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14757         return void and make extern.  Adjust.
14758         (mi_interpreter_exec): ... Rename to ...
14759         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14760         extern.  Adjust.
14761         (mi_interpreter_pre_command_loop): ... Rename to ...
14762         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14763         parameter and make extern.
14764         (mi_on_normal_stop_1): Adjust.
14765         (mi_ui_out): Rename to ...
14766         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14767         parameter and make extern.  Adjust.
14768         (mi_set_logging): Rename to ...
14769         (mi_interp::set_logging): ... this.  Remove the 'interp'
14770         parameter and make extern.  Adjust.
14771         (mi_interp_procs): Delete.
14772         (mi_interp_factory): Adjust to use 'new'.
14773         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14774         (mi_print_exception, mi_execute_command, mi_load_progress):
14775         Adjust.
14776         * tui/tui-interp.c (tui_interp): New class.
14777         (as_tui_interp): Return a tui_interp pointer.
14778         (tui_on_normal_stop, tui_on_signal_received)
14779         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14780         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14781         to use interp::interp_ui_out.
14782         (tui_init): Rename to ...
14783         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14784         bool, return void and make extern.  Adjust.
14785         (tui_resume): Rename to ...
14786         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14787         return void and make extern.  Adjust.
14788         (tui_suspend): Rename to ...
14789         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14790         return void and make extern.  Adjust.
14791         (tui_ui_out): Rename to ...
14792         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14793         parameter, and make extern.  Adjust.
14794         (tui_exec): Rename to ...
14795         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14796         make extern.
14797         (tui_interp_procs): Delete.
14798         (tui_interp_factory): Use "new".
14799
14800 2017-02-02  Tom Tromey  <tom@tromey.com>
14801
14802         * rust-exp.y (ends_raw_string, space_then_number)
14803         (rust_identifier_start_p): Return bool.
14804         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14805         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14806         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14807         (rust_chartype_p): Return bool.
14808         (val_print_struct, rust_print_struct_def, rust_print_type):
14809         Update.
14810         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14811         Return bool.
14812
14813 2017-02-02  Tom Tromey  <tom@tromey.com>
14814
14815         * rust-lang.c: Reindent.
14816
14817 2017-02-02  Tom Tromey  <tom@tromey.com>
14818
14819         * rust-lang.h (rust_crate_for_block): Update.
14820         * rust-lang.c (rust_crate_for_block): Return std::string.
14821         (rust_get_disr_info): Use std:;string, not
14822         gdb::unique_xmalloc_ptr.
14823         * rust-exp.y (crate_name): Update.
14824
14825 2017-02-02  Pedro Alves  <palves@redhat.com>
14826
14827         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14828         field out of gdb_disassembler_test and make it static.
14829
14830 2017-02-02  Pedro Alves  <palves@redhat.com>
14831
14832         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14833         mi1_interp and mi_interp fields.
14834
14835 2017-02-02  Pedro Alves  <palves@redhat.com>
14836
14837         * cli/cli-interp.c (struct saved_output_files, saved_output):
14838         Moved from cli/cli-logging.c.
14839         (cli_set_logging): New function.
14840         (cli_interp_procs): Install cli_set_logging.
14841         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14842         Declare.
14843         * cli/cli-logging.c (struct saved_output_files, saved_output):
14844         Moved to cli/cli-interp.c.
14845         (pop_output_files): Don't save outputs here.
14846         (make_logging_output): New function.
14847         (handle_redirections): Don't build tee nor save previous outputs
14848         here.
14849         * interps.c (current_interp_set_logging): Change prototype.
14850         Assume there's always a set_logging_proc method installed.
14851         * interps.h (interp_set_logging_ftype): Change prototype.
14852         (current_interp_set_logging): Change prototype and adjust comment.
14853         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14854         use make_logging_output.
14855         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14856 2017-02-02  Pedro Alves  <palves@redhat.com>
14857
14858         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14859         from ...
14860         (set_logging_overwrite): ... here.
14861         (logging_no_redirect_file): Delete.
14862         (set_logging_redirect): Don't handle redirection on the fly.
14863         Instead warn that "logging off" / "logging on" is necessary.
14864         (pop_output_files): Delete references to logging_no_redirect_file.
14865         (show_logging_command): Always speak in terms of what will happen
14866         once logging is reenabled.
14867
14868 2017-02-02  Pedro Alves  <palves@redhat.com>
14869
14870         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14871
14872 2017-02-02  Pedro Alves  <palves@redhat.com>
14873
14874         * disasm.c (gdb_pretty_print_insn): Rename to ...
14875         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14876         Remove gdbarch parameter.  Adapt to clear the object's buffers
14877         instead of allocating new buffers, and to print using the object's
14878         gdb_disassembler instead of calling gdb_print_insn.
14879         (dump_insns): Use gdb_pretty_print_disassembler.
14880         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14881         (gdb_pretty_print_disassembler): New class.
14882         * record-btrace.c (btrace_insn_history): Use
14883         gdb_pretty_print_disassembler.
14884
14885 2017-02-02  Pedro Alves  <palves@redhat.com>
14886
14887         * ada-lang.c (type_as_string): Use string_file.
14888         * ada-valprint.c (ada_print_floating): Use string_file.
14889         * ada-varobj.c (ada_varobj_scalar_image)
14890         (ada_varobj_get_value_image): Use string_file.
14891         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14892         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14893         * breakpoint.c (update_inserted_breakpoint_locations)
14894         (insert_breakpoint_locations, reattach_breakpoints)
14895         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14896         (print_it_watchpoint): Use string_file.
14897         (save_breakpoints): Use stdio_file.
14898         * c-exp.y (oper): Use string_file.
14899         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14900         tee_file.
14901         (pop_output_files): Use delete.
14902         (handle_redirections): Use stdio_file and tee_file.
14903         * cli/cli-setshow.c (do_show_command): Use string_file.
14904         * compile/compile-c-support.c (c_compute_program): Use
14905         string_file.
14906         * compile/compile-c-symbols.c (generate_vla_size): Take a
14907         'string_file &' instead of a 'ui_file *'.
14908         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14909         of a 'ui_file *'.  Use string_file.
14910         (generate_c_for_variable_locations): Take a 'string_file &'
14911         instead of a 'ui_file *'.
14912         * compile/compile-internal.h (generate_c_for_for_one_variable):
14913         Take a 'string_file &' instead of a 'ui_file *'.
14914         * compile/compile-loc2c.c (push, pushf, unary, binary)
14915         (print_label, pushf_register_address, pushf_register)
14916         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14917         'ui_file *'.  Adjust.
14918         * compile/compile.c (compile_to_object): Use string_file.
14919         * compile/compile.h (compile_dwarf_expr_to_c)
14920         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14921         'ui_file *'.
14922         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14923         (replace_typedefs_qualified_name): Use string_file and
14924         obstack_copy0.
14925         * disasm.c (gdb_pretty_print_insn): Use string_file.
14926         (gdb_disassembly): Adjust reference the null_stream global.
14927         (do_ui_file_delete): Delete.
14928         (gdb_insn_length): Use null_stream.
14929         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14930         * dwarf2loc.c (dwarf2_compile_property_to_c)
14931         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14932         'string_file &' instead of a 'ui_file *'.
14933         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14934         * dwarf2read.c (do_ui_file_peek_last): Delete.
14935         (dwarf2_compute_name): Use string_file.
14936         * event-top.c (gdb_setup_readline): Use stdio_file.
14937         * gdbarch.sh (verify_gdbarch): Use string_file.
14938         * gdbtypes.c (safe_parse_type): Use null_stream.
14939         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14940         string_file.
14941         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14942         'string_file *' instead of a 'ui_file *'.
14943         (gdbscm_arch_disassemble): Use string_file.
14944         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14945         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14946         inherits from ui_file.
14947         (ioscm_file_port_delete, ioscm_file_port_rewind)
14948         (ioscm_file_port_put): Delete.
14949         (ioscm_file_port_write): Rename to ...
14950         (ioscm_file_port::write): ... this.  Remove file_port_magic
14951         checks.
14952         (ioscm_file_port_new): Delete.
14953         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14954         ui_file_up.
14955         * guile/scm-type.c (tyscm_type_name): Use string_file.
14956         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14957         Use string_file.
14958         * infcmd.c (print_return_value_1): Use string_file.
14959         * infrun.c (print_target_wait_results): Use string_file.
14960         * language.c (add_language): Use string_file.
14961         * location.c (explicit_to_string_internal): Use string_file.
14962         * main.c (captured_main_1): Use null_file.
14963         * maint.c (maintenance_print_architecture): Use stdio_file.
14964         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14965         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14966         event_channel>: Change type to mi_console_file pointer.
14967         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14968         (mi_console_file_delete): Delete.
14969         (struct mi_console_file): Delete.
14970         (mi_console_file_magic): Delete.
14971         (mi_console_file_new): Delete.
14972         (mi_console_file::mi_console_file): New.
14973         (mi_console_file_delete): Delete.
14974         (mi_console_file_fputs): Delete.
14975         (mi_console_file::write): New.
14976         (mi_console_raw_packet): Delete.
14977         (mi_console_file::flush): New.
14978         (mi_console_file_flush): Delete.
14979         (mi_console_set_raw): Rename to ...
14980         (mi_console_file::set_raw): ... this.
14981         * mi/mi-console.h (class mi_console_file): New class.
14982         (mi_console_file_new, mi_console_set_raw): Delete.
14983         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14984         (mi_set_logging): Use delete and tee_file.  Adjust.
14985         * mi/mi-main.c (output_register): Use string_file.
14986         (mi_cmd_data_evaluate_expression): Use string_file.
14987         (mi_cmd_data_read_memory): Use string_file.
14988         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14989         * mi/mi-out.c (mi_ui_out::main_stream): New.
14990         (mi_ui_out::rewind): Use main_stream and
14991         string_file.
14992         (mi_ui_out::put): Use main_stream and string_file.
14993         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14994         Allocate a 'string_file' instead.
14995         (mi_out_new): Don't allocate a mem_fileopen stream here.
14996         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14997         (mi_ui_out::main_stream): Declare method.
14998         * printcmd.c (eval_command): Use string_file.
14999         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15000         * python/py-arch.c (archpy_disassemble): Use string_file.
15001         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15002         * python/py-frame.c (frapy_str): Use string_file.
15003         * python/py-framefilter.c (py_print_type, py_print_single_arg):
15004         Use string_file.
15005         * python/py-type.c (typy_str): Use string_file.
15006         * python/py-unwind.c (unwind_infopy_str): Use string_file.
15007         * python/py-value.c (valpy_str): Use string_file.
15008         * record-btrace.c (btrace_insn_history): Use string_file.
15009         * regcache.c (regcache_print): Use stdio_file.
15010         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15011         * remote.c (escape_buffer): Use string_file.
15012         * rust-lang.c (rust_get_disr_info): Use string_file.
15013         * serial.c (serial_open_ops_1): Use stdio_file.
15014         (do_serial_close): Use delete.
15015         * stack.c (print_frame_arg): Use string_file.
15016         (print_frame_args): Remove local mem_fileopen stream, not used.
15017         (print_frame): Use string_file.
15018         * symmisc.c (maintenance_print_symbols): Use stdio_file.
15019         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15020         Take a 'string_file *' instead of a 'ui_file *'.
15021         * top.c (new_ui): Use stdio_file and stderr_file.
15022         (free_ui): Use delete.
15023         (execute_command_to_string): Use string_file.
15024         (quit_confirm): Use string_file.
15025         * tracepoint.c (collection_list::append_exp): Use string_file.
15026         * tui/tui-disasm.c (tui_disassemble): Use string_file.
15027         * tui/tui-file.c: Don't include "ui-file.h".
15028         (enum streamtype, struct tui_stream): Delete.
15029         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15030         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15031         (tui_file::tui_file): New method.
15032         (tui_file_fputs): Delete.
15033         (tui_file_get_strbuf): Delete.
15034         (tui_file::puts): New method.
15035         (tui_file_adjust_strbuf): Delete.
15036         (tui_file_flush): Delete.
15037         (tui_file::flush): New method.
15038         * tui/tui-file.h: Tweak intro comment.
15039         Include ui-file.h.
15040         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15041         (tui_file_adjust_strbuf): Delete declarations.
15042         (class tui_file): New class.
15043         * tui/tui-io.c (tui_initialize_io): Use tui_file.
15044         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15045         (tui_register_format): Use string_stream.
15046         * tui/tui-stack.c (tui_make_status_line): Use string_file.
15047         (tui_get_function_from_frame): Use string_file.
15048         * typeprint.c (type_to_string): Use string_file.
15049         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15050         (null_stream): New global.
15051         (ui_file_delete): Delete.
15052         (ui_file::ui_file): New.
15053         (null_file_isatty): Delete.
15054         (ui_file::~ui_file): New.
15055         (null_file_rewind): Delete.
15056         (ui_file::printf): New.
15057         (null_file_put): Delete.
15058         (null_file_flush): Delete.
15059         (ui_file::putstr): New.
15060         (null_file_write): Delete.
15061         (ui_file::putstrn): New.
15062         (null_file_read): Delete.
15063         (ui_file::putc): New.
15064         (null_file_fputs): Delete.
15065         (null_file_write_async_safe): Delete.
15066         (ui_file::vprintf): New.
15067         (null_file_delete): Delete.
15068         (null_file::write): New.
15069         (null_file_fseek): Delete.
15070         (null_file::puts): New.
15071         (ui_file_data): Delete.
15072         (null_file::write_async_safe): New.
15073         (gdb_flush, ui_file_isatty): Adjust.
15074         (ui_file_put, ui_file_rewind): Delete.
15075         (ui_file_write): Adjust.
15076         (ui_file_write_for_put): Delete.
15077         (ui_file_write_async_safe, ui_file_read): Adjust.
15078         (ui_file_fseek): Delete.
15079         (fputs_unfiltered): Adjust.
15080         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15081         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15082         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15083         (set_ui_file_data): Delete.
15084         (string_file::~string_file, string_file::write)
15085         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15086         (do_ui_file_as_string, ui_file_as_string): Delete.
15087         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15088         (struct mem_file): Delete.
15089         (mem_file_new): Delete.
15090         (stdio_file::stdio_file): New.
15091         (mem_file_delete): Delete.
15092         (stdio_file::stdio_file): New.
15093         (mem_fileopen): Delete.
15094         (stdio_file::~stdio_file): New.
15095         (mem_file_rewind): Delete.
15096         (stdio_file::set_stream): New.
15097         (mem_file_put): Delete.
15098         (stdio_file::open): New.
15099         (mem_file_write): Delete.
15100         (stdio_file_magic, struct stdio_file): Delete.
15101         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15102         (stdio_file::flush): New.
15103         (stdio_file_read): Rename to ...
15104         (stdio_file::read): ... this.  Adjust.
15105         (stdio_file_write): Rename to ...
15106         (stdio_file::write): ... this.  Adjust.
15107         (stdio_file_write_async_safe): Rename to ...
15108         (stdio_file::write_async_safe) ... this.  Adjust.
15109         (stdio_file_fputs): Rename to ...
15110         (stdio_file::puts) ... this.  Adjust.
15111         (stdio_file_isatty): Delete.
15112         (stdio_file_fseek): Delete.
15113         (stdio_file::isatty): New.
15114         (stderr_file_write): Rename to ...
15115         (stderr_file::write) ... this.  Adjust.
15116         (stderr_file_fputs): Rename to ...
15117         (stderr_file::puts) ... this.  Adjust.
15118         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15119         (stderr_file::stderr_file): New.
15120         (tee_file_magic): Delete.
15121         (struct tee_file): Delete.
15122         (tee_file::tee_file): New.
15123         (tee_file_new): Delete.
15124         (tee_file::~tee_file): New.
15125         (tee_file_delete): Delete.
15126         (tee_file_flush): Rename to ...
15127         (tee_file::flush): ... this.  Adjust.
15128         (tee_file_write): Rename to ...
15129         (tee_file::write): ... this.  Adjust.
15130         (tee_file::write_async_safe): New.
15131         (tee_file_fputs): Rename to ...
15132         (tee_file::puts): ... this.  Adjust.
15133         (tee_file_isatty): Rename to ...
15134         (tee_file::isatty): ... this.  Adjust.
15135         * ui-file.h (struct obstack, struct ui_file): Don't
15136         forward-declare.
15137         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15138         (ui_file_write_ftype)
15139         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15140         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15141         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15142         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15143         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15144         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15145         (set_ui_file_fseek): Delete.
15146         (ui_file_data, ui_file_delete, ui_file_rewind)
15147         (struct ui_file): New.
15148         (ui_file_up): New.
15149         (class null_file): New.
15150         (null_stream): Declare.
15151         (ui_file_write_for_put, ui_file_put): Delete.
15152         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15153         Delete.
15154         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15155         (gdb_fopen, tee_file_new): Delete.
15156         (struct string_file): New.
15157         (struct stdio_file): New.
15158         (stdio_file_up): New.
15159         (struct stderr_file): New.
15160         (class tee_file): New.
15161         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15162         of a 'ui_file *'.  Adjust.
15163         * ui-out.h (class ui_out) <field_stream>: Likewise.
15164         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15165         (null_stream): Delete.
15166         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15167         Adjust.
15168         * utils.h (struct ui_file): Delete forward declaration..
15169         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15170         (error_stream): Take a 'string_file &' instead of a
15171         'ui_file *'.
15172         * varobj.c (varobj_value_get_print_value): Use string_file.
15173         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15174         * gdbarch.c: Regenerate.
15175
15176 2017-02-02  Pedro Alves  <palves@redhat.com>
15177
15178         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15179         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
15180         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
15181         Adjust to call gdb_print_insn instead of
15182         gdb_disassembler::print_insn.
15183         (dump_insns, do_mixed_source_and_assembly_deprecated)
15184         (do_mixed_source_and_assembly, do_assembly_only): Add back a
15185         'gdbarch' parameter.  Remove gdb_disassembler parameter.
15186         (gdb_disassembly): Don't allocate a gdb_disassembler here.
15187         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15188         declaration.
15189         (gdb_pretty_print_insn): Re-add declaration.
15190         * record-btrace.c (btrace_insn_history): Don't allocate a
15191         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
15192
15193 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
15194
15195         * disasm.h (gdb_disassembly): Remove file_string parameter.
15196         * disasm.c (gdb_disassembly): Likewise.
15197         * cli/cli-cmds.c (print_disassembly): Adapt.
15198         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15199         * stack.c (do_gdb_disassembly): Likewise.
15200
15201 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15202
15203         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15204         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15205         targets.  And if the implicit value is longer than needed, extract
15206         the first bytes instead of the "least significant" ones.
15207
15208 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15209
15210         * btrace.c (btrace_enable): Do not call btrace_add_pc for
15211         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15212         (btrace_fetch): Assert can_access_registers_ptid.
15213         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15214         validate_registers_access.
15215
15216 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15217
15218         * gdbthread.h (can_access_registers_ptid): New.
15219         * thread.c (can_access_registers_ptid): New.
15220
15221 2017-02-01  Pedro Alves  <palves@redhat.com>
15222
15223         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15224
15225 2017-01-31  Pedro Alves  <palves@redhat.com>
15226
15227         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15228         Fix typos.
15229
15230 2017-01-31  Pedro Alves  <palves@redhat.com>
15231
15232         * stack.c (print_frame_args): Remove local mem_fileopen stream,
15233         not used.
15234
15235 2017-01-31  Pedro Alves  <palves@redhat.com>
15236
15237         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15238
15239 2017-01-31  Pedro Alves  <palves@redhat.com>
15240
15241         * common/scoped_restore.h
15242         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15243         change the value's parameter type to T2.
15244         (make_scoped_restore): Likewise.
15245
15246 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15247             Richard Henderson  <rth@redhat.com>
15248
15249         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15250         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15251         GS_BASE for older kernels.
15252         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15253         GS_BASE for older kernels.
15254         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15255         and GS_BASE to the offset table.
15256         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15257         system register group.
15258         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15259         for older kernels.
15260         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15261         amd64 ABI.
15262         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15263         AMD64_GSBASE_REGNUM.
15264         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15265         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15266         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15267         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15268         i386/64bit-segments.xml in those rules.
15269         * features/i386/64bit-segments.xml: New file.
15270         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15271         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15272         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15273         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15274         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15275         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15276         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15277         * features/i386/amd64-avx-linux.c: Regenerated.
15278         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15279         * features/i386/amd64-avx-mpx.c: Regenerated.
15280         * features/i386/amd64-avx512-linux.c: Regenerated.
15281         * features/i386/amd64-linux.c: Regenerated.
15282         * features/i386/amd64-mpx-linux.c: Regenerated.
15283         * features/i386/i386-avx-mpx-linux.c: Regenerated.
15284         * features/i386/i386-avx-mpx.c: Regenerated.
15285         * features/i386/x32-avx-linux.c: Regenerated.
15286         * features/i386/x32-avx512-linux.c: Regenerated.
15287         * regformats/i386/amd64-avx-linux.dat: Regenerated.
15288         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15289         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15290         * regformats/i386/amd64-linux.dat: Regenerated.
15291         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15292         * regformats/i386/x32-avx-linux.dat: Regenerated.
15293         * regformats/i386/x32-avx512-linux.dat: Regenerated.
15294         * regformats/i386/x32-linux.dat: Regenerated.
15295
15296 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15297
15298         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15299         Set to AMD64_NUM_REGS.
15300
15301 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15302
15303         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15304         that checks validity of a register number.
15305
15306 2017-01-27  Kees Cook  <keescook@google.com>
15307
15308         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15309         fetch_fpregs if target has fpa registers.
15310         (arm_linux_store_inferior_registers): Call store_fpregs if target
15311         has fpa registers.
15312
15313 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15314
15315         * cris-tdep.c (cris_gdbarch_init): Remove check for
15316         info.byte_order and force it to BFD_ENDIAN_LITTLE.
15317
15318 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
15319
15320         * corelow.c (get_core_register_section): Check for regset
15321         existence before checking for REGSET_VARIABLE_SIZE.
15322
15323 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15324             Pedro Alves  <palves@redhat.com>
15325
15326         PR gdb/20939
15327         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15328         call memory_error, save memaddr instead.
15329         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15330         negative, cal memory_error.
15331         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15332
15333 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15334
15335         * disasm-selftests.c (memory_error_test): New function.
15336         (_initialize_disasm_selftests): Register memory_error_test.
15337
15338 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15339
15340         * Makefile.in (SFILES): Add disasm-selftests.c and
15341         selftest-arch.c.
15342         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15343         * disasm-selftests.c: New file.
15344         * selftest-arch.c: New file.
15345         * selftest-arch.h: New file.
15346
15347 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15348
15349         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15350         to bfd_arch_mep.  Don't return 0 if section is not
15351         found.  Call print_insn_mep.
15352
15353 2017-01-26  Pedro Alves  <palves@redhat.com>
15354             Yao Qi  <yao.qi@linaro.org>
15355
15356         * arm-tdep.c: Include "disasm.h".
15357         (gdb_print_insn_arm): Update code to get gdbarch.
15358         * disasm.c (dis_asm_read_memory): Change it to
15359         gdb_disassembler::dis_asm_read_memory.
15360         (dis_asm_memory_error): Likewise.
15361         (dis_asm_print_address): Likewise.
15362         (gdb_pretty_print_insn): Change it to
15363         gdb_disassembler::pretty_print_insn.
15364         (dump_insns): Add one argument gdb_disassemlber.  All
15365         callers updated.
15366         (do_mixed_source_and_assembly_deprecated): Likewise.
15367         (do_mixed_source_and_assembly): Likewise.
15368         (do_assembly_only): Likewise.
15369         (gdb_disassembler::gdb_disassembler): New.
15370         (gdb_disassembler::print_insn): New.
15371         * disasm.h (class gdb_disassembler): New.
15372         (gdb_pretty_print_insn): Remove declaration.
15373         (gdb_disassemble_info): Likewise.
15374         * guile/scm-disasm.c (class gdbscm_disassembler): New.
15375         (gdbscm_disasm_read_memory_worker): Update.
15376         (gdbscm_disasm_read_memory): Update.
15377         (gdbscm_disasm_memory_error): Remove.
15378         (gdbscm_disasm_print_address): Remove.
15379         (gdbscm_disassembler::gdbscm_disassembler): New.
15380         (gdbscm_print_insn_from_port): Update.
15381         * mips-tdep.c: Include disasm.h.
15382         (gdb_print_insn_mips): Update code to get gdbarch.
15383         * record-btrace.c (btrace_insn_history): Update.
15384         * spu-tdep.c: Include disasm.h.
15385         (struct spu_dis_asm_data): Remove.
15386         (struct spu_dis_asm_info): New.
15387         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15388         SPU id.
15389         (gdb_print_insn_spu): Cast disassemble_info to
15390         spu_dis_asm_info.
15391
15392 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15393
15394         * disasm.c (do_ui_file_delete): Delete.
15395         (gdb_insn_length): Move code creating stream to ...
15396         * utils.c (null_stream): ... here.  New function.
15397         * utils.h (null_stream): Declare.
15398
15399 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
15400
15401         * python/py-inferior.c (find_thread_object): Return directly
15402         from the loop.  Remove "found" variable.
15403
15404 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
15405
15406         GDB 7.12.1 released.
15407
15408 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15409
15410         * python/py-function.c (fnpy_call): Reorder declarations to have
15411         the gdbpy_enter object declared first.
15412         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15413
15414 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15415
15416         PR python/21068
15417         * python/python-internal.h (PyMem_RawMalloc): Define for
15418         Python < 3.4.
15419         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15420         PyMem_RawMalloc instead of PyMem_Malloc.
15421
15422 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
15423             Luis Machado  <lgustavo@codesourcery.com>
15424
15425         * NEWS (New commands): Mention flash-erase.
15426         (New MI commands): Mention target-flash-erase.
15427         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15428         command.
15429         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15430         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15431         * target.c (flash_erase_command): New function.
15432         (initialize_targets): Add new flash-erase command.
15433         * target.h (flash_erase_command): New declaration.
15434
15435 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
15436
15437         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15438         HAVE_SYS_PROCFS_H is defined.
15439
15440 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15441
15442         * remote.c (struct cached_reg): Change data into a pointer.
15443         * (stop_reply_dtr): Free data pointers before deleting vector.
15444         (process_stop_reply): Likewise.
15445         (remote_parse_stop_reply): Allocate space for data
15446
15447 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15448
15449         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15450         MAX_REGISTER_SIZE.
15451         (amd64_pseudo_register_read_value): Likewise.
15452         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15453         (store_register_using_P): Likewise.
15454         * regcache.c (regcache_xfer_part): Likewise.
15455
15456 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
15457
15458         Split real and pseudo registers.
15459         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15460         (sparc32_pseudo_regnum): New enum.
15461         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15462         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15463         (SPARC32_CP0_REGISTERS): New macro.
15464         (sparc32_pseudo_register_name): New function.
15465         (sparc32_register_name): Use sparc32_pseudo_register_name.
15466         (sparc32_pseudo_register_type): New function.
15467         (sparc32_register_type): Use sparc32_pseudo_register_type.
15468         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15469         pseudo register numbers.
15470         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15471         (SPARC64_CP0_REGISTERS): New macro.
15472         (sparc64_pseudo_register_name): New function.
15473         (sparc64_register_name): Use sparc64_pseudo_register_name.
15474         (sparc64_pseudo_register_type): New function.
15475         (sparc64_register_type): Use sparc64_pseudo_register_type.
15476         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15477         pseudo register numbers.
15478         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15479         sparc64_store_arguments): Handle pseudo register numbers.
15480
15481 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15482
15483         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15484         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15485         output.
15486         (getpkt_or_notif_sane_1): Likewise.
15487
15488 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15489
15490         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15491         of CC.  Pass "-x c++-header" instead of "-x c".
15492
15493 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15494
15495         * remote.c (remote_can_async_p): Update comment.
15496
15497 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15498
15499         * linux-nat.c (linux_nat_can_async_p): Update comment.
15500
15501 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15502
15503         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15504
15505 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15506
15507         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15508
15509 2017-01-10  Tom Tromey  <tom@tromey.com>
15510
15511         * python/py-type.c (typy_legacy_template_argument): Update.
15512         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15513         ~demangle_parse_info): Declare new members.
15514         (cp_demangled_name_to_comp): Return unique_ptr.
15515         (cp_demangled_name_parse_free)
15516         (make_cleanup_cp_demangled_name_parse_free)
15517         (cp_new_demangle_parse_info): Remove.
15518         * cp-support.c (do_demangled_name_parse_free_cleanup)
15519         (make_cleanup_cp_demangled_name_parse_free): Remove.
15520         (inspect_type, cp_canonicalize_string_full)
15521         (cp_canonicalize_string): Update.
15522         (mangled_name_to_comp): Change return type.
15523         (cp_class_name_from_physname, method_name_from_physname)
15524         (cp_func_name, cp_remove_params): Update.
15525         * cp-name-parser.y (demangle_parse_info): New constructor, from
15526         cp_new_demangle_parse_info.
15527         (~demangle_parse_info): New destructor, from
15528         cp_demangled_name_parse_free.
15529         (cp_merge_demangle_parse_infos): Update.
15530         (cp_demangled_name_to_comp): Change return type.
15531
15532 2017-01-10  Tom Tromey  <tom@tromey.com>
15533
15534         * top.c (prevent_dont_repeat): Change return type.
15535         * python/python.c (execute_gdb_command): Use std::string.
15536         Update.
15537         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15538         * command.h (prevent_dont_repeat): Change return type.
15539         * breakpoint.c (bpstat_do_actions_1): Update.
15540
15541 2017-01-10  Tom Tromey  <tom@tromey.com>
15542
15543         * value.h (scoped_value_mark::~scoped_value_mark): Call
15544         free_to_mark.
15545         (scoped_value_mark::free_to_mark): New method.
15546         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15547         scoped_value_mark.
15548
15549 2017-01-10  Tom Tromey  <tom@tromey.com>
15550
15551         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15552         (valpy_reference_value, valpy_const_value, valpy_get_address)
15553         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15554         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15555         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15556         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15557         scoped_value_mark.
15558         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15559         * value.h (scoped_value_mark): New class.
15560
15561 2017-01-10  Tom Tromey  <tom@tromey.com>
15562
15563         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15564         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15565         * psymtab.c (discard_psymtabs_upto): Remove.
15566         (make_cleanup_discard_psymtabs): Remove.
15567         (struct psymtab_state): Remove.
15568
15569 2017-01-10  Tom Tromey  <tom@tromey.com>
15570
15571         * record-full.c (record_full_save_cleanups): Remove.
15572         (record_full_save): Use gdb::unlinker.
15573         * gcore.c (do_bfd_delete_cleanup): Remove.
15574         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15575         cleanups.
15576         * dwarf2read.c (unlink_if_set): Remove.
15577         (write_psymtabs_to_index): Use gdb::unlinker.
15578         * common/gdb_unlinker.h: New file.
15579
15580 2017-01-10  Tom Tromey  <tom@tromey.com>
15581
15582         * windows-tdep.c (windows_xfer_shared_library): Update.
15583         * windows-nat.c (windows_make_so): Update.
15584         * utils.h (make_cleanup_bfd_unref): Remove.
15585         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15586         * symfile.h (symfile_bfd_open)
15587         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15588         * symfile.c (read_symbols, symbol_file_add)
15589         (separate_debug_file_exists): Update.
15590         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15591         (generic_load, reread_symbols): Update.
15592         * symfile-mem.c (symbol_file_add_from_memory): Update.
15593         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15594         (spu_symbol_file_add_from_memory): Update.
15595         * solist.h (struct target_so_ops) <bfd_open>: Return
15596         gdb_bfd_ref_ptr.
15597         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15598         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15599         gdb_bfd_ref_ptr.
15600         (solib_map_sections, reload_shared_libraries_1): Update.
15601         * solib-svr4.c (enable_break): Update.
15602         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15603         * solib-frv.c (enable_break2): Update.
15604         * solib-dsbt.c (enable_break): Update.
15605         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15606         gdb_bfd_ref_ptr.
15607         (darwin_solib_get_all_image_info_addr_at_init): Update.
15608         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15609         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15610         * record-full.c (record_full_save): Update.
15611         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15612         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15613         * minidebug.c (find_separate_debug_file_in_section): Return
15614         gdb_bfd_ref_ptr.
15615         * machoread.c (macho_add_oso_symfile): Change abfd to
15616         gdb_bfd_ref_ptr.
15617         (macho_symfile_read_all_oso): Update.
15618         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15619         (macho_symfile_read): Update.
15620         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15621         (jit_bfd_try_read_symtab): Update.
15622         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15623         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15624         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15625         gdb_bfd_ref_ptr.
15626         (gdb_bfd_ref_policy): New struct.
15627         (gdb_bfd_ref_ptr): New typedef.
15628         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15629         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15630         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15631         gdb_bfd_ref_ptr.
15632         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15633         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15634         (gcore_command): Update.
15635         * exec.c (exec_file_attach): Update.
15636         * elfread.c (elf_symfile_read): Update.
15637         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15638         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15639         (open_and_init_dwo_file): Update.
15640         (open_dwp_file): Return gdb_bfd_ref_ptr.
15641         (open_and_init_dwp_file): Update.
15642         * corelow.c (core_open): Update.
15643         * compile/compile-object-load.c (compile_object_load): Update.
15644         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15645         * coffread.c (coff_symfile_read): Update.
15646         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15647         gdb_bfd_ref_ptr.  Rename.
15648         (dump_bfd_file, restore_command): Update.
15649         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15650         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15651         (find_separate_debug_file_by_buildid): Update.
15652
15653 2017-01-10  Tom Tromey  <tom@tromey.com>
15654
15655         * common/gdb_ref_ptr.h: New file.
15656         * python/py-ref.h (struct gdbpy_ref_policy): New.
15657         (gdbpy_ref): Now a typedef.
15658
15659 2017-01-10  Tom Tromey  <tom@tromey.com>
15660
15661         * utils.h (make_cleanup_htab_delete): Don't declare.
15662         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15663         Remove.
15664         * linespec.c (decode_compound_collector): Add constructor,
15665         destructor.
15666         (lookup_prefix_sym): Remove cleanup.
15667         (symtab_collector): Add constructor, destructor.
15668         (collect_symtabs_from_filename): Remove cleanup.
15669         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15670         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15671         Use htab_up.
15672         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15673         * dwarf2read.c (dw2_expand_symtabs_matching)
15674         (dw2_map_symbol_filenames, dwarf_decode_macros)
15675         (write_psymtabs_to_index): Use htab_up.
15676         * dwarf2loc.c (func_verify_no_selftailcall)
15677         (call_site_find_chain_1, func_verify_no_selftailcall)
15678         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15679         std::vector, gdb::unique_xmalloc_ptr.
15680         (call_sitep): Remove typedef.
15681         (dwarf2_locexpr_baton_eval): Remove unused variable.
15682
15683 2017-01-10  Tom Tromey  <tom@tromey.com>
15684
15685         * python/python-internal.h (make_cleanup_py_decref)
15686         (make_cleanup_py_xdecref): Don't declare.
15687         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15688         (py_xdecref, make_cleanup_py_xdecref): Remove.
15689
15690 2017-01-10  Tom Tromey  <tom@tromey.com>
15691
15692         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15693         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15694
15695 2017-01-10  Tom Tromey  <tom@tromey.com>
15696
15697         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15698
15699 2017-01-10  Tom Tromey  <tom@tromey.com>
15700
15701         * python/py-utils.c (unicode_to_encoded_string)
15702         (python_string_to_target_string)
15703         (python_string_to_target_python_string)
15704         (python_string_to_host_string, gdbpy_obj_to_string)
15705         (get_addr_from_python): Use gdbpy_ref.
15706
15707 2017-01-10  Tom Tromey  <tom@tromey.com>
15708
15709         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15710         gdbpy_ref.
15711
15712 2017-01-10  Tom Tromey  <tom@tromey.com>
15713
15714         * python/python.c (eval_python_command, gdbpy_decode_line)
15715         (gdbpy_run_events, gdbpy_start_type_printers)
15716         (gdbpy_apply_type_printers): Use gdbpy_ref.
15717
15718 2017-01-10  Tom Tromey  <tom@tromey.com>
15719
15720         * python/py-param.c (get_doc_string, compute_enum_values): Use
15721         gdbpy_ref.
15722
15723 2017-01-10  Tom Tromey  <tom@tromey.com>
15724
15725         * python/py-inferior.c (find_thread_object, build_inferior_list):
15726         Use gdbpy_ref.
15727
15728 2017-01-10  Tom Tromey  <tom@tromey.com>
15729
15730         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15731
15732 2017-01-10  Tom Tromey  <tom@tromey.com>
15733
15734         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15735         gdbpy_ref.
15736
15737 2017-01-10  Tom Tromey  <tom@tromey.com>
15738
15739         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15740         extra incref.
15741         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15742         Use gdbpy_ref.
15743
15744 2017-01-10  Tom Tromey  <tom@tromey.com>
15745
15746         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15747         gdbpy_ref.
15748
15749 2017-01-10  Tom Tromey  <tom@tromey.com>
15750
15751         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15752         decref results of PyArg_ParseTupleAndKeywords.
15753
15754 2017-01-10  Tom Tromey  <tom@tromey.com>
15755
15756         * python/python.c (python_run_simple_file): Use
15757         unique_xmalloc_ptr, gdbpy_ref.
15758
15759 2017-01-10  Tom Tromey  <tom@tromey.com>
15760
15761         * python/py-prettyprint.c (print_stack_unless_memory_error)
15762         (print_string_repr, print_children): Use gdbpy_ref.
15763         (dummy_python_frame): New class.
15764         (dummy_python_frame::dummy_python_frame): Rename from
15765         push_dummy_python_frame.
15766         (py_restore_tstate): Remove.
15767
15768 2017-01-10  Tom Tromey  <tom@tromey.com>
15769
15770         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15771
15772 2017-01-10  Tom Tromey  <tom@tromey.com>
15773
15774         * python/python.c (ensure_python_env, restore_python_env):
15775         Remove.
15776         * python/python-internal.h (ensure_python_env): Don't declare.
15777         * varobj.h (varobj_ensure_python_env): Don't declare.
15778         * varobj.c (varobj_ensure_python_env): Remove.
15779
15780 2017-01-10  Tom Tromey  <tom@tromey.com>
15781
15782         * varobj.c (varobj_value_get_print_value): Use
15783         gdbpy_enter_varobj.
15784
15785 2017-01-10  Tom Tromey  <tom@tromey.com>
15786
15787         * python/py-prettyprint.c (print_string_repr, print_children):
15788         Update.
15789         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15790         of "encoding".
15791         * varobj.c (varobj_value_get_print_value): Update.
15792         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15793
15794 2017-01-10  Tom Tromey  <tom@tromey.com>
15795
15796         * varobj.c (varobj_get_display_hint)
15797         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15798         (varobj_set_visualizer, free_variable): Use
15799         gdbpy_enter_varobj.
15800
15801 2017-01-10  Tom Tromey  <tom@tromey.com>
15802
15803         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15804         (do_finish_initialization): New function.  Use gdbpy_ref.
15805         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15806         do_finish_initialization.
15807
15808 2017-01-10  Tom Tromey  <tom@tromey.com>
15809
15810         * python/py-param.c (get_set_value, get_show_value): Use
15811         gdbpy_enter, gdbpy_ref.
15812
15813 2017-01-10  Tom Tromey  <tom@tromey.com>
15814
15815         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15816
15817 2017-01-10  Tom Tromey  <tom@tromey.com>
15818
15819         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15820
15821 2017-01-10  Tom Tromey  <tom@tromey.com>
15822
15823         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15824         Use gdbpy_enter_varobj.
15825
15826 2017-01-10  Tom Tromey  <tom@tromey.com>
15827
15828         * varobj.c (gdbpy_enter_varobj): New constructor.
15829         * python/python-internal.h (gdbpy_enter_varobj): New class.
15830         * python/py-varobj.c (py_varobj_get_iterator): Use
15831         gdbpy_enter_varobj.
15832
15833 2017-01-10  Tom Tromey  <tom@tromey.com>
15834
15835         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15836         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15837         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15838         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15839         unique_xmalloc_ptr.
15840         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15841
15842 2017-01-10  Tom Tromey  <tom@tromey.com>
15843
15844         * python/py-xmethods.c (invoke_match_method): Use
15845         gdbpy_ref.
15846
15847 2017-01-10  Tom Tromey  <tom@tromey.com>
15848
15849         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15850         gdbpy_enter, gdbpy_ref.
15851
15852 2017-01-10  Tom Tromey  <tom@tromey.com>
15853
15854         * python/python.c (python_interactive_command): Use gdbpy_enter.
15855
15856 2017-01-10  Tom Tromey  <tom@tromey.com>
15857
15858         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15859         gdbpy_ref.
15860
15861 2017-01-10  Tom Tromey  <tom@tromey.com>
15862
15863         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15864         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15865
15866 2017-01-10  Tom Tromey  <tom@tromey.com>
15867
15868         * utils.h (htab_deleter): New struct.
15869         (htab_up): New typedef.
15870         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15871         gdbpy_enter, gdbpy_ref, htab_up.
15872
15873 2017-01-10  Tom Tromey  <tom@tromey.com>
15874
15875         * python/py-unwind.c (pending_frame_invalidate): Remove.
15876         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15877
15878 2017-01-10  Tom Tromey  <tom@tromey.com>
15879
15880         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15881         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15882
15883 2017-01-10  Tom Tromey  <tom@tromey.com>
15884
15885         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15886
15887 2017-01-10  Tom Tromey  <tom@tromey.com>
15888
15889         * python/python.c (gdbpy_eval_from_control_command)
15890         (gdbpy_source_script, gdbpy_run_events)
15891         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15892         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15893         gdbpy_enter.
15894
15895 2017-01-10  Tom Tromey  <tom@tromey.com>
15896
15897         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15898
15899 2017-01-10  Tom Tromey  <tom@tromey.com>
15900
15901         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15902
15903 2017-01-10  Tom Tromey  <tom@tromey.com>
15904
15905         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15906         (python_on_inferior_call_pre, python_on_inferior_call_post)
15907         (python_on_memory_change, python_on_register_change)
15908         (python_inferior_exit, python_new_objfile, add_thread_object)
15909         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15910
15911 2017-01-10  Tom Tromey  <tom@tromey.com>
15912
15913         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15914         (bpfinishpy_handle_exit): Use gdbpy_enter.
15915
15916 2017-01-10  Tom Tromey  <tom@tromey.com>
15917
15918         * python/py-cmd.c (cmdpy_destroyer)
15919         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15920         gdbpy_enter.
15921
15922 2017-01-10  Tom Tromey  <tom@tromey.com>
15923
15924         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15925         gdbpy_enter.
15926         (gdbpy_breakpoint_has_cond): Likewise.
15927
15928 2017-01-10  Tom Tromey  <tom@tromey.com>
15929
15930         * python/python.c (gdbpy_enter): New constructor.
15931         (~gdbpy_enter): New destructor.
15932         (restore_python_env, ensure_python_env): Rewrite.
15933         * python/python-internal.h (gdbpy_enter): New class.
15934
15935 2017-01-10  Tom Tromey  <tom@tromey.com>
15936
15937         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15938
15939 2017-01-10  Tom Tromey  <tom@tromey.com>
15940
15941         * python/py-value.c (value_has_field, get_field_flag)
15942         (get_field_type, valpy_getitem, convert_value_from_python): Use
15943         gdbpy_ref.
15944
15945 2017-01-10  Tom Tromey  <tom@tromey.com>
15946
15947         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15948         gdbpy_ref.
15949
15950 2017-01-10  Tom Tromey  <tom@tromey.com>
15951
15952         * python/py-prettyprint.c (search_pp_list)
15953         (find_pretty_printer_from_objfiles)
15954         (find_pretty_printer_from_progspace)
15955         (find_pretty_printer_from_gdb, find_pretty_printer)
15956         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15957         gdbpy_ref.
15958
15959 2017-01-10  Tom Tromey  <tom@tromey.com>
15960
15961         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15962
15963 2017-01-10  Tom Tromey  <tom@tromey.com>
15964
15965         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15966         (ltpy_get_all_source_lines): Use gdbpy_ref.
15967
15968 2017-01-10  Tom Tromey  <tom@tromey.com>
15969
15970         * python/py-framefilter.c (extract_sym, extract_value)
15971         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15972         gdbpy_ref.
15973
15974 2017-01-10  Tom Tromey  <tom@tromey.com>
15975
15976         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15977
15978 2017-01-10  Tom Tromey  <tom@tromey.com>
15979
15980         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15981
15982 2017-01-10  Tom Tromey  <tom@tromey.com>
15983
15984         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15985         gdbpy_ref.
15986
15987 2017-01-10  Tom Tromey  <tom@tromey.com>
15988
15989         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15990
15991 2017-01-10  Tom Tromey  <tom@tromey.com>
15992
15993         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15994         (typy_range): Use gdbpy_ref.
15995
15996 2017-01-10  Tom Tromey  <tom@tromey.com>
15997
15998         * python/py-threadevent.c (create_thread_event_object): Use
15999         gdbpy_ref.
16000         * python/py-stopevent.c (create_stop_event_object): Simplify.
16001         (emit_stop_event): Use gdbpy_ref.
16002         * python/py-signalevent.c (create_signal_event_object): Use
16003         gdbpy_ref.
16004         * python/py-newobjfileevent.c (create_new_objfile_event_object)
16005         (emit_new_objfile_event, create_clear_objfiles_event_object)
16006         (emit_clear_objfiles_event): Use gdbpy_ref.
16007         * python/py-infevents.c (create_inferior_call_event_object)
16008         (create_register_changed_event_object)
16009         (create_memory_changed_event_object, emit_inferior_call_event)
16010         (emit_memory_changed_event, emit_register_changed_event): Use
16011         gdbpy_ref.
16012         * python/py-exitedevent.c (create_exited_event_object)
16013         (emit_exited_event): Use gdbpy_ref.
16014         * python/py-event.h (evpy_emit_event): Remove
16015         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16016         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16017         * python/py-continueevent.c (emit_continue_event): Use
16018         gdbpy_ref.
16019         * python/py-breakpoint.c (gdbpy_breakpoint_created)
16020         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16021         gdbpy_ref.
16022         * python/py-bpevent.c (create_breakpoint_event_object): Use
16023         gdbpy_ref.
16024
16025 2017-01-10  Tom Tromey  <tom@tromey.com>
16026
16027         * python/py-ref.h: New file.
16028
16029 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
16030
16031         * cli-out.c (cli_ui_out::do_redirect): Change return type to
16032         void.
16033         * cli-out.h (cli_ui_out::do_redirect): Likewise.
16034         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16035         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16036         * ui-out.c (ui_out::redirect): Likewise.
16037         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16038         * cli/cli-logging.c (set_logging_redirect): Update call site of
16039         ui_out::redirect.
16040         (handle_redirections): Likewise.
16041         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16042         * top.c (execute_command_to_string): Likewise.
16043         * utils.c (do_ui_out_redirect_pop): Likewise.
16044
16045 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
16046
16047         * stack.c (_initialize_stack): Update "frame" command help message.
16048
16049 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
16050
16051         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16052
16053 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16054
16055         * x86-linux-nat.h: Include gdb_proc_service.h.
16056
16057 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16058
16059         * ser-base.h: Include serial.h.
16060
16061 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16062
16063         * ppc-linux-tdep.h: Include ppc-tdep.h.
16064
16065 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16066
16067         * nat/amd64-linux-siginfo.h: Include signal.h.
16068
16069 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16070
16071         * nat/aarch64-linux-hw-point.h: Include break-common.h.
16072
16073 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16074
16075         * mi/mi-parse.h: Include mi-cmds.h.
16076
16077 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16078
16079         * inf-loop.c: Don't include "target.h".
16080         * inf-loop.h: Include it here.
16081
16082 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16083
16084         * dfp.h: Include "dboulest.h" and "expression.h".
16085
16086 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16087
16088         * ax-gdb.h: Include "ax.h".
16089
16090 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16091
16092         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16093         with nat/gdb_ptrace.h.
16094
16095 2017-01-05  Yao Qi  <yao.qi@linaro.org>
16096
16097         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16098         new line.
16099         (mips64_fbsd_sigframe_init): Likewise.
16100
16101 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16102
16103         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16104         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16105
16106 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16107
16108         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16109         * NEWS: Mention new FreeBSD/mips native configuration.
16110         * config/mips/fbsd.mh: New file.
16111         * configure.host: Add mips*-*-freebsd*.
16112         * mips-fbsd-nat.c: New file.
16113
16114 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16115
16116         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16117         (ALLDEPFILES): Add mips-fbsd-tdep.c.
16118         * NEWS: Mention new FreeBSD/mips target.
16119         * configure.tgt: Add mips*-*-freebsd*.
16120         * mips-fbsd-tdep.c: New file.
16121         * mips-fbsd-tdep.h: New file.
16122
16123 2017-01-04  Yao Qi  <yao.qi@linaro.org>
16124
16125         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16126         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16127
16128 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
16129
16130         Update copyright year range in all GDB files.
16131
16132 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
16133
16134         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
16135
16136 For older changes see ChangeLog-2016.
16137 \f
16138 Local Variables:
16139 mode: change-log
16140 left-margin: 8
16141 fill-column: 74
16142 version-control: never
16143 coding: utf-8
16144 End: