Make varobj::children an std::vector
[external/binutils.git] / gdb / ChangeLog
1 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
2
3         * varobj.h (struct varobj) <parent>: Remove const.
4         <children>: Change type to std::vector.
5         (varobj_list_children): Return std::vector const reference.
6         (varobj_restrict_range): Change parameter type to std::vector
7         const reference.
8         * varobj.c (varobj_has_more): Adjust.
9         (varobj_restrict_range): Change parameter type to std::vector
10         const reference and adjust.
11         (install_dynamic_child): Adjust.
12         (update_dynamic_varobj_children): Adjust.
13         (varobj_list_children): Return std::vector const reference and
14         adjust.
15         (varobj_add_child): Adjust.
16         (update_type_if_necessary): Adjust.
17         (varobj_update): Adjust.
18         (delete_variable_1): Adjust.
19         * ada-varobj.c (ada_value_has_mutated): Adjust.
20         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
21
22 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
23
24         * varobj.h (struct varobj): Add constructor and destructor,
25         initialize fields.
26         * varobj.c (struct varobj_root): Initialize fields.
27         (struct varobj_dynamic): Initialize fields.
28         (varobj_create): Use unique_ptr instead of cleanup.  Create
29         varobj with new instead of new_root_variable.
30         (delete_variable_1): Free variable with delete instead of
31         free_variable.
32         (create_child_with_value): Create variable with new instead of
33         new_variable.
34         (varobj::varobj): New.
35         (varobj::~varobj): New (body mostly coming from free_variable).
36         (new_variable): Remove.
37         (free_variable): Remove.
38         (do_free_variable_cleanup): Remove.
39         (make_cleanup_free_variable): Remove.
40
41 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
42
43         * core-regset.c: Remove file.
44         * Makefile.in (ALLDEPFILES): Remove core-regset.c.
45
46 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
47
48         * NEWS: Document use of GNU MPFR.
49         * README: Likewise.
50
51         * Makefile.in (LIBMPFR): Add define.
52         (CLIBS): Add $(LIBMPFR).
53         * configure.ac: Add --with-mpfr configure option.
54         * configure: Regenerate.
55         * config.in: Regenerate.
56
57         * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
58         (class mpfr_float_ops): New type.
59         (mpfr_float_ops::from_target): Two new overloaded functions.
60         (mpfr_float_ops::to_target): Likewise.
61         (mpfr_float_ops::to_string): New function.
62         (mpfr_float_ops::from_string): Likewise.
63         (mpfr_float_ops::to_longest): Likewise.
64         (mpfr_float_ops::from_longest): Likewise.
65         (mpfr_float_ops::from_ulongest): Likewise.
66         (mpfr_float_ops::to_host_double): Likewise.
67         (mpfr_float_ops::from_host_double): Likewise.
68         (mpfr_float_ops::convert): Likewise.
69         (mpfr_float_ops::binop): Likewise.
70         (mpfr_float_ops::compare): Likewise.
71         (get_target_float_ops): Use mpfr_float_ops if available.
72
73 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
74
75         * target-float.c: Do not include <math.h>.
76         Include <cmath> and <limits>.
77         (DOUBLEST): Do not define.
78         (class target_float_ops): New type.
79         (class host_float_ops): New templated type.
80         (class decimal_float_ops): New type.
81
82         (floatformat_to_doublest): Rename to ...
83         (host_float_ops<T>::from_target): ... this.  Use template type T
84         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
85         (host_float_ops<T>::from_target): New overload using a type argument.
86         (floatformat_from_doublest): Rename to ...
87         (host_float_ops<T>::to_target): ... this.  Use template type T
88         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
89         (host_float_ops<T>::to_target): New overload using a type argument.
90         (floatformat_printf_format): New function.
91         (struct printf_length_modifier): New templated type.
92         (floatformat_to_string): Rename to ...
93         (host_float_ops<T>::to_string): ... this.  Use type instead of
94         floatformat argument.  Use floatformat_printf_format and
95         printf_length_modifier.  Remove special handling of invalid numbers,
96         infinities and NaN (moved to target_float_to_string).
97         (struct scanf_length_modifier): New templated type.
98         (floatformat_from_string): Rename to ...
99         (host_float_ops<T>::from_string): ... this.  Use type instead of
100         floatformat argument.  Use scanf_length_modifier.
101         (floatformat_to_longest): Rename to ...
102         (host_float_ops<T>::to_longest): ... this.  Use type instead of
103         floatformat argument.  Handle out-of-range values deterministically.
104         (floatformat_from_longest): Rename to ...
105         (host_float_ops<T>::from_longest): ... this.  Use type instead of
106         floatformat argument.
107         (floatformat_from_ulongest): Rename to ...
108         (host_float_ops<T>::from_ulongest): ... this.  Use type instead of
109         floatformat argument.
110         (floatformat_to_host_double): Rename to ...
111         (host_float_ops<T>::to_host_double): ... this.  Use type instead of
112         floatformat argument.
113         (floatformat_from_host_double): Rename to ...
114         (host_float_ops<T>::from_host_double): ... this.  Use type instead of
115         floatformat argument.
116         (floatformat_convert): Rename to ...
117         (host_float_ops<T>::convert): ... this.  Use type instead of
118         floatformat arguments.  Remove handling of no-op conversions.
119         (floatformat_binop): Rename to ...
120         (host_float_ops<T>::binop): ... this.  Use type instead of
121         floatformat arguments.
122         (floatformat_compare): Rename to ...
123         (host_float_ops<T>::compare): ... this.  Use type instead of
124         floatformat arguments.
125
126         (match_endianness): Use type instead of length/byte_order arguments.
127         (set_decnumber_context): Likewise.
128         (decimal_from_number): Likewise.  Update calls.
129         (decimal_to_number): Likewise.
130         (decimal_is_zero): Likewise.  Update calls.  Move to earlier in file.
131         (decimal_float_ops::to_host_double): New dummy function.
132         (decimal_float_ops::from_host_double): Likewise.
133         (decimal_to_string): Rename to ...
134         (decimal_float_ops::to_string): ... this.  Use type instead of
135         length/byte_order arguments.  Update calls.
136         (decimal_from_string): Rename to ...
137         (decimal_float_ops::from_string): ... this.  Use type instead of
138         length/byte_order arguments.  Update calls.
139         (decimal_from_longest): Rename to ...
140         (decimal_float_ops::from_longest): ... this.  Use type instead of
141         length/byte_order arguments.  Update calls.
142         (decimal_from_ulongest): Rename to ...
143         (decimal_float_ops::from_ulongest): ... this.  Use type instead of
144         length/byte_order arguments.  Update calls.
145         (decimal_to_longest): Rename to ...
146         (decimal_float_ops::to_longest): ... this.  Use type instead of
147         length/byte_order arguments.  Update calls.
148         (decimal_binop): Rename to ...
149         (decimal_float_ops::binop): ... this.  Use type instead of
150         length/byte_order arguments.  Update calls.
151         (decimal_compare): Rename to ...
152         (decimal_float_ops::compare): ... this.  Use type instead of
153         length/byte_order arguments.  Update calls.
154         (decimal_convert): Rename to ...
155         (decimal_float_ops::convert): ... this.  Use type instead of
156         length/byte_order arguments.  Update calls.
157
158         (target_float_same_category_p): New function.
159         (target_float_same_format_p): Likewise.
160         (target_float_format_length): Likewise.
161         (enum target_float_ops_kind): New type.
162         (get_target_float_ops_kind): New function.
163         (get_target_float_ops): Three new overloaded functions.
164
165         (target_float_is_zero): Update call.
166         (target_float_to_string): Add special handling of invalid numbers,
167         infinities and NaN (moved from floatformat_to_string).  Use
168         target_float_ops callback.
169         (target_float_from_string): Use target_float_ops callback.
170         (target_float_to_longest): Likewise.
171         (target_float_from_longest): Likewise.
172         (target_float_from_ulongest): Likewise.
173         (target_float_to_host_double): Likewise.
174         (target_float_from_host_double): Likewise.
175         (target_float_convert): Add special case for no-op conversions.
176         Use target_float_ops callback.
177         (target_float_binop): Use target_float_ops callback.
178         (target_float_compare): Likewise.
179
180 2017-11-22  Yao Qi  <yao.qi@linaro.org>
181
182         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
183
184 2017-11-22  Yao Qi  <yao.qi@linaro.org>
185
186         * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
187         * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
188
189 2017-11-21  Jerome Guitton  <guitton@adacore.com>
190
191         * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
192         with event ptid from the lower layer before doing the
193         ravenscar-specific update.
194
195 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
196
197         * ravenscar-thread.c (is_ravenscar_task): Also verify that
198         the ptid's TID is nonzero.
199
200 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
201
202         * ada-lang.h (ada_get_tcb_types_info): Add declaration.
203         * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
204         Make non-static.  Change return type to char *.  Adjust code
205         accordingly.  Rewrite the function's documentation.
206         (read_atcb): Adjust call to get_tcb_types_info accordingly.
207         * ravenscar-thread.c (ravenscar_inferior_created): Check that
208         we have enough debugging information in the runtime to support
209         Ada task debugging before we enable the ravenscar-thread layer.
210
211 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
212
213         * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
214         * ada-tasks.c (ada_get_task_info_from_ptid): New function.
215         * ravenscar-thread.c: Add into comment.
216         (base_magic_null_ptid): Delete.
217         (base_ptid): Change documentation.
218         (ravenscar_active_task): Renames ravenscar_running_thread.
219         All callers updated throughout.
220         (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
221         (ravenscar_task_is_currently_active): Likewise.
222         (get_base_thread_from_ravenscar_task): Ditto.
223         (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
224         (ravenscar_runtime_initialized): Likewise.
225         (get_running_thread_id): Add new parameter "cpu".  Adjust
226         implementation to handle this new parameter.
227         (ravenscar_fetch_registers): Small adjustment to use
228         is_ravenscar_task and ravenscar_task_is_currently_active in
229         order to decide whether to use the target beneath or this
230         module's arch_ops.
231         (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
232         (ravenscar_stopped_by_sw_breakpoint): Use
233         get_base_thread_from_ravenscar_task to get the underlying
234         thread, rather than using base_ptid.
235         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
236         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
237         Likewise.
238         (ravenscar_inferior_created): Do not set base_magic_null_ptid.
239
240 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
241
242         * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
243         * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
244         (get_tcb_types_info): Set fieldnos.base_cpu.
245         (read_atcb): Set task_info->base_cpu.
246         (info_task): Print "Base CPU" info if set by runtime.
247
248 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
249
250         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
251         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
252         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
253         New functions.
254         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
255         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
256         to_stopped_data_address and to_core_of_thread fields of
257         ravenscar_ops.
258
259 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
260
261         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
262         (struct gdbarch_tdep): New member long_double_abi.
263         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
264         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
265         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
266         format depending on long_double_abi tdep member.
267         (ppc_floatformat_for_type): Handle __ibm128 type.
268
269 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
270
271         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
272
273 2017-11-21  Pedro Alves  <palves@redhat.com>
274
275         * dwarf2read.c (mapped_index::find_name_components_bounds)
276         <completion mode, upper bound>: Use std::lower_bound instead of
277         std::upper_bound.
278         (test_mapped_index_find_name_component_bounds): Remove incorrect
279         "t1_fund" from expected symbols.
280
281 2017-11-21  Pedro Alves  <palves@redhat.com>
282
283         * dwarf2read.c (mapped_index::name_components_casing): New field.
284         (mapped_index) <build_name_components,
285         find_name_components_bounds): Declare new methods.
286         (mapped_index::find_name_components_bounds)
287         (mapped_index::build_name_components): New methods, factored out
288         from dw2_expand_symtabs_matching_symbol.
289         (check_find_bounds_finds)
290         (test_mapped_index_find_name_component_bounds): New.
291         (run_test): Rename to ...
292         (test_dw2_expand_symtabs_matching_symbol): ... this.
293         (run_test): Reimplement.
294
295 2017-11-21  Pedro Alves  <palves@redhat.com>
296
297         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
298         (symbol_end): Use cp_ident_is_alnum.
299         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
300         * dwarf2read.c (make_sort_after_prefix_name): New function.
301         (dw2_expand_symtabs_matching_symbol): Use it.
302         (test_symbols): Add more symbols.
303         (run_test): Add tests.
304
305 2017-11-17  Tom Tromey  <tom@tromey.com>
306
307         * symtab.h (enum symbol_subclass_kind): New.
308         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
309         Remove.
310         <subclass>: New member.
311         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
312         * rust-lang.c (rust_get_trait_object_pointer): Update.
313         * dwarf2read.c (read_func_scope): Update.
314         (read_variable): Update.
315
316 2017-11-17  Tom Tromey  <tom@tromey.com>
317
318         * dwarf2read.c (read_func_scope): Update.
319         * symtab.h (struct template_symbol): Derive from symbol.
320         <base>: Remove.
321
322 2017-11-17  Tom Tromey  <tom@tromey.com>
323
324         * symtab.h (struct symbol) <is_rust_vtable>: New member.
325         (struct rust_vtable_symbol): New.
326         (find_symbol_at_address): Declare.
327         * symtab.c (find_symbol_at_address): New function.
328         * symfile.h (struct quick_symbol_functions)
329         <find_compunit_symtab_by_address>: New member.
330         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
331         function.
332         (debug_sym_quick_functions): Link to
333         debug_qf_find_compunit_symtab_by_address.
334         * rust-lang.c (rust_get_trait_object_pointer): New function.
335         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
336         rust_get_trait_object_pointer.
337         * psymtab.c (psym_relocate): Clear psymbol_map.
338         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
339         functions.
340         (psym_functions): Link to psym_find_compunit_symtab_by_address.
341         * objfiles.h (struct objfile) <psymbol_map>: New member.
342         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
343         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
344         (rust_containing_type, read_variable): New functions.
345
346 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
347
348         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
349
350 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
351
352         * common/filestuff.c: Include <algorithm>.
353         (open_fds): Change type to std::vector<int>.
354         (do_mark_open_fd): Adjust.
355         (unmark_fd_no_cloexec): Adjust.
356         (do_close): Adjust.
357
358 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
359
360         * breakpoint.c (output_thread_groups): Take an std::vector.
361         (print_one_breakpoint_location): Adjust.
362
363 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
364
365         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
366         (ada_evaluate_subexp_for_cast): New function.
367         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
368         ada_evaluate_subexp_for_cast.
369         (ada_evaluate_subexp) <nosideret>: Replace code by call to
370         eval_skip_value.
371         * eval.c (evaluate_var_value): Make non-static.
372         (evaluate_var_msym_value, eval_skip_value): Likewise.
373         * value.h (evaluate_var_value, evaluate_var_msym_value)
374         (eval_skip_value): Declare.
375
376 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
377
378         * ada-lang.c (ada_value_cast): Remove parameter "noside".
379         Update all callers.
380
381 2017-11-16  Pedro Alves  <palves@redhat.com>
382
383         * python/py-unwind.c (pyuw_sniffer): Translate
384         PyExc_KeyboardInterrupt to a GDB Quit exception.
385
386 2017-11-16  Pedro Alves  <palves@redhat.com>
387
388         * infrun.c (resume_cleanups): Delete.
389         (resume): No longer install a resume_cleanups cleanup nor call
390         QUIT.
391         (proceed): Pass the terminal to the inferior.
392         (keep_going_pass_signal): No longer install a resume_cleanups
393         cleanup.
394
395 2017-11-16  Pedro Alves  <palves@redhat.com>
396
397         * inf-loop.c (inferior_event_handler): Don't swallow the exception
398         if the prompt is blocked.
399
400 2017-11-16  Pedro Alves  <palves@redhat.com>
401
402         * breakpoint.c (insert_bp_location): Replace bp_err and
403         bp_err_message locals by a gdb_exception local.
404
405 2017-11-16  Pedro Alves  <palves@redhat.com>
406
407         * inflow.c (scoped_ignore_sigttou): New class.
408         (child_terminal_ours_1, new_tty): Use it.
409
410 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
411
412         * target-float.c (decimal_from_number): Add byte_order argument and
413         call match_endianness.  Error if unknown floating-point type.
414         (decimal_to_number): Add byte_order argument and call match_endianness.
415         (decimal_from_longest): Update call.  Do not call match_endianness.
416         (decimal_from_ulongest): Likewise.
417         (decimal_binop): Likewise.
418         (decimal_is_zero): Likewise.
419         (decimal_compare): Likewise.
420         (decimal_convert): Likewise.
421
422 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
423
424         * python/python.c (gdbpy_rbreak): New function.
425         * NEWS: Document Python rbreak feature.
426
427 2017-11-16  Yao Qi  <yao.qi@linaro.org>
428
429         * features/tic6x-c62x.xml: Remove.
430         * features/tic6x-c64x.xml: Remove.
431         * features/tic6x-c64xp.xml: Remove.
432
433 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
434
435         * symtab.h: Include <array>.
436
437 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
438
439         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
440         (bsd_kvm_proc_cmd): Likewise.
441
442 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
443
444         * tui/tui-win.c (window_name_completer): Replace VEC with
445         std::vector.
446
447 2017-11-15  Andrew Cagney  <cagney@gnu.org>
448
449         * MAINTAINERS: Remove no-longer applicable entries.
450
451 2017-11-15  Andrew Cagney  <cagney@gnu.org>
452
453         * MAINTAINERS: Move self to Past Maintainers.
454
455 2017-11-15  Yao Qi  <yao.qi@linaro.org>
456
457         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
458         * features/nios2-linux.c: Remove.
459         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
460         initialize_tdesc_nios2_linux.
461
462 2017-11-15  Yao Qi  <yao.qi@linaro.org>
463
464         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
465         M68HC11_LAST_HARD_REG + 1.
466
467 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
468
469         PR gdb/22388
470         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
471         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
472         Return TARGET_XFER_EOF if size of returned data is 0.
473
474 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
475
476         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
477         memory-map-selftests.c.
478         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
479         * memory-map.c (memory_map_start_memory): Fix computation of hi
480         address.
481         * unittests/memory-map-selftests.c: New file.
482
483 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
484
485         * ada-lang.c: Fix some typos in the general command documenting
486         how Ada expressions are being evaluated and how their result
487         is printed.
488
489 2017-11-09  Tom Tromey  <tom@tromey.com>
490
491         * psymtab.c (psymbol_hash): Do not hash string contents.
492         (psymbol_compare): Add comment.
493
494 2017-11-09  Tom Tromey  <tom@tromey.com>
495
496         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
497
498 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
499
500         * ada-exp.y (write_var_from_sym): Remove parameter
501         "orig_left_context".  Update all callers.
502
503 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
504
505         * tracepoint.h (class collection_list) <stringify>: Return
506         std::vector<std::string>.
507         (encode_actions_rsp): Change parameters to
508         std::vector<std::string> *.
509         * tracepoint.c (collection_list::stringify): Return
510         std::vector<std::string> and adjust accordingly.
511         (encode_actions_rsp): Changee parameters to
512         std::vector<std::string> and adjust accordingly.
513         * remote.c (free_actions_list),
514         free_actions_list_cleanup_wrapper): Remove.
515         (remote_download_tracepoint): Adjust to std::vector.
516
517 2017-11-08  Tom Tromey  <tom@tromey.com>
518
519         * dwarf2read.c (symbolp): Remove typedef.
520         (read_func_scope): Use std::vector.
521         (process_structure_scope): Use std::vector.
522
523 2017-11-08  Pedro Alves  <palves@redhat.com>
524
525         * ada-lang.c (ada_make_symbol_completion_list): Use
526         completion_skip_symbol.
527         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
528         (symbol_is_function_or_method(symbol*)): New.
529         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
530         completion_skip_symbol.
531         (default_collect_symbol_completion_matches_break_on): Use
532         completion_skip_symbol.  Pass down mode.
533         (collect_file_symbol_completion_matches): Pass down mode.
534         * symtab.h (symbol_is_function_or_method): New declarations.
535         (completion_skip_symbol): New template function.
536
537 2017-11-08  Pedro Alves  <palves@redhat.com>
538
539         * linespec.c (iterate_over_all_matching_symtabs): Add
540         search_domain parameter.  Pass it down to expand_symtabs_matching.
541         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
542         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
543         search_domain.
544         (add_all_symbol_names_from_pspace): Add search_domain parameter.
545         Pass it down.
546         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
547         symbols.
548         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
549         it down.
550
551 2017-11-08  Pedro Alves  <palves@redhat.com>
552
553         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
554         text_len locals and don't pass them down.
555         * symtab.c (completion_list_add_name): Remove
556         sym_text/sym_text_len parameters and adjust.
557         (completion_list_add_symbol, completion_list_add_msymbol)
558         (completion_list_objc_symbol, completion_list_add_fields)
559         (add_symtab_completions): Likewise.
560         (default_collect_symbol_completion_matches_break_on)
561         (collect_file_symbol_completion_matches): Remove sym_text_len
562         local and don't pass it down.
563         * symtab.h (completion_list_add_name): Remove
564         sym_text/sym_text_len parameters.
565
566 2017-11-08  Pedro Alves  <palves@redhat.com>
567
568         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
569         unittests/lookup_name_info-selftests.c.
570         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
571         * cp-support.c: Include "selftest.h".
572         (cp_remove_params_1): Rename from cp_remove_params.  Add
573         'require_param' parameter, and handle it.
574         (cp_remove_params): Reimplement.
575         (cp_remove_params_if_any): New.
576         (selftests::quote): New.
577         (selftests::check_remove_params): New.
578         (selftests::test_cp_remove_params): New.
579         (_initialize_cp_support): Install
580         selftests::test_cp_remove_params.
581         * cp-support.h (cp_remove_params_if_any): Declare.
582         * dwarf2read.c :Include "selftest.h".
583         (dw2_expand_symtabs_matching_symbol): Use
584         lookup_name_info::make_ignore_params.
585         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
586         (selftests::dw2_expand_symtabs_matching::string_or_null)
587         (selftests::dw2_expand_symtabs_matching::check_match)
588         (selftests::dw2_expand_symtabs_matching::test_symbols)
589         (selftests::dw2_expand_symtabs_matching::run_test): New.
590         (_initialize_dwarf2_read): Register
591         selftests::dw2_expand_symtabs_matching::run_test.
592         * psymtab.c (psym_expand_symtabs_matching): Use
593         lookup_name_info::make_ignore_params.
594         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
595         If the lookup name wants to ignore parameters, strip them.
596         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
597         code handling '('.
598         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
599         (default_collect_symbol_completion_matches_break_on): Don't try to
600         strip parameters.
601         * symtab.h (lookup_name_info::lookup_name_info): Add
602         'ignore_parameters' parameter.
603         (lookup_name_info::ignore_parameters)
604         (lookup_name_info::make_ignore_params): New methods.
605         (lookup_name_info::m_ignore_parameters): New field.
606         * unittests/lookup_name_info-selftests.c: New file.
607
608 2017-11-08  Pedro Alves  <palves@redhat.com>
609
610         * dwarf2read.c (dw2_expand_marked_cus)
611         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
612         (dw2_expand_symtabs_matching): Move further below.
613         (dw2_expand_marked_cus): Reindent.
614
615 2017-11-08  Pedro Alves  <palves@redhat.com>
616
617         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
618         (struct name_component): New.
619         (mapped_index::name_components): New field.
620         (mapped_index::symbol_name_at): New method.
621         (dwarf2_read_index): Call mapped_index ctor.
622         (dw2_map_matching_symbols): Add comment about name_components
623         table.
624         (dw2_expand_symtabs_matching): Factor part to...
625         (dw2_expand_symtabs_matching_symbol): ... this new function.
626         Build name components table, and lookup symbols in it before
627         calling the name matcher.
628         (dw2_expand_marked_cus): New, factored out from
629         dw2_expand_symtabs_matching.
630         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
631
632 2017-11-08   Pedro Alves  <palves@redhat.com>
633
634         * ada-lang.c (ada_encode): Rename to ..
635         (ada_encode_1): ... this.  Add throw_errors parameter and handle
636         it.
637         (ada_encode): Reimplement.
638         (match_name): Delete, folded into full_name.
639         (resolve_subexp): No longer pass the encoded name to
640         ada_lookup_symbol_list.
641         (should_use_wild_match): Delete.
642         (name_match_type_from_name): New.
643         (ada_lookup_simple_minsym): Use lookup_name_info and the
644         language's symbol_name_matcher_ftype.
645         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
646         (ada_add_block_renamings): Adjust to use lookup_name_info.
647         (ada_lookup_name): New.
648         (add_nonlocal_symbols, ada_add_all_symbols)
649         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
650         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
651         (ada_name_for_lookup): Delete.
652         (ada_lookup_encoded_symbol): Construct a verbatim name.
653         (wild_match): Reverse sense of return type.  Use bool.
654         (full_match): Reverse sense of return type.  Inline bits of old
655         match_name here.
656         (ada_add_block_symbols): Adjust to use lookup_name_info.
657         (symbol_completion_match): Delete, folded into...
658         (ada_lookup_name_info::matches): ... .this new method.
659         (symbol_completion_add): Delete.
660         (ada_collect_symbol_completion_matches): Add name_match_type
661         parameter.  Adjust to use lookup_name_info and
662         completion_list_add_name.
663         (get_var_value, ada_add_global_exceptions): Adjust to use
664         lookup_name_info.
665         (ada_get_symbol_name_cmp): Delete.
666         (do_wild_match, do_full_match): New functions.
667         (ada_lookup_name_info::ada_lookup_name_info): New method.
668         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
669         functions.
670         (ada_language_defn): Install ada_get_symbol_name_matcher.
671         * ada-lex.l (processId): If name starts with '<', copy it
672         verbatim.
673         * block.c (block_iter_match_step, block_iter_match_first)
674         (block_iter_match_next, block_lookup_symbol)
675         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
676         lookup_name_info.
677         * block.h (block_iter_match_first, block_iter_match_next)
678         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
679         * c-lang.c (c_language_defn, cplus_language_defn)
680         (asm_language_defn, minimal_language_defn): Adjust comments to
681         refer to la_get_symbol_name_matcher.
682         * completer.c (complete_files_symbols)
683         (collect_explicit_location_matches, symbol_completer): Pass a
684         symbol_name_match_type down.
685         * completer.h (class completion_match, completion_match_result):
686         New classes.
687         (completion_tracker::reset_completion_match_result): New method.
688         (completion_tracker::m_completion_match_result): New field.
689         * cp-support.c (make_symbol_overload_list_block): Adjust to use
690         lookup_name_info.
691         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
692         functions.
693         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
694         * d-lang.c: Adjust comments to refer to
695         la_get_symbol_name_matcher.
696         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
697         Adjust to use lookup_name_info.
698         (dict_iter_match_first, dict_iter_match_next)
699         (iter_match_first_hashed, iter_match_next_hashed)
700         (iter_match_first_linear, iter_match_next_linear): Adjust to work
701         with a lookup_name_info.
702         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
703         Likewise.
704         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
705         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
706         (gdb_index_symbol_name_matcher): New class.
707         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
708         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
709         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
710         with a symbol_name_match_type.
711         (f_language_defn): Adjust comments to refer to
712         la_get_symbol_name_matcher.
713         * go-lang.c (go_language_defn): Adjust comments to refer to
714         la_get_symbol_name_matcher.
715         * language.c (default_symbol_name_matcher)
716         (language_get_symbol_name_matcher): New functions.
717         (unknown_language_defn, auto_language_defn): Adjust comments to
718         refer to la_get_symbol_name_matcher.
719         * language.h (symbol_name_cmp_ftype): Delete.
720         (language_defn) <la_collect_symbol_completion_matches>: Add match
721         type parameter.
722         <la_get_symbol_name_cmp>: Delete field.
723         <la_get_symbol_name_matcher>: New field.
724         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
725         (default_symbol_name_matcher, language_get_symbol_name_matcher):
726         Declare.
727         * linespec.c (iterate_over_all_matching_symtabs)
728         (iterate_over_file_blocks): Adjust to use lookup_name_info.
729         (find_methods): Add language parameter, and use lookup_name_info
730         and the language's symbol_name_matcher_ftype.
731         (linespec_complete_function): Adjust.
732         (lookup_prefix_sym): Use lookup_name_info.
733         (add_all_symbol_names_from_pspace): Adjust.
734         (find_superclass_methods): Add language parameter and pass it
735         down.
736         (find_method): Pass symbol language down.
737         (find_linespec_symbols): Don't demangle or Ada encode here.
738         (search_minsyms_for_name): Add lookup_name_info parameter.
739         (add_matching_symbols_to_info): Add name_match_type parameter.
740         Use lookup_name_info.
741         * m2-lang.c (m2_language_defn): Adjust comments to refer to
742         la_get_symbol_name_matcher.
743         * minsyms.c: Include <algorithm>.
744         (add_minsym_to_demangled_hash_table): Remove table parameter and
745         add objfile parameter.  Use search_name_hash, and add language to
746         demangled languages vector.
747         (struct found_minimal_symbols): New struct.
748         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
749         New functions.
750         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
751         input names here.  Use lookup_name_info instead.  Lookup up
752         demangled names once for each language in the demangled names
753         vector.
754         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
755         demangled names once for each language in the demangled names
756         vector.
757         (build_minimal_symbol_hash_tables): Adjust.
758         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
759         lookup_name_info.
760         * objc-lang.c (objc_language_defn): Adjust comment to refer to
761         la_get_symbol_name_matcher.
762         * objfiles.h: Include <vector>.
763         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
764         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
765         la_get_symbol_name_matcher.
766         * p-lang.c (pascal_language_defn): Adjust comment to refer to
767         la_get_symbol_name_matcher.
768         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
769         (match_partial_symbol): Use symbol_name_match_type,
770         lookup_name_info and psymbol_name_matches.
771         (lookup_partial_symbol): Use lookup_name_info.
772         (map_block): Use symbol_name_match_type and lookup_name_info.
773         (psym_map_matching_symbols): Use symbol_name_match_type.
774         (psymbol_name_matches): New.
775         (recursively_search_psymtabs): Use lookup_name_info and
776         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
777         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
778         'kind' parameter to 'domain'.
779         * rust-lang.c (rust_language_defn): Adjust comment to refer to
780         la_get_symbol_name_matcher.
781         * symfile-debug.c (debug_qf_map_matching_symbols)
782         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
783         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
784         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
785         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
786         Adjust to use symbol_name_match_type.
787         <expand_symtabs_matching>: Adjust to use lookup_name_info.
788         (expand_symtabs_matching): Adjust to use lookup_name_info.
789         * symmisc.c (maintenance_expand_symtabs): Use
790         lookup_name_info::match_any ().
791         * symtab.c (symbol_matches_search_name): New.
792         (eq_symbol_entry): Adjust to use lookup_name_info and the
793         language's matcher.
794         (demangle_for_lookup_info::demangle_for_lookup_info): New.
795         (lookup_name_info::match_any): New.
796         (iterate_over_symbols, search_symbols): Use lookup_name_info.
797         (compare_symbol_name): Add language, lookup_name_info and
798         completion_match_result parameters, and use them.
799         (completion_list_add_name): Make extern.  Add language and
800         lookup_name_info parameters.  Use them.
801         (completion_list_add_symbol, completion_list_add_msymbol)
802         (completion_list_objc_symbol): Add lookup_name_info parameters and
803         adjust.  Pass down language.
804         (completion_list_add_fields): Add lookup_name_info parameters and
805         adjust.  Pass down language.
806         (add_symtab_completions): Add lookup_name_info parameters and
807         adjust.
808         (default_collect_symbol_completion_matches_break_on): Add
809         name_match_type parameter, and use it.  Use lookup_name_info.
810         (default_collect_symbol_completion_matches)
811         (collect_symbol_completion_matches): Add name_match_type
812         parameter, and pass it down.
813         (collect_symbol_completion_matches_type): Adjust.
814         (collect_file_symbol_completion_matches): Add name_match_type
815         parameter, and use lookup_name_info.
816         * symtab.h: Include <string> and "common/gdb_optional.h".
817         (enum class symbol_name_match_type): New.
818         (class ada_lookup_name_info): New.
819         (struct demangle_for_lookup_info): New.
820         (class lookup_name_info): New.
821         (symbol_name_matcher_ftype): New.
822         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
823         (symbol_matches_search_name): Declare.
824         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
825         (default_collect_symbol_completion_matches)
826         (collect_symbol_completion_matches)
827         (collect_file_symbol_completion_matches): Add name_match_type
828         parameter.
829         (iterate_over_symbols): Use lookup_name_info.
830         (completion_list_add_name): Declare.
831         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
832         (strncmp_iw_with_mode): Now extern.
833         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
834         (strncmp_iw_with_mode): Declare.
835
836 2017-11-08  Keith Seitz  <keiths@redhat.com>
837             Pedro Alves  <palves@redhat.com>
838
839         * ada-lang.c (ada_language_defn): Install
840         default_search_name_hash.
841         * buildsym.c (struct buildsym_compunit): <language>: New field.
842         (finish_block_internal): Pass language when creating dictionaries.
843         (start_buildsym_compunit, start_symtab): New language parameters.
844         Use them.
845         (restart_symtab): Pass down compilation unit's language.
846         * buildsym.h (enum language): Forward declare.
847         (start_symtab): New 'language' parameter.
848         * c-lang.c (c_language_defn, cplus_language_defn)
849         (asm_language_defn, minimal_language_defn): Install
850         default_search_name_hash.
851         * coffread.c (coff_start_symtab): Adjust.
852         * d-lang.c (d_language_defn): Install default_search_name_hash.
853         * dbxread.c (struct symloc): Add 'pst_language' field.
854         (PST_LANGUAGE): Define.
855         (start_psymtab, read_ofile_symtab): Use it.
856         (process_one_symbol): New 'language' parameter.  Pass it down.
857         * dictionary.c (struct dictionary) <language>: New field.
858         (DICT_LANGUAGE): Define.
859         (dict_create_hashed, dict_create_hashed_expandable)
860         (dict_create_linear, dict_create_linear_expandable): New parameter
861         'language'.  Set the dictionary's language.
862         (iter_match_first_hashed): Adjust to rename.
863         (insert_symbol_hashed): Assert we don't see mismatching
864         languages.  Adjust to rename.
865         (dict_hash): Rename to ...
866         (default_search_name_hash): ... this and make extern.
867         * dictionary.h (struct language_defn): Forward declare.
868         (dict_create_hashed): New parameter 'language'.
869         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
870         * f-lang.c (f_language_defn): Install default_search_name_hash.
871         * go-lang.c (go_language_defn): Install default_search_name_hash.
872         * jit.c (finalize_symtab): Pass compunit's language to dictionary
873         creation.
874         * language.c (unknown_language_defn, auto_language_defn):
875         * language.h (language_defn::la_search_name_hash): New field.
876         (default_search_name_hash): Declare.
877         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
878         * mdebugread.c (new_block): New parameter 'language'.
879         * mdebugread.c (parse_symbol): Pass symbol language to block
880         allocation.
881         (psymtab_to_symtab_1): Pass down language.
882         (new_symtab): Pass compunit's language to block allocation.
883         * objc-lang.c (objc_language_defn): Install
884         default_search_name_hash.
885         * opencl-lang.c (opencl_language_defn):
886         * p-lang.c (pascal_language_defn): Install
887         default_search_name_hash.
888         * rust-lang.c (rust_language_defn): Install
889         default_search_name_hash.
890         * stabsread.h (enum language): Forward declare.
891         (process_one_symbol): Add 'language' parameter.
892         * symtab.c (search_name_hash): New function.
893         * symtab.h (search_name_hash): Declare.
894         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
895
896 2017-11-08  Pedro Alves  <palves@redhat.com>
897
898         * cp-name-parser.y (main): Don't initialize extra_chars.
899
900 2017-11-07  Tom Tromey  <tom@tromey.com>
901
902         * event-top.h (command_handler): Constify.
903         * record-full.c (cmd_record_full_start): Update.
904         * thread.c (thread_apply_all_command): Update.
905         * printcmd.c (eval_command): Update.
906         * mi/mi-main.c (mi_execute_cli_command): Update.
907         (mi_execute_async_cli_command): Update.
908         * tui/tui-stack.c (tui_update_command): Update.
909         * cli/cli-interp.c (safe_execute_command): Constify.
910         * record.c (record_start): Update.
911         (record_start, record_stop, cmd_record_start): Update.
912         * record-btrace.c (cmd_record_btrace_bts_start): Update.
913         (cmd_record_btrace_pt_start): Update.
914         (cmd_record_btrace_start): Update.
915         (cmd_record_btrace_start): Update.
916         * reverse.c (exec_reverse_once): Update.
917         * python/python.c (execute_gdb_command): Don't copy the command.
918         * event-top.c (command_line_handler): Update.
919         (command_handler): Constify.
920         * defs.h (deprecated_call_command_hook): Constify.
921         * cli/cli-script.h (execute_user_command): Constify.
922         * cli/cli-script.c (execute_user_command): Constify.
923         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
924         (enum command_control_type): Update.
925         * main.c (catch_command_errors): Remove non-const overload.
926         (catch_command_errors_ftype): Remove.
927         * python/py-cmd.c (cmdpy_function): Constify.
928         * guile/scm-cmd.c (cmdscm_function): Constify.
929         * cli/cli-dump.c (call_dump_func): Constify.
930         * cli/cli-decode.c (do_const_cfunc): Constify.
931         (do_sfunc): Constify.
932         (cmd_func): Constify.
933         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
934         * top.h (execute_command): Constify.
935         * top.c (execute_command): Constify.
936         (execute_command_to_string): Constify.
937         (deprecated_call_command_hook): Constify.
938         * command.h (cmd_func): Constify.
939         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
940
941 2017-11-07  Tom Tromey  <tom@tromey.com>
942
943         * ada-lang.c (catch_ada_exception_command): Constify.
944         (catch_assert_command): Constify.
945         * break-catch-throw.c (catch_catch_command, catch_throw_command)
946         (catch_rethrow_command): Constify.
947         (catch_exception_command_1): Constify.
948         * breakpoint.h (add_catch_command): Constify.
949         * break-catch-syscall.c (catch_syscall_command_1): Constify.
950         (catch_syscall_split_args): Constify.
951         * break-catch-sig.c (catch_signal_command): Constify.
952         (catch_signal_split_args): Constify.
953         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
954         cmd_const_sfunc_ftype.
955         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
956         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
957         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
958         (add_setshow_string_cmd, struct cmd_list_element)
959         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
960         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
961         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
962         Constify.
963         (set_cmd_sfunc): Constify.
964         (empty_sfunc): Constify.
965         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
966         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
967         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
968         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
969         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
970         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
971         Constify.
972         (set_cmd_sfunc): Constify.
973         (cmd_sfunc_ftype): Remove.
974         * compile/compile.c (set_compile_args): Constify.
975         * infrun.c (set_disable_randomization): Constify.
976         * infcmd.c (set_args_command, set_cwd_command): Constify.
977         * breakpoint.c (set_condition_evaluation_mode): Constify.
978         (add_catch_command): Constify.
979         (catch_fork_command_1, catch_exec_command_1)
980         (catch_load_command_1, catch_unload_command_1): Constify.
981         (catch_load_or_unload): Constify.
982         * guile/scm-param.c (pascm_set_func): Constify.
983         (add_setshow_generic): Constify.
984         * python/py-param.c (get_set_value): Constify.
985         * top.h (set_verbose): Constify.
986         * tui/tui-win.c (tui_set_var_cmd): Constify.
987         * mi/mi-main.c (set_mi_async_command): Constify.
988         * cli/cli-logging.c (set_logging_overwrite)
989         (set_logging_redirect): Constify.
990         * value.c (set_max_value_size): Constify.
991         * valprint.c (set_input_radix, set_output_radix): Constify.
992         * utils.c (set_width_command, set_height_command): Constify.
993         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
994         * tracepoint.c (set_disconnected_tracing)
995         (set_circular_trace_buffer, set_trace_buffer_size)
996         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
997         * top.c (set_history_size_command, set_verbose, set_editing)
998         (set_gdb_datadir, set_history_filename): Constify.
999         * target.c (set_targetdebug, maint_set_target_async_command)
1000         (maint_set_target_non_stop_command, set_target_permissions)
1001         (set_write_memory_permission): Constify.
1002         (open_target): Constify.
1003         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1004         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1005         * symtab.c (set_symbol_cache_size_handler): Constify.
1006         * symfile.c (set_ext_lang_command): Constify.
1007         * symfile-debug.c (set_debug_symfile): Constify.
1008         * source.c (set_directories_command): Constify.
1009         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1010         * serial.c (set_parity): Constify.
1011         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1012         * remote.c (set_remote_exec_file, set_remotebreak)
1013         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1014         * record.c (set_record_insn_history_size)
1015         (set_record_call_history_size): Constify.
1016         * record-full.c (set_record_full_insn_max_num): Constify.
1017         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1018         * osabi.c (set_osabi): Constify.
1019         * mips-tdep.c (set_mips64_transfers_32bit_regs)
1020         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1021         * maint.c (maintenance_set_profile_cmd): Constify.
1022         * linux-thread-db.c (set_libthread_db_search_path): Constify.
1023         * language.c (set_language_command, set_range_command)
1024         (set_case_command): Constify.
1025         * infrun.c (set_non_stop, set_observer_mode)
1026         (set_stop_on_solib_events, set_schedlock_func)
1027         (set_exec_direction_func): Constify.
1028         * infcmd.c (set_inferior_tty_command): Constify.
1029         * disasm.c (set_disassembler_options_sfunc): Constify.
1030         * demangle.c (set_demangling_command): Constify.
1031         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1032         * cris-tdep.c (set_cris_version, set_cris_mode)
1033         (set_cris_dwarf2_cfi): Constify.
1034         * corefile.c (set_gnutarget_command): Constify.
1035         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1036         (set_target_wide_charset_sfunc): Constify.
1037         * breakpoint.c (update_dprintf_commands): Constify.
1038         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1039         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1040         (set_disassembly_style_sfunc): Constify.
1041         * arch-utils.c (set_endian, set_architecture): Constify.
1042         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1043         * agent.c (set_can_use_agent): Constify.
1044
1045 2017-11-07  Tom Tromey  <tom@tromey.com>
1046
1047         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1048         (go32_pde, go32_pte, go32_pte_for_address): Constify.
1049         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1050         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1051         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1052         (parse_int_arg, show_thread_default_detach_sc_cmd)
1053         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1054         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1055         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1056         (show_task_pause_cmd, set_task_detach_sc_cmd)
1057         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1058         (set_noninvasive_cmd, set_thread_pause_cmd)
1059         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1060         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1061         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1062         * windows-nat.c (display_selectors): Constify.
1063         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1064         non-const "cfunc".
1065         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1066         (cmd_cfunc_eq): Likewise.
1067         (struct cmd_list_element): Likewise.
1068         (do_cfunc): Remove.
1069         (cli_user_command_p): Update.
1070         * command.h (add_cmd): Remove non-const overload.
1071         (cmd_cfunc_ftype): Remove typedef.
1072         (cmd_cfunc_eq): Remove non-const overload.
1073         * value.c (show_values): Constify.
1074         * thread.c (thread_apply_all_command): Constify.
1075         * symfile.c (load_command): Constify.
1076         * source.c (directory_command): Constify.
1077         * maint.c (maintenance_internal_error)
1078         (maintenance_demangler_warning, maintenance_space_display)
1079         (maintenance_print_architecture, maintenance_translate_address)
1080         (maintenance_info_selftests, maintenance_internal_warning):
1081         Constify.
1082         * breakpoint.c (disable_trace_command, enable_trace_command):
1083         Constify.
1084         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1085         Constify.
1086         (add_auto_load_safe_path): Constify.
1087         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1088         * top.h (show_commands): Constify.
1089         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1090         * sparc64-tdep.c (adi_examine_command): Constify.
1091         (adi_assign_command): Constify.
1092
1093 2017-11-07  Tom Tromey  <tom@tromey.com>
1094
1095         * frame.h (info_locals_command, info_args_command): Constify.
1096         * auto-load.h (auto_load_info_scripts): Constify.
1097         * inferior.h (registers_info): Constify.
1098         * copying.c: Rebuild.
1099         * copying.awk: Constify generated commands.
1100         * auto-load.c (auto_load_info_scripts)
1101         (info_auto_load_gdb_scripts): Constify.
1102         * cli/cli-decode.c (struct cmd_list_element): Take a
1103         cmd_const_cfunc_ftype.
1104         * command.h (add_info): Take a cmd_const_cfunc_ftype.
1105         * tui/tui-win.c (tui_all_windows_info): Constify.
1106         * python/py-auto-load.c (info_auto_load_python_scripts):
1107         Constify.
1108         * cli/cli-cmds.c (show_command): Remove non-const overload.
1109         * tracepoint.c (info_tvariables_command, info_scope_command):
1110         Constify.
1111         (info_static_tracepoint_markers_command): Constify.
1112         * thread.c (info_threads_command): Constify.
1113         (print_thread_info_1): Constify.
1114         * target.c (info_target_command): Constify.
1115         * symtab.c (info_sources_command, info_functions_command)
1116         (info_types_command): Constify.
1117         (info_variables_command): Remove non-const overload.
1118         * symfile.c (info_ext_lang_command): Constify.
1119         * stack.c (info_frame_command, info_locals_command)
1120         (info_args_command): Constify.
1121         (backtrace_command): Remove non-const overload.
1122         * source.c (info_source_command, info_line_command): Constify.
1123         * solib.c (info_sharedlibrary_command): Constify.
1124         * skip.c (info_skip_command): Constify.
1125         * ser-go32.c (info_serial_command): Constify.
1126         * reverse.c (info_bookmarks_command): Constify.
1127         * printcmd.c (info_symbol_command, info_address_command)
1128         (info_display_command): Constify.
1129         * osdata.c (info_osdata_command): Constify.
1130         * objc-lang.c (info_selectors_command, info_classes_command):
1131         Constify.
1132         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1133         * memattr.c (info_mem_command): Constify.
1134         * macrocmd.c (info_macro_command, info_macros_command): Constify.
1135         * linux-fork.c (info_checkpoints_command): Constify.
1136         * infrun.c (info_signals_command): Constify.
1137         * inflow.c (info_terminal_command): Constify.
1138         * inferior.c (info_inferiors_command): Constify.
1139         (print_inferior): Constify.
1140         * infcmd.c (info_program_command, info_all_registers_command)
1141         (info_registers_command, info_vector_command)
1142         (info_float_command): Constify.
1143         (registers_info): Constify.
1144         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1145         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1146         Constify.
1147         * f-valprint.c (info_common_command): Constify.
1148         * dcache.c (info_dcache_command): Constify.
1149         (dcache_info_1): Constify.
1150         * darwin-nat-info.c (info_mach_tasks_command)
1151         (info_mach_task_command, info_mach_ports_command)
1152         (info_mach_port_command, info_mach_threads_command)
1153         (info_mach_thread_command, info_mach_regions_command)
1154         (info_mach_regions_recurse_command, info_mach_region_command)
1155         (info_mach_exceptions_command): Constify.
1156         (get_task_from_args): Constify.
1157         * cp-support.c (info_vtbl_command): Constify.
1158         * breakpoint.c (info_watchpoints_command)
1159         (info_tracepoints_command): Constify.
1160         (info_breakpoints_command): Remove non-const overload.
1161         * avr-tdep.c (avr_io_reg_read_command): Constify.
1162         * auxv.c (info_auxv_command): Constify.
1163         * ada-tasks.c (info_tasks_command): Constify.
1164         (info_task): Constify.
1165         * ada-lang.c (info_exceptions_command): Constify.
1166
1167 2017-11-07  Tom Tromey  <tom@tromey.com>
1168
1169         * solib.h (no_shared_libraries): Constify.
1170         * frame.h (return_command): Constify.
1171         * cli/cli-cmds.h (quit_command): Constify.
1172         * top.h (quit_command, execute_command): Constify.
1173         * target.h (flash_erase_command): Constify.
1174         * inferior.h (set_inferior_args, attach_command): Constify.
1175         * tracepoint.h (start_tracing, stop_tracing): Constify.
1176         * breakpoint.h (break_command, tbreak_command)
1177         (hbreak_command_wrapper, thbreak_command_wrapper)
1178         (rbreak_command_wrapper, watch_command_wrapper)
1179         (awatch_command_wrapper, rwatch_command_wrapper)
1180         (get_tracepoint_by_number): Constify.
1181         * symtab.c (info_variables_command, rbreak_command)
1182         (symtab_symbol_info): Constify.
1183         (info_variables_command): Add non-const overload.
1184         * top.c (dont_repeat_command): Constify.
1185         * breakpoint.c (ignore_command, commands_command)
1186         (condition_command, tbreak_command, hbreak_command)
1187         (thbreak_command, clear_command, break_command)
1188         (info_breakpoints_command, watch_command, rwatch_command)
1189         (awatch_command, trace_command, ftrace_command, strace_command)
1190         (trace_pass_command, break_range_command, dprintf_command)
1191         (agent_printf_command, get_tracepoint_by_number)
1192         (watch_maybe_just_location, trace_pass_command): Constify.
1193         (info_breakpoints_command): Add non-const overload.
1194         * tracefile.c (tsave_command): Constify.
1195         * infcmd.c (attach_command, disconnect_command, signal_command)
1196         (queue_signal_command, stepi_command, nexti_command)
1197         (finish_command, next_command, step_command, until_command)
1198         (advance_command, jump_command, continue_command, run_command)
1199         (start_command, starti_command, interrupt_command)
1200         (run_command_1, set_inferior_args, step_1): Constify.
1201         * inferior.c (add_inferior_command, remove_inferior_command)
1202         (clone_inferior_command): Constify.
1203         * linux-fork.c (checkpoint_command, restart_command): Constify.
1204         * windows-nat.c (signal_event_command): Constify.
1205         * guile/guile.c (guile_repl_command, guile_command): Constify.
1206         * printcmd.c (x_command, display_command, printf_command)
1207         (output_command, set_command, call_command, print_command)
1208         (eval_command): Constify.
1209         (non_const_set_command): Remove.
1210         (_initialize_printcmd): Update.
1211         * source.c (forward_search_command, reverse_search_command):
1212         Constify.
1213         * jit.c (jit_reader_load_command, jit_reader_unload_command):
1214         Constify.
1215         * infrun.c (handle_command): Constify.
1216         * memattr.c (mem_command): Constify.
1217         * stack.c (return_command, up_command, up_silently_command)
1218         (down_command, down_silently_command, frame_command)
1219         (backtrace_command, func_command, backtrace_command_1): Constify.
1220         (backtrace_command): Add non-const overload.
1221         * remote-sim.c (simulator_command): Constify.
1222         * exec.c (set_section_command): Constify.
1223         * tracepoint.c (tdump_command, trace_variable_command)
1224         (tstatus_command, tstop_command, tstart_command)
1225         (end_actions_pseudocommand, while_stepping_pseudocommand)
1226         (collect_pseudocommand, teval_pseudocommand, actions_command)
1227         (start_tracing, stop_tracing): Constify.
1228         * value.c (init_if_undefined_command): Constify.
1229         * tui/tui-stack.c (tui_update_command): Constify.
1230         * tui/tui-win.c (tui_refresh_all_command)
1231         (tui_set_tab_width_command, tui_set_win_height_command)
1232         (tui_set_focus_command, tui_scroll_forward_command)
1233         (tui_scroll_backward_command, tui_scroll_left_command)
1234         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1235         (tui_set_win_height): Constify.
1236         * tui/tui-layout.c (tui_layout_command): Constify.
1237         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1238         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1239         (proc_untrace_sysexit_cmd): Constify.
1240         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1241         (threadset_test_cmd, threadlist_update_test_cmd)
1242         (threadalive_test): Constify.
1243         * objc-lang.c (print_object_command): Constify.
1244         * command.h (add_com): Constify.
1245         * cli/cli-dump.c (restore_command): Constify.
1246         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1247         (help_command, complete_command, shell_command, edit_command)
1248         (list_command, disassemble_command, make_command)
1249         (apropos_command, alias_command): Constify.
1250         * cli/cli-script.c (document_command, define_command)
1251         (while_command, if_command, validate_comname): Constify.
1252         * cli/cli-decode.c (struct cmd_list_element): Change type of
1253         "fun".
1254         * target.c (do_monitor_command, flash_erase_command): Constify.
1255         * regcache.c (reg_flush_command): Constify.
1256         * reverse.c (reverse_step, reverse_next, reverse_stepi)
1257         (reverse_nexti, reverse_continue, reverse_finish)
1258         (save_bookmark_command, goto_bookmark_command)
1259         (exec_reverse_once): Constify.
1260         * python/python.c (python_interactive_command, python_command):
1261         Constify.
1262         * typeprint.c (ptype_command, whatis_command, whatis_exp):
1263         Constify.
1264         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1265         * gcore.c (gcore_command): Constify.
1266
1267 2017-11-07  Tom Tromey  <tom@tromey.com>
1268
1269         * printcmd.c (x_command): Call set_repeat_arguments.
1270         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1271         * top.c (repeat_arguments): New global.
1272         (set_repeat_arguments): New function.
1273         (execute_command): Handle repeat_arguments.
1274         (show_commands): Calls set_repeat_arguments.
1275         * command.h (set_repeat_arguments): Declare.
1276
1277 2017-11-07  Tom Tromey  <tom@tromey.com>
1278
1279         * stack.c (backtrace_command): Use std::string.
1280         (backtrace_command_1): Make "count_exp" const.
1281
1282 2017-11-07  Tom Tromey  <tom@tromey.com>
1283
1284         * source.c (directory_switch, mod_path, add_path): Constify.
1285         * defs.h (add_path, mod_path, directory_switch): Constify.
1286         * mi/mi-cmd-env.c (env_mod_path): Constify.
1287
1288 2017-11-07  Tom Tromey  <tom@tromey.com>
1289
1290         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1291         (run_command_1, continue_command, step_1, jump_command)
1292         (signal_command, until_command, advance_command, finish_command)
1293         (attach_command): Update.
1294
1295 2017-11-07  Tom Tromey  <tom@tromey.com>
1296
1297         * command.h (set_cmd_cfunc): Don't declare.
1298         * cli/cli-decode.c (set_cmd_cfunc): Now static.
1299
1300 2017-11-07  Tom Tromey  <tom@tromey.com>
1301
1302         * stack.c (select_frame_command): Constify.
1303         * cli/cli-decode.c (add_com_suppress_notification): Constify.
1304         * command.h (add_com_suppress_notification): Constify.
1305
1306 2017-11-07  Tom Tromey  <tom@tromey.com>
1307
1308         * breakpoint.c (stop_command): Constify.
1309         * cli/cli-decode.c (struct cmd_list_element): Constify.
1310         * command.h (add_abbrev_prefix_cmd): Constify.
1311
1312 2017-11-07  Pedro Alves  <palves@redhat.com>
1313
1314         * breakpoint.c (extract_bp_kind): New enum.
1315         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1316         factored out from ...
1317         (extract_bp_number_and_location): ... here.
1318         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1319
1320 2017-11-07  Pedro Alves  <palves@redhat.com>
1321
1322         * breakpoint.c (extract_bp_number_and_location): Change return
1323         type to void.  Throw error instead of warning.
1324         (enable_disable_command): Adjust.
1325
1326 2017-11-07  Xavier Roirand  <roirand@adacore.com>
1327             Pedro Alves  <palves@redhat.com>
1328
1329         * breakpoint.c (map_breakpoint_number_range): New, factored out
1330         from ...
1331         (map_breakpoint_numbers): ... here.
1332         (find_location_by_number): Change parameters from string to
1333         breakpoint number and location.
1334         (extract_bp_number_and_location): New function.
1335         (enable_disable_bp_num_loc)
1336         (enable_disable_breakpoint_location_range)
1337         (enable_disable_command): New functions, factored out ...
1338         (enable_command, disable_command): ... these functions, and
1339         adjusted to support ranges.
1340         * NEWS: Document enable/disable breakpoint location range feature.
1341
1342 2017-11-06  Luis Machado  <luis.machado@linaro.org>
1343
1344         * MAINTAINERS (Write After Approval): Update my e-mail address.
1345
1346 2017-11-06  Pedro Alves  <palves@redhat.com>
1347
1348         * gnu-nat.c (gnu_terminal_init): Delete.
1349         (gnu_target): Don't install gnu_terminal_init.
1350         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1351         (child_terminal_init): ... this function.
1352
1353 2017-11-06  Pedro Alves  <palves@redhat.com>
1354
1355         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1356         sgtty.h.
1357         * config.in, configure: Regenerate.
1358
1359 2017-11-06  Pedro Alves  <palves@redhat.com>
1360
1361         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1362         (async_init_signals): Adjust.
1363         (handle_stop_sig): Rename to ...
1364         (handle_sigtstp): ... this.
1365         (async_stop_sig): Rename to ...
1366         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1367         SIGTSTP path.
1368         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
1369         instead of STOP_SIGNAL thoughout.
1370         (handle_stop_sig): Rename to ...
1371         (handle_sigtstp): ... this.
1372         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1373
1374 2017-11-06  Pedro Alves  <palves@redhat.com>
1375
1376         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1377         longer set flags twice in row.
1378
1379 2017-11-06  Pedro Alves  <palves@redhat.com>
1380
1381         * Makefile.in (SER_HARDWIRE): Update comment.
1382         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1383         * common/gdb_termios.h: Delete file.
1384         * common/job-control.c: Include termios.h and unistd.h instead of
1385         gdb_termios.h.
1386         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1387         check.
1388         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1389         Remove sgtty code.
1390         * configure.ac: No longer check for termio.h and sgtty.h.
1391         * configure: Regenerate.
1392         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
1393         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1394         Replace PROCESS_GROUP_TYPE references with pid_t references
1395         throughout.
1396         (gdb_getpgrp): Delete.
1397         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1398         (child_terminal_inferior): Remove comment.  Remove sgtty code.
1399         (child_terminal_ours_1): Use tcgetpgrp directly instead of
1400         gdb_getpgrp.  Use serial_set_tty_state instead aof
1401         serial_noflush_set_tty_state.  Remove sgtty code.
1402         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
1403         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1404         (inferior_process_group): Now returns pid_t.
1405         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1406         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1407         * ser-event.c (serial_event_ops): Update.
1408         * ser-go32.c (dos_noflush_set_tty_state): Delete.
1409         (dos_ops): Update.
1410         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1411         * ser-pipe.c (pipe_ops): Update.
1412         * ser-tcp.c (tcp_ops): Update.
1413         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
1414         HAVE_TERMIOS checks.
1415         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1416         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1417         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1418         assume termios.
1419         (hardwire_noflush_set_tty_state): Delete.
1420         (hardwire_print_tty_state, hardwire_drain_output)
1421         (hardwire_flush_output, hardwire_flush_input)
1422         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1423         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1424         code, and assume termios.
1425         (hardwire_ops): Update.
1426         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1427         * serial.c (serial_noflush_set_tty_state): Delete.
1428         * serial.h (serial_noflush_set_tty_state): Delete.
1429         (serial_ops::noflush_set_tty_state): Delete.
1430
1431 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1432
1433         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1434         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1435         (COMMON_OBS): Remove doublest.o and dfp.o.
1436         Do not build target-float.c (instead of doublest.c)
1437         with -Wformat-nonliteral.
1438
1439         * doublest.c: Remove file.
1440         * doublest.h: Remove file.
1441         * dfp.c: Remove file.
1442         * dfp.h: Remove file.
1443
1444         * target-float.c: Do not include "doublest.h" and "dfp.h".
1445         (DOUBLEST): Move here from doublest.h.
1446         (enum float_kind): Likewise.
1447         (FLOATFORMAT_CHAR_BIT): Likewise.
1448         (FLOATFORMAT_LARGEST_BYTES): Likewise.
1449         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
1450         (floatformat_precision): Likewise.
1451         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1452         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1453         Likewise.
1454         (host_float_format, host_double_format, host_long_double_format):
1455         Likewise.
1456         (floatformat_to_string, floatformat_from_string): Likewise.
1457         (floatformat_to_doublest): Likewise.  Also, inline the original
1458         convert_floatformat_to_doublest.
1459         (floatformat_from_doublest): Likewise.  Also, inline the original
1460         convert_floatformat_from_doublest.
1461
1462         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1463         (MAX_DECIMAL_STRING): Move here from dfp.c.
1464         (match_endianness): Likewise.
1465         (set_decnumber_context, decimal_check_errors): Likewise.
1466         (decimal_from_number, decimal_to_number): Likewise.
1467         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1468         (decimal_from_longest, decimal_from_ulongest): Likewise.
1469         (decimal_to_longest): Likewise.
1470         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1471         (decimal_convert): Likewise.
1472
1473 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1474
1475         * doublest.c: Do not include "gdbtypes.h".
1476         (extract_typed_floating): Remove.
1477         (store_typed_floating): Remove.
1478         (convert_typed_floating): Remove.
1479         * doublest.h (struct type): Remove.
1480         (DOUBLEST_PRINT_FORMAT): Remove.
1481         (DOUBLEST_SCAN_FORMAT): Remove.
1482         (extract_typed_floating): Remove.
1483         (store_typed_floating): Remove.
1484         (convert_typed_floating): Remove.
1485
1486         * dfp.c (decimal_from_doublest): Remove.
1487         (decimal_to_doublest): Remove.
1488         * dfp.h: Do not include "doublest.h".
1489         (decimal_from_doublest): Remove.
1490         (decimal_to_doublest): Remove.
1491
1492         * value.c: Do not include "doublest.h" and "dfp.h".
1493         (value_as_double): Remove.
1494         (unpack_double): Remove.
1495         (value_from_double): Remove.
1496         (value_from_decfloat): Remove.
1497         * value.h: Do not include "doublest.h".
1498         (value_as_double): Remove.
1499         (unpack_double): Remove.
1500         (value_from_double): Remove.
1501         (value_from_decfloat): Remove.
1502
1503 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1504
1505         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1506         (i386_extract_return_value): Use target_float_convert.
1507         (i386_store_return_value): Likewise.
1508         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1509         (i387_value_to_register): Likewise.
1510         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1511         (ia64_register_to_value): Use target_float_convert.
1512         (ia64_value_to_register): Likewise.
1513         (ia64_extract_return_value): Likewise.
1514         (ia64_store_return_value): Likewise.
1515         (ia64_push_dummy_call): Likewise.
1516         * m68k-tdep.c: Include "target-float.h".
1517         (m68k_register_to_value): Use target_float_convert.
1518         (m68k_value_to_register): Likewise.
1519         (m68k_svr4_extract_return_value): Likewise.
1520         (m68k_svr4_store_return_value): Likewise.
1521         * ppc-sysv-tdep.c: Include "target-float.h".
1522         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1523         (do_ppc_sysv_return_value): Likewise.
1524         (ppc64_sysv_abi_push_freg): Likewise.
1525         (ppc64_sysv_abi_return_value_base): Likewise.
1526         * rs6000-aix-tdep.c: Include "target-float.h".
1527         (rs6000_push_dummy_call): Use target_float_convert.
1528         (rs6000_return_value): Likewise.
1529         * rs6000-lynx178-tdep.c: Include "target-float.h".
1530         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1531         (rs6000_lynx178_return_value): Likewise.
1532         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1533         (rs6000_register_to_value): Use target_float_convert.
1534         (rs6000_value_to_register): Likewise.
1535         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1536         (arm_extract_return_value): Use target_float_convert.
1537         (arm_store_return_value): Likewise.
1538         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1539         (sh_register_convert_to_virtual): Use target_float_convert.
1540         (sh_register_convert_to_raw): Likewise.
1541         * sh64-tdep.c: Include "target-float.h".
1542         (sh64_extract_return_value): Use target_float_convert.
1543         (sh64_register_convert_to_virtual): Likewise.
1544         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1545
1546 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1547
1548         * target-float.c (floatformat_to_host_double): New function.
1549         (floatformat_from_host_double): Likewise.
1550         (target_float_to_host_double): Likewise.
1551         (target_float_from_host_double): Likewise.
1552         * target-float.h (target_float_to_host_double): Add prototype.
1553         (target_float_from_host_double): Likewise.
1554
1555         * guile/scm-value.c: Include "target-float.h".
1556         (gdbscm_value_to_real): Use target_float_to_host_double.
1557         Handle integer source values via value_as_long.
1558         * guile/scm-math.c: Include "target-float.h".  Do not include
1559         "doublest.h", "dfp.h", and "expression.h".
1560         (vlscm_convert_typed_number): Use target_float_from_host_double.
1561         (vlscm_convert_number): Likewise.
1562
1563         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1564         (convert_value_from_python): Use target_float_from_host_double.
1565
1566 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1567
1568         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1569         (cast_from_fixed): Likewise.
1570         (ada_scaling_type): New function.
1571         (ada_delta): Return value instead of DOUBLEST.  Perform target
1572         arithmetic instead of host arithmetic.
1573         (scaling_factor): Rename to ...
1574         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1575         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1576         (ada_fixed_to_float): Remove.
1577         (ada_float_to_fixed): Remove.
1578         * ada-lang.h (ada_fixed_to_float): Remove.
1579         (ada_float_to_fixed): Remove.
1580         (ada_delta): Return value instead of DOUBLEST.
1581         (ada_scaling_factor): Add prototype.
1582
1583         * ada-typeprint.c: Include "target-float.h".
1584         (print_fixed_point_type): Perform target arithmetic instead of
1585         host arithmetic.
1586         * ada-valprint.c: Include "target-float.h".
1587         (ada_val_print_num): Perform target arithmetic instead of
1588         host arithmetic for fixed-point types.
1589
1590 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1591
1592         * target-float.c: Include <math.h>.
1593         (floatformat_binop): New function.
1594         (floatformat_compare): Likewise.
1595         (target_float_binop): Likewise.
1596         (target_float_compare): Likewise.
1597         * target-float.h: Include "expression.h".
1598         (target_float_binop): Add prototype.
1599         (target_float_compare): Likewise.
1600
1601         * valarith.c: Do not include "doublest.h" and "dfp.h".
1602         Include "common/byte-vector.h".
1603         (value_args_as_decimal): Remove, replace by ...
1604         (value_args_as_target_float): ... this function.  Handle both
1605         binary and decimal target floating-point formats.
1606         (scalar_binop): Handle both binary and decimal FP using
1607         value_args_as_target_float and target_float_binop.
1608         (value_equal): Handle both binary and decimal FP using
1609         value_args_as_target_float and target_float_compare.
1610         (value_less): Likewise.
1611         (value_pos): Handle all scalar types as simple copy.
1612         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1613         * dfp.c (decimal_binop): Throw error instead of internal_error
1614         when called with an unsupported operation code.
1615
1616 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1617
1618         * target-float.c (target_float_to_string): New function.
1619         (target_float_from_string): New function.
1620         * target-float.h (target_float_to_string): Add prototype.
1621         (target_float_from_string): Add prototype.
1622
1623         * valprint.c: Include "target-float.h".  Do not include
1624         "doublest.h" and "dfp.h".
1625         (print_floating): Use target_float_to_string.
1626         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1627         (printf_floating): Use target_float_to_string.
1628         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1629         (print_i387_value): Use target_float_to_string.
1630         * mips-tdep.c: Include "target-float.h".
1631         (mips_print_fp_register): Use target_float_to_string.
1632         * sh64-tdep.c: Include "target-float.h".
1633         (sh64_do_fp_register): Use target_float_to_string.
1634
1635         * parse.c: Include "target-float.h".  Do not include
1636         "doublest.h" and "dfp.h".
1637         (parse_float): Use target_float_from_string.
1638         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1639         (define_symbol): Use target_float_from_string.
1640         * gdbarch-selftests.c: Include "target-float.h".
1641         (register_to_value_test): Use target_float_from_string.
1642
1643 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1644
1645         * Makefile.c (SFILES): Add target-float.c.
1646         (HFILES_NO_SRCDIR): Add target-float.h.
1647         (COMMON_OBS): Add target-float.o.
1648         * target-float.h: New file.
1649         * target-float.c: New file.
1650
1651         * doublest.c (floatformat_classify): Fix detection of float_zero.
1652
1653         * gdbtypes.c (is_floating_type): New function.
1654         * gdbtypes.h (is_floating_type): Add prototype.
1655
1656         * value.c: Do not include "floatformat.h".
1657         (unpack_double): Use target_float_is_valid.
1658         (is_floating_value): New function.
1659         * value.h (is_floating_value): Add prototype-
1660
1661         * valarith.c: Include "target-float.h".
1662         (value_logical_not): Use target_float_is_zero.
1663
1664         * python/py-value.c: Include "target-float.h".
1665         (valpy_nonzero): Use target_float_is_zero.
1666
1667 2017-11-04  Tom Tromey  <tom@tromey.com>
1668
1669         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1670
1671 2017-11-04  Tom Tromey  <tom@tromey.com>
1672
1673         * breakpoint.c (set_momentary_breakpoint): Return
1674         breakpoint_up.
1675         (until_break_command): Update.
1676         (new_until_break_fsm): Change argument types to
1677         breakpoint_up.
1678         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1679         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1680         Remove.
1681         * infcmd.c (finish_forward): Update.
1682         * breakpoint.h (set_momentary_breakpoint)
1683         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1684         (make_cleanup_delete_breakpoint): Remove.
1685         (struct breakpoint_deleter): New.
1686         (breakpoint_up): New typedef.
1687         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1688         (insert_exception_resume_breakpoint): Update.
1689         (insert_exception_resume_from_probe): Update.
1690         (insert_longjmp_resume_breakpoint): Update.
1691         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1692         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1693         * infcall.c (call_function_by_hand_dummy): Update
1694
1695 2017-11-04  Tom Tromey  <tom@tromey.com>
1696
1697         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1698
1699 2017-11-04  Tom Tromey  <tom@tromey.com>
1700
1701         * linux-tdep.c (linux_core_info_proc_mappings): Use
1702         gdb::def_vector.
1703         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1704         "size" argument.
1705         (linux_corefile_thread): Update.
1706         (linux_make_corefile_notes): Remove unused variable.
1707
1708 2017-11-04  Tom Tromey  <tom@tromey.com>
1709
1710         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1711         gdb::byte_vector.
1712
1713 2017-11-04  Tom Tromey  <tom@tromey.com>
1714
1715         * objfiles.c (do_free_objfile_cleanup): Remove.
1716         * compile/compile-object-load.c (compile_object_load): Update.
1717         * objfiles.h (make_cleanup_free_objfile): Remove.
1718
1719 2017-11-04  Tom Tromey  <tom@tromey.com>
1720
1721         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1722         (adi_read_versions): Change "tags" to "gdb_byte *".
1723         (adi_print_versions): Likewise.
1724
1725 2017-11-04  Tom Tromey  <tom@tromey.com>
1726
1727         * breakpoint.c
1728         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1729         from start_rbreak_breakpoints.
1730         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1731         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1732         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1733         * symtab.c (do_end_rbreak_breakpoints): Remove.
1734         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1735
1736 2017-11-04  Tom Tromey  <tom@tromey.com>
1737
1738         * cp-namespace.c (reset_directive_searched): Remove.
1739         (cp_lookup_symbol_via_imports): Use scoped_restore.
1740         * cp-support.c (reset_directive_searched): Remove.
1741         (make_symbol_overload_list_using): Use scoped_restore.
1742         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1743         (reset_directive_searched): Remove.
1744
1745 2017-11-04  Tom Tromey  <tom@tromey.com>
1746
1747         * symfile.c (find_separate_debug_file_by_debuglink): Use
1748         unique_xmalloc_ptr.
1749
1750 2017-11-04  Tom Tromey  <tom@tromey.com>
1751
1752         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1753         type of "info".
1754         (compute_stack_depth): Likewise.
1755         (do_compile_dwarf_expr_to_c): Use std::vector.
1756
1757 2017-11-04  Tom Tromey  <tom@tromey.com>
1758
1759         * compile/compile-object-load.c (link_callbacks_einfo): Use
1760         std::string.
1761
1762 2017-11-04  Tom Tromey  <tom@tromey.com>
1763
1764         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1765         Use scoped_free_pendings.
1766         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1767         scoped_free_pendings.
1768         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1769         (xcoff_initial_scan): Likewise.
1770         * buildsym.c (reset_symtab_globals): Update comment.
1771         (scoped_free_pendings): Rename from really_free_pendings.
1772         (prepare_for_building): Update comment.
1773         (buildsym_init): Likewise.
1774         * buildsym.h (class scoped_free_pendings): New class.
1775         (really_free_pendings): Don't declare.
1776
1777 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1778
1779         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1780         output when converting a zero value to a special byteorder format.
1781
1782 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1783
1784         * frame.c (do_frame_register_read): Remove aspace.
1785         * jit.c (jit_frame_sniffer): Likwise.
1786         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1787         * regcache.c (regcache::regcache): Pass nullptr.
1788         (regcache_print): Caller updated.
1789         * regcache.h (regcache::regcache): Remove one constructor
1790         parameter aspace.
1791
1792 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1793
1794         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1795
1796 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1797
1798         * breakpoint.c (insert_single_step_breakpoints): Update.
1799         * frame.c (struct frame_info) <aspace>: Add const.
1800         (frame_save_as_regcache): Add const.
1801         (get_frame_address_space): Return const address_space *.
1802         * frame.h (get_frame_address_space): Update declaration.
1803         * infrun.c (struct step_over_info) <aspace>: Add const.
1804         (set_step_over_info): Make aspace const.
1805         (displaced_step_prepare_throw): Change variable const.
1806         (resume): Likewise.
1807         (proceed): Likewise.
1808         (adjust_pc_after_break): Likewise.
1809         (save_waitstatus): Likewise.
1810         (handle_signal_stop): Likewise.
1811         (keep_going_pass_signal): Likewise.
1812         * jit.c (jit_frame_sniffer): Add const.
1813         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1814         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1815         * record-full.c (record_full_wait_1): Likewise.
1816         * regcache.c (regcache::regcache): Change parameter to const.
1817         * regcache.h (regcache::regcache): Likewise.
1818         (regcache::aspace): Return const address_space *.
1819         (regcache) <m_aspace>: Add const.
1820
1821 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1822
1823         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1824         * frame.c (create_sentinel_frame): Likewise.
1825         * infrun.c (displaced_step_prepare_throw): Likewise.
1826         (resume): Likewise.
1827         (thread_still_needs_step_over_bp): Likewise.
1828         (proceed): Likewise.
1829         (do_target_wait): Likewise.
1830         (adjust_pc_after_break): Likewise.
1831         (handle_syscall_event): Likewise.
1832         (save_waitstatus): Likewise.
1833         (handle_inferior_event_1): Likewise.
1834         (handle_signal_stop): Likewise.
1835         (keep_going_pass_signal): Likewise.
1836         * linux-nat.c (status_callback): Likewise.
1837         (save_stop_reason): Likewise.
1838         (resume_stopped_resumed_lwps): Likewise.
1839         * record-full.c (record_full_exec_insn): Likewise.
1840         (record_full_wait_1): Likewise.
1841         * regcache.c (get_regcache_aspace): Remove.
1842         * regcache.h (get_regcache_aspace): Remove.
1843
1844 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1845
1846         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1847         (init_regcache_descr): Use gdbarch_num_regs.
1848         (regcache::regcache): Likewise.
1849         (regcache::get_register_status): Likewise.
1850         (regcache::assert_raw_regnum): Likewise.
1851         (regcache::cooked_read): Likewise.
1852         (regcache::cooked_read_value): Likewise.
1853         (regcache::cooked_write): Likewise.
1854         (regcache::dump): Likewise.
1855         (regcache::num_raw_registers): New method.
1856         * regcache.h (class regcache) <num_raw_registers>: New.
1857
1858 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1859
1860         * regcache.c (regcache::assert_regnum): New method.
1861         (regcache::invalidate): Call assert_regnum.
1862         (regcache::raw_update): Likewise.
1863         (regcache::raw_write): Likewise.
1864         (regcache::raw_read_part): Likewise.
1865         (regcache::raw_write_part): Likewise.
1866         (regcache::raw_supply): Likewise.
1867         (regcache::raw_supply_integer): Likewise.
1868         (regcache::raw_supply_zeroed): Likewise.
1869         (regcache::raw_collect): Likewise.
1870         (regcache::raw_collect_integer): Likewise.
1871         * regcache.h (regcache::assert_regnum): Declare.
1872
1873 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1874
1875         * regcache.c (regcache::dump): Remove code.
1876
1877 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1878
1879         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1880         Remove.
1881         <sizeof_cooked_register_status>: Remove.
1882         (init_regcache_descr): Update.
1883         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1884         (regcache::save): Likewise.
1885         (regcache::dump): Likewise.
1886
1887 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1888
1889         * ft32-tdep.c (ft32_fetch_instruction): New function.
1890         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1891
1892 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1893
1894         * cli/cli-script.c (execute_control_command): Rename to ...
1895         (execute_control_command_1): ... this.
1896         (execute_control_command): New function.
1897
1898 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1899
1900         * tracepoint.c (tfind_command): Remove const_cast.
1901
1902 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1903
1904         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1905
1906 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1907
1908         * common/common-utils.h (in_inclusive_range): New function.
1909         * arm-tdep.c (arm_record_extension_space): Use
1910         in_inclusive_range.
1911         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1912         * cris-tdep.c (cris_spec_reg_applicable): Use
1913         in_inclusive_range.
1914
1915 2017-10-30  Pedro Alves  <palves@redhat.com>
1916             Simon Marchi <simon.marchi@ericsson.com>
1917
1918         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1919         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1920
1921 2017-10-30  Pedro Alves  <palves@redhat.com>
1922
1923         * common/common-utils.c (string_appendf, string_vappendf): New
1924         functions.
1925         * common/common-utils.h (string_appendf, string_vappendf): New
1926         declarations.
1927         * unittests/common-utils-selftests.c (string_appendf_func)
1928         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1929         (string_vappendf_tests): New functions.
1930         (_initialize_common_utils_selftests): Register "string_appendf" and
1931         "string_vappendf tests".
1932
1933 2017-10-30  Pedro Alves  <palves@redhat.com>
1934
1935         * unittests/common-utils-selftests.c (format_func): New typedef.
1936         (string_printf_tests, string_vprintf_tests): Tests factored out
1937         and merged to ...
1938         (test_format_func): ... this new function.
1939         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1940         test_format_func.
1941
1942 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1943
1944         * darwin-nat.c: Remove include of gdb.h.
1945
1946 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1947
1948         * xtensa-xtregs.c: Fix formatting issues.
1949
1950 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1951
1952         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1953
1954 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1955
1956         PR python/21213
1957         * python/py-infthread.c (thpy_get_inferior): Increment reference
1958         of inferior before returning it.
1959
1960 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1961
1962         * unittests/common-utils-selftests.c (format): Add
1963         ATTRIBUTE_PRINTF.
1964
1965 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1966
1967         * xml-syscall.c (struct syscall_desc): Add constructor.
1968         <name>: Change type to std::string.
1969         (syscall_desc_up): New typedef.
1970         (syscall_desc_p): Remove typeder.
1971         (DEF_VEC_P(syscall_desc_p)): Remove.
1972         (struct syscall_group_desc): Add constructor.
1973         <name>: Change type to std::string.
1974         <syscalls>: Change type to std::vector.
1975         (syscall_group_desc_up): New typedef.
1976         (syscall_group_desc_p): Remove typedef.
1977         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1978         (struct syscalls_info) <syscalls>: Change type to std::vector of
1979         unique_ptr.
1980         <groups>: Likewise.
1981         <my_gdb_datadir>: Change type to std::string.
1982         (syscalls_info_up): New typedef.
1983         (allocate_syscalls_info): Remove.
1984         (syscalls_info_free_syscalls_desc): Remove.
1985         (syscalls_info_free_syscall_group_desc): Remove.
1986         (free_syscalls_info): Remove.
1987         (make_cleanup_free_syscalls_info): Remove.
1988         (syscall_group_create_syscall_group_desc): Adjust.
1989         (syscall_group_add_syscall): Adjust.
1990         (syscall_create_syscall_desc): Adjust.
1991         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1992         (init_syscalls_info): Adjust.
1993         (syscall_group_get_group_by_name): Adjust.
1994         (xml_get_syscall_number): Adjust.
1995         (xml_get_syscall_name): Adjust.
1996         (xml_list_of_syscalls): Adjust.
1997         (xml_list_syscalls_by_group): Adjust.
1998         (xml_list_of_groups): Adjust.
1999
2000 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2001
2002         * probe.h: Don't include gdb_vecs.h.
2003         (DEF_VEC_P (probe_p)): Remove.
2004         (find_probes_in_objfile): Return an std::vector.
2005         * probe.c (find_probes_in_objfile): Likewise.
2006         * breakpoint.c (breakpoint_objfile_data)
2007         <longjmp_probes>: Change type to std::vector.
2008         <exception_probes>: Likewise.
2009         (free_breakpoint_probes): Don't manually free vectors.
2010         (create_longjmp_master_breakpoint): Adjust.
2011         (create_exception_master_breakpoint): Adjust.
2012         * solib-svr4.c (svr4_create_probe_breakpoints): Change
2013         parameter type, adjust.
2014         (svr4_create_solib_event_breakpoints): Adjust.
2015
2016 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2017
2018         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2019         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2020         with new.
2021         (free_breakpoint_probes): Rename to ...
2022         (free_breakpoint_objfile_data): ... this, and call delete on
2023         bp_objfile_data..
2024
2025 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
2026
2027         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2028         (loaded_script_ptr): Remove typedef.
2029         (DEF_VEC_P (loaded_script_ptr)): Remove.
2030         (struct collect_matching_scripts_data): Add constructor.
2031         <scripts_p>: Change type to (pointer to) std::vector.
2032         (collect_matching_scripts_data): Adjust.
2033         (sort_scripts_by_name): Make suitable for std::sort.
2034         (print_scripts): Don't sort vector, adjust to std::vector.
2035         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2036
2037 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2038
2039         * symfile.c (filename_language): Make struct, not typedef.  Add
2040         constructor.
2041         <ext>: Change type to std::string.
2042         (DEF_VEC_O (filename_language)): Remove.
2043         (filename_language_table): Change type to std::vector.
2044         (add_filename_language): Adjust.
2045         (set_ext_lang_command): Adjust.
2046         (info_ext_lang_command): Adjust.
2047         (deduce_language_from_filename): Adjust.
2048         (class scoped_restore_filename_language_table): Remove.
2049         (test_filename_language): Use scoped_restore.
2050         (test_set_ext_lang_command): Use scoped_restore, adjust to
2051         std::vector change.
2052
2053 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2054
2055         * symfile.c: Include selftest.h.
2056         (class scoped_restore_filename_language_table): New.
2057         (test_filename_language): New test.
2058         (test_set_ext_lang_command): New test.
2059         (_initialize_symfile): Register tests.
2060
2061 2017-10-27  Keith Seitz  <keiths@redhat.com>
2062
2063         * breakpoint.c (print_breakpoint_location): Use the symbol saved
2064         in the bp_location, falling back to find_pc_sect_function when
2065         needed.
2066         (add_location_to_breakpoint): Save sal->symbol.
2067         * breakpoint.h (struct bp_location) <symbol>: New field.
2068         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2069         * symtab.h (struct symtab_and_line) <symbol>: New field.
2070
2071 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
2072
2073         PR gdb/13669
2074         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2075         to rewind obstack.
2076
2077 2017-10-26  Pedro Alves  <palves@redhat.com>
2078
2079         * remote.c (remote_async_terminal_ours_p): Delete.
2080         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2081         Remove references to 'remote_async_terminal_ours_p'.
2082
2083 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2084
2085         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2086
2087 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2088
2089         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2090         aspace const.
2091         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2092         Likewise.
2093         * breakpoint.c (bpstat_check_location): Remove cast.
2094         (breakpoint_hit_catch_fork): Make aspce const.
2095         (breakpoint_hit_catch_solib): Likewise.
2096         (breakpoint_hit_catch_exec): Likewise.
2097         (breakpoint_hit_ranged_breakpoint): Likewise.
2098         (breakpoint_hit_watchpoint): Likewise.
2099         (base_breakpoint_breakpoint_hit): Likewise.
2100         (bkpt_breakpoint_hit): Likewise.
2101         (dprintf_breakpoint_hit): Likewise.
2102         (tracepoint_breakpoint_hit): Likewise.
2103         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2104
2105 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2106
2107         * breakpoint.c (breakpoint_location_address_match): Change
2108         "struct address_space *" to "const address_space".
2109         (breakpoint_location_address_range_overlap): Likewise.
2110         (breakpoint_here_p): Likewise.
2111         (breakpoint_in_range_p): Likewise.
2112         (moribund_breakpoint_here_p): Likewise.
2113         (bp_location_inserted_here_p): Likewise.
2114         (software_breakpoint_inserted_here_p): Likewise.
2115         (hardware_breakpoint_inserted_here_p): Likewise.
2116         (hardware_watchpoint_inserted_in_range): Likewise.
2117         (bpstat_check_location): Likewise.
2118         (bpstat_stop_status): Likewise.
2119         (breakpoint_address_match): Likewise.
2120         (breakpoint_address_match_range): Likewise.
2121         (breakpoint_location_address_match): Likewise.
2122         (breakpoint_location_address_range_overlap): Likewise.
2123         (insert_single_step_breakpoint): Likewise.
2124         (breakpoint_has_location_inserted_here): Likewise.
2125         (single_step_breakpoint_inserted_here_p): Likewise.
2126         (pc_at_non_inline_function): Likewise.
2127         * breakpoint.h (bpstat_stop_status): Update declaration.
2128         (breakpoint_here_p): Likewise.
2129         (breakpoint_in_range_p): Likewise.
2130         (moribund_breakpoint_here_p): Likewise.
2131         (breakpoint_inserted_here_p): Likewise.
2132         (software_breakpoint_inserted_here_p): Likewise.
2133         (hardware_breakpoint_inserted_here_p): Likewise.
2134         (breakpoint_has_location_inserted_here): Likewise.
2135         (single_step_breakpoint_inserted_here_p): Likewise.
2136         (hardware_watchpoint_inserted_in_range): Likewise.
2137         (breakpoint_address_match): Likewise.
2138         (insert_single_step_breakpoint): Likewise.
2139         (pc_at_non_inline_function): Likewise.
2140         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2141         * record.c (record_check_stopped_by_breakpoint): Likewise.
2142         * record.h (record_check_stopped_by_breakpoint): Likewise.
2143         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2144
2145 2017-10-25  Yao Qi  <yao.qi@linaro.org>
2146
2147         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2148         regcache->arch () instead get_regcache_arch.
2149         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2150         Likewise.
2151         (aarch64_fbsd_store_inferior_registers): Likewise.
2152         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2153         (store_gregs_to_thread): Likewise.
2154         (fetch_fpregs_from_thread): Likewise.
2155         (store_fpregs_to_thread): Likewise.
2156         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2157         (aarch64_store_return_value): Likewise.
2158         (aarch64_software_single_step): Likewise.
2159         * aix-thread.c (aix_thread_wait): Likewise.
2160         (supply_reg32): Likewise.
2161         (supply_sprs64): Likewise.
2162         (supply_sprs32): Likewise.
2163         (fill_gprs64): Likewise.
2164         (fill_gprs32): Likewise.
2165         (fill_sprs64): Likewise.
2166         (fill_sprs32): Likewise.
2167         (store_regs_user_thread): Likewise.
2168         (store_regs_kernel_thread): Likewise.
2169         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2170         (alphabsd_store_inferior_registers): Likewise.
2171         * alpha-tdep.c (alpha_extract_return_value): Likewise.
2172         (alpha_store_return_value): Likewise.
2173         (alpha_deal_with_atomic_sequence): Likewise.
2174         (alpha_next_pc): Likewise.
2175         (alpha_software_single_step): Likewise.
2176         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2177         (amd64bsd_store_inferior_registers): Likewise.
2178         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2179         Likewise.
2180         (amd64_linux_store_inferior_registers): Likewise.
2181         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2182         (amd64_collect_native_gregset): Likewise.
2183         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2184         (amd64obsd_collect_uthread): Likewise.
2185         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2186         (amd64_collect_fpregset): Likewise.
2187         (amd64_supply_fxsave): Likewise.
2188         (amd64_supply_xsave): Likewise.
2189         (amd64_collect_fxsave): Likewise.
2190         (amd64_collect_xsave): Likewise.
2191         * arc-tdep.c (arc_write_pc): Likewise.
2192         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2193         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2194         (arm_fbsd_store_inferior_registers): Likewise.
2195         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2196         (store_vfp_regs): Likewise.
2197         (arm_linux_fetch_inferior_registers): Likewise.
2198         (arm_linux_store_inferior_registers): Likewise.
2199         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2200         (arm_linux_sigreturn_next_pc): Likewise.
2201         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2202         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2203         (fetch_register): Likewise.
2204         (store_register): Likewise.
2205         * arm-tdep.c (arm_is_thumb): Likewise.
2206         (displaced_in_arm_mode): Likewise.
2207         (bx_write_pc): Likewise.
2208         (arm_get_next_pcs_addr_bits_remove): Likewise.
2209         (arm_software_single_step): Likewise.
2210         (arm_extract_return_value): Likewise.
2211         (arm_store_return_value): Likewise.
2212         (arm_write_pc): Likewise.
2213         * bfin-tdep.c (bfin_extract_return_value): Likewise.
2214         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2215         (bsd_uthread_store_registers): Likewise.
2216         * core-regset.c (fetch_core_registers): Likewise.
2217         * corelow.c (get_core_registers): Likewise.
2218         * cris-tdep.c (cris_store_return_value): Likewise.
2219         (cris_extract_return_value): Likewise.
2220         (find_step_target): Likewise.
2221         (find_step_target): Likewise.
2222         (cris_software_single_step): Likewise.
2223         * ctf.c (ctf_fetch_registers): Likewise.
2224         * darwin-nat.c (cancel_breakpoint): Likewise.
2225         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2226         * frv-tdep.c (frv_extract_return_value): Likewise.
2227         * ft32-tdep.c (ft32_store_return_value): Likewise.
2228         (ft32_extract_return_value): Likewise.
2229         * go32-nat.c (fetch_register): Likewise.
2230         (go32_fetch_registers): Likewise.
2231         (go32_store_registers): Likewise.
2232         (store_register): Likewise.
2233         * h8300-tdep.c (h8300_extract_return_value): Likewise.
2234         (h8300_store_return_value): Likewise.
2235         * hppa-linux-nat.c (fetch_register): Likewise.
2236         (store_register): Likewise.
2237         (hppa_linux_fetch_inferior_registers): Likewise.
2238         (hppa_linux_store_inferior_registers): Likewise.
2239         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2240         (i386_darwin_store_inferior_registers): Likewise.
2241         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2242         (gnu_store_registers): Likewise.
2243         * i386-linux-nat.c (fetch_register): Likewise.
2244         (store_register): Likewise.
2245         (supply_gregset): Likewise.
2246         (fill_gregset): Likewise.
2247         (i386_linux_fetch_inferior_registers): Likewise.
2248         (i386_linux_store_inferior_registers): Likewise.
2249         (i386_linux_resume): Likewise.
2250         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2251         Likewise.
2252         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2253         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2254         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2255         (i386obsd_collect_uthread): Likewise.
2256         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2257         (i386_supply_gregset): Likewise.
2258         (i386_collect_gregset): Likewise.
2259         (i386_supply_fpregset): Likewise.
2260         (i386_collect_fpregset): Likewise.
2261         (i386_mpx_bd_base): Likewise.
2262         * i386-v4-nat.c (supply_fpregset): Likewise.
2263         (fill_fpregset): Likewise.
2264         * i387-tdep.c (i387_supply_fsave): Likewise.
2265         (i387_collect_fsave): Likewise.
2266         (i387_supply_fxsave): Likewise.
2267         (i387_collect_fxsave): Likewise.
2268         (i387_supply_xsave): Likewise.
2269         (i387_collect_xsave): Likewise.
2270         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2271         (ia64_linux_store_registers): Likewise.
2272         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2273         (ia64_extract_return_value): Likewise.
2274         (ia64_store_return_value): Likewise.
2275         (find_func_descr): Likewise.
2276         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2277         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2278         (inf_ptrace_store_registers): Likewise.
2279         * infrun.c (use_displaced_stepping): Likewise.
2280         (displaced_step_prepare_throw): Likewise.
2281         (resume): Likewise.
2282         (proceed): Likewise.
2283         (do_target_wait): Likewise.
2284         (adjust_pc_after_break): Likewise.
2285         (handle_inferior_event_1): Likewise.
2286         (handle_signal_stop): Likewise.
2287         (save_infcall_suspend_state): Likewise.
2288         (restore_infcall_suspend_state): Likewise.
2289         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2290         * jit.c (jit_frame_prev_register): Likewise.
2291         * linux-nat.c (save_stop_reason): Likewise.
2292         (linux_nat_wait_1): Likewise.
2293         (resume_stopped_resumed_lwps): Likewise.
2294         * linux-record.c (record_linux_sockaddr): Likewise.
2295         (record_linux_msghdr): Likewise.
2296         (record_linux_system_call): Likewise.
2297         * linux-tdep.c (linux_collect_thread_registers): Likewise.
2298         * lm32-tdep.c (lm32_extract_return_value): Likewise.
2299         (lm32_store_return_value): Likewise.
2300         * m32c-tdep.c (m32c_read_flg): Likewise.
2301         (m32c_pseudo_register_read): Likewise.
2302         (m32c_pseudo_register_write): Likewise.
2303         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2304         (m32r_linux_collect_gregset): Likewise.
2305         * m32r-tdep.c (m32r_store_return_value): Likewise.
2306         (m32r_extract_return_value): Likewise.
2307         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2308         (m68kbsd_collect_fpregset): Likewise.
2309         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2310         * m68k-linux-nat.c (fetch_register): Likewise.
2311         (old_fetch_inferior_registers): Likewise.
2312         (old_store_inferior_registers): Likewise.
2313         (store_regs): Likewise.
2314         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2315         (m68k_svr4_store_return_value): Likewise.
2316         * m88k-tdep.c (m88k_store_arguments): Likewise.
2317         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2318         (mi_cmd_data_write_register_values): Likewise.
2319         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2320         (mips_fbsd_store_inferior_registers): Likewise.
2321         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2322         (mips_fbsd_supply_gregs): Likewise.
2323         (mips_fbsd_collect_fpregs): Likewise.
2324         (mips_fbsd_collect_gregs): Likewise.
2325         (mips_fbsd_supply_fpregset): Likewise.
2326         (mips_fbsd_collect_fpregset): Likewise.
2327         (mips_fbsd_supply_gregset): Likewise.
2328         (mips_fbsd_collect_gregset): Likewise.
2329         * mips-linux-nat.c (supply_gregset): Likewise.
2330         (fill_gregset): Likewise.
2331         (supply_fpregset): Likewise.
2332         (fill_fpregset): Likewise.
2333         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2334         (mips_fill_gregset): Likewise.
2335         (mips_supply_fpregset): Likewise.
2336         (mips_fill_fpregset): Likewise.
2337         (mips64_supply_gregset): Likewise.
2338         (micromips_linux_sigframe_validate): Likewise.
2339         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2340         (mipsnbsd_fetch_inferior_registers): Likewise.
2341         (mipsnbsd_store_inferior_registers): Likewise.
2342         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2343         (mipsnbsd_supply_gregset): Likewise.
2344         (mipsnbsd_iterate_over_regset_sections): Likewise.
2345         (mipsnbsd_supply_reg): Likewise.
2346         (mipsnbsd_supply_fpreg): Likewise.
2347         * mips-tdep.c (mips_in_frame_stub): Likewise.
2348         (mips_dummy_id): Likewise.
2349         (is_octeon_bbit_op): Likewise.
2350         (micromips_bc1_pc): Likewise.
2351         (extended_mips16_next_pc): Likewise.
2352         (mips16_next_pc): Likewise.
2353         (deal_with_atomic_sequence): Likewise.
2354         * moxie-tdep.c (moxie_process_readu): Likewise.
2355         * nios2-tdep.c (nios2_get_next_pc): Likewise.
2356         * nto-procfs.c (procfs_store_registers): Likewise.
2357         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2358         (ppcfbsd_store_inferior_registers): Likewise.
2359         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2360         (fetch_altivec_register): Likewise.
2361         (get_spe_registers): Likewise.
2362         (fetch_spe_register): Likewise.
2363         (fetch_altivec_registers): Likewise.
2364         (fetch_all_gp_regs): Likewise.
2365         (fetch_all_fp_regs): Likewise.
2366         (store_vsx_register): Likewise.
2367         (store_altivec_register): Likewise.
2368         (set_spe_registers): Likewise.
2369         (store_spe_register): Likewise.
2370         (store_altivec_registers): Likewise.
2371         (store_all_gp_regs): Likewise.
2372         (store_all_fp_regs): Likewise.
2373         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2374         (ppc_linux_collect_gregset): Likewise.
2375         (ppc_canonicalize_syscall): Likewise.
2376         (ppc_linux_record_signal): Likewise.
2377         (ppu2spu_prev_register): Likewise.
2378         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2379         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2380         (ppcobsd_store_registers): Likewise.
2381         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2382         Likewise.
2383         (ppc_ravenscar_generic_store_registers): Likewise.
2384         * procfs.c (procfs_fetch_registers): Likewise.
2385         (procfs_store_registers): Likewise.
2386         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2387         (ravenscar_store_registers): Likewise.
2388         (ravenscar_prepare_to_store): Likewise.
2389         * record-btrace.c (record_btrace_fetch_registers): Likewise.
2390         * record-full.c (record_full_wait_1): Likewise.
2391         (record_full_registers_change): Likewise.
2392         (record_full_store_registers): Likewise.
2393         (record_full_core_fetch_registers): Likewise.
2394         (record_full_save): Likewise.
2395         (record_full_goto_insn): Likewise.
2396         * regcache.c (regcache_register_size): Likewise.
2397         (get_regcache_arch): Remove.
2398         (regcache_read_pc): Likewise.
2399         * regcache.h (get_regcache_arch): Remove.
2400         * remote-sim.c (gdbsim_fetch_register): Likewise.
2401         (gdbsim_store_register): Likewise.
2402         * remote.c (fetch_register_using_p): Likewise.
2403         (send_g_packet): Likewise.
2404         (remote_prepare_to_store): Likewise.
2405         (store_registers_using_G): Likewise.
2406         * reverse.c (save_bookmark_command): Likewise.
2407         (goto_bookmark_command): Likewise.
2408         * rs6000-aix-tdep.c (branch_dest): Likewise.
2409         * rs6000-nat.c (rs6000_ptrace64): Likewise.
2410         (fetch_register): Likewise.
2411         * rs6000-tdep.c (ppc_supply_reg): Likewise.
2412         (ppc_collect_reg): Likewise.
2413         (ppc_collect_gregset): Likewise.
2414         (ppc_collect_fpregset): Likewise.
2415         (ppc_collect_vsxregset): Likewise.
2416         (ppc_collect_vrregset): Likewise.
2417         (ppc_displaced_step_hw_singlestep): Likewise.
2418         (rs6000_pseudo_register_read): Likewise.
2419         (rs6000_pseudo_register_write): Likewise.
2420         * s390-linux-nat.c (supply_gregset): Likewise.
2421         (fill_gregset): Likewise.
2422         (s390_linux_fetch_inferior_registers): Likewise.
2423         * s390-linux-tdep.c (s390_write_pc): Likewise.
2424         (s390_software_single_step): Likewise.
2425         (s390_all_but_pc_registers_record): Likewise.
2426         (s390_linux_syscall_record): Likewise.
2427         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2428         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2429         (shnbsd_store_inferior_registers): Likewise.
2430         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2431         (sh_extract_return_value_fpu): Likewise.
2432         (sh_store_return_value_nofpu): Likewise.
2433         (sh_corefile_supply_regset): Likewise.
2434         (sh_corefile_collect_regset): Likewise.
2435         * sh64-tdep.c (sh64_extract_return_value): Likewise.
2436         (sh64_store_return_value): Likewise.
2437         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2438         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2439         (sparc_store_inferior_registers): Likewise.
2440         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2441         (sparc_ravenscar_prepare_to_store): Likewise.
2442         * sparc-tdep.c (sparc32_store_arguments): Likewise.
2443         (sparc_analyze_control_transfer): Likewise.
2444         (sparc_step_trap): Likewise.
2445         (sparc_software_single_step): Likewise.
2446         (sparc32_gdbarch_init): Likewise.
2447         (sparc_supply_rwindow): Likewise.
2448         (sparc_collect_rwindow): Likewise.
2449         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2450         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2451         (sparc64nbsd_collect_gregset): Likewise.
2452         (sparc64nbsd_supply_fpregset): Likewise.
2453         (sparc64nbsd_collect_fpregset): Likewise.
2454         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2455         (sparc64_supply_gregset): Likewise.
2456         (sparc64_collect_gregset): Likewise.
2457         (sparc64_supply_fpregset): Likewise.
2458         (sparc64_collect_fpregset): Likewise.
2459         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2460         * spu-tdep.c (spu_unwind_sp): Likewise.
2461         (spu2ppu_prev_register): Likewise.
2462         (spu_memory_remove_breakpoint): Likewise.
2463         * stack.c (return_command): Likewise.
2464         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2465         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2466         * tracefile.c (trace_save_ctf): Likewise.
2467         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2468         (do_windows_store_inferior_registers): Likewise.
2469         (windows_resume): Likewise.
2470         * xtensa-linux-nat.c (fill_gregset): Likewise.
2471         (supply_gregset_reg): Likewise.
2472         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2473         (xtensa_register_read_masked): Likewise.
2474         (xtensa_supply_gregset): Likewise.
2475         (xtensa_extract_return_value): Likewise.
2476         (xtensa_store_return_value): Likewise.
2477
2478 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2479
2480         * doublest.c (floatformat_from_string): New function.
2481         * doublest.h (floatformat_from_string): Add prototype.
2482
2483         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2484         (OP_FLOAT): ... this.
2485         * expression.h: Do not include "doublest.h".
2486         (union exp_element): Replace doubleconst and decfloatconst by
2487         new element floatconst.
2488         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2489         (ada_evaluate_subexp): Likewise.
2490         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2491         OP_DOUBLE and OP_DECFLOAT.
2492         * expprint.c (print_subexp_standard): Likewise.
2493         (dump_subexp_body_standard): Likewise.
2494         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2495
2496         * parse.c: Include "dfp.h".
2497         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2498         (write_exp_elt_floatcst): New function.
2499         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2500         and OP_DECFLOAT.
2501         (operator_check_standard): Likewise.
2502         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2503         Return target format buffer instead of host DOUBLEST.
2504         Use floatformat_from_string and decimal_from_string to parse
2505         either binary or decimal floating-point types.
2506         (parse_c_float): Remove.
2507         * parser-defs.h: Do not include "doublest.h".
2508         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2509         (write_exp_elt_floatcst): Add prototype.
2510         (parse_float): Update prototype.
2511         (parse_c_float): Remove.
2512
2513         * c-exp.y: Do not include "dfp.h".
2514         (typed_val_float): Use byte buffer instead of DOUBLEST.
2515         (typed_val_decfloat): Remove.
2516         (DECFLOAT): Remove.
2517         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2518         (parse_number): Update to new parse_float interface.
2519         Parse suffixes and determine type before calling parse_float.
2520         Handle decimal and binary FP types the same way.
2521
2522         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2523         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2524         (parse_number): Update to new parse_float interface.
2525         Parse suffixes and determine type before calling parse_float.
2526
2527         * f-exp.y: Replace dval by typed_val_float.
2528         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2529         (parse_number): Use parse_float instead of atof.
2530
2531         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2532         (parse_go_float): Remove.
2533         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2534         (parse_number): Call parse_float instead of parse_go_float.
2535         Parse suffixes and determine type before calling parse_float.
2536
2537         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2538         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2539         (parse_number): Update to new parse_float interface.
2540         Parse suffixes and determine type before calling parse_float.
2541
2542         * m2-exp.y: Replace dval by byte buffer val.
2543         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2544         (parse_number): Call parse_float instead of atof.
2545
2546         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2547         (lex_number): Call parse_float instead of strtod.
2548         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2549         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2550         Use write_exp_elt_floatcst.
2551         (unit_testing): Remove static variable.
2552         (rust_type): Do not check unit_testing.
2553         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2554
2555         * ada-exp.y (type_float, type_double): Remove.
2556         (typed_val_float): Use byte buffer instead of DOUBLEST.
2557         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2558         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2559
2560 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2561
2562         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2563         * arch/aarch64.h: New file.
2564
2565 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2566
2567         * dfp.h (decimal_from_string): Use const reference for argument.
2568         * dfp.c (decimal_from_string): Likewise.
2569
2570 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2571
2572         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2573         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2574         * mips-tdep.c (mips_print_fp_register): Likewise.
2575
2576 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2577
2578         * common/format.h (enum argclass): Replace decfloat_arg by
2579         dec32float_arg, dec64float_arg, and dec128float_arg.
2580         * common/format.c (parse_format_string): Update to return
2581         new decimal float argument classes.
2582
2583         * printcmd.c (printf_decfloat): Rename to ...
2584         (printf_floating): ... this.  Add argclass argument, and use it
2585         instead of parsing the format string again.  Add support for
2586         binary floating-point values, using floatformat_to_string.
2587         Convert value to the target format if it doesn't already match.
2588         (ui_printf): Call printf_floating instead of printf_decfloat,
2589         also for double_arg / long_double_arg.  Pass argclass.
2590
2591         * dfp.c (decimal_to_string): Add format string argument.
2592         * dfp.h (decimal_to_string): Likewise.
2593
2594         * doublest.c (floatformat_to_string): Add format string argument.
2595         * doublest.h (floatformat_to_string): Likewise.
2596
2597 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2598
2599         * doublest.c (floatformat_precision): New routine.
2600         (floatformat_to_string): Likewise.
2601         * doublest.c (floatformat_to_string): Add prototype.
2602
2603         * printcmd.c (print_scalar_formatted): Only call print_floating
2604         on floating-point types.
2605         * valprint.c: Do not include "floatformat.h".
2606         (generic_val_print_decfloat): Remove.
2607         (generic_val_print): Call generic_val_print_float for both
2608         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2609         (print_floating): Use floatformat_to_string.  Handle decimal float.
2610         (print_decimal_floating): Remove, merge into floatformat_to_string.
2611         * value.h (print_decimal_floating): Remove.
2612
2613         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2614
2615 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2616
2617         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2618
2619 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2620
2621         * memattr.h: Don't include vec.h.
2622         (struct mem_attrib): Initialize fields.
2623         <unknown>: New static method.
2624         (struct mem_region): Add constructors, operator<, initialize
2625         fields.
2626         * memattr.c: Include algorithm.
2627         (default_mem_attrib, unknown_mem_attrib): Remove.
2628         (user_mem_region_list): New global.
2629         (target_mem_region_list, mem_region_list): Change type to
2630         std::vector<mem_region>.
2631         (mem_use_target): Now a function.
2632         (target_mem_regions_valid): Change type to bool.
2633         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2634         (require_user_regions): Adjust.
2635         (require_target_regions): Adjust.
2636         (create_mem_region): Adjust.
2637         (lookup_mem_region): Adjust.
2638         (invalidate_target_mem_regions): Adjust.
2639         (mem_clear): Rename to...
2640         (user_mem_clear): ... this, and adjust.
2641         (mem_command): Adjust.
2642         (info_mem_command): Adjust.
2643         (mem_enable, enable_mem_command, mem_disable,
2644         disable_mem_command): Adjust.
2645         (mem_delete): Adjust.
2646         (delete_mem_command): Adjust.
2647         * memory-map.h (parse_memory_map): Return an std::vector.
2648         * memory-map.c (parse_memory_map): Likewise.
2649         (struct memory_map_parsing_data): Add constructor.
2650         <memory_map>: Point to std::vector.
2651         (memory_map_start_memory): Adjust.
2652         (memory_map_end_memory): Adjust.
2653         (memory_map_end_property): Adjust.
2654         (clear_result): Remove.
2655         * remote.c (remote_memory_map): Return an std::vector.
2656         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2657         Remove.
2658         (target_debug_print_mem_region_vector): New.
2659         * target-delegates.c: Regenerate.
2660         * target.h (mem_region_vector): New typedef.
2661         (to_memory_map): Return mem_region_vector.
2662         (target_memory_map): Return an std::vector.
2663         * target.c (target_memory_map): Return an std::vector.
2664         (flash_erase_command): Adjust.
2665
2666 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2667
2668         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2669         Change type to std::string.
2670         (memory_map_start_property): Adjust.
2671         (memory_map_end_property): Adjust.
2672
2673 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2674
2675         * infrun.h: Include common/byte-vector.h.
2676         (struct displaced_step_closure): New struct.
2677         (struct buf_displaced_step_closure): New struct.
2678         * infrun.c (displaced_step_closure::~displaced_step_closure):
2679         Provide default implementation.
2680         (displaced_step_clear): Deallocate step closure with delete.
2681         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2682         (aarch64_displaced_step_closure): ... this, extend
2683         displaced_step_closure.
2684         (aarch64_displaced_step_data) <dsc>: Change type to
2685         aarch64_displaced_step_closure.
2686         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2687         unique_ptr.
2688         (aarch64_displaced_step_fixup): Add cast for displaced step
2689         closure.
2690         * amd64-tdep.c (displaced_step_closure): Rename to ...
2691         (amd64_displaced_step_closure): ... this, extend
2692         displaced_step_closure.
2693         <insn_buf>: Change type to std::vector<gdb_byte>.
2694         <max_len>: Remove.
2695         (fixup_riprel): Change type of DSC parameter, adjust to type
2696         change of insn_buf.
2697         (fixup_displaced_copy): Change type of DSC parameter.
2698         (amd64_displaced_step_copy_insn): Instantiate
2699         amd64_displaced_step_closure.
2700         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2701         to type change of insn_buf.
2702         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2703         parameter DSC.
2704         (arm_linux_copy_svc): Likewise.
2705         (cleanup_kernel_helper_return): Likewise.
2706         (arm_catch_kernel_helper_return): Likewise.
2707         (arm_linux_displaced_step_copy_insn): Instantiate
2708         arm_displaced_step_closure.
2709         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2710         (displaced_read_reg): Change type of parameter DSC.
2711         (branch_write_pc): Likewise.
2712         (load_write_pc): Likewise.
2713         (alu_write_pc): Likewise.
2714         (displaced_write_reg): Likewise.
2715         (arm_copy_unmodified): Likewise.
2716         (thumb_copy_unmodified_32bit): Likewise.
2717         (thumb_copy_unmodified_16bit): Likewise.
2718         (cleanup_preload): Likewise.
2719         (install_preload): Likewise.
2720         (arm_copy_preload): Likewise.
2721         (thumb2_copy_preload): Likewise.
2722         (install_preload_reg): Likewise.
2723         (arm_copy_preload_reg): Likewise.
2724         (cleanup_copro_load_store): Likewise.
2725         (install_copro_load_store): Likewise.
2726         (arm_copy_copro_load_store) Likewise.
2727         (thumb2_copy_copro_load_store): Likewise.
2728         (cleanup_branch): Likewise.
2729         (install_b_bl_blx): Likewise.
2730         (arm_copy_b_bl_blx): Likewise.
2731         (thumb2_copy_b_bl_blx): Likewise.
2732         (thumb_copy_b): Likewise.
2733         (install_bx_blx_reg): Likewise.
2734         (arm_copy_bx_blx_reg): Likewise.
2735         (thumb_copy_bx_blx_reg): Likewise.
2736         (cleanup_alu_imm): Likewise.
2737         (arm_copy_alu_imm): Likewise.
2738         (thumb2_copy_alu_imm): Likewise.
2739         (cleanup_alu_reg): Likewise.
2740         (install_alu_reg): Likewise.
2741         (arm_copy_alu_reg): Likewise.
2742         (thumb_copy_alu_reg): Likewise.
2743         (cleanup_alu_shifted_reg): Likewise.
2744         (install_alu_shifted_reg): Likewise.
2745         (arm_copy_alu_shifted_reg): Likewise.
2746         (cleanup_load): Likewise.
2747         (cleanup_store): Likewise.
2748         (arm_copy_extra_ld_st): Likewise.
2749         (install_load_store): Likewise.
2750         (thumb2_copy_load_literal): Likewise.
2751         (thumb2_copy_load_reg_imm): Likewise.
2752         (arm_copy_ldr_str_ldrb_strb): Likewise.
2753         (cleanup_block_load_all): Likewise.
2754         (cleanup_block_store_pc): Likewise.
2755         (cleanup_block_load_pc): Likewise.
2756         (arm_copy_block_xfer): Likewise.
2757         (thumb2_copy_block_xfer): Likewise.
2758         (cleanup_svc): Likewise.
2759         (install_svc): Likewise.
2760         (arm_copy_svc): Likewise.
2761         (thumb_copy_svc): Likewise.
2762         (arm_copy_undef): Likewise.
2763         (thumb_32bit_copy_undef): Likewise.
2764         (arm_copy_unpred): Likewise.
2765         (arm_decode_misc_memhint_neon): Likewise.
2766         (arm_decode_unconditional): Likewise.
2767         (arm_decode_miscellaneous): Likewise.
2768         (arm_decode_dp_misc): Likewise.
2769         (arm_decode_ld_st_word_ubyte): Likewise.
2770         (arm_decode_media): Likewise.
2771         (arm_decode_b_bl_ldmstm): Likewise.
2772         (arm_decode_ext_reg_ld_st): Likewise.
2773         (thumb2_decode_dp_shift_reg): Likewise.
2774         (thumb2_decode_ext_reg_ld_st): Likewise.
2775         (arm_decode_svc_copro): Likewise.
2776         (thumb2_decode_svc_copro): Likewise.
2777         (install_pc_relative): Likewise.
2778         (thumb_copy_pc_relative_16bit): Likewise.
2779         (thumb_decode_pc_relative_16bit): Likewise.
2780         (thumb_copy_pc_relative_32bit): Likewise.
2781         (thumb_copy_16bit_ldr_literal): Likewise.
2782         (thumb_copy_cbnz_cbz): Likewise.
2783         (thumb2_copy_table_branch): Likewise.
2784         (cleanup_pop_pc_16bit_all): Likewise.
2785         (thumb_copy_pop_pc_16bit): Likewise.
2786         (thumb_process_displaced_16bit_insn): Likewise.
2787         (decode_thumb_32bit_ld_mem_hints): Likewise.
2788         (thumb_process_displaced_32bit_insn): Likewise.
2789         (thumb_process_displaced_insn): Likewise.
2790         (arm_process_displaced_insn): Likewise.
2791         (arm_displaced_init_closure): Likewise.
2792         (arm_displaced_step_fixup): Add cast for closure.
2793         * arm-tdep.h: Include infrun.h.
2794         (displaced_step_closure): Rename to ...
2795         (arm_displaced_step_closure): ... this, extend
2796         displaced_step_closure.
2797         <u::svc::copy_svc_os>: Change type of parameter DSC.
2798         <cleanup>: Likewise.
2799         (arm_process_displaced_insn): Likewise.
2800         (arm_displaced_init_closure): Likewise.
2801         (displaced_read_reg): Likewise.
2802         (displaced_write_reg): Likewise.
2803         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2804         Adjust.
2805         * i386-tdep.h: Include infrun.h.
2806         (i386_displaced_step_closure): New typedef.
2807         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2808         i386_displaced_step_closure.
2809         (i386_displaced_step_fixup): Adjust.
2810         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2811         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2812         and unique_ptr.
2813         (ppc_displaced_step_fixup): Adjust.
2814         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2815         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2816         and unique_ptr.
2817         (s390_displaced_step_fixup): Adjust.
2818
2819 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2820
2821         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2822         Remove declarations.
2823
2824 2017-10-20  Tom Tromey  <tom@tromey.com>
2825
2826         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2827         std::vector.
2828         (gdb_bfd_record_inclusion): Update.
2829         (bfdp): Remove typedef.
2830
2831 2017-10-20  Tom Tromey  <tom@tromey.com>
2832
2833         * gdb_bfd.c (gdb_bfd_ref): Use new.
2834         (struct gdb_bfd_data): Add constructor, destructor, and member
2835         initializers.
2836         (gdb_bfd_unref): Use delete.
2837
2838 2017-10-20  Tom Tromey  <tom@tromey.com>
2839
2840         * exec.c (exec_file_attach): Use new_bfd_ref.
2841         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2842         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2843         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2844         new_bfd_ref.
2845         * gdb_bfd.h (new_bfd_ref): New function.
2846
2847 2017-10-20  Pedro Alves  <palves@redhat.com>
2848
2849         * main.c (captured_command_loop): Add attribute noinline.
2850
2851 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2852
2853         * interps.c (struct interp_factory): Add constructor.
2854         (interp_factory_p): Remove typedef.
2855         (DEF_VEC_P(interp_factory_p)): Remove.
2856         (interpreter_factories): Change type to std::vector.
2857         (interp_factory_register): Adjust.
2858         (interp_lookup): Adjust.
2859         (interpreter_completer): Adjust.
2860
2861 2017-10-19  Tom Tromey  <tom@tromey.com>
2862
2863         * break-catch-syscall.c (catch_syscall_completer): Use
2864         std::string, gdb::unique_xmalloc_ptr.
2865
2866 2017-10-19  Tom Tromey  <tom@tromey.com>
2867
2868         * infcall.c (call_function_by_hand_dummy): Use std::string.
2869
2870 2017-10-19  Tom Tromey  <tom@tromey.com>
2871
2872         * mi/mi-main.c (mi_cmd_execute): Update.
2873         * top.h (prepare_execute_command): Return scoped_value_mark.
2874         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2875         Add move constructor.
2876         * top.c (prepare_execute_command): Return scoped_value_mark.
2877         (execute_command): Update.
2878
2879 2017-10-19  Pedro Alves  <palves@redhat.com>
2880
2881         * xml-support.c (xml_fetch_content_from_file): Check fread's
2882         return.
2883
2884 2017-10-19  Pedro Alves  <palves@redhat.com>
2885
2886         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2887         async.
2888         (handle_error_fd): New function.
2889         (ser_base_async): Add/delete an event loop file handler for
2890         error_fd.
2891
2892 2017-10-19  Pedro Alves  <palves@redhat.com>
2893
2894         * xml-support.c (xml_fetch_content_from_file): Don't read in
2895         chunks.  Instead use fseek to determine the file's size, and read
2896         it in one go.
2897
2898 2017-11-18  Keith Seitz  <keiths@redhat.com>
2899
2900         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2901         types.
2902         Add whitespace to front of type name.
2903
2904 2017-10-18  Keith Seitz  <keiths@redhat.com>
2905
2906         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2907         DW_AT_accessibility.
2908
2909 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2910
2911         * features/tic6x-c62x-linux.c: Remove.
2912
2913 2017-10-17  Tom Tromey  <tom@tromey.com>
2914
2915         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2916         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2917         (do_mixed_source_and_assembly): Likewise.
2918
2919 2017-10-17  Tom Tromey  <tom@tromey.com>
2920
2921         * regcache.c (regcache::xfer_part): Remove assertion.
2922
2923 2017-10-17  Pedro Alves  <palves@redhat.com>
2924
2925         * xml-support.c (xml_fetch_content_from_file): Call
2926         unique_ptr::release() instead unique_ptr::get() when passing
2927         through xrealloc.
2928
2929 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2930
2931         * regcache.c (regcache::xfer_part): Remove parameters read and
2932         write, add parameter is_raw.  All callers are updated.
2933
2934 2017-10-16  Keith Seitz  <keiths@redhat.com>
2935
2936         * c-typeprint.c (enum access_specifier): Moved here from
2937         c_type_print_base.
2938         (output_access_specifier): New function.
2939         (c_type_print_base): Consider typedefs when assessing
2940         whether access labels are needed.
2941         Use output_access_specifier as needed.
2942         Output access specifier for typedefs, if needed.
2943         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2944         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2945         fields.
2946         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2947         accessor macros.
2948
2949 2017-10-16  Tom Tromey  <tom@tromey.com>
2950
2951         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2952         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2953         * target.c (target_fileio_read_stralloc): Update.
2954         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2955         * target.h (target_fileio_read_stralloc): Return
2956         unique_xmalloc_ptr.
2957
2958 2017-10-16  Tom Tromey  <tom@tromey.com>
2959
2960         * xml-syscall.c (xml_init_syscalls_info): Update.
2961         * xml-support.c (xinclude_start_include): Update.
2962         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2963         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2964         (xml_fetch_content_from_file): Likewise.
2965         * osdata.c (get_osdata): Update.
2966         * target.h (target_read_stralloc, target_get_osdata): Return
2967         unique_xmalloc_ptr.
2968         * solib-aix.c (solib_aix_get_library_list): Update.
2969         * solib-target.c (solib_target_current_sos): Update.
2970         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2971         * xml-tdesc.c (fetch_available_features_from_target): Update.
2972         (target_fetch_description_xml): Update.
2973         (file_read_description_xml): Update.
2974         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2975         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2976         (remote_pid_to_exec_file): Update.
2977         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2978         (target_get_osdata): Likewise.
2979
2980 2017-10-16  Tom Tromey  <tom@tromey.com>
2981
2982         * remote.c (remote_register_number_and_offset): Use std::vector.
2983         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2984         (putpkt_binary): Use gdb::def_vector.
2985         (compare_sections_command): Use gdb::byte_vector.
2986
2987 2017-10-16  Tom Tromey  <tom@tromey.com>
2988
2989         * ppc-linux-nat.c (hwdebug_insert_point): Use
2990         gdb::unique_xmalloc_ptr, XDUP.
2991
2992 2017-10-16  Tom Tromey  <tom@tromey.com>
2993
2994         * probe.c (parse_probes): Use std::string.
2995         (info_probes_for_ops, enable_probes_command)
2996         (disable_probes_command): Remove cleanups.
2997
2998 2017-10-16  Tom Tromey  <tom@tromey.com>
2999
3000         * buildsym.c (block_compar): Remove.
3001         (end_symtab_get_static_block): Use std::vector.
3002
3003 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
3004
3005         * memrange.h (struct mem_range): Define operator< and operator==.
3006         (mem_range_s): Remove.
3007         (DEF_VEC_O (mem_range_s)): Remove.
3008         (normalize_mem_ranges): Change parameter type to std::vector.
3009         * memrange.c (compare_mem_ranges): Remove.
3010         (normalize_mem_ranges): Change parameter type to std::vector,
3011         adjust to vector change.
3012         * exec.c (section_table_available_memory): Return vector, remove
3013         parameter.
3014         (section_table_read_available_memory): Adjust to std::vector
3015         change.
3016         * remote.c (remote_read_bytes): Adjust to std::vector
3017         change.
3018         * tracepoint.h (traceframe_available_memory): Change parameter
3019         type to std::vector.
3020         * tracepoint.c (traceframe_available_memory): Change parameter
3021         type to std::vector, adjust.
3022         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3023         std::vector change.
3024         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3025         unittests/memrange-selftests.c.
3026         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3027         * gdb/unittests/memrange-selftests.c: New file.
3028
3029 2017-10-16  Pedro Alves  <palves@redhat.com>
3030
3031         * elfread.c (probe_key_free): Rename range-for variable.
3032         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3033         (find_probe_by_pc, collect_probes): Rename range-for variable.
3034
3035 2017-10-16  Yao Qi  <yao.qi@linaro.org>
3036
3037         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3038         * features/tic6x-c62x.c: Remove.
3039         * features/tic6x-c64x-linux.c: Remove.
3040         * features/tic6x-c64x.c: Remove.
3041         * features/tic6x-c64xp-linux.c: Remove.
3042         * features/tic6x-c64xp.c: Remove.
3043         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3044         initialize_tdesc_tic6x_*_linux functions.
3045         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3046         initialize_tdesc_tic6x_* functions.
3047
3048 2017-10-16  Yao Qi  <yao.qi@linaro.org>
3049
3050         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3051         tic6x-c62x.
3052         * regformats/tic6x-c62x.dat: Remove.
3053         * regformats/tic6x-c64x.dat: Remove.
3054         * regformats/tic6x-c64xp.dat: Remove.
3055
3056 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
3057
3058         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3059         (the !HAVE_LIBEXPAT version).
3060
3061 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3062
3063         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3064         const.
3065
3066 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3067
3068         * target.h: Include tracepoint.h.
3069         (enum trace_find_type): Move to tracepoint.h.
3070         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3071         * tracepoint.h: Don't include target.h
3072         (enum trace_find_type): Move from target.h.
3073         (parse_traceframe_info): Return a unique ptr.
3074         * tracepoint.c (current_traceframe_info): Change type to unique
3075         ptr.
3076         (free_traceframe_info): Remove.
3077         (clear_traceframe_info): Don't manually free
3078         current_traceframe_info.
3079         (free_result): Remove.
3080         (parse_traceframe_info): Return a unique ptr.
3081         (get_traceframe_info): Adjust to unique ptr.
3082         * ctf.c (ctf_traceframe_info): Return a unique ptr.
3083         * remote.c (remote_traceframe_info): Return a unique ptr.
3084         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3085         ptr.
3086         * target-debug.h (target_debug_print_traceframe_info_up): New
3087         macro.
3088         * target-delegates.c: Regenerate.
3089
3090 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3091
3092         * memrange.h (struct mem_range): Add constructors.
3093         * tracepoint.h (struct traceframe_info) <memory>: Change type to
3094         std::vector<mem_range>.
3095         * tracepoint.c (free_traceframe_info): Don't manually free
3096         vector.
3097         (traceframe_info_start_memory): Adjust to vector change.
3098         (traceframe_available_memory): Likewise.
3099         * tracefile-tfile.c (build_traceframe_info): Likewise.
3100         * ctf.c (ctf_traceframe_info): Likewise.
3101
3102 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3103
3104         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3105         std::vector<int>.
3106         * tracepoint.c (free_traceframe_info): Deallocate with delete.
3107         (traceframe_info_start_tvar): Adjust to vector change.
3108         (parse_traceframe_info): Allocate with new.
3109         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3110         vector change.
3111         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3112         change.
3113         tfile_traceframe_info): Allocate with new.
3114         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3115         change.
3116
3117 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3118
3119         * tracepoint.c (traceframe_info): Rename to...
3120         (current_traceframe_info): ...this.
3121         (clear_traceframe_info): Adjust.
3122         (get_traceframe_info): Adjust.
3123
3124 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3125
3126         * nat/linux-osdata.c: Include algorithm.
3127         (compare_processes): Remove.
3128         (struct pid_pgid_entry): New struct.
3129         (linux_xfer_osdata_processgroups): Use std::vector instead of
3130         XNEWVEC.
3131
3132 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3133
3134         * objfiles.h: Don't include symfile.h.
3135         (struct partial_symbol): Remove forward-declaration.
3136         (struct objfile) <global_psymbols, static_psymbols>: Change type
3137         to std::vector<partial_symbol *>.
3138         * objfiles.c (objfile::objfile): Don't memset those fields.
3139         (objfile::~objfile): Don't free those fields.
3140         * psympriv.h (struct psymbol_allocation_list): Remove
3141         forward-declaration.
3142         (add_psymbol_to_list): Change psymbol_allocation_list parameter
3143         to std::vector.
3144         (start_psymtab_common): Change parameters to std::vector.
3145         * psymtab.c: Include algorithm.
3146         (require_partial_symbols): Call shrink_to_fit.
3147         (find_pc_sect_psymbol): Adjust to vector change.
3148         (match_partial_symbol): Likewise.
3149         (lookup_partial_symbol): Likewise.
3150         (psym_relocate): Likewise.
3151         (dump_psymtab): Likewise.
3152         (recursively_search_psymtabs): Likewise.
3153         (compare_psymbols): Remove.
3154         (sort_pst_symbols): Adjust to vector change.
3155         (start_psymtab_common): Likewise.
3156         (end_psymtab_common): Likewise.
3157         (psymbol_bcache_full): De-constify return value.
3158         (add_psymbol_to_bcache): Likewise.
3159         (extend_psymbol_list): Remove.
3160         (append_psymbol_to_list): Adjust to vector change.
3161         (add_psymbol_to_list): Likewise.
3162         (init_psymbol_list): Likewise.
3163         (maintenance_info_psymtabs): Likewise.
3164         (maintenance_check_psymtabs): Likewise.
3165         * symfile.h (struct psymbol_allocation_list): Remove.
3166         * symfile.c (reread_symbols): Adjust to vector change.
3167         * dbxread.c (start_psymtab): Change type of parameters.
3168         (dbx_symfile_read): Adjust to vector change.
3169         (read_dbx_symtab): Likewise.
3170         (start_psymtab): Change type of parameters.
3171         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3172         (create_partial_symtab): Likewise.
3173         (add_partial_symbol): Likewise.
3174         (write_one_signatured_type): Likewise.
3175         (recursively_write_psymbols): Likewise.
3176         * mdebugread.c (parse_partial_symbols): Likewise.
3177         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3178         (scan_xcoff_symtab): Adjust to vector change.
3179         (xcoff_initial_scan): Likewise.
3180
3181 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
3182
3183         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3184
3185 2017-10-13  Yao Qi  <yao.qi@linaro.org>
3186
3187         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3188         Remove s390x-*-expedite, add s390x-expedite.
3189
3190 2017-10-13  Yao Qi  <yao.qi@linaro.org>
3191
3192         * features/s390-gs-linux64.c: Regenerated.
3193         * features/s390x-gs-linux64.c: Regenerated.
3194
3195 2017-10-13  Tom Tromey  <tom@tromey.com>
3196
3197         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3198         * solib.c (update_solib_list, reload_shared_libraries_1): Use
3199         delete.
3200         * symfile.c (symbol_file_add_with_addrs): Use new.
3201         (symbol_file_add_separate): Update comment.
3202         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3203         * jit.c (jit_object_close_impl): Use new.
3204         (jit_unregister_code): Use delete.
3205         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3206         (~objfile): Rename from free_objfile.
3207         (free_objfile_separate_debug, do_free_objfile_cleanup)
3208         (free_all_objfiles, objfile_purge_solibs): Use delete.
3209         * objfiles.h (struct objfile): Add constructor and destructor.
3210         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
3211         (allocate_objfile, free_objfile): Don't declare.
3212         (struct objstats): Add initializers.
3213
3214 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3215
3216         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3217         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3218         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3219         * gdbarch.h: Regenerate.
3220         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3221         Adjust comment.
3222         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3223         (i386_displaced_step_fixup): Adjust comment.
3224         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3225
3226 2017-10-12  Tom Tromey  <tom@tromey.com>
3227
3228         * prologue-value.h (pv_area::store_would_trash): Return bool.
3229         (pv_area::find_reg): Likewise.
3230         * prologue-value.c (pv_area::store_would_trash): Return bool.
3231         (pv_area::find_reg): Likewise.
3232
3233 2017-10-12  Tom Tromey  <tom@tromey.com>
3234
3235         * s390-linux-tdep.c (s390_store, s390_load)
3236         (s390_check_for_saved, s390_analyze_prologue): Update.
3237         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3238         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3239         * prologue-value.h (class pv_area): Move from prologue-value.c.
3240         Change names of members.  Add constructor, destructor, member
3241         functions.
3242         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3243         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3244         (pv_area_fetch, pv_area_scan): Don't declare.
3245         * prologue-value.c (struct pv_area::area_entry): Now member of
3246         pv_area.
3247         (struct pv_area): Move to prologue-value.h.
3248         (pv_area::pv_area): Rename from make_pv_area.
3249         (pv_area::~pv_area): Rename from free_pv_area.
3250         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3251         (clear_entries, find_entry, overlaps, store_would_trash, store)
3252         (fetch, find_reg, scan): Now member of pv_area.
3253         Remove "area" argument.  Update.
3254         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3255         Update.
3256         * mn10300-tdep.c (push_reg, check_for_saved)
3257         (mn10300_analyze_prologue): Update.
3258         * mep-tdep.c (is_arg_spill, check_for_saved)
3259         (mep_analyze_prologue): Update.
3260         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3261         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3262         (m32c_is_struct_return, m32c_analyze_prologue): Update.
3263         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3264         Update.
3265         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3266         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3267
3268 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3269
3270         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3271         * linux-nat.c (linux_nat_delete_thread): New variable.
3272         (lwp_free): Invoke linux_nat_delete_thread if set.
3273         (linux_nat_set_delete_thread): New function.
3274         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3275         thread delete callback.
3276         * arm-linux-nat.c (arm_linux_delete_thread): New function.
3277         (_initialize_arm_linux_nat): Assign thread delete callback.
3278         * s390-linux-nat.c (s390_delete_thread): New function.
3279         (_initialize_s390_nat): Assign thread delete callback.
3280         * x86-linux-nat.c (x86_linux_add_target): Likewise.
3281         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3282         function.
3283         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3284         declaration.
3285         * nat/x86-linux.c (x86_linux_delete_thread): New function.
3286         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3287
3288 2017-10-09  Tom Tromey  <tom@tromey.com>
3289
3290         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3291         std::string.
3292         * tui/tui-layout.c (enum tui_status): Use std::string.
3293
3294 2017-10-11  Tom Tromey  <tom@tromey.com>
3295
3296         * gdbthread.h (thread_command): Constify.
3297         * inferior.h (detach_command): Constify.
3298         * top.h (set_history, show_history): Constify.
3299         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3300         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3301         * bsd-kvm.c (bsd_kvm_cmd): Constify.
3302         * printcmd.c (set_command): Constify.
3303         (non_const_set_command): New function.
3304         * dcache.c (set_dcache_command, show_dcache_command): Constify.
3305         * breakpoint.c (enable_command, disable_command, delete_command)
3306         (catch_command, tcatch_command, set_breakpoint_cmd)
3307         (show_breakpoint_cmd): Constify.
3308         * macrocmd.c (macro_command): Constify.
3309         * infcmd.c (unset_command, kill_command, detach_command)
3310         (info_proc_cmd): Constify.
3311         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3312         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3313         (info_auto_load_cmd): Constify.
3314         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3315         (unset_tdesc_cmd): Constify.
3316         * ada-lang.c (set_ada_command, show_ada_command)
3317         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3318         * guile/guile.c (set_guile_command, show_guile_command)
3319         (info_guile_command): Constify.
3320         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3321         Constify.
3322         * skip.c (skip_command): Constify.
3323         * compile/compile.c (_initialize_compile): Constify.
3324         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3325         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3326         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3327         (maint_btrace_pt_show_cmd): Constify.
3328         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3329         Constify.
3330         * python/python.c (user_show_python, user_set_python): Constify.
3331         * mips-tdep.c (set_mips_command, show_mips_command)
3332         (set_mipsfpu_command): Constify.
3333         * record-btrace.c (cmd_record_btrace_start)
3334         (cmd_set_record_btrace, cmd_show_record_btrace)
3335         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3336         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3337         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3338         Constify.
3339         * symfile.c (overlay_command): Constify.
3340         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3341         * cli/cli-logging.c (set_logging_command, show_logging_command):
3342         Constify.
3343         * cli/cli-dump.c (dump_command, append_command)
3344         (srec_dump_command, ihex_dump_command, verilog_dump_command)
3345         (tekhex_dump_command, binary_dump_command)
3346         (binary_append_command): Constify.
3347         * cli/cli-decode.c (struct cmd_list_element): Change type of
3348         "fun".
3349         * cli/cli-cmds.c (info_command, show_command, set_debug)
3350         (show_debug): Constify.
3351         (show_command): Add non-const overload.
3352         * top.c (set_history, show_history): Constify.
3353         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3354         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3355         * target.c (target_command): Constify.
3356         * sparc64-tdep.c (info_adi_command): Constify.
3357         * record-full.c (cmd_record_full_start): Constify.
3358         (set_record_full_command): Constify.  Fix typo.
3359         (show_record_full_command): Constify.
3360         * thread.c (thread_command, thread_apply_command): Constify.
3361         * memattr.c (dummy_cmd): Constify.
3362         * value.c (function_command): Constify.
3363         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3364         * probe.c (info_probes_command): Constify.
3365         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3366         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3367         (show_thread_cmd, set_thread_default_cmd)
3368         (show_thread_default_cmd): Constify.
3369         (check_empty): Constify.
3370         * tracepoint.c (tfind_command): Constify.
3371         * cp-support.c (maint_cplus_command): Constify.
3372         * windows-tdep.c (info_w32_command): Constify.
3373         * record.c (cmd_record_start, set_record_command)
3374         (show_record_command, info_record_command, cmd_record_goto):
3375         Constify.
3376         * ravenscar-thread.c (set_ravenscar_command)
3377         (show_ravenscar_command): Constify.
3378         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3379         Constify.
3380         (add_internal_problem_command): Remove casts.
3381         * arc-tdep.c (maintenance_print_arc_command): Constify.
3382         * valprint.c (set_print, show_print, set_print_raw)
3383         (show_print_raw): Constify.
3384         * maint.c (maintenance_command, maintenance_info_command)
3385         (maintenance_print_command, maintenance_set_cmd)
3386         (maintenance_show_cmd, set_per_command_cmd)
3387         (show_per_command_cmd, maintenance_check_command): Constify.
3388         * language.c (set_check, show_check): Constify.
3389         * typeprint.c (show_print_type, set_print_type): Constify.
3390         * go32-nat.c (go32_info_dos_command): Constify.
3391
3392 2017-10-11  Tom Tromey  <tom@tromey.com>
3393
3394         * breakpoint.c (prepare_re_set_context): Remove.
3395         (breakpoint_re_set_one): Update.  Don't use cleanups.
3396         (breakpoint_re_set): Use scoped_restore, std::string, and
3397         scoped_restore_current_language.
3398
3399 2017-10-11  Tom Tromey  <tom@tromey.com>
3400
3401         * breakpoint.c (commands_command_1): Use std::string.
3402         (cleanup_executing_breakpoints): Remove.
3403         (bpstat_do_actions_1): Use scoped_restore.
3404         (bpstat_check_watchpoint): Use std::string.
3405         (decode_static_tracepoint_spec): Likewise.
3406         (break_range_command): Likewise.
3407         (watch_command_1): Likewise.
3408         (compare_breakpoints): Change argument types.
3409         (clear_command): Use std::vector.
3410         (cleanup_executing_breakpoints): Remove.
3411         (update_global_location_list): Use unique_xmalloc_ptr.
3412         (strace_command): Remove unused declaration.
3413
3414 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3415
3416         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3417         * NEWS: Mention new FreeBSD/arm native configuration.
3418         * configure.host: Add arm*-*-freebsd*.
3419         * configure.nat: Likewise.
3420         * arm-fbsd-nat.c: New file.
3421
3422 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3423
3424         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3425         (ALLDEPFILES): Add arm-fbsd-tdep.c.
3426         * NEWS: Mention new FreeBSD/arm target.
3427         * configure.tgt: Add arm*-*-freebsd*.
3428         * arm-fbsd-tdep.c: New file.
3429         * arm-fbsd-tdep.h: New file.
3430
3431 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3432
3433         * linux-tdep.c (linux_make_corefile_notes): Remove call to
3434         `gdbarch_elfcore_write_linux_prpsinfo'.
3435         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3436         method.
3437         (elf_internal_linux_prpsinfo): Remove declaration.
3438         * gdbarch.h: Regenerate.
3439         * gdbarch.c: Regenerate.
3440
3441 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3442
3443         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3444         `set_gdbarch_elfcore_write_linux_prpsinfo'.
3445
3446 2017-10-11  Pedro Alves  <palves@redhat.com>
3447
3448         * breakpoint.c (reattach_breakpoints): Delete.
3449         * breakpoint.h (reattach_breakpoints): Delete.
3450
3451 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
3452
3453         * symfile.c (registered_sym_fns): Make struct, not typedef.
3454         (DEF_VEC_O (registered_sym_fns)): Remove.
3455         (symtab_fns): Change type to std::vector.
3456         (add_symtab_fns): Adjust.
3457         (find_sym_fns): Adjust.
3458
3459 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3460
3461         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3462         * arc-tdep.h (arc_arch_is_em): New function.
3463         (arc_arch_is_hs): Likewise.
3464
3465 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3466
3467         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3468         parentheses in the declaration.
3469         (macro_lookup_inclusion): Likewise.
3470         (macro_lookup_definition): Likewise.
3471         * p-lang.h (pascal_builtin_types): Likewise.
3472         * tui/tui-data.c (tui_win_list): Likewise.
3473         * tui/tui-data.h (tui_win_list): Likewise.
3474         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3475
3476 2017-10-11  Mark Rages  <markrages@gmail.com>
3477
3478         * target-memory.c (block_boundaries): Fix for block address not
3479         aligned on block size.
3480
3481 2017-10-10  Pedro Alves <palves@redhat.com>
3482             Tom Tromey  <tom@tromey.com>
3483
3484         * breakpoint.c (struct captured_breakpoint_query_args)
3485         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3486         (print_breakpoint): New.
3487         * breakpoint.h (print_breakpoint): Declare.
3488         * common/common-exceptions.h (enum return_reason): Remove
3489         references to catch_exceptions.
3490         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3491         Delete.
3492         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3493         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3494         * gdb.h: Delete.
3495         * gdbthread.h (thread_select): Declare.
3496         * mi/mi-cmd-break.c: Don't include gdb.h.
3497         (breakpoint_notify): Use print_breakpoint.
3498         * mi/mi-cmd-catch.c: Don't include gdb.h.
3499         * mi/mi-interp.c: Don't include gdb.h.
3500         (mi_print_breakpoint_for_event): New.
3501         (mi_breakpoint_created, mi_breakpoint_modified): Use
3502         mi_print_breakpoint_for_event.
3503         * mi/mi-main.c: Don't include gdb.h.
3504         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3505         thread_select instead of gdb_thread_select.
3506         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3507         of using gdb_list_thread_ids.
3508         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3509         FILEIO_ENOSYS here.
3510         (remote_fileio_request): Use TRY/CATCH instead of
3511         catch_exceptions.
3512         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3513         (symbol_file_add_from_memory_wrapper): Delete.
3514         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3515         * thread.c: Don't include gdb.h.
3516         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3517         (thread_alive): Use thread_select.
3518         (do_captured_thread_select): Delete, parts salvaged as ...
3519         (thread_select): ... this new function.
3520         (gdb_thread_select): Delete.
3521
3522 2017-10-10  Pedro Alves  <palves@redhat.com>
3523             Tom Tromey  <tom@tromey.com>
3524
3525         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3526         and reverse logic.
3527         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3528         No longer macros.  Instead ...
3529         (enum wp_check_result): They're now values of this new
3530         enumeration.
3531         (watchpoint_check): Change return type to wp_check_result and
3532         parameter type to bpstat.
3533         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3534         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3535         catch_errors.  Reverse logic of watchpoint_check call.
3536         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3537         pointer as parameter.
3538         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3539         * common/common-exceptions.c (throw_exception_sjlj): Update
3540         comments to avoid mentioning catch_errors.
3541         * exceptions.c (catch_errors): Delete.
3542         * exceptions.h: Update comments to avoid mentioning catch_errors.
3543         (catch_errors_ftype, catch_errors): Delete.
3544         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3545         (hook_stop_stub): Delete.
3546         (restore_selected_frame): Change return type to void, and
3547         parameter type to const frame_id &.
3548         (restore_infcall_control_state): Use TRY/CATCH instead of
3549         catch_errors.
3550         * main.c (captured_command_loop): Return void and remove
3551         parameter.  Remove references to catch_errors.
3552         (captured_main): Use TRY/CATCH instead of catch_errors.
3553         * objc-lang.c (objc_submethod_helper_data)
3554         (find_objc_msgcall_submethod_helper): Delete.
3555         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3556         catch_errors.
3557         * record-full.c (record_full_message): Return void.
3558         (record_full_message_args, record_full_message_wrapper): Delete.
3559         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3560         instead of catch_errors.
3561         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3562         parameter type to int.
3563         * solib-darwin.c (open_symbol_file_object): Ditto.
3564         * solib-dsbt.c (open_symbol_file_object): Ditto.
3565         * solib-frv.c (open_symbol_file_object): Ditto.
3566         * solib-svr4.c (open_symbol_file_object): Ditto.
3567         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3568         * solib.c (update_solib_list): Use TRY/CATCH instead of
3569         catch_errors.
3570         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3571         Change type.
3572         * symmisc.c (struct print_symbol_args): Remove.
3573         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3574         (print_symbol): Change type.
3575         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3576         and remove parameters.
3577         (catch_errors): New.
3578         (get_windows_debug_event): Adjust.
3579
3580 2017-10-09  Tom Tromey  <tom@tromey.com>
3581
3582         * mi/mi-main.c (free_splay_tree): Remove.
3583         (list_available_thread_groups): Use splay_tree_up.
3584         * common/gdb_splay_tree.h: New file.
3585
3586 2017-10-09  Tom Tromey  <tom@tromey.com>
3587
3588         * mi/mi-main.c (do_nothing): Remove.
3589         (list_available_thread_groups): Update.
3590
3591 2017-10-09  Pedro Alves  <palves@redhat.com>
3592
3593         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3594         reading registers when switching context.
3595
3596 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3597
3598         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3599         (fbsd_convert_siginfo): Likewise.
3600         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3601
3602 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3603
3604         * configure.ac (try_guile_versions): Remove guile-2.2.
3605         * configure: Regenerate.
3606
3607 2017-10-09  Tom Tromey  <tom@tromey.com>
3608
3609         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3610         (COMPILE.pre): Use $(CXX).
3611
3612 2017-10-09  Pedro Alves  <palves@redhat.com>
3613
3614         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3615         Use bool.
3616         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3617         * cp-support.h (cp_remove_params): Now returns a
3618         gdb::unique_xmalloc_ptr.
3619         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3620         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3621         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3622         returning a gdb::unique_xmalloc_ptr.
3623         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3624         * stack.c (find_frame_funname): Adjust to cp_remove_params
3625         returning a gdb::unique_xmalloc_ptr.
3626
3627 2017-10-08  Tom Tromey  <tom@tromey.com>
3628
3629         * dwarf2read.c (dwarf2_get_dwz_file): Use
3630         gdb::unique_xmalloc_ptr.
3631         (find_slot_in_mapped_hash): Likewise.
3632         (dwarf2_physname): Likewise.
3633         (create_dwo_unit_in_dwp_v1): Use std::string.
3634         (create_dwo_unit_in_dwp_v2): Likewise.
3635         (lookup_dwo_cutu): Likewise.
3636         (inherit_abstract_dies): Use std::vector.
3637         (read_array_type): Likewise.
3638         (dwarf_decode_macros): Remove unused declaration.
3639         (unsigned_int_compar): Remove.
3640         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3641         (psymtabs_addrmap_cleanup): Remove.
3642
3643 2017-10-08  Tom Tromey  <tom@tromey.com>
3644
3645         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3646         * frame.h (frame_cleanup_after_sniffer): Declare.
3647         (frame_prepare_for_sniffer): Return void.
3648         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3649         type of argument.
3650         (frame_prepare_for_sniffer): Return void.
3651
3652 2017-10-08  Tom Tromey  <tom@tromey.com>
3653
3654         * utils.h (make_cleanup_value_free): Remove.
3655         * utils.c (do_value_free, struct cleanup): Remove.
3656         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3657         Use gdb_value_up.
3658         * value.h (struct value_deleter): New.
3659         (gdb_value_up): New typedef.
3660
3661 2017-10-08  Tom Tromey  <tom@tromey.com>
3662
3663         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3664         (make_cleanup_free_search_symbols): Remove.
3665         (search_symbols): Return std::vector.
3666         (symbol_search::compare_search_syms): Now member of
3667         symbol_search.  Change arguments.
3668         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3669         (symtab_symbol_info, rbreak_command): Update.
3670         * symtab.h (struct symbol_search) <next>: Remove.
3671         Add constructors.
3672         (symbol_search::operator<): New function.
3673         (symbol_search::operator==): New function.
3674         (search_symbols): Remove std::vector.
3675         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3676         (symbol_search::compare_search_syms): Declare.
3677
3678 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3679
3680         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3681         arch/aarch64-insn.o.
3682         Remove one rule.
3683         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3684
3685 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3686
3687         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3688         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3689         arch/arm-linux.o respectively.
3690         * configure.tgt: Likewise.
3691
3692 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3693
3694         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3695         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3696
3697 2017-10-06  Pedro Alves  <palves@redhat.com>
3698
3699         * windows-nat.c: Include <algorithm>.
3700
3701 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3702
3703         * configure.tgt (i386_tobjs): New variable.
3704         (amd64_tobjs): New variable.
3705         Set $cpu_obs and $os_obs.
3706
3707 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3708
3709         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3710         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3711         (clean): Remove object files and dependency files.
3712         (distclean): Remove the directory.
3713         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3714         * configure: Re-generated.
3715         * configure.tgt: Replace amd64.o with arch/amd64.o.
3716
3717 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3718
3719         PR build/22188
3720         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3721         and SETEND.
3722
3723 2017-10-05  Pedro Alves  <palves@redhat.com>
3724
3725         * linux-nat.c (linux_child_follow_fork): When following the parent
3726         and detaching the child, consult the parent thread's architecture
3727         instead of the child's.
3728
3729 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3730
3731         * ax.h: Do not include "doublest.h".
3732         (union agent_val): Remove.
3733
3734 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3735
3736         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3737         (decimal_to_string): Return std::string object.
3738         (decimal_from_string): Accept std::string object.  Return bool.
3739         (decimal_from_integral, decimal_from_doublest): Remove.
3740         (decimal_from_longest): Add prototype.
3741         (decimal_from_ulongest): Likewise.
3742         (decimal_to_longest): Likewise.
3743         (decimal_from_doublest): Likewise.
3744         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3745         (MAX_DECIMAL_STRING): Move here.
3746         (decimal_to_string): Return std::string object.
3747         (decimal_from_string): Accept std::string object.  Return bool.
3748         (decimal_from_integral): Remove, replace by ...
3749         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3750         (decimal_to_longest): New function.
3751         (decimal_from_floating): Remove, replace by ...
3752         (decimal_from_doublest): ... this new function.
3753         (decimal_to_doublest): Update to new decimal_to_string interface.
3754
3755         * value.c (unpack_long): Use decimal_to_longest.
3756         * valops.c (value_cast): Use decimal_from_doublest instead of
3757         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3758         decimal_from_integral.
3759         * valarith.c (value_args_as_decimal): Likewise.
3760         * valprint.c (print_decimal_floating): Update to new
3761         decimal_to_string interface.
3762         * printcmd.c (printf_decfloat): Likewise.
3763         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3764
3765 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3766
3767         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3768         * gdbtypes.c: Include "floatformat.h".
3769         * value.c: Likewise.
3770         * m68k-tdep.c: Likewise.
3771
3772         * findvar.c: Do not include "floatformat.h".
3773         * amd64-darwin-tdep.c: Likewise.
3774         * arm-linux-tdep.c: Likewise.
3775         * i386-darwin-tdep.c: Likewise.
3776         * i387-tdep.c: Likewise.
3777         * m68k-linux-tdep.c: Likewise.
3778         * mep-tdep.c: Likewise.
3779         * mips-tdep.c: Likewise.
3780         * nios2-tdep.c: Likewise.
3781         * s390-linux-tdep.c: Likewise.
3782         * sparc-obsd-tdep.c: Likewise.
3783         * sparc-tdep.c: Likewise.
3784         * sparc64-tdep.c: Likewise.
3785         * spu-tdep.c: Likewise.
3786         * tic6x-tdep.c: Likewise.
3787         * tilegx-tdep.c: Likewise.
3788         * vax-tdep.c: Likewise.
3789         * xstormy16-tdep.c: Likewise.
3790         * xtensa-tdep.c: Likewise.
3791
3792         * top.c: Do not include "doublest.h".
3793         * aarch64-tdep.c: Likewise.
3794         * alpha-tdep.c: Likewise.
3795         * arm-linux-tdep.c: Likewise.
3796         * m68k-linux-tdep.c: Likewise.
3797         * tilegx-tdep.c: Likewise.
3798         * xstormy16-tdep.c: Likewise.
3799
3800 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3801
3802         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3803         (mipsn32_fbsd_sigframe): Define.
3804         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3805         for FreeBSD/mipsn32.
3806
3807 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3808
3809         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3810         AT_HWCAP.
3811
3812 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3813
3814         * MAINTAINERS (Misc): Update my email address.
3815
3816 2017-10-04  Pedro Alves  <palves@redhat.com>
3817
3818         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3819         it instead of target_gdbarch.
3820         (get_remote_state, get_remote_packet_size): Adjust
3821         get_remote_arch_state calls, passing down target_gdbarch
3822         explicitly.
3823         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3824         'gdbarch' and use it instead of target_gdbarch.
3825         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3826         passing down target_gdbarch explicitly.
3827         (struct stop_reply) <arch>: New field.
3828         (remote_parse_stop_reply): Use the stopped thread's architecture,
3829         not the current inferior's.  Save the architecture in the
3830         stop_reply.
3831         (process_stop_reply): Use the stop reply's architecture.
3832         (process_g_packet, remote_fetch_registers)
3833         (remote_prepare_to_store, store_registers_using_G)
3834         (remote_store_registers): Adjust get_remote_arch_state calls,
3835         using the regcache's architecture.
3836         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3837         passing down target_gdbarch explicitly.
3838         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3839         beneath instead of calling target_gdbarch.
3840         * target.c (default_thread_architecture): Use the specified
3841         inferior's architecture, instead of the current inferior's
3842         architecture (via target_gdbarch).
3843
3844 2017-10-04  Pedro Alves  <palves@redhat.com>
3845
3846         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3847         case.
3848         (regcache_print): Handle !target_has_registers here instead.
3849
3850 2017-10-04  Pedro Alves  <palves@redhat.com>
3851
3852         * frame.c (create_test_frame): Delete.
3853         * frame.h (create_test_frame): Delete.
3854         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3855         (class regcache_test): Delete.
3856         (test_target_has_registers, test_target_has_stack)
3857         (test_target_has_memory, test_target_prepare_to_store)
3858         (test_target_store_registers): New functions.
3859         (test_target_ops): New class.
3860         (register_to_value_test): Error out if there's already a
3861         process_stratum (or higher) target pushed.  Create a fuller mock
3862         environment, with mock target_ops, inferior, address space, thread
3863         and inferior_ptid.
3864         * progspace.c (struct address_space): Move to ...
3865         * progspace.h (struct address_space): ... here.
3866         * regcache.h (regcache::~regcache, regcache::raw_write)
3867         [GDB_SELF_TEST]: No longer virtual.
3868
3869 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3870
3871         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3872
3873 2017-10-04  Pedro Alves  <palves@redhat.com>
3874
3875         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3876         out of 'between TRY and CATCH'.
3877
3878 2017-10-04  Pedro Alves  <palves@redhat.com>
3879
3880         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3881         * common/common-exceptions.h (TRY): Open an outermost scope.
3882         Expand intro comment.
3883         (CATCH): Reindent.
3884         (END_CATCH): Close the outermost scope.
3885         * completer.c (complete_line_internal): Add missing END_CATCH.
3886
3887 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3888
3889         * NEWS (Changes since GDB 8.0): Add entry about new
3890         'set-cwd-on-gdbserver' feature.
3891         (New remote packets): Add entry for QSetWorkingDir.
3892         * common/common-inferior.h (set_inferior_cwd): New prototype.
3893         * infcmd.c (set_inferior_cwd): Remove "static".
3894         (show_cwd_command): Expand text to include remote debugging.
3895         * remote.c: Add PACKET_QSetWorkingDir.
3896         (remote_protocol_features) <QSetWorkingDir>: New entry for
3897         PACKET_QSetWorkingDir.
3898         (extended_remote_set_inferior_cwd): New function.
3899         (extended_remote_create_inferior): Call
3900         "extended_remote_set_inferior_cwd".
3901         (_initialize_remote): Call "add_packet_config_cmd" for
3902         QSetWorkingDir.
3903
3904 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3905
3906         * NEWS (New commands): Mention "set/show cwd".
3907         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3908         "cd" command's help text.
3909         * common/common-inferior.h (get_inferior_cwd): New prototype.
3910         * infcmd.c (inferior_cwd_scratch): New global variable.
3911         (set_inferior_cwd): New function.
3912         (get_inferior_cwd): Likewise.
3913         (set_cwd_command): Likewise.
3914         (show_cwd_command): Likewise.
3915         (_initialize_infcmd): Add "set/show cwd" commands.
3916         * inferior.h (class inferior) <cwd>: New field.
3917         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3918         (fork_inferior): Change inferior's cwd before its execution.
3919         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3920         to CreateProcess.
3921
3922 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3923
3924         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3925         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3926         (COMMON_OBS): Add gdb_tilde_expand.o.
3927         * common/gdb_tilde_expand.c: New file.
3928         * common/gdb_tilde_expand.h: Likewise.
3929
3930 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3931
3932         * gdbarch.sh (objfile): Remove duplicate declaration.
3933         * gdbarch.h: Regenerate.
3934
3935 2017-10-03  Tom Tromey  <tom@tromey.com>
3936
3937         * utils.c (internal_vproblem): Use string_vprintf.
3938
3939 2017-10-03  Tom Tromey  <tom@tromey.com>
3940
3941         * printcmd.c (info_symbol_command): Use std::string.
3942
3943 2017-10-03  Tom Tromey  <tom@tromey.com>
3944
3945         * top.c (gdb_safe_append_history): Use std::string.
3946
3947 2017-10-03  Tom Tromey  <tom@tromey.com>
3948
3949         * event-top.c (stdin_event_handler): Update.
3950         * main.c (captured_main_1): Update.
3951         * top.h (make_delete_ui_cleanup): Remove.
3952         (struct ui): Add constructor and destructor.
3953         (new_ui, delete_ui): Remove.
3954         * top.c (make_delete_ui_cleanup): Remove.
3955         (new_ui_command): Use std::unique_ptr.
3956         (delete_ui_cleanup): Remove.
3957         (ui::ui): Rename from new_ui.  Update.
3958         (free_ui): Remove.
3959         (ui::~ui): Rename from delete_ui.  Update.
3960
3961 2017-10-03  Tom Tromey  <tom@tromey.com>
3962
3963         * symfile.c (load_progress): Use gdb::byte_vector.
3964
3965 2017-10-03  Tom Tromey  <tom@tromey.com>
3966
3967         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3968         declaration.
3969         * printcmd.c (x_command): Remove unused declaration.
3970         * symfile.c (symbol_file_command): Remove unused declaration.
3971
3972 2017-10-03  Tom Tromey  <tom@tromey.com>
3973
3974         * utils.c (internal_vproblem): Use std::string.
3975         (defaulted_query): Likewise.
3976
3977 2017-10-03  Tom Tromey  <tom@tromey.com>
3978
3979         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3980         * top.c (execute_command_to_string): Update.
3981         * utils.c (make_cleanup_restore_page_info): Remove.
3982         (do_restore_page_info_cleanup): Remove.
3983         (set_batch_flag_and_restore_page_info):
3984         New.
3985         (make_cleanup_restore_page_info): Remove.
3986         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3987         (~set_batch_flag_and_restore_page_info): New
3988         (make_cleanup_restore_uinteger): Remove.
3989         (make_cleanup_restore_integer): Remove.
3990         (struct restore_integer_closure): Remove.
3991         (restore_integer): Remove.
3992         * utils.h (struct set_batch_flag_and_restore_page_info): New
3993         class.
3994         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3995         (make_cleanup_restore_page_info): Remove.
3996         (make_cleanup_restore_uinteger) Remove.
3997         (make_cleanup_restore_integer) Remove.
3998
3999 2017-10-03  Tom Tromey  <tom@tromey.com>
4000
4001         * record-full.h (record_full_gdb_operation_disable_set): Return
4002         scoped_restore_tmpl<int>.
4003         * infrun.c (adjust_pc_after_break): Update.
4004         (handle_signal_stop): Update.
4005         * record-full.c (record_full_gdb_operation_disable_set): Return
4006         scoped_restore_tmpl<int>.
4007         (record_full_wait_1, record_full_insert_breakpoint)
4008         (record_full_remove_breakpoint, record_full_save)
4009         (record_full_goto_insn): Update.
4010
4011 2017-10-02  Tom Tromey  <tom@tromey.com>
4012
4013         PR rust/22236:
4014         * rust-lang.c (rust_val_print_str): New function.
4015         (val_print_struct): Call it.
4016         (rust_subscript): Preserve name of slice type.
4017
4018 2017-10-02  Tom Tromey  <tom@tromey.com>
4019
4020         * rust-lang.c (rust_subscript): Handle slices in
4021         EVAL_AVOID_SIDE_EFFECTS case.
4022
4023 2017-10-02  Tom Tromey  <tom@tromey.com>
4024
4025         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4026
4027 2017-10-02  Tom Tromey  <tom@tromey.com>
4028
4029         * rust-lang.h (rust_slice_type): Add "extern".
4030
4031 2017-10-02  Tom Tromey  <tom@tromey.com>
4032             Pedro Alves  <palves@redhat.com>
4033
4034         * ada-lang.h (ada_exc_info::operator<): Make const.
4035         (ada_exc_info::operator==): Make const.
4036         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4037         Make const.
4038
4039 2017-09-29  Tom Tromey  <tom@tromey.com>
4040
4041         * target.c (read_whatever_is_readable): Change type of "result".
4042         Update.
4043         (free_memory_read_result_vector): Remove.
4044         (read_memory_robust): Change return type.  Update.
4045         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
4046         bin2hex, std::string.
4047         * target.h (memory_read_result_s): Remove typedef.
4048         (free_memory_read_result_vector): Remove.
4049         (read_memory_robust): Return std::vector.
4050
4051 2017-09-29  Tom Tromey  <tom@tromey.com>
4052
4053         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4054
4055 2017-09-29  Tom Tromey  <tom@tromey.com>
4056
4057         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4058         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
4059         operator< and operator==.
4060         (ada_exceptions_list): Return a std::vector.
4061         * ada-lang.c (ada_exc_info::operator<): Rename from
4062         compare_ada_exception_info.
4063         (ada_exc_info::operator==): New.
4064         (sort_remove_dups_ada_exceptions_list): Change type of
4065         "exceptions".
4066         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4067         (ada_add_global_exceptions): Likewise.
4068         (ada_exceptions_list_1): Return a std::vector.
4069         (ada_exceptions_list): Likewise.
4070
4071 2017-09-29  Tom Tromey  <tom@tromey.com>
4072
4073         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4074         'std::set *'.
4075         (print_one_inferior): Update.
4076         (free_vector_of_ints): Remove.
4077         (list_available_thread_groups): Change "ids" to std::set.
4078         (mi_cmd_list_thread_groups): Update.
4079         (struct collect_cores_data) <core>: Now a std::set.
4080         (collect_cores): Update.
4081         (unique): Remove.
4082         (print_one_inferior): Update.
4083
4084 2017-09-29  Tom Tromey  <tom@tromey.com>
4085
4086         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4087         (mi_execute_async_cli_command): Likewise.
4088         (mi_cmd_trace_frame_collected): Use field_fmt.
4089
4090 2017-09-29  Tom Tromey  <tom@tromey.com>
4091
4092         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4093         gdb::byte_vector.
4094
4095 2017-09-29  Tom Tromey  <tom@tromey.com>
4096
4097         * mi/mi-parse.c (mi_parse): Remove unused declaration.
4098
4099 2017-09-29  Tom Tromey  <tom@tromey.com>
4100
4101         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4102
4103 2017-09-29  Tom Tromey  <tom@tromey.com>
4104
4105         * varobj.h (varobj_gen_name): Return std::string.
4106         * varobj.c (varobj_gen_name): Return std::string.
4107         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4108         (mi_cmd_var_delete): Don't copy "name".
4109
4110 2017-09-29  Tom Tromey  <tom@tromey.com>
4111
4112         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4113         (mi_cmd_break_insert_1): Update.
4114
4115 2017-09-29  Tom Tromey  <tom@tromey.com>
4116
4117         * target.h (make_scoped_defer_target_commit_resume): Update.
4118         * target.c (make_scoped_defer_target_commit_resume): Rename from
4119         make_cleanup_defer_target_commit_resume.  Return a
4120         scoped_restore.
4121         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4122
4123 2017-09-29  Tom Tromey  <tom@tromey.com>
4124
4125         * main.c (captured_main_1): Remove unused declaration.
4126         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4127
4128 2017-09-29  Tom Tromey  <tom@tromey.com>
4129
4130         * symtab.c (search_symbols): Remove unused outer cleanup.
4131         (make_source_files_completion_list): Remove unused declaration.
4132
4133 2017-09-29  Tom Tromey  <tom@tromey.com>
4134
4135         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4136
4137 2017-09-29  Tom Tromey  <tom@tromey.com>
4138
4139         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4140         gdb::byte_vector.
4141
4142 2017-09-29  Tom Tromey  <tom@tromey.com>
4143
4144         * complaints.c (vcomplaint): Use std::string.
4145
4146 2017-09-29  Tom Tromey  <tom@tromey.com>
4147
4148         * tracepoint.c (trace_variable_command): Use std::string.
4149         (encode_actions_1): Remove unused declarations.
4150         (create_tsv_from_upload): Use std::string.
4151
4152 2017-09-29  Tom Tromey  <tom@tromey.com>
4153
4154         * cp-support.c (gdb_demangle): Use std::string.
4155
4156 2017-09-29  Tom Tromey  <tom@tromey.com>
4157
4158         * stack.c (parse_frame_specification): Use std::string
4159         (info_frame_command): Use gdb::unique_xmalloc_ptr.
4160
4161 2017-09-29  Tom Tromey  <tom@tromey.com>
4162
4163         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4164
4165 2017-09-29  Tom Tromey  <tom@tromey.com>
4166
4167         * utils.c (vfprintf_maybe_filtered): Use std::string.
4168         (vfprintf_unfiltered): Likewise.
4169
4170 2017-09-29  Tom Tromey  <tom@tromey.com>
4171
4172         * event-top.c (top_level_prompt): Return std::string.
4173         (display_gdb_prompt): Update.
4174
4175 2017-09-29  Tom Tromey  <tom@tromey.com>
4176
4177         * unittests/common-utils-selftests.c (format): New function.
4178         (string_vprintf_tests): New function.
4179         (_initialize_common_utils_selftests): Register new tests.
4180         * common/common-utils.c (string_vprintf): New function.
4181         * common/common-utils.h (string_vprintf): Declare.
4182
4183 2017-09-29  Pedro Alves  <palves@redhat.com>
4184
4185         * common/rsp-low.c (unpack_varlen_hex): Constify.
4186         * common/rsp-low.h (unpack_varlen_hex): Constify.
4187         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4188         Constify.
4189         * remote.c (remote_set_permissions, read_ptid)
4190         (remote_current_thread, remote_get_threads_with_qthreadinfo)
4191         (remote_static_tracepoint_marker_at)
4192         (remote_static_tracepoint_markers_by_strid)
4193         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4194         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4195         (parse_tracepoint_definition, parse_tsv_definition)
4196         (parse_static_tracepoint_marker_definition): Constify.
4197         * tracepoint.h (parse_static_tracepoint_marker_definition)
4198         (parse_trace_status, parse_tracepoint_status)
4199         (parse_tracepoint_definition, parse_tsv_definition): Constify.
4200
4201 2017-09-29  Pedro Alves  <palves@redhat.com>
4202
4203         * remote.c (target_buf, target_buf_size): Delete.
4204         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4205         Use the connection's packet buffer instead.
4206         All callers adjusted.
4207         (_initialize_remote): Remove references to target_buf and
4208         target_buf_size.
4209
4210 2017-09-28  Pedro Alves  <palves@redhat.com>
4211
4212         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4213         unittests/common-utils-selftests.c.
4214         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4215         (COMMON_OBS): Remove utils-selftests.o.
4216         * utils-selftests.c: Move to ...
4217         * unittests/common-utils-selftests.c: ... here and rename self
4218         test to "string_printf".
4219
4220 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4221
4222         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4223         having NULL cus or tus.
4224
4225 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4226
4227         * arm-tdep.c: (convert_from_extended): Remove.
4228         (convert_to_extended): Likewise.
4229         (arm_extract_return_value): Use convert_typed_floating.
4230         (arm_store_return_value): Likewise.
4231
4232         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4233         * sh-tdep.c: Do not include "floatformat.h".
4234         (sh_littlebyte_bigword_type): New function.
4235         (sh_register_convert_to_virtual): Use convert_typed_floating.
4236         (sh_register_convert_to_raw): Likewise.
4237         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4238         (sh64_littlebyte_bigword_type): New function.
4239         (sh64_extract_return_value): Use convert_typed_floating.
4240         (sh64_register_convert_to_virtual): Likewise.
4241         (sh64_register_convert_to_raw): Likewise.
4242
4243 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4244
4245         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4246         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4247
4248         * gdbtypes.h (union type_specific): Make field floatformat hold
4249         just a single struct floatformat, not an array.
4250         (floatformat_from_type): Move here.
4251         * gdbtypes.c (floatformat_from_type): Move here.  Update to
4252         changed TYPE_FLOATFORMAT definition.
4253         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4254         (recursive_dump_type): Likewise.
4255         (init_float_type): Install correct floatformat for byte order.
4256         (arch_float_type): Likewise.
4257
4258 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4259
4260         * gdbtypes.c (init_type): Change incoming argument from
4261         length-in-bytes to length-in-bits.  Assert length is a
4262         multiple of TARGET_CHAR_BITS.
4263         (arch_type, arch_flags_type): Likewise.
4264         (init_integer_type): Update call to init_type.
4265         (init_character_type): Likewise.
4266         (init_boolean_type): Likewise.
4267         (init_float_type): Likewise.
4268         (init_decfloat_type): Likewise.
4269         (init_complex_type): Likewise.
4270         (init_pointer_type): Likewise.
4271         (objfile_type): Likewise.
4272         (arch_integer_type): Update call to arch_type.
4273         (arch_character_type): Likewise.
4274         (arch_boolean_type): Likewise.
4275         (arch_float_type): Likewise.
4276         (arch_decfloat_type): Likewise.
4277         (arch_complex_type): Likewise.
4278         (arch_pointer_type): Likewise.
4279         (gdbtypes_post_init): Likewise.
4280
4281         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4282         (read_base_type): Likewise.
4283         * mdebugread.c (basic_type): Likewise.
4284         * stabsread.c (dbx_init_float_type): Likewise.
4285         (rs6000_builtin_type): Likewise.
4286         (read_range_type): Likewise.  Also, fix call to init_integer_type
4287         with erroneous length argument.
4288
4289         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4290         * d-lang.c (build_d_types): Likewise.
4291         * f-lang.c (build_fortran_types): Likewise.
4292         * go-lang.c (build_go_types): Likewise.
4293         * opencl-lang.c (build_opencl_types): Likewise.
4294         * jit.c (finalize_symtab): Likewise.
4295         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4296         (build_std_type_info_type): Likewise.
4297         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
4298         update call to arch_flags_type.
4299
4300         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4301         arch_type.
4302         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4303         * windows-tdep.c (windows_get_tlb_type): Likewise.
4304
4305         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4306         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4307         * m32c-tdep.c (make_types): Likewise.
4308         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4309         (rl78_psw_type): Update call to arch_flags_type.
4310         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4311         * rx-tdep.c (rx_psw_type): Likewise.
4312         (rx_fpsw_type): Likewise.
4313         * sparc-tdep.c (sparc_psr_type): Likewise.
4314         (sparc_fsr_type): Likewise.
4315         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4316         (sparc64_ccr_type): Likewise.
4317         (sparc64_fsr_type): Likewise.
4318         (sparc64_fprs_type): Likewise.
4319
4320 2017-09-27  Tom Tromey  <tom@tromey.com>
4321
4322         * findcmd.c (find_command): Constify.
4323
4324 2017-09-27  Tom Tromey  <tom@tromey.com>
4325
4326         * ada-tasks.c (task_command_1, task_command): Constify.
4327
4328 2017-09-27  Tom Tromey  <tom@tromey.com>
4329
4330         * symtab.c (maintenance_print_symbol_cache)
4331         (maintenance_flush_symbol_cache)
4332         (maintenance_print_symbol_cache_statistics): Constify.
4333
4334 2017-09-27  Tom Tromey  <tom@tromey.com>
4335
4336         * inferior.c (detach_inferior_command, kill_inferior_command)
4337         (inferior_command): Constify.
4338
4339 2017-09-27  Tom Tromey  <tom@tromey.com>
4340
4341         * regcache.c (regcache_print, maintenance_print_registers)
4342         (maintenance_print_raw_registers)
4343         (maintenance_print_cooked_registers)
4344         (maintenance_print_register_groups)
4345         (maintenance_print_remote_registers): Constify.
4346
4347 2017-09-27  Tom Tromey  <tom@tromey.com>
4348
4349         * printcmd.c (map_display_numbers, undisplay_command)
4350         (enable_disable_display_command, enable_display_command)
4351         (disable_display_command): Constify.
4352
4353 2017-09-27  Tom Tromey  <tom@tromey.com>
4354
4355         * breakpoint.h (delete_command): Don't declare.
4356         * breakpoint.c (delete_command, enable_once_command)
4357         (enable_count_command, enable_delete_command, breakpoint_1)
4358         (maintenance_info_breakpoints, stopin_command, stopat_command)
4359         (delete_command, delete_trace_command, save_breakpoints)
4360         (save_breakpoints_command, save_tracepoints_command): Constify.
4361
4362 2017-09-27  Tom Tromey  <tom@tromey.com>
4363
4364         * macrocmd.c (macro_expand_command, macro_expand_once_command)
4365         (skip_ws, extract_identifier, macro_define_command)
4366         (macro_undef_command, macro_list_command): Constify.
4367
4368 2017-09-27  Tom Tromey  <tom@tromey.com>
4369
4370         * infcmd.c (environment_info, set_environment_command)
4371         (unset_environment_command, path_info, info_proc_cmd_1)
4372         (info_proc_cmd_mappings, info_proc_cmd_stat)
4373         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4374         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4375
4376 2017-09-27  Tom Tromey  <tom@tromey.com>
4377
4378         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4379         Constify.
4380
4381 2017-09-27  Tom Tromey  <tom@tromey.com>
4382
4383         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4384
4385 2017-09-27  Tom Tromey  <tom@tromey.com>
4386
4387         * demangle.c (demangle_command): Constify.
4388
4389 2017-09-27  Tom Tromey  <tom@tromey.com>
4390
4391         * progspace.c (maintenance_info_program_spaces_command):
4392         Constify.
4393
4394 2017-09-27  Tom Tromey  <tom@tromey.com>
4395
4396         * compile/compile.c (check_raw_argument, compile_file_command)
4397         (compile_code_command, compile_print_command): Constify.
4398
4399 2017-09-27  Tom Tromey  <tom@tromey.com>
4400
4401         * reggroups.c (maintenance_print_reggroups): Constify.
4402
4403 2017-09-27  Tom Tromey  <tom@tromey.com>
4404
4405         * dwarf2read.c (save_gdb_index_command): Constify.
4406
4407 2017-09-27  Tom Tromey  <tom@tromey.com>
4408
4409         * stap-probe.c (info_probes_stap_command): Constify.
4410
4411 2017-09-27  Tom Tromey  <tom@tromey.com>
4412
4413         * fork-child.c (unset_exec_wrapper_command): Constify.
4414
4415 2017-09-27  Tom Tromey  <tom@tromey.com>
4416
4417         * btrace.c (get_uint, get_context_size, no_chunk)
4418         (maint_btrace_packet_history_cmd)
4419         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4420         (maint_info_btrace_cmd): Constify.
4421
4422 2017-09-27  Tom Tromey  <tom@tromey.com>
4423
4424         * reverse.c (delete_bookmark_command): Constify.
4425
4426 2017-09-27  Tom Tromey  <tom@tromey.com>
4427
4428         * remote.c (set_memory_packet_size)
4429         (set_memory_write_packet_size, show_memory_write_packet_size)
4430         (set_memory_read_packet_size, show_memory_read_packet_size)
4431         (compare_sections_command, packet_command, remote_put_command)
4432         (remote_get_command, remote_delete_command): Constify.
4433
4434 2017-09-27  Tom Tromey  <tom@tromey.com>
4435
4436         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4437         (set_mipsfpu_double_command, set_mipsfpu_none_command)
4438         (set_mipsfpu_auto_command): Constify.
4439
4440 2017-09-27  Tom Tromey  <tom@tromey.com>
4441
4442         * cli/cli-cmds.h (cd_command): Constify.
4443         * cli/cli-cmds.c (cd_command): Constify.
4444
4445 2017-09-27  Tom Tromey  <tom@tromey.com>
4446
4447         * thread.c (thread_name_command, thread_find_command): Constify.
4448
4449 2017-09-27  Tom Tromey  <tom@tromey.com>
4450
4451         * probe.c (enable_probes_command, disable_probes_command):
4452         Constify.
4453
4454 2017-09-27  Tom Tromey  <tom@tromey.com>
4455
4456         * symfile.c (symbol_file_command): Constify.
4457         * gdbcore.h (deprecated_file_changed_hook): Constify.
4458         * exec.c (deprecated_file_changed_hook, exec_file_command)
4459         (file_command): Constify.
4460         * defs.h (symbol_file_command): Constify.
4461
4462 2017-09-27  Tom Tromey  <tom@tromey.com>
4463
4464         * remote-fileio.c (set_system_call_allowed)
4465         (show_system_call_allowed): Constify.
4466
4467 2017-09-27  Tom Tromey  <tom@tromey.com>
4468
4469         * tracepoint.c (delete_trace_variable_command)
4470         (tfind_end_command, tfind_start_command, tfind_pc_command)
4471         (tfind_tracepoint_command, tfind_line_command)
4472         (tfind_range_command, tfind_outside_command): Constify.
4473
4474 2017-09-27  Tom Tromey  <tom@tromey.com>
4475
4476         * ax-gdb.c (maint_agent_printf_command, agent_command)
4477         (agent_eval_command): Constify.
4478
4479 2017-09-27  Tom Tromey  <tom@tromey.com>
4480
4481         * tracepoint.c (info_scope_command): Constify.
4482         * python/python.c (gdbpy_decode_line): Constify.
4483         * python/py-breakpoint.c (bppy_init): Constify.
4484         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4485         * location.h: (new_linespec_location)
4486         (string_to_event_location_basic, string_to_event_location):
4487         Constify.
4488         * location.c (new_linespec_location)
4489         (string_to_event_location_basic, string_to_event_location):
4490         Constify.
4491         * linespec.h (decode_line_with_current_source)
4492         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4493         * linespec.c (linespec_lex_to_end)
4494         (decode_line_with_current_source)
4495         (decode_line_with_last_displayed): Constify.
4496         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4497         Constify.
4498         * cli/cli-cmds.c (edit_command, list_command): Constify.
4499         * breakpoint.h (until_break_command, watch_command_wrapper)
4500         (awatch_command_wrapper, rwatch_command_wrapper)
4501         (init_ada_exception_breakpoint): Constify.
4502         * breakpoint.c (break_command_1, dprintf_command)
4503         (break_range_command, watch_command_wrapper)
4504         (rwatch_command_wrapper, awatch_command_wrapper)
4505         (until_break_command, init_ada_exception_breakpoint)
4506         (strace_marker_create_sals_from_location, trace_command)
4507         (ftrace_command, strace_command, struct tracepoint): Constify.
4508         * ax-gdb.c (agent_command_1): Constify.
4509         * ada-lang.c (ada_exception_sal): Constify.
4510
4511 2017-09-27  Tom Tromey  <tom@tromey.com>
4512
4513         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4514         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4515         (get_context_size, no_chunk, get_insn_history_modifiers)
4516         (cmd_record_insn_history, get_call_history_modifiers)
4517         (cmd_record_call_history): Constify.
4518
4519 2017-09-27  Tom Tromey  <tom@tromey.com>
4520
4521         * source.c (show_substitute_path_command)
4522         (unset_substitute_path_command, set_substitute_path_command):
4523         Constify.
4524
4525 2017-09-27  Tom Tromey  <tom@tromey.com>
4526
4527         * typeprint.c (maintenance_print_type): Constify.
4528         * maint.c (maintenance_dump_me, maintenance_demangle)
4529         (maintenance_time_display, maintenance_info_sections)
4530         (maintenance_print_statistics, maintenance_deprecate)
4531         (maintenance_undeprecate): Constify.
4532         (maintenance_do_deprecate): Constify.  Use std::string.
4533         (maintenance_selftest): Constify.
4534         * gdbtypes.h (maintenance_print_type): Constify.
4535
4536 2017-09-27  Tom Tromey  <tom@tromey.com>
4537
4538         * hppa-tdep.c (unwind_command): Constify.
4539
4540 2017-09-27  Tom Tromey  <tom@tromey.com>
4541
4542         * target-descriptions.c (unset_tdesc_filename_cmd)
4543         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4544         Constify.
4545
4546 2017-09-27  Tom Tromey  <tom@tromey.com>
4547
4548         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4549
4550 2017-09-27  Tom Tromey  <tom@tromey.com>
4551
4552         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4553
4554 2017-09-27  Tom Tromey  <tom@tromey.com>
4555
4556         * tui/tui-regs.c (tui_reg_command): Constify.
4557
4558 2017-09-27  Tom Tromey  <tom@tromey.com>
4559
4560         * skip.c (skip_file_command, skip_function_command)
4561         (skip_enable_command, skip_disable_command, skip_delete_command):
4562         Constify.
4563
4564 2017-09-27  Tom Tromey  <tom@tromey.com>
4565
4566         * record-btrace.c (cmd_record_btrace_bts_start)
4567         (cmd_record_btrace_pt_start): Constify.
4568
4569 2017-09-27  Tom Tromey  <tom@tromey.com>
4570
4571         * symmisc.c (maintenance_print_symbols)
4572         (maintenance_print_msymbols, maintenance_print_objfiles)
4573         (maintenance_info_symtabs, maintenance_check_symtabs)
4574         (maintenance_expand_symtabs, maintenance_info_line_tables):
4575         Constify.
4576
4577 2017-09-27  Tom Tromey  <tom@tromey.com>
4578
4579         * top.c (new_ui_command): Constify.
4580
4581 2017-09-27  Tom Tromey  <tom@tromey.com>
4582
4583         * symfile.c (add_symbol_file_command)
4584         (remove_symbol_file_command, list_overlays_command)
4585         (map_overlay_command, unmap_overlay_command)
4586         (overlay_auto_command, overlay_manual_command)
4587         (overlay_off_command, overlay_load_command): Constify.
4588
4589 2017-09-27  Tom Tromey  <tom@tromey.com>
4590
4591         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4592         (info_spu_mailbox_command, info_spu_dma_command)
4593         (info_spu_proxydma_command): Constify.
4594
4595 2017-09-27  Tom Tromey  <tom@tromey.com>
4596
4597         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4598
4599 2017-09-27  Tom Tromey  <tom@tromey.com>
4600
4601         * cli/cli-script.c (user_defined_command): Constify.
4602
4603 2017-09-27  Tom Tromey  <tom@tromey.com>
4604
4605         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4606         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4607         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4608         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4609         (dump_binary_value, append_binary_memory, append_binary_value):
4610         Constify.
4611         (struct dump_context) <func>: Constify.
4612         (add_dump_command): Update.
4613
4614 2017-09-27  Tom Tromey  <tom@tromey.com>
4615
4616         * cli/cli-cmds.c (show_version, show_configuration)
4617         (source_command, show_user): Constify.
4618
4619 2017-09-27  Tom Tromey  <tom@tromey.com>
4620
4621         * target.c (maintenance_print_target_stack): Constify.
4622
4623 2017-09-27  Tom Tromey  <tom@tromey.com>
4624
4625         * interps.c (interpreter_exec_cmd): Constify.
4626
4627 2017-09-27  Tom Tromey  <tom@tromey.com>
4628
4629         * record-full.c (cmd_record_full_restore): Constify.
4630
4631 2017-09-27  Tom Tromey  <tom@tromey.com>
4632
4633         * memattr.c (enable_mem_command, disable_mem_command)
4634         (delete_mem_command): Constify.
4635
4636 2017-09-27  Tom Tromey  <tom@tromey.com>
4637
4638         * value.c (show_convenience): Constify.
4639
4640 2017-09-27  Tom Tromey  <tom@tromey.com>
4641
4642         * gdbcore.h (core_file_command): Update.
4643         * corefile.c (core_file_command): Constify.
4644
4645 2017-09-27  Tom Tromey  <tom@tromey.com>
4646
4647         * user-regs.c (maintenance_print_user_registers): Constify.
4648
4649 2017-09-27  Tom Tromey  <tom@tromey.com>
4650
4651         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4652
4653 2017-09-27  Tom Tromey  <tom@tromey.com>
4654
4655         * cp-support.c (first_component_command): Constify.
4656
4657 2017-09-27  Tom Tromey  <tom@tromey.com>
4658
4659         * psymtab.c (maintenance_print_psymbols)
4660         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4661         Constify.
4662
4663 2017-09-27  Tom Tromey  <tom@tromey.com>
4664
4665         * windows-tdep.c (display_tib): Constify.
4666
4667 2017-09-27  Tom Tromey  <tom@tromey.com>
4668
4669         * linux-fork.c (delete_checkpoint_command)
4670         (detach_checkpoint_command): Constify.
4671
4672 2017-09-27  Tom Tromey  <tom@tromey.com>
4673
4674         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4675
4676 2017-09-27  Tom Tromey  <tom@tromey.com>
4677
4678         * arc-tdep.c (dump_arc_instruction_command): Constify.
4679
4680 2017-09-27  Tom Tromey  <tom@tromey.com>
4681
4682         * valprint.c (set_radix, show_radix): Constify.
4683
4684 2017-09-27  Tom Tromey  <tom@tromey.com>
4685
4686         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4687
4688 2017-09-27  Tom Tromey  <tom@tromey.com>
4689
4690         * command.h (not_just_help_class_command): Update.
4691         * cli/cli-decode.h (not_just_help_class_command): Update.
4692         * cli/cli-decode.c (not_just_help_class_command): Constify.
4693
4694 2017-09-27  Tom Tromey  <tom@tromey.com>
4695
4696         * gdb_bfd.c (maintenance_info_bfds): Constify.
4697
4698 2017-09-27  Tom Tromey  <tom@tromey.com>
4699
4700         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4701         overloads.
4702         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4703         (do_const_cfunc): New function.
4704         (cmd_cfunc_eq): New overload.
4705         (cli_user_command_p): Check do_const_cfunc.
4706         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4707         const_cfunc.
4708         * command.h (add_cmd): Add const overload and no-function
4709         overload.
4710         (set_cmd_cfunc): Add const overload.
4711         (cmd_const_cfunc_ftype): Declare.
4712         (cmd_cfunc_eq): Add const overload.
4713         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4714         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4715         overload.
4716
4717 2017-09-27  Tom Tromey  <tom@tromey.com>
4718
4719         * macroexp.c (get_next_token_for_substitution): New function.
4720         (substitute_args): Call it.  Check for __VA_OPT__.
4721
4722 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4723             Pedro Alves <palves@redhat.com>
4724
4725         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4726         producer_is_icc_lt_14.
4727         (producer_is_icc_lt_14): New function.
4728         (check_producer): Add code for checking version of ICC.
4729         (producer_is_icc): Move to producer.c.
4730         (read_structure_type): Restrict ICC workaround to ICC<14.
4731         * producer.c: Include selftest.h.
4732         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4733         New functions.
4734         * producer.h (producer_is_icc): New declaration.
4735
4736 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4737
4738         * Makefile.in (SFILES): Add producer.c.
4739         (COMMON_OBS): Add producer.o
4740         * amd64-tdep.c (producer.h): Add new include.
4741         * dwarf2read.c (producer.h): Add new include.
4742         * producer.c: New file.
4743         * producer.h: New file.
4744         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4745         producer.c.
4746         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4747         producer.h.
4748
4749 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4750
4751         * configure.ac: Search ncursesw before ncurses.
4752         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4753         * gdb_curses.h: Include <ncursesw/ncurses.h>
4754         * config.in, configure: Regenerate.
4755
4756 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4757
4758         PR gdb/22185
4759         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4760         obsolete.
4761         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4762         Remove i386sol2 support.
4763         * configure.nat <i386sol2>: Remove.
4764         <sol2-64>: Fold into ...
4765         <sol2>: ... this.
4766         Move common settings to default section.
4767         Add sol-thread.o.
4768         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4769         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4770         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4771         <i[34567]86-*-solaris*>: Remove.
4772         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4773
4774         * configure.ac: Remove wctype in libw check.
4775         (_MSE_INT_H): Don't define on Solaris 7-9.
4776         <solaris*>: Remove libthread_db.so.1 check.
4777         * configure: Regenerate.
4778         * config.in: Regenerate.
4779
4780         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4781         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4782         (gdb_ps_size_t): Remove.
4783         Use base types in users.
4784         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4785
4786         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4787
4788 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4789
4790         PR build/22206
4791         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4792         (adi_is_addr_mapped): Likewise.
4793         (PSR_ICC): Don't redefine.
4794         (PSR_IMPL): Likewise.
4795
4796 2017-09-25  Tom Tromey  <tom@tromey.com>
4797
4798         * regcache.c (regcache::dump): Use string_printf.
4799
4800 2017-09-25  Tom Tromey  <tom@tromey.com>
4801
4802         * regcache.c (class regcache_invalidator): New.
4803         (struct register_to_invalidate): Remove.
4804         (make_cleanup_regcache_invalidate): Remove.
4805         (regcache::raw_write): Use regcache_invalidator.
4806
4807 2017-09-25  Tom Tromey  <tom@tromey.com>
4808
4809         * spu-tdep.c (spu2ppu_sniffer): Update.
4810         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4811         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4812         Remove.
4813         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4814         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4815         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4816         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4817         (frame_pop): Update.
4818
4819 2017-09-25  Tom Tromey  <tom@tromey.com>
4820
4821         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4822         * regcache.h (regcache_xfree): Don't declare.
4823         * regcache.c (regcache_xfree): Remove.
4824         (do_regcache_xfree): Use delete.
4825         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4826         * linux-fork.c (free_fork): Use delete.
4827         (fork_save_infrun_state): Likewise.
4828         * jit.c (jit_dealloc_cache): Use delete.
4829         * infrun.c (discard_infcall_suspend_state): Use delete.
4830
4831 2017-09-25  Tom Tromey  <tom@tromey.com>
4832
4833         * regcache.h (regcache_xmalloc): Don't declare.
4834         (regcache_raw_set_cached_value): Update comment.
4835         * regcache.c (regcache_xmalloc): Remove.
4836         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4837         * jit.c (jit_frame_sniffer): Use new.
4838         * frame.c (frame_save_as_regcache): Use new.
4839
4840 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4841
4842         * NEWS: Advertise support for guarded-storage registers on IBM z.
4843
4844 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4845
4846         * s390-linux-nat.c (have_regset_gs): New static variable.
4847         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4848         control block and guarded-storage broadcast control regsets.
4849         (s390_read_description): Detect whether the target has
4850         guarded-storage support, return appropriate tdesc.
4851         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4852         (features/s390x-gs-linux64.c): Likewise.
4853         (struct gdbarch_tdep) <have_gs>: New field.
4854         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4855         (s390_gsbc_regset): New variables.
4856         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4857         and s390_gsbc_regset, if applicable.
4858         (s390_core_read_description): Check whether core file was from a
4859         target with guarded-storage support; include appropriate regsets.
4860         (s390_gdbarch_init): Add registers for guarded-storage support.
4861         (_initialize_s390_tdep): Initialize new target descriptions that
4862         include registers for guarded-storage support.
4863         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4864         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4865         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4866         (S390_NUM_REGS): Adjust macro definition.
4867         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4868         (tdesc_s390x_gs_linux64): New declarations.
4869
4870 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4871
4872         * features/s390-gs-linux64.xml: New file.
4873         * features/s390-gs.xml: New file.
4874         * features/s390-gsbc.xml: New file.
4875         * features/s390x-gs-linux64.xml: New file.
4876         * features/Makefile (WHICH): Add s390-gs-linux64 and
4877         s390x-gs-linux64.
4878         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4879         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4880         * features/s390-gs-linux64.c: New generated file.
4881         * features/s390x-gs-linux64.c: New file.
4882         * regformats/s390-gs-linux64.dat: New file.
4883         * regformats/s390x-gs-linux64.dat: New file.
4884
4885 2017-09-23  Tom Tromey  <tom@tromey.com>
4886
4887         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4888
4889 2017-09-22  Tom Tromey  <tom@tromey.com>
4890
4891         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4892         type to scoped_restore_tmpl.
4893         <scoped_input_handler>: Initialize m_quit_handler directly.
4894
4895 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4896
4897         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4898         (cd_command): Likewise.  Free "current_directory" before
4899         assigning to it.
4900         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4901         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4902         * top.c (gdb_dirbuf): Remove global declaration.
4903         * top.h (gdb_dirbuf): Likewise.
4904
4905 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4906
4907         * gnulib/aclocal.m4: Regenerate.
4908         * gnulib/config.in: Regenerate.
4909         * gnulib/configure: Regenerate.
4910         * gnulib/import/Makefile.am: Regenerate.
4911         * gnulib/import/Makefile.in: Regenerate.
4912         * gnulib/import/assure.h: New file.
4913         * gnulib/import/at-func.c: Likewise
4914         * gnulib/import/chdir-long.c: New file.
4915         * gnulib/import/chdir-long.h: New file.
4916         * gnulib/import/cloexec.c: New file.
4917         * gnulib/import/cloexec.h: New file.
4918         * gnulib/import/close.c: New file.
4919         * gnulib/import/closedir.c: New file.
4920         * gnulib/import/dirent-private.h: New file.
4921         * gnulib/import/dup-safer.c: New file.
4922         * gnulib/import/dup.c: New file.
4923         * gnulib/import/dup2.c: New file.
4924         * gnulib/import/error.c: New file.
4925         * gnulib/import/error.h: New file.
4926         * gnulib/import/exitfail.c: New file.
4927         * gnulib/import/exitfail.h: New file.
4928         * gnulib/import/fchdir.c: New file.
4929         * gnulib/import/fcntl.c: New file.
4930         * gnulib/import/fcntl.in.h: New file.
4931         * gnulib/import/fd-hook.c: New file.
4932         * gnulib/import/fd-hook.h: New file.
4933         * gnulib/import/fd-safer.c: New file.
4934         * gnulib/import/fdopendir.c: New file.
4935         * gnulib/import/filename.h: New file.
4936         * gnulib/import/filenamecat-lgpl.c: New file.
4937         * gnulib/import/filenamecat.h: New file.
4938         * gnulib/import/fstat.c: New file.
4939         * gnulib/import/fstatat.c: New file.
4940         * gnulib/import/getcwd-lgpl.c: New file.
4941         * gnulib/import/getcwd.c: New file.
4942         * gnulib/import/getdtablesize.c: New file.
4943         * gnulib/import/getlogin_r.c: New file.
4944         * gnulib/import/getprogname.c: New file.
4945         * gnulib/import/getprogname.h: New file.
4946         * gnulib/import/gettext.h: New file.
4947         * gnulib/import/glob-libc.h: New file.
4948         * gnulib/import/glob.c: New file.
4949         * gnulib/import/glob.in.h: New file.
4950         * gnulib/import/intprops.h: New file.
4951         * gnulib/import/m4/chdir-long.m4: New file.
4952         * gnulib/import/m4/close.m4: New file.
4953         * gnulib/import/m4/closedir.m4: New file.
4954         * gnulib/import/m4/d-ino.m4: New file.
4955         * gnulib/import/m4/d-type.m4: New file.
4956         * gnulib/import/m4/dup.m4: New file.
4957         * gnulib/import/m4/dup2.m4: New file.
4958         * gnulib/import/m4/error.m4: New file.
4959         * gnulib/import/m4/fchdir.m4: New file.
4960         * gnulib/import/m4/fcntl.m4: New file.
4961         * gnulib/import/m4/fcntl_h.m4: New file.
4962         * gnulib/import/m4/fdopendir.m4: New file.
4963         * gnulib/import/m4/filenamecat.m4: New file.
4964         * gnulib/import/m4/fstat.m4: New file.
4965         * gnulib/import/m4/fstatat.m4: New file.
4966         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4967         * gnulib/import/m4/getcwd-path-max.m4: New file.
4968         * gnulib/import/m4/getcwd.m4: New file.
4969         * gnulib/import/m4/getdtablesize.m4: New file.
4970         * gnulib/import/m4/getlogin_r.m4: New file.
4971         * gnulib/import/m4/getprogname.m4: New file.
4972         * gnulib/import/m4/glob.m4: New file.
4973         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4974         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4975         * gnulib/import/m4/mempcpy.m4: New file.
4976         * gnulib/import/m4/memrchr.m4: New file.
4977         * gnulib/import/m4/mode_t.m4: New file.
4978         * gnulib/import/m4/msvc-inval.m4: New file.
4979         * gnulib/import/m4/msvc-nothrow.m4: New file.
4980         * gnulib/import/m4/open.m4: New file.
4981         * gnulib/import/m4/openat.m4: New file.
4982         * gnulib/import/m4/opendir.m4: New file.
4983         * gnulib/import/m4/readdir.m4: New file.
4984         * gnulib/import/m4/realloc.m4: New file.
4985         * gnulib/import/m4/rewinddir.m4: New file.
4986         * gnulib/import/m4/save-cwd.m4: New file.
4987         * gnulib/import/m4/strdup.m4: New file.
4988         * gnulib/import/m4/strerror.m4: New file.
4989         * gnulib/import/m4/unistd-safer.m4: New file.
4990         * gnulib/import/mempcpy.c: New file.
4991         * gnulib/import/memrchr.c: New file.
4992         * gnulib/import/msvc-inval.c: New file.
4993         * gnulib/import/msvc-inval.h: New file.
4994         * gnulib/import/msvc-nothrow.c: New file.
4995         * gnulib/import/msvc-nothrow.h: New file.
4996         * gnulib/import/open.c: New file.
4997         * gnulib/import/openat-die.c: New file.
4998         * gnulib/import/openat-priv.h: New file.
4999         * gnulib/import/openat-proc.c: New file.
5000         * gnulib/import/openat.c: New file.
5001         * gnulib/import/openat.h: New file.
5002         * gnulib/import/opendir.c: New file.
5003         * gnulib/import/pipe-safer.c: New file.
5004         * gnulib/import/readdir.c: New file.
5005         * gnulib/import/realloc.c: New file.
5006         * gnulib/import/rewinddir.c: New file.
5007         * gnulib/import/save-cwd.c: New file.
5008         * gnulib/import/save-cwd.h: New file.
5009         * gnulib/import/strdup.c: New file.
5010         * gnulib/import/strerror-override.c: New file.
5011         * gnulib/import/strerror-override.h: New file.
5012         * gnulib/import/strerror.c: New file.
5013         * gnulib/import/unistd--.h: New file.
5014         * gnulib/import/unistd-safer.h: New file.
5015         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5016         "getcwd" and "glob".
5017         * ser-tcp.c: Undefine "close" before redefining it.
5018
5019 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5020
5021         * guile/scm-value.c (gdbscm_value_address): Initialize address,
5022         get rid of res_val.
5023
5024 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5025
5026         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5027         <sol2,sparc>: Likewise.
5028         <sol2-64,i386>: Likewise.
5029
5030         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5031         -Wdeprecated-declarations on *-*-solaris*.
5032         * configure: Regenerate.
5033
5034         * procfs.c: Include "nat/inferior.h".
5035         (procfs_info_proc): Fix typo.
5036
5037 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5038
5039         * remote.c (vector): Include.
5040         (struct private_thread_info): Add field, thread_handle.
5041         (free_private_thread_info): Deallocate storage associated with
5042         thread handle.
5043         (get_private_info_thread): Initialize `thread_handle' field.
5044         (struct thread_item): Add field, thread_handle.
5045         (clear_threads_listing_context): Deallocate storage associated
5046         with thread handle.
5047         (start_thread): Add support for "handle" attribute.
5048         (thread_attributes): Add "handle".
5049         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5050         field.
5051         (remote_update_thread_list): Update thread_handle.
5052         (remote_thread_handle_to_thread_info): New function.
5053         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5054
5055 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5056
5057         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5058         function.
5059         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5060         * python/python-internal.h (thread_object_type): Declare.
5061
5062 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5063
5064         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5065         (target_thread_handle_to_thread_info): Declare.
5066         * target.c (target_thread_handle_to_thread_info): New function.
5067         * target-delegates.c: Regenerate.
5068         * gdbthread.h (find_thread_by_handle): Declare.
5069         * thread.c (find_thread_by_handle): New function.
5070         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5071         function.
5072         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5073
5074 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5075
5076         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5077
5078 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5079
5080         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5081
5082 2017-09-21  Yao Qi  <yao.qi@linaro.org>
5083
5084         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5085         to gdb_target_obs.
5086
5087 2017-09-20  Tom Tromey  <tom@tromey.com>
5088
5089         * breakpoint.c (struct counted_command_line): Remove.
5090         (breakpoint_commands): Update.
5091         (alloc_counted_command_line, incref_counted_command_line)
5092         (decref_counted_command_line, do_cleanup_counted_command_line)
5093         (make_cleanup_decref_counted_command_line): Remove.
5094         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5095         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5096         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5097         (save_breakpoints): Update.
5098         * breakpoint.h (counted_command_line): Now a typedef to
5099         shared_ptr.
5100         (struct breakpoint) <commands>: Now a counted_command_line.
5101         (struct bpstats) <command>: Likewise.
5102
5103 2017-09-20  Tom Tromey  <tom@tromey.com>
5104
5105         * breakpoint.c (struct commands_info, do_map_commands_command):
5106         Remove.
5107         (commands_command_1): Update.
5108         (iterate_over_related_breakpoints): Take a function_view.
5109         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5110         (delete_command): Update.
5111         (map_breakpoint_numbers): Take a function_view.
5112         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5113         (disable_command): Update.
5114         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5115         (enable_command): Update.
5116         (struct disp_data, do_enable_breakpoint_disp)
5117         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5118         (do_map_enable_delete_breakpoint): Remove.
5119         (enable_once_command, enable_count_command, enable_delete_command)
5120         (delete_trace_variable_command): Update.
5121
5122 2017-09-20  Tom Tromey  <tom@tromey.com>
5123
5124         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
5125         (bpstat_clear): Use delete.
5126         (bpstats): New constructors.
5127         (bpstat_copy, bpstat_stop_status): Use new.
5128         (dprintf_after_condition_true): Update.
5129         * breakpoint.h (bpstats::bpstats): Add constructors.
5130         (bpstats::~bpstats): Add destructor.
5131
5132 2017-09-20  Pedro Alves  <palves@redhat.com>
5133
5134         * eval.c (make_params): Delete, refactored as ...
5135         (class fake_method): ... this new type's ctor.
5136         (fake_method::~fake_method): New.
5137         (evaluate_subexp_standard): Use 'fake_method'.
5138
5139 2017-09-20  Tom Tromey  <tom@tromey.com>
5140
5141         * windows-nat.c (get_windows_debug_event, windows_wait)
5142         (do_initial_windows_stuff, windows_attach): Update.
5143         * utils.c (vwarning, internal_vproblem): Update.
5144         (ui_unregister_input_event_handler_cleanup)
5145         (prepare_to_handle_input): Remove.
5146         (class scoped_input_handler): New.
5147         (defaulted_query, prompt_for_continue): Update.
5148         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5149         Update.
5150         * top.c (undo_terminal_modifications_before_exit): Update.
5151         * target/target.h (target_terminal_init, target_terminal_inferior)
5152         (target_terminal_ours): Don't declare.
5153         (class target_terminal): New.
5154         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5155         (target_terminal_ours_for_output)
5156         (make_cleanup_restore_target_terminal): Don't declare.
5157         (target_terminal_info): Remove.
5158         * target.c (enum terminal_state, terminal_state): Remove.
5159         (target_terminal::terminal_state): Define.
5160         (target_terminal::init): Rename from target_terminal_init.
5161         (target_terminal::inferior): Rename from
5162         target_terminal_inferior.
5163         (target_terminal::ours): Rename from target_terminal_ours.
5164         (target_terminal::ours_for_output): Rename from
5165         target_terminal_ours_for_output.
5166         (target_terminal::info): New method.
5167         (cleanup_restore_target_terminal)
5168         (make_cleanup_restore_target_terminal): Remove.
5169         * solib.c (handle_solib_event): Update.
5170         * remote.c (remote_serial_quit_handler): Update.
5171         (remote_terminal_inferior, remote_wait_as): Update.
5172         * record-full.c (record_full_wait_1): Update.
5173         * nto-procfs.c (procfs_create_inferior): Update.
5174         * nat/fork-inferior.c (startup_inferior): Update.
5175         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5176         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5177         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5178         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5179         (mi_breakpoint_created, mi_breakpoint_deleted)
5180         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5181         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5182         (mi_user_selected_context_changed, report_initial_inferior):
5183         Update.
5184         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5185         (linux_nat_terminal_inferior): Update.
5186         * infrun.c (follow_fork_inferior)
5187         (handle_vfork_child_exec_or_exit, do_target_resume)
5188         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5189         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5190         Update.
5191         * inflow.c (child_terminal_init, info_terminal_command): Update.
5192         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5193         (attach_command): Update.
5194         * infcall.c (call_thread_fsm_should_stop): Update.
5195         * gnu-nat.c (gnu_attach): Update.
5196         * extension.c (struct active_ext_lang_state)
5197         (restore_active_ext_lang): Update.
5198         * exceptions.c (print_flush): Update.
5199         * event-top.c (async_enable_stdin, default_quit_handler): Update.
5200         (struct quit_handler_cleanup_data, restore_quit_handler)
5201         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5202         Remove.
5203         * cp-support.c (gdb_demangle): Update.
5204         * breakpoint.c (update_inserted_breakpoint_locations)
5205         (insert_breakpoint_locations, handle_jit_event)
5206         (disable_breakpoints_in_unloaded_shlib): Update.
5207         * annotate.c (annotate_breakpoints_invalid)
5208         (annotate_frames_invalid): Update.
5209
5210 2017-09-20  Tom Tromey  <tom@tromey.com>
5211
5212         * main.c (catch_command_errors): Rename from
5213         catch_command_errors_const.
5214         (captured_main_1): Update.
5215
5216 2017-09-20  Pedro Alves  <palves@redhat.com>
5217
5218         * cli/cli-cmds.c (list_command): Use print_sal_location.
5219         (print_sal_location): New function.
5220         (ambiguous_line_spec): Use print_sal_location.
5221         * linespec.c (symbol_to_sal): Record the symbol in the sal.
5222         * symtab.c (find_function_start_sal): Likewise.
5223         * symtab.h (symtab_and_line::symbol): New field.
5224
5225 2017-09-20  Pedro Alves  <palves@redhat.com>
5226
5227         * linespec.c (minsym_found): Handle non-text minsyms.
5228         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5229
5230 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5231
5232         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5233         backslash.
5234
5235 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5236
5237         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5238         vmovups instead vmovaps.
5239         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5240
5241 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
5242
5243         * NEWS (Changes since GDB 8.0): Add starti.
5244         * infcmd.c (enum run_break): New.
5245         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5246         case.
5247         (run_command): Use enum run_how.
5248         (start_command): Likewise.
5249         (starti_command): New function.
5250         (RUN_ARGS_HELP): New macro.
5251         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5252         commands.  Add starti command.
5253
5254 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5255
5256         * Makefile.in (monitor.o): Remove the rule.
5257
5258 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5259
5260         * annotate.h (struct annotate_arg_emitter): Use
5261         DISABLE_COPY_AND_ASSIGN.
5262         * common/refcounted-object.h (refcounted_object): Likewise.
5263         * completer.h (struct completion_result): Likewise.
5264         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5265         * filename-seen-cache.h (filename_seen_cache): Likewise.
5266         * gdbcore.h (thread_section_name): Likewise.
5267         * gdb_regex.h (compiled_regex): Likewise.
5268         * gdbthread.h (scoped_restore_current_thread): Likewise.
5269         * inferior.h (scoped_restore_current_inferior): Likewise.
5270         * jit.c (jit_reader): Likewise.
5271         * linespec.h (struct linespec_result): Likewise.
5272         * mi/mi-parse.h (struct mi_parse): Likewise.
5273         * nat/fork-inferior.c (execv_argv): Likewise.
5274         * progspace.h (scoped_restore_current_program_space): Likewise.
5275         * python/python-internal.h (class gdbpy_enter): Likewise.
5276         * regcache.h (regcache): Likewise.
5277         * target-descriptions.c (struct tdesc_reg): Likewise.
5278         (struct tdesc_type): Likewise.
5279         (struct tdesc_feature): Likewise.
5280         * ui-out.h (ui_out_emit_type): Likewise.
5281
5282 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
5283
5284         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5285         label abort_expression.
5286
5287 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5288
5289         * common/buffer.c (buffer_xml_printf): Adjust.
5290         * common/xml-utils.c (xml_escape_text): Change return type to
5291         std::string, update code accordingly.
5292         * common/xml-utils.h (xml_escape_text): Change return type to
5293         std::string.
5294         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5295         * windows-tdep.c (windows_xfer_shared_library): Adjust.
5296         * unittests/xml-utils-selftests.c (test_xml_escape_text):
5297         Adjust.
5298
5299 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5300
5301         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5302         (SUBDIR_UNITTESTS_OBS): Add new object file.
5303         * unittests/xml-utils-selftests.c: New file.
5304
5305 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5306
5307         * common/selftest.h (selftest): New struct/interface.
5308         (register_test): Add name parameter, add new overload.
5309         (run_tests): Add filter parameter.
5310         (for_each_selftest_ftype): New typedef.
5311         (for_each_selftest): New declaration.
5312         * common/selftest.c (tests): Change type to
5313         map<string, unique_ptr<selftest>>.
5314         (simple_selftest): New struct.
5315         (register_test): New function.
5316         (register_test): Add name parameter and use it.
5317         (run_tests): Add filter parameter and use it.  Add prints.
5318         Adjust to vector -> map change.
5319         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5320         registering selftests.
5321         * arm-tdep.c (_initialize_arm_tdep): Likewise.
5322         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5323         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5324         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5325         * findvar.c (_initialize_findvar): Likewise.
5326         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5327         * maint.c (maintenance_selftest): Update call to run_tests.
5328         (maintenance_info_selftests): New function.
5329         (_initialize_maint_cmds): Register "maintenance info selftests"
5330         command.  Update "maintenance selftest" doc.
5331         * regcache.c (_initialize_regcache): Add names when registering
5332         selftests.
5333         * rust-exp.y (_initialize_rust_exp): Likewise.
5334         * selftest-arch.c (gdbarch_selftest): New struct.
5335         (gdbarch_tests): Remove.
5336         (register_test_foreach_arch): Add name parameter.  Call
5337         register_test.
5338         (tests_with_arch): Remove, move most content to
5339         gdbarch_selftest::operator().
5340         (_initialize_selftests_foreach_arch): Remove.
5341         * selftest-arch.h (register_test_foreach_arch): Add name
5342         parameter.
5343         (run_tests_with_arch): New declaration.
5344         * utils-selftests.c (_initialize_utils_selftests): Add names
5345         when registering selftests.
5346         * utils.c (_initialize_utils): Likewise.
5347         * unittests/array-view-selftests.c
5348         (_initialize_array_view_selftests): Likewise.
5349         * unittests/environ-selftests.c (_initialize_environ_selftests):
5350         Likewise.
5351         * unittests/function-view-selftests.c
5352         (_initialize_function_view_selftests): Likewise.
5353         * unittests/offset-type-selftests.c
5354         (_initialize_offset_type_selftests): Likewise.
5355         * unittests/optional-selftests.c
5356         (_initialize_optional_selftests): Likewise.
5357         * unittests/scoped_restore-selftests.c
5358         (_initialize_scoped_restore_selftests): Likewise.
5359         * NEWS: Document "maintenance selftest" and "maint info
5360         selftests".
5361
5362 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5363
5364         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5365         scoped_restore.
5366
5367 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5368
5369         * mi/mi-main.c (mi_load_progress): Make uiout variable
5370         a unique_ptr.
5371
5372 2017-09-15  Pedro Alves  <palves@redhat.com>
5373
5374         * compile/compile-c-types.c (convert_enum, convert_int)
5375         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5376
5377 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
5378
5379         * dwarf2read.c (copy_string): Remove.
5380         (parse_macro_definition): Replace copy_string with savestring.
5381
5382 2017-09-15  Yao Qi  <yao.qi@linaro.org>
5383
5384         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5385         gdb_target_obs.
5386         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5387         Likewise.
5388         (i[34567]86-*-linux*): Likewise.
5389
5390 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5391
5392         * dwarf2expr.h (dwarf_stack_value): Add constructor.
5393         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5394         <stack>: Change type to std::vector.
5395         <stack_len, stack_allocated>: Remove.
5396         <grow_stack>: Remove.
5397         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5398         (dwarf_expr_context::~dwarf_expr_context): Remove.
5399         (dwarf_expr_context::grow_stack): Remove.
5400         (dwarf_expr_context::push): Adjust.
5401         (dwarf_expr_context::pop): Adjust.
5402         (dwarf_expr_context::fetch): Adjust.
5403         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5404         (dwarf_expr_context::stack_empty_p): Adjust.
5405         (dwarf_expr_context::execute_stack_op): Adjust.
5406
5407 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5408
5409         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5410         return type to bool.
5411         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5412
5413 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5414
5415         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5416         Change type to bool.
5417         (dwarf_stack_value) <in_stack_memory>: Likewise.
5418         (dwarf_expr_context) <push_address>: Change parameter type to
5419         bool.
5420         <fetch_in_stack_memory>: Change return type to bool.
5421         <push>: Change parameter type to bool.
5422         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5423         to bool.
5424         (dwarf_expr_context::push_address): Likewise.
5425         (dwarf_expr_context::fetch_in_stack_memory): Change return type
5426         to bool.
5427         (dwarf_expr_context::execute_stack_op): Adjust.
5428         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5429
5430 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5431
5432         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5433         (struct dwarf_expr_context) <n_pieces>: Remove.
5434         <pieces>: Change type to std::vector.
5435         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5436         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5437         pieces.
5438         (dwarf_expr_context::add_piece): Adjust.
5439         * dwarf2loc.c (struct piece_closure): Initialize fields.
5440         <n_pieces>: Remove.
5441         <pieces>: Change type to std::vector.
5442         (allocate_piece_closure): Adjust, change parameter to
5443         std::vector rvalue and std::move it to piece_closure.
5444         (rw_pieced_value): Adjust.
5445         (check_pieced_synthetic_pointer): Adjust.
5446         (indirect_synthetic_pointer): Adjust.
5447         (coerce_pieced_ref): Adjust.
5448         (free_pieced_value_closure):  Adjust.  Use delete to free
5449         piece_closure.
5450         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
5451         to allocate_piece_closure.
5452         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5453
5454 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5455
5456         * probe.h (probe_ops_cp): Remove typedef.
5457         (DEF_VEC_P (probe_ops_cp)): Remove.
5458         (all_probe_ops): Change type to std::vector.
5459         * probe.c (info_probes_for_ops): Adjust to vector change.
5460         (probe_linespec_to_ops): Likewise.
5461         (all_probe_ops): Change type to std::vector.
5462         (_initialize_probe): Adjust to vector change.
5463         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5464         * elfread.c (elf_get_probes): Likewise.
5465         * stap-probe.c (_initialize_stap_probe): Likewise.
5466
5467 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5468
5469         * probe.h (struct bound_probe): Define constructors.
5470         * probe.c (bound_probe_s): Remove typedef.
5471         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5472         (collect_probes): Change return type to std::vector, remove
5473         cleanup.
5474         (compare_probes): Return bool, change parameter type.  Change
5475         semantic to "less than".
5476         (gen_ui_out_table_header_info): Change parameter to std::vector
5477         and update.
5478         (exists_probe_with_pops): Likewise.
5479         (info_probes_for_ops): Update to std::vector change.
5480         (enable_probes_command): Likewise.
5481         (disable_probes_command): Likewise.
5482
5483 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5484
5485         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5486         vec to std::vector.
5487         * probe.c (parse_probes_in_pspace): Update.
5488         (find_probes_in_objfile): Update.
5489         (find_probe_by_pc): Update.
5490         (collect_probes): Update.
5491         (probe_any_get_probes): Update.
5492         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5493         return type to reference to std::vector.
5494         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5495         std::vector and update.
5496         (dtrace_process_dof): Likewise.
5497         (dtrace_get_probes): Likewise.
5498         * elfread.c (elf_get_probes): Change return type to std::vector,
5499         store an std::vector in bfd_data.
5500         (probe_key_free): Update to std::vector.
5501         * stap-probe.c (handle_stap_probe): Change parameter to
5502         std::vector and update.
5503         (stap_get_probes): Likewise.
5504         * symfile-debug.c (debug_sym_get_probes): Change return type to
5505         std::vector and update.
5506
5507 2017-09-11  Tom Tromey  <tom@tromey.com>
5508
5509         * breakpoint.c (program_breakpoint_here_p): Update.
5510         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5511         from make_show_memory_breakpoints_cleanup.  Return a
5512         scoped_restore_tmpl<int>.
5513         (restore_show_memory_breakpoints): Remove.
5514         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5515         * mem-break.c (memory_validate_breakpoint): Update.
5516         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5517         (ia64_memory_remove_breakpoint): Update.
5518         (ia64_breakpoint_from_pc): Update.
5519         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5520         from make_show_memory_breakpoints_cleanup.
5521
5522 2017-09-11  Tom Tromey  <tom@tromey.com>
5523
5524         * d-namespace.c (d_lookup_symbol): Use std::string.
5525         (find_symbol_in_baseclass): Likewise.
5526
5527 2017-09-11  Tom Tromey  <tom@tromey.com>
5528
5529         * ctf.c (ctf_start): Use std::string.
5530
5531 2017-09-11  Tom Tromey  <tom@tromey.com>
5532
5533         * ada-lang.c (is_known_support_routine): Update.
5534         (ada_unhandled_exception_name_addr_from_raise): Update.
5535         * guile/scm-frame.c (gdbscm_frame_name): Update.
5536         * python/py-frame.c (frapy_name): Update.
5537         (frapy_function): Update.
5538         * stack.h (find_frame_funname): Update.
5539         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5540         (print_frame): Update.
5541
5542 2017-09-11  Tom Tromey  <tom@tromey.com>
5543
5544         * findcmd.c (put_bits): Take a gdb::byte_vector.
5545         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5546         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5547         cleanups.
5548         (find_command): Update.
5549
5550 2017-09-11  Tom Tromey  <tom@tromey.com>
5551
5552         * cli/cli-script.c (class scoped_restore_hook_in): New.
5553         (clear_hook_in_cleanup): Remove.
5554         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5555         scoped_restore_hook_in.
5556
5557 2017-09-11  Tom Tromey  <tom@tromey.com>
5558
5559         * cli/cli-script.c (restore_interp): Remove.
5560         (read_command_lines): Use scoped_restore_interp.
5561         * interps.c (scoped_restore_interp::set_temp): Rename from
5562         interp_set_temp.
5563         * interps.h (class scoped_restore_interp): New.
5564         (interp_set_temp): Remove.
5565
5566 2017-09-11  Tom Tromey  <tom@tromey.com>
5567
5568         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5569         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5570         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5571         scoped_restore.
5572         (mi_cmd_break_insert_1): Update.
5573         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5574         scoped_restore.
5575
5576 2017-09-11  Tom Tromey  <tom@tromey.com>
5577
5578         * demangle.c (demangle_command): Update.
5579         * breakpoint.c (disable_command): Update.
5580         (enable_command): Update.
5581         (find_location_by_number): Make "number" const.  Use
5582         get_number_trailer.
5583         * cli/cli-utils.c (extract_arg): Return std::string.
5584         * probe.c (parse_probe_linespec): Update.  Change types.
5585         (collect_probes): Take string arguments.
5586         (parse_probe_linespec): Likewise.
5587         (info_probes_for_ops): Update.
5588         (enable_probes_command): Update.
5589         (disable_probes_command): Update.
5590         * break-catch-sig.c (catch_signal_split_args): Update.
5591         * mi/mi-parse.c (mi_parse): Update.
5592
5593 2017-09-11  Tom Tromey  <tom@tromey.com>
5594
5595         * language.h (language_enum): Make argument const.
5596         * language.c (language_enum): Make argument const.
5597
5598 2017-09-11  Tom Tromey  <tom@tromey.com>
5599
5600         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5601         as function.
5602         (skip_to_space): Rename from skip_to_space_const.
5603         * common/common-utils.c (skip_to_space): New function.
5604         (skip_to_space): Rename from skip_to_space_const.
5605         * cli/cli-utils.h (get_number): Rename from get_number_const.
5606         (extract_arg): Rename from extract_arg_const.
5607         * cli/cli-utils.c (get_number): Rename from get_number_const.
5608         (extract_arg): Rename from extract_arg_const.
5609         (number_or_range_parser::get_number): Use ::get_number.
5610         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5611         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5612         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5613         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5614         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5615         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5616         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5617         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5618
5619 2017-09-11  Tom Tromey  <tom@tromey.com>
5620
5621         * python/python.c (do_start_initialization): Use
5622         py-event-types.def to initialize types.
5623         Define all object type structures.
5624         * python/python-internal.h: Don't declare event initialization
5625         functions.
5626         * python/py-threadevent.c (thread_event_object_type): Don't
5627         define.
5628         * python/py-stopevent.c (stop_event_object_type): Don't define.
5629         * python/py-signalevent.c (signal_event_object_type): Don't
5630         declare or define.
5631         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5632         (clear_objfiles_event_object_type): Don't declare or define.
5633         * python/py-infevents.c (inferior_call_pre_event_object_type)
5634         (inferior_call_post_event_object_type)
5635         (register_changed_event_object_type)
5636         (memory_changed_event_object_type): Don't declare or define.
5637         * python/py-inferior.c (new_thread_event_object_type)
5638         (new_inferior_event_object_type)
5639         (inferior_deleted_event_object_type): Don't declare or define.
5640         * python/py-exitedevent.c (exited_event_object_type): Don't
5641         declare or define.
5642         * python/py-evts.c (gdbpy_initialize_py_events): Use
5643         py-all-events.def.
5644         * python/py-events.h (thread_event_object_type): Don't declare.
5645         (events_object): Use py-all-events.def.
5646         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5647         py-event-types.def.
5648         * python/py-event-types.def: New file.
5649         * python/py-continueevent.c (create_continue_event_object): Don't
5650         declare or define.
5651         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5652         declare or define.
5653         * python/py-all-events.def: New file.
5654
5655 2017-09-11  Tom Tromey  <tom@tromey.com>
5656
5657         * python/py-threadevent.c (create_thread_event_object): Return
5658         gdbpy_ref.
5659         * python/py-stopevent.h (create_stop_event_object)
5660         (create_breakpoint_event_object, create_signal_event_object):
5661         Update.
5662         * python/py-stopevent.c (create_stop_event_object): Return
5663         gdbpy_ref.
5664         (emit_stop_event): Update.
5665         * python/py-signalevent.c (create_signal_event_object): Return
5666         gdbpy_ref.
5667         * python/py-infevents.c (create_inferior_call_event_object):
5668         Update.
5669         * python/py-event.h (create_event_object)
5670         (create_thread_event_object): Update.
5671         * python/py-event.c (create_event_object): Return gdbpy_ref.
5672         * python/py-continueevent.c: Return gdbpy_ref.
5673         * python/py-bpevent.c (create_breakpoint_event_object): Return
5674         gdbpy_ref.
5675
5676 2017-09-11  Tom Tromey  <tom@tromey.com>
5677
5678         PR python/15622:
5679         * NEWS: Add entry.
5680         * python/python.c (do_start_initialization): Initialize new event
5681         types.
5682         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5683         (gdbpy_initialize_inferior_deleted_event)
5684         (gdbpy_initialize_new_thread_event): Declare.
5685         * python/py-threadevent.c (create_thread_event_object): Add option
5686         "thread" parameter.
5687         * python/py-inferior.c (new_thread_event_object_type)
5688         (new_inferior_event_object_type)
5689         (inferior_deleted_event_object_type): Declare.
5690         (python_new_inferior, python_inferior_deleted): New functions.
5691         (add_thread_object): Emit new_thread event.
5692         (gdbpy_initialize_inferior): Attach new functions to corresponding
5693         observers.
5694         (new_thread, new_inferior, inferior_deleted): Define new event
5695         types.
5696         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5697         registries.
5698         * python/py-events.h (events_object) <new_inferior,
5699         inferior_deleted, new_thread>: New fields.
5700         * python/py-event.h (create_thread_event_breakpoint): Add optional
5701         "thread" parameter.
5702
5703 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5704
5705         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5706         check current_ui instead.
5707         (internal_vproblem): Likewise.
5708
5709 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5710
5711         * thread.c (print_thread_info_1): Remove unnecessary calls to
5712         uiout->is_mi_like_p.
5713
5714 2017-09-09  Tom Tromey  <tom@tromey.com>
5715
5716         * namespace.h (add_using_directive): Update.
5717         * namespace.c (add_using_directive): Change type of excludes to
5718         std::vector.
5719         * dwarf2read.c (read_import_statement): Use std::vector.
5720         (read_namespace): Update.
5721         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5722
5723 2017-09-09  Tom Tromey  <tom@tromey.com>
5724
5725         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5726
5727 2017-09-09  Tom Tromey  <tom@tromey.com>
5728
5729         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5730
5731 2017-09-09  Tom Tromey  <tom@tromey.com>
5732
5733         * stack.c (func_command): Use gdb::def_vector.
5734
5735 2017-09-09  Tom Tromey  <tom@tromey.com>
5736
5737         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5738         ui_out_emit_list, ui_out_emit_tuple.
5739         (mi_cmd_var_update): Likewise.
5740
5741 2017-09-09  Tom Tromey  <tom@tromey.com>
5742
5743         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5744         ui_out_redirect_pop.
5745         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5746         ui_out_redirect_pop.
5747         * utils.c (do_ui_out_redirect_pop)
5748         (make_cleanup_ui_out_redirect_pop): Remove.
5749         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5750         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5751         * ui-out.h (ui_out_redirect_pop): New class.
5752
5753 2017-09-09  Tom Tromey  <tom@tromey.com>
5754
5755         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5756         (list_available_thread_groups, mi_cmd_list_thread_groups)
5757         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5758         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5759         Likewise.
5760
5761 2017-09-09  Tom Tromey  <tom@tromey.com>
5762
5763         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5764         ui_out_emit_tuple.
5765
5766 2017-09-09  Tom Tromey  <tom@tromey.com>
5767
5768         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5769         * stack.c (print_frame): Use ui_out_emit_tuple.
5770         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5771         (info_spu_mailbox_command, info_spu_dma_command)
5772         (info_spu_proxydma_command): Likewise.
5773         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5774         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5775         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5776         ui_out_emit_tuple.
5777         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5778
5779 2017-09-09  Tom Tromey  <tom@tromey.com>
5780
5781         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5782         (class ui_out_emit_table): Update comment.
5783         * ui-out.c (do_cleanup_table_end)
5784         (make_cleanup_ui_out_table_begin_end): Remove.
5785         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5786         (info_spu_dma_cmdlist): Likewise.
5787         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5788         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5789         ui_out_emit_table.
5790
5791 2017-09-09  Tom Tromey  <tom@tromey.com>
5792
5793         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5794         ui_out_emit_list, gdb::optional.
5795
5796 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5797
5798         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5799         prototype.
5800         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5801         prototype.
5802         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5803         prototype.
5804         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5805         * ada-exp.y: Remove _initialize_ada_exp prototype.
5806         * ada-lang.c: Remove _initialize_ada_language prototype.
5807         * ada-tasks.c: Remove _initialize_tasks prototype.
5808         * addrmap.c: Remove _initialize_addrmap prototype.
5809         * agent.c: Remove _initialize_agent prototype.
5810         * aix-thread.c: Remove _initialize_aix_thread prototype.
5811         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5812         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5813         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5814         prototype.
5815         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5816         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5817         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5818         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5819         prototype.
5820         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5821         prototype.
5822         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5823         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5824         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5825         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5826         prototype.
5827         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5828         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5829         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5830         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5831         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5832         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5833         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5834         prototype.
5835         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5836         prototype.
5837         * annotate.c: Remove _initialize_annotate prototype.
5838         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5839         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5840         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5841         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5842         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5843         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5844         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5845         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5846         prototype.
5847         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5848         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5849         * auto-load.c: Remove _initialize_auto_load prototype.
5850         * auxv.c: Remove _initialize_auxv prototype.
5851         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5852         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5853         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5854         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5855         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5856         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5857         prototype.
5858         * break-catch-throw.c: Remove _initialize_break_catch_throw
5859         prototype.
5860         * breakpoint.c: Remove _initialize_breakpoint prototype.
5861         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5862         * btrace.c: Remove _initialize_btrace prototype.
5863         * charset.c: Remove _initialize_charset prototype.
5864         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5865         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5866         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5867         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5868         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5869         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5870         * coffread.c: Remove _initialize_coffread prototype.
5871         * compile/compile.c: Remove _initialize_compile prototype.
5872         * complaints.c: Remove _initialize_complaints prototype.
5873         * completer.c: Remove _initialize_completer prototype.
5874         * copying.awk: Remove _initialize_copying prototype.
5875         * copying.c: Regenerate.
5876         * core-regset.c: Remove _initialize_core_regset prototype.
5877         * corefile.c: Remove _initialize_core prototype.
5878         * corelow.c: Remove _initialize_corelow prototype.
5879         * cp-abi.c: Remove _initialize_cp_abi prototype.
5880         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5881         * cp-support.c: Remove _initialize_cp_support prototype.
5882         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5883         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5884         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5885         * ctf.c: Remove _initialize_ctf prototype.
5886         * d-lang.c: Remove _initialize_d_language prototype.
5887         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5888         prototype.
5889         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5890         * dbxread.c: Remove _initialize_dbxread prototype.
5891         * dcache.c: Remove _initialize_dcache prototype.
5892         * demangle.c: Remove _initialize_demangler prototype.
5893         * disasm-selftests.c: Remove _initialize_disasm_selftests
5894         prototype.
5895         * disasm.c: Remove _initialize_disasm prototype.
5896         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5897         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5898         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5899         prototype.
5900         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5901         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5902         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5903         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5904         * elfread.c: Remove _initialize_elfread prototype.
5905         * exec.c: Remove _initialize_exec prototype.
5906         * extension.c: Remove _initialize_extension prototype.
5907         * f-lang.c: Remove _initialize_f_language prototype.
5908         * f-valprint.c: Remove _initialize_f_valprint prototype.
5909         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5910         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5911         * filesystem.c: Remove _initialize_filesystem prototype.
5912         * findcmd.c: Remove _initialize_mem_search prototype.
5913         * fork-child.c: Remove _initialize_fork_child prototype.
5914         * frame-base.c: Remove _initialize_frame_base prototype.
5915         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5916         * frame.c: Remove _initialize_frame prototype.
5917         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5918         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5919         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5920         * gcore.c: Remove _initialize_gcore prototype.
5921         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5922         * gdbarch.c: Regenerate.
5923         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5924         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5925         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5926         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5927         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5928         * go-lang.c: Remove _initialize_go_language prototype.
5929         * go32-nat.c: Remove _initialize_go32_nat prototype.
5930         * guile/guile.c: Remove _initialize_guile prototype.
5931         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5932         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5933         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5934         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5935         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5936         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5937         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5938         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5939         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5940         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5941         prototype.
5942         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5943         prototype.
5944         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5945         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5946         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5947         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5948         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5949         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5950         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5951         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5952         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5953         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5954         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5955         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5956         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5957         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5958         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5959         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5960         prototype.
5961         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5962         prototype.
5963         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5964         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5965         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5966         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5967         * infcall.c: Remove _initialize_infcall prototype.
5968         * infcmd.c: Remove _initialize_infcmd prototype.
5969         * inferior.c: Remove _initialize_inferiors prototype.
5970         * inflow.c: Remove _initialize_inflow prototype.
5971         * infrun.c: Remove _initialize_infrun prototype.
5972         * interps.c: Remove _initialize_interpreter prototype.
5973         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5974         * jit.c: Remove _initialize_jit prototype.
5975         * language.c: Remove _initialize_language prototype.
5976         * linux-fork.c: Remove _initialize_linux_fork prototype.
5977         * linux-nat.c: Remove _initialize_linux_nat prototype.
5978         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5979         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5980         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5981         * m2-lang.c: Remove _initialize_m2_language prototype.
5982         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5983         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5984         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5985         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5986         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5987         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5988         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5989         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5990         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5991         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5992         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5993         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5994         * machoread.c: Remove _initialize_machoread prototype.
5995         * macrocmd.c: Remove _initialize_macrocmd prototype.
5996         * macroscope.c: Remove _initialize_macroscope prototype.
5997         * maint.c: Remove _initialize_maint_cmds prototype.
5998         * mdebugread.c: Remove _initialize_mdebugread prototype.
5999         * memattr.c: Remove _initialize_mem prototype.
6000         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6001         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6002         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6003         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6004         * mi/mi-main.c: Remove _initialize_mi_main prototype.
6005         * microblaze-linux-tdep.c: Remove
6006         _initialize_microblaze_linux_tdep prototype.
6007         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6008         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6009         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6010         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6011         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6012         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6013         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6014         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6015         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6016         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6017         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6018         prototype.
6019         * mipsread.c: Remove _initialize_mipsread prototype.
6020         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6021         prototype.
6022         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6023         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6024         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6025         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6026         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6027         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6028         prototype.
6029         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6030         * nto-procfs.c: Remove _initialize_procfs prototype.
6031         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6032         * objc-lang.c: Remove _initialize_objc_language prototype.
6033         * objfiles.c: Remove _initialize_objfiles prototype.
6034         * observer.c: Remove observer_test_first_notification_function,
6035         observer_test_second_notification_function,
6036         observer_test_third_notification_function, and
6037         _initialize_observer prototypes.
6038         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6039         * osabi.c: Remove _initialize_gdb_osabi prototype.
6040         * osdata.c: Remove _initialize_osdata prototype.
6041         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6042         * parse.c: Remove _initialize_parse prototype.
6043         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6044         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6045         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6046         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6047         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6048         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6049         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6050         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6051         * printcmd.c: Remove _initialize_printcmd prototype.
6052         * probe.c: Remove _initialize_probe prototype.
6053         * proc-api.c: Remove _initialize_proc_api prototype.
6054         * proc-events.c: Remove _initialize_proc_events prototype.
6055         * proc-service.c: Remove _initialize_proc_service prototype.
6056         * procfs.c: Remove _initialize_procfs prototype.
6057         * psymtab.c: Remove _initialize_psymtab prototype.
6058         * python/python.c: Remove _initialize_python prototype.
6059         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6060         * record-btrace.c: Remove _initialize_record_btrace prototype.
6061         * record-full.c: Remove _initialize_record_full prototype.
6062         * record.c: Remove _initialize_record prototype.
6063         * regcache.c: Remove _initialize_regcache prototype.
6064         * reggroups.c: Remove _initialize_reggroup prototype.
6065         * remote-notif.c: Remove _initialize_notif prototype.
6066         * remote-sim.c: Remove _initialize_remote_sim prototype.
6067         * remote.c: Remove _initialize_remote prototype.
6068         * reverse.c: Remove _initialize_reverse prototype.
6069         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6070         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6071         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6072         prototype.
6073         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6074         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6075         * rust-exp.y: Remove _initialize_rust_exp prototype.
6076         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6077         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6078         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6079         * score-tdep.c: Remove _initialize_score_tdep prototype.
6080         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6081         prototype.
6082         * ser-go32.c: Remove _initialize_ser_dos prototype.
6083         * ser-mingw.c: Remove _initialize_ser_windows prototype.
6084         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6085         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6086         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6087         * serial.c: Remove _initialize_serial prototype.
6088         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6089         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6090         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6091         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6092         * skip.c: Remove _initialize_step_skip prototype.
6093         * sol-thread.c: Remove _initialize_sol_thread prototype.
6094         * solib-aix.c: Remove _initialize_solib_aix prototype.
6095         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6096         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6097         * solib-frv.c: Remove _initialize_frv_solib prototype.
6098         * solib-spu.c: Remove _initialize_spu_solib prototype.
6099         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6100         * solib-target.c: Remove _initialize_solib_target prototype.
6101         * solib.c: Remove _initialize_solib prototype.
6102         * source.c: Remove _initialize_source prototype.
6103         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6104         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6105         prototype.
6106         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6107         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6108         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6109         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6110         prototype.
6111         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6112         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6113         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6114         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6115         prototype.
6116         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6117         prototype.
6118         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6119         prototype.
6120         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6121         prototype.
6122         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6123         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6124         prototype.
6125         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6126         prototype.
6127         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6128         prototype.
6129         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6130         prototype.
6131         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6132         prototype.
6133         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6134         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6135         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6136         * stabsread.c: Remove _initialize_stabsread prototype.
6137         * stack.c: Remove _initialize_stack prototype.
6138         * stap-probe.c: Remove _initialize_stap_probe prototype.
6139         * std-regs.c: Remove _initialize_frame_reg prototype.
6140         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6141         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6142         * symfile.c: Remove _initialize_symfile prototype.
6143         * symmisc.c: Remove _initialize_symmisc prototype.
6144         * symtab.c: Remove _initialize_symtab prototype.
6145         * target-dcache.c: Remove _initialize_target_dcache prototype.
6146         * target-descriptions.c: Remove _initialize_target_descriptions
6147         prototype.
6148         * thread.c: Remove _initialize_thread prototype.
6149         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6150         prototype.
6151         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6152         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6153         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6154         prototype.
6155         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6156         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6157         * tracefile.c: Remove _initialize_tracefile prototype.
6158         * tracepoint.c: Remove _initialize_tracepoint prototype.
6159         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6160         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6161         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6162         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6163         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6164         * tui/tui-win.c: Remove _initialize_tui_win prototype.
6165         * tui/tui.c: Remove _initialize_tui prototype.
6166         * typeprint.c: Remove _initialize_typeprint prototype.
6167         * user-regs.c: Remove _initialize_user_regs prototype.
6168         * utils.c: Remove _initialize_utils prototype.
6169         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6170         * valarith.c: Remove _initialize_valarith prototype.
6171         * valops.c: Remove _initialize_valops prototype.
6172         * valprint.c: Remove _initialize_valprint prototype.
6173         * value.c: Remove _initialize_values prototype.
6174         * varobj.c: Remove _initialize_varobj prototype.
6175         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6176         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6177         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6178         * windows-nat.c: Remove _initialize_windows_nat,
6179         _initialize_check_for_gdb_ini, and _initialize_loadable
6180         prototypes.
6181         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6182         * xcoffread.c: Remove _initialize_xcoffread prototype.
6183         * xml-support.c: Remove _initialize_xml_support prototype.
6184         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6185         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6186         prototype.
6187         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6188         prototype.
6189         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6190
6191 2017-09-08  Keith Seitz  <keiths@redhat.com>
6192
6193         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6194         field.
6195
6196 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
6197
6198         * f-valprint.c (f_val_print): Remove check for one byte
6199         sized integers. Remove printing of character type.
6200
6201 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
6202             Christoph Weinmann  <christoph.t.weinmann@intel.com>
6203             Bernhard Heckel  <bernhard.heckel@intel.com>
6204
6205         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6206         to maintain proper indentation when printing pointers/refs.
6207
6208 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6209
6210         GDB 8.0.1 released.
6211
6212 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6213
6214         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6215
6216 2017-09-05  Tom Tromey  <tom@tromey.com>
6217
6218         * parse.c (funcall_chain): Now a std::vector.
6219         (start_arglist, end_arglist): Simplify.
6220         (free_funcalls): Remove.
6221         (parse_exp_in_context_1): Remove cleanup.
6222
6223 2017-09-05  Tom Tromey  <tom@tromey.com>
6224
6225         * go-exp.y (go_parse): Don't create a cleanup.
6226
6227 2017-09-05  Tom Tromey  <tom@tromey.com>
6228
6229         * d-exp.y (PrimaryExpression): Use std::string.
6230         (d_parse): Don't create a cleanup.
6231
6232 2017-09-05  Tom Tromey  <tom@tromey.com>
6233
6234         * utils.c (do_clear_parser_state): Remove.
6235         (make_cleanup_clear_parser_state): Remove.
6236         * p-exp.y (pascal_parse): Use scoped_restore.
6237         * m2-exp.y (m2_parse): Use scoped_restore.
6238         * f-exp.y (f_parse): Use scoped_restore.
6239         * d-exp.y (d_parse): Use scoped_restore.
6240         * c-exp.y (c_parse): Use scoped_restore.
6241         * ada-exp.y (ada_parse): Use scoped_restore.
6242         * utils.h (make_cleanup_clear_parser_state): Remove.
6243
6244 2017-09-06  Keith Seitz  <keiths@redhat.com>
6245
6246         * dwarf2read.c (dw2_linkage_name_attr): New function.
6247         (dw2_linkage_name): New function.
6248         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6249         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6250         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6251
6252 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6253
6254         * config/djgpp/djconfig.sh: Correct shell portability issue.
6255
6256 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6257
6258         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6259
6260 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6261
6262         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6263         * NEWS: Mention new FreeBSD/mips native configuration.
6264         * configure.host: Add aarch64*-*-freebsd*.
6265         * configure.nat: Likewise.
6266         * aarch64-fbsd-nat.c: New file.
6267
6268 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6269
6270         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6271         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6272         * NEWS: Mention new FreeBSD/aarch64 target.
6273         * configure.tgt: Add aarch64*-*-freebsd*.
6274         * aarch64-fbsd-tdep.c: New file.
6275         * aarch64-fbsd-tdep.h: New file.
6276
6277 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6278
6279         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6280
6281 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6282
6283         * parse.c (find_minsym_type_and_address): Don't relocate addresses
6284         of TLS symbols.
6285
6286 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6287
6288         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6289         call.
6290
6291 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6292
6293         * infrun.c (follow_exec): Call add_thread after
6294         target_find_description.
6295
6296 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6297
6298         * infrun.c (handle_inferior_event_1): When exec'ing, read
6299         stop_pc after follow_exec.
6300
6301 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6302
6303         * remote.c (process_g_packet): Update error message.
6304
6305 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6306
6307         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6308         targets.
6309
6310 2017-09-05  Pedro Alves  <palves@redhat.com>
6311
6312         * eval.c (eval_call, evaluate_funcall): New functions, factored
6313         out from ...
6314         (evaluate_subexp_standard): ... this.
6315
6316 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6317
6318         * amd64-tdep.c (amd64_target_description): Create target
6319         descriptions.
6320         (_initialize_amd64_tdep): Don't call functions
6321         initialize_tdesc_amd64_*.  Add self tests.
6322         * arch/amd64.c (amd64_create_target_description): Add parameter
6323         is_linux.  Call set_tdesc_osabi if is_linux is true.
6324         * arch/amd64.h (amd64_create_target_description): Update the
6325         declaration.
6326         * arch/i386.c (i386_create_target_description): Add parameter
6327         is_linux.  Call set_tdesc_osabi if is_linux is true.
6328         * arch/i386.h (i386_create_target_description): Update
6329         declaration.
6330         * configure.tgt: Add i386.o to gdb_target_obs.
6331         * features/Makefile (XMLTOC): Remove i386/*.xml.
6332         * features/i386/amd64-avx-avx512.c: Remove.
6333         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6334         * features/i386/amd64-avx-mpx.c: Remove.
6335         * features/i386/amd64-avx.c: Remove.
6336         * features/i386/amd64-mpx.c: Remove.
6337         * features/i386/amd64.c: Remove.
6338         * features/i386/i386-avx-avx512.c: Remove.
6339         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6340         * features/i386/i386-avx-mpx.c: Remove.
6341         * features/i386/i386-avx.c: Remove.
6342         * features/i386/i386-mmx.c: Remove.
6343         * features/i386/i386-mpx.c: Remove.
6344         * features/i386/i386.c: Remove.
6345         * i386-tdep.c: Don't include features/i386/i386*.c., include
6346         target-descriptions.h and arch/i386.h.
6347         (i386_target_description): Create target descriptions.
6348         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6349         functions.  Do self tests.
6350
6351 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6352
6353         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6354         * features/i386/amd64-avx-avx512-linux.c: Removed.
6355         * features/i386/amd64-avx-linux.c: Removed.
6356         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6357         * features/i386/amd64-avx-mpx-linux.c: Removed.
6358         * features/i386/amd64-linux.c: Removed.
6359         * features/i386/amd64-mpx-linux.c: Removed.
6360         * features/i386/x32-avx-avx512-linux.c: Removed.
6361         * features/i386/x32-avx-linux.c: Removed.
6362         * features/i386/x32-linux.c: Removed.
6363
6364 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6365
6366         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
6367         features/i386/*.c.
6368         (amd64_linux_read_description): Call
6369         amd64_create_target_description.
6370         * arch/amd64.c: New file.
6371         * arch/amd64.h: New file.
6372         * configure.tgt (x86_64-*-linux*): Append amd64.o.
6373         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6374
6375 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6376
6377         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6378         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
6379         (amd64_linux_read_description): Create target descriptions.
6380         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6381         functions.  Add unit tests.
6382         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6383         x32-core.xml.
6384         * features/i386/64bit-avx.c: Generated.
6385         * features/i386/64bit-avx512.c: Generated.
6386         * features/i386/64bit-core.c: Generated.
6387         * features/i386/64bit-linux.c: Generated.
6388         * features/i386/64bit-mpx.c: Generated.
6389         * features/i386/64bit-pkeys.c: Generated.
6390         * features/i386/64bit-segments.c: Generated.
6391         * features/i386/64bit-sse.c: Generated.
6392         * features/i386/x32-core.c: Generated.
6393         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6394         c files for amd64-linux and x32-linux.
6395
6396 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6397
6398         * amd64-linux-tdep.c (amd64_linux_read_description): New
6399         function.
6400         (amd64_linux_core_read_description): Call
6401         amd64_linux_read_description.
6402         (amd64_linux_init_abi): Likewise.
6403         (amd64_x32_linux_init_abi): Likewise.
6404         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6405         * x86-linux-nat.c (x86_linux_read_description): Call
6406         amd64_linux_read_description.
6407
6408 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6409
6410         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6411         comments.
6412
6413 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6414
6415         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6416         * features/i386/i386-avx-avx512-linux.c: Remove.
6417         * features/i386/i386-avx-linux.c: Remove.
6418         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6419         * features/i386/i386-avx-mpx-linux.c: Remove.
6420         * features/i386/i386-linux.c: Remove.
6421         * features/i386/i386-mmx-linux.c: Remove.
6422         * features/i386/i386-mpx-linux.c: Remove.
6423
6424 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6425
6426         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6427         (SFILES): Add arch/i386.c.
6428         (HFILES_NO_SRCDIR): Add arch/i386.h.
6429         * arch/i386.c: New file.
6430         * arch/i386.h: New file.
6431         * arch/tdesc.h (allocate_target_description): Declare.
6432         (set_tdesc_architecture): Declare.
6433         (set_tdesc_osabi): Declare.
6434         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6435         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6436         include arch/i386.h.
6437         (i386_linux_read_description): Remove code and call
6438         i386_create_target_description.
6439         (set_tdesc_architecture): New function.
6440         (set_tdesc_osabi): New function.
6441         * target-descriptions.h (allocate_target_description): Remove.
6442
6443 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6444
6445         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6446         * target-descriptions.c (tdesc_create_feature): Likewise, and
6447         adjust code.
6448         * features/i386/32bit-avx.c: Re-generated.
6449         * features/i386/32bit-avx512.c: Re-generated.
6450         * features/i386/32bit-core.c: Re-generated.
6451         * features/i386/32bit-linux.c: Re-generated.
6452         * features/i386/32bit-mpx.c: Re-generated.
6453         * features/i386/32bit-pkeys.c: Re-generated.
6454         * features/i386/32bit-sse.c: Re-generated.
6455
6456 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6457
6458         * regformats/regdef.h (struct reg): Override operator == and !=.
6459
6460 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6461
6462         * arch/tdesc.h: New file.
6463         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6464         * target-descriptions.c: Update comments.
6465         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6466         declarations.
6467         * features/i386/32bit-avx.c: Re-generated.
6468         * features/i386/32bit-avx512.c: Re-generated.
6469         * features/i386/32bit-core.c: Re-generated.
6470         * features/i386/32bit-linux.c: Re-generated.
6471         * features/i386/32bit-mpx.c: Re-generated.
6472         * features/i386/32bit-pkeys.c: Re-generated.
6473         * features/i386/32bit-sse.c: Re-generated.
6474
6475 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6476
6477         * regformats/regdat.sh: Update generated code.
6478
6479 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6480
6481         * regformats/regdat.sh: Adjust code order.
6482
6483 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6484
6485         * expprint.c (dump_subexp_body_standard): Use constant format
6486         string in fprintf_filtered call.
6487
6488 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6489
6490         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6491         NetBSD/i386.
6492         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6493
6494 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6495
6496         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6497
6498 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6499
6500         * bsd-kvm.o: Define _KMEMUSER.
6501         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6502         * configure: Regenerate.
6503
6504 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6505
6506         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6507         * i386-fbsd-nat.c: Likewise.
6508
6509 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6510
6511         * unittests/array-view-selftests.c: Add include of <array>.
6512
6513 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6514
6515         * spu-tdep.c (flush_ea_cache): Add missing argument to
6516         call_function_by_hand.
6517
6518 2017-09-04  Pedro Alves  <palves@redhat.com>
6519
6520         * NEWS (Safer support for debugging with no debug info): New.
6521
6522 2017-09-04  Pedro Alves  <palves@redhat.com>
6523
6524         * c-exp.y (function_method, function_method_void): Add current
6525         instance flags to TYPE_INSTANCE.
6526         * dwarf2read.c (check_modifier): New.
6527         (compute_delayed_physnames): Assert that only C++ adds delayed
6528         physnames.  Mark fn_fields as const/volatile depending on
6529         physname.
6530         * eval.c (make_params): New type_instance_flags parameter.  Use
6531         it as the new type's instance flags.
6532         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6533         flags element and pass it to make_params.
6534         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6535         instance flags element.
6536         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6537         * gdbtypes.h: Include "enum-flags.h".
6538         (type_instance_flags): New enum-flags type.
6539         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6540         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6541         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6542         (follow_type_instance_flags): New function.
6543         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6544         * parser-defs.h (follow_type_instance_flags): Declare.
6545         * valops.c (value_struct_elt_for_reference): const/volatile must
6546         match too.
6547
6548 2017-09-04  Pedro Alves  <palves@redhat.com>
6549
6550         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6551         function/method scopes; lookup the nested name as a function local
6552         static variable.
6553
6554 2017-09-04  Pedro Alves  <palves@redhat.com>
6555
6556         (%type <voidval>): Add function_method.
6557         * c-exp.y (exp): New production for calls with no arguments.
6558         (function_method, function_method_void_or_typelist): New
6559         productions.
6560         (exp): New production for "method()::static_var".
6561         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6562         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6563         Handle OP_FUNC_STATIC_VAR.
6564         * parse.c (operator_length_standard):
6565         Handle OP_FUNC_STATIC_VAR.
6566
6567 2017-09-04  Pedro Alves  <palves@redhat.com>
6568
6569         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6570         handling.
6571         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6572         Ditto.
6573         * parse.c (operator_length_standard, operator_check_standard):
6574         Ditto.
6575         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6576
6577 2017-09-04  Pedro Alves  <palves@redhat.com>
6578
6579         * ax-gdb.c: Include "typeprint.h".
6580         (gen_expr_for_cast): New function.
6581         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6582         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6583         type is unknown.
6584         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6585         nodebug_data_symbol.
6586         * eval.c: Include "typeprint.h".
6587         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6588         Error out if symbol has unknown type.
6589         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6590         evaluate_subexp_for_cast.
6591         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6592         OP_VAR_MSYM_VALUE.
6593         (evaluate_subexp_for_cast): New function.
6594         * gdbtypes.c (init_nodebug_var_type): New function.
6595         (objfile_type): Use it to initialize types of variables with no
6596         debug info.
6597         * typeprint.c (error_unknown_type): New.
6598         * typeprint.h (error_unknown_type): New declaration.
6599         * compile/compile-c-types.c (convert_type_basic): Handle
6600         TYPE_CODE_ERROR; warn and fallback to int for variables with
6601         unknown type.
6602
6603 2017-09-04  Pedro Alves  <palves@redhat.com>
6604
6605         * eval.c (evaluate_var_value): New function, factored out from ...
6606         (evaluate_subexp_standard): ... here.
6607
6608 2017-09-04  Pedro Alves  <palves@redhat.com>
6609
6610         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6611         Remove useless assignments to 'op'.
6612
6613 2017-09-04  Pedro Alves  <palves@redhat.com>
6614
6615         * eval.c (eval_skip_value): New function.
6616         (evaluate_subexp_standard): Use it.
6617
6618 2017-09-04  Pedro Alves  <palves@redhat.com>
6619
6620         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6621         function name from symbol/minsym and pass it to
6622         error_call_unknown_return_type.
6623
6624 2017-09-04  Pedro Alves  <palves@redhat.com>
6625
6626         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6627         * ax-gdb.c (gen_msym_var_ref): New function.
6628         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6629         * eval.c (evaluate_var_msym_value): New function.
6630         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6631         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6632         to call_function_by_hand.
6633         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6634         Handle OP_VAR_MSYM_VALUE.
6635         (union exp_element) <msymbol>: New field.
6636         * minsyms.h (struct type): Forward declare.
6637         (find_minsym_type_and_address): Declare.
6638         * parse.c (write_exp_elt_msym): New function.
6639         (write_exp_msymbol): Delete, refactored as ...
6640         (find_minsym_type_and_address): ... this new function.
6641         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6642         (operator_length_standard, operator_check_standard): Handle
6643         OP_VAR_MSYM_VALUE.
6644         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6645
6646 2017-09-04  Pedro Alves  <palves@redhat.com>
6647
6648         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6649         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6650         unknown.
6651         * ada-typeprint.c (print_func_type): Handle functions with unknown
6652         return type.
6653         * c-typeprint.c (c_type_print_base): Handle functions and methods
6654         with unknown return type.
6655         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6656         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6657         * compile/compile-c-types.c: Include "objfiles.h".
6658         (convert_func): For functions with unknown return type, warn and
6659         default to int.
6660         * compile/compile-object-run.c (compile_object_run): Adjust call
6661         to call_function_by_hand_dummy.
6662         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6663         call_function_by_hand.
6664         * eval.c (evaluate_subexp_standard): Adjust calls to
6665         call_function_by_hand.  Handle functions and methods with unknown
6666         return type.  Pass expect_type to call_function_by_hand.
6667         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6668         return type.
6669         * gcore.c (call_target_sbrk): Adjust call to
6670         call_function_by_hand.
6671         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6672         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6673         an integer address type instead of nodebug.
6674         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6675         call_function_by_hand.
6676         * infcall.c (error_call_unknown_return_type): New function.
6677         (call_function_by_hand): New "default_return_type" parameter.
6678         Pass it down.
6679         (call_function_by_hand_dummy): New "default_return_type"
6680         parameter.  Use it instead of defaulting to int.  If there's no
6681         default and the return type is unknown, throw an error.  If
6682         there's a default return type, and the called function has no
6683         debug info, then assume the function is prototyped.
6684         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6685         New "default_return_type" parameter.
6686         (error_call_unknown_return_type): New declaration.
6687         * linux-fork.c (call_lseek): Cast return type of lseek.
6688         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6689         call_function_by_hand.
6690         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6691         calls to call_function_by_hand.
6692         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6693         return type.
6694         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6695         (value_nsstring, print_object_command): Adjust calls to
6696         call_function_by_hand.
6697         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6698         functions with unknown return type.
6699         (pascal_type_print_func_varspec_suffix): New function.
6700         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6701         TYPE_CODE_METHOD>: Use it.
6702         * python/py-value.c (valpy_call): Adjust call to
6703         call_function_by_hand.
6704         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6705         call_function_by_hand.
6706         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6707         call_function_by_hand.
6708         * valops.c (value_allocate_space_in_inferior): Adjust call to
6709         call_function_by_hand.
6710         * typeprint.c (type_print_unknown_return_type): New function.
6711         * typeprint.h (type_print_unknown_return_type): New declaration.
6712
6713 2017-09-04  Pedro Alves  <palves@redhat.com>
6714
6715         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6716         types with more than one parameter as prototyped.
6717
6718 2017-09-04  Pedro Alves  <palves@redhat.com>
6719
6720         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6721         (disassemble_command): Use gdb_disassembly_flags instead of bare
6722         int.
6723         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6724         (dump_insns, do_mixed_source_and_assembly_deprecated)
6725         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6726         Use gdb_disassembly_flags instead of bare int.
6727         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6728         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6729         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6730         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6731         (enum gdb_disassembly_flag): ... values of this new enumeration.
6732         (gdb_disassembly_flags): Define.
6733         (gdb_disassembly)
6734         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6735         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6736         gdb_disassembly_flags instead of bare int.
6737         * record-btrace.c (btrace_insn_history)
6738         (record_btrace_insn_history, record_btrace_insn_history_range)
6739         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6740         instead of bare int.
6741         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6742         Use gdb_disassembly_flags instead of bare int.
6743         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6744         Define.
6745         * target-delegates.c: Regenerate.
6746         * target.c (target_insn_history, target_insn_history_from)
6747         (target_insn_history_range): Use gdb_disassembly_flags instead of
6748         bare int.
6749         * target.h: Include "disasm.h".
6750         (struct target_ops) <to_insn_history, to_insn_history_from,
6751         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6752         int.
6753         (target_insn_history, target_insn_history_from)
6754         (target_insn_history_range): Use gdb_disassembly_flags instead of
6755         bare int.
6756
6757 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6758
6759         * cli/cli-script.c (build_command_line): For if/while commands,
6760         check whether args is empty.
6761
6762 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6763
6764         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6765         (enum command_control_type): Likewise.
6766         (struct command_line): Likewise.
6767         (free_command_lines): Likewise.
6768         (struct command_lines_deleter): Likewise.
6769         (command_line_up): Likewise.
6770         (read_command_lines): Likewise.
6771         (read_command_lines_1): Likewise.
6772         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6773         (enum command_control_type): Likewise.
6774         (struct command_line): Likewise.
6775         (free_command_lines): Likewise.
6776         (struct command_lines_deleter): Likewise.
6777         (command_line_up): Likewise.
6778         (read_command_lines): Likewise.
6779         (read_command_lines_1): Likewise.
6780         * breakpoint.h: Include cli/cli-script.h.
6781         * extension-priv.h: Likewise.
6782         * gdbcmd.h: Likewise.
6783
6784 2017-09-04  Pedro Alves  <palves@redhat.com>
6785
6786         * ada-lang.c (is_known_support_routine): Move sal declaration to
6787         where it is initialized.
6788         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6789         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6790         (clear_command, update_static_tracepoint): Remove init_sal
6791         references.  Move declarations closer to initializations.
6792         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6793         initializations.
6794         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6795         references.  Move sal declarations closer to initializations.
6796         * frame.c (find_frame_sal): Return a symtab_and_line via function
6797         return instead of output parameter.  Remove init_sal references.
6798         * frame.h (find_frame_sal): Return a symtab_and_line via function
6799         return instead of output parameter.
6800         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6801         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6802         instead of memset.
6803         (gdbscm_find_pc_line): Remove init_sal reference.
6804         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6805         references.  Move declarations closer to initializations.
6806         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6807         initializations.
6808         (finish_backward): Remove init_sal references.  Move declarations
6809         closer to initializations.
6810         * infrun.c (process_event_stop_test, handle_step_into_function)
6811         (insert_hp_step_resume_breakpoint_at_frame)
6812         (insert_step_resume_breakpoint_at_caller): Likewise.
6813         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6814         (symbol_to_sal): Likewise.
6815         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6816         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6817         to its initialization.
6818         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6819         init_sal references.  Move declarations closer to initializations.
6820         * source.c (get_current_source_symtab_and_line): Remove brace
6821         initialization.
6822         (set_current_source_symtab_and_line): Now takes the sal by const
6823         reference.  Remove brace initialization.
6824         (line_info): Remove init_sal reference.
6825         * source.h (set_current_source_symtab_and_line): Now takes a
6826         symtab_and_line via const reference.
6827         * stack.c (set_current_sal_from_frame): Adjust.
6828         (print_frame_info): Adjust.
6829         (get_last_displayed_sal): Return the sal via function return
6830         instead of via output parameter.  Simplify.
6831         (frame_info): Adjust.
6832         * stack.h (get_last_displayed_sal): Return the sal via function
6833         return instead of via output parameter.
6834         * symtab.c (init_sal): Delete.
6835         (find_pc_sect_line): Remove init_sal references.  Move
6836         declarations closer to initializations.
6837         (find_function_start_sal): Remove init_sal references.  Move
6838         declarations closer to initializations.
6839         * symtab.h (struct symtab_and_line): In-class initialize all
6840         fields.
6841         * tracepoint.c (set_traceframe_context)
6842         (print_one_static_tracepoint_marker): Remove init_sal references.
6843         Move declarations closer to initializations.
6844         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6845         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6846         declarations closer to initializations.
6847         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6848         init_sal references.  Adjust.
6849
6850 2017-09-04  Pedro Alves  <palves@redhat.com>
6851
6852         * ax-gdb.c (agent_command_1): Use range-for.
6853         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6854         * breakpoint.c: Include "common/array-view.h".
6855         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6856         parameter from struct symtabs_and_lines to
6857         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6858         (breakpoint_sals_to_pc): Change sals parameter from struct
6859         symtabs_and_lines to std::vector reference.
6860         (check_fast_tracepoint_sals): Change sals parameter from struct
6861         symtabs_and_lines to std::array_view.  Use range-for.
6862         (decode_static_tracepoint_spec): Return a std::vector instead of
6863         symtabs_and_lines.  Update.
6864         (create_breakpoint): Update.
6865         (break_range_command, until_break_command, clear_command): Update.
6866         (base_breakpoint_decode_location, bkpt_decode_location)
6867         (bkpt_probe_create_sals_from_location)
6868         (bkpt_probe_decode_location, tracepoint_decode_location)
6869         (tracepoint_probe_decode_location)
6870         (strace_marker_create_sals_from_location): Return a std::vector
6871         instead of symtabs_and_lines.
6872         (strace_marker_create_breakpoints_sal): Update.
6873         (strace_marker_decode_location): Return a std::vector instead of
6874         symtabs_and_lines.  Update.
6875         (update_breakpoint_locations): Change struct symtabs_and_lines
6876         parameters to gdb::array_view.  Adjust.
6877         (location_to_sals): Return a std::vector instead of
6878         symtabs_and_lines.  Update.
6879         (breakpoint_re_set_default): Use std::vector instead of struct
6880         symtabs_and_lines.
6881         (decode_location_default): Return a std::vector instead of
6882         symtabs_and_lines.  Update.
6883         * breakpoint.h: Include "common/array-view.h".
6884         (struct breakpoint_ops) <decode_location>: Now returns a
6885         std::vector instead of returning a symtabs_and_lines via output
6886         parameter.
6887         (update_breakpoint_locations): Change sals parameters to use
6888         gdb::array_view.
6889         * cli/cli-cmds.c (edit_command, list_command): Update to use
6890         std::vector and gdb::array_view.
6891         (ambiguous_line_spec): Adjust to use gdb::array_view and
6892         range-for.
6893         (compare_symtabs): Rename to ...
6894         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6895         const reference and adjust.
6896         (filter_sals): Rewrite using std::vector and standard algorithms.
6897         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6898         (jump_command): Update to use std::vector.
6899         * linespec.c (struct linespec_state) <canonical_names>: Update
6900         comment.
6901         (add_sal_to_sals_basic): Delete.
6902         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6903         (decode_line_2, create_sals_line_offset)
6904         (convert_address_location_to_sals, convert_linespec_to_sals)
6905         (convert_explicit_location_to_sals, parse_linespec)
6906         (event_location_to_sals, decode_line_full, decode_line_1)
6907         (decode_line_with_current_source)
6908         (decode_line_with_last_displayed, decode_objc)
6909         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6910         (linespec_result::~linespec_result): Adjust to use std::vector
6911         instead of symtabs_and_lines.
6912         * linespec.h (linespec_sals::sals): Now a std::vector.
6913         (struct linespec_result): Use std::vector, bool, and in-class
6914         initialization.
6915         (decode_line_1, decode_line_with_current_source)
6916         (decode_line_with_last_displayed): Return std::vector.
6917         * macrocmd.c (info_macros_command): Use std::vector.
6918         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6919         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6920         std::vector.
6921         * probe.h (parse_probes): Return a std::vector.
6922         * python/python.c (gdbpy_decode_line): Use std::vector and
6923         gdb::array_view.
6924         * source.c (select_source_symtab, line_info): Use std::vector.
6925         * stack.c (func_command): Use std::vector.
6926         * symtab.h (struct symtabs_and_lines): Delete.
6927         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6928
6929 2017-09-04  Pedro Alves  <palves@redhat.com>
6930
6931         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6932         unittests/array-view-selftests.c.
6933         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6934         * common/array-view.h: New file.
6935         * unittests/array-view-selftests.c: New file.
6936
6937 2017-09-04  Pedro Alves  <palves@redhat.com>
6938
6939         * cli/cli-cmds.c (edit_command): Pass message to
6940         ambiguous_line_spec.
6941         (list_command): Pass message to ambiguous_line_spec.  Say
6942         "first"/"last" instead of "start" and "end" to be consistent with
6943         the manual.
6944         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6945         them to print formatted message.
6946
6947 2017-09-04  Pedro Alves  <palves@redhat.com>
6948
6949         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6950         ftrace_update_insns by reference instead of pointer.
6951
6952 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6953
6954         * i386-go32-tdep.c: Include x86-xstate.h.
6955         (i386_go32_init_abi): Call i386_target_description.
6956         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6957         if xcr0 is X86_XSTATE_X87_MASK.
6958         * i386-tdep.h (tdesc_i386): Remove the declaration.
6959         (tdesc_i386_mmx): Likewise.
6960
6961 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6962
6963         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6964         X86_XSTATE_SSE_MASK instead of 0.
6965
6966 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6967
6968         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6969         i386_target_description.
6970         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6971         i386_target_description.
6972         * i386-tdep.c (i386_gdbarch_init): Likewise.
6973
6974 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6975
6976         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6977         (x86_darwin_init_abi_64): Call amd64_target_description.
6978         * amd64-dicos-tdep.c: Likewise.
6979         * amd64-fbsd-nat.c: Likewise.
6980         * amd64-fbsd-tdep.c: Likewise.
6981         * amd64-nbsd-tdep.c: Likewise.
6982         * amd64-obsd-tdep.c: Likewise.
6983         * amd64-sol2-tdep.c: Likewise.
6984         * amd64-windows-tdep.c: Likewise.
6985         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6986
6987 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6988
6989         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6990         (btrace_function) <insn>: Change type to use std::vector.
6991         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6992         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6993         ftrace_update_insns, ftrace_compute_global_level_offset,
6994         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6995         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6996         change to std::vector.
6997         (ftrace_update_insns): Adjust to change to std::vector, change
6998         type of INSN parameter.
6999         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7000         * record-btrace.c (btrace_call_history_insn_range,
7001         btrace_compute_src_line_range,
7002         record_btrace_frame_prev_register): Adjust to change to
7003         std::vector.
7004         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7005         to change to std::vector.
7006
7007 2017-09-03  Tom Tromey  <tom@tromey.com>
7008
7009         * corefile.c (reopen_exec_file): Use std::string.
7010
7011 2017-09-03  Tom Tromey  <tom@tromey.com>
7012
7013         * compile/compile.c (compile_register_name_mangled): Return
7014         std::string.
7015         * compile/compile-loc2c.c (pushf_register_address): Update.
7016         (pushf_register): Update.
7017         * compile/compile-c-types.c (convert_array): Update.
7018         * compile/compile-c-symbols.c (generate_vla_size): Update.
7019         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7020         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7021         (convert_one_symbol): Update.
7022         (generate_c_for_for_one_variable): Update.
7023         * compile/compile-c-support.c (c_get_range_decl_name): Return a
7024         std::string.
7025         (generate_register_struct): Update.
7026         * compile/compile-internal.h (c_get_range_decl_name): Return a
7027         std::string.
7028         (compile_register_name_mangled): Return std::string.
7029
7030 2017-09-03  Tom Tromey  <tom@tromey.com>
7031
7032         * utils.c (perror_string): Return a std::string.
7033         (throw_perror_with_name, perror_warning_with_name): Update.
7034
7035 2017-09-03  Tom Tromey  <tom@tromey.com>
7036
7037         * demangle.c (demangle_command): Use std::string,
7038         unique_xmalloc_ptr.
7039
7040 2017-09-03  Tom Tromey  <tom@tromey.com>
7041
7042         * cli/cli-setshow.c (do_set_command): Use std::string.
7043
7044 2017-09-03  Tom Tromey  <tom@tromey.com>
7045
7046         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7047
7048 2017-09-03  Tom Tromey  <tom@tromey.com>
7049
7050         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7051
7052 2017-09-03  Tom Tromey  <tom@tromey.com>
7053
7054         * mi/mi-cmd-env.c (env_execute_cli_command): Use
7055         gdb::unique_xmalloc_ptr.
7056
7057 2017-09-03  Tom Tromey  <tom@tromey.com>
7058
7059         * thread.c (print_thread_info_1): Use string_printf.
7060         (thread_apply_command, thread_apply_all_command): Use
7061         std::string.
7062
7063 2017-09-03  Tom Tromey  <tom@tromey.com>
7064
7065         * valprint.c (val_print_string): Update.
7066         * gdbcore.h (memory_error_message): Return std::string.
7067         * corefile.c (memory_error_message): Return std::string.
7068         (memory_error): Update.
7069         * breakpoint.c (insert_bp_location): Update.
7070
7071 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
7072
7073         * target/waitstatus.h (target_waitstatus_to_string): Change
7074         return type to std::string.
7075         * target/waitstatus.c (target_waitstatus_to_string): Return
7076         std::string.
7077         * target.h (target_waitstatus_to_string): Remove declaration.
7078         * infrun.c (resume, clear_proceed_status_thread,
7079         print_target_wait_results, do_target_wait, save_waitstatus,
7080         stop_all_threads): Adjust.
7081         * record-btrace.c (record_btrace_wait): Adjust.
7082         * target-debug.h
7083         (target_debug_print_struct_target_waitstatus_p): Adjust.
7084
7085 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
7086
7087         PR gdb/22046
7088         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7089         detection.
7090
7091 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
7092
7093         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7094         for setting/unsetting environment variables on the remote target.
7095         (New remote packets): Add entries for QEnvironmentHexEncoded,
7096         QEnvironmentUnset and QEnvironmentReset.
7097         * common/environ.c (gdb_environ::operator=): Extend method to
7098         handle m_user_set_env_list and m_user_unset_env_list.
7099         (gdb_environ::clear): Likewise.
7100         (match_var_in_string): Change type of first parameter from 'char
7101         *' to 'const char *'.
7102         (gdb_environ::set): Extend method to handle
7103         m_user_set_env_list and m_user_unset_env_list.
7104         (gdb_environ::unset): Likewise.
7105         (gdb_environ::clear_user_set_env): New method.
7106         (gdb_environ::user_set_envp): Likewise.
7107         (gdb_environ::user_unset_envp): Likewise.
7108         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7109         m_user_unset_env_list on move constructor/assignment.
7110         (unset): Add new default parameter 'update_unset_list = true'.
7111         (clear_user_set_env): New method.
7112         (user_set_envp): Likewise.
7113         (user_unset_envp): Likewise.
7114         (m_user_set_env_list): New std::set.
7115         (m_user_unset_env_list): Likewise.
7116         * common/rsp-low.c (hex2str): New function.
7117         (bin2hex): New overload for bin2hex function.
7118         * common/rsp-low.c (hex2str): New prototype.
7119         (str2hex): New overload prototype.
7120         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7121         QEnvironmentUnset and QEnvironmentReset.
7122         (remote_protocol_features): Add QEnvironmentHexEncoded,
7123         QEnvironmentUnset and QEnvironmentReset packets.
7124         (send_environment_packet): New function.
7125         (extended_remote_environment_support): Likewise.
7126         (extended_remote_create_inferior): Call
7127         extended_remote_environment_support.
7128         (_initialize_remote): Add QEnvironmentHexEncoded,
7129         QEnvironmentUnset and QEnvironmentReset packet configs.
7130         * unittests/environ-selftests.c (gdb_selftest_env_var):
7131         New variable.
7132         (test_vector_initialization): New function.
7133         (test_init_from_host_environ): Likewise.
7134         (test_reinit_from_host_environ): Likewise.
7135         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7136         Likewise.
7137         (test_unset_set_empty_vector): Likewise.
7138         (test_vector_clear): Likewise.
7139         (test_std_move): Likewise.
7140         (test_move_constructor):
7141         (test_self_move): Likewise.
7142         (test_set_unset_reset): Likewise.
7143         (run_tests): Rewrite in terms of the functions above.
7144
7145 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
7146
7147         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7148         (adi_available): Use a temp variable of type CORE_ADDR as argument
7149         3 when calling target_auxv_search.
7150         (adi_normalize_address): Use masks and xor operators to calculate
7151         normalized address.
7152         (adi_read_versions, adi_write_versions, adi_print_versions)
7153         (do_examine, do_assign): Use paddress.
7154
7155 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
7156
7157         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7158         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7159         out of loop and add supply of FIR.
7160         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7161         add collect of FIR.
7162
7163 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
7164
7165         PR gdb/21827
7166         * cli/cli-script.c (define_command): Don't convert command name
7167         to lower case.
7168
7169 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
7170
7171         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7172         Update all callers accordingly. Remove all code blocks handling
7173         the case where DISPP is not NULL.
7174
7175 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7176
7177         PR symtab/22003
7178         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7179         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7180         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7181
7182 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7183
7184         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7185         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7186         (read_comp_units_from_section): New parameter abbrev_section, use
7187         read_and_check_comp_unit_head, allocate signatured_type if needed.
7188         (create_all_comp_units): Update read_comp_units_from_section caller.
7189
7190 2017-08-23  Pedro Alves  <palves@redhat.com>
7191
7192         PR remote/21852
7193         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7194         to null_ptid and switch to thread without reading the registers
7195         after adding the inferior.
7196
7197 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7198
7199         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7200         compile-gcc.
7201         * compile/compile.c (compile_gcc, show_compile_gcc): New.
7202         (compile_to_object): Implement compile_gcc.
7203         (_initialize_compile): Install "set compile-gcc".  Initialize
7204         compile_gcc.
7205
7206 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7207
7208         * compile/compile.c (compile_to_object): Conditionally call
7209         set_verbose.  Conditionally call compile or compile_v0.
7210
7211 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
7212
7213         * sparc64-tdep.h: (adi_normalize_address): New export.
7214         * sparc-nat.h: (open_adi_tag_fd): New export.
7215         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7216         * sparc64-linux-tdep.c:
7217         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7218         (sparc64_linux_handle_segmentation_fault): New function.
7219         (sparc64_linux_init_abi): Register
7220         sparc64_linux_handle_segmentation_fault
7221         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7222         (sparc64_addr_bits_remove): New function.
7223         (sparc64_init_abi): Register sparc64_addr_bits_remove.
7224         (MAX_PROC_NAME_SIZE): New macro.
7225         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7226         (sparc64adilist): New variable.
7227         (adi_proc_list): New variable.
7228         (find_adi_info): New function.
7229         (add_adi_info): New function.
7230         (get_adi_info_proc): New function.
7231         (get_adi_info): New function.
7232         (info_adi_command): New function.
7233         (read_maps_entry): New function.
7234         (adi_available): New function.
7235         (adi_normalize_address): New function.
7236         (adi_align_address): New function.
7237         (adi_convert_byte_count): New function.
7238         (adi_tag_fd): New function.
7239         (adi_is_addr_mapped): New function.
7240         (adi_read_versions): New function.
7241         (adi_write_versions): New function.
7242         (adi_print_versions): New function.
7243         (do_examine): New function.
7244         (do_assign): New function.
7245         (adi_examine_command): New function.
7246         (adi_assign_command): New function.
7247         (_initialize_sparc64_adi_tdep): New function.
7248
7249 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
7250
7251         * breakpoint.c (breakpoints_info): Rename to ...
7252         (info_breakpoints_command): ... this.
7253         (watchpoints_info): Rename to ...
7254         (info_watchpoints_command): ... this.
7255         (tracepoints_info): Rename to ...
7256         (info_tracepoints_command): ... this.
7257         (_initialize_breakpoint): Adjust.
7258         * dcache.c (dcache_info): Rename to ...
7259         (info_display_command): ... this.
7260         (_initialize_dcache): Adjust.
7261         * frame.h (args_info): Rename to ...
7262         (info_args_command): ... this.
7263         (locals_info): Rename to ...
7264         (info_locals_command): ... this.
7265         * infcmd.c (nofp_registers_info): Rename to ...
7266         (info_registers_command): ... this.
7267         (float_info): Rename to ...
7268         (info_float_command): ... this.
7269         (program_info): Rename to ...
7270         (info_program_command): ... this.
7271         (all_registers_info): Rename to ...
7272         (info_all_registers_command): ... this.
7273         (vector_info): Rename to ...
7274         (info_vector_command): ... this.
7275         (float_info): Rename to ...
7276         (info_float_command): ... this.
7277         (_initialize_infcmd): Adjust.
7278         * inferior.h (term_info): Rename to ...
7279         (info_terminal_command): ... this.
7280         * inflow.c (term_info): Rename to ...
7281         (info_terminal_command): ... this.
7282         (_initialize_inflow): Adjust.
7283         * infrun.c (signals_info): Rename to ...
7284         (info_signals_command): ... this.
7285         (_initialize_infrun): Adjust.
7286         * objc-lang.c (classes_info): Rename to ...
7287         (info_classes_command): ... this.
7288         (selectors_info): Rename to ...
7289         (info_selectors_command): ... this.
7290         (_initialize_objc_language): Adjust.
7291         * printcmd.c (sym_info): Rename to ...
7292         (info_symbol_command): ... this.
7293         (address_info): Rename to ...
7294         (info_address_command): ... this.
7295         (display_info): Rename to ...
7296         (info_display_command): ... this.
7297         (_initialize_printcmd): Adjust.
7298         * reverse.c (bookmarks_info): Rename to ...
7299         (info_breakpoints_command): ... this.
7300         (_initialize_reverse): Adjust.
7301         * ser-go32.c (dos_info): Rename to ...
7302         (info_serial_command): ... this.
7303         (_initialize_ser_dos): Adjust.
7304         * skip.c (skip_info): Rename to ...
7305         (info_skip_command): ... this.
7306         (_initialize_step_skip): Adjust.
7307         * source.c (line_info): Rename to ...
7308         (info_line_command): ... this.
7309         (source_info): Rename to ...
7310         (info_source_command)
7311         * stack.c (frame_info): Rename to ...
7312         (info_frame_command): ... this.
7313         (locals_info): Rename to ...
7314         (info_locals_command): ... this.
7315         (args_info): Rename to ...
7316         (info_args_command): ... this.
7317         (_initialize_stack): Adjust.
7318         * symtab.c (sources_info): Rename to ...
7319         (info_sources_command): ... this.
7320         (variables_info): Rename to ...
7321         (info_variables_command): ... this.
7322         (functions_info): Rename to ...
7323         (info_functions_command): ... this.
7324         (types_info): Rename to ...
7325         (info_types_command): ... this.
7326         (_initialize_symtab): Adjust.
7327         * target.c (target_info): Rename to ...
7328         (info_target_command): ... this.
7329         (initialize_targets): Adjust.
7330         * tracepoint.c (tvariables_info): Rename to ...
7331         (info_tvariables_command): ... this.
7332         (scope_info): Rename to ...
7333         (info_scope_command): ... this.
7334         (trace_dump_actions): Adjust.
7335         (_initialize_tracepoint): Adjust.
7336
7337 2017-08-22  Tom Tromey  <tom@tromey.com>
7338
7339         * breakpoint.h (install_breakpoint): Update.
7340         * breakpoint.c (add_solib_catchpoint): Update.
7341         (install_breakpoint): Change argument to a std::unique_ptr.
7342         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7343         (create_breakpoint_sal, create_breakpoint): Update.
7344         (watch_command_1, catch_exec_command_1)
7345         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7346         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7347         Return the breakpoint.
7348         (set_raw_breakpoint_without_location, set_raw_breakpoint)
7349         (new_single_step_breakpoint): Update.
7350         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7351         std::unique_ptr.
7352         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7353         std::unique_ptr.
7354         * break-catch-sig.c (create_signal_catchpoint): Use
7355         std::unique_ptr.
7356         * ada-lang.c (create_ada_exception_catchpoint): Use
7357         std::unique_ptr.
7358
7359 2017-08-22  Tom Tromey  <tom@tromey.com>
7360
7361         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7362
7363 2017-08-22  Tom Tromey  <tom@tromey.com>
7364
7365         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7366         (lookup_partial_symbol): Update.
7367
7368 2017-08-22  Tom Tromey  <tom@tromey.com>
7369
7370         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7371         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7372         (find_and_open_source, symtab_to_fullname): Update.
7373         * psymtab.c (psymtab_to_fullname): Update.
7374
7375 2017-08-22  Tom Tromey  <tom@tromey.com>
7376
7377         * exec.c (exec_file_attach): Update.
7378         * linux-thread-db.c (try_thread_db_load): Update.
7379         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7380         * utils.c (gdb_realpath): Change return type.
7381         (gdb_realpath_keepfile): Update.
7382         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7383         (_initialize_utils): Register the new self test.
7384         * source.c (openp): Update.
7385         (find_and_open_source): Update.
7386         * nto-tdep.c (nto_find_and_open_solib): Update.
7387         * main.c (set_gdb_data_directory): Update.
7388         (captured_main_1): Update.
7389         * dwarf2read.c (dwarf2_get_dwz_file): Update
7390         (dw2_map_symbol_filenames): Update.
7391         * auto-load.c (auto_load_safe_path_vec_update): Update.
7392         (filename_is_in_auto_load_safe_path_vec): Change type of
7393         "filename_realp".
7394         (auto_load_objfile_script): Update.
7395         (file_is_auto_load_safe): Update.  Use std::string.
7396         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7397
7398 2017-08-22  Tom Tromey  <tom@tromey.com>
7399
7400         * utils.c (gdb_realpath_keepfile): Return a
7401         gdb::unique_xmalloc_ptr.
7402         * exec.c (exec_file_attach): Update.
7403         * utils.h (gdb_realpath_keepfile): Return a
7404         gdb::unique_xmalloc_ptr.
7405
7406 2017-08-22  Tom Tromey  <tom@tromey.com>
7407
7408         * compile/compile.c (compile_file_command): Use
7409         gdb::unique_xmalloc_ptr, std::string.
7410         * utils.c (gdb_abspath): Change return type.
7411         * source.c (openp): Update.
7412         * objfiles.c (allocate_objfile): Update.
7413         * main.c (set_gdb_data_directory): Update.
7414         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7415
7416 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
7417
7418         * cli-cmds.c (list_commands): List actual code around more than
7419         one location.
7420
7421 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
7422
7423         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7424
7425 2017-08-21  Pedro Alves  <palves@redhat.com>
7426
7427         PR gdb/19487
7428         * c-exp.y (variable production): Handle function aliases.
7429         * minsyms.c (msymbol_is_text): New function.
7430         * minsyms.h (msymbol_is_text): Declare.
7431         * symtab.c (find_function_alias_target): New function.
7432         * symtab.h (find_function_alias_target): Declare.
7433
7434 2017-08-21  Pedro Alves  <palves@redhat.com>
7435
7436         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7437         typedefs.
7438         * typeprint.c (whatis_exp): If handling "whatis", and expression
7439         is OP_TYPE, strip one typedef level.  Otherwise don't strip
7440         typedefs here.
7441         * valops.c (value_cast): Save "to" type before resolving
7442         stubs/typedefs.  Use that type as resulting value's type.
7443
7444 2017-08-18  Tom Tromey  <tom@tromey.com>
7445             Pedro Alves  <palves@redhat.com>
7446
7447         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7448         * sol-thread.c (sol_thread_resume, sol_thread_wait)
7449         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7450         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7451         * proc-service.c (ps_xfer_memory): Use scoped_restore.
7452         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7453         (linux_get_siginfo_data): Add "thread" argument.  Use
7454         scoped_restore.
7455         * linux-nat.c (linux_child_follow_fork)
7456         (check_stopped_by_watchpoint): Use scoped_restore.
7457         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7458         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7459         (restore_inferior_ptid, save_inferior_ptid): Remove.
7460         * btrace.c (btrace_fetch): Use scoped_restore.
7461         * bsd-uthread.c (bsd_uthread_fetch_registers)
7462         (bsd_uthread_store_registers): Use scoped_restore.
7463         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7464         scoped_restore.
7465         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7466         (aix_thread_xfer_partial): Use scoped_restore.
7467         * inferior.h (save_inferior_ptid): Remove.
7468
7469 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7470
7471         PR tdep/21818
7472         * arm-tdep.c (gdb_print_insn_arm): Mark
7473         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7474
7475 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7476
7477         * NEWS: Mention GDBserver's new option "--selftest".
7478         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7479         * selftest.c: Move it to common/selftest.c.
7480         * selftest.h: Move it to common/selftest.h.
7481         * selftest-arch.c (reset): New function.
7482         (tests_with_arch): Call reset.
7483
7484 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7485
7486         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7487         instead of exception_fprintf and printf_filtered.
7488
7489 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7490
7491         * selftest.c (register_self_test): Rename it to
7492         selftests::register_test.
7493         (run_self_tests): selftest::run_tests.
7494         * selftest.h: Update declarations.
7495         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7496         selftests::register_test_foreach_arch.
7497         * selftest-arch.h: Update declaration.
7498         * aarch64-tdep.c: Update.
7499         * arm-tdep.c: Likewise.
7500         * disasm-selftests.c: Likewise.
7501         * dwarf2loc.c: Likewise.
7502         * dwarf2-frame.c: Likewise.
7503         * findvar.c: Likewise.
7504         * gdbarch-selftests.c: Likewise.
7505         * maint.c (maintenance_selftest): Likewise.
7506         * regcache.c: Likewise.
7507         * rust-exp.y: Likewise.
7508         * selftest-arch.c: Likewise.
7509         * unittests/environ-selftests.c: Likewise.
7510         * unittests/function-view-selftests.c: Likewise.
7511         * unittests/offset-type-selftests.c: Likewise.
7512         * unittests/optional-selftests.c: Likewise.
7513         * unittests/scoped_restore-selftests.c: Likewise.
7514         * utils-selftests.c: Likewise.
7515
7516 2017-08-17  Pedro Alves  <palves@redhat.com>
7517
7518         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7519         local.
7520
7521 2017-08-17  Pedro Alves  <palves@redhat.com>
7522
7523         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7524         field.
7525         (reset_die_in_process): Delete, replaced by ...
7526         (process_die_scope): ... this new class.  Make it responsible for
7527         freeing cu->line_header too.
7528         (process_die): Use process_die_scope.
7529         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7530         cu->line_header_die_owner.  Don't release the line header if it's
7531         owned by the CU.
7532         (setup_type_unit_groups): Make the CU/DIE own the line header.
7533         Don't release the line header here.
7534
7535 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7536
7537         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7538
7539 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7540
7541         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7542         Single-Key mode
7543
7544 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7545
7546         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7547         mode command list.
7548
7549 2017-08-15  Stafford Horne  <shorne@gmail.com>
7550
7551         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7552
7553 2017-08-15  Stafford Horne  <shorne@gmail.com>
7554
7555         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7556
7557 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7558
7559         PR gdb/21954
7560         * infcmd.c (unset_environment_command): Use the 'clear' method on
7561         the environment instead of resetting it.
7562
7563 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7564
7565         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7566         platforms.
7567
7568 2017-08-14  Tom Tromey  <tom@tromey.com>
7569
7570         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7571         (print_binary_chars): Likewise.
7572         (BITS_IN_BYTES): Remove.
7573
7574 2017-08-14  Tom Tromey  <tom@tromey.com>
7575
7576         PR gdb/21675
7577         * valprint.c (LOW_ZERO): Change value to 034.
7578         (print_octal_chars): Add static_asserts for octal constants.
7579         * printcmd.c (print_scalar_formatted): Add 'd' case.
7580
7581 2017-08-11  Tom Tromey  <tom@tromey.com>
7582
7583         * symfile.c (add_symbol_file_command): Use std::vector.
7584
7585 2017-08-14  Tom Tromey  <tom@tromey.com>
7586
7587         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7588         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7589         std::move.
7590         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7591
7592 2017-08-11  Pedro Alves  <palves@redhat.com>
7593
7594         * infrun.c (process_event_stop_test): Adjust
7595         function_name_is_marked_for_skip call.
7596         * skip.c: Include <list>.
7597         (skiplist_entry): Make it a class with private fields, and
7598         getters/setters.
7599         (skiplist_entry_chain): Delete.
7600         (skiplist_entries): New.
7601         (skiplist_entry_count): Delete.
7602         (highest_skiplist_entry_num): New.
7603         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7604         (add_skiplist_entry): Delete.
7605         (skiplist_entry::skiplist_entry): New.
7606         (skiplist_entry::add_entry): New.
7607         (skip_file_command, skip_function): Adjust.
7608         (compile_skip_regexp): Delete.
7609         (skip_command): Don't compile regexp here.  Adjust to use
7610         skiplist_entry::add_entry.
7611         (skip_info): Adjust to use range-for and getters.
7612         (skip_enable_command, skip_disable_command): Adjust to use
7613         range-for and setters.
7614         (skip_delete_command): Adjust to use std::list.
7615         (add_skiplist_entry): Delete.
7616         (skip_file_p): Delete, refactored as ...
7617         (skiplist_entry::do_skip_file_p): ... this new method.
7618         (skip_gfile_p): Delete, refactored as ...
7619         (skiplist_entry::do_gskip_file_p): ... this new method.
7620         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7621         (skiplist_entry::skip_function_p): ... this new method.
7622         (function_name_is_marked_for_skip): Now returns bool, and takes
7623         the function sal by const reference.  Adjust to use range-for and
7624         skiplist_entry methods.
7625         (_initialize_step_skip): Remove references to
7626         skiplist_entry_chain, skiplist_entry_count.
7627         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7628         takes the function sal by const reference.
7629
7630 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7631
7632         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7633         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7634         (dwarf2_frame_cache):
7635         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7636         RETURN_MASK_ALL and set *this_case to NULL.
7637         * frame-unwind.h: Update comments.
7638
7639 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7640
7641         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7642         (dwarf2_frame_state_copy_regs): Remove.
7643         (dwarf2_frame_state_free_regs): Remove.
7644         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7645         (dwarf2_restore_rule): Call method .alloc_regs instead of
7646         dwarf2_frame_state_alloc_regs.
7647         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7648         constructor.  Call std::move.
7649         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7650         (dwarf2_frame_cache): Likewise.
7651
7652         [GDB_SELF_TEST]: Include selftest.h and
7653         selftest-arch.h.
7654         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7655         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7656         execute_cfa_program_test.
7657
7658         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7659         copy ctor, assignment operator, move assignment.
7660         <alloc_regs>: New method.
7661         <swap>: New method.
7662         (struct dwarf2_frame_state): Delete dtor.
7663         (dwarf2_frame_state_alloc_regs): Remove declaration.
7664         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7665         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7666
7667 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7668
7669         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7670         (dwarf2_frame_state::dwarf2_frame_state): New.
7671         (dwarf2_frame_state::~dwarf2_frame_state): New.
7672         (dwarf2_fetch_cfa_info): Update.
7673         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7674         rather than a pointer.  Update code.
7675         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7676         dtor.
7677         <data_align, code_align, retaddr_column>: Change them to const.
7678         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7679         to bool.
7680
7681 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7682
7683         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7684         <loc.exp>: New field.
7685         * dwarf2-frame.c (execute_cfa_program): Update.
7686         (dwarf2_frame_prev_register): Update.
7687
7688 2017-08-10  Pedro Alves  <palves@redhat.com>
7689
7690         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7691
7692 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7693
7694         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7695         (fbsd_pending_children): Use std::list.
7696         (fbsd_remember_child): Likewise.
7697         (fbsd_is_child_pending): Likewise.
7698         (fbsd_pending_vfork_done): Use std::forward_list.
7699         (fbsd_add_vfork_done): Likewise.
7700         (fbsd_is_vfork_done_pending): Likewise.
7701         (fbsd_next_vfork_done): Likewise.
7702
7703 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7704
7705         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7706         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7707         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7708         for `mapfilename'.
7709         (fbsd_xfer_partial): Use gdb::byte_vector.
7710         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7711
7712 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7713
7714         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7715         "filestuff.h".
7716         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7717
7718 2017-08-09  Tom Tromey  <tom@tromey.com>
7719
7720         * skip.c (skiplist_entry): New constructor.
7721         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7722         (skiplist_entry::file_is_glob): Now bool.
7723         (skiplist_entry::file, skiplist_entry::function): Now
7724         std::string.
7725         (make_skip_entry): Return a unique_ptr.  Use new.
7726         (free_skiplist_entry, free_skiplist_entry_cleanup)
7727         (make_free_skiplist_entry_cleanup): Remove.
7728         (skip_command, skip_disable_command, add_skiplist_entry)
7729         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7730         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7731         (function_name_is_marked_for_skip): Update.
7732         (skip_delete_command): Update.  Use delete.
7733
7734 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7735
7736         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7737         (aarch64_linux_core_read_description): New function.
7738         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7739
7740 2017-08-09  Pedro Alves  <palves@redhat.com>
7741
7742         * cp-name-parser.y (cp_comp_to_string): Return a
7743         gdb::unique_xmalloc_ptr<char>.
7744         * cp-support.c (replace_typedefs_qualified_name)
7745         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7746         (cp_canonicalize_string_full): Use op= instead of explicit
7747         convertion.
7748         (cp_class_name_from_physname, method_name_from_physname)
7749         (cp_func_name, cp_remove_params): Adjust to use
7750         gdb::unique_xmalloc_ptr<char>.
7751         * cp-support.h (cp_comp_to_string): Return a
7752         gdb::unique_xmalloc_ptr<char>.
7753         * python/py-type.c (typy_lookup_type): Adjust to use
7754         gdb::unique_xmalloc_ptr<char>.
7755
7756 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7757
7758         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7759
7760 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7761             Yao Qi  <yao.qi@linaro.org>
7762
7763         * cp-support.c (cp_canonicalize_string_full): Use
7764         gdb::unique_xmalloc_ptr<char>.
7765         (cp_canonicalize_string): Likewise.
7766
7767 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7768
7769         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7770         * regformats/i386/amd64-avx-avx512.dat: Remove.
7771         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7772         * regformats/i386/amd64-avx-mpx.dat:Remove.
7773         * regformats/i386/amd64-avx.dat: Remove.
7774         * regformats/i386/amd64-mpx.dat: Remove.
7775         * regformats/i386/i386-avx-avx512.dat: Remove.
7776         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7777         * regformats/i386/i386-avx-mpx.dat: Remove.
7778         * regformats/i386/i386-mmx.dat: Remove.
7779         * regformats/i386/i386-mpx.dat: Remove.
7780
7781 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7782
7783         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7784         * amd64-tdep.c: Don't include features/i386/x32*.c.
7785         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7786         functions.
7787         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7788         and i386/x32-avx-avx512.
7789         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7790         and i386/x32.xml.
7791         * features/i386/x32-avx-avx512.c: Removed.
7792         * features/i386/x32-avx-avx512.xml: Removed.
7793         * features/i386/x32-avx.c: Removed.
7794         * features/i386/x32-avx.xml: Removed.
7795         * features/i386/x32.c: Removed.
7796         * features/i386/x32.xml: Removed.
7797         * regformats/i386/x32-avx-avx512.dat: Removed.
7798         * regformats/i386/x32-avx.dat: Removed.
7799         * regformats/i386/x32.dat: Removed.
7800
7801 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7802
7803         PR breakpoints/21886
7804         * mem-break.c (default_memory_insert_breakpoint): Use
7805         `->placed_address' rather than `->reqstd_address' for the
7806         breakpoint location.
7807
7808 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7809
7810         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7811         assertions.
7812
7813 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7814
7815         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7816         a union of `tdep_info', `tdesc_data' and `id'.
7817         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7818         rather than `info.tdep_info'.
7819         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7820         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7821         * i386-tdep.c (i386_gdbarch_init): Likewise.
7822         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7823         * mips-tdep.c (mips_gdbarch_init): Likewise.
7824         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7825         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7826         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7827         `info.tdep_info'.
7828         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7829         `info.tdep_info'.
7830         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7831         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7832         `info.tdep_info'.
7833         * spu-tdep.c (spu_gdbarch_init): Likewise.
7834         * gdbarch.h: Regenerate.
7835
7836 2017-08-07  Leszek Swirski  <leszeks@google.com>
7837
7838         PR symtab/20899
7839         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7840
7841 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7842
7843         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7844         (gdbsim_open): Rename gdb_argv args object to argv.
7845
7846 2017-08-05  Tom Tromey  <tom@tromey.com>
7847
7848         * compile/compile-object-load.c (compile_object_load): Use
7849         gdb::unique_xmalloc_ptr.
7850         * cli/cli-dump.c (scan_filename): Rename from
7851         scan_filename_with_cleanup.  Change return type.
7852         (scan_expression): Rename from scan_expression_with_cleanup.
7853         Change return type.
7854         (dump_memory_to_file, dump_value_to_file, restore_command):
7855         Use gdb::unique_xmalloc_ptr.  Update.
7856         * cli/cli-cmds.c (find_and_open_script): Use
7857         gdb::unique_xmalloc_ptr.
7858         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7859         * symmisc.c (maintenance_print_symbols)
7860         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7861         * symfile.c (symfile_bfd_open, generic_load)
7862         (add_symbol_file_command, remove_symbol_file_command): Use
7863         gdb::unique_xmalloc_ptr.
7864         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7865         * psymtab.c (maintenance_print_psymbols): Use
7866         gdb::unique_xmalloc_ptr.
7867         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7868         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7869         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7870         (reload_shared_libraries_1): Likewise.
7871
7872 2017-08-05  Tom Tromey  <tom@tromey.com>
7873
7874         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7875         (rust_op_vector, rust_set_vector): New typedefs.
7876         (current_parser): New global.
7877         (work_obstack): Change to pointer type.  Update all users.
7878         (rust_ast, pstate): Remove globals.
7879         (struct rust_parser): New.
7880         (%union) <params, field_inits>: Change type.
7881         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7882         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7883         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7884         (convert_params_to_types, convert_params_to_expression): Change
7885         type of "params".
7886         (ast_string): Change type of "fields".
7887         (rust_parse): Make a rust_parser.  Remove cleanups.
7888         (rust_lex_tests): Make and install an auto_obstack.
7889
7890 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7891
7892         * configure.srv (ipa_x32_linux_regobj): New.
7893         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7894         instead of X86_TDESC_AVX512.
7895         (initialize_low_tracepoint): Call
7896         init_registers_x32_avx_avx512_linux.
7897
7898 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7899
7900         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7901
7902 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7903
7904         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7905
7906 2017-08-03  Tom Tromey  <tom@tromey.com>
7907
7908         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7909         Remove.
7910         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7911
7912 2017-08-03  Tom Tromey  <tom@tromey.com>
7913
7914         * python/py-param.c (compute_enum_values): Use gdb_argv.
7915
7916 2017-08-03  Tom Tromey  <tom@tromey.com>
7917
7918         * utils.h (struct gdb_argv_deleter): New.
7919         (gdb_argv): New class.
7920         * utils.c (gdb_argv::reset): New method.
7921         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7922         * tracefile.c (tsave_command): Use gdb_argv.
7923         * top.c (new_ui_command): Use gdb_argv.
7924         * symmisc.c (maintenance_print_symbols)
7925         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7926         * symfile.c (symbol_file_command, generic_load)
7927         (remove_symbol_file_command): Use gdb_argv.
7928         * stack.c (backtrace_command): Use gdb_argv.
7929         * source.c (add_path, show_substitute_path_command)
7930         (unset_substitute_path_command, set_substitute_path_command):
7931         Use gdb_argv.
7932         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7933         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7934         * remote.c (extended_remote_run, remote_put_command)
7935         (remote_get_command, remote_delete_command): Use gdb_argv.
7936         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7937         (gdbsim_open): Use gdb_argv.
7938         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7939         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7940         * procfs.c (procfs_info_proc): Use gdb_argv.
7941         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7942         * infrun.c (handle_command): Use gdb_argv.
7943         * inferior.c (add_inferior_command, clone_inferior_command):
7944         Use gdb_argv.
7945         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7946         * exec.c (exec_file_command): Use gdb_argv.
7947         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7948         * compile/compile.c (build_argc_argv): Use gdb_argv.
7949
7950 2017-08-03  Tom Tromey  <tom@tromey.com>
7951
7952         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7953
7954 2017-08-03  Tom Tromey  <tom@tromey.com>
7955
7956         * python/python.c (compute_python_string): Return std::string.
7957         (gdbpy_eval_from_control_command): Update.
7958         (do_start_initialization): Use std::string.
7959         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7960         xstrprintf.
7961         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7962         xstrprintf.
7963
7964 2017-08-03  Tom Tromey  <tom@tromey.com>
7965
7966         * top.h (do_restore_instream_cleanup): Remove.
7967         * top.c (do_restore_instream_cleanup): Remove.
7968         (read_command_file): Use scoped_restore.
7969         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7970
7971 2017-08-03  Tom Tromey  <tom@tromey.com>
7972
7973         * cli/cli-script.c (execute_user_command)
7974         (execute_control_command): Use scoped_restore.
7975
7976 2017-08-03  Tom Tromey  <tom@tromey.com>
7977
7978         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7979         (execute_user_command): Remove user_call_depth; use
7980         user_args_stack's size instead.
7981
7982 2017-08-03  Tom Tromey  <tom@tromey.com>
7983
7984         * top.h (in_user_command): Remove.
7985         * top.c (in_user_command): Remove.
7986         * cli/cli-script.c (do_restore_user_call_depth)
7987         (execute_user_command): Update.
7988
7989 2017-08-03  Tom Tromey  <tom@tromey.com>
7990
7991         * valops.c (search_struct_method): Use gdb::byte_vector.
7992         * valarith.c (value_concat): Use std::vector.
7993         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7994         (simple_search_memory): Likewise.
7995         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7996         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7997         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7998         * elfread.c (elf_rel_plt_read): Use std::string.
7999         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8000         * cli/cli-dump.c (restore_section_callback): Use
8001         gdb::byte_vector.
8002
8003 2017-08-03  Tom Tromey  <tom@tromey.com>
8004
8005         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8006
8007 2017-08-03  Tom Tromey  <tom@tromey.com>
8008
8009         * tui/tui-regs.c (tui_restore_gdbout): Remove.
8010         (tui_register_format): Use scoped_restore.
8011
8012 2017-08-03  Tom Tromey  <tom@tromey.com>
8013
8014         * reverse.c (exec_direction_default): Remove.
8015         (exec_reverse_once): Use scoped_restore.
8016         * remote.c (restore_remote_timeout): Remove.
8017         (remote_flash_erase, remote_flash_write, remote_flash_done)
8018         (readchar, remote_serial_write): Use scoped_restore.
8019         * cli/cli-script.c (struct source_cleanup_lines_args)
8020         (source_cleanup_lines): Remove.
8021         (script_from_file): Use scoped_restore.
8022         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8023         (source_command): Use scoped_restore.
8024
8025 2017-08-03  Tom Tromey  <tom@tromey.com>
8026
8027         * utils.h (make_cleanup_free_so): Remove.
8028         * utils.c (do_free_so, make_cleanup_free_so): Remove.
8029         * solist.h (struct so_deleter): New.
8030         (so_list_up): New typedef.
8031         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8032
8033 2017-08-03  Tom Tromey  <tom@tromey.com>
8034
8035         * utils.h (make_cleanup_restore_current_language): Remove.
8036         * utils.c (do_restore_current_language)
8037         (make_cleanup_restore_current_language): Remove.
8038         * parse.c (parse_exp_in_context_1)
8039         (parse_expression_with_language): Use
8040         scoped_restore_current_language.
8041         * mi/mi-main.c (mi_cmd_execute): Use
8042         scoped_restore_current_language.
8043         * language.h (scoped_restore_current_language): New class.
8044
8045 2017-08-03  Tom Tromey  <tom@tromey.com>
8046
8047         * compile/compile.c (cleanup_unlink_file): Remove.
8048         (compile_to_object): Use gdb::unlinker.
8049         (eval_compile_command): Likewise.
8050
8051 2017-08-03  Tom Tromey  <tom@tromey.com>
8052
8053         * utils.h (make_cleanup_fclose): Remove.
8054         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8055
8056 2017-08-03  Tom Tromey  <tom@tromey.com>
8057
8058         * top.c (open_terminal_stream): Return gdb_file_up.
8059         (new_ui_command): Update.
8060
8061 2017-08-03  Tom Tromey  <tom@tromey.com>
8062
8063         * source.c (print_source_lines_base, forward_search_command)
8064         (reverse_search_command): Use gdb_file_up.
8065
8066 2017-08-03  Tom Tromey  <tom@tromey.com>
8067
8068         * fbsd-nat.c (fbsd_find_memory_regions): Update.
8069
8070 2017-08-03  Tom Tromey  <tom@tromey.com>
8071
8072         * cli/cli-cmds.c (find_and_open_script): Change return type.
8073         Remove "streamp" and "full_path" parameters.
8074         (source_script_with_search): Update.
8075         * auto-load.c (source_script_file): Update.
8076         * cli/cli-cmds.h (find_and_open_script): Change type.
8077         (open_script): New struct.
8078
8079 2017-08-03  Tom Tromey  <tom@tromey.com>
8080
8081         * xml-support.c (xml_fetch_content_from_file): Update.
8082         * ui-file.c (stdio_file::open): Update.
8083         * tracefile-tfile.c (tfile_start): Update.
8084         * remote.c (remote_file_put, remote_file_get): Update.
8085         * nat/linux-procfs.c (linux_proc_get_int)
8086         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8087         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8088         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8089         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8090         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8091         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8092         * linux-nat.c (linux_proc_pending_signals): Update.
8093         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8094         (file_closer): Remove.
8095         * compile/compile.c (compile_to_object): Update.
8096         * common/filestuff.h (struct gdb_file_deleter): New.
8097         (gdb_file_up): New typedef.
8098         (gdb_fopen_cloexec): Change return type.
8099         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8100         * cli/cli-dump.c (fopen_with_cleanup): Remove.
8101         (dump_binary_file, restore_binary_file): Update.
8102         * auto-load.c (auto_load_objfile_script_1): Update.
8103
8104 2017-08-03  Tom Tromey  <tom@tromey.com>
8105
8106         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8107         (info_static_tracepoint_markers_command): Likewise.
8108         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8109         * skip.c (skip_info): Use ui_out_emit_table.
8110         * progspace.c (print_program_space): Use ui_out_emit_table.
8111         * osdata.c (info_osdata): Use ui_out_emit_table.
8112         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8113         ui_out_emit_table.
8114         * linux-thread-db.c (info_auto_load_libthread_db): Use
8115         ui_out_emit_table.
8116         * inferior.c (print_inferior): Use ui_out_emit_table.
8117         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8118         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8119         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8120         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8121         * ui-out.h (class ui_out_emit_table): New.
8122
8123 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
8124
8125         * mips-tdep.c (mips_fpu_type_str): New function.
8126         (mips_dump_tdep): Call it.
8127
8128 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
8129
8130         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8131         `->mips_fpu_type'.
8132
8133 2017-07-31  Xavier Roirand  <roirand@adacore.com>
8134
8135         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8136
8137 2017-07-27  Xavier Roirand  <roirand@adacore.com>
8138
8139         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8140
8141 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8142
8143         * cli/cli-cmds.c (maintenancechecklist): New variable.
8144         * gdbcmd.h (maintenancechecklist): Declare it.
8145         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8146         Call i386_linux_read_description with different masks.
8147         * maint.c (maintenance_check_command): New function.
8148         (_initialize_maint_cmds): Call add_prefix_cmd.
8149         * target-descriptions.c (tdesc_reg): override operator != and ==.
8150         (tdesc_type): Likewise.
8151         (tdesc_feature): Likewise.
8152         (target_desc): Likewise.
8153         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8154         (maintenance_check_xml_descriptions): New function.
8155         (_initialize_target_descriptions) Add command "xml-descriptions".
8156         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8157
8158 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8159
8160         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8161         Include features/i386/32bit-*.c.
8162         (i386_linux_read_description): Generate target description if it
8163         doesn't exist.
8164         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8165         functions.
8166         * features/i386/32bit-linux.c: Re-generated.
8167         * features/i386/32bit-sse.c: Likewise.
8168         * target-descriptions.c (print_c_feature::visit): Print code to
8169         set register number if needed.
8170         (print_c_feature) <m_next_regnum>: New field.
8171
8172 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8173
8174         * features/Makefile (CFILES): Rename with TDESC_CFILES.
8175         (FEATURE_XMLFILES): New.
8176         (FEATURE_CFILES): New.
8177         New rules.
8178         (clean-cfiles): Remove generated c files.
8179         * features/i386/32bit-avx.c: Generated.
8180         * features/i386/32bit-avx512.c: Generated.
8181         * features/i386/32bit-core.c: Generated.
8182         * features/i386/32bit-linux.c: Generated.
8183         * features/i386/32bit-mpx.c: Generated.
8184         * features/i386/32bit-pkeys.c: Generated.
8185         * features/i386/32bit-sse.c: Generated.
8186         * target-descriptions.c: Include algorithm.
8187         (tdesc_element_visitor): Add method visit_end.
8188         (print_c_tdesc): Implement visit_end.
8189         (print_c_tdesc:: m_filename_after_features): Move it to
8190         protected.
8191         (print_c_feature): New class.
8192         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8193         name starts with "i386/32bit-".
8194
8195 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8196
8197         * target-descriptions.c (tdesc_element_visitor): New class.
8198         (tdesc_element): New class.
8199         (tdesc_reg): Inherit from tdesc_element.
8200         (tdesc_reg::accept): New function.
8201         (tdesc_type): Inherit from tdesc_element.
8202         (tdesc_type::accept): New function.
8203         (tdesc_feature): Inherit from tdesc_element.
8204         (tdesc_feature::accept): New function.
8205         (target_desc): Inherit from tdesc_element.
8206         (target_desc::target_desc): New.
8207         (target_desc::~target_desc): New.
8208         (target_desc::accept): New.
8209         (allocate_target_description): Use new.
8210         (free_target_description): Use delete.
8211         (print_c_tdesc): New class.
8212         (maint_print_c_tdesc_cmd): Adjust.
8213
8214         * features/aarch64.c: Re-generated.
8215         * features/arc-arcompact.c: Re-generated.
8216         * features/arc-v2.c: Re-generated.
8217         * features/arm/arm-with-iwmmxt.c: Re-generated.
8218         * features/arm/arm-with-m.c: Re-generated.
8219         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8220         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8221         * features/arm/arm-with-neon.c: Re-generated.
8222         * features/arm/arm-with-vfpv2.c: Re-generated.
8223         * features/arm/arm-with-vfpv3.c: Re-generated.
8224         * features/i386/amd64-avx-avx512.c: Re-generated.
8225         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8226         * features/i386/amd64-avx.c: Re-generated.
8227         * features/i386/amd64-avx-linux.c: Re-generated.
8228         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8229         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8230         * features/i386/amd64-avx-mpx.c: Re-generated.
8231         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8232         * features/i386/amd64.c: Re-generated.
8233         * features/i386/amd64-linux.c: Re-generated.
8234         * features/i386/amd64-mpx.c: Re-generated.
8235         * features/i386/amd64-mpx-linux.c: Re-generated.
8236         * features/i386/i386-avx-avx512.c: Re-generated.
8237         * features/i386/i386-avx-avx512-linux.c: Re-generated.
8238         * features/i386/i386-avx.c: Re-generated.
8239         * features/i386/i386-avx-linux.c: Re-generated.
8240         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8241         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8242         * features/i386/i386-avx-mpx.c: Re-generated.
8243         * features/i386/i386-avx-mpx-linux.c: Re-generated.
8244         * features/i386/i386.c: Re-generated.
8245         * features/i386/i386-linux.c: Re-generated.
8246         * features/i386/i386-mmx.c: Re-generated.
8247         * features/i386/i386-mmx-linux.c: Re-generated.
8248         * features/i386/i386-mpx.c: Re-generated.
8249         * features/i386/i386-mpx-linux.c: Re-generated.
8250         * features/i386/x32-avx-avx512.c: Re-generated.
8251         * features/i386/x32-avx-avx512-linux.c: Re-generated.
8252         * features/i386/x32-avx.c: Re-generated.
8253         * features/i386/x32-avx-linux.c: Re-generated.
8254         * features/i386/x32.c: Re-generated.
8255         * features/i386/x32-linux.c: Re-generated.
8256         * features/microblaze.c: Re-generated.
8257         * features/microblaze-with-stack-protect.c: Re-generated.
8258         * features/mips64-dsp-linux.c: Re-generated.
8259         * features/mips64-linux.c: Re-generated.
8260         * features/mips-dsp-linux.c: Re-generated.
8261         * features/mips-linux.c: Re-generated.
8262         * features/nds32.c: Re-generated.
8263         * features/nios2.c: Re-generated.
8264         * features/nios2-linux.c: Re-generated.
8265         * features/rs6000/powerpc-32.c: Re-generated.
8266         * features/rs6000/powerpc-32l.c: Re-generated.
8267         * features/rs6000/powerpc-403.c: Re-generated.
8268         * features/rs6000/powerpc-403gc.c : Re-generated.
8269         * features/rs6000/powerpc-405.c: Re-generated.
8270         * features/rs6000/powerpc-505.c: Re-generated.
8271         * features/rs6000/powerpc-601.c: Re-generated.
8272         * features/rs6000/powerpc-602.c: Re-generated.
8273         * features/rs6000/powerpc-603.c: Re-generated.
8274         * features/rs6000/powerpc-604.c: Re-generated.
8275         * features/rs6000/powerpc-64.c: Re-generated.
8276         * features/rs6000/powerpc-64l.c: Re-generated.
8277         * features/rs6000/powerpc-7400.c: Re-generated.
8278         * features/rs6000/powerpc-750.c: Re-generated.
8279         * features/rs6000/powerpc-860.c: Re-generated.
8280         * features/rs6000/powerpc-altivec32.c: Re-generated.
8281         * features/rs6000/powerpc-altivec32l.c: Re-generated.
8282         * features/rs6000/powerpc-altivec64.c: Re-generated.
8283         * features/rs6000/powerpc-altivec64l.c: Re-generated.
8284         * features/rs6000/powerpc-cell32l.c: Re-generated.
8285         * features/rs6000/powerpc-cell64l.c: Re-generated.
8286         * features/rs6000/powerpc-e500.c: Re-generated.
8287         * features/rs6000/powerpc-e500l.c: Re-generated.
8288         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8289         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8290         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8291         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8292         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8293         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8294         * features/rs6000/powerpc-vsx32.c: Re-generated.
8295         * features/rs6000/powerpc-vsx32l.c: Re-generated.
8296         * features/rs6000/powerpc-vsx64.c: Re-generated.
8297         * features/rs6000/powerpc-vsx64l.c: Re-generated.
8298         * features/rs6000/rs6000.c: Re-generated.
8299         * features/s390-linux32.c: Re-generated.
8300         * features/s390-linux32v1.c: Re-generated.
8301         * features/s390-linux32v2.c: Re-generated.
8302         * features/s390-linux64.c: Re-generated.
8303         * features/s390-linux64v1.c: Re-generated.
8304         * features/s390-linux64v2.c: Re-generated.
8305         * features/s390-te-linux64.c: Re-generated.
8306         * features/s390-tevx-linux64.c: Re-generated.
8307         * features/s390-vx-linux64.c: Re-generated.
8308         * features/s390x-linux64.c: Re-generated.
8309         * features/s390x-linux64v1.c: Re-generated.
8310         * features/s390x-linux64v2.c: Re-generated.
8311         * features/s390x-te-linux64.c: Re-generated.
8312         * features/s390x-tevx-linux64.c: Re-generated.
8313         * features/s390x-vx-linux64.c: Re-generated.
8314         * features/sparc/sparc32-solaris.c: Re-generated.
8315         * features/sparc/sparc64-solaris.c: Re-generated.
8316         * features/tic6x-c62x.c: Re-generated.
8317         * features/tic6x-c62x-linux.c: Re-generated.
8318         * features/tic6x-c64x.c: Re-generated.
8319         * features/tic6x-c64x-linux.c: Re-generated.
8320         * features/tic6x-c64xp.c: Re-generated.
8321         * features/tic6x-c64xp-linux.c: Re-generated.
8322
8323 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8324
8325         * i386-linux-tdep.c (i386_linux_read_description): New function.
8326         (i386_linux_core_read_description): Call
8327         i386_linux_read_description.
8328         * i386-linux-tdep.h (i386_linux_read_description): Declare.
8329         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8330         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8331         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8332         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8333         * x86-linux-nat.c (x86_linux_read_description): Call
8334         i386_linux_read_description.
8335
8336 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8337
8338         * NEWS: Mention it.
8339         * features/Makefile (%.c: %.xml): Pass the xml file name to
8340         command "maint print c-tdesc".
8341         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8342         name from 'arg'.
8343
8344 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8345
8346         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
8347         in-class initialization.
8348         (tdesc_create_feature): Call new instead of XCNEW.
8349         (free_target_description): Ue delete.
8350
8351 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
8352
8353         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8354
8355 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8356
8357         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8358         constant.
8359         (amd64_x32_init_abi): Likewise.
8360         * amd64-tdep.h (amd64_init_abi): Update declaration.
8361         (amd64_x32_init_abi): Likewise.
8362
8363 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8364
8365         PR tdep/21717
8366         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8367         condition for FPSCR.
8368         (arm_linux_store_inferior_registers): Likewise.
8369
8370 2017-07-22  Tom Tromey  <tom@tromey.com>
8371
8372         * break-catch-syscall.c (struct catch_syscall_inferior_data)
8373         <syscalls_counts>: Now a std::vector.
8374         (get_catch_syscall_inferior_data): Use "new".
8375         (catch_syscall_inferior_data_cleanup): Use "delete".
8376         (insert_catch_syscall, remove_catch_syscall)
8377         (clear_syscall_counts): Update.
8378
8379 2017-07-22  Tom Tromey  <tom@tromey.com>
8380
8381         * break-catch-syscall.c (syscall_catchpoint)
8382         <syscalls_to_be_caught>: Now a std::vector<int>
8383         (~syscall_catchpoint): Remove.
8384         (insert_catch_syscall, remove_catch_syscall)
8385         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8386         (print_mention_catch_syscall, print_recreate_catch_syscall):
8387         Update.
8388         (create_syscall_event_catchpoint): Change type of "filter"
8389         parameter.
8390         (catch_syscall_split_args): Return a std::vector.
8391         (catch_syscall_command_1, catching_syscall_number_1): Update.
8392
8393 2017-07-22  Tom Tromey  <tom@tromey.com>
8394
8395         * break-catch-throw.c (struct exception_catchpoint)
8396         <exception_rx>: Now a std::string.
8397         (~exception_catchpoint): Remove.
8398         (print_one_detail_exception_catchpoint): Update.
8399         (handle_gnu_v3_exceptions): Change type of except_rx.
8400         (extract_exception_regexp): Return a std::string.
8401         (catch_exception_command_1): Update.
8402
8403 2017-07-22  Tom Tromey  <tom@tromey.com>
8404
8405         * break-catch-sig.c (gdb_signal_type): Remove typedef.
8406         (struct signal_catchpoint) <signals_to_be_caught>: Now a
8407         std::vector.
8408         <catch_all>: Now a bool.
8409         (~signal_catchpoint): Remove.
8410         (signal_catchpoint_insert_location)
8411         (signal_catchpoint_remove_location)
8412         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8413         (signal_catchpoint_print_mention)
8414         (signal_catchpoint_print_recreate)
8415         (signal_catchpoint_explains_signal): Update.
8416         (create_signal_catchpoint): Change type of "filter" and
8417         "catch_all".
8418         (catch_signal_split_args): Return a std::vector.  Change type of
8419         "catch_all".
8420         (catch_signal_command): Update.
8421
8422 2017-07-20  Pedro Alves  <palves@redhat.com>
8423
8424         * ada-lang.c (ada_language_defn): Make extern.
8425         (_initialize_ada_language): Remove add_language call.
8426         * c-lang.c (c_language_defn, cplus_language_defn)
8427         (asm_language_defn, minimal_language_defn): Make extern.
8428         (_initialize_c_language): Delete.
8429         * completer.c (compare_cstrings): Delete, moved to utils.h.
8430         * d-lang.c (d_language_defn): Make extern.
8431         (_initialize_d_language): Remove add_language calls.
8432         * defs.h (enum language): Add comment.
8433         * f-lang.c (f_language_defn): Make extern.
8434         (_initialize_f_language): Remove add_language call.
8435         * go-lang.c (go_language_defn): Make extern.
8436         (_initialize_go_language): Remove add_language call.
8437         * language.c: Include <algorithm>.
8438         (languages): Redefine as const array.
8439         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8440         (set_language_command): Handle "local".  Use for-range loop.
8441         (set_language): Remove loop.
8442         (language_enum): Rewrite.
8443         (language_def, language_str): Remove loops.
8444         (add_language): Delete.
8445         (add_set_language_command): New, based on add_languages.
8446         (skip_language_trampoline): Adjust.
8447         (local_language_defn): Delete.
8448         (language_gdbarch_post_init): Adjust.
8449         (_initialize_language): Remove add_language calls.  Call
8450         add_set_language_command.
8451         * language.h (add_language): Delete.
8452         (auto_language_defn)
8453         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8454         (asm_language_defn, c_language_defn, cplus_language_defn)
8455         (d_language_defn, f_language_defn, go_language_defn)
8456         (m2_language_defn, objc_language_defn, opencl_language_defn)
8457         (pascal_language_defn, rust_language_defn): Declare.
8458         * m2-lang.c (m2_language_defn): Make extern.
8459         (_initialize_m2_language): Remove add_language call.
8460         * objc-lang.c (objc_language_defn): Make extern.
8461         (_initialize_objc_language): Remove add_language call.
8462         * opencl-lang.c (opencl_language_defn): Make extern.
8463         (_initialize_opencl_language): Remove add_language call.
8464         * p-lang.c (pascal_language_defn): Make extern.
8465         (_initialize_pascal_language): Delete.
8466         * rust-lang.c (rust_language_defn): Make extern.
8467         (_initialize_rust_language): Delete.
8468         * utils.h (compare_cstrings): New static inline function.
8469
8470 2017-07-20  Pedro Alves  <palves@redhat.com>
8471
8472         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8473         (get_var_value): Constify parameters.
8474         (get_int_var_value): Change prototype.
8475         (to_fixed_range_type): Adjust.
8476         * ada-lang.h (get_int_var_value): Change prototype.
8477
8478 2017-07-20  Pedro Alves  <palves@redhat.com>
8479
8480         * dwarf2read.c (dw2_lookup_symbol): Use
8481         SYMBOL_MATCHES_SEARCH_NAME.
8482         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8483
8484 2017-07-20  Pedro Alves  <palves@redhat.com>
8485
8486         * block.c (block_iter_name_step, block_iter_name_first)
8487         (block_iter_name_next): Delete.
8488         (block_lookup_symbol_primary): Adjust to use
8489         dict_iter_match_first/dict_iter_match_next.
8490         * block.h (block_iter_name_first, block_iter_name_next): Delete
8491         declarations.
8492         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8493         dict_iter_match_first/dict_iter_match_next.
8494
8495 2017-07-20  Pedro Alves  <palves@redhat.com>
8496
8497         * cp-support.c (cp_find_first_component_aux): Add missing case for
8498         end of string.
8499
8500 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8501
8502         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8503         of dwo_cu's dwo_file.
8504
8505 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8506
8507         * remote.c (store_registers_using_G): Remove one line comment.
8508
8509 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8510
8511         * regcache.c (regcache_cpy): Simplify it.
8512         (regcache::cpy_no_passthrough): Remove it.
8513         * regcache.h (cpy_no_passthrough): Remove it.
8514         (regcache_dup, regcache_cpy): Update comments.
8515
8516 2017-07-18  Pedro Alves  <palves@redhat.com>
8517
8518         * remote-sim.c (sim_command_completer): Adjust to work with a
8519         completion_tracker instead of a VEC.
8520
8521 2017-07-17  Pedro Alves  <palves@redhat.com>
8522
8523         * completer.c (complete_source_filenames): New function.
8524         (complete_address_and_linespec_locations): New function.
8525         (location_completer): Use complete_address_and_linespec_locations.
8526         (completion_tracker::build_completion_result): Honor the tracker's
8527         request to suppress append.
8528         * completer.h (completion_tracker::suppress_append_ws)
8529         (completion_tracker::set_suppress_append_ws): New methods.
8530         (completion_tracker::m_suppress_append_ws): New field.
8531         (complete_source_filenames): New declaration.
8532         * linespec.c (linespec_complete_what): New.
8533         (struct ls_parser) <complete_what, completion_word,
8534         completion_quote_char, completion_quote_end, completion_tracker>:
8535         New fields.
8536         (string_find_incomplete_keyword_at_end): New.
8537         (linespec_lexer_lex_string): Record quote char.  If in completion
8538         mode, don't throw.
8539         (linespec_lexer_consume_token): Advance the completion word point.
8540         (linespec_lexer_peek_token): Save/restore completion info.
8541         (save_stream_and_consume_token): New.
8542         (set_completion_after_number): New.
8543         (linespec_parse_basic): Set what to complete next depending on
8544         token.  Handle function and label completions specially.
8545         (parse_linespec): Disable objc shortcut in completion mode.  Set
8546         what to complete next depending on token type.  Skip keyword if in
8547         completion mode.
8548         (complete_linespec_component, linespec_complete): New.
8549         * linespec.h (linespec_complete): Declare.
8550
8551 2017-07-17  Pedro Alves  <palves@redhat.com>
8552
8553         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8554         Handle 'operator<' / 'operator<<'.
8555
8556 2017-07-17  Pedro Alves  <palves@redhat.com>
8557
8558         * completer.c (collect_explicit_location_matches): Handle
8559         MATCH_LABEL.
8560         (convert_explicit_location_to_linespec): New, factored out from
8561         ...
8562         (convert_explicit_location_to_sals): ... this.
8563         (complete_label): New.
8564         (linespec_complete_label, find_label_symbols_in_block): New.
8565         (find_label_symbols): Add completion_mode parameter and adjust to
8566         call find_label_symbols_in_block.
8567         * linespec.h (linespec_complete_label): Declare.
8568
8569 2017-07-17  Pedro Alves  <palves@redhat.com>
8570
8571         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8572         complete_symbol_mode parameter.
8573         * cli/cli-cmds.c (complete_command): Get the completion result out
8574         of the handle_brkchars tracker if used a custom word point.
8575         * completer.c: Include "linespec.h".
8576         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8577         (advance_to_expression_complete_word_point): New.
8578         (completion_tracker::completes_to_completion_word): New.
8579         (complete_files_symbols): Pass down
8580         complete_symbol_mode::EXPRESSION.
8581         (explicit_options, probe_options): New.
8582         (collect_explicit_location_matches): Complete on the
8583         explictit_loc->foo instead of word.  Use
8584         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8585         keyword and options completions.
8586         (backup_text_ptr): Delete.
8587         (skip_keyword): New.
8588         (complete_explicit_location): Remove 'word' parameter.  Add
8589         language, quoted_arg_start and quoted_arg_end parameters.
8590         Rewrite, parsing left to right.
8591         (location_completer): Rewrite.
8592         (location_completer_handle_brkchars): New function.
8593         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8594         (enum complete_line_internal_reason): Adjust comments.
8595         (completion_tracker::discard_completions): New.
8596         (completer_handle_brkchars_func_for_completer): Handle
8597         location_completer.
8598         (gdb_custom_word_point_brkchars)
8599         (gdb_org_rl_basic_quote_characters): New.
8600         (gdb_completion_word_break_characters_throw)
8601         (completion_find_completion_word): Handle trackers that use a
8602         custom word point.
8603         (completion_tracker::advance_custom_word_point_by): New.
8604         (completion_tracker::build_completion_result): Don't rely on
8605         readline appending the quote char.
8606         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8607         use a custom word point.
8608         (gdb_rl_attempted_completion_function): Restore
8609         rl_basic_quote_characters.
8610         * completer.h (class completion_tracker): Extend intro comment.
8611         (completion_tracker::set_quote_char)
8612         (completion_tracker::quote_char)
8613         (completion_tracker::set_use_custom_word_point)
8614         (completion_tracker::use_custom_word_point)
8615         (completion_tracker::custom_word_point)
8616         (completion_tracker::set_custom_word_point)
8617         (completion_tracker::advance_custom_word_point_by)
8618         (completion_tracker::completes_to_completion_word)
8619         (completion_tracker::discard_completions): New methods.
8620         (completion_tracker::m_quote_char)
8621         (completion_tracker::m_use_custom_word_point)
8622         (completion_tracker::m_custom_word_point): New fields.
8623         (advance_to_expression_complete_word_point): Declare.
8624         * f-lang.c (f_collect_symbol_completion_matches): Add
8625         complete_symbol_mode parameter.
8626         * language.h (struct language_defn)
8627         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8628         parameter.
8629         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8630         (linespec_complete_function): New function.
8631         (linespec_lexer_lex_keyword): Adjust.
8632         * linespec.h (linespec_keywords, linespec_complete_function): New
8633         declarations.
8634         * location.c (find_end_quote): New function.
8635         (explicit_location_lex_one): Add explicit_completion_info
8636         parameter.  Save quoting info.  Don't throw if being called for
8637         completion.  Don't handle Ada operators here.
8638         (is_cp_operator, skip_op_false_positives, first_of)
8639         (explicit_location_lex_one_function): New function.
8640         (string_to_explicit_location): Replace 'dont_throw' parameter with
8641         an explicit_completion_info pointer parameter.  Handle it.  Don't
8642         use explicit_location_lex_one to lex function names.  Use
8643         explicit_location_lex_one_function instead.
8644         * location.h (struct explicit_completion_info): New.
8645         (string_to_explicit_location): Replace 'dont_throw' parameter with
8646         an explicit_completion_info pointer parameter.
8647         * symtab.c (default_collect_symbol_completion_matches_break_on):
8648         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8649         (default_collect_symbol_completion_matches)
8650         (collect_symbol_completion_matches): Add complete_symbol_mode
8651         parameter.
8652         (collect_symbol_completion_matches_type): Pass down
8653         complete_symbol_mode::EXPRESSION.
8654         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8655         parameter.  Handle LINESPEC mode.
8656         * symtab.h (complete_symbol_mode): New.
8657         (default_collect_symbol_completion_matches_break_on)
8658         (default_collect_symbol_completion_matches)
8659         (collect_symbol_completion_matches)
8660         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8661         parameter.
8662
8663 2017-07-17  Pedro Alves  <palves@redhat.com>
8664
8665         * utils.c (enum class strncmp_iw_mode): New.
8666         (strcmp_iw): Rename to ...
8667         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8668         parameters.  Handle them.
8669         (strncmp_iw): New.
8670         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8671         * utils.h (strncmp_iw): Declare.
8672         (strcmp_iw): Move describing comments here.
8673
8674 2017-07-17  Pedro Alves  <palves@redhat.com>
8675
8676         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8677         CP_OPERATOR_STR.
8678         * c-typeprint.c (is_type_conversion_operator): Use
8679         CP_OPERATOR_STR.
8680         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8681         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8682         CP_OPERATOR_LEN.
8683         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8684         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8685         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8686         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8687         CP_OPERATOR_STR.
8688         * location.c: Include "cp-support.h".
8689         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8690         CP_OPERATOR_STR.
8691         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8692         CP_OPERATOR_LEN.
8693
8694 2017-07-17  Pedro Alves  <palves@redhat.com>
8695
8696         * cli/cli-cmds.c (complete_command): Use a completion tracker
8697         along with completion_find_completion_word for handle_brkchars
8698         phase.
8699         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8700         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8701         (struct gdb_rl_completion_word_info): New.
8702         (gdb_rl_find_completion_word): New.
8703         (completion_find_completion_word): New.
8704         * completer.h (completion_find_completion_word): Declare.
8705
8706 2017-07-17  Pedro Alves  <palves@redhat.com>
8707
8708         * ada-lang.c (symbol_completion_match): Adjust comments.
8709         (symbol_completion_add): Replace vector parameter with
8710         completion_tracker parameter.  Use it.
8711         (ada_make_symbol_completion_list): Rename to...
8712         (ada_collect_symbol_completion_matches): ... this.  Add
8713         completion_tracker parameter and use it.
8714         (ada_language_defn): Adjust.
8715         * break-catch-syscall.c (catch_syscall_completer): Adjust
8716         prototype and work with completion_tracker instead of VEC.
8717         * breakpoint.c (condition_completer): Adjust prototype and work
8718         with completion_tracker instead of VEC.
8719         * c-lang.c (c_language_defn, cplus_language_defn)
8720         (asm_language_defn, minimal_language_defn): Adjust to renames.
8721         * cli/cli-cmds.c (complete_command): Rework using
8722         completion_tracker.  Catch exceptions when completing.
8723         * cli/cli-decode.c (integer_unlimited_completer)
8724         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8725         with completion_tracker instead of VEC.
8726         * command.h (struct completion_tracker): Forward declare.
8727         (completer_ftype, completer_handle_brkchars_ftype): Change
8728         types.
8729         (complete_on_cmdlist, complete_on_enum): Adjust.
8730         * completer.c: Include <algorithm>.
8731         (struct gdb_completer_state): New.
8732         (current_completion): New global.
8733         (readline_line_completion_function): Delete.
8734         (noop_completer, filename_completer)
8735         (filename_completer_handle_brkchars, complete_files_symbols)
8736         (linespec_location_completer): Adjust to work with a
8737         completion_tracker instead of a VEC.
8738         (string_or_empty): New.
8739         (collect_explicit_location_matches): Adjust to work with a
8740         completion_tracker instead of a VEC.
8741         (explicit_location_completer): Rename to ...
8742         (complete_explicit_location): ... this and adjust to work with a
8743         completion_tracker instead of a VEC.
8744         (location_completer): Adjust to work with a completion_tracker
8745         instead of a VEC.
8746         (add_struct_fields): Adjust to work with a completion_list instead
8747         of VEC.
8748         (expression_completer): Rename to ...
8749         (complete_expression): ... this and adjust to work with a
8750         completion_tracker instead of a VEC.  Use complete_files_symbols.
8751         (expression_completer): Reimplement on top of complete_expression.
8752         (symbol_completer): Adjust to work with a completion_tracker
8753         instead of a VEC.
8754         (enum complete_line_internal_reason): Add describing comments.
8755         (complete_line_internal_normal_command): Adjust to work with a
8756         completion_tracker instead of a VEC.
8757         (complete_line_internal): Rename to ...
8758         (complete_line_internal_1): ... this and adjust to work with a
8759         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8760         handle_brkchars phase.
8761         (new_completion_tracker): Delete.
8762         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8763         complete_line_internal_1.
8764         (free_completion_tracker): Delete.
8765         (INITIAL_COMPLETION_HTAB_SIZE): New.
8766         (completion_tracker::completion_tracker)
8767         (completion_tracker::~completion_tracker): New.
8768         (maybe_add_completion): Delete.
8769         (completion_tracker::maybe_add_completion)
8770         (completion_tracker::add_completion)
8771         (completion_tracker::add_completions): New.
8772         (throw_max_completions_reached_error): Delete.
8773         (complete_line): Adjust to work with a completion_tracker instead
8774         of a VEC.  Don't create a completion_tracker_t or check for max
8775         completions here.
8776         (command_completer, command_completer_handle_brkchars)
8777         (signal_completer, reg_or_group_completer_1)
8778         (reg_or_group_completer, default_completer_handle_brkchars):
8779         Adjust to work with a completion_tracker.
8780         (gdb_completion_word_break_characters_throw): New.
8781         (gdb_completion_word_break_characters): Reimplement.
8782         (line_completion_function): Delete.
8783         (completion_tracker::recompute_lowest_common_denominator)
8784         (expand_preserving_ws)
8785         (completion_tracker::build_completion_result)
8786         (completion_result::completion_result)
8787         (completion_result::completion_result)
8788         (completion_result::~completion_result)
8789         (completion_result::completion_result)
8790         (completion_result::release_match_list, compare_cstrings)
8791         (completion_result::sort_match_list)
8792         (completion_result::reset_match_list)
8793         (gdb_rl_attempted_completion_function_throw)
8794         (gdb_rl_attempted_completion_function): New.
8795         * completer.h (completion_list, struct completion_result)
8796         (class completion_tracker): New.
8797         (complete_line): Add completion_tracker parameter.
8798         (readline_line_completion_function): Delete.
8799         (gdb_rl_attempted_completion_function): New.
8800         (noop_completer, filename_completer, expression_completer)
8801         (location_completer, symbol_completer, command_completer)
8802         (signal_completer, reg_or_group_completer): Update prototypes.
8803         (completion_tracker_t, new_completion_tracker)
8804         (make_cleanup_free_completion_tracker): Delete.
8805         (enum maybe_add_completion_enum): Delete.
8806         (maybe_add_completion): Delete.
8807         (throw_max_completions_reached_error): Delete.
8808         * corefile.c (complete_set_gnutarget): Adjust to work with a
8809         completion_tracker instead of a VEC.
8810         * cp-abi.c (cp_abi_completer): Adjust to work with a
8811         completion_tracker instead of a VEC.
8812         * d-lang.c (d_language_defn): Adjust.
8813         * disasm.c (disassembler_options_completer): Adjust to work with a
8814         completion_tracker instead of a VEC.
8815         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8816         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8817         with a completion_tracker instead of a VEC.
8818         (f_language_defn): Adjust.
8819         * go-lang.c (go_language_defn): Adjust.
8820         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8821         Adjust to work with a completion_tracker instead of a VEC.
8822         * infrun.c (handle_completer): Likewise.
8823         * interps.c (interpreter_completer): Likewise.
8824         * interps.h (interpreter_completer): Likewise.
8825         * language.c (unknown_language_defn, auto_language_defn)
8826         (local_language_defn): Adjust.
8827         * language.h (language_defn::la_make_symbol_completion_list):
8828         Rename to ...
8829         (language_defn::la_collect_symbol_completion_matches): ... this
8830         and adjust to work with a completion_tracker instead of a VEC.
8831         * m2-lang.c (m2_language_defn): Adjust.
8832         * objc-lang.c (objc_language_defn): Adjust.
8833         * opencl-lang.c (opencl_language_defn): Adjust.
8834         * p-lang.c (pascal_language_defn): Adjust.
8835         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8836         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8837         with a completion_tracker.
8838         * rust-lang.c (rust_language_defn): Adjust.
8839         * symtab.c (free_completion_list, do_free_completion_list)
8840         (return_val, completion_tracker): Delete.
8841         (completion_list_add_name, completion_list_add_symbol)
8842         (completion_list_add_msymbol, completion_list_objc_symbol)
8843         (completion_list_add_fields, add_symtab_completions): Add
8844         completion_tracker parameter and use it.
8845         (default_make_symbol_completion_list_break_on_1): Rename to...
8846         (default_collect_symbol_completion_matches_break_on): ... this.
8847         Add completion_tracker parameter and use it instead of allocating
8848         a completion tracker here.
8849         (default_make_symbol_completion_list_break_on): Delete old
8850         implementation.
8851         (default_make_symbol_completion_list): Delete.
8852         (default_collect_symbol_completion_matches): New.
8853         (make_symbol_completion_list): Delete.
8854         (collect_symbol_completion_matches): New.
8855         (make_symbol_completion_type): Rename to ...
8856         (collect_symbol_completion_matches_type): ... this.  Add
8857         completion_tracker parameter and use it instead of VEC.
8858         (make_file_symbol_completion_list_1): Rename to...
8859         (collect_file_symbol_completion_matches): ... this.  Add
8860         completion_tracker parameter and use it instead of VEC.
8861         (make_file_symbol_completion_list): Delete.
8862         (add_filename_to_list): Use completion_list instead of a VEC.
8863         (add_partial_filename_data::list): Now a completion_list.
8864         (make_source_files_completion_list): Work with a completion_list
8865         instead of a VEC.
8866         * symtab.h: Include "completer.h".
8867         (default_make_symbol_completion_list_break_on)
8868         (default_make_symbol_completion_list, make_symbol_completion_list)
8869         (make_symbol_completion_type, make_file_symbol_completion_list)
8870         (make_source_files_completion_list): Delete.
8871         (default_collect_symbol_completion_matches_break_on)
8872         (default_collect_symbol_completion_matches)
8873         (collect_symbol_completion_matches)
8874         (collect_symbol_completion_matches_type)
8875         (collect_file_symbol_completion_matches)
8876         (make_source_files_completion_list): New.
8877         * top.c (init_main): Don't install a rl_completion_entry_function
8878         hook.  Install a rl_attempted_completion_function hook instead.
8879         * tui/tui-layout.c (layout_completer): Adjust to work with a
8880         completion_tracker.
8881         * tui/tui-regs.c (tui_reggroup_completer):
8882         * tui/tui-win.c (window_name_completer, focus_completer)
8883         (winheight_completer): Adjust to work with a completion_tracker.
8884         * value.c: Include "completer.h".
8885         (complete_internalvar): Adjust to work with a completion_tracker.
8886         * value.h (complete_internalvar): Likewise.
8887
8888 2017-07-17  Pedro Alves  <palves@redhat.com>
8889
8890         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8891         renames.
8892         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8893         comments to completer_ftype's declaration.
8894         <completer_handle_brkchars>: Change type to
8895         completer_handle_brkchars_ftype.
8896         * command.h (completer_ftype): Add describing comment and give
8897         names to parameters.
8898         (completer_ftype_void): Rename to ...
8899         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8900         (set_cmd_completer_handle_brkchars): Adjust.
8901         * completer.c (filename_completer_handle_brkchars): New function.
8902         (complete_line_internal_normal_command): New function, factored
8903         out from ...
8904         (complete_line_internal): ... here.
8905         (command_completer_handle_brkchars)
8906         (default_completer_handle_brkchars)
8907         (completer_handle_brkchars_func_for_completer): New functions.
8908         * completer.h (set_gdb_completion_word_break_characters): Delete
8909         declaration.
8910         (completer_handle_brkchars_func_for_completer): New declaration.
8911         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8912         completer_handle_brkchars_func_for_completer.
8913
8914 2017-07-17  Pedro Alves  <palves@redhat.com>
8915
8916         * completer.c (symbol_completer): New function, based on
8917         make_symbol_completion_list_fn.
8918         * completer.h (symbol_completer): New declaration.
8919         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8920         * python/py-cmd.c (completers): Adjust.
8921         * symtab.c (make_symbol_completion_list_fn): Delete.
8922         * symtab.h (make_symbol_completion_list_fn): Delete.
8923         * cli/cli-decode.c (add_cmd): Adjust.
8924
8925 2017-07-17  Pedro Alves  <palves@redhat.com>
8926
8927         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8928         * dwarf2read.c: Include "filename-seen-cache.h".
8929         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8930         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8931         * filename-seen-cache.c: New file.
8932         * filename-seen-cache.h: New file.
8933         * symtab.c: Include "filename-seen-cache.h".
8934         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8935         (create_filename_seen_cache, clear_filename_seen_cache)
8936         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8937         to filename-seen-cache.h/filename-seen-cache.c.
8938         (output_source_filename, sources_info)
8939         (maybe_add_partial_symtab_filename)
8940         (make_source_files_completion_list): Adjust to use
8941         filename_seen_cache.
8942
8943 2017-07-17  Pedro Alves  <palves@redhat.com>
8944
8945         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8946         fields.
8947         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8948         dwarf2_debug_sections*)): New.
8949         (dwarf2_per_objfile::dwarf2_per_objfile(const
8950         dwarf2_per_objfile&)): Declare as deleted.
8951         (dwarf2_per_objfile::operator=): Declare as deleted.
8952         (dwarf2_per_objfile::dwarf2_per_objfile)
8953         (dwarf2_per_objfile::~dwarf2_per_objfile)
8954         (dwarf2_per_objfile::free_cached_comp_units): New.
8955         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8956         ctor.  Call dwarf2_per_objfile's ctor manually.
8957         (dwarf2_locate_sections): Deleted/refactored as ...
8958         (dwarf2_per_objfile::locate_sections): ... this new method.
8959         (free_cached_comp_units): Defer to
8960         dwarf2_per_objfile::free_cached_comp_units.
8961         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8962
8963 2017-07-14  Tom Tromey  <tom@tromey.com>
8964
8965         PR rust/21764:
8966         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8967         parameter.
8968         <UNOP_SIZEOF>: Split into separate case.
8969         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8970
8971 2017-07-14  Tom Tromey  <tom@tromey.com>
8972
8973         PR rust/21763:
8974         * symtab.c (symbol_matches_domain): Add language_rust to special
8975         case.
8976         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8977         treat LOC_TYPEDEF symbols as variables.
8978
8979 2017-07-14  Pedro Alves  <palves@redhat.com>
8980
8981         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8982         symtabs matching all symtabs with SRCFILE as file name instead of
8983         only considering the first hit, with lookup_symtab.
8984
8985 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8986
8987         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8988         operator_name parameters.
8989         (gen_expr): Update function call.
8990
8991 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8992
8993         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8994         parameter.
8995         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8996         Likewise.
8997         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8998         parameter, use agent_expr::gdbarch instead, update function
8999         calls.
9000         (locexpr_tracepoint_var_ref): Likewise.
9001         (loclist_tracepoint_var_ref): Likewise.
9002         * ax-gdb.c (gen_trace_static_fields): Likewise.
9003         (gen_traced_pop): Likewise.
9004         (gen_frame_args_address): Likewise.
9005         (gen_frame_locals_address): Likewise.
9006         (gen_var_ref): Likewise.
9007         (gen_struct_ref_recursive): Likewise.
9008         (gen_static_field): Likewise.
9009         (gen_maybe_namespace_elt): Likewise.
9010         (gen_expr): Likewise.
9011         (gen_trace_for_var): Likewise.
9012         (gen_trace_for_expr): Likewise.
9013         (gen_trace_for_return_address): Likewise.
9014
9015 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9016
9017         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9018         parameter.
9019         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9020
9021 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9022
9023         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9024         from ax, update calls.
9025         (gen_usual_arithmetic): Likewise.
9026         (gen_integral_promotions): Likewise.
9027         (gen_bitfield_ref): Likewise.
9028         (gen_primitive_field): Likewise.
9029         (gen_struct_ref_recursive): Likewise.
9030         (gen_struct_ref): Likewise.
9031         (gen_maybe_namespace_elt): Likewise.
9032         (gen_struct_elt_for_reference): Likewise.
9033         (gen_namespace_elt): Likewise.
9034         (gen_aggregate_elt_ref): Likewise.
9035         (gen_expr): Get gdbarch from ax, update calls.
9036         (gen_expr_binop_rest): Likewise.
9037
9038 2017-07-13  Pedro Alves  <palves@redhat.com>
9039
9040         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9041         as default tdesc.
9042         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9043         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9044         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9045         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
9046         tdep.
9047         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9048         Get final tdesc from the tdep.
9049         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9050         default tdesc.
9051         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9052         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9053         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9054         Use it as default tdesc.
9055         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9056         down to amd_init_abi.  No longer handle fallback tdesc here.
9057         * amd64-tdep.h (tdesc_x32): Declare.
9058         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9059         parameter.
9060         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9061         as default tdesc.
9062
9063 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9064
9065         * s390-linux-tdep.c (s390_process_record): Add support for
9066         instructions new in arch12.
9067
9068 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
9069
9070         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9071         PT_GETFSBASE and PT_GETGSBASE.
9072         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9073         PT_SETGSBASE.
9074
9075 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
9076
9077         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9078         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9079         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9080         those rules.
9081         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9082         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9083         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9084         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9085         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9086         * features/i386/amd64.xml: Add 64bit-segments.xml.
9087         * features/i386/amd64-avx-avx512.c: Regenerated.
9088         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9089         * features/i386/amd64-avx-mpx.c: Regenerated.
9090         * features/i386/amd64-avx.c: Regenerated.
9091         * features/i386/amd64-mpx.c: Regenerated.
9092         * features/i386/amd64.c: Regenerated.
9093         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9094         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9095         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9096         * regformats/i386/amd64-avx.dat: Regenerated.
9097         * regformats/i386/amd64-mpx.dat: Regenerated.
9098         * regformats/i386/amd64.dat: Regenerated.
9099
9100 2017-07-10  Yao Qi  <yao.qi@linaro.org>
9101
9102         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9103         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9104
9105 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
9106
9107         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9108         unsetenv.
9109         * gnulib/aclocal.m4: Regenerate.
9110         * gnulib/config.in: Regenerate.
9111         * gnulib/configure: Regenerate.
9112         * gnulib/import/Makefile.am: Regenerate.
9113         * gnulib/import/Makefile.in: Regenerate.
9114         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9115         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9116         * gnulib/import/m4/environ.m4: New file.
9117         * gnulib/import/m4/setenv.m4: New file.
9118         * gnulib/import/setenv.c: New file.
9119         * gnulib/import/unsetenv.c: New file.
9120
9121 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
9122
9123         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9124         address when op is DW_OP_addr.
9125
9126 2017-07-09  Tom Tromey  <tom@tromey.com>
9127
9128         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9129         check and apply to outer type.
9130
9131 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9132
9133         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9134         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9135         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9136         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9137
9138 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9139
9140         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9141
9142 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9143
9144         * corelow.c (get_core_siginfo): Remove.
9145         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9146         instead of get_core_siginfo.
9147         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9148         * gdbarch.h: Re-generate.
9149         * gdbarch.c: Re-generate.
9150         * linux-tdep.c (linux_core_xfer_siginfo): New.
9151         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9152
9153 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9154
9155         * corelow.c (thread_section_name): Move to ...
9156         * gdbcore.h (thread_section_name): ... here.
9157
9158 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9159
9160         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9161         (struct siginfo32): New.
9162         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9163         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9164         via ptrace(PT_LWPINFO).
9165
9166 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9167
9168         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9169         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9170         (fbsd_get_siginfo_type): New.
9171         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9172         (_initialize_fbsd_tdep): New.
9173
9174 2017-07-06  David Blaikie  <dblaikie@gmail.com>
9175
9176         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9177         a singular dwo_unit*) to support multiple CUs in the same way that
9178         multiple TUs are supported.
9179         (create_cus_hash_table): Replace create_dwo_cu with a function for
9180         parsing multiple CUs from a DWO file.
9181         (open_and_init_dwo_file): Use create_cus_hash_table rather than
9182         create_dwo_cu.
9183         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9184         htab_find, rather than comparing the signature to a singleton CU in
9185         the dwo_file.
9186
9187 2017-07-06  Pedro Alves  <palves@redhat.com>
9188
9189         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9190
9191 2017-07-04  Pedro Alves  <palves@redhat.com>
9192
9193         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9194         * gdbtypes.h (TYPE_STATIC): Delete.
9195         (struct fn_field) <is_public, is_abstract, is_static, is_final,
9196         is_synchronized, is_native>: Delete.
9197         <dummy>: Bump.
9198         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9199         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9200         (TYPE_FN_FIELD_ABSTRACT): Delete.
9201
9202 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
9203
9204         * buffer.h (buffer_finish): Fix spelling mistakes.
9205
9206 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
9207
9208         * .dir-locals.el: Automatically switch to C-style comments in
9209         versions of Emacs that support the feature.
9210
9211 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9212             Pedro Alves  <palves@redhat.com>
9213
9214         PR cli/21688
9215         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9216         (process_next_line): New variable 'inline_cmd'.
9217         Adjust 'if' clauses for "python", "compile" and "guile" to use
9218         'command_name_equals' and check for '!inline_cmd'.
9219
9220 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9221
9222         PR cli/21688
9223         * cli/cli-script.c (command_name_equals_not_inline): New function.
9224         (process_next_line): Adjust 'if' clauses for "python", "compile"
9225         and "guile" to use command_name_equals_not_inline.
9226
9227 2017-06-29  Pedro Alves  <palves@redhat.com>
9228
9229         * completer.c (expression_completer): Call
9230         linespec_location_completer instead of location_completer.
9231
9232 2017-06-29  Pedro Alves  <palves@redhat.com>
9233
9234         * completer.c (expression_completer): Remove code that recomputes
9235         'text' from 'word'.
9236
9237 2017-06-29  Yao Qi  <yao.qi@linaro.org>
9238
9239         * regformats/regdat.sh: Generate code with
9240         "ifndef IN_PROCESS_AGENT".
9241
9242 2017-06-28  Pedro Alves  <palves@redhat.com>
9243
9244         * command.h: Include "common/scoped_restore.h".
9245
9246 2017-06-28  Yao Qi  <yao.qi@linaro.org>
9247
9248         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9249         instead of obstack_grow.
9250
9251 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
9252
9253         PR gdb/21337
9254         * symfile.c (reread_symbols): Call objfiles_changed just before
9255         read_symbols.
9256
9257 2017-06-27  Pedro Alves  <palves@redhat.com>
9258
9259         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9260         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9261         (completion_list_add_symbol, completion_list_add_msymbol):
9262         ... these new functions.
9263         (add_symtab_completions)
9264         (default_make_symbol_completion_list_break_on_1): Adjust.
9265
9266 2017-06-27  Pedro Alves  <palves@redhat.com>
9267
9268         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9269         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
9270         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9271         dtor.
9272         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
9273         'storage_obstack' field an auto_obstack.  In-class initialize all
9274         non-bitfield fields.  Make minsyms_read bool.
9275         * symfile.c (read_symbols): Adjust.
9276
9277 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
9278
9279         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9280         (gdbsim_store_register): Likewise.
9281
9282 2017-06-27  Pedro Alves  <palves@redhat.com>
9283
9284         * c-exp.y (name_obstack): Now an auto_obstack.
9285         (yylex): Use auto_obstack::clear.
9286         (c_parse): Use auto_obstack::clear instead of reinitializing and
9287         freeing the obstack.
9288         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9289         * d-exp.y (name_obstack): Now an auto_obstack.
9290         (yylex): Use auto_obstack::clear.
9291         (d_parse): Use auto_obstack::clear instead of reinitializing and
9292         freeing the obstack.
9293         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9294         auto_obstack.
9295         * dwarf2read.c (create_addrmap_from_index)
9296         (dwarf2_build_psymtabs_hard)
9297         (update_enumeration_type_from_children): Likewise.
9298         * gdb_obstack.h (auto_obstack): New type.
9299         * go-exp.y (name_obstack): Now an auto_obstack.
9300         (build_packaged_name): Use auto_obstack::clear.
9301         (go_parse): Use auto_obstack::clear instead of reinitializing and
9302         freeing the obstack.
9303         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9304         auto_obstack.
9305         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9306         * rust-exp.y (work_obstack): Now an auto_obstack.
9307         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9308         reinitializing and freeing the obstack.
9309         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9310         (host_char_to_target): Use auto_obstack.
9311         * utils.h (make_cleanup_obstack_free): Delete declaration.
9312         * valprint.c (generic_emit_char, generic_printstr): Use
9313         auto_obstack.
9314
9315 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
9316
9317         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9318         thread.
9319         (darwin_init_thread_list): Don't update dummy thread.
9320         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9321
9322 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9323
9324         * record-full.c (netorder16): Remove.
9325
9326 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9327
9328         * common/diagnostics.h: Define macros for GCC.
9329         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9330         * common/vec.h: Include diagnostics.h.
9331         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9332         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9333         warning.
9334
9335 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9336
9337         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9338         New macro.
9339         * ada-lex.l: Ignore deprecated register warnings.
9340
9341 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9342
9343         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9344         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9345
9346 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9347
9348         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9349         its own line.
9350
9351 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9352
9353         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9354
9355 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
9356
9357         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9358         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9359         (xtensa_register_read_masked): Likewise.
9360
9361 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
9362
9363         * common/environ.c (gdb_environ::unset): Update comment.
9364
9365 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9366
9367         * python/py-unwind.c (pyuw_sniffer): Allocate space for
9368         registers.
9369
9370 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9371
9372         * record-full.c (record_full_exec_insn): Use byte_vector.
9373
9374 2017-06-22  Yao Qi  <yao.qi@linaro.org>
9375
9376         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9377         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9378
9379 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9380
9381         * remote.c (cached_reg): Move from here...
9382         * regcache.h (cached_reg): ...to here.
9383         * python/py-unwind.c (struct reg_info): Remove.
9384         (cached_frame_info): Use cached_reg_t.
9385         (pyuw_prev_register): Likewise.
9386         (pyuw_sniffer): Use cached_reg_t and allocate registers.
9387         (pyuw_dealloc_cache): Free all registers.
9388
9389 2017-06-22  Pedro Alves  <palves@redhat.com>
9390             Simon Marchi  <simon.marchi@ericsson.com>
9391
9392         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9393         warning.
9394         * common/diagnostics.h: New file.
9395
9396 2017-06-22  Pedro Alves  <palves@redhat.com>
9397
9398         * common/agent.h: Add include guards.
9399
9400 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
9401
9402         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9403         talk about addressable units instead of bytes.
9404
9405 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9406
9407         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9408         of '::const_iterator'.
9409
9410 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9411
9412         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9413         'unittests/environ-selftests.c'.
9414         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9415         * charset.c (find_charset_names): Declare object 'iconv_env'.
9416         Update code to use 'iconv_env' object.  Remove call to
9417         'free_environ'.
9418         * common/environ.c: Include <utility>.
9419         (make_environ): Delete function.
9420         (free_environ): Delete function.
9421         (gdb_environ::clear): New function.
9422         (gdb_environ::operator=): New function.
9423         (gdb_environ::get): Likewise.
9424         (environ_vector): Delete function.
9425         (set_in_environ): Delete function.
9426         (gdb_environ::set): New function.
9427         (unset_in_environ): Delete function.
9428         (gdb_environ::unset): New function.
9429         (gdb_environ::envp): Likewise.
9430         * common/environ.h: Include <vector>.
9431         (struct gdb_environ): Delete; transform into...
9432         (class gdb_environ): ... this class.
9433         (free_environ): Delete prototype.
9434         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9435         environ_vector): Likewise.
9436         * infcmd.c (run_command_1): Update code to call
9437         'envp' from 'gdb_environ' class.
9438         (environment_info): Update code to call methods from 'gdb_environ'
9439         class.
9440         (unset_environment_command): Likewise.
9441         (path_info): Likewise.
9442         (path_command): Likewise.
9443         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9444         (inferior::inferior): Initialize 'environment' using the host's
9445         information.
9446         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9447         Include "environ.h".
9448         (class inferior) <environment>: Change type from 'struct
9449         gdb_environ' to 'gdb_environ'.
9450         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9451         methods from 'gdb_environ' class.
9452         * solib.c (solib_find_1): Likewise
9453         * unittests/environ-selftests.c: New file.
9454
9455 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9456
9457         * features/i386/i386-linux.xml: Exchange the order of including
9458         32bit-linux.xml and 32bit-sse.xml.
9459         * features/i386/i386-linux.c: Regenerated.
9460
9461 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9462
9463         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9464         Delete copy ctor and assignment operator.
9465         (tdesc_type): Likewise.
9466         (tdesc_feature): Likewise.
9467         (tdesc_free_reg): Remove.
9468         (tdesc_create_reg): Use new.
9469         (tdesc_free_type): Remove.
9470         (tdesc_create_vector): Use new.
9471         (tdesc_create_union): Likewise.
9472         (tdesc_create_flags): Likewise.
9473         (tdesc_create_enum): Likewise.
9474         (tdesc_free_feature): Delete.
9475         (free_target_description): Use delete.
9476
9477 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9478
9479         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9480         registers.
9481
9482 2017-06-19  Pedro Alves  <palves@redhat.com>
9483
9484         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9485         after gdb::unlinker.
9486
9487 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9488
9489         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9490         gdb_environ to access an environment variable.
9491
9492 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9493
9494         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9495         gdb_byte*.
9496
9497 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9498
9499         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9500
9501 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9502
9503         * configure: Re-generate.
9504         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9505
9506 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9507
9508         * configure: Re-generate.
9509         * warning.m4: Pass -Werror to compiler when checking for
9510         supported warning flags.
9511
9512 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9513
9514         * Makefile.in (COMPILE.pre): Add "-x c++".
9515
9516 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9517             Pedro Alves  <palves@redhat.com>
9518             Yao Qi  <yao.qi@linaro.org>
9519
9520         * defs.h (RequireLongest): New.
9521         (extract_integer): Declare function template.
9522         (extract_signed_integer): Remove the declaration, but define it
9523         static inline.
9524         (extract_unsigned_integer): Likewise.
9525         (store_integer): Declare function template.
9526         (store_signed_integer): Remove the declaration, but define it
9527         static inline.
9528         (store_unsigned_integer): Likewise.
9529         * findvar.c (extract_integer): New function template.
9530         (extract_signed_integer): Remove.
9531         (extract_unsigned_integer): Remove.
9532         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9533         instantiations.
9534         (store_integer): New function template.
9535         (store_signed_integer): Remove.
9536         (store_unsigned_integer): Remove.
9537         (store_integer): Explicit instantiations.
9538         * regcache.c (regcache_raw_read_signed): Update.
9539         (regcache::raw_read): New function.
9540         (regcache::raw_read_signed): Remove.
9541         (regcache::raw_read_unsigned): Remove.
9542         (regcache_raw_read_unsigned): Update.
9543         (regcache_raw_write_unsigned): Update.
9544         (regcache::raw_write_signed): Remove.
9545         (regcache::raw_write): New function.
9546         (regcache_cooked_read_signed): Update.
9547         (regcache::raw_write_unsigned): Remove.
9548         (regcache::cooked_read_signed): Remove.
9549         (regcache_cooked_read_unsigned): Update.
9550         (regcache::cooked_read_unsigned): Remove.
9551         (regcache_cooked_write_signed): Update.
9552         (regcache_cooked_write_unsigned): Update.
9553         * regcache.h (regcache) <raw_read_signed>: Remove.
9554         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9555         <raw_read, raw_write>: New.
9556         <cooked_read_signed, cooked_write_signed>: Remove.
9557         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9558         <cooked_read, cooked_write>: New.
9559         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9560         (sh64_pseudo_register_write): Update.
9561
9562 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9563
9564         * arc-tdep.c (arc_disassembler_options): New variable.
9565         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9566         of default_print_insn.
9567         (arc_delayed_print_insn): Set info->section when needed,
9568         use default_print_insn to retrieve a disassembler.
9569
9570 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9571
9572         PR gdb/21574
9573         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9574         to mention $SHELL and startup-with-shell.
9575
9576 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9577
9578         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9579
9580 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9581
9582         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9583         default_print_insn instead of print_insn_aarch64.
9584         * arm-tdep.c (gdb_print_insn_arm): Call
9585         default_print_insn instead of print_insn_big_arm
9586         and print_insn_little_arm.
9587         * i386-tdep.c (i386_print_insn): Call default_print_insn
9588         instead of print_insn_i386.
9589         * ia64-tdep.c (ia64_print_insn): Call
9590         default_print_insn instead of print_insn_ia64.
9591         * mips-tdep.c (gdb_print_insn_mips): Call
9592         default_print_insn instead of print_insn_big_mips
9593         and print_insn_little_mips.
9594         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9595         instead of print_insn_spu.
9596
9597 2017-06-14  Pedro Alves  <palves@redhat.com>
9598
9599         * ada-lang.c: Include "common/byte-vector.h".
9600         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9601         * charset.c (wchar_iterator::iterate): Resize the vector instead
9602         of reserving it.
9603         * common/byte-vector.h: Include "common/def-vector.h".
9604         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9605         * cli/cli-dump.c: Include "common/byte-vector.h".
9606         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9607         * common/byte-vector.h: New file.
9608         * common/def-vector.h: New file.
9609         * common/default-init-alloc.h: New file.
9610         * dwarf2loc.c: Include "common/byte-vector.h".
9611         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9612         instead of reserving it.
9613         * dwarf2read.c: Include "common/byte-vector.h".
9614         (data_buf::m_vec): Now a gdb::byte_vector.
9615         * gdb_regex.c: Include "common/def-vector.h".
9616         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9617         * mi/mi-main.c: Include "common/byte-vector.h".
9618         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9619         * printcmd.c: Include "common/byte-vector.h".
9620         (print_scalar_formatted): Use gdb::byte_vector.
9621         * valprint.c: Include "common/byte-vector.h".
9622         (maybe_negate_by_bytes, print_decimal_chars): Use
9623         gdb::byte_vector.
9624
9625 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9626
9627         * darwin-nat.c: Include "nat/fork-inferior.h".
9628
9629 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9630
9631         * configure.nat: Factor out Darwin bits that are not
9632         architecture-specific.  Add fork-inferior.o.
9633
9634 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9635
9636         * configure.nat: Factor out AIX bits that are not
9637         architecture-specific.  Add fork-inferior.o.
9638
9639 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9640
9641         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9642         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9643         wrappers that just call rw_pieced_value.
9644
9645 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9646
9647         * dwarf2loc.c (write_pieced_value): When writing the data for a
9648         memory piece, use write_memory_with_notification instead of
9649         write_memory.
9650
9651 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9652
9653         * valops.c (read_value_memory): Change embedded_offset to
9654         represent a bit offset instead of a byte offset.
9655         * value.h (read_value_memory): Adjust comment.
9656
9657 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9658
9659         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9660         dest_offset_bits and source_offset_bits.
9661         (write_pieced_value): Likewise.
9662
9663 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9664
9665         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9666         given by DW_OP_bit_piece.
9667         (write_pieced_value): Likewise.
9668
9669 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9670
9671         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9672         some other preparations to the places where sufficient information
9673         is available.
9674         (write_pieced_value): Likewise.
9675
9676 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9677
9678         * dwarf2loc.c (bits_to_bytes): New function.
9679         (read_pieced_value): Fix offset calculations for register pieces
9680         on big-endian targets.
9681         (write_pieced_value): Likewise.
9682
9683 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9684
9685         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9686         (write_pieced_value): Likewise.
9687
9688 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9689
9690         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9691         transfer the source value's least significant bits, instead of its
9692         lowest-addressed ones.  Rename type_len to max_offset.
9693         (read_pieced_value): Mirror above changes to write_pieced_value as
9694         applicable.
9695
9696 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9697
9698         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9699         truncate full bytes from dest_offset_bits before using it as an
9700         offset into the buffer.
9701
9702 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9703
9704         * dwarf2loc.c (write_pieced_value): Include transfer size in
9705         byte-wise check.
9706
9707 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9708
9709         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9710         calculation of this_size.
9711
9712 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9713
9714         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9715         when targeting a bit-field.
9716         (write_pieced_value): Likewise.
9717
9718 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9719
9720         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9721         (allocate_piece_closure): Drop addr_size parameter.
9722         (dwarf2_evaluate_loc_desc_full): Adjust call to
9723         allocate_piece_closure.
9724
9725 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9726
9727         PR gdb/21226
9728         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9729         the LSB end, independent of endianness.
9730
9731 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9732
9733         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9734         size capping.
9735
9736 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9737
9738         * mips-linux-nat.c: Move include features/mips*-linux.c to
9739         mips-linux-tdep.c.
9740         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9741         to mips-linux-tdep.c.
9742         * mips-linux-tdep.c: Include features/mips*-linux.c
9743         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9744         functions.
9745         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9746         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9747         (tdesc_mips64_dsp_linux): Declare.
9748
9749 2017-06-12  Tom Tromey  <tom@tromey.com>
9750
9751         * valprint.h (val_print_type_code_int): Remove.
9752         * valprint.c (generic_val_print_int): Always call
9753         val_print_scalar_formatted.
9754         (val_print_type_code_int): Remove.
9755         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9756         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9757         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9758         * ada-valprint.c (ada_val_print_num): Use
9759         val_print_scalar_formatted.
9760
9761 2017-06-12  Tom Tromey  <tom@tromey.com>
9762
9763         * printcmd.c (print_scalar_formatted): Unify the two switches.
9764         Don't convert scalars to LONGEST.
9765
9766 2017-06-12  Tom Tromey  <tom@tromey.com>
9767
9768         PR exp/16225:
9769         * valprint.h (print_decimal_chars): Update.
9770         * valprint.c (maybe_negate_by_bytes): New function.
9771         (print_decimal_chars): Add "is_signed" argument.
9772         * printcmd.c (print_scalar_formatted): Update.
9773
9774 2017-06-12  Tom Tromey  <tom@tromey.com>
9775
9776         PR exp/16225:
9777         * valprint.h (print_binary_chars, print_hex_chars): Update.
9778         * valprint.c (val_print_type_code_int): Update.
9779         (print_binary_chars): Add "zero_pad" argument.
9780         (emit_octal_digit): New function.
9781         (print_octal_chars): Don't zero-pad.
9782         (print_decimal_chars): Likewise.
9783         (print_hex_chars): Add "zero_pad" argument.
9784         * sh64-tdep.c (sh64_do_fp_register): Update.
9785         * regcache.c (regcache::dump): Update.
9786         * printcmd.c (print_scalar_formatted): Update.
9787         * infcmd.c (default_print_one_register_info): Update.
9788
9789 2017-06-12  Pedro Alves  <palves@redhat.com>
9790             Alan Hayward  <alan.hayward@arm.com>
9791
9792         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9793         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9794         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9795         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9796         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9797
9798 2017-06-12  Pedro Alves  <palves@redhat.com>
9799
9800         * dwarf2read.c (mapped_symtab::data): Now a vector of
9801         symtab_index_entry instead of vector of
9802         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9803         whether an element's name is NULL instead of checking whether the
9804         element itself is NULL.
9805         (find_slot): Change return type.  Adjust.
9806         (hash_expand, , add_index_entry, uniquify_cu_indices)
9807         (write_hash_table): Adjust.
9808
9809 2017-06-12  Pedro Alves  <palves@redhat.com>
9810
9811         * dwarf2read.c (recursively_count_psymbols): New function.
9812         (write_psymtabs_to_index): Call it to compute number of psyms and
9813         pass estimate size of psyms_seen to unordered_set's ctor.
9814
9815 2017-06-12  Pedro Alves  <palves@redhat.com>
9816
9817         * dwarf2read.c (write_hash_table): Check if key already exists
9818         before emplacing.
9819
9820 2017-06-12  Pedro Alves  <palves@redhat.com>
9821
9822         * dwarf2read.c (data_buf::append_space): Rename to...
9823         (data_buf::grow): ... this, and make private.  Adjust all callers.
9824         (data_buf::append_uint): New method.
9825         (add_address_entry, write_one_signatured_type)
9826         (write_psymtabs_to_index): Use it.
9827
9828 2017-06-12  Pedro Alves  <palves@redhat.com>
9829
9830         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9831         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9832         (data_buf::file_write): Call ::fwrite directly.
9833
9834 2017-06-12  Pedro Alves  <palves@redhat.com>
9835
9836         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9837         std::vector::erase.
9838
9839 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9840
9841         Code cleanup: C++ify .gdb_index producer.
9842         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9843         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9844         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9845         (create_strtab, add_string): Remove.
9846         (file_write, data_buf): New.
9847         (struct symtab_index_entry): Use std::vector for cu_indices.
9848         (struct mapped_symtab): Use std::vector for data.
9849         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9850         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9851         Remove.
9852         (find_slot): Change return type.  Update it to the new data structures.
9853         (hash_expand, add_index_entry): Update it to the new data structures.
9854         (offset_type_compare): Remove.
9855         (uniquify_cu_indices): Update it to the new data structures.
9856         (c_str_view, c_str_view_hasher, vector_hasher): New.
9857         (add_indices_to_cpool): Remove.
9858         (write_hash_table): Update it to the new data structures.
9859         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9860         (eq_psymtab_cu_index): Remove.
9861         (psym_index_map): New typedef.
9862         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9863         reference and std::unordered_map for cu_index_htab.
9864         (add_address_entry, add_address_entry_worker, write_address_map)
9865         (write_psymbols): Update it to the new data structures.
9866         (write_obstack): Remove.
9867         (struct signatured_type_index_data): Change types_list to a data_buf
9868         reference and psyms_seen to a std::unordered_set reference.
9869         (write_one_signatured_type, recursively_write_psymbols)
9870         (write_psymtabs_to_index): Update it to the new data structures.
9871
9872 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9873
9874         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9875         separate-debug-file commands.
9876         * symfile.h (separate_debug_file_debug): New global.
9877         * symfile.c (separate_debug_file_debug): New global.
9878         (separate_debug_file_exists, find_separate_debug_file): Add
9879         debug output.
9880         (_initialize_symfile): Add "set debug separate-debug-file"
9881         command.
9882         * build-id.c (build_id_to_debug_bfd,
9883         find_separate_debug_file_by_buildid): Add debug output.
9884
9885 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9886
9887         * gdbarch.sh (displaced_step_free_closure): Remove.
9888         * gdbarch.h, gdbarch.c: Re-generate.
9889         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9890         displaced_step_free_closure.
9891         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9892         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9893         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9894         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9895         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9896         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9897         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9898         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9899         * infrun.c (displaced_step_clear): Call xfree instead of
9900         gdbarch_displaced_step_free_closure.
9901
9902 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9903
9904         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9905         NULL".
9906
9907 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9908
9909         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9910         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9911         (mn10300_push_dummy_call): Likewise.
9912
9913 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9914
9915         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9916
9917 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9918
9919         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9920
9921 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9922
9923         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9924         able to start inferiors using a shell.
9925         (New remote packets): Announce new packet "QStartupWithShell".
9926         * remote.c: Add PACKET_QStartupWithShell.
9927         (extended_remote_create_inferior): Handle new
9928         PACKET_QStartupWithShell.
9929         (remote_protocol_features) <QStartupWithShell>: New entry for
9930         PACKET_QStartupWithShell.
9931         (_initialize_remote): Call "add_packet_config_cmd" for
9932         QStartupShell.
9933
9934 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9935             Pedro Alves  <palves@redhat.com>
9936
9937         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9938         and "nat/fork-inferior.h".
9939         * common/common-inferior.h: New file, with contents from
9940         "gdb/inferior.h".
9941         * commom/common-utils.c: Include "common-utils.h".
9942         (stringify_argv): New function.
9943         * common/common-utils.h (stringify_argv): New prototype.
9944         * configure.nat: Add "fork-inferior.o" as a dependency for
9945         "*linux*", "fbsd*" and "nbsd*" hosts.
9946         * corefile.c (get_exec_file): Update comment.
9947         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9948         instead of "startup_inferior".
9949         (darwin_create_inferior): Call "add_thread_silent" after
9950         "fork_inferior".
9951         * fork-child.c: Cleanup unnecessary includes.
9952         (SHELL_FILE): Move to "common/common-fork-child.c".
9953         (environ): Likewise.
9954         (exec_wrapper): Initialize.
9955         (get_exec_wrapper): New function.
9956         (breakup_args): Move to "common/common-fork-child.c"; rename to
9957         "breakup_args_for_exec".
9958         (escape_bang_in_quoted_argument): Move to
9959         "common/common-fork-child.c".
9960         (saved_ui): New variable.
9961         (prefork_hook): New function.
9962         (postfork_hook): Likewise.
9963         (postfork_child_hook): Likewise.
9964         (gdb_startup_inferior): Likewise.
9965         (fork_inferior): Move to "common/common-fork-child.c".  Update
9966         function to support gdbserver.
9967         (startup_inferior): Likewise.
9968         * gdbcore.h (get_exec_file): Remove declaration.
9969         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9970         instead of "startup_inferior".  Call "add_thread_silent" after
9971         "fork_inferior".
9972         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9973         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9974         instead of "startup_inferior".  Call "add_thread_silent" after
9975         "fork_inferior".
9976         * inferior.h: Include "common-inferior.h".
9977         (trace_start_error): Move to "common/common-utils.h".
9978         (trace_start_error_with_name): Likewise.
9979         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9980         (startup_inferior): Likewise.
9981         (gdb_startup_inferior): New prototype.
9982         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9983         * nat/fork-inferior.h: New file.
9984         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9985         instead of "startup_inferior".  Call "add_thread_silent" after
9986         "fork_inferior".
9987         * target.h (target_terminal_init): Move prototype to
9988         "target/target.h".
9989         (target_terminal_inferior): Likewise.
9990         (target_terminal_ours): Likewise.
9991         * target/target.h (target_terminal_init): New prototype, moved
9992         from "target.h".
9993         (target_terminal_inferior): Likewise.
9994         (target_terminal_ours): Likewise.
9995         * utils.c (gdb_flush_out_err): New function.
9996
9997 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9998
9999         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10000         * common/common-gdbthread.h: New file, with parts from
10001         "gdb/gdbthread.h".
10002         * gdbthread.h: Include "common-gdbthread.h".
10003         (switch_to_thread): Moved to "common/common-gdbthread.h".
10004
10005 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10006
10007         * Makefile.in (SFILES): Add "common/job-control.c".
10008         (HFILES_NO_SRCDIR): Add "common/job-control.h".
10009         (COMMON_OBS): Add "job-control.o".
10010         * common/job-control.c: New file, with contents from
10011         "gdb/inflow.c".
10012         * common/job-control.h: New file, with contents from "terminal.h".
10013         * fork-child.c: Include "job-control.h".
10014         * inflow.c: Include "job-control.h".
10015         (gdb_setpgid): Move to "common/common-inflow.c".
10016         (_initialize_inflow): Move setting of "job_control" to
10017         "handle_job_control".
10018         * terminal.h (job_control): Moved to "common/common-terminal.h".
10019         (gdb_setpgid): Likewise.
10020         * top.c: Include "job_control.h".
10021         * utils.c: Likewise.
10022         (job_control): Moved to "job-control.c".
10023
10024 2017-06-07  Pedro Alves  <palves@redhat.com>
10025
10026         * Makefile.in (SFILES): Add gdb_regex.c.
10027         (COMMON_OBS): Add gdb_regex.o.
10028         * ada-lang.c (ada_add_standard_exceptions)
10029         (ada_add_exceptions_from_frame, name_matches_regex)
10030         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10031         parameter type to compiled_regex.  Adjust.
10032         (ada_exceptions_list): Use compiled_regex.
10033         * break-catch-throw.c (exception_catchpoint::pattern): Now a
10034         std::unique_ptr<compiled_regex>.
10035         (exception_catchpoint::~exception_catchpoint): Remove regfree
10036         call.
10037         (check_status_exception_catchpoint): Adjust to use compiled_regex.
10038         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10039         * breakpoint.c (solib_catchpoint::compiled): Now a
10040         std::unique_ptr<compiled_regex>.
10041         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10042         (check_status_catch_solib): Adjust to use compiled_regex.
10043         (add_solib_catchpoint): Adjust to use compiled_regex.
10044         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10045         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10046         compiled_regex reference.  Adjust to use it.
10047         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10048         declaration.  Include "gdb_regex.h".
10049         (apropos_cmd): Change regex parameter to compiled_regex reference.
10050         * gdb_regex.c: New file.
10051         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10052         declarations.
10053         (class compiled_regex): New.
10054         * linux-tdep.c: Include "common/gdb_optional.h".
10055         (struct mapping_regexes): New, factored out from
10056         mapping_is_anonymous_p, and adjusted to use compiled_regex.
10057         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10058         gdb::optional and remove cleanups.  Adjust to compiled_regex.
10059         * probe.c: Include "common/gdb_optional.h".
10060         (collect_probes): Use compiled_regex and gdb::optional and remove
10061         cleanups.
10062         * skip.c: Include "common/gdb_optional.h".
10063         (skiplist_entry::compiled_function_regexp): Now a
10064         gdb::optional<compiled_regex>.
10065         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10066         (free_skiplist_entry): Remove regfree call.
10067         (compile_skip_regexp, skip_rfunction_p): Adjust to use
10068         compiled_regex and gdb::optional.
10069         * symtab.c: Include "common/gdb_optional.h".
10070         (search_symbols): Use compiled_regex and gdb::optional.
10071         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10072         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
10073         to gdb_regex.c.
10074
10075 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10076
10077         * regcache.c (regcache::save): Avoid buffer use.
10078         (regcache::dump): Likewise.
10079
10080 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10081
10082         * sh-tdep.c (sh_pseudo_register_read): Remove
10083         MAX_REGISTER_SIZE.
10084         (sh_pseudo_register_write): Likewise.
10085         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10086         (sh64_pseudo_register_write): Likewise
10087
10088 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10089
10090         * aarch64-tdep.c (aarch64_store_return_value): Use
10091         V_REGISTER_SIZE.
10092         (aarch64_pseudo_read_value): Likewise.
10093         (aarch64_pseudo_write): Likewise.
10094
10095 2017-06-06  Yao Qi  <yao.qi@linaro.org>
10096
10097         * regformats/regdef.h (set_register_cache): Remove the
10098         declaration.
10099
10100 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
10101
10102         * frame.c (frame_unwind_register_signed): Use
10103         frame_unwind_register_value.
10104
10105 2017-06-06  Pedro Alves  <palves@redhat.com>
10106
10107         PR breakpoints/21553
10108         * breakpoint.c (create_breakpoints_sal_default)
10109         (init_breakpoint_sal, create_breakpoint_sal): Use
10110         gdb::unique_xmalloc_ptr for string parameters.
10111         (create_breakpoint): Constify 'extra_string' and 'cond_string'
10112         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
10113         (base_breakpoint_create_breakpoints_sal)
10114         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10115         (strace_marker_create_breakpoints_sal)
10116         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10117         string parameters.
10118         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10119         gdb::unique_xmalloc_ptr for string parameters.
10120         (create_breakpoint): Constify 'extra_string' and 'cond_string'
10121         parameters.
10122
10123 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
10124
10125         * alpha-tdep.c (alpha_register_to_value): Use
10126         get_frame_register_value.
10127         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10128
10129 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
10130
10131         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10132         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10133         (ia64_value_to_register): Likewise.
10134         (ia64_extract_return_value): Likewise.
10135         (ia64_store_return_value): Likewise.
10136         (ia64_push_dummy_call): Likewise.
10137
10138 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
10139
10140         GDB 8.0 released.
10141
10142 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
10143
10144         * x86-linux-nat.c (struct arch_lwp_info): Remove.
10145
10146 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
10147
10148         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10149         parameter.
10150         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10151
10152 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
10153
10154         * event-loop.c (poll_timers): Unallocate timer using delete
10155         instead of xfree.
10156
10157 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10158
10159         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10160         (struct breakpoint) <~breakpoint>: New.
10161         (struct watchpoint): Inherit from breakpoint.
10162         <~watchpoint>: New.
10163         <base>: Remove.
10164         (struct tracepoint): Inherit from breakpoint.
10165         <base>: Remove.
10166         * breakpoint.c (longjmp_breakpoint_ops): Remove.
10167         (struct longjmp_breakpoint): Inherit from breakpoint.
10168         <~longjmp_breakpoint>: New.
10169         <base>: Remove.
10170         (new_breakpoint_from_type): Remove casts.
10171         (watchpoint_in_thread_scope): Remove reference to base field.
10172         (watchpoint_del_at_next_stop): Likewise.
10173         (update_watchpoint): Likewise.
10174         (watchpoint_check): Likewise.
10175         (bpstat_check_watchpoint): Likewise.
10176         (set_longjmp_breakpoint): Likewise.
10177         (struct fork_catchpoint): Inherit from breakpoint.
10178         <base>: Remove.
10179         (struct solib_catchpoint): Inherit from breakpoint.
10180         <~solib_catchpoint>: New.
10181         <base>: Remove.
10182         (dtor_catch_solib): Change to ...
10183         (solib_catchpoint::~solib_catchpoint): ... this.
10184         (breakpoint_hit_catch_solib): Remove reference to base field.
10185         (add_solib_catchpoint): Likewise.
10186         (create_fork_vfork_event_catchpoint): Likewise.
10187         (struct exec_catchpoint): Inherit from breakpoint.
10188         <~exec_catchpoint>: New.
10189         <base>: Remove.
10190         (dtor_catch_exec): Change to ...
10191         (exec_catchpoint::~exec_catchpoint): ... this.
10192         (dtor_watchpoint): Change to ...
10193         (watchpoint::~watchpoint): ... this.
10194         (watch_command_1): Remove reference to base field.
10195         (catch_exec_command_1): Likewise.
10196         (base_breakpoint_dtor): Change to ...
10197         (breakpoint::~breakpoint): ... this.
10198         (base_breakpoint_ops): Remove dtor field value.
10199         (longjmp_bkpt_dtor): Change to ...
10200         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10201         (strace_marker_create_breakpoints_sal): Remove reference to base
10202         field.
10203         (delete_breakpoint): Don't manually call breakpoint destructor.
10204         (create_tracepoint_from_upload): Remove reference to base field.
10205         (trace_pass_set_count): Likewise.
10206         (initialize_breakpoint_ops): Don't initialize
10207         momentary_breakpoint_ops, don't set dtors.
10208         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10209         <~ada_catchpoint>: New.
10210         <base>: Remove.
10211         (create_excep_cond_exprs): Remove reference to base field.
10212         (dtor_exception): Change to ...
10213         (ada_catchpoint::~ada_catchpoint): ... this.
10214         (dtor_catch_exception): Remove.
10215         (dtor_catch_exception_unhandled): Remove.
10216         (dtor_catch_assert): Remove.
10217         (create_ada_exception_catchpoint): Remove reference to base
10218         field.
10219         (initialize_ada_catchpoint_ops): Don't set dtors.
10220         * break-catch-sig.c (struct signal_catchpoint): Inherit from
10221         breakpoint.
10222         <~signal_catchpoint>: New.
10223         <base>: Remove.
10224         (signal_catchpoint_dtor): Change to ...
10225         (signal_catchpoint::~signal_catchpoint): ... this.
10226         (create_signal_catchpoint): Remove reference to base field.
10227         (initialize_signal_catchpoint_ops): Don't set dtor.
10228         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10229         from breakpoint.
10230         <~syscall_catchpoint>: New.
10231         <base>: Remove.
10232         (dtor_catch_syscall): Change to ...
10233         (syscall_catchpoint::~syscall_catchpoint): ... this.
10234         (create_syscall_event_catchpoint): Remove reference to base
10235         field.
10236         (initialize_syscall_catchpoint_ops): Don't set dtor.
10237         * break-catch-throw.c (struct exception_catchpoint): Inherit
10238         from breakpoint.
10239         <~exception_catchpoint>: New.
10240         <base>: Remove.
10241         (dtor_exception_catchpoint): Change to ...
10242         (exception_catchpoint::~exception_catchpoint): ... this.
10243         (handle_gnu_v3_exceptions): Remove reference to base field.
10244         (initialize_throw_catchpoint_ops): Don't set dtor.
10245         * ctf.c (ctf_get_traceframe_address): Remove reference to base
10246         field.
10247         * remote.c (remote_get_tracepoint_status): Likewise.
10248         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10249         * tracefile.c (tracefile_fetch_registers): Likewise.
10250         * tracepoint.c (actions_command): Likewise.
10251         (validate_actionline): Likewise.
10252         (tfind_1): Likewise.
10253         (get_traceframe_location): Likewise.
10254         (find_matching_tracepoint_location): Likewise.
10255         (parse_tracepoint_status): Likewise.
10256         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10257
10258 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10259
10260         * breakpoint.c (struct longjmp_breakpoint): New struct.
10261         (is_tracepoint_type): Change return type to bool.
10262         (is_longjmp_type): New function.
10263         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10264         (set_raw_breakpoint_without_location): Use
10265         new_breakpoint_from_type.
10266         (set_raw_breakpoint): Likewise.
10267
10268 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10269
10270         * breakpoint.c (new_breakpoint_from_type): New function.
10271         (create_breakpoint_sal): Use new_breakpoint_from_type and
10272         unique_ptr.
10273         (create_breakpoint): Likewise.
10274
10275 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
10276
10277         * memattr.c (mem_info_command): Rename to ...
10278         (info_mem_command): ... this.
10279         (mem_enable_command): Rename to ...
10280         (enable_mem_command): ... this.
10281         (mem_disable_command): Rename to ...
10282         (disable_mem_command): ... this.
10283         (mem_delete_command): Rename to ...
10284         (delete_mem_command): ... this.
10285         (_initialize_mem): Adjust function names.
10286
10287 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10288
10289         * btrace.c (handle_pt_insn_events): New.
10290         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
10291         STATUS.  Split into this and ...
10292         (handle_pt_insn_event_flags): ... this.
10293
10294 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10295
10296         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10297         and struct pt_insn.resynced.
10298         * configure: Regenerated.
10299         * config.in: Regenerated.
10300
10301 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10302
10303         * btrace.c (ftrace_find_call_by_number): New function.
10304         (ftrace_new_function): Store objects, not pointers.
10305         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10306         ftrace_new_gap, ftrace_update_function,
10307         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10308         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10309         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10310         btrace_ends_with_single_insn, btrace_call_get): Account for
10311         btrace_thread_info::functions now storing objects.
10312         * btrace.h (struct btrace_thread_info): Add constructor.
10313         (struct btrace_thread_info) <functions>: Make std::vector.
10314         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10315         Initialize with default values.
10316         * record-btrace.c (record_btrace_frame_sniffer): Account for
10317         btrace_thread_info::functions now storing objects.
10318
10319 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10320
10321         * btrace.c: Remove typedef bfun_s.
10322         (ftrace_new_gap): Directly add gaps to the list of gaps.
10323         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10324         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10325         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10326         instead of gdb VEC.
10327
10328 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10329
10330         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10331         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10332         with btrace_thread_info::next_segment and
10333         btrace_thread_info::prev_segment.
10334         * btrace.h: Remove struct btrace_func_link.
10335         (struct btrace_function): Replace pair of function segment pointers
10336         with pair of indices.
10337         * python/py-record-btrace.c (btpy_call_prev_sibling,
10338         btpy_call_next_sibling): Replace references to
10339         btrace_thread_info::segment with btrace_thread_info::next_segment and
10340         btrace_thread_info::prev_segment.
10341         * record-btrace.c (record_btrace_frame_this_id): Use
10342         btrace_find_call_by_number.
10343
10344 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10345
10346         * btrace.c (ftrace_new_function, ftrace_fixup_level,
10347         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10348         btrace_insn_next, btrace_insn_prev): Remove references to
10349         btrace_thread_info::flow.
10350         * btrace.h (struct btrace_function): Remove FLOW.
10351
10352 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10353
10354         * btrace.c (ftrace_find_call_by_number): New function.
10355         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10356         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10357         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10358         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10359         index.
10360         * btrace.h (struct btrace_function): Turn UP into an index.
10361         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10362         as an index.
10363         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10364         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10365         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10366
10367 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10368
10369         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10370         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10371         ftrace_update_function, ftrace_compute_global_level_offset,
10372         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10373         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10374         btrace_insn_end, btrace_is_empty): Remove references to
10375         btrace_thread_info::begin and btrace_thread_info::end.
10376         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10377         (struct btrace_thread_info) <functions>: Adjust comment.
10378         * record-btrace.c (record_btrace_start_replaying): Remove reference to
10379         btrace_thread_info::begin.
10380
10381 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10382
10383         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10384         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10385         ftrace_update_function): Remove arguments that implicitly were always
10386         BTINFO->END.
10387         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10388         Don't pass BTINFO->END.
10389
10390 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10391
10392         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10393         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10394         btrace_find_insn_by_number): Replace function segment pointer with
10395         index.
10396         (btrace_insn_cmp): Simplify.
10397         * btrace.h: (struct btrace_insn_iterator) Rename index to
10398         insn_index.  Replace function segment pointer with index into function
10399         segment vector.
10400         * record-btrace.c (record_btrace_call_history): Replace function
10401         segment pointer use with index.
10402         (record_btrace_frame_sniffer): Retrieve function call segment through
10403         vector.
10404         (record_btrace_set_replay): Remove defunc't safety check.
10405
10406 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10407
10408         * btrace.c (btrace_ends_with_single_insn): New function.
10409         (btrace_call_get, btrace_call_number, btrace_call_begin,
10410         btrace_call_end, btrace_call_next, btrace_call_prev,
10411         btrace_find_call_by_number): Use index into call segment vector
10412         instead of pointer.
10413         (btrace_call_cmp): Simplify.
10414         * btrace.h (struct btrace_call_iterator): Replace function call segment
10415         pointer with index into vector.
10416         * record-btrace.c (record_btrace_call_history): Use index instead of
10417         pointer.
10418
10419 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10420
10421         * btrace.c (btrace_insn_begin, btrace_insn_end,
10422         btrace_find_insn_by_number): Add btinfo to iterator.
10423         * btrace.h (struct btrace_insn_iterator): Add btinfo.
10424
10425 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10426
10427         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10428         and save pointers directly.
10429         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10430         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10431         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
10432         changed signature of functions.
10433         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10434         (btrace_fetch): Remove code that adds btrace_function pointers to
10435         vector of btrace_functions.
10436         (btrace_clear): Simplify freeing vector of btrace_functions.
10437
10438 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10439
10440         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10441         Replace VEC_* with std::vector functions.
10442         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10443         (struct btrace_thread_info)<functions>: Change type to std::vector.
10444
10445 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
10446
10447         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
10448         "Removed targets and native configurations" up.  Merge duplicate
10449         "New commands" sub-sections.  Add "New options" sub-sections.
10450
10451 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
10452
10453         * defs.h (copy_integer_to_size): New declaration.
10454         * findvar.c (copy_integer_to_size): New function.
10455         (do_cint_test): New selftest function.
10456         (copy_integer_to_size_test): Likewise.
10457         (_initialize_findvar): Likewise.
10458         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10459         (mips_fbsd_collect_reg): Use raw_collect_integer.
10460         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10461         (mips64_fill_gregset): Use raw_collect_integer
10462         (mips64_fill_fpregset): Use raw_supply_integer.
10463         * regcache.c (regcache::raw_supply_integer): New function.
10464         (regcache::raw_collect_integer): Likewise.
10465         * regcache.h: (regcache::raw_supply_integer): New declaration.
10466         (regcache::raw_collect_integer): Likewise.
10467
10468 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10469
10470         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10471         (COMMON_OBS): Add gdbarch-selftests.o.
10472         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10473         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10474         * gdbarch-selftests.c: New file.
10475         * regcache.h (regcache) <~regcache>: Mark it virtual if
10476         GDB_SELF_TEST.
10477         <raw_write>: Likewise.
10478
10479 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10480
10481         * regcache.c (current_regcache): Change it to
10482         regcache::current_regcache.
10483         (regcache_observer_target_changed): Update.
10484         (regcache_thread_ptid_changed): Make it a regcache static
10485         method.
10486         (regcache_thread_ptid_changed): Update.
10487         (class regcache_access): New.
10488         (current_regcache_test): Update.
10489         (_initialize_regcache): Update.
10490         * regcache.h: Include forward_list.
10491         (regcache): Declare regcache_thread_ptid_changed and declare
10492         registers_changed_ptid as friend.
10493
10494 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10495
10496         * i387-tdep.c (i387_register_to_value): Use register_size
10497         instead of TYPE_LENGTH.
10498         * m68k-tdep.c (m68k_register_to_value): Likewise.
10499
10500 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10501
10502         * i387-tdep.c (i387_convert_register_p): Return false if type
10503         code isn't TYPE_CODE_FLT.
10504
10505 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10506
10507         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10508         length is 4.
10509         (alpha_register_to_value): Remove type length check.
10510         (alpha_value_to_register): Likewise.
10511
10512 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10513
10514         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10515         TYPE_CODE_FLT.
10516
10517 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10518
10519         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10520         TYPE_CODE_FLT or not.
10521
10522 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10523
10524         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10525         * avr-tdep.c (avr_gdbarch_init): Likewise.
10526         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10527         * cris-tdep.c (cris_gdbarch_init): Likewise.
10528         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10529         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10530         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10531         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10532         * mep-tdep.c (mep_gdbarch_init): Likewise.
10533         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10534         * mips-tdep.c (mips_gdbarch_init): Likewise.
10535         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10536         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10537         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10538         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10539         * v850-tdep.c (v850_gdbarch_init): Likewise.
10540
10541 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10542
10543         * selftest-arch.c (tests_with_arch): Call registers_changed
10544         and reinit_frame_cache.
10545         * selftest.c (run_self_tests): Likewise.
10546
10547 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10548
10549         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10550         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10551
10552 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10553
10554         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10555         set_gdbarch_print_insn.
10556
10557 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10558
10559         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10560         set_gdbarch_print_insn.
10561
10562 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10563
10564         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10565         set_gdbarch_print_insn.
10566         * arc-tdep.c (arc_gdbarch_init): Likewise.
10567         * arch-utils.c: include dis-asm.h.
10568         (default_print_insn): New function.
10569         * arch-utils.h (default_print_insn): Declare.
10570         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10571         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10572         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10573         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10574         * frv-tdep.c (frv_gdbarch_init): Likewise.
10575         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10576         * gdbarch.sh (print_insn): Use default_print_insn.
10577         * gdbarch.c: Regenerated.
10578         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10579         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10580         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10581         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10582         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10583         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10584         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10585         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10586         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10587         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10588         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10589         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10590         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10591         * mt-tdep.c (mt_gdbarch_init): Likewise.
10592         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10593         * nios2-tdep.c (nios2_print_insn): Remove.
10594         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10595         * rx-tdep.c (rx_gdbarch_init): Likewise.
10596         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10597         * score-tdep.c (score_print_insn): Remove.
10598         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10599         * sh-tdep.c (sh_gdbarch_init): Likewise.
10600         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10601         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10602         * tic6x-tdep.c (tic6x_print_insn): Remove.
10603         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10604         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10605         * v850-tdep.c (v850_gdbarch_init): Likewise.
10606         * vax-tdep.c (vax_gdbarch_init): Likewise.
10607         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10608         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10609
10610 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10611
10612         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10613         (MIPS_FP0_REGNUM): Remove.
10614         (MIPS_FSR_REGNUM): Remove.
10615         (mips_fbsd_supply_fpregs): Use mips_regnum.
10616         (mips_fbsd_supply_gregs): Likewise.
10617         (mips_fbsd_collect_fpregs): Likewise.
10618         (mips_fbsd_collect_gregs): Likewise.
10619
10620 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10621
10622         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10623         (getpfpregs_supplies): New function.
10624         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10625         getfpregs_supplies.
10626         (mips_fbsd_store_inferior_registers): Likewise.
10627
10628 2017-05-22  Pedro Alves <palves@redhat.com>
10629
10630         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10631         maintainer.
10632
10633 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10634
10635         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10636         (store_register): Likewise.
10637         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10638         (get_decimal_float_return_value): Likewise.
10639         (do_ppc_sysv_return_value): Likewise.
10640         (ppc64_sysv_abi_push_integer): Likewise.
10641         (ppc64_sysv_abi_push_freg): Likewise.
10642         (ppc64_sysv_abi_return_value_base): Likewise.
10643         (ppc64_sysv_abi_return_value): Likewise.
10644         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10645         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10646         * rs6000-nat.c: Likewise.
10647         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10648         (rs6000_value_to_register): Likewise.
10649         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10650
10651 2017-05-21  Tom Tromey  <tom@tromey.com>
10652
10653         PR rust/21466:
10654         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10655         arrays as "[T]", not "[T; ]".
10656
10657 2017-05-19  Tom Tromey  <tom@tromey.com>
10658
10659         PR rust/21484:
10660         * rust-lang.c (exp_descriptor_rust): New function.
10661         (rust_language_defn): Use it.
10662         * p-lang.c (pascal_language_defn): Update.
10663         * opencl-lang.c (opencl_language_defn): Update.
10664         * objc-lang.c (objc_language_defn): Update.
10665         * m2-lang.c (m2_language_defn): Update.
10666         * language.h (struct language_defn)
10667         <la_watch_location_expression>: New member.
10668         * language.c (unknown_language_defn, auto_language_defn)
10669         (local_language_defn): Update.
10670         * go-lang.c (go_language_defn): Update.
10671         * f-lang.c (f_language_defn): Update.
10672         * d-lang.c (d_language_defn): Update.
10673         * c-lang.h (c_watch_location_expression): Declare.
10674         * c-lang.c (c_watch_location_expression): New function.
10675         (c_language_defn, cplus_language_defn, asm_language_defn)
10676         (minimal_language_defn): Use it.
10677         * breakpoint.c (watch_command_1): Call
10678         la_watch_location_expression.
10679         * ada-lang.c (ada_language_defn): Update.
10680
10681 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10682
10683         PR tui/21482
10684         * gdb_curses.h (NOMACROS): Define.
10685         (NCURSES_NOMACROS): Define.
10686
10687 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10688
10689         PR tui/21482
10690         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10691         arg to char *.
10692         * tui/tui-wingeneral.c (box_win): Likewise.
10693         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10694         (tui_show_source_line): Likewise.
10695         (tui_show_exec_info_content): Likewise.
10696
10697 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10698
10699         * sparc-tdep.c (sparc_structure_return_p)
10700         (sparc_arg_on_registers_p): New functions.
10701         (sparc32_store_arguments): Use them.
10702         * sparc64-tdep.c (sparc64_16_byte_align_p)
10703         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10704         Handle TYPE_CODE_ARRAY.
10705
10706 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10707
10708         * cli/cli-decode.c (add_alias_cmd): New function.
10709         * command.h (add_alias_cmd): Declare.
10710         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10711         instead call add_alias_cmd.
10712
10713 2017-05-17  Pedro Alves  <palves@redhat.com>
10714
10715         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10716         (nat_makefile_frag): ... this.  All references updated.
10717         * configure.ac: Likewise.
10718         * configure.nat: Likewise.  Enhance comments.
10719         * configure: Regenerate.
10720
10721 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10722
10723         * procfs.c (procfs_create_inferior): Change prototype to match
10724         definition.
10725
10726 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10727
10728         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10729         C++ compiler warning.
10730
10731 2017-05-12  Tom Tromey  <tom@tromey.com>
10732
10733         PR rust/21483:
10734         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10735         recurse, just call value_struct_elt directly.
10736
10737 2017-05-12  Tom Tromey  <tom@tromey.com>
10738
10739         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10740         OP_RUST_ARRAY>: Fix.
10741
10742 2017-05-12  Tom Tromey  <tom@tromey.com>
10743
10744         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10745
10746 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10747
10748         * regcache.c: Include <forward_list>.
10749         (struct regcache_list): Remove.
10750         (current_regcache): Update.
10751         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10752         (regcache_thread_ptid_changed): Likewise.
10753         (registers_changed_ptid): Likewise.
10754         (current_regcache_size): Likewise.
10755
10756 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10757
10758         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10759         (current_regcache_size): New function.
10760         (current_regcache_test): New function.
10761         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10762
10763 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10764
10765         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10766         (print_gp_register_row): Use get_frame_register_value.
10767
10768 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10769
10770         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10771         (mips_supply_fpregset): Likewise.
10772         (mips64_supply_gregset): Likewise.
10773
10774 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10775
10776         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10777         regcache->raw_supply_zeroed.
10778
10779 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10780
10781         * configure.nat: Rearrange 'case' statements to match
10782         host before cpu.
10783
10784 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10785
10786         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10787         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10788         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10789         "@nat_extra_makefile_frag@".
10790         (Makefile): Remove dependency on "@frags@".
10791         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10792         (data-directory/Makefile): Likewise.
10793         * config/aarch64/linux.mh: Deleted; moved contents to
10794         "gdb/configure.nat".
10795         * config/alpha/alpha-linux.mh: Likewise.
10796         * config/alpha/nbsd.mh: Likewise.
10797         * config/arm/linux.mh: Likewise.
10798         * config/arm/nbsdelf.mh: Likewise.
10799         * config/i386/cygwin.mh: Likewise.
10800         * config/i386/cygwin64.mh: Likewise.
10801         * config/i386/darwin.mh: Likewise.
10802         * config/i386/fbsd.mh: Likewise.
10803         * config/i386/fbsd64.mh: Likewise.
10804         * config/i386/go32.mh: Likewise.
10805         * config/i386/i386gnu.mh: Likewise.
10806         * config/i386/i386sol2.mh: Likewise.
10807         * config/i386/linux.mh: Likewise.
10808         * config/i386/linux64.mh: Likewise.
10809         * config/i386/mingw.mh: Likewise.
10810         * config/i386/mingw64.mh: Likewise.
10811         * config/i386/nbsd64.mh: Likewise.
10812         * config/i386/nbsdelf.mh: Likewise.
10813         * config/i386/nto.mh: Likewise.
10814         * config/i386/obsd.mh: Likewise.
10815         * config/i386/obsd64.mh: Likewise.
10816         * config/i386/sol2-64.mh: Likewise.
10817         * config/ia64/linux.mh: Likewise.
10818         * config/m32r/linux.mh: Likewise.
10819         * config/m68k/linux.mh: Likewise.
10820         * config/m68k/nbsdelf.mh: Likewise.
10821         * config/m68k/obsd.mh: Likewise.
10822         * config/m88k/obsd.mh: Likewise.
10823         * config/mips/fbsd.mh: Likewise.
10824         * config/mips/linux.mh: Likewise.
10825         * config/mips/nbsd.mh: Likewise.
10826         * config/mips/obsd64.mh: Likewise.
10827         * config/pa/linux.mh: Likewise.
10828         * config/pa/nbsd.mh: Likewise.
10829         * config/pa/obsd.mh: Likewise.
10830         * config/powerpc/aix.mh: Likewise.
10831         * config/powerpc/fbsd.mh: Likewise.
10832         * config/powerpc/linux.mh: Likewise.
10833         * config/powerpc/nbsd.mh: Likewise.
10834         * config/powerpc/obsd.mh: Likewise.
10835         * config/powerpc/ppc64-linux.mh: Likewise.
10836         * config/powerpc/spu-linux.mh: Likewise.
10837         * config/s390/linux.mh: Likewise.
10838         * config/sh/nbsd.mh: Likewise.
10839         * config/sparc/fbsd.mh: Likewise.
10840         * config/sparc/linux.mh: Likewise.
10841         * config/sparc/linux64.mh: Likewise.
10842         * config/sparc/nbsd64.mh: Likewise.
10843         * config/sparc/nbsdelf.mh: Likewise.
10844         * config/sparc/obsd64.mh: Likewise.
10845         * config/sparc/sol2.mh: Likewise.
10846         * config/tilegx/linux.mh: Likewise.
10847         * config/vax/nbsdelf.mh: Likewise.
10848         * config/vax/obsd.mh: Likewise.
10849         * config/xtensa/linux.mh: Likewise.
10850         * config/i386/i386gnu.mn: New file, with excerpts from
10851         "config/i386/i386gnu.mh".
10852         * configure: Regenerate.
10853         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10854         *.mh files under "gdb/config".
10855         * configure.nat: New file, with contents from the
10856         "gdb/config/*/*.mh" files.
10857
10858 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10859
10860         * btrace.c (btrace_clear): Free insn vector.
10861
10862 2017-05-05  Pedro Alves  <palves@redhat.com>
10863
10864         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10865         * configure: Regenerate.
10866
10867 2017-05-04  Pedro Alves  <palves@redhat.com>
10868
10869         * Makefile.in (SFILES): Add progspace-and-thread.c.
10870         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10871         (COMMON_OBS): Add progspace-and-thread.o.
10872         * breakpoint.c: Include "progspace-and-thread.h".
10873         (update_inserted_breakpoint_locations)
10874         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10875         Use scoped_restore_current_pspace_and_thread.
10876         (create_std_terminate_master_breakpoint): Use
10877         scoped_restore_current_program_space.
10878         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10879         (print_breakpoint_location): Use
10880         scoped_restore_current_program_space.
10881         (bp_loc_is_permanent): Use
10882         scoped_restore_current_pspace_and_thread.
10883         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10884         (download_tracepoint_locations): Use
10885         scoped_restore_current_pspace_and_thread.
10886         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10887         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10888         (enum step_over_calls_kind): Moved from inferior.h.
10889         (class scoped_restore_current_thread): New class.
10890         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10891         declaration.
10892         (scoped_restore_current_thread): New class.
10893         * infcmd.c: Include "common/gdb_optional.h".
10894         (continue_1, proceed_after_attach): Use
10895         scoped_restore_current_thread.
10896         (notice_new_inferior): Use scoped_restore_current_thread.
10897         * inferior.c: Include "progspace-and-thread.h".
10898         (restore_inferior, save_current_inferior): Delete.
10899         (add_inferior_command, clone_inferior_command): Use
10900         scoped_restore_current_pspace_and_thread.
10901         * inferior.h (scoped_restore_current_inferior): New class.
10902         * infrun.c: Include "progspace-and-thread.h" and
10903         "common/gdb_optional.h".
10904         (follow_fork_inferior): Use
10905         scoped_restore_current_pspace_and_thread.
10906         (scoped_restore_exited_inferior): New class.
10907         (handle_vfork_child_exec_or_exit): Use
10908         scoped_restore_exited_inferior,
10909         scoped_restore_current_pspace_and_thread,
10910         scoped_restore_current_thread and scoped_restore.
10911         (fetch_inferior_event): Use scoped_restore_current_thread.
10912         * linespec.c (decode_line_full, decode_line_1): Use
10913         scoped_restore_current_program_space.
10914         * mi/mi-main.c: Include "progspace-and-thread.h".
10915         (exec_continue): Use scoped_restore_current_thread.
10916         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10917         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10918         * proc-service.c (ps_pglobal_lookup): Use
10919         scoped_restore_current_program_space.
10920         * progspace-and-thread.c: New file.
10921         * progspace-and-thread.h: New file.
10922         * progspace.c (release_program_space, clone_program_space): Use
10923         scoped_restore_current_program_space.
10924         (restore_program_space, save_current_program_space)
10925         (save_current_space_and_thread): Delete.
10926         (switch_to_program_space_and_thread): Moved to
10927         progspace-and-thread.c.
10928         * progspace.h (save_current_program_space)
10929         (save_current_space_and_thread): Delete declarations.
10930         (scoped_restore_current_program_space): New class.
10931         * remote.c (remote_btrace_maybe_reopen): Use
10932         scoped_restore_current_thread.
10933         * symtab.c: Include "progspace-and-thread.h".
10934         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10935         * thread.c (print_thread_info_1): Use
10936         scoped_restore_current_thread.
10937         (struct current_thread_cleanup): Delete.
10938         (do_restore_current_thread_cleanup)
10939         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10940         (scoped_restore_current_thread::~scoped_restore_current_thread):
10941         ... this new dtor.
10942         (make_cleanup_restore_current_thread): Rename/convert to ...
10943         (scoped_restore_current_thread::scoped_restore_current_thread):
10944         ... this new ctor.
10945         (thread_apply_all_command): Use scoped_restore_current_thread.
10946         (thread_apply_command): Use scoped_restore_current_thread.
10947         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10948         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10949
10950 2017-05-04  Pedro Alves  <palves@redhat.com>
10951
10952         * thread.c (make_cleanup_restore_current_thread): Move
10953         find_thread_ptid call before the is_stopped call.  Assert that the
10954         thread is found.  Replace is_stopped call by checking the thread's
10955         state directly.  Remove unnecessary NULL-thread check.
10956
10957 2017-05-04  Pedro Alves  <palves@redhat.com>
10958
10959         * corelow.c (thread_section_name): New class.
10960         (get_core_register_section, get_core_siginfo): Use it.
10961
10962 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10963
10964         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10965         (get_core_register_section): Remove xfree of NULL pointer.
10966
10967 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10968
10969         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10970         * regcache.c (regcache::raw_supply_zeroed): New function.
10971         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10972
10973 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10974
10975         * gdbarch.sh: Remove commented out definition of
10976         TARGET_CHAR_BIT.
10977         * gdbarch.h: Re-generate.
10978
10979 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10980
10981         * configure: Regenerate.
10982
10983 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10984
10985         * solib-target.c (solib_target_relocate_section_addresses):
10986         Remove num_section_bases, num_bases, segment_bases variables.
10987
10988 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10989
10990         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10991
10992 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10993
10994         * solib-target.c: Include <vector>
10995         (struct lm_info_target) <~lm_info_target>: Remove.
10996         <segment_bases, section_bases>: Change type to
10997         std::vector<CORE_ADDR>.
10998         (library_list_start_segment, library_list_start_section,
10999         library_list_end_library,
11000         solib_target_relocate_section_addresses): Adjust.
11001
11002 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11003
11004         * gdbarch.sh (software_single_step): Change return type to
11005         std::vector<CORE_ADDR>.
11006         * gdbarch.c, gdbarch.h: Re-generate.
11007         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11008         Adjust.
11009         (arm_deal_with_atomic_sequence_raw): Adjust.
11010         (thumb_get_next_pcs_raw): Adjust.
11011         (arm_get_next_pcs_raw): Adjust.
11012         (arm_get_next_pcs): Adjust.
11013         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11014         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11015         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11016         (alpha_software_single_step): Adjust.
11017         * alpha-tdep.h (alpha_software_single_step): Adjust.
11018         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11019         * arm-tdep.c (arm_software_single_step): Adjust.
11020         (arm_breakpoint_kind_from_current_state): Adjust.
11021         * arm-tdep.h (arm_software_single_step): Adjust.
11022         * breakpoint.c (insert_single_step_breakpoint): Adjust.
11023         * cris-tdep.c (cris_software_single_step): Adjust.
11024         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11025         (micromips_deal_with_atomic_sequence): Adjust.
11026         (deal_with_atomic_sequence): Adjust.
11027         (mips_software_single_step): Adjust.
11028         * mips-tdep.h (mips_software_single_step): Adjust.
11029         * moxie-tdep.c (moxie_software_single_step): Adjust.
11030         * nios2-tdep.c (nios2_software_single_step): Adjust.
11031         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11032         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11033         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11034         * s390-linux-tdep.c (s390_software_single_step): Adjust.
11035         * sparc-tdep.c (sparc_software_single_step): Adjust.
11036         * spu-tdep.c (spu_software_single_step): Adjust.
11037         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11038
11039 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11040
11041         * gdbarch.sh: Use semi-colon as field separator instead of colon.
11042         * gdbarch.h: Re-generate.
11043
11044 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11045
11046         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11047         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11048         * python/py-instruction.c, python/py-instruction.h: New file.
11049         * python/py-record.c: Add py-instruction.h include.
11050         (gdbpy_initialize_record): Make gdb.Instruction a super class of
11051         gdb.RecordInstruction.
11052         * python/python-internal.h: Add gdbpy_initialize_instruction
11053         declaration.
11054         * python/python.c (do_start_initialization): Add
11055         gdbpy_initialize_instruction.
11056
11057 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11058
11059         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11060         Remove.
11061         (btrace_func_from_recpy_func): New function.
11062         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11063         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11064         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11065         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11066         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11067         Also, use new helper functions.
11068         (btpy_list_item): Use new helper functions.
11069         (recpy_bt_function_call_history): Use new type name.
11070         (btpy_call_getset): Remove.
11071         (gdbpy_initialize_btrace): Remove code to initialize
11072         gdb.BtraceFunctionCall.
11073         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11074         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11075         recpy_bt_func_prev, recpy_bt_func_next): New export.
11076         * python/py-record.c (recpy_func_type): New static object.
11077         (recpy_func_new, recpy_func_level, recpy_func_symbol,
11078         recpy_func_instructions, recpy_func_up, recpy_func_prev,
11079         recpy_func_next): New function.
11080         (recpy_element_hash, recpy_element_richcompare): Updated comment.
11081         (recpy_func_getset): New static object.
11082         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11083         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11084
11085 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11086
11087         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11088         (btpy_object, btpy_insn_type, btpy_new): Remove.
11089         (btpy_list_object): Use gdb.RecordInstruction type instead of
11090         gdb.BtraceInstruction type.
11091         (btrace_insn_from_recpy_insn): New function.
11092         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11093         btpy_new.
11094         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11095         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11096         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11097         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11098         instead of btpy_object.
11099         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11100         btpy_insn_data, btpy_insn_decode): Rename to ...
11101         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11102         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11103         recpy_bt_insn_decode): This.  Also, use new helper functions.
11104         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11105         recpy_insn_type.
11106         (btpy_insn_getset): Remove.
11107         (gdbpy_initialize_btrace): Remove code to initialize
11108         gdb.BtraceInstruction.  Use recpy_element_object.
11109         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11110         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11111         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11112         * python/py-record.c (recpy_insn_type): New static object.
11113         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11114         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11115         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11116         New function.
11117         (recpy_insn_getset): New static object.
11118         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11119         * python/py-record.h (recpy_element_object): New typedef.
11120         (recpy_insn_type, recpy_insn_new): New export.
11121
11122 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11123
11124         * py-record-btrace.c (btpy_insn_new): Removed.
11125         (btpy_insn_or_gap_new): New function.
11126         (btpy_insn_error): Removed.
11127         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11128         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11129         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11130         btpy_insn_or_gap_new instead of btpy_insn_new.
11131         (btpy_insn_getset): Remove btpy_insn_error.
11132         * py-record.c (recpy_gap_type): New static object.
11133         (recpy_gap_object): New typedef.
11134         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11135         recpy_gap_reason_string): New function.
11136         (recpy_gap_getset): New static object.
11137         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11138         * py-record.h (recpy_gap_new): New export.
11139
11140 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11141
11142         * python/py-record.c (recpy_ptid): Remove.
11143         (recpy_record_getset): Remove recpy_ptid.
11144
11145 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11146
11147         * btrace.c (btrace_fetch): Set inferior_ptid.
11148         * python/py-record-btrace.c: Add "py-record.h" include.
11149         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11150         recpy_bt_end, recpy_bt_instruction_history,
11151         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11152         in gdb.Record object instead of current ptid.
11153         * python/py-record.c: Include new "py-record.h" file.
11154         (recpy_record_object): Moved to py-record.h.
11155         * python/py-record.h: New file.
11156
11157 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11158
11159         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11160         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11161         indentation.
11162
11163 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
11164
11165         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11166         the past maintainers section.
11167
11168 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11169
11170         * infcmd.c (get_return_value): Use regcache ctor, and remove
11171         cleanup.
11172
11173 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11174             Pedro Alves  <palves@redhat.com>
11175
11176         * regcache.c (regcache::regcache): New tag dispatch ctor.
11177         (do_cooked_read): Moved above.
11178         (regcache_dup): Use the tag dispatch ctor..
11179         * regcache.h (regcache): Declare ctor, delete copy ctor and
11180         assignment operator, remove friend regcache_dup.
11181
11182 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11183
11184         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11185         call method save instead of regcache_cpy.
11186         * regcache.h (struct regcache): Make regcache_dup a friend.
11187
11188 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11189
11190         * regcache.c (struct regcache): Move to regcache.h
11191         (regcache::arch): New method.
11192         (regcache_get_ptid): Update.
11193         (get_regcache_arch): Call arch method.
11194         (get_regcache_aspace): Call method aspace.
11195         (register_buffer): Change it to method.
11196         (regcache_save): Change it to regcache::save.
11197         (regcache_restore): Likewise.
11198         (regcache_cpy_no_passthrough): Remove the declaration.
11199         (regcache_cpy): Call methods restore and cpy_no_passthrough.
11200         (regcache_cpy_no_passthrough): Change it to method
11201         cpy_no_passthrough.
11202         (regcache_register_status): Change it to method
11203         get_register_status.
11204         (regcache_invalidate): Change it to method invalidate.
11205         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11206         (regcache_raw_update): Change it to method raw_update.
11207         (regcache_raw_read): Likewise.
11208         (regcache_raw_read_signed): Likewise.
11209         (regcache_raw_read_unsigned): Likewise.
11210         (regcache_raw_write_signed): Likewise.
11211         (regcache_raw_write_unsigned): Likewise.
11212         (regcache_cooked_read): Likewise.
11213         (regcache_cooked_read_value): Likewise.
11214         (regcache_cooked_read_signed): Likewise.
11215         (regcache_cooked_read_unsigned): Likewise.
11216         (regcache_cooked_write_signed): Likewise.
11217         (regcache_cooked_write_unsigned): Likewise.
11218         (regcache_raw_set_cached_value): Likewise.
11219         (regcache_raw_write): Likewise.
11220         (regcache_cooked_write): Likewise.
11221         (regcache_xfer_part): Likewise.
11222         (regcache_raw_read_part): Likewise.
11223         (regcache_raw_write_part): Likewise.
11224         (regcache_cooked_read_part): Likewise.
11225         (regcache_cooked_write_part): Likewise.
11226         (regcache_raw_supply): Likewise.
11227         (regcache_raw_collect): Likewise.
11228         (regcache_transfer_regset): Likewise.
11229         (regcache_supply_regset): Likewise.
11230         (regcache_collect_regset): Likewise.
11231         (regcache_debug_print_register): Likewise.
11232         (enum regcache_dump_what): Move it to regcache.h.
11233         (regcache_dump): Change it to method dump.
11234         * regcache.h (enum regcache_dump_what): New.
11235         (class regcache): New.
11236         * target.c (target_fetch_registers): Call method
11237         debug_print_register.
11238         (target_store_registers): Likewise.
11239
11240 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11241
11242         * windows-nat.c (struct lm_info_windows): Initialize field.
11243         (windows_make_so): Allocate lm_info_windows with new.
11244         (windows_free_so): Free lm_info_windows with delete.
11245
11246 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11247
11248         * solib-darwin.c (struct lm_info_darwin): Initialize field.
11249         (darwin_current_sos): Allocate lm_info_darwin with new, remove
11250         cleanup.
11251         (darwin_free_so): Free lm_info_darwin with delete.
11252
11253 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11254
11255         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11256         <l_addr_p>: Change type to bool.
11257         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11258         (svr4_free_so): Free lm_info_svr4 with delete.
11259         (svr4_copy_library_list): Replace memcpy with call to copy
11260         constructor.
11261         (library_list_start_library, svr4_default_sos): Allocate
11262         lm_info_svr4 with new.
11263
11264 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11265
11266         * solib-target.c (struct lm_info_target): Add destructor,
11267         initialize fields.
11268         <name>: Change type to std::string.
11269         (library_list_start_library): Allocate lm_info_target with new.
11270         (solib_target_free_library_list): Free lm_info_target with
11271         delete.
11272         (solib_target_current_sos): Adapt to std::string.
11273         (solib_target_free_so): Free lm_info_target with delete.
11274
11275 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11276
11277         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11278         fields.
11279         (frv_current_sos): Allocate lm_info_frv with new.
11280         (frv_relocate_main_executable): Free lm_info_frv with delete,
11281         allocate with new.
11282         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11283
11284 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11285
11286         * solib-frv.c (struct lm_info_frv): Fix indentation.
11287
11288 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11289
11290         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11291         map field.
11292         (dsbt_current_sos): Allocate lm_info_dsbt with new.
11293         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11294         and allocate with new.
11295         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11296
11297 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11298
11299         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11300         <filename, member_name>: Change type to std::string.
11301         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11302         (library_list_start_library): Allocate lm_info_aix with new.
11303         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11304         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11305         with copy constructor.
11306
11307 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11308
11309         * solist.h (struct lm_info): Remove.
11310         (struct lm_info_base): New class.
11311         (struct so_list) <lm_info>: Change type to lm_info_base *.
11312         * nto-tdep.c (struct lm_info): Remove.
11313         (lm_addr): Adjust.
11314         * solib-aix.c (struct lm_info): Rename to ...
11315         (struct lm_info_aix): ... this.  Extend lm_info_base.
11316         (lm_info_p): Rename to ...
11317         (lm_info_aix_p): ... this, and adjust.
11318         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11319         solib_aix_parse_libraries, library_list_start_library,
11320         solib_aix_free_library_list, solib_aix_parse_libraries,
11321         solib_aix_get_library_list,
11322         solib_aix_relocate_section_addresses, solib_aix_free_so,
11323         solib_aix_get_section_offsets,
11324         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11325         Adjust.
11326         (struct solib_aix_inferior_data) <library_list>: Adjust.
11327         * solib-darwin.c (struct lm_info): Rename to ...
11328         (struct lm_info_darwin): ... this.  Extend lm_info_base.
11329         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11330         * solib-dsbt.c (struct lm_info): Rename to ...
11331         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
11332         (struct dsbt_info) <main_executable_lm_info): Adjust.
11333         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11334         dsbt_relocate_section_addresses): Adjust.
11335         * solib-frv.c (struct lm_info): Rename to ...
11336         (struct lm_info_frv): ... this.  Extend lm_info_base.
11337         (main_executable_lm_info): Adjust.
11338         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11339         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11340         find_canonical_descriptor_in_load_object,
11341         frv_fdpic_find_canonical_descriptor): Adjust.
11342         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11343         to lm_info_svr4.
11344         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11345         svr4_clear_so, svr4_copy_library_list,
11346         library_list_start_library, svr4_default_sos, svr4_read_so_list,
11347         svr4_current_sos, svr4_fetch_objfile_link_map,
11348         solist_update_incremental): Adjust.
11349         * solib-svr4.h (struct lm_info_svr4): Move here from
11350         solib-svr4.c.
11351         * solib-target.c (struct lm_info): Rename to ...
11352         (struct lm_info_target): ... this.  Extend lm_info_base.
11353         (lm_info_p): Rename to ...
11354         (lm_info_target_p): ... this.
11355         (solib_target_parse_libraries, library_list_start_segment,
11356         library_list_start_section, library_list_start_library,
11357         library_list_end_library, solib_target_free_library_list,
11358         solib_target_current_sos, solib_target_free_so,
11359         solib_target_relocate_section_addresses): Adjust.
11360         * windows-nat.c (struct lm_info): Rename to ...
11361         (struct lm_info_windows): ... this.  Extend lm_info_base.
11362         (windows_make_so, handle_load_dll, handle_unload_dll,
11363         windows_xfer_shared_libraries): Adjust.
11364
11365 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11366
11367         * solib-darwin.c (struct darwin_so_list): Remove.
11368         (darwin_current_sos): Allocate an so_list object instead of a
11369         darwin_so_list, separately allocate an lm_info object.
11370         (darwin_free_so): Free lm_info.
11371
11372 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
11373
11374         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11375         with fprintf_filtered.
11376
11377 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11378
11379         * regcache.c (regcache::regcache): New function.
11380         (regcache::~regcache): New function.
11381         (regcache_xmalloc_1): Remove.
11382         (regcache_xmalloc): Call new regcache.
11383         (regcache_xfree): Call delete regcache.
11384         (get_thread_arch_aspace_regcache): Call new regcache.
11385
11386 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11387
11388         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11389         lwp instead of ptid_get_lwp.
11390
11391 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11392
11393         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11394         lwp_info instead of getting from inferior_ptid.
11395
11396 2017-04-27  Keith Seitz  <keiths@redhat.com>
11397
11398         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11399         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11400         (CV_CONVERSION_BADNESS): Define.
11401         (rank_one_type): Remove overly restrictive rvalue reference
11402         rank checks.
11403         Add cv-qualifier checks and subranks for type equality.
11404         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11405         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11406         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11407
11408 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
11409
11410         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11411         count when creating the object.
11412
11413 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
11414             Ulrich Weigand  <uweigand@de.ibm.com>
11415
11416         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11417         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11418         is used in AIX.
11419         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11420         (process_xcoff_symbol): Likewise.
11421         (scan_xcoff_symtab): Likewise.
11422
11423 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11424
11425         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11426         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11427         (ia64_access_reg): Use get_frame_register_unsigned.
11428         (ia64_access_rse_reg): Likewise.
11429         (ia64_libunwind_frame_prev_register): Likewise.
11430
11431 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
11432
11433         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11434         * gdbarch.c: Regenerated.
11435         * gdbarch.h: Regenerated.
11436         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11437         visibility external.
11438         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11439         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11440         (enum cfa_how_kind): Move to ...
11441         (struct dwarf2_frame_state_reg_info): Likewise.
11442         (struct dwarf2_frame_state): Likewise.
11443         * dwarf2-frame.h: ... here.
11444         (dwarf2_frame_state_alloc_regs): New declaration.
11445         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11446         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11447
11448 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11449
11450         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11451         regcache_raw_read_unsigned.
11452         (xtensa_pseudo_register_write): Likewise.
11453
11454 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11455
11456         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11457         (nds32_pseudo_register_write): Likewise.
11458
11459 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11460
11461         * regcache.c (struct regcache) <readonly_p>: Change its type
11462         to bool.
11463         (regcache_xmalloc_1): Update parameter type and callers update.
11464
11465 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11466
11467         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11468         set_gdbarch_wchar_bit.
11469         * arm-tdep.c (arm_gdbarch_init): Likewise.
11470
11471 2017-04-25  Pedro Alves  <palves@redhat.com>
11472
11473         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11474         (BothAreRelocatable, memcopy, memmove): Don't define.
11475         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11476         macros.
11477
11478 2017-04-25  Pedro Alves  <palves@redhat.com>
11479
11480         * common/common-defs.h: Include "common/poison.h".
11481         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11482         and adjust.
11483         * common/poison.h: New file.
11484         * common/traits.h: Include <type_traits>.
11485         (Not, Or, Requires): New, moved from common/function-view.h.
11486
11487 2017-04-25  Pedro Alves  <palves@redhat.com>
11488
11489         * breakpoint.h (struct breakpoint): In-class initialize all
11490         fields.  Make boolean fields "bool".
11491         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11492         memset call and initializations no longer necessary.
11493
11494 2017-04-25  Pedro Alves  <palves@redhat.com>
11495
11496         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11497         reference.
11498         (pt_btrace_insn): New function.
11499         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11500
11501 2017-04-25  Pedro Alves  <palves@redhat.com>
11502
11503         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11504         "base" field and inherit from "bp_location" instead.  Add
11505         non-default ctor.
11506         (allocate_location_exception): Use new non-default ctor.
11507         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11508         (init_bp_location): Convert to ...
11509         (bp_location::bp_location): ... this new ctor, and remove memset
11510         call.
11511         (base_breakpoint_allocate_location): Use the new non-default ctor.
11512         * breakpoint.h (bp_location): Now a class.  Declare default and
11513         non-default ctors.  In-class initialize all members.
11514         (init_bp_location): Remove declaration.
11515
11516 2017-04-25  Pedro Alves  <palves@redhat.com>
11517
11518         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11519         assignment operator.
11520
11521 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11522
11523         * doublest.c (convert_doublest_to_floatformat): Call
11524         floatformat_totalsize_bytes.
11525
11526 2017-04-22  Tom Tromey  <tom@tromey.com>
11527
11528         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11529         ui_out_emit_list.
11530         * stack.c (print_frame): Use ui_out_emit_list.
11531         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11532         ui_out_emit_list.
11533         * mi/mi-main.c (print_one_inferior)
11534         (mi_cmd_data_list_register_names)
11535         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11536         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11537         ui_out_emit_list.
11538         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11539         (mi_output_solib_attribs): Use ui_out_emit_list,
11540         ui_out_emit_tuple.
11541         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11542         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11543         (mi_cmd_stack_list_args, list_args_or_locals): Use
11544         ui_out_emit_list.
11545         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11546         * breakpoint.c (print_solib_event, output_thread_groups): Use
11547         ui_out_emit_list.
11548
11549 2017-04-22  Tom Tromey  <tom@tromey.com>
11550
11551         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11552         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11553         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11554
11555 2017-04-22  Tom Tromey  <tom@tromey.com>
11556
11557         * tracepoint.c (tvariables_info_1)
11558         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11559
11560 2017-04-22  Tom Tromey  <tom@tromey.com>
11561
11562         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11563         annotate_arg_emitter.
11564         * breakpoint.c (print_mention_watchpoint)
11565         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11566         * annotate.h (struct annotate_arg_emitter): New.
11567
11568 2017-04-22  Tom Tromey  <tom@tromey.com>
11569
11570         * record-btrace.c (record_btrace_insn_history)
11571         (record_btrace_insn_history_range, record_btrace_call_history)
11572         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11573         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11574         ui_out_emit_tuple.
11575         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11576         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11577         * skip.c (skip_info): Use ui_out_emit_tuple.
11578         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11579         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11580         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11581         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11582         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11583         ui_out_emit_tuple.
11584         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11585         (output_register, mi_cmd_data_read_memory)
11586         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11587         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11588         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11589         Use ui_out_emit_tuple.
11590         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11591         ui_out_emit_tuple.
11592         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11593         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11594         * linux-thread-db.c (info_auto_load_libthread_db): Use
11595         ui_out_emit_tuple.
11596         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11597         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11598         * disasm.c (do_mixed_source_and_assembly_deprecated)
11599         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11600         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11601         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11602         * breakpoint.c (print_one_breakpoint_location)
11603         (print_one_breakpoint): Use ui_out_emit_tuple.
11604         * auto-load.c (print_script, info_auto_load_cmd): Use
11605         ui_out_emit_tuple.
11606         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11607
11608 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11609
11610         * thread.c (print_thread_info_1): Remove dead code.
11611
11612 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11613
11614         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11615         GDB_SELF_TEST.
11616         * arm-tdep.c (selftests::arm_record_test): Likewise.
11617
11618 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11619
11620         * regcache.c (regcache_restore): Remove argument 2.  Replace
11621         argument 3 with regcache.  Get register status from
11622         src->register_status and get register contents from
11623         register_buffer (src, regnum).
11624         (regcache_cpy): Update.
11625
11626 2017-04-19  Pedro Alves  <palves@redhat.com>
11627
11628         * gdbthread.h (thread): Add missing closing parenthesis in
11629         comment.
11630
11631 2017-04-19  Pedro Alves  <palves@redhat.com>
11632
11633         * common/refcounted-object.h: New file.
11634         * gdbthread.h: Include "common/refcounted-object.h".
11635         (thread_info): Inherit from refcounted_object and add comments.
11636         (thread_info::incref, thread_info::decref)
11637         (thread_info::m_refcount): Delete.
11638         (thread_info::deletable): Use the refcounted_object::refcount()
11639         method.
11640         * inferior.c (current_inferior_): Add comment.
11641         (set_current_inferior): Increment/decrement refcounts.
11642         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11643         not-deletable instead of comparing with the current inferior.
11644         (initialize_inferiors): Increment the initial inferior's refcount.
11645         * inferior.h (struct inferior): Forward declare.
11646         Include "common/refcounted-object.h".
11647         (current_inferior, set_current_inferior): Move declaration to
11648         before struct inferior's definition, and fix comment.
11649         (inferior): Inherit from refcounted_object.  Add comments.
11650         * thread.c (switch_to_thread_no_regs): Reference the thread's
11651         inferior pointer directly instead of doing a ptid lookup.
11652         (switch_to_no_thread): New function.
11653         (switch_to_thread(thread_info *)): New function, factored out
11654         from ...
11655         (switch_to_thread(ptid_t)): ... this.
11656         (restore_current_thread): Delete.
11657         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11658         fields, and add 'inf' field.
11659         (do_restore_current_thread_cleanup): Check whether old->inf is
11660         alive instead of looking up an inferior by ptid.  Use
11661         switch_to_thread and switch_to_no_thread.
11662         (restore_current_thread_cleanup_dtor): Use old->inf directly
11663         instead of lookup up an inferior by id.  Decref the inferior.
11664         Don't restore 'removable'.
11665         (make_cleanup_restore_current_thread): Same the inferior pointer
11666         in old, instead of the inferior number.  Incref the inferior.
11667         Don't save/clear 'removable'.
11668
11669 2017-04-19  Pedro Alves  <palves@redhat.com>
11670
11671         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11672         unittests/scoped_restore-selftests.c.
11673         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11674         * common/scoped_restore.h (scoped_restore_base): Make "class".
11675         (scoped_restore_base::release): New public method.
11676         (scoped_restore_base::scoped_restore_base): New protected ctor.
11677         (scoped_restore_base::m_saved_var): New protected field.
11678         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11679         scoped_restore_base base class instead of m_saved_var directly.
11680         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11681         (scoped_restore_tmpl::scoped_restore_tmpl(const
11682         scoped_restore_tmpl<T>&)): Likewise.
11683         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11684         method.
11685         (scoped_restore_tmpl::saved_var): New method.
11686         (scoped_restore_tmpl::m_saved_var): Delete.
11687         * inferior.h (inferior::detaching): Now a bool.
11688         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11689         cleanup.
11690         * unittests/scoped_restore-selftests.c: New file.
11691
11692 2017-04-19  Pedro Alves  <palves@redhat.com>
11693
11694         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11695         Re-sort in alphabetic order.
11696
11697 2017-04-18  Pedro Alves  <palves@redhat.com>
11698
11699         * xml-support.c (obstack_xml_printf): Delete.
11700         * xml-support.h (obstack_xml_printf): Delete.
11701
11702 2017-04-18  Pedro Alves  <palves@redhat.com>
11703
11704         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11705         vdebug, verror, body_text, start_element, end_element, name,
11706         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11707         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11708         is_xinclude>: Make private and add m_ prefix.
11709         (gdb_xml_parser::body_text): New method, based on ...
11710         (gdb_xml_body_text): ... this.  Adjust.
11711         (gdb_xml_parser::vdebug): New method, based on ...
11712         (gdb_xml_debug): ... this.  Adjust.
11713         (gdb_xml_parser::verror): New method, based on ...
11714         (gdb_xml_error): ... this.  Adjust.
11715         (gdb_xml_parser::start_element): New method, based on ...
11716         (gdb_xml_start_element): ... this.  Adjust.
11717         (gdb_xml_start_element_wrapper): Defer to
11718         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11719         (gdb_xml_parser::end_element): New method, based on ...
11720         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11721         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11722         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11723         (gdb_xml_parser::use_dtd): New method, based on ...
11724         (gdb_xml_use_dtd): ... this.  Adjust.
11725         (gdb_xml_parser::parse): New method, based on ...
11726         (gdb_xml_parse): ... this.  Adjust.
11727         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11728         (xinclude_start_include): Adjust to call the parser's name method.
11729         (xml_xinclude_default, xml_xinclude_start_doctype)
11730         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11731         method.
11732         (xml_process_xincludes): Adjust to call parser methods.
11733         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11734         declarations.
11735
11736 2017-04-18  Pedro Alves  <palves@redhat.com>
11737
11738         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11739         gdb::optional<std::string>.
11740         * xml-support.c: Include <string>.
11741         (scope_level::scope_level(scope_level &&))
11742         (scope_level::~scope_level): Delete.
11743         (scope_level::body): Now a std::string.
11744         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11745         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11746         parameter.
11747         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11748         (xinclude_parsing_data::output): Now a std::string reference.
11749         (xinclude_start_include): Adjust.
11750         (xml_xinclude_default): Adjust.
11751         (xml_process_xincludes): Add 'output' parameter, and return bool.
11752         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11753         and return bool.
11754         * xml-tdesc.c: Include <unordered_map> and <string>.
11755         (tdesc_xml_cache): Delete.
11756         (tdesc_xml_cache_s): Delete.
11757         (xml_cache): Now an std::unordered_map.
11758         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11759         (target_fetch_description_xml): Change return type to
11760         gdb::optional<std::string>, and adjust.
11761         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11762         (target_fetch_description_xml): Change return type to
11763         gdb::optional<std::string>.
11764
11765 2017-04-18  Pedro Alves  <palves@redhat.com>
11766
11767         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11768         unittests/optional-selftests.c.
11769         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11770         * unittests/optional-selftests.c: New file.
11771         * unittests/optional/assignment/1.cc: New file.
11772         * unittests/optional/assignment/2.cc: New file.
11773         * unittests/optional/assignment/3.cc: New file.
11774         * unittests/optional/assignment/4.cc: New file.
11775         * unittests/optional/assignment/5.cc: New file.
11776         * unittests/optional/assignment/6.cc: New file.
11777         * unittests/optional/assignment/7.cc: New file.
11778         * unittests/optional/cons/copy.cc: New file.
11779         * unittests/optional/cons/default.cc: New file.
11780         * unittests/optional/cons/move.cc: New file.
11781         * unittests/optional/cons/value.cc: New file.
11782         * unittests/optional/in_place.cc: New file.
11783         * unittests/optional/observers/1.cc: New file.
11784         * unittests/optional/observers/2.cc: New file.
11785
11786 2017-04-18  Pedro Alves  <palves@redhat.com>
11787
11788         * common/gdb_optional.h: Include common/traits.h.
11789         (in_place_t): New type.
11790         (in_place): New constexpr variable.
11791         (optional::optional): Remove member initialization of
11792         m_instantiated.
11793         (optional::optional(in_place_t...)): New constructor.
11794         (optional::~optional): Use reset.
11795         (optional::optional(const optional&)): New.
11796         (optional::optional(const optional&&)): New.
11797         (optional::optional(T &)): New.
11798         (optional::optional(T &&)): New.
11799         (operator::operator=(const optional &)): New.
11800         (operator::operator=(optional &&)): New.
11801         (operator::operator= (const T &))
11802         (operator::operator= (T &&))
11803         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11804         (operator::reset): New.
11805         (operator::m_instantiated):: Add in-class initializer.
11806         * common/traits.h: Include <type_traits>.
11807         (struct And): New types.
11808
11809 2017-04-18  Pedro Alves  <palves@redhat.com>
11810
11811         * xml-support.c: Include <vector>.
11812         (scope_level::scope_level(const gdb_xml_element *))
11813         (scope_level::scope_level(scope_level&&)): New.
11814         (scope_level::~scope_level): New.
11815         (scope_level_s): Delete.
11816         (gdb_xml_parser::scopes): Now a std::vector.
11817         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11818         Use std::vector.
11819         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11820         scope cleanup code.
11821         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11822         of the scopes member.  Use std::vector::emplace_back.
11823
11824 2017-04-18  Pedro Alves  <palves@redhat.com>
11825
11826         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11827         a bool.
11828         (gdb_xml_end_element): Change type of first parameter.
11829         (gdb_xml_cleanup): Rename to ...
11830         (gdb_xml_parser::~gdb_xml_parser): ... this.
11831         (gdb_xml_create_parser_and_cleanup): Delete with ...
11832         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11833         to this new ctor.
11834         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11835         using gdb_xml_create_parser_and_cleanup.
11836         (xinclude_parsing_data): Add ctor/dtor.
11837         (xml_xinclude_cleanup): Delete.
11838         (xml_process_xincludes): Create a local xinclude_parsing_data
11839         instead of heap-allocating one.  Create a local gdb_xml_parser
11840         instead of heap-allocating one with
11841         gdb_xml_create_parser_and_cleanup.
11842
11843 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11844
11845         PR threads/20743
11846         * fbsd-nat.c (resume_one_thread_cb): Remove.
11847         (resume_all_threads_cb): Remove.
11848         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11849         iterate_over_threads.
11850
11851 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11852
11853         * NEWS: Create a new section for the next release branch.
11854         Rename the section of the current branch, now that it has
11855         been cut.
11856
11857 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11858
11859         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11860         * version.in: Bump version to 8.0.50.DATE-git.
11861
11862 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11863
11864         PR gdb/21385
11865         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11866         independently of the host, and fix build breakage on Cygwin.
11867
11868 2017-04-13  Pedro Alves  <palves@redhat.com>
11869
11870         * inferior.c (free_inferior): Convert to ...
11871         (inferior::~inferior): ... this dtor.
11872         (inferior::inferior): New ctor, factored out from ...
11873         (add_inferior_silent): ... here.  Allocate the inferior with a new
11874         expression.
11875         (delete_inferior): Call delete instead of free_inferior.
11876         * inferior.h (gdb_environ, continuation): Forward declare.
11877         (inferior): Now a class.  Add in-class initialization to all
11878         members.  Make boolean fields bool, except 'detaching'.
11879         (inferior::inferior): New explicit ctor.
11880         (inferior::~inferior): New.
11881
11882 2017-04-13  Pedro Alves  <palves@redhat.com>
11883
11884         * inferior.c (init_inferior_list): Delete.
11885         * inferior.h (init_inferior_list): Delete.
11886
11887 2017-04-13  Pedro Alves  <palves@redhat.com>
11888
11889         PR threads/13217
11890         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11891         (top level): Call it twice, with different thread sets.
11892
11893 2017-04-13  Pedro Alves  <palves@redhat.com>
11894
11895         * thread.c: Include <algorithm>.
11896         (thread_array_cleanup): Delete.
11897         (scoped_inc_dec_ref): New class.
11898         (live_threads_count): New function.
11899         (set_thread_refcount): Delete.
11900         (tp_array_compar_ascending): Now a bool.
11901         (tp_array_compar): Convert to a std::sort comparison function.
11902         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11903         and live_threads_count.
11904
11905 2017-04-13  Pedro Alves  <palves@redhat.com>
11906
11907         * infrun.c (follow_fork_inferior): Also switch the current
11908         inferior.
11909
11910 2017-04-13  Pedro Alves  <palves@redhat.com>
11911
11912         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11913         before calling create_internal_breakpoint.
11914
11915 2017-04-13  Pedro Alves  <palves@redhat.com>
11916
11917         * fork-child.c (execv_argv): New class.
11918         (breakup_args): Refactored as ...
11919         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11920         Copy arguments to storage and replace separators with NULL
11921         terminators in place.
11922         (escape_bang_in_quoted_argument): Adjust to return bool.
11923         (execv_argv::execv_argv): New ctor.
11924         (execv_argv::init_for_shell): New method, factored out from
11925         fork_inferior.  Don't strdup strings into the vector.
11926         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11927         Remove free_vector_argv call.
11928
11929 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11930
11931         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11932         tdep->rx_psw_type.
11933
11934 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11935
11936         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11937         * rx-tdep.c (rx_gdbarch_init): Likewise.
11938
11939 2017-04-13  Pedro Alves  <palves@redhat.com>
11940
11941         * breakpoint.h (struct breakpoint): Reindent.
11942
11943 2017-04-13  Pedro Alves  <palves@redhat.com>
11944
11945         * breakpoint.c (bp_location): Rename to ...
11946         (bp_locations): ... this.  All references updated.
11947         (bp_location_count): Rename to ...
11948         (bp_locations_count): ... this.  All references updated.
11949         (bp_location_placed_address_before_address_max): Rename to ...
11950         (bp_locations_placed_address_before_address_max): ... this.  All
11951         references updated.
11952         (bp_location_shadow_len_after_address_max): Rename to ...
11953         (bp_locations_shadow_len_after_address_max): ... this.  All
11954         references updated.
11955         (bp_location_compare_addrs): Rename to ...
11956         (bp_locations_compare_addrs): ... this.  All references updated.
11957         (bp_location_compare):Rename to ...
11958         (bp_locations_compare): ... this.  All references updated.
11959         (bp_location_target_extensions_update): Rename to ...
11960         (bp_locations_target_extensions_update): ... this.  All references
11961         updated.
11962
11963 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11964
11965         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11966         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11967         'sgtty.h'.
11968         * common/gdb_termios.h: New file, with parts of "terminal.h".
11969         * inflow.c: Include "gdb_termios.h".
11970         * ser-unix.c: Include "gdb_termios.h".
11971         * terminal.h: Move terminal-related defines to
11972         "common/gdb_termios.h".
11973
11974 2017-04-12  Tom Tromey  <tom@tromey.com>
11975
11976         * probe.c (parse_probes): Update.
11977         * location.h (delete_event_location): Don't declare.
11978         (event_location_deleter::operator()): Update.
11979         * location.c (event_location_deleter::operator()): Rename from
11980         delete_event_location.
11981         * linespec.h (linespec_result) <location>: Change type to
11982         event_location_up.
11983         * linespec.c (canonicalize_linespec, event_location_to_sals)
11984         (decode_objc): Update.
11985         (linespec_result): Don't call delete_event_location.
11986         * breakpoint.c (create_breakpoints_sal)
11987         (bkpt_probe_create_sals_from_location)
11988         (strace_marker_create_sals_from_location): Update.
11989
11990 2017-04-12  Tom Tromey  <tom@tromey.com>
11991
11992         * linespec.h (struct linespec_result): Add constructor and
11993         destructor.
11994         (init_linespec_result, destroy_linespec_result)
11995         (make_cleanup_destroy_linespec_result): Don't declare.
11996         * linespec.c (init_linespec_result): Remove.
11997         (linespec_result::~linespec_result): Rename from
11998         destroy_linespec_result.  Update.
11999         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12000         Remove.
12001         * breakpoint.c (create_breakpoint, break_range_command)
12002         (decode_location_default): Update.
12003         * ax-gdb.c (agent_command_1): Update.
12004
12005 2017-04-12  Tom Tromey  <tom@tromey.com>
12006
12007         * remote.c (remote_download_tracepoint): Update.
12008         * python/py-breakpoint.c (bppy_get_location): Update.
12009         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12010         (gdbscm_breakpoint_location): Update.
12011         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12012         * breakpoint.h (struct breakpoint) <location, location_range_end>:
12013         Change type to event_location_up.
12014         * breakpoint.c (create_overlay_event_breakpoint)
12015         (create_longjmp_master_breakpoint)
12016         (create_std_terminate_master_breakpoint)
12017         (create_exception_master_breakpoint)
12018         (breakpoint_event_location_empty_p, print_breakpoint_location)
12019         (print_one_breakpoint_location, create_thread_event_breakpoint)
12020         (init_breakpoint_sal, create_breakpoint)
12021         (print_recreate_ranged_breakpoint, break_range_command)
12022         (init_ada_exception_breakpoint, say_where): Update.
12023         (base_breakpoint_dtor): Don't call delete_event_location.
12024         (bkpt_print_recreate, tracepoint_print_recreate)
12025         (dprintf_print_recreate, update_static_tracepoint)
12026         (breakpoint_re_set_default): Update.
12027
12028 2017-04-12  Tom Tromey  <tom@tromey.com>
12029
12030         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12031         type of "to_do".  Update.
12032         (compute_stack_depth): Use std::vector.
12033
12034 2017-04-12  Tom Tromey  <tom@tromey.com>
12035
12036         * printcmd.c (find_instruction_backward): Use std::vector.
12037
12038 2017-04-12  Tom Tromey  <tom@tromey.com>
12039
12040         * symfile.c (objfilep): Remove typedef.
12041         (reread_symbols): Use a std::vector.
12042
12043 2017-04-12  Tom Tromey  <tom@tromey.com>
12044
12045         * mi/mi-main.c (exec_direction_forward): Remove.
12046         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12047         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12048         scoped_restore.
12049         * guile/guile.c (guile_repl_command, guile_command)
12050         (gdbscm_execute_gdb_command): Use scoped_restore.
12051         * go-exp.y (go_parse): Use scoped_restore.
12052         * d-exp.y (d_parse): Use scoped_restore.
12053         * cli/cli-decode.c (cmd_func): Use scoped_restore.
12054         * c-exp.y (c_parse): Use scoped_restore.
12055
12056 2017-04-12  Tom Tromey  <tom@tromey.com>
12057
12058         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12059         (mi_parse): Update return type.
12060         (mi_parse_free): Remove.
12061         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12062         (mi_parse::~mi_parse): Rename from mi_parse_free.
12063         (mi_parse_cleanup): Remove.
12064         (mi_parse): Return a unique_ptr.  Use new.
12065         * mi/mi-main.c (mi_execute_command): Update.
12066
12067 2017-04-12  Tom Tromey  <tom@tromey.com>
12068
12069         * location.c (explicit_location_lex_one): Return a
12070         unique_xmalloc_ptr.
12071         (string_to_explicit_location): Update.  Remove cleanups.
12072
12073 2017-04-12  Tom Tromey  <tom@tromey.com>
12074
12075         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12076         (compare_value_and_voffset): Change type.  Update.
12077         (compute_vtable_size): Change type of "offset_vec".
12078         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
12079         (gnuv3_get_typeid): Remove extraneous declaration.
12080
12081 2017-04-12  Tom Tromey  <tom@tromey.com>
12082
12083         * charset.h (wchar_iterator): Fix comment.
12084
12085 2017-04-12  Tom Tromey  <tom@tromey.com>
12086
12087         * charset.c (iconv_wrapper): New class.
12088         (cleanup_iconv): Remove.
12089         (convert_between_encodings): Use it.
12090
12091 2017-04-12  Tom Tromey  <tom@tromey.com>
12092
12093         * symfile.h (increment_reading_symtab): Update type.
12094         * symfile.c (decrement_reading_symtab): Remove.
12095         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12096         * psymtab.c (psymtab_to_symtab): Update.
12097         * dwarf2read.c (dw2_instantiate_symtab): Update.
12098
12099 2017-04-12  Tom Tromey  <tom@tromey.com>
12100
12101         * jit.c (struct jit_reader): Declare separately.  Add constructor
12102         and destructor.  Change type of "handle".
12103         (loaded_jit_reader): Define separately.
12104         (jit_reader_load): Update.  New "new".
12105         (jit_reader_unload_command): Use "delete".
12106         * gdb-dlfcn.h (struct dlclose_deleter): New.
12107         (gdb_dlhandle_up): New typedef.
12108         (gdb_dlopen, gdb_dlsym): Update types.
12109         (gdb_dlclose): Remove.
12110         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12111         (gdb_dlsym): Change type of "handle".
12112         (make_cleanup_dlclose): Remove.
12113         (dlclose_deleter::operator()): Rename from gdb_dlclose.
12114         * compile/compile-c-support.c (load_libcc): Update.
12115
12116 2017-04-12  Tom Tromey  <tom@tromey.com>
12117
12118         * symtab.h (find_pcs_for_symtab_line): Change return type.
12119         * symtab.c (find_pcs_for_symtab_line): Change return type.
12120         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12121         type of "vec".  Update.
12122         (ltpy_get_pcs_for_line): Update.
12123         * linespec.c (decode_digits_ordinary): Update.
12124
12125 2017-04-12  Tom Tromey  <tom@tromey.com>
12126
12127         * tracepoint.c (actions_command): Update.
12128         * python/python.c (python_command, python_interactive_command):
12129         Update.
12130         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12131         * guile/guile.c (guile_command): Update.
12132         * defs.h (read_command_lines, read_command_lines_1): Return
12133         command_line_up.
12134         (command_lines_deleter): New struct.
12135         (command_line_up): New typedef.
12136         * compile/compile.c (compile_code_command)
12137         (compile_print_command): Update.
12138         * cli/cli-script.h (get_command_line, copy_command_lines): Return
12139         command_line_up.
12140         (make_cleanup_free_command_lines): Remove.
12141         * cli/cli-script.c (get_command_line, read_command_lines_1)
12142         (copy_command_lines): Return command_line_up.
12143         (while_command, if_command, read_command_lines, define_command)
12144         (document_command): Update.
12145         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12146         Remove.
12147         * breakpoint.h (breakpoint_set_commands): Change type of
12148         "commands".
12149         * breakpoint.c (breakpoint_set_commands): Change type of
12150         "commands".  Update.
12151         (do_map_commands_command, update_dprintf_command_list)
12152         (create_tracepoint_from_upload): Update.
12153
12154 2017-04-12  Tom Tromey  <tom@tromey.com>
12155
12156         * tracepoint.c (scope_info): Update.
12157         * spu-tdep.c (spu_catch_start): Update.
12158         * python/python.c (gdbpy_decode_line): Update.
12159         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12160         * python/py-breakpoint.c (bppy_init): Update.
12161         * probe.c (parse_probes): Update.
12162         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12163         * location.h (event_location_deleter): New struct.
12164         (event_location_up): New typedef.
12165         (new_linespec_location, new_address_location, new_probe_location)
12166         (new_explicit_location, copy_event_location)
12167         (string_to_event_location, string_to_event_location_basic)
12168         (string_to_explicit_location): Update return type.
12169         (make_cleanup_delete_event_location): Remove.
12170         * location.c (new_linespec_location, new_address_location)
12171         (new_probe_location, new_explicit_location, copy_event_location):
12172         Return event_location_up.
12173         (delete_event_location_cleanup)
12174         (make_cleanup_delete_event_location): Remove.
12175         (string_to_explicit_location, string_to_event_location_basic)
12176         (string_to_event_location): Return event_location_up.
12177         * linespec.c (canonicalize_linespec, event_location_to_sals)
12178         (decode_line_with_current_source)
12179         (decode_line_with_last_displayed, decode_objc): Update.
12180         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12181         * completer.c (location_completer): Update.
12182         * cli/cli-cmds.c (edit_command, list_command): Update.
12183         * breakpoint.c (create_overlay_event_breakpoint)
12184         (create_longjmp_master_breakpoint)
12185         (create_std_terminate_master_breakpoint)
12186         (create_exception_master_breakpoint)
12187         (create_thread_event_breakpoint): Update.
12188         (init_breakpoint_sal): Update.  Remove some dead code.
12189         (create_breakpoint_sal): Change type of "location".  Update.
12190         (create_breakpoints_sal, create_breakpoint, break_command_1)
12191         (dprintf_command, break_range_command, until_break_command)
12192         (init_ada_exception_breakpoint)
12193         (strace_marker_create_sals_from_location)
12194         (update_static_tracepoint, trace_command, ftrace_command)
12195         (strace_command, create_tracepoint_from_upload): Update.
12196         * break-catch-throw.c (re_set_exception_catchpoint): Update.
12197         * ax-gdb.c (agent_command_1): Update.
12198
12199 2017-04-12  Pedro Alves  <palves@redhat.com>
12200
12201         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12202         * configure.tgt: Handle i[34567]86-*-go32* and
12203         i[34567]86-*-msdosdjgpp*.
12204         * i386-tdep.c (i386_svr4_reg_to_regnum):
12205         Make extern.
12206         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12207         i386-go32-tdep.c.
12208         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12209         * i386-go32-tdep.c: New file.
12210         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12211         declarations.
12212
12213 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
12214
12215         * aix-thread.c (pd_status2str): Change return type to const char *.
12216
12217 2017-04-12  Pedro Alves  <palves@redhat.com>
12218
12219         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12220         calls to set_gdbarch_gnu_triplet_regexp.
12221
12222 2017-04-12  Pedro Alves  <palves@redhat.com>
12223
12224         PR gdb/21323
12225         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12226         New enum value.
12227         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12228         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12229         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12230         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12231         * gdbarch.h, gdbarch.c: Regenerate.
12232         * aarch64-tdep.c (aarch64_gdbarch_init): Override
12233         gdbarch_wchar_bit and gdbarch_wchar_signed.
12234         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12235         * arm-tdep.c (arm_gdbarch_init): Likewise.
12236         * avr-tdep.c (avr_gdbarch_init): Likewise.
12237         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12238         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12239         * i386-tdep.c (i386_go32_init_abi): Likewise.
12240         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12241         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12242         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12243         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12244         * sh-tdep.c (sh_gdbarch_init): Likewise.
12245         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12246         * sparc64-tdep.c (sparc64_init_abi): Likewise.
12247         * windows-tdep.c (windows_init_abi): Likewise.
12248         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12249
12250 2017-04-12  Pedro Alves  <palves@redhat.com>
12251
12252         PR c++/21323
12253         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12254         cplus_primitive_type_char32_t>: New enum values.
12255         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12256         and cplus_primitive_type_char32_t.
12257         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12258         32, use the archtecture's built-in type for char16_t and char32_t,
12259         respectively.  Otherwise, fallback to init_integer_type as before,
12260         but make the type unsigned, and issue a complaint.
12261         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12262
12263 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
12264
12265         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12266         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12267
12268 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12269
12270         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12271         'const char *'.
12272
12273 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12274
12275         * common/common-utils.c (free_vector_argv): New function.
12276         * common/common-utils.h: Include <vector>.
12277         (free_vector_argv): New prototype.
12278         * darwin-nat.c (darwin_create_inferior): Rewrite function
12279         prototype in order to constify "exec_file" and accept a
12280         "std::string" for "allargs".
12281         * fork-child.c: Include <vector>.
12282         (breakup_args): Rewrite function, using C++.
12283         (fork_inferior): Rewrite function header, constify "exec_file_arg"
12284         and accept "std::string" for "allargs".  Update the code to
12285         calculate "argv" based on "allargs".  Update calls to "exec_fun"
12286         and "execvp".
12287         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12288         order to constify "exec_file" and accept a "std::string" for
12289         "allargs".
12290         * go32-nat.c (go32_create_inferior): Likewise.
12291         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12292         * infcmd.c (run_command_1): Constify "exec_file".  Use
12293         "std::string" for inferior arguments.
12294         * inferior.h (fork_inferior): Update prototype.
12295         * linux-nat.c (linux_nat_create_inferior): Rewrite function
12296         prototype in order to constify "exec_file" and accept a
12297         "std::string" for "allargs".
12298         * nto-procfs.c (procfs_create_inferior): Likewise.
12299         * procfs.c (procfs_create_inferior): Likewise.
12300         * remote-sim.c (gdbsim_create_inferior): Likewise.
12301         * remote.c (extended_remote_run): Update code to accept
12302         "std::string" as argument.
12303         (extended_remote_create_inferior): Rewrite function prototype in
12304         order to constify "exec_file" and accept a "std::string" for
12305         "allargs".
12306         * rs6000-nat.c (super_create_inferior): Likewise.
12307         (rs6000_create_inferior): Likewise.
12308         * target.h (struct target_ops) <to_create_inferior>: Likewise.
12309         * windows-nat.c (windows_create_inferior): Likewise.
12310
12311 2017-04-11  Pedro Alves  <palves@redhat.com>
12312
12313         * thread.c: Fix whitespace throughout.
12314
12315 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12316
12317         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12318
12319 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
12320
12321         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12322
12323 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
12324
12325         PR gdb/21364
12326         * osdata.c (info_osdata): Check if 'type' is an empty string
12327         instead of NULL.
12328
12329 2017-04-10  Pedro Alves  <palves@redhat.com>
12330
12331         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12332         (ptid_to_global_thread_id, in_thread_list)
12333         (do_captured_list_thread_ids, set_resumed, set_running)
12334         (set_executing, set_stop_requested, finish_thread_state)
12335         (validate_registers_access, can_access_registers_ptid)
12336         (print_thread_info_1, switch_to_thread)
12337         (do_restore_current_thread_cleanup)
12338         (make_cleanup_restore_current_thread, thread_command)
12339         (thread_name_command): Use operator== instead of ptid_equal.
12340
12341 2017-04-10  Pedro Alves  <palves@redhat.com>
12342
12343         * thread.c (struct current_thread_cleanup) <next>: Delete field.
12344         (current_thread_cleanup_chain): Delete.
12345         (restore_current_thread_cleanup_dtor)
12346         (make_cleanup_restore_current_thread): Remove references to
12347         current_thread_cleanup_chain.
12348
12349 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
12350
12351         * msp430-tdep.c (msp430_pseudo_register_read): Never return
12352         REG_UNKNOWN.
12353
12354 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12355
12356         PR gdb/19942
12357         * gdbthread.h (thread_info::deletable): New method.
12358         (thread_info::incref): New method.
12359         (thread_info::decref): New method.
12360         (thread_info::refcount): Move it to private.
12361         * infrun.c (save_stop_context): Call inc_refcount.
12362         (release_stop_context_cleanup): Likewise.
12363         * thread.c (set_thread_exited): New function.
12364         (init_thread_list): Delete "tp" only it is deletable, otherwise
12365         call set_thread_exited.
12366         (delete_thread_1): Call set_thread_exited.
12367         (current_thread_cleanup) <inferior_pid>: Remove.
12368         <thread>: New field.
12369         (restore_current_thread_ptid_changed): Removed.
12370         (do_restore_current_thread_cleanup): Adjust.
12371         (restore_current_thread_cleanup_dtor): Don't call
12372         find_thread_ptid.
12373         (set_thread_refcount): Use dec_refcount.
12374         (make_cleanup_restore_current_thread): Adjust.
12375         (thread_apply_all_command): Call inc_refcount.
12376         (_initialize_thread): Don't call
12377         observer_attach_thread_ptid_changed.
12378
12379 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12380
12381         * thread.c (delete_thread_1): Hoist code on marking thread as
12382         exited.
12383
12384 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12385
12386         * windows-nat.c (windows_detach): Initialize ptid with
12387         minus_one_ptid.
12388
12389 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12390
12391         * unittests/ptid-selftests.c: Fix erroneous assert messages.
12392
12393 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
12394
12395         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12396         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12397         (bfin_pseudo_register_write): Likewise
12398
12399 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
12400
12401         * common/ptid.h (struct ptid): Change to...
12402         (class ptid_t): ... this.
12403         <ptid_t>: New constructors.
12404         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12405         matches>: New methods.
12406         <make_null, make_minus_one>: New static methods.
12407         <pid>: Rename to...
12408         <m_pid>: ...this.
12409         <lwp>: Rename to...
12410         <m_lwp>: ...this.
12411         <tid>: Rename to...
12412         <m_tid>: ...this.
12413         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12414         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12415         as references, move comment to class ptid_t.
12416         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12417         ptid_t static methods.
12418         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12419         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12420         Take ptid arguments as references, implement using ptid_t methods.
12421         * unittests/ptid-selftests.c: New file.
12422         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12423         unittests/ptid-selftests.c.
12424         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12425
12426 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12427
12428         * python/python.c (python_run_simple_file): Cast mode literal to
12429         non-const char pointer as expected by PyFile_FromString.
12430
12431 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
12432
12433         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12434         minus_one_ptid and null_ptid.
12435
12436 2017-04-05  Pedro Alves  <palves@redhat.com>
12437
12438         * warning.m4 (build_warnings): Remove -Wno-write-strings.
12439         * configure: Regenerate.
12440
12441 2017-04-05  Pedro Alves  <palves@redhat.com>
12442
12443         * ada-exp.y (yyerror): Constify.
12444         * ada-lang.c (bound_name, get_selections)
12445         (ada_variant_discrim_type)
12446         (ada_variant_discrim_name, ada_value_struct_elt)
12447         (ada_lookup_struct_elt_type, is_unchecked_variant)
12448         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12449         (catch_ada_exception_command_split)
12450         (catch_ada_assert_command_split, catch_assert_command)
12451         (ada_op_name): Constify.
12452         * ada-lang.h (ada_yyerror, get_selections)
12453         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12454         * arc-tdep.c (arc_print_frame_cache): Constify.
12455         * arm-tdep.c (arm_skip_stub): Constify.
12456         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12457         (gen_aggregate_elt_ref): Constify.
12458         * bcache.c (print_bcache_statistics): Constify.
12459         * bcache.h (print_bcache_statistics): Constify.
12460         * break-catch-throw.c (catch_exception_command_1):
12461         * breakpoint.c (struct ep_type_description::description):
12462         Constify.
12463         (add_solib_catchpoint): Constify.
12464         (catch_fork_command_1): Add cast.
12465         (add_catch_command): Constify.
12466         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12467         Constify.
12468         * bsd-uthread.c (bsd_uthread_state): Constify.
12469         * buildsym.c (patch_subfile_names): Constify.
12470         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12471         Constify.
12472         * c-exp.y (yyerror): Constify.
12473         (token::oper): Constify.
12474         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12475         * c-varobj.c (cplus_describe_child): Constify.
12476         * charset.c (find_charset_names): Add cast.
12477         (find_charset_names): Constify array and add const_cast.
12478         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12479         (edit_command): Constify.
12480         * cli/cli-decode.c (lookup_cmd): Constify.
12481         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12482         Constify.
12483         (struct dump_context): Constify.
12484         (add_dump_command, restore_command): Constify.
12485         * cli/cli-script.c (get_command_line): Constify.
12486         * cli/cli-script.h (get_command_line): Constify.
12487         * cli/cli-utils.c (check_for_argument): Constify.
12488         * cli/cli-utils.h (check_for_argument): Constify.
12489         * coff-pe-read.c (struct read_pe_section_data): Constify.
12490         * command.h (lookup_cmd): Constify.
12491         * common/print-utils.c (decimal2str): Constify.
12492         * completer.c (gdb_print_filename): Constify.
12493         * corefile.c (set_gnutarget): Constify.
12494         * cp-name-parser.y (yyerror): Constify.
12495         * cp-valprint.c (cp_print_class_member): Constify.
12496         * cris-tdep.c (cris_register_name, crisv32_register_name):
12497         Constify.
12498         * d-exp.y (yyerror): Constify.
12499         (struct token::oper): Constify.
12500         * d-lang.h (d_yyerror): Constify.
12501         * dbxread.c (struct header_file_location::name): Constify.
12502         (add_old_header_file, add_new_header_file, last_function_name)
12503         (dbx_next_symbol_text, add_bincl_to_list)
12504         (find_corresponding_bincl_psymtab, set_namestring)
12505         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12506         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12507         * defs.h (command_line_input, print_address_symbolic)
12508         (deprecated_readline_begin_hook): Constify.
12509         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12510         Constify.
12511         * event-top.c (handle_line_of_input): Constify and add cast.
12512         * exceptions.c (catch_errors): Constify.
12513         * exceptions.h (catch_errors): Constify.
12514         * expprint.c (print_subexp_standard, op_string, op_name)
12515         (op_name_standard, dump_raw_expression, dump_raw_expression):
12516         * expression.h (op_name, op_string, dump_raw_expression):
12517         Constify.
12518         * f-exp.y (yyerror): Constify.
12519         (struct token::oper): Constify.
12520         (struct f77_boolean_val::name): Constify.
12521         * f-lang.c (f_word_break_characters): Constify.
12522         * f-lang.h (f_yyerror): Constify.
12523         * fork-child.c (fork_inferior): Add cast.
12524         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12525         (new_variant): Constify.
12526         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12527         * gdbarch.c: Regenerate.
12528         * gdbcore.h (set_gnutarget): Constify.
12529         * go-exp.y (yyerror): Constify.
12530         (token::oper): Constify.
12531         * go-lang.h (go_yyerror): Constify.
12532         * go32-nat.c (go32_sysinfo): Constify.
12533         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12534         * guile/scm-cmd.c (cmdscm_function): Constify.
12535         * guile/scm-param.c (pascm_param_value): Constify.
12536         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12537         (h8300sx_register_name): Constify.
12538         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12539         Constify.
12540         * ia64-tdep.c (ia64_register_names): Constify.
12541         * infcmd.c (construct_inferior_arguments): Constify.
12542         (path_command, attach_post_wait): Constify.
12543         * language.c (show_range_command, show_case_command)
12544         (unk_lang_error): Constify.
12545         * language.h (language_defn::la_error)
12546         (language_defn::la_name_of_this): Constify.
12547         * linespec.c (decode_line_2): Constify.
12548         * linux-thread-db.c (thread_db_err_str): Constify.
12549         * lm32-tdep.c (lm32_register_name): Constify.
12550         * m2-exp.y (yyerror): Constify.
12551         * m2-lang.h (m2_yyerror): Constify.
12552         * m32r-tdep.c (m32r_register_names): Constify and make static.
12553         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12554         * m88k-tdep.c (m88k_register_name): Constify.
12555         * macroexp.c (appendmem): Constify.
12556         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12557         (upgrade_type, parse_external, parse_partial_symbols)
12558         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12559         (new_symbol): Constify.
12560         * memattr.c (mem_info_command): Constify.
12561         * mep-tdep.c (register_name_from_keyword): Constify.
12562         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12563         Constify.
12564         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12565         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12566         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12567         cast.
12568         (mi_execute_async_cli_command): Constify.
12569         * mips-tdep.c (mips_register_name): Constify.
12570         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12571         (am33_register_name, am33_2_register_name)
12572         * moxie-tdep.c (moxie_register_names): Constify.
12573         * nat/linux-osdata.c (osdata_type): Constify fields.
12574         * nto-tdep.c (nto_parse_redirection): Constify.
12575         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12576         (lookup_child_selector): Constify.
12577         (objc_methcall::name): Constify.
12578         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12579         (lookup_struct_typedef): Constify.
12580         * objfiles.c (pc_in_section): Constify.
12581         * objfiles.h (pc_in_section): Constify.
12582         * p-exp.y (struct token::oper): Constify.
12583         (yyerror): Constify.
12584         * p-lang.h (pascal_yyerror): Constify.
12585         * parser-defs.h (op_name_standard): Constify.
12586         (op_print::string): Constify.
12587         (exp_descriptor::op_name): Constify.
12588         * printcmd.c (print_address_symbolic): Constify.
12589         * psymtab.c (print_partial_symbols): Constify.
12590         * python/py-breakpoint.c (stop_func): Constify.
12591         (bppy_get_expression): Constify.
12592         * python/py-cmd.c (cmdpy_completer::name): Constify.
12593         (cmdpy_function): Constify.
12594         * python/py-event.c (evpy_add_attribute)
12595         (gdbpy_initialize_event_generic): Constify.
12596         * python/py-event.h (evpy_add_attribute)
12597         (gdbpy_initialize_event_generic): Constify.
12598         * python/py-evts.c (add_new_registry): Constify.
12599         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12600         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12601         * python/py-inferior.c (get_buffer): Add cast.
12602         * python/py-param.c (parm_constant::name): Constify.
12603         * python/py-unwind.c (fprint_frame_id): Constify.
12604         * python/python.c (gdbpy_parameter_value): Constify.
12605         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12606         * remote.c (memory_packet_config::name): Constify.
12607         (show_packet_config_cmd, remote_write_bytes)
12608         (remote_buffer_add_string):
12609         * reverse.c (exec_reverse_once): Constify.
12610         * rs6000-tdep.c (variant::name, variant::description): Constify.
12611         * rust-exp.y (rustyyerror): Constify.
12612         * rust-lang.c (rust_op_name): Constify.
12613         * rust-lang.h (rustyyerror): Constify.
12614         * serial.h (serial_ops::name): Constify.
12615         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12616         (sh_sh3e_register_name, sh_sh2e_register_name)
12617         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12618         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12619         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12620         (sh_sh4al_dsp_register_name): Constify.
12621         * sh64-tdep.c (sh64_register_name): Constify.
12622         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12623         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12624         * stabsread.c (patch_block_stabs, read_type_number)
12625         (ref_map::stabs, ref_add, process_reference)
12626         (symbol_reference_defined, define_symbol, define_symbol)
12627         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12628         (read_one_struct_field, read_struct_fields, read_baseclasses)
12629         (read_tilde_fields, read_struct_type, read_array_type)
12630         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12631         (read_huge_number, read_range_type, read_args, common_block_start)
12632         (find_name_end): Constify.
12633         * stabsread.h (common_block_start, define_symbol)
12634         (process_one_symbol, symbol_reference_defined, ref_add):
12635         * symfile.c (get_section_index, add_symbol_file_command):
12636         * symfile.h (get_section_index): Constify.
12637         * target-descriptions.c (tdesc_type::name): Constify.
12638         (tdesc_free_type): Add cast.
12639         * target.c (find_default_run_target):
12640         (add_deprecated_target_alias, find_default_run_target)
12641         (target_announce_detach): Constify.
12642         (do_option): Constify.
12643         * target.h (add_deprecated_target_alias): Constify.
12644         * thread.c (print_thread_info_1): Constify.
12645         * top.c (deprecated_readline_begin_hook, command_line_input):
12646         Constify.
12647         (init_main): Add casts.
12648         * top.h (handle_line_of_input): Constify.
12649         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12650         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12651         (tfind_command): Rename to ...
12652         (tfind_command_1): ... this and constify.
12653         (tfind_command): New function.
12654         (tfind_end_command, tfind_start_command): Adjust.
12655         (encode_source_string): Constify.
12656         * tracepoint.h (encode_source_string): Constify.
12657         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12658         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12659         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12660         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12661         * tui/tui-win.c (parse_scrolling_args): Constify.
12662         * tui/tui-windata.c (tui_erase_data_content): Constify.
12663         * tui/tui-windata.h (tui_erase_data_content): Constify.
12664         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12665         * tui/tui.c (tui_enable): Add cast.
12666         * utils.c (defaulted_query): Constify.
12667         (init_page_info): Add cast.
12668         (puts_debug, subset_compare): Constify.
12669         * utils.h (subset_compare): Constify.
12670         * varobj.c (varobj_format_string): Constify.
12671         * varobj.h (varobj_format_string): Constify.
12672         * vax-tdep.c (vax_register_name): Constify.
12673         * windows-nat.c (windows_detach): Constify.
12674         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12675         * xml-support.c (gdb_xml_end_element): Constify.
12676         * xml-tdesc.c (tdesc_start_reg): Constify.
12677         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12678         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12679         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12680
12681 2017-04-05  Pedro Alves  <palves@redhat.com>
12682
12683         * proc-api.c (struct trans): Constify.
12684         (procfs_note): Constify.
12685         * proc-events.c (struct trans, syscall_table):
12686         * proc-flags.c (struct trans): Constify.
12687         * proc-utils.h (procfs_note): Constify.
12688         * proc-why.c (struct trans): Constify.
12689         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12690         (procfs_detach): Constify.
12691         * sol-thread.c (struct string_map): Constify.
12692         (td_err_string, td_state_string): Constify.
12693
12694 2017-04-05  Pedro Alves  <palves@redhat.com>
12695
12696         * proc-api.c (procfs_filename): Don't initialize
12697         procfs_filename.
12698         (prepare_to_trace): Assume procfs_filename is non-NULL.
12699         (_initialize_proc_api): Give procfs_filename a default value here.
12700
12701 2017-04-05  Pedro Alves  <palves@redhat.com>
12702
12703         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12704         'cond_string' parameter.
12705         (extract_exception_regexp): Constify 'string' parameter.
12706         (catch_exception_command_1): Constify.
12707         * breakpoint.c (init_catchpoint)
12708         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12709         parameter.
12710         (ep_parse_optional_if_clause, catch_fork_command_1)
12711         (catch_exec_command_1): Constify.
12712         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12713         parameter.
12714         (ep_parse_optional_if_clause): Constify.
12715         * cli/cli-utils.c (remove_trailing_whitespace)
12716         (check_for_argument): Constify.
12717         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12718         non-const overload.
12719         (check_for_argument): Likewise.
12720
12721 2017-04-05  Pedro Alves  <palves@redhat.com>
12722
12723         * event-top.c (command_line_handler): Add cast to execute_command
12724         call.
12725         * record-btrace.c (cmd_record_btrace_bts_start)
12726         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12727         (cmd_record_btrace_start): Add cast to execute_command call.
12728         * record-full.c (record_full_goto_insn):
12729         * record.c (record_start, record_stop): Add cast to
12730         execute_command_to_string calls.
12731         (cmd_record_start): Add cast to execute_command calls.
12732
12733 2017-04-05  Pedro Alves  <palves@redhat.com>
12734
12735         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12736         static inline function.
12737         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12738         array and use gdb_PyArg_ParseTupleAndKeywords.
12739         * python/py-cmd.c (cmdpy_init): Likewise.
12740         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12741         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12742         (infpy_search_memory): Likewise.
12743         * python/py-objfile.c (objfpy_add_separate_debug_file)
12744         (gdbpy_lookup_objfile): Likewise.
12745         * python/py-symbol.c (gdbpy_lookup_symbol)
12746         (gdbpy_lookup_global_symbol): Likewise.
12747         * python/py-type.c (gdbpy_lookup_type): Likewise.
12748         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12749         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12750         Likewise.
12751
12752 2017-04-05  Pedro Alves  <palves@redhat.com>
12753
12754         * python/python-internal.h (gdb_PyGetSetDef): New type.
12755         * python/py-block.c (block_object_getset)
12756         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12757         * python/py-event.c (event_object_getset)
12758         (finish_breakpoint_object_getset): Likewise.
12759         * python/py-inferior.c (inferior_object_getset): Likewise.
12760         * python/py-infthread.c (thread_object_getset): Likewise.
12761         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12762         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12763         * python/py-objfile.c (objfile_getset): Likewise.
12764         * python/py-progspace.c (pspace_getset): Likewise.
12765         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12766         Likewise.
12767         * python/py-record.c (recpy_record_getset): Likewise.
12768         * python/py-symbol.c (symbol_object_getset): Likewise.
12769         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12770         Likewise.
12771         * python/py-type.c (type_object_getset, field_object_getset):
12772         Likewise.
12773         * python/py-value.c (value_object_getset): Likewise.
12774
12775 2017-04-05  Pedro Alves  <palves@redhat.com>
12776
12777         * python/python-internal.h (gdb_PyObject_CallMethod)
12778         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12779         New functions.
12780         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12781         (PySys_GetObject, PySys_SetPath): New macros.
12782
12783 2017-04-05  Pedro Alves  <palves@redhat.com>
12784
12785         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12786         info_osdata_command.
12787         * osdata.c (info_osdata_command): Rename to ...
12788         (info_osdata): ... this.  Constify 'type' parameter, and remove
12789         the 'from_tty' parameter.  Accept NULL TYPE.
12790         (info_osdata_command): New function.
12791         * osdata.h (info_osdata_command): Remove declaration.
12792         (info_osdata): New declaration.
12793
12794 2017-04-05  Pedro Alves  <palves@redhat.com>
12795
12796         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12797         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12798         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12799         parameter.
12800         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12801         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12802         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12803         parameter.
12804         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12805         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12806         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12807         (mi_cmd_file_list_exec_source_files)
12808         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12809         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12810         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12811         parameter.
12812         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12813         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12814         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12815         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12816         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12817         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12818         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12819         'command' parameter.
12820         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12821         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12822         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12823         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12824         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12825         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12826         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12827         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12828         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12829         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12830         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12831         parameter.
12832         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12833         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12834         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12835         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12836         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12837         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12838         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12839         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12840         (mi_cmd_data_list_changed_registers)
12841         (mi_cmd_data_write_register_values)
12842         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12843         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12844         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12845         (mi_cmd_list_features, mi_cmd_list_target_features)
12846         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12847         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12848         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12849         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12850         (mi_cmd_trace_frame_collected): Constify 'command'
12851         parameter.
12852         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12853         'command' parameter.
12854
12855 2017-04-05  Pedro Alves  <palves@redhat.com>
12856
12857         * ada-lang.c (ada_completer_word_break_characters): Now a const
12858         array.
12859         (ada_get_gdb_completer_word_break_characters): Constify.
12860         * completer.c (gdb_completer_command_word_break_characters)
12861         (gdb_completer_file_name_break_characters)
12862         (gdb_completer_quote_characters): Now const arrays.
12863         (get_gdb_completer_quote_characters): Constify.
12864         (set_rl_completer_word_break_characters): New function.
12865         (set_gdb_completion_word_break_characters)
12866         (complete_line_internal): Use it.
12867         * completer.h (get_gdb_completer_quote_characters): Constify.
12868         (set_rl_completer_word_break_characters): Declare.
12869         * f-lang.c (f_word_break_characters): Constify.
12870         * language.c (default_word_break_characters): Constify.
12871         * language.h (language_defn::la_word_break_characters): Constify.
12872         (default_word_break_characters): Constify.
12873         * top.c (init_main): Use set_rl_completer_word_break_characters.
12874
12875 2017-04-05  Pedro Alves  <palves@redhat.com>
12876
12877         * aix-thread.c (aix_thread_pid_to_str)
12878         (aix_thread_extra_thread_info): Constify.
12879         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12880         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12881         (bsd_uthread_pid_to_str): Constify.
12882         * corelow.c (core_pid_to_str): Constify.
12883         * darwin-nat.c (darwin_pid_to_str): Constify.
12884         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12885         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12886         Constify.
12887         * gnu-nat.c (gnu_pid_to_str): Constify.
12888         * go32-nat.c (go32_pid_to_str): Constify.
12889         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12890         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12891         * inferior.c (inferior_pid_to_str): Constify.
12892         * linux-nat.c (linux_nat_pid_to_str): Constify.
12893         * linux-tdep.c (linux_core_pid_to_str): Constify.
12894         * linux-thread-db.c (thread_db_pid_to_str)
12895         (thread_db_extra_thread_info): Constify.
12896         * nto-tdep.c (nto_extra_thread_info): Constify.
12897         * nto-tdep.h (nto_extra_thread_info): Constify.
12898         * obsd-nat.c (obsd_pid_to_str): Constify.
12899         * procfs.c (procfs_pid_to_str): Constify.
12900         * ravenscar-thread.c (ravenscar_extra_thread_info)
12901         (ravenscar_pid_to_str): Constify.
12902         * remote-sim.c (gdbsim_pid_to_str): Constify.
12903         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12904         Constify.
12905         * sol-thread.c (solaris_pid_to_str): Constify.
12906         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12907         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12908         * target.c (default_pid_to_str, target_pid_to_str)
12909         (normal_pid_to_str, default_pid_to_str): Constify.
12910         * target.h (target_ops::to_pid_to_str)
12911         (target_ops::to_extra_thread_info): Constify.
12912         (target_pid_to_str, normal_pid_to_str): Constify.
12913         * windows-nat.c (windows_pid_to_str): Constify.
12914         * gdbarch.sh (core_pid_to_str): Constify.
12915         * target-delegates.c: Regenerate.
12916         * gdbarch.h, gdbarch.c: Regenerate.
12917
12918 2017-04-05  Pedro Alves  <palves@redhat.com>
12919
12920         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12921         the memory of the temporary warning_pre_print override.
12922         * utils.c (warning_pre_print): Constify.
12923         * utils.h (warning_pre_print): Constify.
12924
12925 2017-04-05  Pedro Alves  <palves@redhat.com>
12926
12927         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12928         (shell_command): New function.
12929         (make_command): Use std::string.
12930         (init_cli_cmds): Register shell_command instead of shell_escape.
12931
12932 2017-04-05  Pedro Alves  <palves@redhat.com>
12933
12934         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12935         * tracepoint.c (default_collect): Don't initialize.
12936
12937 2017-04-05  Pedro Alves  <palves@redhat.com>
12938
12939         * macroexp.c (macro_buffer::shared): Now a bool.
12940         (init_buffer): Update.
12941         (init_shared_buffer): Constify 'addr' parameter.
12942         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12943         casts.
12944
12945 2017-04-05  Pedro Alves  <palves@redhat.com>
12946
12947         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12948         * disasm.c (set_disassembler_options): Constify local.
12949         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12950
12951 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12952
12953         PR gdb/21352
12954         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12955         option.
12956
12957 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12958
12959         * frame.c (frame_unwind_register_unsigned): Call
12960         frame_unwind_register_value.
12961
12962 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12963
12964         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12965         Use gdb_test_multiple, and don't match anchor.
12966
12967 2017-04-05  Pedro Alves  <palves@redhat.com>
12968
12969         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12970         (Write After Approval): Remove Simon Marchi.
12971
12972 2017-04-05  Pedro Alves  <palves@redhat.com>
12973
12974         * common/gdb_optional.h (optional::optional): Make constexpr and
12975         initialize m_dummy.
12976
12977 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12978
12979         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12980         (amd64fbsd_jmp_buf_reg_offset): Remove.
12981         (amd64fbsd_supply_uthread): Remove function.
12982         (amd64fbsd_collect_uthread): Remove function.
12983         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12984         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12985         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12986         (fbsd-nat.c): Update comment.
12987         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12988         (i386fbsd_jmp_buf_reg_offset): Remove.
12989         (i386fbsd_supply_uthread): Remove function.
12990         (i386fbsd_collect_uthread): Remove function.
12991         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12992
12993 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12994
12995         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12996         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12997         * NEWS: Mention that support for FreeBSD/alpha was removed.
12998         * alpha-fbsd-tdep.c: Delete file.
12999         * config/alpha/fbsd.mh: Delete file.
13000         * configure.host: Delete alpha*-*-freebsd* and
13001         alpha*-*-kfreebsd*-gnu.
13002         * configure.tgt: Delete alpha*-*-freebsd* and
13003         alpha*-*-kfreebsd*-gnu.
13004
13005 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
13006
13007         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13008         amd64bsd_store_inferior_registers): Use ptid from regcache.
13009
13010 2017-04-04  Pedro Alves  <palves@redhat.com>
13011
13012         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
13013         data fields, make them private and add "m_" prefixes.
13014         (lnp_state_machine::lnp_state_machine): New ctor.
13015         (record_line, check_line_address, handle_set_discriminator)
13016         (handle_set_address, handle_advance_pc, handle_special_opcode)
13017         (handle_advance_line, handle_set_file, handle_negate_stmt)
13018         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13019         (end_sequence, advance_line): New methods.
13020         (m_gdbarch, m_record_lines_p): New fields.
13021         (lnp_reader_state): Delete.
13022         (dwarf_record_line): Rename to ...
13023         (lnp_state_machine::record_line): ... adjust.
13024         (init_lnp_state_machine): Delete.
13025         (lnp_state_machine::lnp_state_machine): New.
13026         (check_line_address): Rename to ...
13027         (lnp_state_machine::check_line_address): This.
13028         (dwarf_decode_lines_1): Remove reference to "reader_state".
13029         Adjust lnp_state_machine having a non-default ctor.  Use bool.
13030         State machine internal state manipulation moved to
13031         lnp_state_machine methods.
13032
13033 2017-04-04  Pedro Alves  <palves@redhat.com>
13034
13035         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13036         unittests/offset-type-selftests.c.
13037         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13038         * common/offset-type.h: New file.
13039         * common/preprocessor.h: New file.
13040         * common/traits.h: New file.
13041         * common/valid-expr.h: New file.
13042         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
13043         sect_offset and cu_offset strong typedefs throughout.
13044         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13045         typedefs throughout.
13046         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
13047         sect_offset and cu_offset strong typedefs throughout.
13048         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13049         typedefs throughout.
13050         * gdbtypes.h: Include "common/offset-type.h".
13051         (cu_offset): Now an offset type (strong typedef) instead of a
13052         struct.
13053         (sect_offset): Likewise.
13054         (union call_site_parameter_u): Rename "param_offset" field to
13055         "param_cu_off".
13056         * unittests/offset-type-selftests.c: New file.
13057
13058 2017-04-04  Pedro Alves  <palves@redhat.com>
13059
13060         * common/underlying.h: New file.
13061         * dwarf2read.c: Include "common/gdb_optional.h" and
13062         "common/underlying.h".
13063         (dir_index, file_name_index): New types.
13064         (file_entry): Use them.
13065         (file_entry::include): Use to_underlying.
13066         (line_header::add_file_name): Use dir_index.
13067         (read_formatted_entries): Use gdb::optional.  Read form before
13068         writting to file_entry.
13069         (dwarf_decode_line_header): Use dir_index.
13070         (lnp_state_machine::current_file): Use to_underlying.
13071         (lnp_state_machine::file): Change type to file_name_index.
13072         (dwarf_record_line): Use to_underlying.
13073         (init_lnp_state_machine): Use file_name_index.
13074         (dwarf_decode_lines_1): Use dir_index and file_name_index.
13075
13076 2017-04-04  Pedro Alves  <palves@redhat.com>
13077
13078         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13079         operator bool, has_value and get methods.
13080
13081 2017-04-04  Pedro Alves  <palves@redhat.com>
13082
13083         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13084         fields.
13085         (line_header): Initialize all data fields.  Change type of
13086         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13087         Change type of include_dirs to std::vector<const char *>.  Remove
13088         num_include_dirs, include_dirs_size.  Change type of file_names to
13089         std::vector<file_entry>.  Remove num_file_names, file_names_size.
13090         (line_header::line_header): New.
13091         (line_header::add_include_dir, line_header::add_file_name): New
13092         methods.
13093         (line_header::include_dir_at): Remove NULL check.
13094         (line_header::file_name_at): Add const overload.
13095         (line_header_up): New unique_ptr typedef.
13096         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
13097         std::vector.  Remove free_line_header call.
13098         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
13099         free_line_header call.
13100         (free_cu_line_header): Delete.
13101         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13102         (setup_type_unit_groups): Use line_header_up instead of cleanups.
13103         Adjust to use std::vector.
13104         (free_line_header): Delete.
13105         (free_line_header_voidp): Use delete.
13106         (add_include_dir): Replace with ...
13107         (line_header::add_include_dir): ... this method.  Use std::vector.
13108         (add_file_name): Replace with ...
13109         (line_header::add_file_name): ... this method.  Use std::vector.
13110         (add_include_dir_stub): Delete.
13111         (read_formatted_entries): Remove memset.
13112         (dwarf_decode_line_header): Return a line_header_up instead of a
13113         raw pointer.  Remove cleanup handling.  Pass lambdas to
13114         read_formatted_entries.  Adjust to use line_header methods.
13115         (dwarf_decode_lines_1): Adjust to use line_header methods.
13116         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13117         use std::vector.
13118
13119 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
13120
13121         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13122         instead of struct ptid.
13123
13124 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
13125
13126         * frame.c (get_frame_register_bytes): Unwind using value.
13127         (put_frame_register_bytes): Likewise.
13128
13129 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
13130
13131         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13132         aggregate-like.
13133
13134 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
13135
13136         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13137
13138 2017-03-29  Yao Qi  <yao.qi@linaro.org>
13139
13140         * gdbthread.h (struct thread_info): Declare constructor and
13141         destructor.  Add some in-class member initializers.
13142         * thread.c (free_thread): Remove.
13143         (init_thread_list): Call delete instead of free_thread.
13144         (new_thread): Call thread_info constructor.
13145         (thread_info::thread_info): New function.
13146         (thread_info::~thread_info): New function.
13147         (delete_thread_1): Call delete instead of free_thread.
13148         (make_cleanup_restore_current_thread): Move tp and frame to
13149         inner block.
13150
13151 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13152
13153         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13154         (arc_skip_prologue): Likewise.
13155         (arc_make_frame_cache): Likewise.
13156         (arc_pv_get_operand): New function.
13157         (arc_is_in_prologue): Likewise.
13158         (arc_analyze_prologue): Likewise.
13159         (arc_print_frame_cache): Likewise.
13160         (MAX_PROLOGUE_LENGTH): New constant.
13161
13162 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13163
13164         * configure.tgt: Add arc-insn.o.
13165         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13166         (dump_arc_instruction_command): New function.
13167         (arc_fprintf_disasm): Likewise.
13168         (arc_disassemble_info): Likewise.
13169         (arc_insn_get_operand_value): Likewise.
13170         (arc_insn_get_operand_value_signed): Likewise.
13171         (arc_insn_get_memory_base_reg): Likewise.
13172         (arc_insn_get_memory_offset): Likewise.
13173         (arc_insn_get_branch_target): Likewise.
13174         (arc_insn_dump): Likewise.
13175         (arc_insn_get_linear_next_pc): Likewise.
13176         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13177         (arc_disassemble_info): Likewise.
13178         (arc_insn_get_branch_target): Likewise.
13179         (arc_insn_get_linear_next_pc): Likewise.
13180         * NEWS: Mention new "maint print arc arc-instruction".
13181
13182 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13183
13184         * arc-tdep (maintenance_print_arc_list): New variable.
13185         (maintenance_print_arc_command): New function.
13186
13187 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13188
13189         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13190         Add "limm" and "reserved".
13191         (arc_cannot_fetch_register, arc_cannot_store_register): Add
13192         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13193         * arc-tdep.h (arc_regnum): Likewise.
13194
13195 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13196
13197         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13198         for THREADPTR register.
13199         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13200         register.
13201         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13202         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13203         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13204
13205 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13206
13207         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13208         registers above gdbarch_num_regs (gdbarch) as privileged in
13209         call0 ABI.
13210
13211 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13212
13213         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13214         for a single specified register or for all registers in
13215         a0_base..a0_base + C0_NREGS range.
13216         (supply_gregset_reg): Call regcache_raw_supply for a single
13217         specified register or for all registers in a0_base..a0_base +
13218         C0_NREGS range.
13219
13220 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13221
13222         * arch/xtensa.h (C0_NREGS): Add definition.
13223         * xtensa-tdep.c (C0_NREGS): Remove definition.
13224
13225 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13226
13227         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13228         Drop xtensa_default_isa initialization.
13229         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13230
13231 2017-03-27  Pedro Alves  <palves@redhat.com>
13232
13233         * dwarf2read.c (file_entry) <dir_index>: Add comment.
13234         (file_entry::include_dir): New method.
13235         (line_header::include_dir_at, line_header::file_name_at): New
13236         methods.
13237         (setup_type_unit_groups, setup_type_unit_groups)
13238         (psymtab_include_file_name): Simplify using the new methods.
13239         (lnp_state_machine) <the_line_header>: New field.
13240         <file>: Add comment.
13241         (lnp_state_machine::current_file): New method.
13242         (dwarf_record_line): Simplify using the new methods.
13243         (init_lnp_state_machine): Initialize the "the_line_header" field.
13244         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13245         Simplify using the new methods.
13246
13247 2017-03-27  Pedro Alves  <palves@redhat.com>
13248
13249         * cp-name-parser.y (make_empty): Delete.
13250         (demangler_special, nested_name, ptr_operator, array_indicator)
13251         (direct_declarator, declarator_1): Use fill_comp instead of
13252         make_empty.
13253
13254 2017-03-27  Pedro Alves  <palves@redhat.com>
13255
13256         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13257         to ATTRIBUTE_PRINTF.
13258         * solib-target.c (library_list_start_list): Print "string" not
13259         "version".
13260         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13261         gdb_xml_error call.
13262
13263 2017-03-27  Pedro Alves  <palves@redhat.com>
13264
13265         * dwarf2read.c (struct file_and_directory): New.
13266         (dwarf2_get_dwz_file): Adjust to use std::string.
13267         (dw2_get_file_names_reader): Adjust to use file_and_directory.
13268         (find_file_and_directory): Adjust to return a file_and_directory
13269         object.
13270         (read_file_scope): Adjust to use file_and_directory.  Remove
13271         make_cleanup/do_cleanups calls.
13272         (open_and_init_dwp_file): Adjust to use std::string.  Remove
13273         make_cleanup/do_cleanups calls.
13274         * python/python.c (do_start_initialization): Adjust to ldirname
13275         returning a std::string.
13276         * utils.c (ldirname): Now returns a std::string.
13277         * utils.h (ldirname): Change return type to std::string.
13278         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13279         returning a std::string.
13280         * xml-tdesc.c (file_read_description_xml): Likewise.
13281
13282 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
13283
13284         * regcache.c (regcache_debug_print_register): New function.
13285         * regcache.h (regcache_debug_print_register): New declaration.
13286         * target.c (debug_print_register): Remove.
13287         (target_fetch_registers): Call regcache_debug_print_register.
13288         (target_store_registers): Likewise.
13289
13290 2017-03-24  Pádraig Brady  <pbrady@fb.com>
13291
13292         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13293         reference beyond the 'lh->include_dirs' array before accessing to
13294         it.
13295         (psymtab_include_file_name): Likewise.
13296         (dwarf_decode_lines_1): Likewise.
13297         (dwarf_decode_lines): Likewise.
13298         (file_file_name): Likewise.
13299
13300 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
13301
13302         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13303         inferior_ptid.
13304         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13305         ps_lsetfpregs): Likewise.
13306         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13307         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13308         ps_lsetfpregs): Likewise.
13309         * target.c (target_fetch_registers, target_store_registers):
13310         Remove asserts.
13311
13312 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
13313
13314         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13315
13316 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13317
13318         * aarch64-tdep.c (aarch64_process_record_test): Declare.
13319         (_initialize_aarch64_tdep): Register it.
13320         (aarch64_record_load_store): Handle PRFM instruction.
13321         (aarch64_process_record_test): New function.
13322
13323 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13324
13325         * aarch64-tdep.c (aarch64_record_load_store): Fix code
13326         indentation.
13327
13328 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13329
13330         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13331
13332 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13333
13334         python/python.c (do_start_initialization): Fix memory leak.
13335
13336 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13337
13338         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13339         using get_ptrace_pid.
13340         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13341         inferior_ptid.
13342         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13343         inferior_ptid instead of pid.
13344
13345 2017-03-22  Yao Qi  <yao.qi@linaro.org>
13346
13347         * aarch64-tdep.c: Wrap locally used classes in anonymous
13348         namespace.
13349         * arm-tdep.c: Likewise.
13350         * linespec.c: Likewise.
13351         * ui-out.c: Likewise.
13352
13353 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
13354
13355         PR gdb/19637
13356         * python/lib/gdb/printer/bound_registers.py: Import sys.
13357
13358 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13359
13360         * windows-nat.c (do_windows_fetch_inferior_registers): Add
13361         windows_thread_info parameter and use it instead of
13362         current_thread.
13363         (windows_fetch_inferior_registers): Don't set current_thread,
13364         pass the thread to do_windows_fetch_inferior_registers.  Use
13365         ptid from regcache instead of inferior_ptid.
13366         (do_windows_store_inferior_registers): Add windows_thread_info
13367         parameter and use it instead of current_thread.
13368         (windows_store_inferior_registers): Don't set current_thread,
13369         pass the thread to do_windows_store_inferior_registers.  Use
13370         ptid from regcache instead of inferior_ptid.
13371
13372 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13373
13374         * ser-mingw.c (ser_windows_raw): Remove reference to
13375         struct serial::current_timeout.
13376
13377 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
13378
13379         PR tdep/20928
13380         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13381         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13382         (sparc64_fsr_type): Fix %fsr decoding.
13383
13384 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
13385
13386         * python/py-record-btrace.c (btpy_insn_data): Change return type
13387         for Python 2.
13388
13389 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13390
13391         * spu-linux-nat.c (spu_fetch_inferior_registers,
13392         spu_store_inferior_registers): Use ptid from regcache, set and
13393         restore inferior_ptid.
13394         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13395         Likewise.
13396
13397 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13398
13399         * i386-linux-nat.c (fetch_register, store_register,
13400         i386_linux_fetch_inferior_registers,
13401         i386_linux_store_inferior_registers): Use ptid from regcache.
13402         * ia64-linux-nat.c (ia64_linux_fetch_register,
13403         ia64_linux_store_register): Likewise.
13404         * inf-ptrace.c (inf_ptrace_fetch_register,
13405         inf_ptrace_store_register): Likewise.
13406         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13407         m32r_linux_store_inferior_registers): Likewise.
13408         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13409         m68kbsd_store_inferior_registers): Likewise.
13410         * m68k-linux-nat.c (fetch_register, store_register,
13411         m68k_linux_fetch_inferior_registers,
13412         m68k_linux_store_inferior_registers): Likewise.
13413         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13414         m88kbsd_store_inferior_registers): Likewise.
13415         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13416         mips_fbsd_store_inferior_registers): Likewise.
13417         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13418         mips64_linux_regsets_store_registers): Likewise.
13419         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13420         mipsnbsd_store_inferior_registers): Likewise.
13421         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13422         mips64obsd_store_inferior_registers): Likewise.
13423         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13424         Likewise.
13425         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13426         ppcfbsd_store_inferior_registers): Likewise.
13427         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13428         ppc_linux_store_inferior_registers): Likewise.
13429         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13430         ppcnbsd_store_inferior_registers): Likewise.
13431         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13432         ppcobsd_store_registers): Likewise.
13433         * procfs.c (procfs_fetch_registers, procfs_store_registers):
13434         Likewise.
13435         * ravenscar-thread.c (ravenscar_fetch_registers,
13436         ravenscar_store_registers, ravenscar_prepare_to_store):
13437         Likewise.
13438         * record-btrace.c (record_btrace_fetch_registers,
13439         record_btrace_store_registers, record_btrace_prepare_to_store):
13440         Likewise.
13441         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13442         Lookup inferior using ptid from regcache, instead of
13443         current_inferior.
13444         * remote.c (remote_fetch_registers, remote_store_registers): Use
13445         ptid from regcache.
13446         * rs6000-nat.c (fetch_register, store_register): Likewise.
13447         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13448         s390_linux_store_inferior_registers): Likewise.
13449         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13450         shnbsd_store_inferior_registers): Likewise.
13451         * sol-thread.c (sol_thread_fetch_registers,
13452         sol_thread_store_registers): Likewise.
13453         * sparc-nat.c (sparc_fetch_inferior_registers,
13454         sparc_store_inferior_registers): Likewise.
13455         * tilegx-linux-nat.c (fetch_inferior_registers,
13456         store_inferior_registers): Likewise.
13457         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13458         vaxbsd_store_inferior_registers): Likewise.
13459         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13460         store_xtregs): Likewise.
13461
13462 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13463
13464         PR gdb/14441
13465         * NEWS: Mention support for rvalue references in GDB and python.
13466         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13467         supports both lvalue and rvalue references.
13468
13469 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13470
13471         PR gdb/14441
13472         * gdbtypes.c (rank_one_type): Implement overloading
13473         resolution rules regarding rvalue references.
13474
13475 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13476
13477         PR gdb/14441
13478         * aarch64-tdep.c (aarch64_type_align)
13479         (aarch64_extract_return_value, aarch64_store_return_value): Change
13480         lvalue reference type checks to general reference type checks.
13481         * amd64-tdep.c (amd64_classify): Likewise.
13482         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13483         Likewise.
13484         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13485         (arm_store_return_value): Likewise.
13486         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13487         * c-typeprint.c (c_print_type): Likewise.
13488         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13489         (cplus_number_of_children, cplus_describe_child): Likewise.
13490         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13491         * completer.c (expression_completer): Likewise.
13492         * cp-support.c (make_symbol_overload_list_adl_namespace):
13493         Likewise.
13494         * darwin-nat-info.c (info_mach_region_command): Likewise.
13495         * dwarf2loc.c (entry_data_value_coerce_ref)
13496         (value_of_dwarf_reg_entry): Likewise.
13497         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13498         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13499         Likewise.
13500         * findvar.c (extract_typed_address, store_typed_address):
13501         Likewise.
13502         * gdbtypes.c (rank_one_type): Likewise.
13503         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13504         * infcall.c (value_arg_coerce): Likewise.
13505         * language.c (pointer_type): Likewise.
13506         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13507         Likewise.
13508         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13509         * mn10300-tdep.c (mn10300_type_align): Likewise.
13510         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13511         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13512         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13513         Likewise.
13514         * printcmd.c (print_formatted, x_command): Likewise.
13515         * python/py-type.c (typy_get_composite, typy_template_argument):
13516         Likewise.
13517         * python/py-value.c (valpy_referenced_value)
13518         (valpy_get_dynamic_type, value_has_field): Likewise.
13519         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13520         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13521         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13522         * spu-tdep.c (spu_scalar_value_p): Likewise.
13523         * symtab.c (lookup_symbol_aux): Likewise.
13524         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13525         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13526         Likewise.
13527         * valops.c (value_cast_pointers, value_cast)
13528         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13529         (value_struct_elt, value_struct_elt_bitpos)
13530         (value_find_oload_method_list, find_overload_match)
13531         (value_rtti_indirect_type): Likewise.
13532         * valprint.c (val_print_scalar_type_p, generic_val_print):
13533         Likewise.
13534         * value.c (value_actual_type, value_as_address, unpack_long)
13535         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13536         (coerce_ref): Likewise.
13537         * varobj.c (varobj_get_value_type): Likewise.
13538
13539 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13540
13541         PR gdb/14441
13542         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13543         table of constants.
13544         * python/lib/gdb/command/explore.py: Support exploring values
13545         of rvalue reference types.
13546         * python/lib/gdb/types.py: Implement get_basic_type() for
13547         rvalue reference types.
13548         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13549         constant.
13550         * python/py-value.c (valpy_getitem): Add an rvalue reference
13551         check.
13552         (valpy_reference_value): Add new parameter "refcode".
13553         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13554         New wrappers for valpy_reference_value().
13555         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13556         (gdbpy_invoke_xmethod): Likewise.
13557
13558 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13559
13560         PR gdb/14441
13561         * dwarf2read.c (process_die, read_type_die_1): Handle the
13562         DW_TAG_rvalue_reference_type DIE.
13563         (read_tag_reference_type): Add new parameter "refcode".
13564
13565 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13566
13567         PR gdb/14441
13568         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13569         (c_type_print_modifier, c_type_print_varspec_suffix)
13570         (c_type_print_base): Support printing rvalue reference types.
13571         * c-valprint.c (c_val_print, c_value_print): Support printing
13572         rvalue reference values.
13573
13574 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13575
13576         PR gdb/14441
13577         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13578         typename.
13579         * cp-support.c (replace_typedefs): Handle
13580         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13581         * python/py-type.c (typy_lookup_type): Likewise.
13582
13583 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13584
13585         PR gdb/14441
13586         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13587         * parse.c (insert_type): Change assert statement.
13588         (follow_types): Handle rvalue reference types.
13589         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13590         constant.
13591
13592 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13593
13594         PR gdb/14441
13595         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13596         value_ref() interface.
13597         * c-valprint.c (c_value_print): Likewise.
13598         * infcall.c (value_arg_coerce): Likewise.
13599         * python/py-value.c (valpy_reference_value): Likewise.
13600         * valops.c (value_cast, value_reinterpret_cast)
13601         (value_dynamic_cast, typecmp): Likewise.
13602         (value_ref): Parameterize by kind of return value reference type.
13603         * value.h (value_ref): Add new parameter "refcode".
13604
13605 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13606
13607         PR gdb/14441
13608         * dwarf2read.c (read_tag_reference_type): Use
13609         lookup_lvalue_reference_type() instead of lookup_reference_type().
13610         * eval.c (evaluate_subexp_standard): Likewise.
13611         * f-exp.y: Likewise.
13612         * gdbtypes.c (make_reference_type, lookup_reference_type):
13613         Generalize with rvalue reference types.
13614         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13615         convenience wrappers for lookup_reference_type().
13616         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13617         reference kind parameter.
13618         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13619         wrappers for lookup_reference_type().
13620         * guile/scm-type.c (gdbscm_type_reference): Use
13621         lookup_lvalue_reference_type() instead of lookup_reference_type().
13622         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13623         * parse.c (follow_types): Likewise.
13624         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13625         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13626         Likewise.
13627         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13628         (gdbpy_invoke_xmethod): Likewise.
13629         * stabsread.c: Provide extra argument to make_reference_type()
13630         call.
13631         * valops.c (value_ref, value_rtti_indirect_type): Use
13632         lookup_lvalue_reference_type() instead of lookup_reference_type().
13633
13634 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13635
13636         PR gdb/14441
13637         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13638         (TYPE_IS_REFERENCE): New macro.
13639         (struct type): Add rvalue_reference_type field.
13640         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13641
13642 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13643
13644         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13645         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13646         New function definition.
13647         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13648         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13649         New function declaration.
13650         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13651         * mi/mi-interp.h: New file.
13652         * solib.c (info_sharedlibrary_command): Replace for loop with
13653         ALL_SO_LIBS macro
13654         * solib.h (update_solib_list): New function declaration.
13655         (so_list_head): Move macro.
13656         * solist.h (ALL_SO_LIBS): New macro.
13657
13658 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13659
13660         * infcmd.c (post_create_inferior): Remove unused argument in
13661         call to solib_add.
13662         * remote.c (remote_start_remote): Likewise.
13663         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13664         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13665         (enable_break): Likewise.
13666         * solib.c (update_solib_list): Remove unused target argument
13667         and its documentation.
13668         (solib_add): Remove unused target argument.  Remove unused
13669         argument in call to update_solib_list.
13670         (info_sharedlibrary_command): Remove unused argument in call
13671         to update_solib_list.
13672         (sharedlibrary_command): Remove unused argument in call to
13673         solib_add.
13674         (handle_solib_event): Likewise.
13675         (reload_shared_libraries): Likewise.
13676         * solib.h (solib_add): Remove unused target argument.
13677
13678 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13679
13680         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13681         (s390_displaced_step_fixup): Cover relative branches with the
13682         default fixup handling.  This fixes lack of support for some
13683         relative branch instructions.
13684
13685 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13686
13687         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13688         ptid from regcache.
13689
13690 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13691
13692         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13693         i386_darwin_store_inferior_registers): Use ptid from regcache.
13694
13695 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13696
13697         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13698         i386bsd_store_inferior_registers): Use ptid from regcache.
13699
13700 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13701
13702         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13703         hppaobsd_store_registers): Use ptid from regcache.
13704
13705 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13706
13707         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13708         hppanbsd_store_registers): Use ptid from regcache.
13709
13710 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13711
13712         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13713         from regcache.  Use get_ptrace_pid.
13714
13715 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13716
13717         * corelow.c (get_core_register_section): Use ptid from regcache,
13718         update doc.
13719
13720 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13721
13722         * bsd-uthread.c (bsd_uthread_fetch_registers,
13723         bsd_uthread_store_registers): Use ptid from regcache, set and
13724         restore inferior_ptid.
13725
13726 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13727
13728         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13729         fetch_fp_regs, store_register, store_regs, store_fp_register,
13730         store_fp_regs): Use ptid from regcache.
13731
13732 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13733
13734         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13735         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13736         store_vfp_regs): Use ptid from regcache.
13737
13738 2017-03-17  Pedro Alves  <palves@redhat.com>
13739
13740         PR remote/21188
13741         * ser-base.c (ser_base_wait_for): Add comment.
13742         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13743         version.
13744         * ser-unix.c (hardwire_raw): Remove reference to
13745         scb->current_timeout.
13746         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13747         (hardwire_ops): Install ser_base_readchar instead of
13748         hardwire_readchar.
13749         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13750         Remove fields.
13751
13752 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13753
13754         PR gdb/19637
13755         * python/lib/gdb/printer/bound_registers.py: Add support for
13756         Python 3.
13757
13758 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13759
13760         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13761         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13762         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13763         byte_offset to subobj_byte_offset.  Fix the handling of
13764         DWARF_VALUE_STACK on big-endian targets when coming via an
13765         implicit pointer.
13766         (dwarf2_evaluate_loc_desc): Adjust call to
13767         dwarf2_evaluate_loc_desc_full.
13768         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13769         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13770
13771 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13772
13773         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13774         and REVSH instructions.
13775
13776 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13777
13778         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13779         (arm_record_test): Declare.
13780         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13781         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13782         align with the manual.
13783         (thumb_record_misc): Adjust the code order to align with the
13784         manual.
13785         (thumb2_record_decode_insn_handler): Fix instruction matching.
13786         (instruction_reader_thumb): New class.
13787         (arm_record_test): New function.
13788
13789 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13790
13791         * arm-tdep.c (abstract_memory_reader): New class.
13792         (instruction_reader): New class.
13793         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13794         (decode_insn): Likewise.
13795
13796 2017-03-16  Doug Evans  <dje@google.com>
13797
13798         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13799         member.  Change type of TYPE member to SCM.  All uses updated.
13800         (lsscm_make_lazy_string_smob): Add assert.
13801         (lsscm_make_lazy_string): Flag bad length values.
13802         (lsscm_elt_type): New function.
13803         (gdbscm_lazy_string_to_value): Rewrite to use
13804         lsscm_safe_lazy_string_to_value.
13805         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13806         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13807         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13808         in incoming type.
13809         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13810         * guile/scm-type.c (tyscm_scm_to_type): New function.
13811
13812 2017-03-15  Doug Evans  <dje@google.com>
13813
13814         PR python/17728, python/18439, python/18779
13815         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13816         member.  Change type of TYPE member to PyObject *.  All uses updated.
13817         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13818         (gdbpy_create_lazy_string_object): Flag bad length values.
13819         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13820         Handle typedefs in incoming type.
13821         (stpy_lazy_string_elt_type): New function.
13822         (gdbpy_extract_lazy_string): Call it.
13823         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13824         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13825         typedefs in incoming type.
13826
13827 2017-03-16  Doug Evans  <dje@google.com>
13828
13829         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13830         * guile/scm-type.c (tyscm_scm_to_type): New function.
13831
13832 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13833
13834         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13835         "ULONGEST" for "skip".
13836
13837 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13838
13839         PR gdb/21220
13840         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13841         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13842         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13843         over ptrace peek/poke until end of buffer or error.
13844
13845 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13846
13847         * parse.c (length_of_subexp): Make static.
13848         * parser-defs.h (length_of_subexp): Remove.
13849
13850 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13851
13852         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13853         as well.
13854
13855 2017-03-14  Pedro Alves  <palves@redhat.com>
13856
13857         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13858         (main): Use std::unique_ptr.  Remove calls to
13859         cp_demangled_name_parse_free.
13860
13861 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13862
13863         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13864         alphabsd_store_inferior_registers): Use regcache->ptid instead
13865         of inferior_ptid.
13866
13867 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13868
13869         * aix-thread.c (aix_thread_fetch_registers,
13870         aix_thread_store_registers): Use regcache->ptid instead of
13871         inferior_ptid.
13872
13873 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13874
13875         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13876         store_gregs_to_thread, fetch_fpregs_from_thread,
13877         store_fpregs_to_thread): Use regcache->ptid instead of
13878         inferior_ptid.
13879
13880 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13881
13882         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13883         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13884         instead of inferior_ptid.
13885
13886 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13887
13888         * target.c (target_fetch_registers, target_store_registers): Add
13889         assert.
13890
13891 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13892
13893         * regcache.h (regcache_get_ptid): New function.
13894         * regcache.c (regcache_get_ptid): New function.
13895
13896 2017-03-13  Mark Wielaard  <mark@klomp.org>
13897
13898         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13899
13900 2017-03-10  Keith Seitz  <keiths@redhat.com>
13901
13902         PR c++/8218
13903         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13904
13905 2017-03-08  Pedro Alves  <palves@redhat.com>
13906
13907         PR gdb/18360
13908         * infrun.c (start_step_over, do_target_resume, resume)
13909         (restart_threads): Assert we're not resuming a thread that is
13910         meant to be stopped.
13911         (infrun_thread_stop_requested_callback): Delete.
13912         (infrun_thread_stop_requested): If the thread is internally
13913         stopped, queue a pending stop event and clear the thread's
13914         inline-frame state.
13915         (handle_stop_requested): New function.
13916         (handle_syscall_event, handle_inferior_event_1): Use
13917         handle_stop_requested.
13918         (handle_stop_requested): New function.
13919         (handle_signal_stop): Set the thread's stop_signal here instead of
13920         at caller.
13921         (finish_step_over): Clear step over info unconditionally.
13922         (handle_signal_stop): If the user had interrupted the event
13923         thread, consider the stop a random signal.
13924         (handle_signal_stop) <signal arrived while stepping over
13925         breakpoint>: Don't restart threads here.
13926         (stop_waiting): Don't clear step-over info here.
13927
13928 2017-03-08  Pedro Alves  <palves@redhat.com>
13929
13930         PR 21206
13931         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13932         goes to argument 2, not 1.
13933
13934 2017-03-08  Pedro Alves  <palves@redhat.com>
13935
13936         PR cli/21218
13937         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13938         display_gdb_prompt.
13939         (command_line_input): Add comment.
13940
13941 2017-03-08  Pedro Alves  <palves@redhat.com>
13942
13943         PR tui/21216
13944         * tui/tui-file.c (tui_file::write): New.
13945         * tui/tui-file.h (tui_file): Override "write".
13946         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13947         factored out from ...
13948         (tui_puts): ... here.
13949         (tui_putc): Use them.
13950         (tui_write): New function.
13951         * tui/tui-io.h (tui_write): Declare.
13952
13953 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13954
13955         * Makefile.in (SFILES): Replace "environ.c" with
13956         "common/environ.c".
13957         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13958         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13959         to...
13960         * common/environ.c: ... here.
13961         * environ.h: Moved to...
13962         * common/environ.h: ... here.
13963
13964 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13965
13966         * gdbarch.sh (pstring_ptr): New static function.
13967         (gdbarch_disassembler_options): Use it.
13968         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13969         not valid_disassembler_option->name.
13970         * gdbarch.c: Regenerate.
13971
13972 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13973
13974         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13975
13976 2017-03-07  Pedro Alves  <palves@redhat.com>
13977
13978         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13979
13980 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13981
13982         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13983         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13984         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13985         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13986
13987 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13988
13989         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13990
13991 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13992
13993         * remote.c (remote_add_target_side_commands): Use range-based
13994         for loop.
13995
13996 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13997
13998         PR gdb/21165
13999         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14000         value is lazy.
14001         * valprint.c (common_val_print): Likewise.
14002
14003 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
14004
14005         * NEWS: Mention new set/show disassembler-options commands.
14006         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14007         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14008         (prospective_options): New static variable.
14009         (gdb_disassembler::gdb_disassembler): Initialize
14010         m_di.disassembler_options.
14011         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14012         (get_disassembler_options): New function.
14013         (set_disassembler_options): Likewise.
14014         (set_disassembler_options_sfunc): Likewise.
14015         (show_disassembler_options_sfunc): Likewise.
14016         (disassembler_options_completer): Likewise.
14017         (_initialize_disasm): Likewise.
14018         * disasm.h (get_disassembler_options): New prototype.
14019         (set_disassembler_options): Likewise.
14020         * gdbarch.sh (gdbarch_disassembler_options): New variable.
14021         (gdbarch_verify_disassembler_options): Likewise.
14022         * gdbarch.c: Regenerate.
14023         * gdbarch.h: Likewise.
14024         * arm-tdep.c (num_disassembly_options): Delete.
14025         (set_disassembly_style): Likewise.
14026         (arm_disassembler_options): New static variable.
14027         (set_disassembly_style_sfunc): Convert short style name into long
14028         option name.  Call set_disassembler_options.
14029         (show_disassembly_style_sfunc): New function.
14030         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14031         set_gdbarch_verify_disassembler_options.
14032         (_initialize_arm_tdep): Delete regnames variable and update callers.
14033         (arm_disassembler_options): Initialize.
14034         (disasm_options): New variable.
14035         (num_disassembly_options): Rename from this...
14036         (num_disassembly_styles): ...to this.  Compute by scanning through
14037         disasm_options.
14038         (valid_disassembly_styles): Initialize using disasm_options.
14039         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14040         set_arm_regname_option.
14041         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14042         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14043         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14044         set_gdbarch_verify_disassembler_options.
14045         * s390-tdep.c (s390_disassembler_options): New static variable.
14046         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14047         set_gdbarch_verify_disassembler_options.
14048
14049 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
14050
14051         * remote.c (remote_add_target_side_condition): Remove "struct"
14052         keyword from range-based for loop.
14053
14054 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
14055
14056         * remote.c (remote_add_target_side_condition): Use range-based
14057         for loop.  Update comment.
14058
14059 2017-02-27  Yao Qi  <yao.qi@linaro.org>
14060
14061         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14062
14063 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
14064
14065         * regcache.c (regcache_raw_update): New function.
14066         (regcache_raw_read): Move code to regcache_raw_update.
14067         * regcache.h (regcache_raw_update): New declaration.
14068         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14069
14070 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
14071
14072         * dwarf2read.c (create_debug_type_hash_table): Initialize
14073         header.signature and header.type_offset_in_tu.
14074
14075 2017-02-24  Pedro Alves  <palves@redhat.com>
14076
14077         * symtab.c (make_file_symbol_completion_list_1): Use
14078         add_symtab_completions.
14079
14080 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
14081
14082         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14083
14084 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
14085
14086         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14087         I386_MAX_REGISTER_SIZE.
14088         (i386_pseudo_register_write): Likewise.
14089         (i386_process_record): Likewise.
14090         * i387-tdep.c (i387_supply_xsave): Likewise.
14091         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14092         (store_register): Likewise.
14093
14094 2017-02-23  Pedro Alves  <palves@redhat.com>
14095
14096         * ada-lang.c: Include "common/function-view.h".
14097         (ada_iterate_over_symbols): Adjust to use function_view as
14098         callback type.
14099         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14100         (ada_make_symbol_completion_list): Use a lambda.
14101         (ada_exc_search_name_matches): Delete.
14102         (name_matches_regex): New.
14103         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14104         * compile/compile-c-support.c: Include "common/function-view.h".
14105         (print_one_macro): Change prototype to accept a ui_file pointer.
14106         (write_macro_definitions): Use a lambda.
14107         * dwarf2read.c: Include "common/function-view.h".
14108         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14109         (dw2_expand_symtabs_matching): Adjust to use function_view as
14110         callback type.
14111         * language.h: Include "common/function-view.h".
14112         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14113         function_view as callback type.
14114         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14115         * linespec.c: Include "common/function-view.h".
14116         (collect_info::add_symbol): New method.
14117         (struct symbol_and_data_callback, iterate_inline_only, struct
14118         symbol_matcher_data, iterate_name_matcher): Delete.
14119         (iterate_over_all_matching_symtabs): Adjust to use function_view
14120         as callback type and lambdas.
14121         (iterate_over_file_blocks): Adjust to use function_view as
14122         callback type.
14123         (decode_compound_collector): Now a class with private fields.
14124         (decode_compound_collector::release_symbols): New method.
14125         (collect_one_symbol): Rename to...
14126         (decode_compound_collector::operator()): ... this and adjust.
14127         (lookup_prefix_sym): decode_compound_collector construction bits
14128         move to decode_compound_collector ctor.  Pass the
14129         decode_compound_collector object directly as callback.  Remove
14130         cleanups and use decode_compound_collector::release_symbols
14131         instead.
14132         (symtab_collector): Now a class with private fields.
14133         (symtab_collector::release_symtabs): New method.
14134         (add_symtabs_to_list): Rename to...
14135         (symtab_collector::operator()): ... this and adjust.
14136         (collect_symtabs_from_filename): symtab_collector construction
14137         bits move to symtab_collector ctor.  Pass the symtab_collector
14138         object directly as callback.  Remove cleanups and use
14139         symtab_collector::release_symtabs instead.
14140         (collect_symbols): Delete.
14141         (add_matching_symbols_to_info): Use lambdas.
14142         * macrocmd.c (print_macro_callback): Delete.
14143         (info_macro_command): Use a lambda.
14144         (info_macros_command): Pass print_macro_definition as callable
14145         directly.
14146         (print_one_macro): Remove 'ignore' parameter.
14147         (macro_list_command): Adjust.
14148         * macrotab.c (macro_for_each_data::fn): Now a function_view.
14149         (macro_for_each_data::user_data): Delete field.
14150         (foreach_macro): Adjust to call the function_view.
14151         (macro_for_each): Adjust to use function_view as callback type.
14152         (foreach_macro_in_scope): Adjust to call the function_view.
14153         (macro_for_each_in_scope): Adjust to use function_view as callback
14154         type.
14155         * macrotab.h: Include "common/function-view.h".
14156         (macro_callback_fn): Declare a prototype instead of a pointer.
14157         Remove "user_data" parameter.
14158         (macro_for_each, macro_for_each_in_scope): Adjust to use
14159         function_view as callback type.
14160         * psymtab.c (partial_map_expand_apply)
14161         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14162         Adjust to use function_view as callback type and to return bool.
14163         (psym_expand_symtabs_matching): Adjust to use function_view as
14164         callback types.
14165         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14166         to use function_view as callback type and to return bool.
14167         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14168         callback types.
14169         * symfile.c (expand_symtabs_matching): Adjust to use function_view
14170         as callback types.
14171         * symfile.h: Include "common/function-view.h".
14172         (expand_symtabs_file_matcher_ftype)
14173         (expand_symtabs_symbol_matcher_ftype)
14174         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14175         return bool.
14176         (quick_symbol_functions::map_symtabs_matching_filename)
14177         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14178         function_view as callback type and return bool.
14179         (expand_symtabs_matching): Adjust to use function_view as callback
14180         type.
14181         (maintenance_expand_name_matcher)
14182         (maintenance_expand_file_matcher): Delete.
14183         (maintenance_expand_symtabs): Use lambdas.
14184         * symtab.c (iterate_over_some_symtabs): Adjust to use
14185         function_view as callback types and return bool.
14186         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
14187         of a cleanup.
14188         (lookup_symtab_callback): Delete.
14189         (lookup_symtab): Use a lambda.
14190         (iterate_over_symbols): Adjust to use function_view as callback
14191         type.
14192         (struct search_symbols_data, search_symbols_file_matches)
14193         (search_symbols_name_matches): Delete.
14194         (search_symbols): Use a pair of lambdas.
14195         (struct add_name_data, add_macro_name, symbol_completion_matcher)
14196         (symtab_expansion_callback): Delete.
14197         (default_make_symbol_completion_list_break_on_1): Use lambdas.
14198         * symtab.h: Include "common/function-view.h".
14199         (iterate_over_some_symtabs): Adjust to use function_view as
14200         callback type and return bool.
14201         (iterate_over_symtabs): Adjust to use function_view as callback
14202         type.
14203         (symbol_found_callback_ftype): Remove 'data' parameter and return
14204         bool.
14205         (iterate_over_symbols): Adjust to use function_view as callback
14206         type.
14207
14208 2017-02-23  Pedro Alves  <palves@redhat.com>
14209
14210         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14211         (%.o) <unittests/%.c>: New pattern.
14212         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14213         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14214         * common/function-view.h: New file.
14215         * unittests/function-view-selftests.c: New file.
14216         * configure: Regenerate.
14217
14218 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
14219
14220         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14221         inferior_ptid.
14222         * go32-nat.c (go32_thread_alive): Likewise.
14223
14224 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14225
14226         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14227         delete.
14228
14229 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14230
14231         * varobj.c (varobj_clear_saved_item): Use delete instead of
14232         xfree.
14233         (update_dynamic_varobj_children): Likewise.
14234
14235 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14236
14237         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14238
14239 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
14240
14241         * common/enum-flags.h (enum_flags::enum_flags): Initialize
14242         m_enum_value to 0 in default constructor.
14243
14244 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
14245
14246         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14247         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14248         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14249         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14250         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14251         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14252         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14253         IS_STORE_CONDITIONAL_INSN.
14254
14255 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14256
14257         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14258
14259 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14260
14261         * NEWS (Changes since GDB 7.12): Add DWARF-5.
14262
14263 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14264
14265         * dwarf2read.c (skip_one_die, read_attribute_value)
14266         (dwarf2_const_value_attr, dump_die_shallow)
14267         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14268         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14269
14270 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14271
14272         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14273         (dwarf_parse_macro_header): Accept DWARF version 5.
14274         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14275
14276 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14277
14278         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14279         DW_AT_GNU_*.
14280         * common/common-exceptions.h (enum errors): Likewise.
14281         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14282         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14283         (dwarf_expr_context::execute_stack_op): Likewise.
14284         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14285         Likewise.
14286         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14287         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14288         (show_entry_values_debug, call_site_to_target_addr)
14289         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14290         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14291         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14292         (value_of_dwarf_block_entry, indirect_pieced_value)
14293         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14294         (disassemble_dwarf_expression): Likewise.
14295         * dwarf2read.c (process_die, inherit_abstract_dies)
14296         (read_call_site_scope): Likewise.
14297         * gdbtypes.h (struct func_type, struct call_site_parameter)
14298         (struct call_site): Likewise.
14299         * stack.c (read_frame_arg): Likewise.
14300         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14301
14302 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14303
14304         * defs.h (read_unsigned_leb128): New declaration.
14305         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14306         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14307         (dwarf2_find_location_expression): Call also
14308         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
14309         * dwarf2loc.h (dwarf2_version): New declaration.
14310         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14311         rnglists.
14312         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14313         .debug_rnglists.
14314         (struct dwop_section_names): Add loclists_dwo.
14315         (dwop_section_names): Add .debug_loclists.dwo.
14316         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14317         (struct dwarf2_per_cu_data): Add dwarf_version.
14318         (struct dwo_sections): Add loclists.
14319         (struct attr_abbrev): Add implicit_const.
14320         (read_indirect_line_string): New declaration.
14321         (read_unsigned_leb128): Delete declaration.
14322         (rcuh_kind): New definition.
14323         (read_and_check_comp_unit_head): Change parameter
14324         is_debug_types_section to section_kind.
14325         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14326         (read_comp_unit_head): Change parameter abfd to section, add parameter
14327         section_kind.  Handle DWARF-5.
14328         (error_check_comp_unit_head): Accept also DWARF version 5.
14329         (read_and_check_comp_unit_head): Change parameter
14330         is_debug_types_section to section_kind.
14331         (read_and_check_type_unit_head): Delete function.
14332         (read_abbrev_offset): Handle DWARF-5.
14333         (create_debug_type_hash_table): Add parameter section_kind.  Process
14334         only DW_UT_type.  Use signature and type_offset_in_tu from struct
14335         comp_unit_head.
14336         (create_debug_types_hash_table): Update create_debug_type_hash_table
14337         caller.
14338         (create_all_type_units): Call create_debug_type_hash_table.
14339         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14340         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14341         caller.
14342         (skip_one_die): Handle DW_FORM_implicit_const.
14343         (dwarf2_rnglists_process): New function.
14344         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14345         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14346         (read_attribute_value): Handle DW_FORM_implicit_const,
14347         DW_FORM_line_strp.
14348         (read_attribute): Handle DW_FORM_implicit_const.
14349         (read_indirect_string_at_offset_from): New function from
14350         read_indirect_string_at_offset.
14351         (read_indirect_string_at_offset): Call
14352         read_indirect_string_at_offset_from.
14353         (read_indirect_line_string_at_offset): New function.
14354         (read_indirect_string): New function comment.
14355         (read_indirect_line_string): New function.
14356         (read_unsigned_leb128): Make it global.
14357         (dwarf2_string_attr): Handle DWARF-5.
14358         (add_include_dir_stub, read_formatted_entries): New functions.
14359         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14360         Handle DWARF-5.
14361         (per_cu_header_read_in): Update read_comp_unit_head caller.
14362         (dwarf2_version): New function.
14363         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14364         rnglists.
14365         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14366         fields.
14367
14368 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14369
14370         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14371
14372 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14373
14374         * dwarf2read.c (dwarf2_ranges_process): New function from
14375         dwarf2_ranges_read.
14376         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14377         dwarf2_ranges_process.
14378
14379 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14380
14381         * dwarf2read.c (create_debug_type_hash_table): New function from
14382         create_debug_types_hash_table.
14383         (create_debug_types_hash_table): Call create_debug_type_hash_table.
14384         (create_all_type_units, open_and_init_dwo_file): Update
14385         create_debug_types_hash_table callers.
14386
14387 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14388
14389         PR gdb/16188
14390         * fork-child.c (trace_start_error): Fix thinko.  va_end should
14391         refer to 'ap', not 'args'.
14392
14393 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14394             Pedro Alves  <palves@redhat.com>
14395
14396         PR gdb/16188
14397         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14398         calls succeeded.
14399         * fork-child.c (trace_start_error): New function.
14400         (trace_start_error_with_name): Likewise.
14401         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14402         * inf-ptrace.c (inf_ptrace_me): Likewise.
14403         * inferior.h (trace_start_error): New prototype.
14404         (trace_start_error_with_name): Likewise.
14405
14406 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
14407
14408         PR gdb/21164
14409         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14410         NULL before using it.
14411         * symmisc.c (maintenance_print_symbols): Likewise.
14412         (maintenance_print_msymbols): Likewise.
14413
14414 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14415
14416         * NEWS: Add record Python bindings entry.
14417
14418 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14419
14420         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14421         py-record-full.o.
14422         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14423         * python/py-record-btrace.c, python/py-record-btrace.h,
14424         python/py-record-full.c, python/py-record-full.h: New file.
14425         * python/py-record.c: Add include for py-record-btrace.h and
14426         py-record-full.h.
14427         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14428         recpy_instruction_history, recpy_function_call_history, recpy_begin,
14429         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14430         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14431         New definition.
14432         (gdbpy_initialize_btrace): New export.
14433         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14434
14435 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14436
14437         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14438         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14439         * python/py-record.c: New file.
14440         * python/python-internal.h (gdbpy_start_recording,
14441         gdbpy_current_recording, gdpy_stop_recording,
14442         gdbpy_initialize_record): New export.
14443         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14444         (python_GdbMethods): Add gdbpy_start_recording,
14445         gdbpy_current_recording and gdbpy_stop_recording.
14446
14447 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14448
14449         * record-btrace.c (record_btrace_record_method): New function.
14450         (init_record_btrace_ops): Initialize to_record_method.
14451         * record-full.c (record_full_record_method): New function.
14452         (init_record_full_ops, init_record_full_core_ops): Add
14453         record_full_record_method.
14454         * record.h (enum record_method): New enum.
14455         * target-debug.h (target_debug_print_enum_record_method: New define.
14456         * target-delegates.c: Regenerate.
14457         * target.c (target_record_method): New function.
14458         * target.h: Include record.h.
14459         (struct target_ops) <to_record_method>: New field.
14460         (target_record_method): New export.
14461
14462 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14463
14464         * record.h (record_start, record_stop): New export.
14465         * record.c (record_start, record_stop): New function.
14466
14467 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14468
14469         * btrace.c (btrace_fetch): Copy function call segments pointer
14470         into a vector.
14471         (btrace_clear): Clear the vector.
14472         (btrace_find_insn_by_number): Use binary search to find the correct
14473         function call segment.
14474         * btrace.h (brace_fun_p): New typedef.
14475         (struct btrace_thread_info) <functions>: New field.
14476
14477 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14478
14479         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14480         * btrace.c (btrace_decode_error): ... here.  New function.
14481         * btrace.h (btrace_decode_error): New export.
14482
14483 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14484
14485         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14486         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14487         btrace_find_insn_by_number): Remove special case for gaps.
14488         * btrace.h (btrace_insn_get_error): New export.
14489         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14490         * record-btrace.c (btrace_insn_history): Print number for gaps.
14491         (record_btrace_info, record_btrace_goto): Handle gaps.
14492
14493 2017-02-14  Tom Tromey  <tom@tromey.com>
14494
14495         PR python/13598:
14496         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14497         event.
14498         * python/py-evts.c (gdbpy_initialize_py_events): Add
14499         before_prompt registry.
14500         * python/py-events.h (events_object) <before_prompt>: New field.
14501
14502 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14503
14504         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14505
14506 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14507
14508         * symfile (_initialize_symfile): Add usage text to the load command's
14509         help text.
14510
14511 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14512
14513         * utils.c (defaulted_query): Don't query on secondary UIs.
14514
14515 2017-02-10  Tom Tromey  <tom@tromey.com>
14516
14517         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14518
14519 2017-02-10  Tom Tromey  <tom@tromey.com>
14520
14521         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14522         "cleanup" local.
14523         * python/py-type.c (typy_legacy_template_argument): Remove
14524         unnecessary "cleanup" local.
14525
14526 2017-02-10  Tom Tromey  <tom@tromey.com>
14527
14528         * python/python.c (do_start_initialization): New function, from
14529         _initialize_python.
14530         (_initialize_python): Call do_start_initialization.
14531         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14532         goto.
14533
14534 2017-02-10  Tom Tromey  <tom@tromey.com>
14535
14536         * python/py-prettyprint.c (pretty_print_one_value): Use
14537         gdbpy_ref.
14538
14539 2017-02-10  Tom Tromey  <tom@tromey.com>
14540
14541         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14542         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14543         gdbpy_ref.
14544         * python/py-type.c (field_new): Use gdbpy_ref.
14545         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14546         gdbpy_ref.
14547         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14548         (py_free_pspace): Likewise.
14549         (pspace_to_pspace_object): Likewise.
14550         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14551         (py_free_objfile): Likewise.
14552         (objfile_to_objfile_object): Likewise.
14553         * python/py-inferior.c (delete_thread_object): Use
14554         gdbpy_ref.
14555         (infpy_read_memory): Likewise.
14556         (py_free_inferior): Likewise.
14557         * python/py-evtregistry.c (create_eventregistry_object): Use
14558         gdbpy_ref.
14559         * python/py-event.c (create_event_object): Use gdbpy_ref.
14560
14561 2017-02-10  Tom Tromey  <tom@tromey.com>
14562
14563         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14564         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14565         used.
14566         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14567         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14568         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14569         python/py-framefilter.c, python/py-function.c,
14570         python/py-inferior.c, python/py-infevents.c,
14571         python/py-linetable.c, python/py-newobjfileevent.c,
14572         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14573         python/py-signalevent.c, python/py-stopevent.c,
14574         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14575         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14576         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14577         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14578
14579 2017-02-10  Tom Tromey  <tom@tromey.com>
14580
14581         * ui-out.h (ui_out_emit_type): New class.
14582         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14583         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14584         and ui_out_emit_tuple.
14585         (enumerate_locals): Likewise.
14586         (py_mi_print_variables, py_print_locals, py_print_args): Use
14587         ui_out_emit_list.
14588         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14589         ui_out_emit_list.
14590         * common/gdb_optional.h: New file.
14591
14592 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14593
14594         * MAINTAINERS (Write After Approval): Update my e-mail address.
14595
14596 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14597
14598         PR gdb/21122
14599         * breakpoint.c (_initialize_breakpoint): Update the help description
14600         of the 'commands' command to indicate that it takes a list argument.
14601
14602 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14603
14604         * interps.c (current_interp_set_logging): Remove "return".
14605
14606 2017-02-09  Gary Benson  <gbenson@redhat.com>
14607
14608         * symtab.c (add_symtab_completions): Prevent NULL pointer
14609         dereference.
14610
14611 2017-02-08  Pedro Alves  <palves@redhat.com>
14612
14613         * interps.c (interp::interp): Remove reference to quiet_p.
14614         (interp_set): Make static.  Remove dead "Switching to" output
14615         code.
14616         (interp_quiet_p, interp_set_quiet): Delete.
14617         (interpreter_exec_cmd): Don't set the interpreter quiet.
14618         * interps.h (interp_quiet_p): Make static.
14619         (class interp) <quiet_p>: Remove field
14620
14621 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14622
14623         * cli/cli-decode.c (find_command_name_length): Make it extern.
14624         * cli/cli-decode.h (find_command_name_length): Declare.
14625         * cli/cli-script.c (command_name_equals, line_first_arg):
14626         New functions.
14627         (process_next_line): Use cli-decode to parse command names.
14628         (build_command_line): Make args a constant pointer.
14629
14630 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14631
14632         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14633         Remove case-insensitive search.
14634
14635 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14636
14637         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14638         at the end of the line.  Avoids an ARI warning.
14639
14640 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14641
14642         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14643         rdseed instructions.
14644         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14645
14646 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14647
14648         PR tdep/20936
14649         Provide and use sparc32 and sparc64 target description XML files.
14650         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14651         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14652         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14653         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14654         * features/sparc/sparc32-solaris.xml: New file.
14655         * features/sparc/sparc64-solaris.xml: New file.
14656         * features/sparc/sparc32-solaris.c: Generated.
14657         * features/sparc/sparc64-solaris.c: Generated.
14658         * sparc-tdep.h: Account for differences in target descriptions.
14659         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14660         (sparc32_register_type): Use target provided registers.
14661         (validate_tdesc_registers): New function.
14662         (sparc32_gdbarch_init): Use tdesc_has_registers.
14663         Set pseudoregister functions.
14664         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14665         (sparc64_register_type): Use target provided registers.
14666         (sparc64_init_abi): Set pseudoregister functions.
14667
14668 2017-02-03  Tom Tromey  <tom@tromey.com>
14669
14670         PR rust/21097:
14671         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14672         with a single member.
14673
14674 2017-02-03  Pedro Alves  <palves@redhat.com>
14675
14676         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14677         (cli_interp_base::~cli_interp_base): New.
14678         (cli_interp): New struct.
14679         (as_cli_interp): Cast the interp itself to cli_interp.
14680         (cli_interpreter_pre_command_loop): Rename to ...
14681         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14682         parameter.
14683         (cli_interpreter_init): Rename to ...
14684         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14685         boolean.  Make extern.
14686         (cli_interpreter_resume): Rename to ...
14687         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14688         extern.
14689         (cli_interpreter_suspend): Rename to ...
14690         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14691         extern.
14692         (cli_interpreter_exec): Rename to ...
14693         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14694         extern.
14695         (cli_interpreter_supports_command_editing): Rename to ...
14696         (cli_interp_base::supports_command_editing): ... this.  Remove
14697         'interp' parameter.  Make extern.
14698         (cli_ui_out): Rename to ...
14699         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14700         Make extern.
14701         (cli_set_logging): Rename to ...
14702         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14703         parameter.  Make extern.
14704         (cli_interp_procs): Delete.
14705         (cli_interp_factory): Adjust to use "new".
14706         * cli/cli-interp.h: Include "interps.h".
14707         (struct cli_interp_base): New struct.
14708         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14709         (interp_new): Delete.
14710         (interp::interp, interp::~interp): New.
14711         (interp_set): Use bool, and return void.  Assume the interpreter
14712         has suspend, init and resume methods, and that the all return
14713         void.
14714         (set_top_level_interpreter): interp_set returns void.
14715         (interp_ui_out): Adapt.
14716         (current_interp_set_logging): Adapt.
14717         (interp_data): Delete.
14718         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14719         (interp_exec): Adapt.
14720         (top_level_interpreter_data): Delete.
14721         * interps.h (interp_init_ftype, interp_resume_ftype)
14722         (interp_suspend_ftype, interp_exec_ftype)
14723         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14724         (class interp): New.
14725         (interp_new): Delete.
14726         (interp_set): Now returns void.  Use bool.
14727         (interp_data, top_level_interpreter_data): Delete.
14728         * mi/mi-common.h: Include interps.h.
14729         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14730         init, resume, suspect, exec, interp_ui_out, set_logging and
14731         pre_command_loop methods.
14732         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14733         (mi_interpreter_init): Rename to ...
14734         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14735         bool, return void and make extern.  Adjust.
14736         (mi_interpreter_resume): ... Rename to ...
14737         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14738         return void and make extern.  Adjust.
14739         (mi_interpreter_suspend): ... Rename to ...
14740         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14741         return void and make extern.  Adjust.
14742         (mi_interpreter_exec): ... Rename to ...
14743         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14744         extern.  Adjust.
14745         (mi_interpreter_pre_command_loop): ... Rename to ...
14746         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14747         parameter and make extern.
14748         (mi_on_normal_stop_1): Adjust.
14749         (mi_ui_out): Rename to ...
14750         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14751         parameter and make extern.  Adjust.
14752         (mi_set_logging): Rename to ...
14753         (mi_interp::set_logging): ... this.  Remove the 'interp'
14754         parameter and make extern.  Adjust.
14755         (mi_interp_procs): Delete.
14756         (mi_interp_factory): Adjust to use 'new'.
14757         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14758         (mi_print_exception, mi_execute_command, mi_load_progress):
14759         Adjust.
14760         * tui/tui-interp.c (tui_interp): New class.
14761         (as_tui_interp): Return a tui_interp pointer.
14762         (tui_on_normal_stop, tui_on_signal_received)
14763         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14764         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14765         to use interp::interp_ui_out.
14766         (tui_init): Rename to ...
14767         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14768         bool, return void and make extern.  Adjust.
14769         (tui_resume): Rename to ...
14770         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14771         return void and make extern.  Adjust.
14772         (tui_suspend): Rename to ...
14773         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14774         return void and make extern.  Adjust.
14775         (tui_ui_out): Rename to ...
14776         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14777         parameter, and make extern.  Adjust.
14778         (tui_exec): Rename to ...
14779         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14780         make extern.
14781         (tui_interp_procs): Delete.
14782         (tui_interp_factory): Use "new".
14783
14784 2017-02-02  Tom Tromey  <tom@tromey.com>
14785
14786         * rust-exp.y (ends_raw_string, space_then_number)
14787         (rust_identifier_start_p): Return bool.
14788         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14789         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14790         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14791         (rust_chartype_p): Return bool.
14792         (val_print_struct, rust_print_struct_def, rust_print_type):
14793         Update.
14794         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14795         Return bool.
14796
14797 2017-02-02  Tom Tromey  <tom@tromey.com>
14798
14799         * rust-lang.c: Reindent.
14800
14801 2017-02-02  Tom Tromey  <tom@tromey.com>
14802
14803         * rust-lang.h (rust_crate_for_block): Update.
14804         * rust-lang.c (rust_crate_for_block): Return std::string.
14805         (rust_get_disr_info): Use std:;string, not
14806         gdb::unique_xmalloc_ptr.
14807         * rust-exp.y (crate_name): Update.
14808
14809 2017-02-02  Pedro Alves  <palves@redhat.com>
14810
14811         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14812         field out of gdb_disassembler_test and make it static.
14813
14814 2017-02-02  Pedro Alves  <palves@redhat.com>
14815
14816         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14817         mi1_interp and mi_interp fields.
14818
14819 2017-02-02  Pedro Alves  <palves@redhat.com>
14820
14821         * cli/cli-interp.c (struct saved_output_files, saved_output):
14822         Moved from cli/cli-logging.c.
14823         (cli_set_logging): New function.
14824         (cli_interp_procs): Install cli_set_logging.
14825         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14826         Declare.
14827         * cli/cli-logging.c (struct saved_output_files, saved_output):
14828         Moved to cli/cli-interp.c.
14829         (pop_output_files): Don't save outputs here.
14830         (make_logging_output): New function.
14831         (handle_redirections): Don't build tee nor save previous outputs
14832         here.
14833         * interps.c (current_interp_set_logging): Change prototype.
14834         Assume there's always a set_logging_proc method installed.
14835         * interps.h (interp_set_logging_ftype): Change prototype.
14836         (current_interp_set_logging): Change prototype and adjust comment.
14837         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14838         use make_logging_output.
14839         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14840 2017-02-02  Pedro Alves  <palves@redhat.com>
14841
14842         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14843         from ...
14844         (set_logging_overwrite): ... here.
14845         (logging_no_redirect_file): Delete.
14846         (set_logging_redirect): Don't handle redirection on the fly.
14847         Instead warn that "logging off" / "logging on" is necessary.
14848         (pop_output_files): Delete references to logging_no_redirect_file.
14849         (show_logging_command): Always speak in terms of what will happen
14850         once logging is reenabled.
14851
14852 2017-02-02  Pedro Alves  <palves@redhat.com>
14853
14854         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14855
14856 2017-02-02  Pedro Alves  <palves@redhat.com>
14857
14858         * disasm.c (gdb_pretty_print_insn): Rename to ...
14859         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14860         Remove gdbarch parameter.  Adapt to clear the object's buffers
14861         instead of allocating new buffers, and to print using the object's
14862         gdb_disassembler instead of calling gdb_print_insn.
14863         (dump_insns): Use gdb_pretty_print_disassembler.
14864         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14865         (gdb_pretty_print_disassembler): New class.
14866         * record-btrace.c (btrace_insn_history): Use
14867         gdb_pretty_print_disassembler.
14868
14869 2017-02-02  Pedro Alves  <palves@redhat.com>
14870
14871         * ada-lang.c (type_as_string): Use string_file.
14872         * ada-valprint.c (ada_print_floating): Use string_file.
14873         * ada-varobj.c (ada_varobj_scalar_image)
14874         (ada_varobj_get_value_image): Use string_file.
14875         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14876         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14877         * breakpoint.c (update_inserted_breakpoint_locations)
14878         (insert_breakpoint_locations, reattach_breakpoints)
14879         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14880         (print_it_watchpoint): Use string_file.
14881         (save_breakpoints): Use stdio_file.
14882         * c-exp.y (oper): Use string_file.
14883         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14884         tee_file.
14885         (pop_output_files): Use delete.
14886         (handle_redirections): Use stdio_file and tee_file.
14887         * cli/cli-setshow.c (do_show_command): Use string_file.
14888         * compile/compile-c-support.c (c_compute_program): Use
14889         string_file.
14890         * compile/compile-c-symbols.c (generate_vla_size): Take a
14891         'string_file &' instead of a 'ui_file *'.
14892         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14893         of a 'ui_file *'.  Use string_file.
14894         (generate_c_for_variable_locations): Take a 'string_file &'
14895         instead of a 'ui_file *'.
14896         * compile/compile-internal.h (generate_c_for_for_one_variable):
14897         Take a 'string_file &' instead of a 'ui_file *'.
14898         * compile/compile-loc2c.c (push, pushf, unary, binary)
14899         (print_label, pushf_register_address, pushf_register)
14900         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14901         'ui_file *'.  Adjust.
14902         * compile/compile.c (compile_to_object): Use string_file.
14903         * compile/compile.h (compile_dwarf_expr_to_c)
14904         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14905         'ui_file *'.
14906         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14907         (replace_typedefs_qualified_name): Use string_file and
14908         obstack_copy0.
14909         * disasm.c (gdb_pretty_print_insn): Use string_file.
14910         (gdb_disassembly): Adjust reference the null_stream global.
14911         (do_ui_file_delete): Delete.
14912         (gdb_insn_length): Use null_stream.
14913         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14914         * dwarf2loc.c (dwarf2_compile_property_to_c)
14915         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14916         'string_file &' instead of a 'ui_file *'.
14917         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14918         * dwarf2read.c (do_ui_file_peek_last): Delete.
14919         (dwarf2_compute_name): Use string_file.
14920         * event-top.c (gdb_setup_readline): Use stdio_file.
14921         * gdbarch.sh (verify_gdbarch): Use string_file.
14922         * gdbtypes.c (safe_parse_type): Use null_stream.
14923         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14924         string_file.
14925         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14926         'string_file *' instead of a 'ui_file *'.
14927         (gdbscm_arch_disassemble): Use string_file.
14928         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14929         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14930         inherits from ui_file.
14931         (ioscm_file_port_delete, ioscm_file_port_rewind)
14932         (ioscm_file_port_put): Delete.
14933         (ioscm_file_port_write): Rename to ...
14934         (ioscm_file_port::write): ... this.  Remove file_port_magic
14935         checks.
14936         (ioscm_file_port_new): Delete.
14937         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14938         ui_file_up.
14939         * guile/scm-type.c (tyscm_type_name): Use string_file.
14940         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14941         Use string_file.
14942         * infcmd.c (print_return_value_1): Use string_file.
14943         * infrun.c (print_target_wait_results): Use string_file.
14944         * language.c (add_language): Use string_file.
14945         * location.c (explicit_to_string_internal): Use string_file.
14946         * main.c (captured_main_1): Use null_file.
14947         * maint.c (maintenance_print_architecture): Use stdio_file.
14948         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14949         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14950         event_channel>: Change type to mi_console_file pointer.
14951         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14952         (mi_console_file_delete): Delete.
14953         (struct mi_console_file): Delete.
14954         (mi_console_file_magic): Delete.
14955         (mi_console_file_new): Delete.
14956         (mi_console_file::mi_console_file): New.
14957         (mi_console_file_delete): Delete.
14958         (mi_console_file_fputs): Delete.
14959         (mi_console_file::write): New.
14960         (mi_console_raw_packet): Delete.
14961         (mi_console_file::flush): New.
14962         (mi_console_file_flush): Delete.
14963         (mi_console_set_raw): Rename to ...
14964         (mi_console_file::set_raw): ... this.
14965         * mi/mi-console.h (class mi_console_file): New class.
14966         (mi_console_file_new, mi_console_set_raw): Delete.
14967         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14968         (mi_set_logging): Use delete and tee_file.  Adjust.
14969         * mi/mi-main.c (output_register): Use string_file.
14970         (mi_cmd_data_evaluate_expression): Use string_file.
14971         (mi_cmd_data_read_memory): Use string_file.
14972         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14973         * mi/mi-out.c (mi_ui_out::main_stream): New.
14974         (mi_ui_out::rewind): Use main_stream and
14975         string_file.
14976         (mi_ui_out::put): Use main_stream and string_file.
14977         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14978         Allocate a 'string_file' instead.
14979         (mi_out_new): Don't allocate a mem_fileopen stream here.
14980         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14981         (mi_ui_out::main_stream): Declare method.
14982         * printcmd.c (eval_command): Use string_file.
14983         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14984         * python/py-arch.c (archpy_disassemble): Use string_file.
14985         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14986         * python/py-frame.c (frapy_str): Use string_file.
14987         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14988         Use string_file.
14989         * python/py-type.c (typy_str): Use string_file.
14990         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14991         * python/py-value.c (valpy_str): Use string_file.
14992         * record-btrace.c (btrace_insn_history): Use string_file.
14993         * regcache.c (regcache_print): Use stdio_file.
14994         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14995         * remote.c (escape_buffer): Use string_file.
14996         * rust-lang.c (rust_get_disr_info): Use string_file.
14997         * serial.c (serial_open_ops_1): Use stdio_file.
14998         (do_serial_close): Use delete.
14999         * stack.c (print_frame_arg): Use string_file.
15000         (print_frame_args): Remove local mem_fileopen stream, not used.
15001         (print_frame): Use string_file.
15002         * symmisc.c (maintenance_print_symbols): Use stdio_file.
15003         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15004         Take a 'string_file *' instead of a 'ui_file *'.
15005         * top.c (new_ui): Use stdio_file and stderr_file.
15006         (free_ui): Use delete.
15007         (execute_command_to_string): Use string_file.
15008         (quit_confirm): Use string_file.
15009         * tracepoint.c (collection_list::append_exp): Use string_file.
15010         * tui/tui-disasm.c (tui_disassemble): Use string_file.
15011         * tui/tui-file.c: Don't include "ui-file.h".
15012         (enum streamtype, struct tui_stream): Delete.
15013         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15014         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15015         (tui_file::tui_file): New method.
15016         (tui_file_fputs): Delete.
15017         (tui_file_get_strbuf): Delete.
15018         (tui_file::puts): New method.
15019         (tui_file_adjust_strbuf): Delete.
15020         (tui_file_flush): Delete.
15021         (tui_file::flush): New method.
15022         * tui/tui-file.h: Tweak intro comment.
15023         Include ui-file.h.
15024         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15025         (tui_file_adjust_strbuf): Delete declarations.
15026         (class tui_file): New class.
15027         * tui/tui-io.c (tui_initialize_io): Use tui_file.
15028         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15029         (tui_register_format): Use string_stream.
15030         * tui/tui-stack.c (tui_make_status_line): Use string_file.
15031         (tui_get_function_from_frame): Use string_file.
15032         * typeprint.c (type_to_string): Use string_file.
15033         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15034         (null_stream): New global.
15035         (ui_file_delete): Delete.
15036         (ui_file::ui_file): New.
15037         (null_file_isatty): Delete.
15038         (ui_file::~ui_file): New.
15039         (null_file_rewind): Delete.
15040         (ui_file::printf): New.
15041         (null_file_put): Delete.
15042         (null_file_flush): Delete.
15043         (ui_file::putstr): New.
15044         (null_file_write): Delete.
15045         (ui_file::putstrn): New.
15046         (null_file_read): Delete.
15047         (ui_file::putc): New.
15048         (null_file_fputs): Delete.
15049         (null_file_write_async_safe): Delete.
15050         (ui_file::vprintf): New.
15051         (null_file_delete): Delete.
15052         (null_file::write): New.
15053         (null_file_fseek): Delete.
15054         (null_file::puts): New.
15055         (ui_file_data): Delete.
15056         (null_file::write_async_safe): New.
15057         (gdb_flush, ui_file_isatty): Adjust.
15058         (ui_file_put, ui_file_rewind): Delete.
15059         (ui_file_write): Adjust.
15060         (ui_file_write_for_put): Delete.
15061         (ui_file_write_async_safe, ui_file_read): Adjust.
15062         (ui_file_fseek): Delete.
15063         (fputs_unfiltered): Adjust.
15064         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15065         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15066         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15067         (set_ui_file_data): Delete.
15068         (string_file::~string_file, string_file::write)
15069         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15070         (do_ui_file_as_string, ui_file_as_string): Delete.
15071         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15072         (struct mem_file): Delete.
15073         (mem_file_new): Delete.
15074         (stdio_file::stdio_file): New.
15075         (mem_file_delete): Delete.
15076         (stdio_file::stdio_file): New.
15077         (mem_fileopen): Delete.
15078         (stdio_file::~stdio_file): New.
15079         (mem_file_rewind): Delete.
15080         (stdio_file::set_stream): New.
15081         (mem_file_put): Delete.
15082         (stdio_file::open): New.
15083         (mem_file_write): Delete.
15084         (stdio_file_magic, struct stdio_file): Delete.
15085         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15086         (stdio_file::flush): New.
15087         (stdio_file_read): Rename to ...
15088         (stdio_file::read): ... this.  Adjust.
15089         (stdio_file_write): Rename to ...
15090         (stdio_file::write): ... this.  Adjust.
15091         (stdio_file_write_async_safe): Rename to ...
15092         (stdio_file::write_async_safe) ... this.  Adjust.
15093         (stdio_file_fputs): Rename to ...
15094         (stdio_file::puts) ... this.  Adjust.
15095         (stdio_file_isatty): Delete.
15096         (stdio_file_fseek): Delete.
15097         (stdio_file::isatty): New.
15098         (stderr_file_write): Rename to ...
15099         (stderr_file::write) ... this.  Adjust.
15100         (stderr_file_fputs): Rename to ...
15101         (stderr_file::puts) ... this.  Adjust.
15102         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15103         (stderr_file::stderr_file): New.
15104         (tee_file_magic): Delete.
15105         (struct tee_file): Delete.
15106         (tee_file::tee_file): New.
15107         (tee_file_new): Delete.
15108         (tee_file::~tee_file): New.
15109         (tee_file_delete): Delete.
15110         (tee_file_flush): Rename to ...
15111         (tee_file::flush): ... this.  Adjust.
15112         (tee_file_write): Rename to ...
15113         (tee_file::write): ... this.  Adjust.
15114         (tee_file::write_async_safe): New.
15115         (tee_file_fputs): Rename to ...
15116         (tee_file::puts): ... this.  Adjust.
15117         (tee_file_isatty): Rename to ...
15118         (tee_file::isatty): ... this.  Adjust.
15119         * ui-file.h (struct obstack, struct ui_file): Don't
15120         forward-declare.
15121         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15122         (ui_file_write_ftype)
15123         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15124         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15125         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15126         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15127         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15128         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15129         (set_ui_file_fseek): Delete.
15130         (ui_file_data, ui_file_delete, ui_file_rewind)
15131         (struct ui_file): New.
15132         (ui_file_up): New.
15133         (class null_file): New.
15134         (null_stream): Declare.
15135         (ui_file_write_for_put, ui_file_put): Delete.
15136         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15137         Delete.
15138         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15139         (gdb_fopen, tee_file_new): Delete.
15140         (struct string_file): New.
15141         (struct stdio_file): New.
15142         (stdio_file_up): New.
15143         (struct stderr_file): New.
15144         (class tee_file): New.
15145         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15146         of a 'ui_file *'.  Adjust.
15147         * ui-out.h (class ui_out) <field_stream>: Likewise.
15148         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15149         (null_stream): Delete.
15150         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15151         Adjust.
15152         * utils.h (struct ui_file): Delete forward declaration..
15153         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15154         (error_stream): Take a 'string_file &' instead of a
15155         'ui_file *'.
15156         * varobj.c (varobj_value_get_print_value): Use string_file.
15157         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15158         * gdbarch.c: Regenerate.
15159
15160 2017-02-02  Pedro Alves  <palves@redhat.com>
15161
15162         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15163         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
15164         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
15165         Adjust to call gdb_print_insn instead of
15166         gdb_disassembler::print_insn.
15167         (dump_insns, do_mixed_source_and_assembly_deprecated)
15168         (do_mixed_source_and_assembly, do_assembly_only): Add back a
15169         'gdbarch' parameter.  Remove gdb_disassembler parameter.
15170         (gdb_disassembly): Don't allocate a gdb_disassembler here.
15171         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15172         declaration.
15173         (gdb_pretty_print_insn): Re-add declaration.
15174         * record-btrace.c (btrace_insn_history): Don't allocate a
15175         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
15176
15177 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
15178
15179         * disasm.h (gdb_disassembly): Remove file_string parameter.
15180         * disasm.c (gdb_disassembly): Likewise.
15181         * cli/cli-cmds.c (print_disassembly): Adapt.
15182         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15183         * stack.c (do_gdb_disassembly): Likewise.
15184
15185 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15186
15187         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15188         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15189         targets.  And if the implicit value is longer than needed, extract
15190         the first bytes instead of the "least significant" ones.
15191
15192 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15193
15194         * btrace.c (btrace_enable): Do not call btrace_add_pc for
15195         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15196         (btrace_fetch): Assert can_access_registers_ptid.
15197         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15198         validate_registers_access.
15199
15200 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15201
15202         * gdbthread.h (can_access_registers_ptid): New.
15203         * thread.c (can_access_registers_ptid): New.
15204
15205 2017-02-01  Pedro Alves  <palves@redhat.com>
15206
15207         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15208
15209 2017-01-31  Pedro Alves  <palves@redhat.com>
15210
15211         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15212         Fix typos.
15213
15214 2017-01-31  Pedro Alves  <palves@redhat.com>
15215
15216         * stack.c (print_frame_args): Remove local mem_fileopen stream,
15217         not used.
15218
15219 2017-01-31  Pedro Alves  <palves@redhat.com>
15220
15221         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15222
15223 2017-01-31  Pedro Alves  <palves@redhat.com>
15224
15225         * common/scoped_restore.h
15226         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15227         change the value's parameter type to T2.
15228         (make_scoped_restore): Likewise.
15229
15230 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15231             Richard Henderson  <rth@redhat.com>
15232
15233         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15234         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15235         GS_BASE for older kernels.
15236         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15237         GS_BASE for older kernels.
15238         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15239         and GS_BASE to the offset table.
15240         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15241         system register group.
15242         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15243         for older kernels.
15244         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15245         amd64 ABI.
15246         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15247         AMD64_GSBASE_REGNUM.
15248         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15249         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15250         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15251         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15252         i386/64bit-segments.xml in those rules.
15253         * features/i386/64bit-segments.xml: New file.
15254         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15255         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15256         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15257         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15258         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15259         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15260         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15261         * features/i386/amd64-avx-linux.c: Regenerated.
15262         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15263         * features/i386/amd64-avx-mpx.c: Regenerated.
15264         * features/i386/amd64-avx512-linux.c: Regenerated.
15265         * features/i386/amd64-linux.c: Regenerated.
15266         * features/i386/amd64-mpx-linux.c: Regenerated.
15267         * features/i386/i386-avx-mpx-linux.c: Regenerated.
15268         * features/i386/i386-avx-mpx.c: Regenerated.
15269         * features/i386/x32-avx-linux.c: Regenerated.
15270         * features/i386/x32-avx512-linux.c: Regenerated.
15271         * regformats/i386/amd64-avx-linux.dat: Regenerated.
15272         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15273         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15274         * regformats/i386/amd64-linux.dat: Regenerated.
15275         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15276         * regformats/i386/x32-avx-linux.dat: Regenerated.
15277         * regformats/i386/x32-avx512-linux.dat: Regenerated.
15278         * regformats/i386/x32-linux.dat: Regenerated.
15279
15280 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15281
15282         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15283         Set to AMD64_NUM_REGS.
15284
15285 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15286
15287         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15288         that checks validity of a register number.
15289
15290 2017-01-27  Kees Cook  <keescook@google.com>
15291
15292         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15293         fetch_fpregs if target has fpa registers.
15294         (arm_linux_store_inferior_registers): Call store_fpregs if target
15295         has fpa registers.
15296
15297 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15298
15299         * cris-tdep.c (cris_gdbarch_init): Remove check for
15300         info.byte_order and force it to BFD_ENDIAN_LITTLE.
15301
15302 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
15303
15304         * corelow.c (get_core_register_section): Check for regset
15305         existence before checking for REGSET_VARIABLE_SIZE.
15306
15307 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15308             Pedro Alves  <palves@redhat.com>
15309
15310         PR gdb/20939
15311         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15312         call memory_error, save memaddr instead.
15313         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15314         negative, cal memory_error.
15315         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15316
15317 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15318
15319         * disasm-selftests.c (memory_error_test): New function.
15320         (_initialize_disasm_selftests): Register memory_error_test.
15321
15322 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15323
15324         * Makefile.in (SFILES): Add disasm-selftests.c and
15325         selftest-arch.c.
15326         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15327         * disasm-selftests.c: New file.
15328         * selftest-arch.c: New file.
15329         * selftest-arch.h: New file.
15330
15331 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15332
15333         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15334         to bfd_arch_mep.  Don't return 0 if section is not
15335         found.  Call print_insn_mep.
15336
15337 2017-01-26  Pedro Alves  <palves@redhat.com>
15338             Yao Qi  <yao.qi@linaro.org>
15339
15340         * arm-tdep.c: Include "disasm.h".
15341         (gdb_print_insn_arm): Update code to get gdbarch.
15342         * disasm.c (dis_asm_read_memory): Change it to
15343         gdb_disassembler::dis_asm_read_memory.
15344         (dis_asm_memory_error): Likewise.
15345         (dis_asm_print_address): Likewise.
15346         (gdb_pretty_print_insn): Change it to
15347         gdb_disassembler::pretty_print_insn.
15348         (dump_insns): Add one argument gdb_disassemlber.  All
15349         callers updated.
15350         (do_mixed_source_and_assembly_deprecated): Likewise.
15351         (do_mixed_source_and_assembly): Likewise.
15352         (do_assembly_only): Likewise.
15353         (gdb_disassembler::gdb_disassembler): New.
15354         (gdb_disassembler::print_insn): New.
15355         * disasm.h (class gdb_disassembler): New.
15356         (gdb_pretty_print_insn): Remove declaration.
15357         (gdb_disassemble_info): Likewise.
15358         * guile/scm-disasm.c (class gdbscm_disassembler): New.
15359         (gdbscm_disasm_read_memory_worker): Update.
15360         (gdbscm_disasm_read_memory): Update.
15361         (gdbscm_disasm_memory_error): Remove.
15362         (gdbscm_disasm_print_address): Remove.
15363         (gdbscm_disassembler::gdbscm_disassembler): New.
15364         (gdbscm_print_insn_from_port): Update.
15365         * mips-tdep.c: Include disasm.h.
15366         (gdb_print_insn_mips): Update code to get gdbarch.
15367         * record-btrace.c (btrace_insn_history): Update.
15368         * spu-tdep.c: Include disasm.h.
15369         (struct spu_dis_asm_data): Remove.
15370         (struct spu_dis_asm_info): New.
15371         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15372         SPU id.
15373         (gdb_print_insn_spu): Cast disassemble_info to
15374         spu_dis_asm_info.
15375
15376 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15377
15378         * disasm.c (do_ui_file_delete): Delete.
15379         (gdb_insn_length): Move code creating stream to ...
15380         * utils.c (null_stream): ... here.  New function.
15381         * utils.h (null_stream): Declare.
15382
15383 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
15384
15385         * python/py-inferior.c (find_thread_object): Return directly
15386         from the loop.  Remove "found" variable.
15387
15388 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
15389
15390         GDB 7.12.1 released.
15391
15392 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15393
15394         * python/py-function.c (fnpy_call): Reorder declarations to have
15395         the gdbpy_enter object declared first.
15396         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15397
15398 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15399
15400         PR python/21068
15401         * python/python-internal.h (PyMem_RawMalloc): Define for
15402         Python < 3.4.
15403         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15404         PyMem_RawMalloc instead of PyMem_Malloc.
15405
15406 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
15407             Luis Machado  <lgustavo@codesourcery.com>
15408
15409         * NEWS (New commands): Mention flash-erase.
15410         (New MI commands): Mention target-flash-erase.
15411         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15412         command.
15413         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15414         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15415         * target.c (flash_erase_command): New function.
15416         (initialize_targets): Add new flash-erase command.
15417         * target.h (flash_erase_command): New declaration.
15418
15419 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
15420
15421         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15422         HAVE_SYS_PROCFS_H is defined.
15423
15424 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15425
15426         * remote.c (struct cached_reg): Change data into a pointer.
15427         * (stop_reply_dtr): Free data pointers before deleting vector.
15428         (process_stop_reply): Likewise.
15429         (remote_parse_stop_reply): Allocate space for data
15430
15431 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15432
15433         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15434         MAX_REGISTER_SIZE.
15435         (amd64_pseudo_register_read_value): Likewise.
15436         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15437         (store_register_using_P): Likewise.
15438         * regcache.c (regcache_xfer_part): Likewise.
15439
15440 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
15441
15442         Split real and pseudo registers.
15443         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15444         (sparc32_pseudo_regnum): New enum.
15445         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15446         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15447         (SPARC32_CP0_REGISTERS): New macro.
15448         (sparc32_pseudo_register_name): New function.
15449         (sparc32_register_name): Use sparc32_pseudo_register_name.
15450         (sparc32_pseudo_register_type): New function.
15451         (sparc32_register_type): Use sparc32_pseudo_register_type.
15452         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15453         pseudo register numbers.
15454         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15455         (SPARC64_CP0_REGISTERS): New macro.
15456         (sparc64_pseudo_register_name): New function.
15457         (sparc64_register_name): Use sparc64_pseudo_register_name.
15458         (sparc64_pseudo_register_type): New function.
15459         (sparc64_register_type): Use sparc64_pseudo_register_type.
15460         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15461         pseudo register numbers.
15462         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15463         sparc64_store_arguments): Handle pseudo register numbers.
15464
15465 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15466
15467         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15468         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15469         output.
15470         (getpkt_or_notif_sane_1): Likewise.
15471
15472 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15473
15474         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15475         of CC.  Pass "-x c++-header" instead of "-x c".
15476
15477 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15478
15479         * remote.c (remote_can_async_p): Update comment.
15480
15481 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15482
15483         * linux-nat.c (linux_nat_can_async_p): Update comment.
15484
15485 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15486
15487         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15488
15489 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15490
15491         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15492
15493 2017-01-10  Tom Tromey  <tom@tromey.com>
15494
15495         * python/py-type.c (typy_legacy_template_argument): Update.
15496         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15497         ~demangle_parse_info): Declare new members.
15498         (cp_demangled_name_to_comp): Return unique_ptr.
15499         (cp_demangled_name_parse_free)
15500         (make_cleanup_cp_demangled_name_parse_free)
15501         (cp_new_demangle_parse_info): Remove.
15502         * cp-support.c (do_demangled_name_parse_free_cleanup)
15503         (make_cleanup_cp_demangled_name_parse_free): Remove.
15504         (inspect_type, cp_canonicalize_string_full)
15505         (cp_canonicalize_string): Update.
15506         (mangled_name_to_comp): Change return type.
15507         (cp_class_name_from_physname, method_name_from_physname)
15508         (cp_func_name, cp_remove_params): Update.
15509         * cp-name-parser.y (demangle_parse_info): New constructor, from
15510         cp_new_demangle_parse_info.
15511         (~demangle_parse_info): New destructor, from
15512         cp_demangled_name_parse_free.
15513         (cp_merge_demangle_parse_infos): Update.
15514         (cp_demangled_name_to_comp): Change return type.
15515
15516 2017-01-10  Tom Tromey  <tom@tromey.com>
15517
15518         * top.c (prevent_dont_repeat): Change return type.
15519         * python/python.c (execute_gdb_command): Use std::string.
15520         Update.
15521         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15522         * command.h (prevent_dont_repeat): Change return type.
15523         * breakpoint.c (bpstat_do_actions_1): Update.
15524
15525 2017-01-10  Tom Tromey  <tom@tromey.com>
15526
15527         * value.h (scoped_value_mark::~scoped_value_mark): Call
15528         free_to_mark.
15529         (scoped_value_mark::free_to_mark): New method.
15530         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15531         scoped_value_mark.
15532
15533 2017-01-10  Tom Tromey  <tom@tromey.com>
15534
15535         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15536         (valpy_reference_value, valpy_const_value, valpy_get_address)
15537         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15538         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15539         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15540         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15541         scoped_value_mark.
15542         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15543         * value.h (scoped_value_mark): New class.
15544
15545 2017-01-10  Tom Tromey  <tom@tromey.com>
15546
15547         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15548         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15549         * psymtab.c (discard_psymtabs_upto): Remove.
15550         (make_cleanup_discard_psymtabs): Remove.
15551         (struct psymtab_state): Remove.
15552
15553 2017-01-10  Tom Tromey  <tom@tromey.com>
15554
15555         * record-full.c (record_full_save_cleanups): Remove.
15556         (record_full_save): Use gdb::unlinker.
15557         * gcore.c (do_bfd_delete_cleanup): Remove.
15558         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15559         cleanups.
15560         * dwarf2read.c (unlink_if_set): Remove.
15561         (write_psymtabs_to_index): Use gdb::unlinker.
15562         * common/gdb_unlinker.h: New file.
15563
15564 2017-01-10  Tom Tromey  <tom@tromey.com>
15565
15566         * windows-tdep.c (windows_xfer_shared_library): Update.
15567         * windows-nat.c (windows_make_so): Update.
15568         * utils.h (make_cleanup_bfd_unref): Remove.
15569         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15570         * symfile.h (symfile_bfd_open)
15571         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15572         * symfile.c (read_symbols, symbol_file_add)
15573         (separate_debug_file_exists): Update.
15574         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15575         (generic_load, reread_symbols): Update.
15576         * symfile-mem.c (symbol_file_add_from_memory): Update.
15577         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15578         (spu_symbol_file_add_from_memory): Update.
15579         * solist.h (struct target_so_ops) <bfd_open>: Return
15580         gdb_bfd_ref_ptr.
15581         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15582         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15583         gdb_bfd_ref_ptr.
15584         (solib_map_sections, reload_shared_libraries_1): Update.
15585         * solib-svr4.c (enable_break): Update.
15586         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15587         * solib-frv.c (enable_break2): Update.
15588         * solib-dsbt.c (enable_break): Update.
15589         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15590         gdb_bfd_ref_ptr.
15591         (darwin_solib_get_all_image_info_addr_at_init): Update.
15592         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15593         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15594         * record-full.c (record_full_save): Update.
15595         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15596         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15597         * minidebug.c (find_separate_debug_file_in_section): Return
15598         gdb_bfd_ref_ptr.
15599         * machoread.c (macho_add_oso_symfile): Change abfd to
15600         gdb_bfd_ref_ptr.
15601         (macho_symfile_read_all_oso): Update.
15602         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15603         (macho_symfile_read): Update.
15604         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15605         (jit_bfd_try_read_symtab): Update.
15606         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15607         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15608         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15609         gdb_bfd_ref_ptr.
15610         (gdb_bfd_ref_policy): New struct.
15611         (gdb_bfd_ref_ptr): New typedef.
15612         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15613         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15614         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15615         gdb_bfd_ref_ptr.
15616         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15617         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15618         (gcore_command): Update.
15619         * exec.c (exec_file_attach): Update.
15620         * elfread.c (elf_symfile_read): Update.
15621         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15622         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15623         (open_and_init_dwo_file): Update.
15624         (open_dwp_file): Return gdb_bfd_ref_ptr.
15625         (open_and_init_dwp_file): Update.
15626         * corelow.c (core_open): Update.
15627         * compile/compile-object-load.c (compile_object_load): Update.
15628         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15629         * coffread.c (coff_symfile_read): Update.
15630         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15631         gdb_bfd_ref_ptr.  Rename.
15632         (dump_bfd_file, restore_command): Update.
15633         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15634         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15635         (find_separate_debug_file_by_buildid): Update.
15636
15637 2017-01-10  Tom Tromey  <tom@tromey.com>
15638
15639         * common/gdb_ref_ptr.h: New file.
15640         * python/py-ref.h (struct gdbpy_ref_policy): New.
15641         (gdbpy_ref): Now a typedef.
15642
15643 2017-01-10  Tom Tromey  <tom@tromey.com>
15644
15645         * utils.h (make_cleanup_htab_delete): Don't declare.
15646         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15647         Remove.
15648         * linespec.c (decode_compound_collector): Add constructor,
15649         destructor.
15650         (lookup_prefix_sym): Remove cleanup.
15651         (symtab_collector): Add constructor, destructor.
15652         (collect_symtabs_from_filename): Remove cleanup.
15653         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15654         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15655         Use htab_up.
15656         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15657         * dwarf2read.c (dw2_expand_symtabs_matching)
15658         (dw2_map_symbol_filenames, dwarf_decode_macros)
15659         (write_psymtabs_to_index): Use htab_up.
15660         * dwarf2loc.c (func_verify_no_selftailcall)
15661         (call_site_find_chain_1, func_verify_no_selftailcall)
15662         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15663         std::vector, gdb::unique_xmalloc_ptr.
15664         (call_sitep): Remove typedef.
15665         (dwarf2_locexpr_baton_eval): Remove unused variable.
15666
15667 2017-01-10  Tom Tromey  <tom@tromey.com>
15668
15669         * python/python-internal.h (make_cleanup_py_decref)
15670         (make_cleanup_py_xdecref): Don't declare.
15671         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15672         (py_xdecref, make_cleanup_py_xdecref): Remove.
15673
15674 2017-01-10  Tom Tromey  <tom@tromey.com>
15675
15676         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15677         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15678
15679 2017-01-10  Tom Tromey  <tom@tromey.com>
15680
15681         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15682
15683 2017-01-10  Tom Tromey  <tom@tromey.com>
15684
15685         * python/py-utils.c (unicode_to_encoded_string)
15686         (python_string_to_target_string)
15687         (python_string_to_target_python_string)
15688         (python_string_to_host_string, gdbpy_obj_to_string)
15689         (get_addr_from_python): Use gdbpy_ref.
15690
15691 2017-01-10  Tom Tromey  <tom@tromey.com>
15692
15693         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15694         gdbpy_ref.
15695
15696 2017-01-10  Tom Tromey  <tom@tromey.com>
15697
15698         * python/python.c (eval_python_command, gdbpy_decode_line)
15699         (gdbpy_run_events, gdbpy_start_type_printers)
15700         (gdbpy_apply_type_printers): Use gdbpy_ref.
15701
15702 2017-01-10  Tom Tromey  <tom@tromey.com>
15703
15704         * python/py-param.c (get_doc_string, compute_enum_values): Use
15705         gdbpy_ref.
15706
15707 2017-01-10  Tom Tromey  <tom@tromey.com>
15708
15709         * python/py-inferior.c (find_thread_object, build_inferior_list):
15710         Use gdbpy_ref.
15711
15712 2017-01-10  Tom Tromey  <tom@tromey.com>
15713
15714         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15715
15716 2017-01-10  Tom Tromey  <tom@tromey.com>
15717
15718         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15719         gdbpy_ref.
15720
15721 2017-01-10  Tom Tromey  <tom@tromey.com>
15722
15723         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15724         extra incref.
15725         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15726         Use gdbpy_ref.
15727
15728 2017-01-10  Tom Tromey  <tom@tromey.com>
15729
15730         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15731         gdbpy_ref.
15732
15733 2017-01-10  Tom Tromey  <tom@tromey.com>
15734
15735         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15736         decref results of PyArg_ParseTupleAndKeywords.
15737
15738 2017-01-10  Tom Tromey  <tom@tromey.com>
15739
15740         * python/python.c (python_run_simple_file): Use
15741         unique_xmalloc_ptr, gdbpy_ref.
15742
15743 2017-01-10  Tom Tromey  <tom@tromey.com>
15744
15745         * python/py-prettyprint.c (print_stack_unless_memory_error)
15746         (print_string_repr, print_children): Use gdbpy_ref.
15747         (dummy_python_frame): New class.
15748         (dummy_python_frame::dummy_python_frame): Rename from
15749         push_dummy_python_frame.
15750         (py_restore_tstate): Remove.
15751
15752 2017-01-10  Tom Tromey  <tom@tromey.com>
15753
15754         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15755
15756 2017-01-10  Tom Tromey  <tom@tromey.com>
15757
15758         * python/python.c (ensure_python_env, restore_python_env):
15759         Remove.
15760         * python/python-internal.h (ensure_python_env): Don't declare.
15761         * varobj.h (varobj_ensure_python_env): Don't declare.
15762         * varobj.c (varobj_ensure_python_env): Remove.
15763
15764 2017-01-10  Tom Tromey  <tom@tromey.com>
15765
15766         * varobj.c (varobj_value_get_print_value): Use
15767         gdbpy_enter_varobj.
15768
15769 2017-01-10  Tom Tromey  <tom@tromey.com>
15770
15771         * python/py-prettyprint.c (print_string_repr, print_children):
15772         Update.
15773         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15774         of "encoding".
15775         * varobj.c (varobj_value_get_print_value): Update.
15776         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15777
15778 2017-01-10  Tom Tromey  <tom@tromey.com>
15779
15780         * varobj.c (varobj_get_display_hint)
15781         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15782         (varobj_set_visualizer, free_variable): Use
15783         gdbpy_enter_varobj.
15784
15785 2017-01-10  Tom Tromey  <tom@tromey.com>
15786
15787         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15788         (do_finish_initialization): New function.  Use gdbpy_ref.
15789         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15790         do_finish_initialization.
15791
15792 2017-01-10  Tom Tromey  <tom@tromey.com>
15793
15794         * python/py-param.c (get_set_value, get_show_value): Use
15795         gdbpy_enter, gdbpy_ref.
15796
15797 2017-01-10  Tom Tromey  <tom@tromey.com>
15798
15799         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15800
15801 2017-01-10  Tom Tromey  <tom@tromey.com>
15802
15803         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15804
15805 2017-01-10  Tom Tromey  <tom@tromey.com>
15806
15807         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15808         Use gdbpy_enter_varobj.
15809
15810 2017-01-10  Tom Tromey  <tom@tromey.com>
15811
15812         * varobj.c (gdbpy_enter_varobj): New constructor.
15813         * python/python-internal.h (gdbpy_enter_varobj): New class.
15814         * python/py-varobj.c (py_varobj_get_iterator): Use
15815         gdbpy_enter_varobj.
15816
15817 2017-01-10  Tom Tromey  <tom@tromey.com>
15818
15819         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15820         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15821         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15822         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15823         unique_xmalloc_ptr.
15824         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15825
15826 2017-01-10  Tom Tromey  <tom@tromey.com>
15827
15828         * python/py-xmethods.c (invoke_match_method): Use
15829         gdbpy_ref.
15830
15831 2017-01-10  Tom Tromey  <tom@tromey.com>
15832
15833         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15834         gdbpy_enter, gdbpy_ref.
15835
15836 2017-01-10  Tom Tromey  <tom@tromey.com>
15837
15838         * python/python.c (python_interactive_command): Use gdbpy_enter.
15839
15840 2017-01-10  Tom Tromey  <tom@tromey.com>
15841
15842         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15843         gdbpy_ref.
15844
15845 2017-01-10  Tom Tromey  <tom@tromey.com>
15846
15847         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15848         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15849
15850 2017-01-10  Tom Tromey  <tom@tromey.com>
15851
15852         * utils.h (htab_deleter): New struct.
15853         (htab_up): New typedef.
15854         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15855         gdbpy_enter, gdbpy_ref, htab_up.
15856
15857 2017-01-10  Tom Tromey  <tom@tromey.com>
15858
15859         * python/py-unwind.c (pending_frame_invalidate): Remove.
15860         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15861
15862 2017-01-10  Tom Tromey  <tom@tromey.com>
15863
15864         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15865         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15866
15867 2017-01-10  Tom Tromey  <tom@tromey.com>
15868
15869         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15870
15871 2017-01-10  Tom Tromey  <tom@tromey.com>
15872
15873         * python/python.c (gdbpy_eval_from_control_command)
15874         (gdbpy_source_script, gdbpy_run_events)
15875         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15876         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15877         gdbpy_enter.
15878
15879 2017-01-10  Tom Tromey  <tom@tromey.com>
15880
15881         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15882
15883 2017-01-10  Tom Tromey  <tom@tromey.com>
15884
15885         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15886
15887 2017-01-10  Tom Tromey  <tom@tromey.com>
15888
15889         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15890         (python_on_inferior_call_pre, python_on_inferior_call_post)
15891         (python_on_memory_change, python_on_register_change)
15892         (python_inferior_exit, python_new_objfile, add_thread_object)
15893         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15894
15895 2017-01-10  Tom Tromey  <tom@tromey.com>
15896
15897         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15898         (bpfinishpy_handle_exit): Use gdbpy_enter.
15899
15900 2017-01-10  Tom Tromey  <tom@tromey.com>
15901
15902         * python/py-cmd.c (cmdpy_destroyer)
15903         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15904         gdbpy_enter.
15905
15906 2017-01-10  Tom Tromey  <tom@tromey.com>
15907
15908         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15909         gdbpy_enter.
15910         (gdbpy_breakpoint_has_cond): Likewise.
15911
15912 2017-01-10  Tom Tromey  <tom@tromey.com>
15913
15914         * python/python.c (gdbpy_enter): New constructor.
15915         (~gdbpy_enter): New destructor.
15916         (restore_python_env, ensure_python_env): Rewrite.
15917         * python/python-internal.h (gdbpy_enter): New class.
15918
15919 2017-01-10  Tom Tromey  <tom@tromey.com>
15920
15921         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15922
15923 2017-01-10  Tom Tromey  <tom@tromey.com>
15924
15925         * python/py-value.c (value_has_field, get_field_flag)
15926         (get_field_type, valpy_getitem, convert_value_from_python): Use
15927         gdbpy_ref.
15928
15929 2017-01-10  Tom Tromey  <tom@tromey.com>
15930
15931         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15932         gdbpy_ref.
15933
15934 2017-01-10  Tom Tromey  <tom@tromey.com>
15935
15936         * python/py-prettyprint.c (search_pp_list)
15937         (find_pretty_printer_from_objfiles)
15938         (find_pretty_printer_from_progspace)
15939         (find_pretty_printer_from_gdb, find_pretty_printer)
15940         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15941         gdbpy_ref.
15942
15943 2017-01-10  Tom Tromey  <tom@tromey.com>
15944
15945         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15946
15947 2017-01-10  Tom Tromey  <tom@tromey.com>
15948
15949         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15950         (ltpy_get_all_source_lines): Use gdbpy_ref.
15951
15952 2017-01-10  Tom Tromey  <tom@tromey.com>
15953
15954         * python/py-framefilter.c (extract_sym, extract_value)
15955         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15956         gdbpy_ref.
15957
15958 2017-01-10  Tom Tromey  <tom@tromey.com>
15959
15960         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15961
15962 2017-01-10  Tom Tromey  <tom@tromey.com>
15963
15964         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15965
15966 2017-01-10  Tom Tromey  <tom@tromey.com>
15967
15968         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15969         gdbpy_ref.
15970
15971 2017-01-10  Tom Tromey  <tom@tromey.com>
15972
15973         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15974
15975 2017-01-10  Tom Tromey  <tom@tromey.com>
15976
15977         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15978         (typy_range): Use gdbpy_ref.
15979
15980 2017-01-10  Tom Tromey  <tom@tromey.com>
15981
15982         * python/py-threadevent.c (create_thread_event_object): Use
15983         gdbpy_ref.
15984         * python/py-stopevent.c (create_stop_event_object): Simplify.
15985         (emit_stop_event): Use gdbpy_ref.
15986         * python/py-signalevent.c (create_signal_event_object): Use
15987         gdbpy_ref.
15988         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15989         (emit_new_objfile_event, create_clear_objfiles_event_object)
15990         (emit_clear_objfiles_event): Use gdbpy_ref.
15991         * python/py-infevents.c (create_inferior_call_event_object)
15992         (create_register_changed_event_object)
15993         (create_memory_changed_event_object, emit_inferior_call_event)
15994         (emit_memory_changed_event, emit_register_changed_event): Use
15995         gdbpy_ref.
15996         * python/py-exitedevent.c (create_exited_event_object)
15997         (emit_exited_event): Use gdbpy_ref.
15998         * python/py-event.h (evpy_emit_event): Remove
15999         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16000         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16001         * python/py-continueevent.c (emit_continue_event): Use
16002         gdbpy_ref.
16003         * python/py-breakpoint.c (gdbpy_breakpoint_created)
16004         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16005         gdbpy_ref.
16006         * python/py-bpevent.c (create_breakpoint_event_object): Use
16007         gdbpy_ref.
16008
16009 2017-01-10  Tom Tromey  <tom@tromey.com>
16010
16011         * python/py-ref.h: New file.
16012
16013 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
16014
16015         * cli-out.c (cli_ui_out::do_redirect): Change return type to
16016         void.
16017         * cli-out.h (cli_ui_out::do_redirect): Likewise.
16018         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16019         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16020         * ui-out.c (ui_out::redirect): Likewise.
16021         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16022         * cli/cli-logging.c (set_logging_redirect): Update call site of
16023         ui_out::redirect.
16024         (handle_redirections): Likewise.
16025         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16026         * top.c (execute_command_to_string): Likewise.
16027         * utils.c (do_ui_out_redirect_pop): Likewise.
16028
16029 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
16030
16031         * stack.c (_initialize_stack): Update "frame" command help message.
16032
16033 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
16034
16035         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16036
16037 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16038
16039         * x86-linux-nat.h: Include gdb_proc_service.h.
16040
16041 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16042
16043         * ser-base.h: Include serial.h.
16044
16045 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16046
16047         * ppc-linux-tdep.h: Include ppc-tdep.h.
16048
16049 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16050
16051         * nat/amd64-linux-siginfo.h: Include signal.h.
16052
16053 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16054
16055         * nat/aarch64-linux-hw-point.h: Include break-common.h.
16056
16057 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16058
16059         * mi/mi-parse.h: Include mi-cmds.h.
16060
16061 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16062
16063         * inf-loop.c: Don't include "target.h".
16064         * inf-loop.h: Include it here.
16065
16066 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16067
16068         * dfp.h: Include "dboulest.h" and "expression.h".
16069
16070 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16071
16072         * ax-gdb.h: Include "ax.h".
16073
16074 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16075
16076         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16077         with nat/gdb_ptrace.h.
16078
16079 2017-01-05  Yao Qi  <yao.qi@linaro.org>
16080
16081         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16082         new line.
16083         (mips64_fbsd_sigframe_init): Likewise.
16084
16085 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16086
16087         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16088         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16089
16090 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16091
16092         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16093         * NEWS: Mention new FreeBSD/mips native configuration.
16094         * config/mips/fbsd.mh: New file.
16095         * configure.host: Add mips*-*-freebsd*.
16096         * mips-fbsd-nat.c: New file.
16097
16098 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16099
16100         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16101         (ALLDEPFILES): Add mips-fbsd-tdep.c.
16102         * NEWS: Mention new FreeBSD/mips target.
16103         * configure.tgt: Add mips*-*-freebsd*.
16104         * mips-fbsd-tdep.c: New file.
16105         * mips-fbsd-tdep.h: New file.
16106
16107 2017-01-04  Yao Qi  <yao.qi@linaro.org>
16108
16109         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16110         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16111
16112 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
16113
16114         Update copyright year range in all GDB files.
16115
16116 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
16117
16118         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
16119
16120 For older changes see ChangeLog-2016.
16121 \f
16122 Local Variables:
16123 mode: change-log
16124 left-margin: 8
16125 fill-column: 74
16126 version-control: never
16127 coding: utf-8
16128 End: