Target FP: Refactor use of host floating-point arithmetic
[external/binutils.git] / gdb / ChangeLog
1 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
2
3         * target-float.c: Do not include <math.h>.
4         Include <cmath> and <limits>.
5         (DOUBLEST): Do not define.
6         (class target_float_ops): New type.
7         (class host_float_ops): New templated type.
8         (class decimal_float_ops): New type.
9
10         (floatformat_to_doublest): Rename to ...
11         (host_float_ops<T>::from_target): ... this.  Use template type T
12         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
13         (host_float_ops<T>::from_target): New overload using a type argument.
14         (floatformat_from_doublest): Rename to ...
15         (host_float_ops<T>::to_target): ... this.  Use template type T
16         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
17         (host_float_ops<T>::to_target): New overload using a type argument.
18         (floatformat_printf_format): New function.
19         (struct printf_length_modifier): New templated type.
20         (floatformat_to_string): Rename to ...
21         (host_float_ops<T>::to_string): ... this.  Use type instead of
22         floatformat argument.  Use floatformat_printf_format and
23         printf_length_modifier.  Remove special handling of invalid numbers,
24         infinities and NaN (moved to target_float_to_string).
25         (struct scanf_length_modifier): New templated type.
26         (floatformat_from_string): Rename to ...
27         (host_float_ops<T>::from_string): ... this.  Use type instead of
28         floatformat argument.  Use scanf_length_modifier.
29         (floatformat_to_longest): Rename to ...
30         (host_float_ops<T>::to_longest): ... this.  Use type instead of
31         floatformat argument.  Handle out-of-range values deterministically.
32         (floatformat_from_longest): Rename to ...
33         (host_float_ops<T>::from_longest): ... this.  Use type instead of
34         floatformat argument.
35         (floatformat_from_ulongest): Rename to ...
36         (host_float_ops<T>::from_ulongest): ... this.  Use type instead of
37         floatformat argument.
38         (floatformat_to_host_double): Rename to ...
39         (host_float_ops<T>::to_host_double): ... this.  Use type instead of
40         floatformat argument.
41         (floatformat_from_host_double): Rename to ...
42         (host_float_ops<T>::from_host_double): ... this.  Use type instead of
43         floatformat argument.
44         (floatformat_convert): Rename to ...
45         (host_float_ops<T>::convert): ... this.  Use type instead of
46         floatformat arguments.  Remove handling of no-op conversions.
47         (floatformat_binop): Rename to ...
48         (host_float_ops<T>::binop): ... this.  Use type instead of
49         floatformat arguments.
50         (floatformat_compare): Rename to ...
51         (host_float_ops<T>::compare): ... this.  Use type instead of
52         floatformat arguments.
53
54         (match_endianness): Use type instead of length/byte_order arguments.
55         (set_decnumber_context): Likewise.
56         (decimal_from_number): Likewise.  Update calls.
57         (decimal_to_number): Likewise.
58         (decimal_is_zero): Likewise.  Update calls.  Move to earlier in file.
59         (decimal_float_ops::to_host_double): New dummy function.
60         (decimal_float_ops::from_host_double): Likewise.
61         (decimal_to_string): Rename to ...
62         (decimal_float_ops::to_string): ... this.  Use type instead of
63         length/byte_order arguments.  Update calls.
64         (decimal_from_string): Rename to ...
65         (decimal_float_ops::from_string): ... this.  Use type instead of
66         length/byte_order arguments.  Update calls.
67         (decimal_from_longest): Rename to ...
68         (decimal_float_ops::from_longest): ... this.  Use type instead of
69         length/byte_order arguments.  Update calls.
70         (decimal_from_ulongest): Rename to ...
71         (decimal_float_ops::from_ulongest): ... this.  Use type instead of
72         length/byte_order arguments.  Update calls.
73         (decimal_to_longest): Rename to ...
74         (decimal_float_ops::to_longest): ... this.  Use type instead of
75         length/byte_order arguments.  Update calls.
76         (decimal_binop): Rename to ...
77         (decimal_float_ops::binop): ... this.  Use type instead of
78         length/byte_order arguments.  Update calls.
79         (decimal_compare): Rename to ...
80         (decimal_float_ops::compare): ... this.  Use type instead of
81         length/byte_order arguments.  Update calls.
82         (decimal_convert): Rename to ...
83         (decimal_float_ops::convert): ... this.  Use type instead of
84         length/byte_order arguments.  Update calls.
85
86         (target_float_same_category_p): New function.
87         (target_float_same_format_p): Likewise.
88         (target_float_format_length): Likewise.
89         (enum target_float_ops_kind): New type.
90         (get_target_float_ops_kind): New function.
91         (get_target_float_ops): Three new overloaded functions.
92
93         (target_float_is_zero): Update call.
94         (target_float_to_string): Add special handling of invalid numbers,
95         infinities and NaN (moved from floatformat_to_string).  Use
96         target_float_ops callback.
97         (target_float_from_string): Use target_float_ops callback.
98         (target_float_to_longest): Likewise.
99         (target_float_from_longest): Likewise.
100         (target_float_from_ulongest): Likewise.
101         (target_float_to_host_double): Likewise.
102         (target_float_from_host_double): Likewise.
103         (target_float_convert): Add special case for no-op conversions.
104         Use target_float_ops callback.
105         (target_float_binop): Use target_float_ops callback.
106         (target_float_compare): Likewise.
107
108 2017-11-22  Yao Qi  <yao.qi@linaro.org>
109
110         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
111
112 2017-11-22  Yao Qi  <yao.qi@linaro.org>
113
114         * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
115         * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
116
117 2017-11-21  Jerome Guitton  <guitton@adacore.com>
118
119         * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
120         with event ptid from the lower layer before doing the
121         ravenscar-specific update.
122
123 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
124
125         * ravenscar-thread.c (is_ravenscar_task): Also verify that
126         the ptid's TID is nonzero.
127
128 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
129
130         * ada-lang.h (ada_get_tcb_types_info): Add declaration.
131         * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
132         Make non-static.  Change return type to char *.  Adjust code
133         accordingly.  Rewrite the function's documentation.
134         (read_atcb): Adjust call to get_tcb_types_info accordingly.
135         * ravenscar-thread.c (ravenscar_inferior_created): Check that
136         we have enough debugging information in the runtime to support
137         Ada task debugging before we enable the ravenscar-thread layer.
138
139 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
140
141         * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
142         * ada-tasks.c (ada_get_task_info_from_ptid): New function.
143         * ravenscar-thread.c: Add into comment.
144         (base_magic_null_ptid): Delete.
145         (base_ptid): Change documentation.
146         (ravenscar_active_task): Renames ravenscar_running_thread.
147         All callers updated throughout.
148         (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
149         (ravenscar_task_is_currently_active): Likewise.
150         (get_base_thread_from_ravenscar_task): Ditto.
151         (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
152         (ravenscar_runtime_initialized): Likewise.
153         (get_running_thread_id): Add new parameter "cpu".  Adjust
154         implementation to handle this new parameter.
155         (ravenscar_fetch_registers): Small adjustment to use
156         is_ravenscar_task and ravenscar_task_is_currently_active in
157         order to decide whether to use the target beneath or this
158         module's arch_ops.
159         (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
160         (ravenscar_stopped_by_sw_breakpoint): Use
161         get_base_thread_from_ravenscar_task to get the underlying
162         thread, rather than using base_ptid.
163         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
164         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
165         Likewise.
166         (ravenscar_inferior_created): Do not set base_magic_null_ptid.
167
168 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
169
170         * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
171         * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
172         (get_tcb_types_info): Set fieldnos.base_cpu.
173         (read_atcb): Set task_info->base_cpu.
174         (info_task): Print "Base CPU" info if set by runtime.
175
176 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
177
178         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
179         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
180         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
181         New functions.
182         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
183         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
184         to_stopped_data_address and to_core_of_thread fields of
185         ravenscar_ops.
186
187 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
188
189         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
190         (struct gdbarch_tdep): New member long_double_abi.
191         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
192         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
193         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
194         format depending on long_double_abi tdep member.
195         (ppc_floatformat_for_type): Handle __ibm128 type.
196
197 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
198
199         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
200
201 2017-11-21  Pedro Alves  <palves@redhat.com>
202
203         * dwarf2read.c (mapped_index::find_name_components_bounds)
204         <completion mode, upper bound>: Use std::lower_bound instead of
205         std::upper_bound.
206         (test_mapped_index_find_name_component_bounds): Remove incorrect
207         "t1_fund" from expected symbols.
208
209 2017-11-21  Pedro Alves  <palves@redhat.com>
210
211         * dwarf2read.c (mapped_index::name_components_casing): New field.
212         (mapped_index) <build_name_components,
213         find_name_components_bounds): Declare new methods.
214         (mapped_index::find_name_components_bounds)
215         (mapped_index::build_name_components): New methods, factored out
216         from dw2_expand_symtabs_matching_symbol.
217         (check_find_bounds_finds)
218         (test_mapped_index_find_name_component_bounds): New.
219         (run_test): Rename to ...
220         (test_dw2_expand_symtabs_matching_symbol): ... this.
221         (run_test): Reimplement.
222
223 2017-11-21  Pedro Alves  <palves@redhat.com>
224
225         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
226         (symbol_end): Use cp_ident_is_alnum.
227         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
228         * dwarf2read.c (make_sort_after_prefix_name): New function.
229         (dw2_expand_symtabs_matching_symbol): Use it.
230         (test_symbols): Add more symbols.
231         (run_test): Add tests.
232
233 2017-11-17  Tom Tromey  <tom@tromey.com>
234
235         * symtab.h (enum symbol_subclass_kind): New.
236         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
237         Remove.
238         <subclass>: New member.
239         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
240         * rust-lang.c (rust_get_trait_object_pointer): Update.
241         * dwarf2read.c (read_func_scope): Update.
242         (read_variable): Update.
243
244 2017-11-17  Tom Tromey  <tom@tromey.com>
245
246         * dwarf2read.c (read_func_scope): Update.
247         * symtab.h (struct template_symbol): Derive from symbol.
248         <base>: Remove.
249
250 2017-11-17  Tom Tromey  <tom@tromey.com>
251
252         * symtab.h (struct symbol) <is_rust_vtable>: New member.
253         (struct rust_vtable_symbol): New.
254         (find_symbol_at_address): Declare.
255         * symtab.c (find_symbol_at_address): New function.
256         * symfile.h (struct quick_symbol_functions)
257         <find_compunit_symtab_by_address>: New member.
258         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
259         function.
260         (debug_sym_quick_functions): Link to
261         debug_qf_find_compunit_symtab_by_address.
262         * rust-lang.c (rust_get_trait_object_pointer): New function.
263         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
264         rust_get_trait_object_pointer.
265         * psymtab.c (psym_relocate): Clear psymbol_map.
266         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
267         functions.
268         (psym_functions): Link to psym_find_compunit_symtab_by_address.
269         * objfiles.h (struct objfile) <psymbol_map>: New member.
270         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
271         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
272         (rust_containing_type, read_variable): New functions.
273
274 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
275
276         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
277
278 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
279
280         * common/filestuff.c: Include <algorithm>.
281         (open_fds): Change type to std::vector<int>.
282         (do_mark_open_fd): Adjust.
283         (unmark_fd_no_cloexec): Adjust.
284         (do_close): Adjust.
285
286 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
287
288         * breakpoint.c (output_thread_groups): Take an std::vector.
289         (print_one_breakpoint_location): Adjust.
290
291 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
292
293         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
294         (ada_evaluate_subexp_for_cast): New function.
295         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
296         ada_evaluate_subexp_for_cast.
297         (ada_evaluate_subexp) <nosideret>: Replace code by call to
298         eval_skip_value.
299         * eval.c (evaluate_var_value): Make non-static.
300         (evaluate_var_msym_value, eval_skip_value): Likewise.
301         * value.h (evaluate_var_value, evaluate_var_msym_value)
302         (eval_skip_value): Declare.
303
304 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
305
306         * ada-lang.c (ada_value_cast): Remove parameter "noside".
307         Update all callers.
308
309 2017-11-16  Pedro Alves  <palves@redhat.com>
310
311         * python/py-unwind.c (pyuw_sniffer): Translate
312         PyExc_KeyboardInterrupt to a GDB Quit exception.
313
314 2017-11-16  Pedro Alves  <palves@redhat.com>
315
316         * infrun.c (resume_cleanups): Delete.
317         (resume): No longer install a resume_cleanups cleanup nor call
318         QUIT.
319         (proceed): Pass the terminal to the inferior.
320         (keep_going_pass_signal): No longer install a resume_cleanups
321         cleanup.
322
323 2017-11-16  Pedro Alves  <palves@redhat.com>
324
325         * inf-loop.c (inferior_event_handler): Don't swallow the exception
326         if the prompt is blocked.
327
328 2017-11-16  Pedro Alves  <palves@redhat.com>
329
330         * breakpoint.c (insert_bp_location): Replace bp_err and
331         bp_err_message locals by a gdb_exception local.
332
333 2017-11-16  Pedro Alves  <palves@redhat.com>
334
335         * inflow.c (scoped_ignore_sigttou): New class.
336         (child_terminal_ours_1, new_tty): Use it.
337
338 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
339
340         * target-float.c (decimal_from_number): Add byte_order argument and
341         call match_endianness.  Error if unknown floating-point type.
342         (decimal_to_number): Add byte_order argument and call match_endianness.
343         (decimal_from_longest): Update call.  Do not call match_endianness.
344         (decimal_from_ulongest): Likewise.
345         (decimal_binop): Likewise.
346         (decimal_is_zero): Likewise.
347         (decimal_compare): Likewise.
348         (decimal_convert): Likewise.
349
350 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
351
352         * python/python.c (gdbpy_rbreak): New function.
353         * NEWS: Document Python rbreak feature.
354
355 2017-11-16  Yao Qi  <yao.qi@linaro.org>
356
357         * features/tic6x-c62x.xml: Remove.
358         * features/tic6x-c64x.xml: Remove.
359         * features/tic6x-c64xp.xml: Remove.
360
361 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
362
363         * symtab.h: Include <array>.
364
365 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
366
367         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
368         (bsd_kvm_proc_cmd): Likewise.
369
370 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
371
372         * tui/tui-win.c (window_name_completer): Replace VEC with
373         std::vector.
374
375 2017-11-15  Andrew Cagney  <cagney@gnu.org>
376
377         * MAINTAINERS: Remove no-longer applicable entries.
378
379 2017-11-15  Andrew Cagney  <cagney@gnu.org>
380
381         * MAINTAINERS: Move self to Past Maintainers.
382
383 2017-11-15  Yao Qi  <yao.qi@linaro.org>
384
385         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
386         * features/nios2-linux.c: Remove.
387         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
388         initialize_tdesc_nios2_linux.
389
390 2017-11-15  Yao Qi  <yao.qi@linaro.org>
391
392         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
393         M68HC11_LAST_HARD_REG + 1.
394
395 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
396
397         PR gdb/22388
398         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
399         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
400         Return TARGET_XFER_EOF if size of returned data is 0.
401
402 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
403
404         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
405         memory-map-selftests.c.
406         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
407         * memory-map.c (memory_map_start_memory): Fix computation of hi
408         address.
409         * unittests/memory-map-selftests.c: New file.
410
411 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
412
413         * ada-lang.c: Fix some typos in the general command documenting
414         how Ada expressions are being evaluated and how their result
415         is printed.
416
417 2017-11-09  Tom Tromey  <tom@tromey.com>
418
419         * psymtab.c (psymbol_hash): Do not hash string contents.
420         (psymbol_compare): Add comment.
421
422 2017-11-09  Tom Tromey  <tom@tromey.com>
423
424         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
425
426 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
427
428         * ada-exp.y (write_var_from_sym): Remove parameter
429         "orig_left_context".  Update all callers.
430
431 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
432
433         * tracepoint.h (class collection_list) <stringify>: Return
434         std::vector<std::string>.
435         (encode_actions_rsp): Change parameters to
436         std::vector<std::string> *.
437         * tracepoint.c (collection_list::stringify): Return
438         std::vector<std::string> and adjust accordingly.
439         (encode_actions_rsp): Changee parameters to
440         std::vector<std::string> and adjust accordingly.
441         * remote.c (free_actions_list),
442         free_actions_list_cleanup_wrapper): Remove.
443         (remote_download_tracepoint): Adjust to std::vector.
444
445 2017-11-08  Tom Tromey  <tom@tromey.com>
446
447         * dwarf2read.c (symbolp): Remove typedef.
448         (read_func_scope): Use std::vector.
449         (process_structure_scope): Use std::vector.
450
451 2017-11-08  Pedro Alves  <palves@redhat.com>
452
453         * ada-lang.c (ada_make_symbol_completion_list): Use
454         completion_skip_symbol.
455         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
456         (symbol_is_function_or_method(symbol*)): New.
457         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
458         completion_skip_symbol.
459         (default_collect_symbol_completion_matches_break_on): Use
460         completion_skip_symbol.  Pass down mode.
461         (collect_file_symbol_completion_matches): Pass down mode.
462         * symtab.h (symbol_is_function_or_method): New declarations.
463         (completion_skip_symbol): New template function.
464
465 2017-11-08  Pedro Alves  <palves@redhat.com>
466
467         * linespec.c (iterate_over_all_matching_symtabs): Add
468         search_domain parameter.  Pass it down to expand_symtabs_matching.
469         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
470         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
471         search_domain.
472         (add_all_symbol_names_from_pspace): Add search_domain parameter.
473         Pass it down.
474         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
475         symbols.
476         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
477         it down.
478
479 2017-11-08  Pedro Alves  <palves@redhat.com>
480
481         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
482         text_len locals and don't pass them down.
483         * symtab.c (completion_list_add_name): Remove
484         sym_text/sym_text_len parameters and adjust.
485         (completion_list_add_symbol, completion_list_add_msymbol)
486         (completion_list_objc_symbol, completion_list_add_fields)
487         (add_symtab_completions): Likewise.
488         (default_collect_symbol_completion_matches_break_on)
489         (collect_file_symbol_completion_matches): Remove sym_text_len
490         local and don't pass it down.
491         * symtab.h (completion_list_add_name): Remove
492         sym_text/sym_text_len parameters.
493
494 2017-11-08  Pedro Alves  <palves@redhat.com>
495
496         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
497         unittests/lookup_name_info-selftests.c.
498         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
499         * cp-support.c: Include "selftest.h".
500         (cp_remove_params_1): Rename from cp_remove_params.  Add
501         'require_param' parameter, and handle it.
502         (cp_remove_params): Reimplement.
503         (cp_remove_params_if_any): New.
504         (selftests::quote): New.
505         (selftests::check_remove_params): New.
506         (selftests::test_cp_remove_params): New.
507         (_initialize_cp_support): Install
508         selftests::test_cp_remove_params.
509         * cp-support.h (cp_remove_params_if_any): Declare.
510         * dwarf2read.c :Include "selftest.h".
511         (dw2_expand_symtabs_matching_symbol): Use
512         lookup_name_info::make_ignore_params.
513         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
514         (selftests::dw2_expand_symtabs_matching::string_or_null)
515         (selftests::dw2_expand_symtabs_matching::check_match)
516         (selftests::dw2_expand_symtabs_matching::test_symbols)
517         (selftests::dw2_expand_symtabs_matching::run_test): New.
518         (_initialize_dwarf2_read): Register
519         selftests::dw2_expand_symtabs_matching::run_test.
520         * psymtab.c (psym_expand_symtabs_matching): Use
521         lookup_name_info::make_ignore_params.
522         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
523         If the lookup name wants to ignore parameters, strip them.
524         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
525         code handling '('.
526         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
527         (default_collect_symbol_completion_matches_break_on): Don't try to
528         strip parameters.
529         * symtab.h (lookup_name_info::lookup_name_info): Add
530         'ignore_parameters' parameter.
531         (lookup_name_info::ignore_parameters)
532         (lookup_name_info::make_ignore_params): New methods.
533         (lookup_name_info::m_ignore_parameters): New field.
534         * unittests/lookup_name_info-selftests.c: New file.
535
536 2017-11-08  Pedro Alves  <palves@redhat.com>
537
538         * dwarf2read.c (dw2_expand_marked_cus)
539         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
540         (dw2_expand_symtabs_matching): Move further below.
541         (dw2_expand_marked_cus): Reindent.
542
543 2017-11-08  Pedro Alves  <palves@redhat.com>
544
545         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
546         (struct name_component): New.
547         (mapped_index::name_components): New field.
548         (mapped_index::symbol_name_at): New method.
549         (dwarf2_read_index): Call mapped_index ctor.
550         (dw2_map_matching_symbols): Add comment about name_components
551         table.
552         (dw2_expand_symtabs_matching): Factor part to...
553         (dw2_expand_symtabs_matching_symbol): ... this new function.
554         Build name components table, and lookup symbols in it before
555         calling the name matcher.
556         (dw2_expand_marked_cus): New, factored out from
557         dw2_expand_symtabs_matching.
558         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
559
560 2017-11-08   Pedro Alves  <palves@redhat.com>
561
562         * ada-lang.c (ada_encode): Rename to ..
563         (ada_encode_1): ... this.  Add throw_errors parameter and handle
564         it.
565         (ada_encode): Reimplement.
566         (match_name): Delete, folded into full_name.
567         (resolve_subexp): No longer pass the encoded name to
568         ada_lookup_symbol_list.
569         (should_use_wild_match): Delete.
570         (name_match_type_from_name): New.
571         (ada_lookup_simple_minsym): Use lookup_name_info and the
572         language's symbol_name_matcher_ftype.
573         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
574         (ada_add_block_renamings): Adjust to use lookup_name_info.
575         (ada_lookup_name): New.
576         (add_nonlocal_symbols, ada_add_all_symbols)
577         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
578         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
579         (ada_name_for_lookup): Delete.
580         (ada_lookup_encoded_symbol): Construct a verbatim name.
581         (wild_match): Reverse sense of return type.  Use bool.
582         (full_match): Reverse sense of return type.  Inline bits of old
583         match_name here.
584         (ada_add_block_symbols): Adjust to use lookup_name_info.
585         (symbol_completion_match): Delete, folded into...
586         (ada_lookup_name_info::matches): ... .this new method.
587         (symbol_completion_add): Delete.
588         (ada_collect_symbol_completion_matches): Add name_match_type
589         parameter.  Adjust to use lookup_name_info and
590         completion_list_add_name.
591         (get_var_value, ada_add_global_exceptions): Adjust to use
592         lookup_name_info.
593         (ada_get_symbol_name_cmp): Delete.
594         (do_wild_match, do_full_match): New functions.
595         (ada_lookup_name_info::ada_lookup_name_info): New method.
596         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
597         functions.
598         (ada_language_defn): Install ada_get_symbol_name_matcher.
599         * ada-lex.l (processId): If name starts with '<', copy it
600         verbatim.
601         * block.c (block_iter_match_step, block_iter_match_first)
602         (block_iter_match_next, block_lookup_symbol)
603         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
604         lookup_name_info.
605         * block.h (block_iter_match_first, block_iter_match_next)
606         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
607         * c-lang.c (c_language_defn, cplus_language_defn)
608         (asm_language_defn, minimal_language_defn): Adjust comments to
609         refer to la_get_symbol_name_matcher.
610         * completer.c (complete_files_symbols)
611         (collect_explicit_location_matches, symbol_completer): Pass a
612         symbol_name_match_type down.
613         * completer.h (class completion_match, completion_match_result):
614         New classes.
615         (completion_tracker::reset_completion_match_result): New method.
616         (completion_tracker::m_completion_match_result): New field.
617         * cp-support.c (make_symbol_overload_list_block): Adjust to use
618         lookup_name_info.
619         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
620         functions.
621         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
622         * d-lang.c: Adjust comments to refer to
623         la_get_symbol_name_matcher.
624         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
625         Adjust to use lookup_name_info.
626         (dict_iter_match_first, dict_iter_match_next)
627         (iter_match_first_hashed, iter_match_next_hashed)
628         (iter_match_first_linear, iter_match_next_linear): Adjust to work
629         with a lookup_name_info.
630         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
631         Likewise.
632         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
633         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
634         (gdb_index_symbol_name_matcher): New class.
635         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
636         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
637         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
638         with a symbol_name_match_type.
639         (f_language_defn): Adjust comments to refer to
640         la_get_symbol_name_matcher.
641         * go-lang.c (go_language_defn): Adjust comments to refer to
642         la_get_symbol_name_matcher.
643         * language.c (default_symbol_name_matcher)
644         (language_get_symbol_name_matcher): New functions.
645         (unknown_language_defn, auto_language_defn): Adjust comments to
646         refer to la_get_symbol_name_matcher.
647         * language.h (symbol_name_cmp_ftype): Delete.
648         (language_defn) <la_collect_symbol_completion_matches>: Add match
649         type parameter.
650         <la_get_symbol_name_cmp>: Delete field.
651         <la_get_symbol_name_matcher>: New field.
652         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
653         (default_symbol_name_matcher, language_get_symbol_name_matcher):
654         Declare.
655         * linespec.c (iterate_over_all_matching_symtabs)
656         (iterate_over_file_blocks): Adjust to use lookup_name_info.
657         (find_methods): Add language parameter, and use lookup_name_info
658         and the language's symbol_name_matcher_ftype.
659         (linespec_complete_function): Adjust.
660         (lookup_prefix_sym): Use lookup_name_info.
661         (add_all_symbol_names_from_pspace): Adjust.
662         (find_superclass_methods): Add language parameter and pass it
663         down.
664         (find_method): Pass symbol language down.
665         (find_linespec_symbols): Don't demangle or Ada encode here.
666         (search_minsyms_for_name): Add lookup_name_info parameter.
667         (add_matching_symbols_to_info): Add name_match_type parameter.
668         Use lookup_name_info.
669         * m2-lang.c (m2_language_defn): Adjust comments to refer to
670         la_get_symbol_name_matcher.
671         * minsyms.c: Include <algorithm>.
672         (add_minsym_to_demangled_hash_table): Remove table parameter and
673         add objfile parameter.  Use search_name_hash, and add language to
674         demangled languages vector.
675         (struct found_minimal_symbols): New struct.
676         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
677         New functions.
678         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
679         input names here.  Use lookup_name_info instead.  Lookup up
680         demangled names once for each language in the demangled names
681         vector.
682         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
683         demangled names once for each language in the demangled names
684         vector.
685         (build_minimal_symbol_hash_tables): Adjust.
686         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
687         lookup_name_info.
688         * objc-lang.c (objc_language_defn): Adjust comment to refer to
689         la_get_symbol_name_matcher.
690         * objfiles.h: Include <vector>.
691         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
692         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
693         la_get_symbol_name_matcher.
694         * p-lang.c (pascal_language_defn): Adjust comment to refer to
695         la_get_symbol_name_matcher.
696         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
697         (match_partial_symbol): Use symbol_name_match_type,
698         lookup_name_info and psymbol_name_matches.
699         (lookup_partial_symbol): Use lookup_name_info.
700         (map_block): Use symbol_name_match_type and lookup_name_info.
701         (psym_map_matching_symbols): Use symbol_name_match_type.
702         (psymbol_name_matches): New.
703         (recursively_search_psymtabs): Use lookup_name_info and
704         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
705         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
706         'kind' parameter to 'domain'.
707         * rust-lang.c (rust_language_defn): Adjust comment to refer to
708         la_get_symbol_name_matcher.
709         * symfile-debug.c (debug_qf_map_matching_symbols)
710         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
711         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
712         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
713         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
714         Adjust to use symbol_name_match_type.
715         <expand_symtabs_matching>: Adjust to use lookup_name_info.
716         (expand_symtabs_matching): Adjust to use lookup_name_info.
717         * symmisc.c (maintenance_expand_symtabs): Use
718         lookup_name_info::match_any ().
719         * symtab.c (symbol_matches_search_name): New.
720         (eq_symbol_entry): Adjust to use lookup_name_info and the
721         language's matcher.
722         (demangle_for_lookup_info::demangle_for_lookup_info): New.
723         (lookup_name_info::match_any): New.
724         (iterate_over_symbols, search_symbols): Use lookup_name_info.
725         (compare_symbol_name): Add language, lookup_name_info and
726         completion_match_result parameters, and use them.
727         (completion_list_add_name): Make extern.  Add language and
728         lookup_name_info parameters.  Use them.
729         (completion_list_add_symbol, completion_list_add_msymbol)
730         (completion_list_objc_symbol): Add lookup_name_info parameters and
731         adjust.  Pass down language.
732         (completion_list_add_fields): Add lookup_name_info parameters and
733         adjust.  Pass down language.
734         (add_symtab_completions): Add lookup_name_info parameters and
735         adjust.
736         (default_collect_symbol_completion_matches_break_on): Add
737         name_match_type parameter, and use it.  Use lookup_name_info.
738         (default_collect_symbol_completion_matches)
739         (collect_symbol_completion_matches): Add name_match_type
740         parameter, and pass it down.
741         (collect_symbol_completion_matches_type): Adjust.
742         (collect_file_symbol_completion_matches): Add name_match_type
743         parameter, and use lookup_name_info.
744         * symtab.h: Include <string> and "common/gdb_optional.h".
745         (enum class symbol_name_match_type): New.
746         (class ada_lookup_name_info): New.
747         (struct demangle_for_lookup_info): New.
748         (class lookup_name_info): New.
749         (symbol_name_matcher_ftype): New.
750         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
751         (symbol_matches_search_name): Declare.
752         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
753         (default_collect_symbol_completion_matches)
754         (collect_symbol_completion_matches)
755         (collect_file_symbol_completion_matches): Add name_match_type
756         parameter.
757         (iterate_over_symbols): Use lookup_name_info.
758         (completion_list_add_name): Declare.
759         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
760         (strncmp_iw_with_mode): Now extern.
761         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
762         (strncmp_iw_with_mode): Declare.
763
764 2017-11-08  Keith Seitz  <keiths@redhat.com>
765             Pedro Alves  <palves@redhat.com>
766
767         * ada-lang.c (ada_language_defn): Install
768         default_search_name_hash.
769         * buildsym.c (struct buildsym_compunit): <language>: New field.
770         (finish_block_internal): Pass language when creating dictionaries.
771         (start_buildsym_compunit, start_symtab): New language parameters.
772         Use them.
773         (restart_symtab): Pass down compilation unit's language.
774         * buildsym.h (enum language): Forward declare.
775         (start_symtab): New 'language' parameter.
776         * c-lang.c (c_language_defn, cplus_language_defn)
777         (asm_language_defn, minimal_language_defn): Install
778         default_search_name_hash.
779         * coffread.c (coff_start_symtab): Adjust.
780         * d-lang.c (d_language_defn): Install default_search_name_hash.
781         * dbxread.c (struct symloc): Add 'pst_language' field.
782         (PST_LANGUAGE): Define.
783         (start_psymtab, read_ofile_symtab): Use it.
784         (process_one_symbol): New 'language' parameter.  Pass it down.
785         * dictionary.c (struct dictionary) <language>: New field.
786         (DICT_LANGUAGE): Define.
787         (dict_create_hashed, dict_create_hashed_expandable)
788         (dict_create_linear, dict_create_linear_expandable): New parameter
789         'language'.  Set the dictionary's language.
790         (iter_match_first_hashed): Adjust to rename.
791         (insert_symbol_hashed): Assert we don't see mismatching
792         languages.  Adjust to rename.
793         (dict_hash): Rename to ...
794         (default_search_name_hash): ... this and make extern.
795         * dictionary.h (struct language_defn): Forward declare.
796         (dict_create_hashed): New parameter 'language'.
797         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
798         * f-lang.c (f_language_defn): Install default_search_name_hash.
799         * go-lang.c (go_language_defn): Install default_search_name_hash.
800         * jit.c (finalize_symtab): Pass compunit's language to dictionary
801         creation.
802         * language.c (unknown_language_defn, auto_language_defn):
803         * language.h (language_defn::la_search_name_hash): New field.
804         (default_search_name_hash): Declare.
805         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
806         * mdebugread.c (new_block): New parameter 'language'.
807         * mdebugread.c (parse_symbol): Pass symbol language to block
808         allocation.
809         (psymtab_to_symtab_1): Pass down language.
810         (new_symtab): Pass compunit's language to block allocation.
811         * objc-lang.c (objc_language_defn): Install
812         default_search_name_hash.
813         * opencl-lang.c (opencl_language_defn):
814         * p-lang.c (pascal_language_defn): Install
815         default_search_name_hash.
816         * rust-lang.c (rust_language_defn): Install
817         default_search_name_hash.
818         * stabsread.h (enum language): Forward declare.
819         (process_one_symbol): Add 'language' parameter.
820         * symtab.c (search_name_hash): New function.
821         * symtab.h (search_name_hash): Declare.
822         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
823
824 2017-11-08  Pedro Alves  <palves@redhat.com>
825
826         * cp-name-parser.y (main): Don't initialize extra_chars.
827
828 2017-11-07  Tom Tromey  <tom@tromey.com>
829
830         * event-top.h (command_handler): Constify.
831         * record-full.c (cmd_record_full_start): Update.
832         * thread.c (thread_apply_all_command): Update.
833         * printcmd.c (eval_command): Update.
834         * mi/mi-main.c (mi_execute_cli_command): Update.
835         (mi_execute_async_cli_command): Update.
836         * tui/tui-stack.c (tui_update_command): Update.
837         * cli/cli-interp.c (safe_execute_command): Constify.
838         * record.c (record_start): Update.
839         (record_start, record_stop, cmd_record_start): Update.
840         * record-btrace.c (cmd_record_btrace_bts_start): Update.
841         (cmd_record_btrace_pt_start): Update.
842         (cmd_record_btrace_start): Update.
843         (cmd_record_btrace_start): Update.
844         * reverse.c (exec_reverse_once): Update.
845         * python/python.c (execute_gdb_command): Don't copy the command.
846         * event-top.c (command_line_handler): Update.
847         (command_handler): Constify.
848         * defs.h (deprecated_call_command_hook): Constify.
849         * cli/cli-script.h (execute_user_command): Constify.
850         * cli/cli-script.c (execute_user_command): Constify.
851         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
852         (enum command_control_type): Update.
853         * main.c (catch_command_errors): Remove non-const overload.
854         (catch_command_errors_ftype): Remove.
855         * python/py-cmd.c (cmdpy_function): Constify.
856         * guile/scm-cmd.c (cmdscm_function): Constify.
857         * cli/cli-dump.c (call_dump_func): Constify.
858         * cli/cli-decode.c (do_const_cfunc): Constify.
859         (do_sfunc): Constify.
860         (cmd_func): Constify.
861         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
862         * top.h (execute_command): Constify.
863         * top.c (execute_command): Constify.
864         (execute_command_to_string): Constify.
865         (deprecated_call_command_hook): Constify.
866         * command.h (cmd_func): Constify.
867         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
868
869 2017-11-07  Tom Tromey  <tom@tromey.com>
870
871         * ada-lang.c (catch_ada_exception_command): Constify.
872         (catch_assert_command): Constify.
873         * break-catch-throw.c (catch_catch_command, catch_throw_command)
874         (catch_rethrow_command): Constify.
875         (catch_exception_command_1): Constify.
876         * breakpoint.h (add_catch_command): Constify.
877         * break-catch-syscall.c (catch_syscall_command_1): Constify.
878         (catch_syscall_split_args): Constify.
879         * break-catch-sig.c (catch_signal_command): Constify.
880         (catch_signal_split_args): Constify.
881         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
882         cmd_const_sfunc_ftype.
883         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
884         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
885         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
886         (add_setshow_string_cmd, struct cmd_list_element)
887         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
888         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
889         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
890         Constify.
891         (set_cmd_sfunc): Constify.
892         (empty_sfunc): Constify.
893         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
894         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
895         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
896         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
897         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
898         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
899         Constify.
900         (set_cmd_sfunc): Constify.
901         (cmd_sfunc_ftype): Remove.
902         * compile/compile.c (set_compile_args): Constify.
903         * infrun.c (set_disable_randomization): Constify.
904         * infcmd.c (set_args_command, set_cwd_command): Constify.
905         * breakpoint.c (set_condition_evaluation_mode): Constify.
906         (add_catch_command): Constify.
907         (catch_fork_command_1, catch_exec_command_1)
908         (catch_load_command_1, catch_unload_command_1): Constify.
909         (catch_load_or_unload): Constify.
910         * guile/scm-param.c (pascm_set_func): Constify.
911         (add_setshow_generic): Constify.
912         * python/py-param.c (get_set_value): Constify.
913         * top.h (set_verbose): Constify.
914         * tui/tui-win.c (tui_set_var_cmd): Constify.
915         * mi/mi-main.c (set_mi_async_command): Constify.
916         * cli/cli-logging.c (set_logging_overwrite)
917         (set_logging_redirect): Constify.
918         * value.c (set_max_value_size): Constify.
919         * valprint.c (set_input_radix, set_output_radix): Constify.
920         * utils.c (set_width_command, set_height_command): Constify.
921         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
922         * tracepoint.c (set_disconnected_tracing)
923         (set_circular_trace_buffer, set_trace_buffer_size)
924         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
925         * top.c (set_history_size_command, set_verbose, set_editing)
926         (set_gdb_datadir, set_history_filename): Constify.
927         * target.c (set_targetdebug, maint_set_target_async_command)
928         (maint_set_target_non_stop_command, set_target_permissions)
929         (set_write_memory_permission): Constify.
930         (open_target): Constify.
931         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
932         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
933         * symtab.c (set_symbol_cache_size_handler): Constify.
934         * symfile.c (set_ext_lang_command): Constify.
935         * symfile-debug.c (set_debug_symfile): Constify.
936         * source.c (set_directories_command): Constify.
937         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
938         * serial.c (set_parity): Constify.
939         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
940         * remote.c (set_remote_exec_file, set_remotebreak)
941         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
942         * record.c (set_record_insn_history_size)
943         (set_record_call_history_size): Constify.
944         * record-full.c (set_record_full_insn_max_num): Constify.
945         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
946         * osabi.c (set_osabi): Constify.
947         * mips-tdep.c (set_mips64_transfers_32bit_regs)
948         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
949         * maint.c (maintenance_set_profile_cmd): Constify.
950         * linux-thread-db.c (set_libthread_db_search_path): Constify.
951         * language.c (set_language_command, set_range_command)
952         (set_case_command): Constify.
953         * infrun.c (set_non_stop, set_observer_mode)
954         (set_stop_on_solib_events, set_schedlock_func)
955         (set_exec_direction_func): Constify.
956         * infcmd.c (set_inferior_tty_command): Constify.
957         * disasm.c (set_disassembler_options_sfunc): Constify.
958         * demangle.c (set_demangling_command): Constify.
959         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
960         * cris-tdep.c (set_cris_version, set_cris_mode)
961         (set_cris_dwarf2_cfi): Constify.
962         * corefile.c (set_gnutarget_command): Constify.
963         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
964         (set_target_wide_charset_sfunc): Constify.
965         * breakpoint.c (update_dprintf_commands): Constify.
966         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
967         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
968         (set_disassembly_style_sfunc): Constify.
969         * arch-utils.c (set_endian, set_architecture): Constify.
970         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
971         * agent.c (set_can_use_agent): Constify.
972
973 2017-11-07  Tom Tromey  <tom@tromey.com>
974
975         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
976         (go32_pde, go32_pte, go32_pte_for_address): Constify.
977         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
978         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
979         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
980         (parse_int_arg, show_thread_default_detach_sc_cmd)
981         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
982         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
983         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
984         (show_task_pause_cmd, set_task_detach_sc_cmd)
985         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
986         (set_noninvasive_cmd, set_thread_pause_cmd)
987         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
988         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
989         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
990         * windows-nat.c (display_selectors): Constify.
991         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
992         non-const "cfunc".
993         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
994         (cmd_cfunc_eq): Likewise.
995         (struct cmd_list_element): Likewise.
996         (do_cfunc): Remove.
997         (cli_user_command_p): Update.
998         * command.h (add_cmd): Remove non-const overload.
999         (cmd_cfunc_ftype): Remove typedef.
1000         (cmd_cfunc_eq): Remove non-const overload.
1001         * value.c (show_values): Constify.
1002         * thread.c (thread_apply_all_command): Constify.
1003         * symfile.c (load_command): Constify.
1004         * source.c (directory_command): Constify.
1005         * maint.c (maintenance_internal_error)
1006         (maintenance_demangler_warning, maintenance_space_display)
1007         (maintenance_print_architecture, maintenance_translate_address)
1008         (maintenance_info_selftests, maintenance_internal_warning):
1009         Constify.
1010         * breakpoint.c (disable_trace_command, enable_trace_command):
1011         Constify.
1012         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1013         Constify.
1014         (add_auto_load_safe_path): Constify.
1015         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1016         * top.h (show_commands): Constify.
1017         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1018         * sparc64-tdep.c (adi_examine_command): Constify.
1019         (adi_assign_command): Constify.
1020
1021 2017-11-07  Tom Tromey  <tom@tromey.com>
1022
1023         * frame.h (info_locals_command, info_args_command): Constify.
1024         * auto-load.h (auto_load_info_scripts): Constify.
1025         * inferior.h (registers_info): Constify.
1026         * copying.c: Rebuild.
1027         * copying.awk: Constify generated commands.
1028         * auto-load.c (auto_load_info_scripts)
1029         (info_auto_load_gdb_scripts): Constify.
1030         * cli/cli-decode.c (struct cmd_list_element): Take a
1031         cmd_const_cfunc_ftype.
1032         * command.h (add_info): Take a cmd_const_cfunc_ftype.
1033         * tui/tui-win.c (tui_all_windows_info): Constify.
1034         * python/py-auto-load.c (info_auto_load_python_scripts):
1035         Constify.
1036         * cli/cli-cmds.c (show_command): Remove non-const overload.
1037         * tracepoint.c (info_tvariables_command, info_scope_command):
1038         Constify.
1039         (info_static_tracepoint_markers_command): Constify.
1040         * thread.c (info_threads_command): Constify.
1041         (print_thread_info_1): Constify.
1042         * target.c (info_target_command): Constify.
1043         * symtab.c (info_sources_command, info_functions_command)
1044         (info_types_command): Constify.
1045         (info_variables_command): Remove non-const overload.
1046         * symfile.c (info_ext_lang_command): Constify.
1047         * stack.c (info_frame_command, info_locals_command)
1048         (info_args_command): Constify.
1049         (backtrace_command): Remove non-const overload.
1050         * source.c (info_source_command, info_line_command): Constify.
1051         * solib.c (info_sharedlibrary_command): Constify.
1052         * skip.c (info_skip_command): Constify.
1053         * ser-go32.c (info_serial_command): Constify.
1054         * reverse.c (info_bookmarks_command): Constify.
1055         * printcmd.c (info_symbol_command, info_address_command)
1056         (info_display_command): Constify.
1057         * osdata.c (info_osdata_command): Constify.
1058         * objc-lang.c (info_selectors_command, info_classes_command):
1059         Constify.
1060         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1061         * memattr.c (info_mem_command): Constify.
1062         * macrocmd.c (info_macro_command, info_macros_command): Constify.
1063         * linux-fork.c (info_checkpoints_command): Constify.
1064         * infrun.c (info_signals_command): Constify.
1065         * inflow.c (info_terminal_command): Constify.
1066         * inferior.c (info_inferiors_command): Constify.
1067         (print_inferior): Constify.
1068         * infcmd.c (info_program_command, info_all_registers_command)
1069         (info_registers_command, info_vector_command)
1070         (info_float_command): Constify.
1071         (registers_info): Constify.
1072         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1073         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1074         Constify.
1075         * f-valprint.c (info_common_command): Constify.
1076         * dcache.c (info_dcache_command): Constify.
1077         (dcache_info_1): Constify.
1078         * darwin-nat-info.c (info_mach_tasks_command)
1079         (info_mach_task_command, info_mach_ports_command)
1080         (info_mach_port_command, info_mach_threads_command)
1081         (info_mach_thread_command, info_mach_regions_command)
1082         (info_mach_regions_recurse_command, info_mach_region_command)
1083         (info_mach_exceptions_command): Constify.
1084         (get_task_from_args): Constify.
1085         * cp-support.c (info_vtbl_command): Constify.
1086         * breakpoint.c (info_watchpoints_command)
1087         (info_tracepoints_command): Constify.
1088         (info_breakpoints_command): Remove non-const overload.
1089         * avr-tdep.c (avr_io_reg_read_command): Constify.
1090         * auxv.c (info_auxv_command): Constify.
1091         * ada-tasks.c (info_tasks_command): Constify.
1092         (info_task): Constify.
1093         * ada-lang.c (info_exceptions_command): Constify.
1094
1095 2017-11-07  Tom Tromey  <tom@tromey.com>
1096
1097         * solib.h (no_shared_libraries): Constify.
1098         * frame.h (return_command): Constify.
1099         * cli/cli-cmds.h (quit_command): Constify.
1100         * top.h (quit_command, execute_command): Constify.
1101         * target.h (flash_erase_command): Constify.
1102         * inferior.h (set_inferior_args, attach_command): Constify.
1103         * tracepoint.h (start_tracing, stop_tracing): Constify.
1104         * breakpoint.h (break_command, tbreak_command)
1105         (hbreak_command_wrapper, thbreak_command_wrapper)
1106         (rbreak_command_wrapper, watch_command_wrapper)
1107         (awatch_command_wrapper, rwatch_command_wrapper)
1108         (get_tracepoint_by_number): Constify.
1109         * symtab.c (info_variables_command, rbreak_command)
1110         (symtab_symbol_info): Constify.
1111         (info_variables_command): Add non-const overload.
1112         * top.c (dont_repeat_command): Constify.
1113         * breakpoint.c (ignore_command, commands_command)
1114         (condition_command, tbreak_command, hbreak_command)
1115         (thbreak_command, clear_command, break_command)
1116         (info_breakpoints_command, watch_command, rwatch_command)
1117         (awatch_command, trace_command, ftrace_command, strace_command)
1118         (trace_pass_command, break_range_command, dprintf_command)
1119         (agent_printf_command, get_tracepoint_by_number)
1120         (watch_maybe_just_location, trace_pass_command): Constify.
1121         (info_breakpoints_command): Add non-const overload.
1122         * tracefile.c (tsave_command): Constify.
1123         * infcmd.c (attach_command, disconnect_command, signal_command)
1124         (queue_signal_command, stepi_command, nexti_command)
1125         (finish_command, next_command, step_command, until_command)
1126         (advance_command, jump_command, continue_command, run_command)
1127         (start_command, starti_command, interrupt_command)
1128         (run_command_1, set_inferior_args, step_1): Constify.
1129         * inferior.c (add_inferior_command, remove_inferior_command)
1130         (clone_inferior_command): Constify.
1131         * linux-fork.c (checkpoint_command, restart_command): Constify.
1132         * windows-nat.c (signal_event_command): Constify.
1133         * guile/guile.c (guile_repl_command, guile_command): Constify.
1134         * printcmd.c (x_command, display_command, printf_command)
1135         (output_command, set_command, call_command, print_command)
1136         (eval_command): Constify.
1137         (non_const_set_command): Remove.
1138         (_initialize_printcmd): Update.
1139         * source.c (forward_search_command, reverse_search_command):
1140         Constify.
1141         * jit.c (jit_reader_load_command, jit_reader_unload_command):
1142         Constify.
1143         * infrun.c (handle_command): Constify.
1144         * memattr.c (mem_command): Constify.
1145         * stack.c (return_command, up_command, up_silently_command)
1146         (down_command, down_silently_command, frame_command)
1147         (backtrace_command, func_command, backtrace_command_1): Constify.
1148         (backtrace_command): Add non-const overload.
1149         * remote-sim.c (simulator_command): Constify.
1150         * exec.c (set_section_command): Constify.
1151         * tracepoint.c (tdump_command, trace_variable_command)
1152         (tstatus_command, tstop_command, tstart_command)
1153         (end_actions_pseudocommand, while_stepping_pseudocommand)
1154         (collect_pseudocommand, teval_pseudocommand, actions_command)
1155         (start_tracing, stop_tracing): Constify.
1156         * value.c (init_if_undefined_command): Constify.
1157         * tui/tui-stack.c (tui_update_command): Constify.
1158         * tui/tui-win.c (tui_refresh_all_command)
1159         (tui_set_tab_width_command, tui_set_win_height_command)
1160         (tui_set_focus_command, tui_scroll_forward_command)
1161         (tui_scroll_backward_command, tui_scroll_left_command)
1162         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1163         (tui_set_win_height): Constify.
1164         * tui/tui-layout.c (tui_layout_command): Constify.
1165         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1166         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1167         (proc_untrace_sysexit_cmd): Constify.
1168         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1169         (threadset_test_cmd, threadlist_update_test_cmd)
1170         (threadalive_test): Constify.
1171         * objc-lang.c (print_object_command): Constify.
1172         * command.h (add_com): Constify.
1173         * cli/cli-dump.c (restore_command): Constify.
1174         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1175         (help_command, complete_command, shell_command, edit_command)
1176         (list_command, disassemble_command, make_command)
1177         (apropos_command, alias_command): Constify.
1178         * cli/cli-script.c (document_command, define_command)
1179         (while_command, if_command, validate_comname): Constify.
1180         * cli/cli-decode.c (struct cmd_list_element): Change type of
1181         "fun".
1182         * target.c (do_monitor_command, flash_erase_command): Constify.
1183         * regcache.c (reg_flush_command): Constify.
1184         * reverse.c (reverse_step, reverse_next, reverse_stepi)
1185         (reverse_nexti, reverse_continue, reverse_finish)
1186         (save_bookmark_command, goto_bookmark_command)
1187         (exec_reverse_once): Constify.
1188         * python/python.c (python_interactive_command, python_command):
1189         Constify.
1190         * typeprint.c (ptype_command, whatis_command, whatis_exp):
1191         Constify.
1192         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1193         * gcore.c (gcore_command): Constify.
1194
1195 2017-11-07  Tom Tromey  <tom@tromey.com>
1196
1197         * printcmd.c (x_command): Call set_repeat_arguments.
1198         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1199         * top.c (repeat_arguments): New global.
1200         (set_repeat_arguments): New function.
1201         (execute_command): Handle repeat_arguments.
1202         (show_commands): Calls set_repeat_arguments.
1203         * command.h (set_repeat_arguments): Declare.
1204
1205 2017-11-07  Tom Tromey  <tom@tromey.com>
1206
1207         * stack.c (backtrace_command): Use std::string.
1208         (backtrace_command_1): Make "count_exp" const.
1209
1210 2017-11-07  Tom Tromey  <tom@tromey.com>
1211
1212         * source.c (directory_switch, mod_path, add_path): Constify.
1213         * defs.h (add_path, mod_path, directory_switch): Constify.
1214         * mi/mi-cmd-env.c (env_mod_path): Constify.
1215
1216 2017-11-07  Tom Tromey  <tom@tromey.com>
1217
1218         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1219         (run_command_1, continue_command, step_1, jump_command)
1220         (signal_command, until_command, advance_command, finish_command)
1221         (attach_command): Update.
1222
1223 2017-11-07  Tom Tromey  <tom@tromey.com>
1224
1225         * command.h (set_cmd_cfunc): Don't declare.
1226         * cli/cli-decode.c (set_cmd_cfunc): Now static.
1227
1228 2017-11-07  Tom Tromey  <tom@tromey.com>
1229
1230         * stack.c (select_frame_command): Constify.
1231         * cli/cli-decode.c (add_com_suppress_notification): Constify.
1232         * command.h (add_com_suppress_notification): Constify.
1233
1234 2017-11-07  Tom Tromey  <tom@tromey.com>
1235
1236         * breakpoint.c (stop_command): Constify.
1237         * cli/cli-decode.c (struct cmd_list_element): Constify.
1238         * command.h (add_abbrev_prefix_cmd): Constify.
1239
1240 2017-11-07  Pedro Alves  <palves@redhat.com>
1241
1242         * breakpoint.c (extract_bp_kind): New enum.
1243         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1244         factored out from ...
1245         (extract_bp_number_and_location): ... here.
1246         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1247
1248 2017-11-07  Pedro Alves  <palves@redhat.com>
1249
1250         * breakpoint.c (extract_bp_number_and_location): Change return
1251         type to void.  Throw error instead of warning.
1252         (enable_disable_command): Adjust.
1253
1254 2017-11-07  Xavier Roirand  <roirand@adacore.com>
1255             Pedro Alves  <palves@redhat.com>
1256
1257         * breakpoint.c (map_breakpoint_number_range): New, factored out
1258         from ...
1259         (map_breakpoint_numbers): ... here.
1260         (find_location_by_number): Change parameters from string to
1261         breakpoint number and location.
1262         (extract_bp_number_and_location): New function.
1263         (enable_disable_bp_num_loc)
1264         (enable_disable_breakpoint_location_range)
1265         (enable_disable_command): New functions, factored out ...
1266         (enable_command, disable_command): ... these functions, and
1267         adjusted to support ranges.
1268         * NEWS: Document enable/disable breakpoint location range feature.
1269
1270 2017-11-06  Luis Machado  <luis.machado@linaro.org>
1271
1272         * MAINTAINERS (Write After Approval): Update my e-mail address.
1273
1274 2017-11-06  Pedro Alves  <palves@redhat.com>
1275
1276         * gnu-nat.c (gnu_terminal_init): Delete.
1277         (gnu_target): Don't install gnu_terminal_init.
1278         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1279         (child_terminal_init): ... this function.
1280
1281 2017-11-06  Pedro Alves  <palves@redhat.com>
1282
1283         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1284         sgtty.h.
1285         * config.in, configure: Regenerate.
1286
1287 2017-11-06  Pedro Alves  <palves@redhat.com>
1288
1289         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1290         (async_init_signals): Adjust.
1291         (handle_stop_sig): Rename to ...
1292         (handle_sigtstp): ... this.
1293         (async_stop_sig): Rename to ...
1294         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1295         SIGTSTP path.
1296         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
1297         instead of STOP_SIGNAL thoughout.
1298         (handle_stop_sig): Rename to ...
1299         (handle_sigtstp): ... this.
1300         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1301
1302 2017-11-06  Pedro Alves  <palves@redhat.com>
1303
1304         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1305         longer set flags twice in row.
1306
1307 2017-11-06  Pedro Alves  <palves@redhat.com>
1308
1309         * Makefile.in (SER_HARDWIRE): Update comment.
1310         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1311         * common/gdb_termios.h: Delete file.
1312         * common/job-control.c: Include termios.h and unistd.h instead of
1313         gdb_termios.h.
1314         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1315         check.
1316         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1317         Remove sgtty code.
1318         * configure.ac: No longer check for termio.h and sgtty.h.
1319         * configure: Regenerate.
1320         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
1321         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1322         Replace PROCESS_GROUP_TYPE references with pid_t references
1323         throughout.
1324         (gdb_getpgrp): Delete.
1325         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1326         (child_terminal_inferior): Remove comment.  Remove sgtty code.
1327         (child_terminal_ours_1): Use tcgetpgrp directly instead of
1328         gdb_getpgrp.  Use serial_set_tty_state instead aof
1329         serial_noflush_set_tty_state.  Remove sgtty code.
1330         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
1331         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1332         (inferior_process_group): Now returns pid_t.
1333         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1334         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1335         * ser-event.c (serial_event_ops): Update.
1336         * ser-go32.c (dos_noflush_set_tty_state): Delete.
1337         (dos_ops): Update.
1338         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1339         * ser-pipe.c (pipe_ops): Update.
1340         * ser-tcp.c (tcp_ops): Update.
1341         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
1342         HAVE_TERMIOS checks.
1343         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1344         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1345         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1346         assume termios.
1347         (hardwire_noflush_set_tty_state): Delete.
1348         (hardwire_print_tty_state, hardwire_drain_output)
1349         (hardwire_flush_output, hardwire_flush_input)
1350         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1351         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1352         code, and assume termios.
1353         (hardwire_ops): Update.
1354         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1355         * serial.c (serial_noflush_set_tty_state): Delete.
1356         * serial.h (serial_noflush_set_tty_state): Delete.
1357         (serial_ops::noflush_set_tty_state): Delete.
1358
1359 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1360
1361         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1362         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1363         (COMMON_OBS): Remove doublest.o and dfp.o.
1364         Do not build target-float.c (instead of doublest.c)
1365         with -Wformat-nonliteral.
1366
1367         * doublest.c: Remove file.
1368         * doublest.h: Remove file.
1369         * dfp.c: Remove file.
1370         * dfp.h: Remove file.
1371
1372         * target-float.c: Do not include "doublest.h" and "dfp.h".
1373         (DOUBLEST): Move here from doublest.h.
1374         (enum float_kind): Likewise.
1375         (FLOATFORMAT_CHAR_BIT): Likewise.
1376         (FLOATFORMAT_LARGEST_BYTES): Likewise.
1377         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
1378         (floatformat_precision): Likewise.
1379         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1380         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1381         Likewise.
1382         (host_float_format, host_double_format, host_long_double_format):
1383         Likewise.
1384         (floatformat_to_string, floatformat_from_string): Likewise.
1385         (floatformat_to_doublest): Likewise.  Also, inline the original
1386         convert_floatformat_to_doublest.
1387         (floatformat_from_doublest): Likewise.  Also, inline the original
1388         convert_floatformat_from_doublest.
1389
1390         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1391         (MAX_DECIMAL_STRING): Move here from dfp.c.
1392         (match_endianness): Likewise.
1393         (set_decnumber_context, decimal_check_errors): Likewise.
1394         (decimal_from_number, decimal_to_number): Likewise.
1395         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1396         (decimal_from_longest, decimal_from_ulongest): Likewise.
1397         (decimal_to_longest): Likewise.
1398         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1399         (decimal_convert): Likewise.
1400
1401 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1402
1403         * doublest.c: Do not include "gdbtypes.h".
1404         (extract_typed_floating): Remove.
1405         (store_typed_floating): Remove.
1406         (convert_typed_floating): Remove.
1407         * doublest.h (struct type): Remove.
1408         (DOUBLEST_PRINT_FORMAT): Remove.
1409         (DOUBLEST_SCAN_FORMAT): Remove.
1410         (extract_typed_floating): Remove.
1411         (store_typed_floating): Remove.
1412         (convert_typed_floating): Remove.
1413
1414         * dfp.c (decimal_from_doublest): Remove.
1415         (decimal_to_doublest): Remove.
1416         * dfp.h: Do not include "doublest.h".
1417         (decimal_from_doublest): Remove.
1418         (decimal_to_doublest): Remove.
1419
1420         * value.c: Do not include "doublest.h" and "dfp.h".
1421         (value_as_double): Remove.
1422         (unpack_double): Remove.
1423         (value_from_double): Remove.
1424         (value_from_decfloat): Remove.
1425         * value.h: Do not include "doublest.h".
1426         (value_as_double): Remove.
1427         (unpack_double): Remove.
1428         (value_from_double): Remove.
1429         (value_from_decfloat): Remove.
1430
1431 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1432
1433         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1434         (i386_extract_return_value): Use target_float_convert.
1435         (i386_store_return_value): Likewise.
1436         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1437         (i387_value_to_register): Likewise.
1438         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1439         (ia64_register_to_value): Use target_float_convert.
1440         (ia64_value_to_register): Likewise.
1441         (ia64_extract_return_value): Likewise.
1442         (ia64_store_return_value): Likewise.
1443         (ia64_push_dummy_call): Likewise.
1444         * m68k-tdep.c: Include "target-float.h".
1445         (m68k_register_to_value): Use target_float_convert.
1446         (m68k_value_to_register): Likewise.
1447         (m68k_svr4_extract_return_value): Likewise.
1448         (m68k_svr4_store_return_value): Likewise.
1449         * ppc-sysv-tdep.c: Include "target-float.h".
1450         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1451         (do_ppc_sysv_return_value): Likewise.
1452         (ppc64_sysv_abi_push_freg): Likewise.
1453         (ppc64_sysv_abi_return_value_base): Likewise.
1454         * rs6000-aix-tdep.c: Include "target-float.h".
1455         (rs6000_push_dummy_call): Use target_float_convert.
1456         (rs6000_return_value): Likewise.
1457         * rs6000-lynx178-tdep.c: Include "target-float.h".
1458         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1459         (rs6000_lynx178_return_value): Likewise.
1460         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1461         (rs6000_register_to_value): Use target_float_convert.
1462         (rs6000_value_to_register): Likewise.
1463         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1464         (arm_extract_return_value): Use target_float_convert.
1465         (arm_store_return_value): Likewise.
1466         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1467         (sh_register_convert_to_virtual): Use target_float_convert.
1468         (sh_register_convert_to_raw): Likewise.
1469         * sh64-tdep.c: Include "target-float.h".
1470         (sh64_extract_return_value): Use target_float_convert.
1471         (sh64_register_convert_to_virtual): Likewise.
1472         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1473
1474 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1475
1476         * target-float.c (floatformat_to_host_double): New function.
1477         (floatformat_from_host_double): Likewise.
1478         (target_float_to_host_double): Likewise.
1479         (target_float_from_host_double): Likewise.
1480         * target-float.h (target_float_to_host_double): Add prototype.
1481         (target_float_from_host_double): Likewise.
1482
1483         * guile/scm-value.c: Include "target-float.h".
1484         (gdbscm_value_to_real): Use target_float_to_host_double.
1485         Handle integer source values via value_as_long.
1486         * guile/scm-math.c: Include "target-float.h".  Do not include
1487         "doublest.h", "dfp.h", and "expression.h".
1488         (vlscm_convert_typed_number): Use target_float_from_host_double.
1489         (vlscm_convert_number): Likewise.
1490
1491         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1492         (convert_value_from_python): Use target_float_from_host_double.
1493
1494 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1495
1496         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1497         (cast_from_fixed): Likewise.
1498         (ada_scaling_type): New function.
1499         (ada_delta): Return value instead of DOUBLEST.  Perform target
1500         arithmetic instead of host arithmetic.
1501         (scaling_factor): Rename to ...
1502         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1503         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1504         (ada_fixed_to_float): Remove.
1505         (ada_float_to_fixed): Remove.
1506         * ada-lang.h (ada_fixed_to_float): Remove.
1507         (ada_float_to_fixed): Remove.
1508         (ada_delta): Return value instead of DOUBLEST.
1509         (ada_scaling_factor): Add prototype.
1510
1511         * ada-typeprint.c: Include "target-float.h".
1512         (print_fixed_point_type): Perform target arithmetic instead of
1513         host arithmetic.
1514         * ada-valprint.c: Include "target-float.h".
1515         (ada_val_print_num): Perform target arithmetic instead of
1516         host arithmetic for fixed-point types.
1517
1518 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1519
1520         * target-float.c: Include <math.h>.
1521         (floatformat_binop): New function.
1522         (floatformat_compare): Likewise.
1523         (target_float_binop): Likewise.
1524         (target_float_compare): Likewise.
1525         * target-float.h: Include "expression.h".
1526         (target_float_binop): Add prototype.
1527         (target_float_compare): Likewise.
1528
1529         * valarith.c: Do not include "doublest.h" and "dfp.h".
1530         Include "common/byte-vector.h".
1531         (value_args_as_decimal): Remove, replace by ...
1532         (value_args_as_target_float): ... this function.  Handle both
1533         binary and decimal target floating-point formats.
1534         (scalar_binop): Handle both binary and decimal FP using
1535         value_args_as_target_float and target_float_binop.
1536         (value_equal): Handle both binary and decimal FP using
1537         value_args_as_target_float and target_float_compare.
1538         (value_less): Likewise.
1539         (value_pos): Handle all scalar types as simple copy.
1540         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1541         * dfp.c (decimal_binop): Throw error instead of internal_error
1542         when called with an unsupported operation code.
1543
1544 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1545
1546         * target-float.c (target_float_to_string): New function.
1547         (target_float_from_string): New function.
1548         * target-float.h (target_float_to_string): Add prototype.
1549         (target_float_from_string): Add prototype.
1550
1551         * valprint.c: Include "target-float.h".  Do not include
1552         "doublest.h" and "dfp.h".
1553         (print_floating): Use target_float_to_string.
1554         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1555         (printf_floating): Use target_float_to_string.
1556         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1557         (print_i387_value): Use target_float_to_string.
1558         * mips-tdep.c: Include "target-float.h".
1559         (mips_print_fp_register): Use target_float_to_string.
1560         * sh64-tdep.c: Include "target-float.h".
1561         (sh64_do_fp_register): Use target_float_to_string.
1562
1563         * parse.c: Include "target-float.h".  Do not include
1564         "doublest.h" and "dfp.h".
1565         (parse_float): Use target_float_from_string.
1566         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1567         (define_symbol): Use target_float_from_string.
1568         * gdbarch-selftests.c: Include "target-float.h".
1569         (register_to_value_test): Use target_float_from_string.
1570
1571 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1572
1573         * Makefile.c (SFILES): Add target-float.c.
1574         (HFILES_NO_SRCDIR): Add target-float.h.
1575         (COMMON_OBS): Add target-float.o.
1576         * target-float.h: New file.
1577         * target-float.c: New file.
1578
1579         * doublest.c (floatformat_classify): Fix detection of float_zero.
1580
1581         * gdbtypes.c (is_floating_type): New function.
1582         * gdbtypes.h (is_floating_type): Add prototype.
1583
1584         * value.c: Do not include "floatformat.h".
1585         (unpack_double): Use target_float_is_valid.
1586         (is_floating_value): New function.
1587         * value.h (is_floating_value): Add prototype-
1588
1589         * valarith.c: Include "target-float.h".
1590         (value_logical_not): Use target_float_is_zero.
1591
1592         * python/py-value.c: Include "target-float.h".
1593         (valpy_nonzero): Use target_float_is_zero.
1594
1595 2017-11-04  Tom Tromey  <tom@tromey.com>
1596
1597         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1598
1599 2017-11-04  Tom Tromey  <tom@tromey.com>
1600
1601         * breakpoint.c (set_momentary_breakpoint): Return
1602         breakpoint_up.
1603         (until_break_command): Update.
1604         (new_until_break_fsm): Change argument types to
1605         breakpoint_up.
1606         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1607         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1608         Remove.
1609         * infcmd.c (finish_forward): Update.
1610         * breakpoint.h (set_momentary_breakpoint)
1611         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1612         (make_cleanup_delete_breakpoint): Remove.
1613         (struct breakpoint_deleter): New.
1614         (breakpoint_up): New typedef.
1615         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1616         (insert_exception_resume_breakpoint): Update.
1617         (insert_exception_resume_from_probe): Update.
1618         (insert_longjmp_resume_breakpoint): Update.
1619         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1620         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1621         * infcall.c (call_function_by_hand_dummy): Update
1622
1623 2017-11-04  Tom Tromey  <tom@tromey.com>
1624
1625         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1626
1627 2017-11-04  Tom Tromey  <tom@tromey.com>
1628
1629         * linux-tdep.c (linux_core_info_proc_mappings): Use
1630         gdb::def_vector.
1631         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1632         "size" argument.
1633         (linux_corefile_thread): Update.
1634         (linux_make_corefile_notes): Remove unused variable.
1635
1636 2017-11-04  Tom Tromey  <tom@tromey.com>
1637
1638         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1639         gdb::byte_vector.
1640
1641 2017-11-04  Tom Tromey  <tom@tromey.com>
1642
1643         * objfiles.c (do_free_objfile_cleanup): Remove.
1644         * compile/compile-object-load.c (compile_object_load): Update.
1645         * objfiles.h (make_cleanup_free_objfile): Remove.
1646
1647 2017-11-04  Tom Tromey  <tom@tromey.com>
1648
1649         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1650         (adi_read_versions): Change "tags" to "gdb_byte *".
1651         (adi_print_versions): Likewise.
1652
1653 2017-11-04  Tom Tromey  <tom@tromey.com>
1654
1655         * breakpoint.c
1656         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1657         from start_rbreak_breakpoints.
1658         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1659         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1660         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1661         * symtab.c (do_end_rbreak_breakpoints): Remove.
1662         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1663
1664 2017-11-04  Tom Tromey  <tom@tromey.com>
1665
1666         * cp-namespace.c (reset_directive_searched): Remove.
1667         (cp_lookup_symbol_via_imports): Use scoped_restore.
1668         * cp-support.c (reset_directive_searched): Remove.
1669         (make_symbol_overload_list_using): Use scoped_restore.
1670         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1671         (reset_directive_searched): Remove.
1672
1673 2017-11-04  Tom Tromey  <tom@tromey.com>
1674
1675         * symfile.c (find_separate_debug_file_by_debuglink): Use
1676         unique_xmalloc_ptr.
1677
1678 2017-11-04  Tom Tromey  <tom@tromey.com>
1679
1680         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1681         type of "info".
1682         (compute_stack_depth): Likewise.
1683         (do_compile_dwarf_expr_to_c): Use std::vector.
1684
1685 2017-11-04  Tom Tromey  <tom@tromey.com>
1686
1687         * compile/compile-object-load.c (link_callbacks_einfo): Use
1688         std::string.
1689
1690 2017-11-04  Tom Tromey  <tom@tromey.com>
1691
1692         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1693         Use scoped_free_pendings.
1694         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1695         scoped_free_pendings.
1696         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1697         (xcoff_initial_scan): Likewise.
1698         * buildsym.c (reset_symtab_globals): Update comment.
1699         (scoped_free_pendings): Rename from really_free_pendings.
1700         (prepare_for_building): Update comment.
1701         (buildsym_init): Likewise.
1702         * buildsym.h (class scoped_free_pendings): New class.
1703         (really_free_pendings): Don't declare.
1704
1705 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1706
1707         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1708         output when converting a zero value to a special byteorder format.
1709
1710 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1711
1712         * frame.c (do_frame_register_read): Remove aspace.
1713         * jit.c (jit_frame_sniffer): Likwise.
1714         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1715         * regcache.c (regcache::regcache): Pass nullptr.
1716         (regcache_print): Caller updated.
1717         * regcache.h (regcache::regcache): Remove one constructor
1718         parameter aspace.
1719
1720 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1721
1722         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1723
1724 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1725
1726         * breakpoint.c (insert_single_step_breakpoints): Update.
1727         * frame.c (struct frame_info) <aspace>: Add const.
1728         (frame_save_as_regcache): Add const.
1729         (get_frame_address_space): Return const address_space *.
1730         * frame.h (get_frame_address_space): Update declaration.
1731         * infrun.c (struct step_over_info) <aspace>: Add const.
1732         (set_step_over_info): Make aspace const.
1733         (displaced_step_prepare_throw): Change variable const.
1734         (resume): Likewise.
1735         (proceed): Likewise.
1736         (adjust_pc_after_break): Likewise.
1737         (save_waitstatus): Likewise.
1738         (handle_signal_stop): Likewise.
1739         (keep_going_pass_signal): Likewise.
1740         * jit.c (jit_frame_sniffer): Add const.
1741         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1742         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1743         * record-full.c (record_full_wait_1): Likewise.
1744         * regcache.c (regcache::regcache): Change parameter to const.
1745         * regcache.h (regcache::regcache): Likewise.
1746         (regcache::aspace): Return const address_space *.
1747         (regcache) <m_aspace>: Add const.
1748
1749 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1750
1751         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1752         * frame.c (create_sentinel_frame): Likewise.
1753         * infrun.c (displaced_step_prepare_throw): Likewise.
1754         (resume): Likewise.
1755         (thread_still_needs_step_over_bp): Likewise.
1756         (proceed): Likewise.
1757         (do_target_wait): Likewise.
1758         (adjust_pc_after_break): Likewise.
1759         (handle_syscall_event): Likewise.
1760         (save_waitstatus): Likewise.
1761         (handle_inferior_event_1): Likewise.
1762         (handle_signal_stop): Likewise.
1763         (keep_going_pass_signal): Likewise.
1764         * linux-nat.c (status_callback): Likewise.
1765         (save_stop_reason): Likewise.
1766         (resume_stopped_resumed_lwps): Likewise.
1767         * record-full.c (record_full_exec_insn): Likewise.
1768         (record_full_wait_1): Likewise.
1769         * regcache.c (get_regcache_aspace): Remove.
1770         * regcache.h (get_regcache_aspace): Remove.
1771
1772 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1773
1774         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1775         (init_regcache_descr): Use gdbarch_num_regs.
1776         (regcache::regcache): Likewise.
1777         (regcache::get_register_status): Likewise.
1778         (regcache::assert_raw_regnum): Likewise.
1779         (regcache::cooked_read): Likewise.
1780         (regcache::cooked_read_value): Likewise.
1781         (regcache::cooked_write): Likewise.
1782         (regcache::dump): Likewise.
1783         (regcache::num_raw_registers): New method.
1784         * regcache.h (class regcache) <num_raw_registers>: New.
1785
1786 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1787
1788         * regcache.c (regcache::assert_regnum): New method.
1789         (regcache::invalidate): Call assert_regnum.
1790         (regcache::raw_update): Likewise.
1791         (regcache::raw_write): Likewise.
1792         (regcache::raw_read_part): Likewise.
1793         (regcache::raw_write_part): Likewise.
1794         (regcache::raw_supply): Likewise.
1795         (regcache::raw_supply_integer): Likewise.
1796         (regcache::raw_supply_zeroed): Likewise.
1797         (regcache::raw_collect): Likewise.
1798         (regcache::raw_collect_integer): Likewise.
1799         * regcache.h (regcache::assert_regnum): Declare.
1800
1801 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1802
1803         * regcache.c (regcache::dump): Remove code.
1804
1805 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1806
1807         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1808         Remove.
1809         <sizeof_cooked_register_status>: Remove.
1810         (init_regcache_descr): Update.
1811         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1812         (regcache::save): Likewise.
1813         (regcache::dump): Likewise.
1814
1815 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1816
1817         * ft32-tdep.c (ft32_fetch_instruction): New function.
1818         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1819
1820 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1821
1822         * cli/cli-script.c (execute_control_command): Rename to ...
1823         (execute_control_command_1): ... this.
1824         (execute_control_command): New function.
1825
1826 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1827
1828         * tracepoint.c (tfind_command): Remove const_cast.
1829
1830 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1831
1832         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1833
1834 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1835
1836         * common/common-utils.h (in_inclusive_range): New function.
1837         * arm-tdep.c (arm_record_extension_space): Use
1838         in_inclusive_range.
1839         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1840         * cris-tdep.c (cris_spec_reg_applicable): Use
1841         in_inclusive_range.
1842
1843 2017-10-30  Pedro Alves  <palves@redhat.com>
1844             Simon Marchi <simon.marchi@ericsson.com>
1845
1846         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1847         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1848
1849 2017-10-30  Pedro Alves  <palves@redhat.com>
1850
1851         * common/common-utils.c (string_appendf, string_vappendf): New
1852         functions.
1853         * common/common-utils.h (string_appendf, string_vappendf): New
1854         declarations.
1855         * unittests/common-utils-selftests.c (string_appendf_func)
1856         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1857         (string_vappendf_tests): New functions.
1858         (_initialize_common_utils_selftests): Register "string_appendf" and
1859         "string_vappendf tests".
1860
1861 2017-10-30  Pedro Alves  <palves@redhat.com>
1862
1863         * unittests/common-utils-selftests.c (format_func): New typedef.
1864         (string_printf_tests, string_vprintf_tests): Tests factored out
1865         and merged to ...
1866         (test_format_func): ... this new function.
1867         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1868         test_format_func.
1869
1870 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1871
1872         * darwin-nat.c: Remove include of gdb.h.
1873
1874 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1875
1876         * xtensa-xtregs.c: Fix formatting issues.
1877
1878 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1879
1880         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1881
1882 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1883
1884         PR python/21213
1885         * python/py-infthread.c (thpy_get_inferior): Increment reference
1886         of inferior before returning it.
1887
1888 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1889
1890         * unittests/common-utils-selftests.c (format): Add
1891         ATTRIBUTE_PRINTF.
1892
1893 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1894
1895         * xml-syscall.c (struct syscall_desc): Add constructor.
1896         <name>: Change type to std::string.
1897         (syscall_desc_up): New typedef.
1898         (syscall_desc_p): Remove typeder.
1899         (DEF_VEC_P(syscall_desc_p)): Remove.
1900         (struct syscall_group_desc): Add constructor.
1901         <name>: Change type to std::string.
1902         <syscalls>: Change type to std::vector.
1903         (syscall_group_desc_up): New typedef.
1904         (syscall_group_desc_p): Remove typedef.
1905         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1906         (struct syscalls_info) <syscalls>: Change type to std::vector of
1907         unique_ptr.
1908         <groups>: Likewise.
1909         <my_gdb_datadir>: Change type to std::string.
1910         (syscalls_info_up): New typedef.
1911         (allocate_syscalls_info): Remove.
1912         (syscalls_info_free_syscalls_desc): Remove.
1913         (syscalls_info_free_syscall_group_desc): Remove.
1914         (free_syscalls_info): Remove.
1915         (make_cleanup_free_syscalls_info): Remove.
1916         (syscall_group_create_syscall_group_desc): Adjust.
1917         (syscall_group_add_syscall): Adjust.
1918         (syscall_create_syscall_desc): Adjust.
1919         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1920         (init_syscalls_info): Adjust.
1921         (syscall_group_get_group_by_name): Adjust.
1922         (xml_get_syscall_number): Adjust.
1923         (xml_get_syscall_name): Adjust.
1924         (xml_list_of_syscalls): Adjust.
1925         (xml_list_syscalls_by_group): Adjust.
1926         (xml_list_of_groups): Adjust.
1927
1928 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1929
1930         * probe.h: Don't include gdb_vecs.h.
1931         (DEF_VEC_P (probe_p)): Remove.
1932         (find_probes_in_objfile): Return an std::vector.
1933         * probe.c (find_probes_in_objfile): Likewise.
1934         * breakpoint.c (breakpoint_objfile_data)
1935         <longjmp_probes>: Change type to std::vector.
1936         <exception_probes>: Likewise.
1937         (free_breakpoint_probes): Don't manually free vectors.
1938         (create_longjmp_master_breakpoint): Adjust.
1939         (create_exception_master_breakpoint): Adjust.
1940         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1941         parameter type, adjust.
1942         (svr4_create_solib_event_breakpoints): Adjust.
1943
1944 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1945
1946         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1947         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1948         with new.
1949         (free_breakpoint_probes): Rename to ...
1950         (free_breakpoint_objfile_data): ... this, and call delete on
1951         bp_objfile_data..
1952
1953 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1954
1955         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1956         (loaded_script_ptr): Remove typedef.
1957         (DEF_VEC_P (loaded_script_ptr)): Remove.
1958         (struct collect_matching_scripts_data): Add constructor.
1959         <scripts_p>: Change type to (pointer to) std::vector.
1960         (collect_matching_scripts_data): Adjust.
1961         (sort_scripts_by_name): Make suitable for std::sort.
1962         (print_scripts): Don't sort vector, adjust to std::vector.
1963         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1964
1965 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1966
1967         * symfile.c (filename_language): Make struct, not typedef.  Add
1968         constructor.
1969         <ext>: Change type to std::string.
1970         (DEF_VEC_O (filename_language)): Remove.
1971         (filename_language_table): Change type to std::vector.
1972         (add_filename_language): Adjust.
1973         (set_ext_lang_command): Adjust.
1974         (info_ext_lang_command): Adjust.
1975         (deduce_language_from_filename): Adjust.
1976         (class scoped_restore_filename_language_table): Remove.
1977         (test_filename_language): Use scoped_restore.
1978         (test_set_ext_lang_command): Use scoped_restore, adjust to
1979         std::vector change.
1980
1981 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1982
1983         * symfile.c: Include selftest.h.
1984         (class scoped_restore_filename_language_table): New.
1985         (test_filename_language): New test.
1986         (test_set_ext_lang_command): New test.
1987         (_initialize_symfile): Register tests.
1988
1989 2017-10-27  Keith Seitz  <keiths@redhat.com>
1990
1991         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1992         in the bp_location, falling back to find_pc_sect_function when
1993         needed.
1994         (add_location_to_breakpoint): Save sal->symbol.
1995         * breakpoint.h (struct bp_location) <symbol>: New field.
1996         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1997         * symtab.h (struct symtab_and_line) <symbol>: New field.
1998
1999 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
2000
2001         PR gdb/13669
2002         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2003         to rewind obstack.
2004
2005 2017-10-26  Pedro Alves  <palves@redhat.com>
2006
2007         * remote.c (remote_async_terminal_ours_p): Delete.
2008         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2009         Remove references to 'remote_async_terminal_ours_p'.
2010
2011 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2012
2013         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2014
2015 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2016
2017         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2018         aspace const.
2019         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2020         Likewise.
2021         * breakpoint.c (bpstat_check_location): Remove cast.
2022         (breakpoint_hit_catch_fork): Make aspce const.
2023         (breakpoint_hit_catch_solib): Likewise.
2024         (breakpoint_hit_catch_exec): Likewise.
2025         (breakpoint_hit_ranged_breakpoint): Likewise.
2026         (breakpoint_hit_watchpoint): Likewise.
2027         (base_breakpoint_breakpoint_hit): Likewise.
2028         (bkpt_breakpoint_hit): Likewise.
2029         (dprintf_breakpoint_hit): Likewise.
2030         (tracepoint_breakpoint_hit): Likewise.
2031         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2032
2033 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2034
2035         * breakpoint.c (breakpoint_location_address_match): Change
2036         "struct address_space *" to "const address_space".
2037         (breakpoint_location_address_range_overlap): Likewise.
2038         (breakpoint_here_p): Likewise.
2039         (breakpoint_in_range_p): Likewise.
2040         (moribund_breakpoint_here_p): Likewise.
2041         (bp_location_inserted_here_p): Likewise.
2042         (software_breakpoint_inserted_here_p): Likewise.
2043         (hardware_breakpoint_inserted_here_p): Likewise.
2044         (hardware_watchpoint_inserted_in_range): Likewise.
2045         (bpstat_check_location): Likewise.
2046         (bpstat_stop_status): Likewise.
2047         (breakpoint_address_match): Likewise.
2048         (breakpoint_address_match_range): Likewise.
2049         (breakpoint_location_address_match): Likewise.
2050         (breakpoint_location_address_range_overlap): Likewise.
2051         (insert_single_step_breakpoint): Likewise.
2052         (breakpoint_has_location_inserted_here): Likewise.
2053         (single_step_breakpoint_inserted_here_p): Likewise.
2054         (pc_at_non_inline_function): Likewise.
2055         * breakpoint.h (bpstat_stop_status): Update declaration.
2056         (breakpoint_here_p): Likewise.
2057         (breakpoint_in_range_p): Likewise.
2058         (moribund_breakpoint_here_p): Likewise.
2059         (breakpoint_inserted_here_p): Likewise.
2060         (software_breakpoint_inserted_here_p): Likewise.
2061         (hardware_breakpoint_inserted_here_p): Likewise.
2062         (breakpoint_has_location_inserted_here): Likewise.
2063         (single_step_breakpoint_inserted_here_p): Likewise.
2064         (hardware_watchpoint_inserted_in_range): Likewise.
2065         (breakpoint_address_match): Likewise.
2066         (insert_single_step_breakpoint): Likewise.
2067         (pc_at_non_inline_function): Likewise.
2068         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2069         * record.c (record_check_stopped_by_breakpoint): Likewise.
2070         * record.h (record_check_stopped_by_breakpoint): Likewise.
2071         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2072
2073 2017-10-25  Yao Qi  <yao.qi@linaro.org>
2074
2075         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2076         regcache->arch () instead get_regcache_arch.
2077         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2078         Likewise.
2079         (aarch64_fbsd_store_inferior_registers): Likewise.
2080         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2081         (store_gregs_to_thread): Likewise.
2082         (fetch_fpregs_from_thread): Likewise.
2083         (store_fpregs_to_thread): Likewise.
2084         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2085         (aarch64_store_return_value): Likewise.
2086         (aarch64_software_single_step): Likewise.
2087         * aix-thread.c (aix_thread_wait): Likewise.
2088         (supply_reg32): Likewise.
2089         (supply_sprs64): Likewise.
2090         (supply_sprs32): Likewise.
2091         (fill_gprs64): Likewise.
2092         (fill_gprs32): Likewise.
2093         (fill_sprs64): Likewise.
2094         (fill_sprs32): Likewise.
2095         (store_regs_user_thread): Likewise.
2096         (store_regs_kernel_thread): Likewise.
2097         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2098         (alphabsd_store_inferior_registers): Likewise.
2099         * alpha-tdep.c (alpha_extract_return_value): Likewise.
2100         (alpha_store_return_value): Likewise.
2101         (alpha_deal_with_atomic_sequence): Likewise.
2102         (alpha_next_pc): Likewise.
2103         (alpha_software_single_step): Likewise.
2104         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2105         (amd64bsd_store_inferior_registers): Likewise.
2106         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2107         Likewise.
2108         (amd64_linux_store_inferior_registers): Likewise.
2109         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2110         (amd64_collect_native_gregset): Likewise.
2111         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2112         (amd64obsd_collect_uthread): Likewise.
2113         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2114         (amd64_collect_fpregset): Likewise.
2115         (amd64_supply_fxsave): Likewise.
2116         (amd64_supply_xsave): Likewise.
2117         (amd64_collect_fxsave): Likewise.
2118         (amd64_collect_xsave): Likewise.
2119         * arc-tdep.c (arc_write_pc): Likewise.
2120         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2121         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2122         (arm_fbsd_store_inferior_registers): Likewise.
2123         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2124         (store_vfp_regs): Likewise.
2125         (arm_linux_fetch_inferior_registers): Likewise.
2126         (arm_linux_store_inferior_registers): Likewise.
2127         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2128         (arm_linux_sigreturn_next_pc): Likewise.
2129         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2130         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2131         (fetch_register): Likewise.
2132         (store_register): Likewise.
2133         * arm-tdep.c (arm_is_thumb): Likewise.
2134         (displaced_in_arm_mode): Likewise.
2135         (bx_write_pc): Likewise.
2136         (arm_get_next_pcs_addr_bits_remove): Likewise.
2137         (arm_software_single_step): Likewise.
2138         (arm_extract_return_value): Likewise.
2139         (arm_store_return_value): Likewise.
2140         (arm_write_pc): Likewise.
2141         * bfin-tdep.c (bfin_extract_return_value): Likewise.
2142         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2143         (bsd_uthread_store_registers): Likewise.
2144         * core-regset.c (fetch_core_registers): Likewise.
2145         * corelow.c (get_core_registers): Likewise.
2146         * cris-tdep.c (cris_store_return_value): Likewise.
2147         (cris_extract_return_value): Likewise.
2148         (find_step_target): Likewise.
2149         (find_step_target): Likewise.
2150         (cris_software_single_step): Likewise.
2151         * ctf.c (ctf_fetch_registers): Likewise.
2152         * darwin-nat.c (cancel_breakpoint): Likewise.
2153         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2154         * frv-tdep.c (frv_extract_return_value): Likewise.
2155         * ft32-tdep.c (ft32_store_return_value): Likewise.
2156         (ft32_extract_return_value): Likewise.
2157         * go32-nat.c (fetch_register): Likewise.
2158         (go32_fetch_registers): Likewise.
2159         (go32_store_registers): Likewise.
2160         (store_register): Likewise.
2161         * h8300-tdep.c (h8300_extract_return_value): Likewise.
2162         (h8300_store_return_value): Likewise.
2163         * hppa-linux-nat.c (fetch_register): Likewise.
2164         (store_register): Likewise.
2165         (hppa_linux_fetch_inferior_registers): Likewise.
2166         (hppa_linux_store_inferior_registers): Likewise.
2167         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2168         (i386_darwin_store_inferior_registers): Likewise.
2169         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2170         (gnu_store_registers): Likewise.
2171         * i386-linux-nat.c (fetch_register): Likewise.
2172         (store_register): Likewise.
2173         (supply_gregset): Likewise.
2174         (fill_gregset): Likewise.
2175         (i386_linux_fetch_inferior_registers): Likewise.
2176         (i386_linux_store_inferior_registers): Likewise.
2177         (i386_linux_resume): Likewise.
2178         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2179         Likewise.
2180         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2181         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2182         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2183         (i386obsd_collect_uthread): Likewise.
2184         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2185         (i386_supply_gregset): Likewise.
2186         (i386_collect_gregset): Likewise.
2187         (i386_supply_fpregset): Likewise.
2188         (i386_collect_fpregset): Likewise.
2189         (i386_mpx_bd_base): Likewise.
2190         * i386-v4-nat.c (supply_fpregset): Likewise.
2191         (fill_fpregset): Likewise.
2192         * i387-tdep.c (i387_supply_fsave): Likewise.
2193         (i387_collect_fsave): Likewise.
2194         (i387_supply_fxsave): Likewise.
2195         (i387_collect_fxsave): Likewise.
2196         (i387_supply_xsave): Likewise.
2197         (i387_collect_xsave): Likewise.
2198         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2199         (ia64_linux_store_registers): Likewise.
2200         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2201         (ia64_extract_return_value): Likewise.
2202         (ia64_store_return_value): Likewise.
2203         (find_func_descr): Likewise.
2204         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2205         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2206         (inf_ptrace_store_registers): Likewise.
2207         * infrun.c (use_displaced_stepping): Likewise.
2208         (displaced_step_prepare_throw): Likewise.
2209         (resume): Likewise.
2210         (proceed): Likewise.
2211         (do_target_wait): Likewise.
2212         (adjust_pc_after_break): Likewise.
2213         (handle_inferior_event_1): Likewise.
2214         (handle_signal_stop): Likewise.
2215         (save_infcall_suspend_state): Likewise.
2216         (restore_infcall_suspend_state): Likewise.
2217         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2218         * jit.c (jit_frame_prev_register): Likewise.
2219         * linux-nat.c (save_stop_reason): Likewise.
2220         (linux_nat_wait_1): Likewise.
2221         (resume_stopped_resumed_lwps): Likewise.
2222         * linux-record.c (record_linux_sockaddr): Likewise.
2223         (record_linux_msghdr): Likewise.
2224         (record_linux_system_call): Likewise.
2225         * linux-tdep.c (linux_collect_thread_registers): Likewise.
2226         * lm32-tdep.c (lm32_extract_return_value): Likewise.
2227         (lm32_store_return_value): Likewise.
2228         * m32c-tdep.c (m32c_read_flg): Likewise.
2229         (m32c_pseudo_register_read): Likewise.
2230         (m32c_pseudo_register_write): Likewise.
2231         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2232         (m32r_linux_collect_gregset): Likewise.
2233         * m32r-tdep.c (m32r_store_return_value): Likewise.
2234         (m32r_extract_return_value): Likewise.
2235         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2236         (m68kbsd_collect_fpregset): Likewise.
2237         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2238         * m68k-linux-nat.c (fetch_register): Likewise.
2239         (old_fetch_inferior_registers): Likewise.
2240         (old_store_inferior_registers): Likewise.
2241         (store_regs): Likewise.
2242         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2243         (m68k_svr4_store_return_value): Likewise.
2244         * m88k-tdep.c (m88k_store_arguments): Likewise.
2245         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2246         (mi_cmd_data_write_register_values): Likewise.
2247         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2248         (mips_fbsd_store_inferior_registers): Likewise.
2249         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2250         (mips_fbsd_supply_gregs): Likewise.
2251         (mips_fbsd_collect_fpregs): Likewise.
2252         (mips_fbsd_collect_gregs): Likewise.
2253         (mips_fbsd_supply_fpregset): Likewise.
2254         (mips_fbsd_collect_fpregset): Likewise.
2255         (mips_fbsd_supply_gregset): Likewise.
2256         (mips_fbsd_collect_gregset): Likewise.
2257         * mips-linux-nat.c (supply_gregset): Likewise.
2258         (fill_gregset): Likewise.
2259         (supply_fpregset): Likewise.
2260         (fill_fpregset): Likewise.
2261         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2262         (mips_fill_gregset): Likewise.
2263         (mips_supply_fpregset): Likewise.
2264         (mips_fill_fpregset): Likewise.
2265         (mips64_supply_gregset): Likewise.
2266         (micromips_linux_sigframe_validate): Likewise.
2267         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2268         (mipsnbsd_fetch_inferior_registers): Likewise.
2269         (mipsnbsd_store_inferior_registers): Likewise.
2270         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2271         (mipsnbsd_supply_gregset): Likewise.
2272         (mipsnbsd_iterate_over_regset_sections): Likewise.
2273         (mipsnbsd_supply_reg): Likewise.
2274         (mipsnbsd_supply_fpreg): Likewise.
2275         * mips-tdep.c (mips_in_frame_stub): Likewise.
2276         (mips_dummy_id): Likewise.
2277         (is_octeon_bbit_op): Likewise.
2278         (micromips_bc1_pc): Likewise.
2279         (extended_mips16_next_pc): Likewise.
2280         (mips16_next_pc): Likewise.
2281         (deal_with_atomic_sequence): Likewise.
2282         * moxie-tdep.c (moxie_process_readu): Likewise.
2283         * nios2-tdep.c (nios2_get_next_pc): Likewise.
2284         * nto-procfs.c (procfs_store_registers): Likewise.
2285         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2286         (ppcfbsd_store_inferior_registers): Likewise.
2287         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2288         (fetch_altivec_register): Likewise.
2289         (get_spe_registers): Likewise.
2290         (fetch_spe_register): Likewise.
2291         (fetch_altivec_registers): Likewise.
2292         (fetch_all_gp_regs): Likewise.
2293         (fetch_all_fp_regs): Likewise.
2294         (store_vsx_register): Likewise.
2295         (store_altivec_register): Likewise.
2296         (set_spe_registers): Likewise.
2297         (store_spe_register): Likewise.
2298         (store_altivec_registers): Likewise.
2299         (store_all_gp_regs): Likewise.
2300         (store_all_fp_regs): Likewise.
2301         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2302         (ppc_linux_collect_gregset): Likewise.
2303         (ppc_canonicalize_syscall): Likewise.
2304         (ppc_linux_record_signal): Likewise.
2305         (ppu2spu_prev_register): Likewise.
2306         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2307         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2308         (ppcobsd_store_registers): Likewise.
2309         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2310         Likewise.
2311         (ppc_ravenscar_generic_store_registers): Likewise.
2312         * procfs.c (procfs_fetch_registers): Likewise.
2313         (procfs_store_registers): Likewise.
2314         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2315         (ravenscar_store_registers): Likewise.
2316         (ravenscar_prepare_to_store): Likewise.
2317         * record-btrace.c (record_btrace_fetch_registers): Likewise.
2318         * record-full.c (record_full_wait_1): Likewise.
2319         (record_full_registers_change): Likewise.
2320         (record_full_store_registers): Likewise.
2321         (record_full_core_fetch_registers): Likewise.
2322         (record_full_save): Likewise.
2323         (record_full_goto_insn): Likewise.
2324         * regcache.c (regcache_register_size): Likewise.
2325         (get_regcache_arch): Remove.
2326         (regcache_read_pc): Likewise.
2327         * regcache.h (get_regcache_arch): Remove.
2328         * remote-sim.c (gdbsim_fetch_register): Likewise.
2329         (gdbsim_store_register): Likewise.
2330         * remote.c (fetch_register_using_p): Likewise.
2331         (send_g_packet): Likewise.
2332         (remote_prepare_to_store): Likewise.
2333         (store_registers_using_G): Likewise.
2334         * reverse.c (save_bookmark_command): Likewise.
2335         (goto_bookmark_command): Likewise.
2336         * rs6000-aix-tdep.c (branch_dest): Likewise.
2337         * rs6000-nat.c (rs6000_ptrace64): Likewise.
2338         (fetch_register): Likewise.
2339         * rs6000-tdep.c (ppc_supply_reg): Likewise.
2340         (ppc_collect_reg): Likewise.
2341         (ppc_collect_gregset): Likewise.
2342         (ppc_collect_fpregset): Likewise.
2343         (ppc_collect_vsxregset): Likewise.
2344         (ppc_collect_vrregset): Likewise.
2345         (ppc_displaced_step_hw_singlestep): Likewise.
2346         (rs6000_pseudo_register_read): Likewise.
2347         (rs6000_pseudo_register_write): Likewise.
2348         * s390-linux-nat.c (supply_gregset): Likewise.
2349         (fill_gregset): Likewise.
2350         (s390_linux_fetch_inferior_registers): Likewise.
2351         * s390-linux-tdep.c (s390_write_pc): Likewise.
2352         (s390_software_single_step): Likewise.
2353         (s390_all_but_pc_registers_record): Likewise.
2354         (s390_linux_syscall_record): Likewise.
2355         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2356         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2357         (shnbsd_store_inferior_registers): Likewise.
2358         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2359         (sh_extract_return_value_fpu): Likewise.
2360         (sh_store_return_value_nofpu): Likewise.
2361         (sh_corefile_supply_regset): Likewise.
2362         (sh_corefile_collect_regset): Likewise.
2363         * sh64-tdep.c (sh64_extract_return_value): Likewise.
2364         (sh64_store_return_value): Likewise.
2365         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2366         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2367         (sparc_store_inferior_registers): Likewise.
2368         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2369         (sparc_ravenscar_prepare_to_store): Likewise.
2370         * sparc-tdep.c (sparc32_store_arguments): Likewise.
2371         (sparc_analyze_control_transfer): Likewise.
2372         (sparc_step_trap): Likewise.
2373         (sparc_software_single_step): Likewise.
2374         (sparc32_gdbarch_init): Likewise.
2375         (sparc_supply_rwindow): Likewise.
2376         (sparc_collect_rwindow): Likewise.
2377         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2378         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2379         (sparc64nbsd_collect_gregset): Likewise.
2380         (sparc64nbsd_supply_fpregset): Likewise.
2381         (sparc64nbsd_collect_fpregset): Likewise.
2382         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2383         (sparc64_supply_gregset): Likewise.
2384         (sparc64_collect_gregset): Likewise.
2385         (sparc64_supply_fpregset): Likewise.
2386         (sparc64_collect_fpregset): Likewise.
2387         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2388         * spu-tdep.c (spu_unwind_sp): Likewise.
2389         (spu2ppu_prev_register): Likewise.
2390         (spu_memory_remove_breakpoint): Likewise.
2391         * stack.c (return_command): Likewise.
2392         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2393         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2394         * tracefile.c (trace_save_ctf): Likewise.
2395         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2396         (do_windows_store_inferior_registers): Likewise.
2397         (windows_resume): Likewise.
2398         * xtensa-linux-nat.c (fill_gregset): Likewise.
2399         (supply_gregset_reg): Likewise.
2400         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2401         (xtensa_register_read_masked): Likewise.
2402         (xtensa_supply_gregset): Likewise.
2403         (xtensa_extract_return_value): Likewise.
2404         (xtensa_store_return_value): Likewise.
2405
2406 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2407
2408         * doublest.c (floatformat_from_string): New function.
2409         * doublest.h (floatformat_from_string): Add prototype.
2410
2411         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2412         (OP_FLOAT): ... this.
2413         * expression.h: Do not include "doublest.h".
2414         (union exp_element): Replace doubleconst and decfloatconst by
2415         new element floatconst.
2416         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2417         (ada_evaluate_subexp): Likewise.
2418         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2419         OP_DOUBLE and OP_DECFLOAT.
2420         * expprint.c (print_subexp_standard): Likewise.
2421         (dump_subexp_body_standard): Likewise.
2422         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2423
2424         * parse.c: Include "dfp.h".
2425         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2426         (write_exp_elt_floatcst): New function.
2427         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2428         and OP_DECFLOAT.
2429         (operator_check_standard): Likewise.
2430         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2431         Return target format buffer instead of host DOUBLEST.
2432         Use floatformat_from_string and decimal_from_string to parse
2433         either binary or decimal floating-point types.
2434         (parse_c_float): Remove.
2435         * parser-defs.h: Do not include "doublest.h".
2436         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2437         (write_exp_elt_floatcst): Add prototype.
2438         (parse_float): Update prototype.
2439         (parse_c_float): Remove.
2440
2441         * c-exp.y: Do not include "dfp.h".
2442         (typed_val_float): Use byte buffer instead of DOUBLEST.
2443         (typed_val_decfloat): Remove.
2444         (DECFLOAT): Remove.
2445         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2446         (parse_number): Update to new parse_float interface.
2447         Parse suffixes and determine type before calling parse_float.
2448         Handle decimal and binary FP types the same way.
2449
2450         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2451         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2452         (parse_number): Update to new parse_float interface.
2453         Parse suffixes and determine type before calling parse_float.
2454
2455         * f-exp.y: Replace dval by typed_val_float.
2456         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2457         (parse_number): Use parse_float instead of atof.
2458
2459         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2460         (parse_go_float): Remove.
2461         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2462         (parse_number): Call parse_float instead of parse_go_float.
2463         Parse suffixes and determine type before calling parse_float.
2464
2465         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2466         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2467         (parse_number): Update to new parse_float interface.
2468         Parse suffixes and determine type before calling parse_float.
2469
2470         * m2-exp.y: Replace dval by byte buffer val.
2471         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2472         (parse_number): Call parse_float instead of atof.
2473
2474         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2475         (lex_number): Call parse_float instead of strtod.
2476         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2477         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2478         Use write_exp_elt_floatcst.
2479         (unit_testing): Remove static variable.
2480         (rust_type): Do not check unit_testing.
2481         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2482
2483         * ada-exp.y (type_float, type_double): Remove.
2484         (typed_val_float): Use byte buffer instead of DOUBLEST.
2485         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2486         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2487
2488 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2489
2490         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2491         * arch/aarch64.h: New file.
2492
2493 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2494
2495         * dfp.h (decimal_from_string): Use const reference for argument.
2496         * dfp.c (decimal_from_string): Likewise.
2497
2498 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2499
2500         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2501         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2502         * mips-tdep.c (mips_print_fp_register): Likewise.
2503
2504 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2505
2506         * common/format.h (enum argclass): Replace decfloat_arg by
2507         dec32float_arg, dec64float_arg, and dec128float_arg.
2508         * common/format.c (parse_format_string): Update to return
2509         new decimal float argument classes.
2510
2511         * printcmd.c (printf_decfloat): Rename to ...
2512         (printf_floating): ... this.  Add argclass argument, and use it
2513         instead of parsing the format string again.  Add support for
2514         binary floating-point values, using floatformat_to_string.
2515         Convert value to the target format if it doesn't already match.
2516         (ui_printf): Call printf_floating instead of printf_decfloat,
2517         also for double_arg / long_double_arg.  Pass argclass.
2518
2519         * dfp.c (decimal_to_string): Add format string argument.
2520         * dfp.h (decimal_to_string): Likewise.
2521
2522         * doublest.c (floatformat_to_string): Add format string argument.
2523         * doublest.h (floatformat_to_string): Likewise.
2524
2525 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2526
2527         * doublest.c (floatformat_precision): New routine.
2528         (floatformat_to_string): Likewise.
2529         * doublest.c (floatformat_to_string): Add prototype.
2530
2531         * printcmd.c (print_scalar_formatted): Only call print_floating
2532         on floating-point types.
2533         * valprint.c: Do not include "floatformat.h".
2534         (generic_val_print_decfloat): Remove.
2535         (generic_val_print): Call generic_val_print_float for both
2536         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2537         (print_floating): Use floatformat_to_string.  Handle decimal float.
2538         (print_decimal_floating): Remove, merge into floatformat_to_string.
2539         * value.h (print_decimal_floating): Remove.
2540
2541         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2542
2543 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2544
2545         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2546
2547 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2548
2549         * memattr.h: Don't include vec.h.
2550         (struct mem_attrib): Initialize fields.
2551         <unknown>: New static method.
2552         (struct mem_region): Add constructors, operator<, initialize
2553         fields.
2554         * memattr.c: Include algorithm.
2555         (default_mem_attrib, unknown_mem_attrib): Remove.
2556         (user_mem_region_list): New global.
2557         (target_mem_region_list, mem_region_list): Change type to
2558         std::vector<mem_region>.
2559         (mem_use_target): Now a function.
2560         (target_mem_regions_valid): Change type to bool.
2561         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2562         (require_user_regions): Adjust.
2563         (require_target_regions): Adjust.
2564         (create_mem_region): Adjust.
2565         (lookup_mem_region): Adjust.
2566         (invalidate_target_mem_regions): Adjust.
2567         (mem_clear): Rename to...
2568         (user_mem_clear): ... this, and adjust.
2569         (mem_command): Adjust.
2570         (info_mem_command): Adjust.
2571         (mem_enable, enable_mem_command, mem_disable,
2572         disable_mem_command): Adjust.
2573         (mem_delete): Adjust.
2574         (delete_mem_command): Adjust.
2575         * memory-map.h (parse_memory_map): Return an std::vector.
2576         * memory-map.c (parse_memory_map): Likewise.
2577         (struct memory_map_parsing_data): Add constructor.
2578         <memory_map>: Point to std::vector.
2579         (memory_map_start_memory): Adjust.
2580         (memory_map_end_memory): Adjust.
2581         (memory_map_end_property): Adjust.
2582         (clear_result): Remove.
2583         * remote.c (remote_memory_map): Return an std::vector.
2584         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2585         Remove.
2586         (target_debug_print_mem_region_vector): New.
2587         * target-delegates.c: Regenerate.
2588         * target.h (mem_region_vector): New typedef.
2589         (to_memory_map): Return mem_region_vector.
2590         (target_memory_map): Return an std::vector.
2591         * target.c (target_memory_map): Return an std::vector.
2592         (flash_erase_command): Adjust.
2593
2594 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2595
2596         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2597         Change type to std::string.
2598         (memory_map_start_property): Adjust.
2599         (memory_map_end_property): Adjust.
2600
2601 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2602
2603         * infrun.h: Include common/byte-vector.h.
2604         (struct displaced_step_closure): New struct.
2605         (struct buf_displaced_step_closure): New struct.
2606         * infrun.c (displaced_step_closure::~displaced_step_closure):
2607         Provide default implementation.
2608         (displaced_step_clear): Deallocate step closure with delete.
2609         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2610         (aarch64_displaced_step_closure): ... this, extend
2611         displaced_step_closure.
2612         (aarch64_displaced_step_data) <dsc>: Change type to
2613         aarch64_displaced_step_closure.
2614         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2615         unique_ptr.
2616         (aarch64_displaced_step_fixup): Add cast for displaced step
2617         closure.
2618         * amd64-tdep.c (displaced_step_closure): Rename to ...
2619         (amd64_displaced_step_closure): ... this, extend
2620         displaced_step_closure.
2621         <insn_buf>: Change type to std::vector<gdb_byte>.
2622         <max_len>: Remove.
2623         (fixup_riprel): Change type of DSC parameter, adjust to type
2624         change of insn_buf.
2625         (fixup_displaced_copy): Change type of DSC parameter.
2626         (amd64_displaced_step_copy_insn): Instantiate
2627         amd64_displaced_step_closure.
2628         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2629         to type change of insn_buf.
2630         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2631         parameter DSC.
2632         (arm_linux_copy_svc): Likewise.
2633         (cleanup_kernel_helper_return): Likewise.
2634         (arm_catch_kernel_helper_return): Likewise.
2635         (arm_linux_displaced_step_copy_insn): Instantiate
2636         arm_displaced_step_closure.
2637         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2638         (displaced_read_reg): Change type of parameter DSC.
2639         (branch_write_pc): Likewise.
2640         (load_write_pc): Likewise.
2641         (alu_write_pc): Likewise.
2642         (displaced_write_reg): Likewise.
2643         (arm_copy_unmodified): Likewise.
2644         (thumb_copy_unmodified_32bit): Likewise.
2645         (thumb_copy_unmodified_16bit): Likewise.
2646         (cleanup_preload): Likewise.
2647         (install_preload): Likewise.
2648         (arm_copy_preload): Likewise.
2649         (thumb2_copy_preload): Likewise.
2650         (install_preload_reg): Likewise.
2651         (arm_copy_preload_reg): Likewise.
2652         (cleanup_copro_load_store): Likewise.
2653         (install_copro_load_store): Likewise.
2654         (arm_copy_copro_load_store) Likewise.
2655         (thumb2_copy_copro_load_store): Likewise.
2656         (cleanup_branch): Likewise.
2657         (install_b_bl_blx): Likewise.
2658         (arm_copy_b_bl_blx): Likewise.
2659         (thumb2_copy_b_bl_blx): Likewise.
2660         (thumb_copy_b): Likewise.
2661         (install_bx_blx_reg): Likewise.
2662         (arm_copy_bx_blx_reg): Likewise.
2663         (thumb_copy_bx_blx_reg): Likewise.
2664         (cleanup_alu_imm): Likewise.
2665         (arm_copy_alu_imm): Likewise.
2666         (thumb2_copy_alu_imm): Likewise.
2667         (cleanup_alu_reg): Likewise.
2668         (install_alu_reg): Likewise.
2669         (arm_copy_alu_reg): Likewise.
2670         (thumb_copy_alu_reg): Likewise.
2671         (cleanup_alu_shifted_reg): Likewise.
2672         (install_alu_shifted_reg): Likewise.
2673         (arm_copy_alu_shifted_reg): Likewise.
2674         (cleanup_load): Likewise.
2675         (cleanup_store): Likewise.
2676         (arm_copy_extra_ld_st): Likewise.
2677         (install_load_store): Likewise.
2678         (thumb2_copy_load_literal): Likewise.
2679         (thumb2_copy_load_reg_imm): Likewise.
2680         (arm_copy_ldr_str_ldrb_strb): Likewise.
2681         (cleanup_block_load_all): Likewise.
2682         (cleanup_block_store_pc): Likewise.
2683         (cleanup_block_load_pc): Likewise.
2684         (arm_copy_block_xfer): Likewise.
2685         (thumb2_copy_block_xfer): Likewise.
2686         (cleanup_svc): Likewise.
2687         (install_svc): Likewise.
2688         (arm_copy_svc): Likewise.
2689         (thumb_copy_svc): Likewise.
2690         (arm_copy_undef): Likewise.
2691         (thumb_32bit_copy_undef): Likewise.
2692         (arm_copy_unpred): Likewise.
2693         (arm_decode_misc_memhint_neon): Likewise.
2694         (arm_decode_unconditional): Likewise.
2695         (arm_decode_miscellaneous): Likewise.
2696         (arm_decode_dp_misc): Likewise.
2697         (arm_decode_ld_st_word_ubyte): Likewise.
2698         (arm_decode_media): Likewise.
2699         (arm_decode_b_bl_ldmstm): Likewise.
2700         (arm_decode_ext_reg_ld_st): Likewise.
2701         (thumb2_decode_dp_shift_reg): Likewise.
2702         (thumb2_decode_ext_reg_ld_st): Likewise.
2703         (arm_decode_svc_copro): Likewise.
2704         (thumb2_decode_svc_copro): Likewise.
2705         (install_pc_relative): Likewise.
2706         (thumb_copy_pc_relative_16bit): Likewise.
2707         (thumb_decode_pc_relative_16bit): Likewise.
2708         (thumb_copy_pc_relative_32bit): Likewise.
2709         (thumb_copy_16bit_ldr_literal): Likewise.
2710         (thumb_copy_cbnz_cbz): Likewise.
2711         (thumb2_copy_table_branch): Likewise.
2712         (cleanup_pop_pc_16bit_all): Likewise.
2713         (thumb_copy_pop_pc_16bit): Likewise.
2714         (thumb_process_displaced_16bit_insn): Likewise.
2715         (decode_thumb_32bit_ld_mem_hints): Likewise.
2716         (thumb_process_displaced_32bit_insn): Likewise.
2717         (thumb_process_displaced_insn): Likewise.
2718         (arm_process_displaced_insn): Likewise.
2719         (arm_displaced_init_closure): Likewise.
2720         (arm_displaced_step_fixup): Add cast for closure.
2721         * arm-tdep.h: Include infrun.h.
2722         (displaced_step_closure): Rename to ...
2723         (arm_displaced_step_closure): ... this, extend
2724         displaced_step_closure.
2725         <u::svc::copy_svc_os>: Change type of parameter DSC.
2726         <cleanup>: Likewise.
2727         (arm_process_displaced_insn): Likewise.
2728         (arm_displaced_init_closure): Likewise.
2729         (displaced_read_reg): Likewise.
2730         (displaced_write_reg): Likewise.
2731         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2732         Adjust.
2733         * i386-tdep.h: Include infrun.h.
2734         (i386_displaced_step_closure): New typedef.
2735         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2736         i386_displaced_step_closure.
2737         (i386_displaced_step_fixup): Adjust.
2738         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2739         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2740         and unique_ptr.
2741         (ppc_displaced_step_fixup): Adjust.
2742         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2743         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2744         and unique_ptr.
2745         (s390_displaced_step_fixup): Adjust.
2746
2747 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2748
2749         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2750         Remove declarations.
2751
2752 2017-10-20  Tom Tromey  <tom@tromey.com>
2753
2754         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2755         std::vector.
2756         (gdb_bfd_record_inclusion): Update.
2757         (bfdp): Remove typedef.
2758
2759 2017-10-20  Tom Tromey  <tom@tromey.com>
2760
2761         * gdb_bfd.c (gdb_bfd_ref): Use new.
2762         (struct gdb_bfd_data): Add constructor, destructor, and member
2763         initializers.
2764         (gdb_bfd_unref): Use delete.
2765
2766 2017-10-20  Tom Tromey  <tom@tromey.com>
2767
2768         * exec.c (exec_file_attach): Use new_bfd_ref.
2769         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2770         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2771         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2772         new_bfd_ref.
2773         * gdb_bfd.h (new_bfd_ref): New function.
2774
2775 2017-10-20  Pedro Alves  <palves@redhat.com>
2776
2777         * main.c (captured_command_loop): Add attribute noinline.
2778
2779 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2780
2781         * interps.c (struct interp_factory): Add constructor.
2782         (interp_factory_p): Remove typedef.
2783         (DEF_VEC_P(interp_factory_p)): Remove.
2784         (interpreter_factories): Change type to std::vector.
2785         (interp_factory_register): Adjust.
2786         (interp_lookup): Adjust.
2787         (interpreter_completer): Adjust.
2788
2789 2017-10-19  Tom Tromey  <tom@tromey.com>
2790
2791         * break-catch-syscall.c (catch_syscall_completer): Use
2792         std::string, gdb::unique_xmalloc_ptr.
2793
2794 2017-10-19  Tom Tromey  <tom@tromey.com>
2795
2796         * infcall.c (call_function_by_hand_dummy): Use std::string.
2797
2798 2017-10-19  Tom Tromey  <tom@tromey.com>
2799
2800         * mi/mi-main.c (mi_cmd_execute): Update.
2801         * top.h (prepare_execute_command): Return scoped_value_mark.
2802         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2803         Add move constructor.
2804         * top.c (prepare_execute_command): Return scoped_value_mark.
2805         (execute_command): Update.
2806
2807 2017-10-19  Pedro Alves  <palves@redhat.com>
2808
2809         * xml-support.c (xml_fetch_content_from_file): Check fread's
2810         return.
2811
2812 2017-10-19  Pedro Alves  <palves@redhat.com>
2813
2814         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2815         async.
2816         (handle_error_fd): New function.
2817         (ser_base_async): Add/delete an event loop file handler for
2818         error_fd.
2819
2820 2017-10-19  Pedro Alves  <palves@redhat.com>
2821
2822         * xml-support.c (xml_fetch_content_from_file): Don't read in
2823         chunks.  Instead use fseek to determine the file's size, and read
2824         it in one go.
2825
2826 2017-11-18  Keith Seitz  <keiths@redhat.com>
2827
2828         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2829         types.
2830         Add whitespace to front of type name.
2831
2832 2017-10-18  Keith Seitz  <keiths@redhat.com>
2833
2834         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2835         DW_AT_accessibility.
2836
2837 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2838
2839         * features/tic6x-c62x-linux.c: Remove.
2840
2841 2017-10-17  Tom Tromey  <tom@tromey.com>
2842
2843         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2844         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2845         (do_mixed_source_and_assembly): Likewise.
2846
2847 2017-10-17  Tom Tromey  <tom@tromey.com>
2848
2849         * regcache.c (regcache::xfer_part): Remove assertion.
2850
2851 2017-10-17  Pedro Alves  <palves@redhat.com>
2852
2853         * xml-support.c (xml_fetch_content_from_file): Call
2854         unique_ptr::release() instead unique_ptr::get() when passing
2855         through xrealloc.
2856
2857 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2858
2859         * regcache.c (regcache::xfer_part): Remove parameters read and
2860         write, add parameter is_raw.  All callers are updated.
2861
2862 2017-10-16  Keith Seitz  <keiths@redhat.com>
2863
2864         * c-typeprint.c (enum access_specifier): Moved here from
2865         c_type_print_base.
2866         (output_access_specifier): New function.
2867         (c_type_print_base): Consider typedefs when assessing
2868         whether access labels are needed.
2869         Use output_access_specifier as needed.
2870         Output access specifier for typedefs, if needed.
2871         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2872         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2873         fields.
2874         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2875         accessor macros.
2876
2877 2017-10-16  Tom Tromey  <tom@tromey.com>
2878
2879         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2880         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2881         * target.c (target_fileio_read_stralloc): Update.
2882         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2883         * target.h (target_fileio_read_stralloc): Return
2884         unique_xmalloc_ptr.
2885
2886 2017-10-16  Tom Tromey  <tom@tromey.com>
2887
2888         * xml-syscall.c (xml_init_syscalls_info): Update.
2889         * xml-support.c (xinclude_start_include): Update.
2890         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2891         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2892         (xml_fetch_content_from_file): Likewise.
2893         * osdata.c (get_osdata): Update.
2894         * target.h (target_read_stralloc, target_get_osdata): Return
2895         unique_xmalloc_ptr.
2896         * solib-aix.c (solib_aix_get_library_list): Update.
2897         * solib-target.c (solib_target_current_sos): Update.
2898         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2899         * xml-tdesc.c (fetch_available_features_from_target): Update.
2900         (target_fetch_description_xml): Update.
2901         (file_read_description_xml): Update.
2902         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2903         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2904         (remote_pid_to_exec_file): Update.
2905         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2906         (target_get_osdata): Likewise.
2907
2908 2017-10-16  Tom Tromey  <tom@tromey.com>
2909
2910         * remote.c (remote_register_number_and_offset): Use std::vector.
2911         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2912         (putpkt_binary): Use gdb::def_vector.
2913         (compare_sections_command): Use gdb::byte_vector.
2914
2915 2017-10-16  Tom Tromey  <tom@tromey.com>
2916
2917         * ppc-linux-nat.c (hwdebug_insert_point): Use
2918         gdb::unique_xmalloc_ptr, XDUP.
2919
2920 2017-10-16  Tom Tromey  <tom@tromey.com>
2921
2922         * probe.c (parse_probes): Use std::string.
2923         (info_probes_for_ops, enable_probes_command)
2924         (disable_probes_command): Remove cleanups.
2925
2926 2017-10-16  Tom Tromey  <tom@tromey.com>
2927
2928         * buildsym.c (block_compar): Remove.
2929         (end_symtab_get_static_block): Use std::vector.
2930
2931 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2932
2933         * memrange.h (struct mem_range): Define operator< and operator==.
2934         (mem_range_s): Remove.
2935         (DEF_VEC_O (mem_range_s)): Remove.
2936         (normalize_mem_ranges): Change parameter type to std::vector.
2937         * memrange.c (compare_mem_ranges): Remove.
2938         (normalize_mem_ranges): Change parameter type to std::vector,
2939         adjust to vector change.
2940         * exec.c (section_table_available_memory): Return vector, remove
2941         parameter.
2942         (section_table_read_available_memory): Adjust to std::vector
2943         change.
2944         * remote.c (remote_read_bytes): Adjust to std::vector
2945         change.
2946         * tracepoint.h (traceframe_available_memory): Change parameter
2947         type to std::vector.
2948         * tracepoint.c (traceframe_available_memory): Change parameter
2949         type to std::vector, adjust.
2950         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2951         std::vector change.
2952         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2953         unittests/memrange-selftests.c.
2954         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2955         * gdb/unittests/memrange-selftests.c: New file.
2956
2957 2017-10-16  Pedro Alves  <palves@redhat.com>
2958
2959         * elfread.c (probe_key_free): Rename range-for variable.
2960         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2961         (find_probe_by_pc, collect_probes): Rename range-for variable.
2962
2963 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2964
2965         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2966         * features/tic6x-c62x.c: Remove.
2967         * features/tic6x-c64x-linux.c: Remove.
2968         * features/tic6x-c64x.c: Remove.
2969         * features/tic6x-c64xp-linux.c: Remove.
2970         * features/tic6x-c64xp.c: Remove.
2971         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2972         initialize_tdesc_tic6x_*_linux functions.
2973         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2974         initialize_tdesc_tic6x_* functions.
2975
2976 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2977
2978         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2979         tic6x-c62x.
2980         * regformats/tic6x-c62x.dat: Remove.
2981         * regformats/tic6x-c64x.dat: Remove.
2982         * regformats/tic6x-c64xp.dat: Remove.
2983
2984 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2985
2986         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2987         (the !HAVE_LIBEXPAT version).
2988
2989 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2990
2991         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2992         const.
2993
2994 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2995
2996         * target.h: Include tracepoint.h.
2997         (enum trace_find_type): Move to tracepoint.h.
2998         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2999         * tracepoint.h: Don't include target.h
3000         (enum trace_find_type): Move from target.h.
3001         (parse_traceframe_info): Return a unique ptr.
3002         * tracepoint.c (current_traceframe_info): Change type to unique
3003         ptr.
3004         (free_traceframe_info): Remove.
3005         (clear_traceframe_info): Don't manually free
3006         current_traceframe_info.
3007         (free_result): Remove.
3008         (parse_traceframe_info): Return a unique ptr.
3009         (get_traceframe_info): Adjust to unique ptr.
3010         * ctf.c (ctf_traceframe_info): Return a unique ptr.
3011         * remote.c (remote_traceframe_info): Return a unique ptr.
3012         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3013         ptr.
3014         * target-debug.h (target_debug_print_traceframe_info_up): New
3015         macro.
3016         * target-delegates.c: Regenerate.
3017
3018 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3019
3020         * memrange.h (struct mem_range): Add constructors.
3021         * tracepoint.h (struct traceframe_info) <memory>: Change type to
3022         std::vector<mem_range>.
3023         * tracepoint.c (free_traceframe_info): Don't manually free
3024         vector.
3025         (traceframe_info_start_memory): Adjust to vector change.
3026         (traceframe_available_memory): Likewise.
3027         * tracefile-tfile.c (build_traceframe_info): Likewise.
3028         * ctf.c (ctf_traceframe_info): Likewise.
3029
3030 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3031
3032         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3033         std::vector<int>.
3034         * tracepoint.c (free_traceframe_info): Deallocate with delete.
3035         (traceframe_info_start_tvar): Adjust to vector change.
3036         (parse_traceframe_info): Allocate with new.
3037         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3038         vector change.
3039         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3040         change.
3041         tfile_traceframe_info): Allocate with new.
3042         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3043         change.
3044
3045 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3046
3047         * tracepoint.c (traceframe_info): Rename to...
3048         (current_traceframe_info): ...this.
3049         (clear_traceframe_info): Adjust.
3050         (get_traceframe_info): Adjust.
3051
3052 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3053
3054         * nat/linux-osdata.c: Include algorithm.
3055         (compare_processes): Remove.
3056         (struct pid_pgid_entry): New struct.
3057         (linux_xfer_osdata_processgroups): Use std::vector instead of
3058         XNEWVEC.
3059
3060 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3061
3062         * objfiles.h: Don't include symfile.h.
3063         (struct partial_symbol): Remove forward-declaration.
3064         (struct objfile) <global_psymbols, static_psymbols>: Change type
3065         to std::vector<partial_symbol *>.
3066         * objfiles.c (objfile::objfile): Don't memset those fields.
3067         (objfile::~objfile): Don't free those fields.
3068         * psympriv.h (struct psymbol_allocation_list): Remove
3069         forward-declaration.
3070         (add_psymbol_to_list): Change psymbol_allocation_list parameter
3071         to std::vector.
3072         (start_psymtab_common): Change parameters to std::vector.
3073         * psymtab.c: Include algorithm.
3074         (require_partial_symbols): Call shrink_to_fit.
3075         (find_pc_sect_psymbol): Adjust to vector change.
3076         (match_partial_symbol): Likewise.
3077         (lookup_partial_symbol): Likewise.
3078         (psym_relocate): Likewise.
3079         (dump_psymtab): Likewise.
3080         (recursively_search_psymtabs): Likewise.
3081         (compare_psymbols): Remove.
3082         (sort_pst_symbols): Adjust to vector change.
3083         (start_psymtab_common): Likewise.
3084         (end_psymtab_common): Likewise.
3085         (psymbol_bcache_full): De-constify return value.
3086         (add_psymbol_to_bcache): Likewise.
3087         (extend_psymbol_list): Remove.
3088         (append_psymbol_to_list): Adjust to vector change.
3089         (add_psymbol_to_list): Likewise.
3090         (init_psymbol_list): Likewise.
3091         (maintenance_info_psymtabs): Likewise.
3092         (maintenance_check_psymtabs): Likewise.
3093         * symfile.h (struct psymbol_allocation_list): Remove.
3094         * symfile.c (reread_symbols): Adjust to vector change.
3095         * dbxread.c (start_psymtab): Change type of parameters.
3096         (dbx_symfile_read): Adjust to vector change.
3097         (read_dbx_symtab): Likewise.
3098         (start_psymtab): Change type of parameters.
3099         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3100         (create_partial_symtab): Likewise.
3101         (add_partial_symbol): Likewise.
3102         (write_one_signatured_type): Likewise.
3103         (recursively_write_psymbols): Likewise.
3104         * mdebugread.c (parse_partial_symbols): Likewise.
3105         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3106         (scan_xcoff_symtab): Adjust to vector change.
3107         (xcoff_initial_scan): Likewise.
3108
3109 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
3110
3111         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3112
3113 2017-10-13  Yao Qi  <yao.qi@linaro.org>
3114
3115         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3116         Remove s390x-*-expedite, add s390x-expedite.
3117
3118 2017-10-13  Yao Qi  <yao.qi@linaro.org>
3119
3120         * features/s390-gs-linux64.c: Regenerated.
3121         * features/s390x-gs-linux64.c: Regenerated.
3122
3123 2017-10-13  Tom Tromey  <tom@tromey.com>
3124
3125         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3126         * solib.c (update_solib_list, reload_shared_libraries_1): Use
3127         delete.
3128         * symfile.c (symbol_file_add_with_addrs): Use new.
3129         (symbol_file_add_separate): Update comment.
3130         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3131         * jit.c (jit_object_close_impl): Use new.
3132         (jit_unregister_code): Use delete.
3133         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3134         (~objfile): Rename from free_objfile.
3135         (free_objfile_separate_debug, do_free_objfile_cleanup)
3136         (free_all_objfiles, objfile_purge_solibs): Use delete.
3137         * objfiles.h (struct objfile): Add constructor and destructor.
3138         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
3139         (allocate_objfile, free_objfile): Don't declare.
3140         (struct objstats): Add initializers.
3141
3142 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3143
3144         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3145         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3146         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3147         * gdbarch.h: Regenerate.
3148         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3149         Adjust comment.
3150         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3151         (i386_displaced_step_fixup): Adjust comment.
3152         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3153
3154 2017-10-12  Tom Tromey  <tom@tromey.com>
3155
3156         * prologue-value.h (pv_area::store_would_trash): Return bool.
3157         (pv_area::find_reg): Likewise.
3158         * prologue-value.c (pv_area::store_would_trash): Return bool.
3159         (pv_area::find_reg): Likewise.
3160
3161 2017-10-12  Tom Tromey  <tom@tromey.com>
3162
3163         * s390-linux-tdep.c (s390_store, s390_load)
3164         (s390_check_for_saved, s390_analyze_prologue): Update.
3165         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3166         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3167         * prologue-value.h (class pv_area): Move from prologue-value.c.
3168         Change names of members.  Add constructor, destructor, member
3169         functions.
3170         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3171         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3172         (pv_area_fetch, pv_area_scan): Don't declare.
3173         * prologue-value.c (struct pv_area::area_entry): Now member of
3174         pv_area.
3175         (struct pv_area): Move to prologue-value.h.
3176         (pv_area::pv_area): Rename from make_pv_area.
3177         (pv_area::~pv_area): Rename from free_pv_area.
3178         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3179         (clear_entries, find_entry, overlaps, store_would_trash, store)
3180         (fetch, find_reg, scan): Now member of pv_area.
3181         Remove "area" argument.  Update.
3182         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3183         Update.
3184         * mn10300-tdep.c (push_reg, check_for_saved)
3185         (mn10300_analyze_prologue): Update.
3186         * mep-tdep.c (is_arg_spill, check_for_saved)
3187         (mep_analyze_prologue): Update.
3188         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3189         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3190         (m32c_is_struct_return, m32c_analyze_prologue): Update.
3191         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3192         Update.
3193         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3194         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3195
3196 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3197
3198         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3199         * linux-nat.c (linux_nat_delete_thread): New variable.
3200         (lwp_free): Invoke linux_nat_delete_thread if set.
3201         (linux_nat_set_delete_thread): New function.
3202         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3203         thread delete callback.
3204         * arm-linux-nat.c (arm_linux_delete_thread): New function.
3205         (_initialize_arm_linux_nat): Assign thread delete callback.
3206         * s390-linux-nat.c (s390_delete_thread): New function.
3207         (_initialize_s390_nat): Assign thread delete callback.
3208         * x86-linux-nat.c (x86_linux_add_target): Likewise.
3209         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3210         function.
3211         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3212         declaration.
3213         * nat/x86-linux.c (x86_linux_delete_thread): New function.
3214         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3215
3216 2017-10-09  Tom Tromey  <tom@tromey.com>
3217
3218         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3219         std::string.
3220         * tui/tui-layout.c (enum tui_status): Use std::string.
3221
3222 2017-10-11  Tom Tromey  <tom@tromey.com>
3223
3224         * gdbthread.h (thread_command): Constify.
3225         * inferior.h (detach_command): Constify.
3226         * top.h (set_history, show_history): Constify.
3227         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3228         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3229         * bsd-kvm.c (bsd_kvm_cmd): Constify.
3230         * printcmd.c (set_command): Constify.
3231         (non_const_set_command): New function.
3232         * dcache.c (set_dcache_command, show_dcache_command): Constify.
3233         * breakpoint.c (enable_command, disable_command, delete_command)
3234         (catch_command, tcatch_command, set_breakpoint_cmd)
3235         (show_breakpoint_cmd): Constify.
3236         * macrocmd.c (macro_command): Constify.
3237         * infcmd.c (unset_command, kill_command, detach_command)
3238         (info_proc_cmd): Constify.
3239         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3240         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3241         (info_auto_load_cmd): Constify.
3242         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3243         (unset_tdesc_cmd): Constify.
3244         * ada-lang.c (set_ada_command, show_ada_command)
3245         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3246         * guile/guile.c (set_guile_command, show_guile_command)
3247         (info_guile_command): Constify.
3248         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3249         Constify.
3250         * skip.c (skip_command): Constify.
3251         * compile/compile.c (_initialize_compile): Constify.
3252         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3253         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3254         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3255         (maint_btrace_pt_show_cmd): Constify.
3256         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3257         Constify.
3258         * python/python.c (user_show_python, user_set_python): Constify.
3259         * mips-tdep.c (set_mips_command, show_mips_command)
3260         (set_mipsfpu_command): Constify.
3261         * record-btrace.c (cmd_record_btrace_start)
3262         (cmd_set_record_btrace, cmd_show_record_btrace)
3263         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3264         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3265         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3266         Constify.
3267         * symfile.c (overlay_command): Constify.
3268         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3269         * cli/cli-logging.c (set_logging_command, show_logging_command):
3270         Constify.
3271         * cli/cli-dump.c (dump_command, append_command)
3272         (srec_dump_command, ihex_dump_command, verilog_dump_command)
3273         (tekhex_dump_command, binary_dump_command)
3274         (binary_append_command): Constify.
3275         * cli/cli-decode.c (struct cmd_list_element): Change type of
3276         "fun".
3277         * cli/cli-cmds.c (info_command, show_command, set_debug)
3278         (show_debug): Constify.
3279         (show_command): Add non-const overload.
3280         * top.c (set_history, show_history): Constify.
3281         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3282         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3283         * target.c (target_command): Constify.
3284         * sparc64-tdep.c (info_adi_command): Constify.
3285         * record-full.c (cmd_record_full_start): Constify.
3286         (set_record_full_command): Constify.  Fix typo.
3287         (show_record_full_command): Constify.
3288         * thread.c (thread_command, thread_apply_command): Constify.
3289         * memattr.c (dummy_cmd): Constify.
3290         * value.c (function_command): Constify.
3291         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3292         * probe.c (info_probes_command): Constify.
3293         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3294         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3295         (show_thread_cmd, set_thread_default_cmd)
3296         (show_thread_default_cmd): Constify.
3297         (check_empty): Constify.
3298         * tracepoint.c (tfind_command): Constify.
3299         * cp-support.c (maint_cplus_command): Constify.
3300         * windows-tdep.c (info_w32_command): Constify.
3301         * record.c (cmd_record_start, set_record_command)
3302         (show_record_command, info_record_command, cmd_record_goto):
3303         Constify.
3304         * ravenscar-thread.c (set_ravenscar_command)
3305         (show_ravenscar_command): Constify.
3306         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3307         Constify.
3308         (add_internal_problem_command): Remove casts.
3309         * arc-tdep.c (maintenance_print_arc_command): Constify.
3310         * valprint.c (set_print, show_print, set_print_raw)
3311         (show_print_raw): Constify.
3312         * maint.c (maintenance_command, maintenance_info_command)
3313         (maintenance_print_command, maintenance_set_cmd)
3314         (maintenance_show_cmd, set_per_command_cmd)
3315         (show_per_command_cmd, maintenance_check_command): Constify.
3316         * language.c (set_check, show_check): Constify.
3317         * typeprint.c (show_print_type, set_print_type): Constify.
3318         * go32-nat.c (go32_info_dos_command): Constify.
3319
3320 2017-10-11  Tom Tromey  <tom@tromey.com>
3321
3322         * breakpoint.c (prepare_re_set_context): Remove.
3323         (breakpoint_re_set_one): Update.  Don't use cleanups.
3324         (breakpoint_re_set): Use scoped_restore, std::string, and
3325         scoped_restore_current_language.
3326
3327 2017-10-11  Tom Tromey  <tom@tromey.com>
3328
3329         * breakpoint.c (commands_command_1): Use std::string.
3330         (cleanup_executing_breakpoints): Remove.
3331         (bpstat_do_actions_1): Use scoped_restore.
3332         (bpstat_check_watchpoint): Use std::string.
3333         (decode_static_tracepoint_spec): Likewise.
3334         (break_range_command): Likewise.
3335         (watch_command_1): Likewise.
3336         (compare_breakpoints): Change argument types.
3337         (clear_command): Use std::vector.
3338         (cleanup_executing_breakpoints): Remove.
3339         (update_global_location_list): Use unique_xmalloc_ptr.
3340         (strace_command): Remove unused declaration.
3341
3342 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3343
3344         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3345         * NEWS: Mention new FreeBSD/arm native configuration.
3346         * configure.host: Add arm*-*-freebsd*.
3347         * configure.nat: Likewise.
3348         * arm-fbsd-nat.c: New file.
3349
3350 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3351
3352         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3353         (ALLDEPFILES): Add arm-fbsd-tdep.c.
3354         * NEWS: Mention new FreeBSD/arm target.
3355         * configure.tgt: Add arm*-*-freebsd*.
3356         * arm-fbsd-tdep.c: New file.
3357         * arm-fbsd-tdep.h: New file.
3358
3359 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3360
3361         * linux-tdep.c (linux_make_corefile_notes): Remove call to
3362         `gdbarch_elfcore_write_linux_prpsinfo'.
3363         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3364         method.
3365         (elf_internal_linux_prpsinfo): Remove declaration.
3366         * gdbarch.h: Regenerate.
3367         * gdbarch.c: Regenerate.
3368
3369 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3370
3371         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3372         `set_gdbarch_elfcore_write_linux_prpsinfo'.
3373
3374 2017-10-11  Pedro Alves  <palves@redhat.com>
3375
3376         * breakpoint.c (reattach_breakpoints): Delete.
3377         * breakpoint.h (reattach_breakpoints): Delete.
3378
3379 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
3380
3381         * symfile.c (registered_sym_fns): Make struct, not typedef.
3382         (DEF_VEC_O (registered_sym_fns)): Remove.
3383         (symtab_fns): Change type to std::vector.
3384         (add_symtab_fns): Adjust.
3385         (find_sym_fns): Adjust.
3386
3387 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3388
3389         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3390         * arc-tdep.h (arc_arch_is_em): New function.
3391         (arc_arch_is_hs): Likewise.
3392
3393 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3394
3395         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3396         parentheses in the declaration.
3397         (macro_lookup_inclusion): Likewise.
3398         (macro_lookup_definition): Likewise.
3399         * p-lang.h (pascal_builtin_types): Likewise.
3400         * tui/tui-data.c (tui_win_list): Likewise.
3401         * tui/tui-data.h (tui_win_list): Likewise.
3402         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3403
3404 2017-10-11  Mark Rages  <markrages@gmail.com>
3405
3406         * target-memory.c (block_boundaries): Fix for block address not
3407         aligned on block size.
3408
3409 2017-10-10  Pedro Alves <palves@redhat.com>
3410             Tom Tromey  <tom@tromey.com>
3411
3412         * breakpoint.c (struct captured_breakpoint_query_args)
3413         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3414         (print_breakpoint): New.
3415         * breakpoint.h (print_breakpoint): Declare.
3416         * common/common-exceptions.h (enum return_reason): Remove
3417         references to catch_exceptions.
3418         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3419         Delete.
3420         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3421         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3422         * gdb.h: Delete.
3423         * gdbthread.h (thread_select): Declare.
3424         * mi/mi-cmd-break.c: Don't include gdb.h.
3425         (breakpoint_notify): Use print_breakpoint.
3426         * mi/mi-cmd-catch.c: Don't include gdb.h.
3427         * mi/mi-interp.c: Don't include gdb.h.
3428         (mi_print_breakpoint_for_event): New.
3429         (mi_breakpoint_created, mi_breakpoint_modified): Use
3430         mi_print_breakpoint_for_event.
3431         * mi/mi-main.c: Don't include gdb.h.
3432         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3433         thread_select instead of gdb_thread_select.
3434         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3435         of using gdb_list_thread_ids.
3436         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3437         FILEIO_ENOSYS here.
3438         (remote_fileio_request): Use TRY/CATCH instead of
3439         catch_exceptions.
3440         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3441         (symbol_file_add_from_memory_wrapper): Delete.
3442         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3443         * thread.c: Don't include gdb.h.
3444         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3445         (thread_alive): Use thread_select.
3446         (do_captured_thread_select): Delete, parts salvaged as ...
3447         (thread_select): ... this new function.
3448         (gdb_thread_select): Delete.
3449
3450 2017-10-10  Pedro Alves  <palves@redhat.com>
3451             Tom Tromey  <tom@tromey.com>
3452
3453         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3454         and reverse logic.
3455         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3456         No longer macros.  Instead ...
3457         (enum wp_check_result): They're now values of this new
3458         enumeration.
3459         (watchpoint_check): Change return type to wp_check_result and
3460         parameter type to bpstat.
3461         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3462         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3463         catch_errors.  Reverse logic of watchpoint_check call.
3464         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3465         pointer as parameter.
3466         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3467         * common/common-exceptions.c (throw_exception_sjlj): Update
3468         comments to avoid mentioning catch_errors.
3469         * exceptions.c (catch_errors): Delete.
3470         * exceptions.h: Update comments to avoid mentioning catch_errors.
3471         (catch_errors_ftype, catch_errors): Delete.
3472         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3473         (hook_stop_stub): Delete.
3474         (restore_selected_frame): Change return type to void, and
3475         parameter type to const frame_id &.
3476         (restore_infcall_control_state): Use TRY/CATCH instead of
3477         catch_errors.
3478         * main.c (captured_command_loop): Return void and remove
3479         parameter.  Remove references to catch_errors.
3480         (captured_main): Use TRY/CATCH instead of catch_errors.
3481         * objc-lang.c (objc_submethod_helper_data)
3482         (find_objc_msgcall_submethod_helper): Delete.
3483         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3484         catch_errors.
3485         * record-full.c (record_full_message): Return void.
3486         (record_full_message_args, record_full_message_wrapper): Delete.
3487         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3488         instead of catch_errors.
3489         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3490         parameter type to int.
3491         * solib-darwin.c (open_symbol_file_object): Ditto.
3492         * solib-dsbt.c (open_symbol_file_object): Ditto.
3493         * solib-frv.c (open_symbol_file_object): Ditto.
3494         * solib-svr4.c (open_symbol_file_object): Ditto.
3495         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3496         * solib.c (update_solib_list): Use TRY/CATCH instead of
3497         catch_errors.
3498         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3499         Change type.
3500         * symmisc.c (struct print_symbol_args): Remove.
3501         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3502         (print_symbol): Change type.
3503         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3504         and remove parameters.
3505         (catch_errors): New.
3506         (get_windows_debug_event): Adjust.
3507
3508 2017-10-09  Tom Tromey  <tom@tromey.com>
3509
3510         * mi/mi-main.c (free_splay_tree): Remove.
3511         (list_available_thread_groups): Use splay_tree_up.
3512         * common/gdb_splay_tree.h: New file.
3513
3514 2017-10-09  Tom Tromey  <tom@tromey.com>
3515
3516         * mi/mi-main.c (do_nothing): Remove.
3517         (list_available_thread_groups): Update.
3518
3519 2017-10-09  Pedro Alves  <palves@redhat.com>
3520
3521         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3522         reading registers when switching context.
3523
3524 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3525
3526         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3527         (fbsd_convert_siginfo): Likewise.
3528         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3529
3530 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3531
3532         * configure.ac (try_guile_versions): Remove guile-2.2.
3533         * configure: Regenerate.
3534
3535 2017-10-09  Tom Tromey  <tom@tromey.com>
3536
3537         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3538         (COMPILE.pre): Use $(CXX).
3539
3540 2017-10-09  Pedro Alves  <palves@redhat.com>
3541
3542         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3543         Use bool.
3544         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3545         * cp-support.h (cp_remove_params): Now returns a
3546         gdb::unique_xmalloc_ptr.
3547         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3548         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3549         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3550         returning a gdb::unique_xmalloc_ptr.
3551         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3552         * stack.c (find_frame_funname): Adjust to cp_remove_params
3553         returning a gdb::unique_xmalloc_ptr.
3554
3555 2017-10-08  Tom Tromey  <tom@tromey.com>
3556
3557         * dwarf2read.c (dwarf2_get_dwz_file): Use
3558         gdb::unique_xmalloc_ptr.
3559         (find_slot_in_mapped_hash): Likewise.
3560         (dwarf2_physname): Likewise.
3561         (create_dwo_unit_in_dwp_v1): Use std::string.
3562         (create_dwo_unit_in_dwp_v2): Likewise.
3563         (lookup_dwo_cutu): Likewise.
3564         (inherit_abstract_dies): Use std::vector.
3565         (read_array_type): Likewise.
3566         (dwarf_decode_macros): Remove unused declaration.
3567         (unsigned_int_compar): Remove.
3568         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3569         (psymtabs_addrmap_cleanup): Remove.
3570
3571 2017-10-08  Tom Tromey  <tom@tromey.com>
3572
3573         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3574         * frame.h (frame_cleanup_after_sniffer): Declare.
3575         (frame_prepare_for_sniffer): Return void.
3576         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3577         type of argument.
3578         (frame_prepare_for_sniffer): Return void.
3579
3580 2017-10-08  Tom Tromey  <tom@tromey.com>
3581
3582         * utils.h (make_cleanup_value_free): Remove.
3583         * utils.c (do_value_free, struct cleanup): Remove.
3584         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3585         Use gdb_value_up.
3586         * value.h (struct value_deleter): New.
3587         (gdb_value_up): New typedef.
3588
3589 2017-10-08  Tom Tromey  <tom@tromey.com>
3590
3591         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3592         (make_cleanup_free_search_symbols): Remove.
3593         (search_symbols): Return std::vector.
3594         (symbol_search::compare_search_syms): Now member of
3595         symbol_search.  Change arguments.
3596         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3597         (symtab_symbol_info, rbreak_command): Update.
3598         * symtab.h (struct symbol_search) <next>: Remove.
3599         Add constructors.
3600         (symbol_search::operator<): New function.
3601         (symbol_search::operator==): New function.
3602         (search_symbols): Remove std::vector.
3603         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3604         (symbol_search::compare_search_syms): Declare.
3605
3606 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3607
3608         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3609         arch/aarch64-insn.o.
3610         Remove one rule.
3611         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3612
3613 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3614
3615         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3616         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3617         arch/arm-linux.o respectively.
3618         * configure.tgt: Likewise.
3619
3620 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3621
3622         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3623         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3624
3625 2017-10-06  Pedro Alves  <palves@redhat.com>
3626
3627         * windows-nat.c: Include <algorithm>.
3628
3629 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3630
3631         * configure.tgt (i386_tobjs): New variable.
3632         (amd64_tobjs): New variable.
3633         Set $cpu_obs and $os_obs.
3634
3635 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3636
3637         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3638         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3639         (clean): Remove object files and dependency files.
3640         (distclean): Remove the directory.
3641         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3642         * configure: Re-generated.
3643         * configure.tgt: Replace amd64.o with arch/amd64.o.
3644
3645 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3646
3647         PR build/22188
3648         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3649         and SETEND.
3650
3651 2017-10-05  Pedro Alves  <palves@redhat.com>
3652
3653         * linux-nat.c (linux_child_follow_fork): When following the parent
3654         and detaching the child, consult the parent thread's architecture
3655         instead of the child's.
3656
3657 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3658
3659         * ax.h: Do not include "doublest.h".
3660         (union agent_val): Remove.
3661
3662 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3663
3664         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3665         (decimal_to_string): Return std::string object.
3666         (decimal_from_string): Accept std::string object.  Return bool.
3667         (decimal_from_integral, decimal_from_doublest): Remove.
3668         (decimal_from_longest): Add prototype.
3669         (decimal_from_ulongest): Likewise.
3670         (decimal_to_longest): Likewise.
3671         (decimal_from_doublest): Likewise.
3672         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3673         (MAX_DECIMAL_STRING): Move here.
3674         (decimal_to_string): Return std::string object.
3675         (decimal_from_string): Accept std::string object.  Return bool.
3676         (decimal_from_integral): Remove, replace by ...
3677         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3678         (decimal_to_longest): New function.
3679         (decimal_from_floating): Remove, replace by ...
3680         (decimal_from_doublest): ... this new function.
3681         (decimal_to_doublest): Update to new decimal_to_string interface.
3682
3683         * value.c (unpack_long): Use decimal_to_longest.
3684         * valops.c (value_cast): Use decimal_from_doublest instead of
3685         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3686         decimal_from_integral.
3687         * valarith.c (value_args_as_decimal): Likewise.
3688         * valprint.c (print_decimal_floating): Update to new
3689         decimal_to_string interface.
3690         * printcmd.c (printf_decfloat): Likewise.
3691         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3692
3693 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3694
3695         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3696         * gdbtypes.c: Include "floatformat.h".
3697         * value.c: Likewise.
3698         * m68k-tdep.c: Likewise.
3699
3700         * findvar.c: Do not include "floatformat.h".
3701         * amd64-darwin-tdep.c: Likewise.
3702         * arm-linux-tdep.c: Likewise.
3703         * i386-darwin-tdep.c: Likewise.
3704         * i387-tdep.c: Likewise.
3705         * m68k-linux-tdep.c: Likewise.
3706         * mep-tdep.c: Likewise.
3707         * mips-tdep.c: Likewise.
3708         * nios2-tdep.c: Likewise.
3709         * s390-linux-tdep.c: Likewise.
3710         * sparc-obsd-tdep.c: Likewise.
3711         * sparc-tdep.c: Likewise.
3712         * sparc64-tdep.c: Likewise.
3713         * spu-tdep.c: Likewise.
3714         * tic6x-tdep.c: Likewise.
3715         * tilegx-tdep.c: Likewise.
3716         * vax-tdep.c: Likewise.
3717         * xstormy16-tdep.c: Likewise.
3718         * xtensa-tdep.c: Likewise.
3719
3720         * top.c: Do not include "doublest.h".
3721         * aarch64-tdep.c: Likewise.
3722         * alpha-tdep.c: Likewise.
3723         * arm-linux-tdep.c: Likewise.
3724         * m68k-linux-tdep.c: Likewise.
3725         * tilegx-tdep.c: Likewise.
3726         * xstormy16-tdep.c: Likewise.
3727
3728 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3729
3730         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3731         (mipsn32_fbsd_sigframe): Define.
3732         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3733         for FreeBSD/mipsn32.
3734
3735 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3736
3737         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3738         AT_HWCAP.
3739
3740 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3741
3742         * MAINTAINERS (Misc): Update my email address.
3743
3744 2017-10-04  Pedro Alves  <palves@redhat.com>
3745
3746         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3747         it instead of target_gdbarch.
3748         (get_remote_state, get_remote_packet_size): Adjust
3749         get_remote_arch_state calls, passing down target_gdbarch
3750         explicitly.
3751         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3752         'gdbarch' and use it instead of target_gdbarch.
3753         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3754         passing down target_gdbarch explicitly.
3755         (struct stop_reply) <arch>: New field.
3756         (remote_parse_stop_reply): Use the stopped thread's architecture,
3757         not the current inferior's.  Save the architecture in the
3758         stop_reply.
3759         (process_stop_reply): Use the stop reply's architecture.
3760         (process_g_packet, remote_fetch_registers)
3761         (remote_prepare_to_store, store_registers_using_G)
3762         (remote_store_registers): Adjust get_remote_arch_state calls,
3763         using the regcache's architecture.
3764         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3765         passing down target_gdbarch explicitly.
3766         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3767         beneath instead of calling target_gdbarch.
3768         * target.c (default_thread_architecture): Use the specified
3769         inferior's architecture, instead of the current inferior's
3770         architecture (via target_gdbarch).
3771
3772 2017-10-04  Pedro Alves  <palves@redhat.com>
3773
3774         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3775         case.
3776         (regcache_print): Handle !target_has_registers here instead.
3777
3778 2017-10-04  Pedro Alves  <palves@redhat.com>
3779
3780         * frame.c (create_test_frame): Delete.
3781         * frame.h (create_test_frame): Delete.
3782         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3783         (class regcache_test): Delete.
3784         (test_target_has_registers, test_target_has_stack)
3785         (test_target_has_memory, test_target_prepare_to_store)
3786         (test_target_store_registers): New functions.
3787         (test_target_ops): New class.
3788         (register_to_value_test): Error out if there's already a
3789         process_stratum (or higher) target pushed.  Create a fuller mock
3790         environment, with mock target_ops, inferior, address space, thread
3791         and inferior_ptid.
3792         * progspace.c (struct address_space): Move to ...
3793         * progspace.h (struct address_space): ... here.
3794         * regcache.h (regcache::~regcache, regcache::raw_write)
3795         [GDB_SELF_TEST]: No longer virtual.
3796
3797 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3798
3799         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3800
3801 2017-10-04  Pedro Alves  <palves@redhat.com>
3802
3803         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3804         out of 'between TRY and CATCH'.
3805
3806 2017-10-04  Pedro Alves  <palves@redhat.com>
3807
3808         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3809         * common/common-exceptions.h (TRY): Open an outermost scope.
3810         Expand intro comment.
3811         (CATCH): Reindent.
3812         (END_CATCH): Close the outermost scope.
3813         * completer.c (complete_line_internal): Add missing END_CATCH.
3814
3815 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3816
3817         * NEWS (Changes since GDB 8.0): Add entry about new
3818         'set-cwd-on-gdbserver' feature.
3819         (New remote packets): Add entry for QSetWorkingDir.
3820         * common/common-inferior.h (set_inferior_cwd): New prototype.
3821         * infcmd.c (set_inferior_cwd): Remove "static".
3822         (show_cwd_command): Expand text to include remote debugging.
3823         * remote.c: Add PACKET_QSetWorkingDir.
3824         (remote_protocol_features) <QSetWorkingDir>: New entry for
3825         PACKET_QSetWorkingDir.
3826         (extended_remote_set_inferior_cwd): New function.
3827         (extended_remote_create_inferior): Call
3828         "extended_remote_set_inferior_cwd".
3829         (_initialize_remote): Call "add_packet_config_cmd" for
3830         QSetWorkingDir.
3831
3832 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3833
3834         * NEWS (New commands): Mention "set/show cwd".
3835         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3836         "cd" command's help text.
3837         * common/common-inferior.h (get_inferior_cwd): New prototype.
3838         * infcmd.c (inferior_cwd_scratch): New global variable.
3839         (set_inferior_cwd): New function.
3840         (get_inferior_cwd): Likewise.
3841         (set_cwd_command): Likewise.
3842         (show_cwd_command): Likewise.
3843         (_initialize_infcmd): Add "set/show cwd" commands.
3844         * inferior.h (class inferior) <cwd>: New field.
3845         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3846         (fork_inferior): Change inferior's cwd before its execution.
3847         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3848         to CreateProcess.
3849
3850 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3851
3852         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3853         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3854         (COMMON_OBS): Add gdb_tilde_expand.o.
3855         * common/gdb_tilde_expand.c: New file.
3856         * common/gdb_tilde_expand.h: Likewise.
3857
3858 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3859
3860         * gdbarch.sh (objfile): Remove duplicate declaration.
3861         * gdbarch.h: Regenerate.
3862
3863 2017-10-03  Tom Tromey  <tom@tromey.com>
3864
3865         * utils.c (internal_vproblem): Use string_vprintf.
3866
3867 2017-10-03  Tom Tromey  <tom@tromey.com>
3868
3869         * printcmd.c (info_symbol_command): Use std::string.
3870
3871 2017-10-03  Tom Tromey  <tom@tromey.com>
3872
3873         * top.c (gdb_safe_append_history): Use std::string.
3874
3875 2017-10-03  Tom Tromey  <tom@tromey.com>
3876
3877         * event-top.c (stdin_event_handler): Update.
3878         * main.c (captured_main_1): Update.
3879         * top.h (make_delete_ui_cleanup): Remove.
3880         (struct ui): Add constructor and destructor.
3881         (new_ui, delete_ui): Remove.
3882         * top.c (make_delete_ui_cleanup): Remove.
3883         (new_ui_command): Use std::unique_ptr.
3884         (delete_ui_cleanup): Remove.
3885         (ui::ui): Rename from new_ui.  Update.
3886         (free_ui): Remove.
3887         (ui::~ui): Rename from delete_ui.  Update.
3888
3889 2017-10-03  Tom Tromey  <tom@tromey.com>
3890
3891         * symfile.c (load_progress): Use gdb::byte_vector.
3892
3893 2017-10-03  Tom Tromey  <tom@tromey.com>
3894
3895         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3896         declaration.
3897         * printcmd.c (x_command): Remove unused declaration.
3898         * symfile.c (symbol_file_command): Remove unused declaration.
3899
3900 2017-10-03  Tom Tromey  <tom@tromey.com>
3901
3902         * utils.c (internal_vproblem): Use std::string.
3903         (defaulted_query): Likewise.
3904
3905 2017-10-03  Tom Tromey  <tom@tromey.com>
3906
3907         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3908         * top.c (execute_command_to_string): Update.
3909         * utils.c (make_cleanup_restore_page_info): Remove.
3910         (do_restore_page_info_cleanup): Remove.
3911         (set_batch_flag_and_restore_page_info):
3912         New.
3913         (make_cleanup_restore_page_info): Remove.
3914         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3915         (~set_batch_flag_and_restore_page_info): New
3916         (make_cleanup_restore_uinteger): Remove.
3917         (make_cleanup_restore_integer): Remove.
3918         (struct restore_integer_closure): Remove.
3919         (restore_integer): Remove.
3920         * utils.h (struct set_batch_flag_and_restore_page_info): New
3921         class.
3922         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3923         (make_cleanup_restore_page_info): Remove.
3924         (make_cleanup_restore_uinteger) Remove.
3925         (make_cleanup_restore_integer) Remove.
3926
3927 2017-10-03  Tom Tromey  <tom@tromey.com>
3928
3929         * record-full.h (record_full_gdb_operation_disable_set): Return
3930         scoped_restore_tmpl<int>.
3931         * infrun.c (adjust_pc_after_break): Update.
3932         (handle_signal_stop): Update.
3933         * record-full.c (record_full_gdb_operation_disable_set): Return
3934         scoped_restore_tmpl<int>.
3935         (record_full_wait_1, record_full_insert_breakpoint)
3936         (record_full_remove_breakpoint, record_full_save)
3937         (record_full_goto_insn): Update.
3938
3939 2017-10-02  Tom Tromey  <tom@tromey.com>
3940
3941         PR rust/22236:
3942         * rust-lang.c (rust_val_print_str): New function.
3943         (val_print_struct): Call it.
3944         (rust_subscript): Preserve name of slice type.
3945
3946 2017-10-02  Tom Tromey  <tom@tromey.com>
3947
3948         * rust-lang.c (rust_subscript): Handle slices in
3949         EVAL_AVOID_SIDE_EFFECTS case.
3950
3951 2017-10-02  Tom Tromey  <tom@tromey.com>
3952
3953         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3954
3955 2017-10-02  Tom Tromey  <tom@tromey.com>
3956
3957         * rust-lang.h (rust_slice_type): Add "extern".
3958
3959 2017-10-02  Tom Tromey  <tom@tromey.com>
3960             Pedro Alves  <palves@redhat.com>
3961
3962         * ada-lang.h (ada_exc_info::operator<): Make const.
3963         (ada_exc_info::operator==): Make const.
3964         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3965         Make const.
3966
3967 2017-09-29  Tom Tromey  <tom@tromey.com>
3968
3969         * target.c (read_whatever_is_readable): Change type of "result".
3970         Update.
3971         (free_memory_read_result_vector): Remove.
3972         (read_memory_robust): Change return type.  Update.
3973         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3974         bin2hex, std::string.
3975         * target.h (memory_read_result_s): Remove typedef.
3976         (free_memory_read_result_vector): Remove.
3977         (read_memory_robust): Return std::vector.
3978
3979 2017-09-29  Tom Tromey  <tom@tromey.com>
3980
3981         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3982
3983 2017-09-29  Tom Tromey  <tom@tromey.com>
3984
3985         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3986         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3987         operator< and operator==.
3988         (ada_exceptions_list): Return a std::vector.
3989         * ada-lang.c (ada_exc_info::operator<): Rename from
3990         compare_ada_exception_info.
3991         (ada_exc_info::operator==): New.
3992         (sort_remove_dups_ada_exceptions_list): Change type of
3993         "exceptions".
3994         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3995         (ada_add_global_exceptions): Likewise.
3996         (ada_exceptions_list_1): Return a std::vector.
3997         (ada_exceptions_list): Likewise.
3998
3999 2017-09-29  Tom Tromey  <tom@tromey.com>
4000
4001         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4002         'std::set *'.
4003         (print_one_inferior): Update.
4004         (free_vector_of_ints): Remove.
4005         (list_available_thread_groups): Change "ids" to std::set.
4006         (mi_cmd_list_thread_groups): Update.
4007         (struct collect_cores_data) <core>: Now a std::set.
4008         (collect_cores): Update.
4009         (unique): Remove.
4010         (print_one_inferior): Update.
4011
4012 2017-09-29  Tom Tromey  <tom@tromey.com>
4013
4014         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4015         (mi_execute_async_cli_command): Likewise.
4016         (mi_cmd_trace_frame_collected): Use field_fmt.
4017
4018 2017-09-29  Tom Tromey  <tom@tromey.com>
4019
4020         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4021         gdb::byte_vector.
4022
4023 2017-09-29  Tom Tromey  <tom@tromey.com>
4024
4025         * mi/mi-parse.c (mi_parse): Remove unused declaration.
4026
4027 2017-09-29  Tom Tromey  <tom@tromey.com>
4028
4029         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4030
4031 2017-09-29  Tom Tromey  <tom@tromey.com>
4032
4033         * varobj.h (varobj_gen_name): Return std::string.
4034         * varobj.c (varobj_gen_name): Return std::string.
4035         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4036         (mi_cmd_var_delete): Don't copy "name".
4037
4038 2017-09-29  Tom Tromey  <tom@tromey.com>
4039
4040         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4041         (mi_cmd_break_insert_1): Update.
4042
4043 2017-09-29  Tom Tromey  <tom@tromey.com>
4044
4045         * target.h (make_scoped_defer_target_commit_resume): Update.
4046         * target.c (make_scoped_defer_target_commit_resume): Rename from
4047         make_cleanup_defer_target_commit_resume.  Return a
4048         scoped_restore.
4049         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4050
4051 2017-09-29  Tom Tromey  <tom@tromey.com>
4052
4053         * main.c (captured_main_1): Remove unused declaration.
4054         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4055
4056 2017-09-29  Tom Tromey  <tom@tromey.com>
4057
4058         * symtab.c (search_symbols): Remove unused outer cleanup.
4059         (make_source_files_completion_list): Remove unused declaration.
4060
4061 2017-09-29  Tom Tromey  <tom@tromey.com>
4062
4063         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4064
4065 2017-09-29  Tom Tromey  <tom@tromey.com>
4066
4067         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4068         gdb::byte_vector.
4069
4070 2017-09-29  Tom Tromey  <tom@tromey.com>
4071
4072         * complaints.c (vcomplaint): Use std::string.
4073
4074 2017-09-29  Tom Tromey  <tom@tromey.com>
4075
4076         * tracepoint.c (trace_variable_command): Use std::string.
4077         (encode_actions_1): Remove unused declarations.
4078         (create_tsv_from_upload): Use std::string.
4079
4080 2017-09-29  Tom Tromey  <tom@tromey.com>
4081
4082         * cp-support.c (gdb_demangle): Use std::string.
4083
4084 2017-09-29  Tom Tromey  <tom@tromey.com>
4085
4086         * stack.c (parse_frame_specification): Use std::string
4087         (info_frame_command): Use gdb::unique_xmalloc_ptr.
4088
4089 2017-09-29  Tom Tromey  <tom@tromey.com>
4090
4091         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4092
4093 2017-09-29  Tom Tromey  <tom@tromey.com>
4094
4095         * utils.c (vfprintf_maybe_filtered): Use std::string.
4096         (vfprintf_unfiltered): Likewise.
4097
4098 2017-09-29  Tom Tromey  <tom@tromey.com>
4099
4100         * event-top.c (top_level_prompt): Return std::string.
4101         (display_gdb_prompt): Update.
4102
4103 2017-09-29  Tom Tromey  <tom@tromey.com>
4104
4105         * unittests/common-utils-selftests.c (format): New function.
4106         (string_vprintf_tests): New function.
4107         (_initialize_common_utils_selftests): Register new tests.
4108         * common/common-utils.c (string_vprintf): New function.
4109         * common/common-utils.h (string_vprintf): Declare.
4110
4111 2017-09-29  Pedro Alves  <palves@redhat.com>
4112
4113         * common/rsp-low.c (unpack_varlen_hex): Constify.
4114         * common/rsp-low.h (unpack_varlen_hex): Constify.
4115         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4116         Constify.
4117         * remote.c (remote_set_permissions, read_ptid)
4118         (remote_current_thread, remote_get_threads_with_qthreadinfo)
4119         (remote_static_tracepoint_marker_at)
4120         (remote_static_tracepoint_markers_by_strid)
4121         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4122         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4123         (parse_tracepoint_definition, parse_tsv_definition)
4124         (parse_static_tracepoint_marker_definition): Constify.
4125         * tracepoint.h (parse_static_tracepoint_marker_definition)
4126         (parse_trace_status, parse_tracepoint_status)
4127         (parse_tracepoint_definition, parse_tsv_definition): Constify.
4128
4129 2017-09-29  Pedro Alves  <palves@redhat.com>
4130
4131         * remote.c (target_buf, target_buf_size): Delete.
4132         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4133         Use the connection's packet buffer instead.
4134         All callers adjusted.
4135         (_initialize_remote): Remove references to target_buf and
4136         target_buf_size.
4137
4138 2017-09-28  Pedro Alves  <palves@redhat.com>
4139
4140         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4141         unittests/common-utils-selftests.c.
4142         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4143         (COMMON_OBS): Remove utils-selftests.o.
4144         * utils-selftests.c: Move to ...
4145         * unittests/common-utils-selftests.c: ... here and rename self
4146         test to "string_printf".
4147
4148 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4149
4150         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4151         having NULL cus or tus.
4152
4153 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4154
4155         * arm-tdep.c: (convert_from_extended): Remove.
4156         (convert_to_extended): Likewise.
4157         (arm_extract_return_value): Use convert_typed_floating.
4158         (arm_store_return_value): Likewise.
4159
4160         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4161         * sh-tdep.c: Do not include "floatformat.h".
4162         (sh_littlebyte_bigword_type): New function.
4163         (sh_register_convert_to_virtual): Use convert_typed_floating.
4164         (sh_register_convert_to_raw): Likewise.
4165         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4166         (sh64_littlebyte_bigword_type): New function.
4167         (sh64_extract_return_value): Use convert_typed_floating.
4168         (sh64_register_convert_to_virtual): Likewise.
4169         (sh64_register_convert_to_raw): Likewise.
4170
4171 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4172
4173         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4174         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4175
4176         * gdbtypes.h (union type_specific): Make field floatformat hold
4177         just a single struct floatformat, not an array.
4178         (floatformat_from_type): Move here.
4179         * gdbtypes.c (floatformat_from_type): Move here.  Update to
4180         changed TYPE_FLOATFORMAT definition.
4181         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4182         (recursive_dump_type): Likewise.
4183         (init_float_type): Install correct floatformat for byte order.
4184         (arch_float_type): Likewise.
4185
4186 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4187
4188         * gdbtypes.c (init_type): Change incoming argument from
4189         length-in-bytes to length-in-bits.  Assert length is a
4190         multiple of TARGET_CHAR_BITS.
4191         (arch_type, arch_flags_type): Likewise.
4192         (init_integer_type): Update call to init_type.
4193         (init_character_type): Likewise.
4194         (init_boolean_type): Likewise.
4195         (init_float_type): Likewise.
4196         (init_decfloat_type): Likewise.
4197         (init_complex_type): Likewise.
4198         (init_pointer_type): Likewise.
4199         (objfile_type): Likewise.
4200         (arch_integer_type): Update call to arch_type.
4201         (arch_character_type): Likewise.
4202         (arch_boolean_type): Likewise.
4203         (arch_float_type): Likewise.
4204         (arch_decfloat_type): Likewise.
4205         (arch_complex_type): Likewise.
4206         (arch_pointer_type): Likewise.
4207         (gdbtypes_post_init): Likewise.
4208
4209         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4210         (read_base_type): Likewise.
4211         * mdebugread.c (basic_type): Likewise.
4212         * stabsread.c (dbx_init_float_type): Likewise.
4213         (rs6000_builtin_type): Likewise.
4214         (read_range_type): Likewise.  Also, fix call to init_integer_type
4215         with erroneous length argument.
4216
4217         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4218         * d-lang.c (build_d_types): Likewise.
4219         * f-lang.c (build_fortran_types): Likewise.
4220         * go-lang.c (build_go_types): Likewise.
4221         * opencl-lang.c (build_opencl_types): Likewise.
4222         * jit.c (finalize_symtab): Likewise.
4223         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4224         (build_std_type_info_type): Likewise.
4225         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
4226         update call to arch_flags_type.
4227
4228         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4229         arch_type.
4230         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4231         * windows-tdep.c (windows_get_tlb_type): Likewise.
4232
4233         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4234         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4235         * m32c-tdep.c (make_types): Likewise.
4236         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4237         (rl78_psw_type): Update call to arch_flags_type.
4238         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4239         * rx-tdep.c (rx_psw_type): Likewise.
4240         (rx_fpsw_type): Likewise.
4241         * sparc-tdep.c (sparc_psr_type): Likewise.
4242         (sparc_fsr_type): Likewise.
4243         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4244         (sparc64_ccr_type): Likewise.
4245         (sparc64_fsr_type): Likewise.
4246         (sparc64_fprs_type): Likewise.
4247
4248 2017-09-27  Tom Tromey  <tom@tromey.com>
4249
4250         * findcmd.c (find_command): Constify.
4251
4252 2017-09-27  Tom Tromey  <tom@tromey.com>
4253
4254         * ada-tasks.c (task_command_1, task_command): Constify.
4255
4256 2017-09-27  Tom Tromey  <tom@tromey.com>
4257
4258         * symtab.c (maintenance_print_symbol_cache)
4259         (maintenance_flush_symbol_cache)
4260         (maintenance_print_symbol_cache_statistics): Constify.
4261
4262 2017-09-27  Tom Tromey  <tom@tromey.com>
4263
4264         * inferior.c (detach_inferior_command, kill_inferior_command)
4265         (inferior_command): Constify.
4266
4267 2017-09-27  Tom Tromey  <tom@tromey.com>
4268
4269         * regcache.c (regcache_print, maintenance_print_registers)
4270         (maintenance_print_raw_registers)
4271         (maintenance_print_cooked_registers)
4272         (maintenance_print_register_groups)
4273         (maintenance_print_remote_registers): Constify.
4274
4275 2017-09-27  Tom Tromey  <tom@tromey.com>
4276
4277         * printcmd.c (map_display_numbers, undisplay_command)
4278         (enable_disable_display_command, enable_display_command)
4279         (disable_display_command): Constify.
4280
4281 2017-09-27  Tom Tromey  <tom@tromey.com>
4282
4283         * breakpoint.h (delete_command): Don't declare.
4284         * breakpoint.c (delete_command, enable_once_command)
4285         (enable_count_command, enable_delete_command, breakpoint_1)
4286         (maintenance_info_breakpoints, stopin_command, stopat_command)
4287         (delete_command, delete_trace_command, save_breakpoints)
4288         (save_breakpoints_command, save_tracepoints_command): Constify.
4289
4290 2017-09-27  Tom Tromey  <tom@tromey.com>
4291
4292         * macrocmd.c (macro_expand_command, macro_expand_once_command)
4293         (skip_ws, extract_identifier, macro_define_command)
4294         (macro_undef_command, macro_list_command): Constify.
4295
4296 2017-09-27  Tom Tromey  <tom@tromey.com>
4297
4298         * infcmd.c (environment_info, set_environment_command)
4299         (unset_environment_command, path_info, info_proc_cmd_1)
4300         (info_proc_cmd_mappings, info_proc_cmd_stat)
4301         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4302         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4303
4304 2017-09-27  Tom Tromey  <tom@tromey.com>
4305
4306         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4307         Constify.
4308
4309 2017-09-27  Tom Tromey  <tom@tromey.com>
4310
4311         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4312
4313 2017-09-27  Tom Tromey  <tom@tromey.com>
4314
4315         * demangle.c (demangle_command): Constify.
4316
4317 2017-09-27  Tom Tromey  <tom@tromey.com>
4318
4319         * progspace.c (maintenance_info_program_spaces_command):
4320         Constify.
4321
4322 2017-09-27  Tom Tromey  <tom@tromey.com>
4323
4324         * compile/compile.c (check_raw_argument, compile_file_command)
4325         (compile_code_command, compile_print_command): Constify.
4326
4327 2017-09-27  Tom Tromey  <tom@tromey.com>
4328
4329         * reggroups.c (maintenance_print_reggroups): Constify.
4330
4331 2017-09-27  Tom Tromey  <tom@tromey.com>
4332
4333         * dwarf2read.c (save_gdb_index_command): Constify.
4334
4335 2017-09-27  Tom Tromey  <tom@tromey.com>
4336
4337         * stap-probe.c (info_probes_stap_command): Constify.
4338
4339 2017-09-27  Tom Tromey  <tom@tromey.com>
4340
4341         * fork-child.c (unset_exec_wrapper_command): Constify.
4342
4343 2017-09-27  Tom Tromey  <tom@tromey.com>
4344
4345         * btrace.c (get_uint, get_context_size, no_chunk)
4346         (maint_btrace_packet_history_cmd)
4347         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4348         (maint_info_btrace_cmd): Constify.
4349
4350 2017-09-27  Tom Tromey  <tom@tromey.com>
4351
4352         * reverse.c (delete_bookmark_command): Constify.
4353
4354 2017-09-27  Tom Tromey  <tom@tromey.com>
4355
4356         * remote.c (set_memory_packet_size)
4357         (set_memory_write_packet_size, show_memory_write_packet_size)
4358         (set_memory_read_packet_size, show_memory_read_packet_size)
4359         (compare_sections_command, packet_command, remote_put_command)
4360         (remote_get_command, remote_delete_command): Constify.
4361
4362 2017-09-27  Tom Tromey  <tom@tromey.com>
4363
4364         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4365         (set_mipsfpu_double_command, set_mipsfpu_none_command)
4366         (set_mipsfpu_auto_command): Constify.
4367
4368 2017-09-27  Tom Tromey  <tom@tromey.com>
4369
4370         * cli/cli-cmds.h (cd_command): Constify.
4371         * cli/cli-cmds.c (cd_command): Constify.
4372
4373 2017-09-27  Tom Tromey  <tom@tromey.com>
4374
4375         * thread.c (thread_name_command, thread_find_command): Constify.
4376
4377 2017-09-27  Tom Tromey  <tom@tromey.com>
4378
4379         * probe.c (enable_probes_command, disable_probes_command):
4380         Constify.
4381
4382 2017-09-27  Tom Tromey  <tom@tromey.com>
4383
4384         * symfile.c (symbol_file_command): Constify.
4385         * gdbcore.h (deprecated_file_changed_hook): Constify.
4386         * exec.c (deprecated_file_changed_hook, exec_file_command)
4387         (file_command): Constify.
4388         * defs.h (symbol_file_command): Constify.
4389
4390 2017-09-27  Tom Tromey  <tom@tromey.com>
4391
4392         * remote-fileio.c (set_system_call_allowed)
4393         (show_system_call_allowed): Constify.
4394
4395 2017-09-27  Tom Tromey  <tom@tromey.com>
4396
4397         * tracepoint.c (delete_trace_variable_command)
4398         (tfind_end_command, tfind_start_command, tfind_pc_command)
4399         (tfind_tracepoint_command, tfind_line_command)
4400         (tfind_range_command, tfind_outside_command): Constify.
4401
4402 2017-09-27  Tom Tromey  <tom@tromey.com>
4403
4404         * ax-gdb.c (maint_agent_printf_command, agent_command)
4405         (agent_eval_command): Constify.
4406
4407 2017-09-27  Tom Tromey  <tom@tromey.com>
4408
4409         * tracepoint.c (info_scope_command): Constify.
4410         * python/python.c (gdbpy_decode_line): Constify.
4411         * python/py-breakpoint.c (bppy_init): Constify.
4412         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4413         * location.h: (new_linespec_location)
4414         (string_to_event_location_basic, string_to_event_location):
4415         Constify.
4416         * location.c (new_linespec_location)
4417         (string_to_event_location_basic, string_to_event_location):
4418         Constify.
4419         * linespec.h (decode_line_with_current_source)
4420         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4421         * linespec.c (linespec_lex_to_end)
4422         (decode_line_with_current_source)
4423         (decode_line_with_last_displayed): Constify.
4424         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4425         Constify.
4426         * cli/cli-cmds.c (edit_command, list_command): Constify.
4427         * breakpoint.h (until_break_command, watch_command_wrapper)
4428         (awatch_command_wrapper, rwatch_command_wrapper)
4429         (init_ada_exception_breakpoint): Constify.
4430         * breakpoint.c (break_command_1, dprintf_command)
4431         (break_range_command, watch_command_wrapper)
4432         (rwatch_command_wrapper, awatch_command_wrapper)
4433         (until_break_command, init_ada_exception_breakpoint)
4434         (strace_marker_create_sals_from_location, trace_command)
4435         (ftrace_command, strace_command, struct tracepoint): Constify.
4436         * ax-gdb.c (agent_command_1): Constify.
4437         * ada-lang.c (ada_exception_sal): Constify.
4438
4439 2017-09-27  Tom Tromey  <tom@tromey.com>
4440
4441         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4442         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4443         (get_context_size, no_chunk, get_insn_history_modifiers)
4444         (cmd_record_insn_history, get_call_history_modifiers)
4445         (cmd_record_call_history): Constify.
4446
4447 2017-09-27  Tom Tromey  <tom@tromey.com>
4448
4449         * source.c (show_substitute_path_command)
4450         (unset_substitute_path_command, set_substitute_path_command):
4451         Constify.
4452
4453 2017-09-27  Tom Tromey  <tom@tromey.com>
4454
4455         * typeprint.c (maintenance_print_type): Constify.
4456         * maint.c (maintenance_dump_me, maintenance_demangle)
4457         (maintenance_time_display, maintenance_info_sections)
4458         (maintenance_print_statistics, maintenance_deprecate)
4459         (maintenance_undeprecate): Constify.
4460         (maintenance_do_deprecate): Constify.  Use std::string.
4461         (maintenance_selftest): Constify.
4462         * gdbtypes.h (maintenance_print_type): Constify.
4463
4464 2017-09-27  Tom Tromey  <tom@tromey.com>
4465
4466         * hppa-tdep.c (unwind_command): Constify.
4467
4468 2017-09-27  Tom Tromey  <tom@tromey.com>
4469
4470         * target-descriptions.c (unset_tdesc_filename_cmd)
4471         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4472         Constify.
4473
4474 2017-09-27  Tom Tromey  <tom@tromey.com>
4475
4476         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4477
4478 2017-09-27  Tom Tromey  <tom@tromey.com>
4479
4480         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4481
4482 2017-09-27  Tom Tromey  <tom@tromey.com>
4483
4484         * tui/tui-regs.c (tui_reg_command): Constify.
4485
4486 2017-09-27  Tom Tromey  <tom@tromey.com>
4487
4488         * skip.c (skip_file_command, skip_function_command)
4489         (skip_enable_command, skip_disable_command, skip_delete_command):
4490         Constify.
4491
4492 2017-09-27  Tom Tromey  <tom@tromey.com>
4493
4494         * record-btrace.c (cmd_record_btrace_bts_start)
4495         (cmd_record_btrace_pt_start): Constify.
4496
4497 2017-09-27  Tom Tromey  <tom@tromey.com>
4498
4499         * symmisc.c (maintenance_print_symbols)
4500         (maintenance_print_msymbols, maintenance_print_objfiles)
4501         (maintenance_info_symtabs, maintenance_check_symtabs)
4502         (maintenance_expand_symtabs, maintenance_info_line_tables):
4503         Constify.
4504
4505 2017-09-27  Tom Tromey  <tom@tromey.com>
4506
4507         * top.c (new_ui_command): Constify.
4508
4509 2017-09-27  Tom Tromey  <tom@tromey.com>
4510
4511         * symfile.c (add_symbol_file_command)
4512         (remove_symbol_file_command, list_overlays_command)
4513         (map_overlay_command, unmap_overlay_command)
4514         (overlay_auto_command, overlay_manual_command)
4515         (overlay_off_command, overlay_load_command): Constify.
4516
4517 2017-09-27  Tom Tromey  <tom@tromey.com>
4518
4519         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4520         (info_spu_mailbox_command, info_spu_dma_command)
4521         (info_spu_proxydma_command): Constify.
4522
4523 2017-09-27  Tom Tromey  <tom@tromey.com>
4524
4525         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4526
4527 2017-09-27  Tom Tromey  <tom@tromey.com>
4528
4529         * cli/cli-script.c (user_defined_command): Constify.
4530
4531 2017-09-27  Tom Tromey  <tom@tromey.com>
4532
4533         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4534         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4535         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4536         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4537         (dump_binary_value, append_binary_memory, append_binary_value):
4538         Constify.
4539         (struct dump_context) <func>: Constify.
4540         (add_dump_command): Update.
4541
4542 2017-09-27  Tom Tromey  <tom@tromey.com>
4543
4544         * cli/cli-cmds.c (show_version, show_configuration)
4545         (source_command, show_user): Constify.
4546
4547 2017-09-27  Tom Tromey  <tom@tromey.com>
4548
4549         * target.c (maintenance_print_target_stack): Constify.
4550
4551 2017-09-27  Tom Tromey  <tom@tromey.com>
4552
4553         * interps.c (interpreter_exec_cmd): Constify.
4554
4555 2017-09-27  Tom Tromey  <tom@tromey.com>
4556
4557         * record-full.c (cmd_record_full_restore): Constify.
4558
4559 2017-09-27  Tom Tromey  <tom@tromey.com>
4560
4561         * memattr.c (enable_mem_command, disable_mem_command)
4562         (delete_mem_command): Constify.
4563
4564 2017-09-27  Tom Tromey  <tom@tromey.com>
4565
4566         * value.c (show_convenience): Constify.
4567
4568 2017-09-27  Tom Tromey  <tom@tromey.com>
4569
4570         * gdbcore.h (core_file_command): Update.
4571         * corefile.c (core_file_command): Constify.
4572
4573 2017-09-27  Tom Tromey  <tom@tromey.com>
4574
4575         * user-regs.c (maintenance_print_user_registers): Constify.
4576
4577 2017-09-27  Tom Tromey  <tom@tromey.com>
4578
4579         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4580
4581 2017-09-27  Tom Tromey  <tom@tromey.com>
4582
4583         * cp-support.c (first_component_command): Constify.
4584
4585 2017-09-27  Tom Tromey  <tom@tromey.com>
4586
4587         * psymtab.c (maintenance_print_psymbols)
4588         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4589         Constify.
4590
4591 2017-09-27  Tom Tromey  <tom@tromey.com>
4592
4593         * windows-tdep.c (display_tib): Constify.
4594
4595 2017-09-27  Tom Tromey  <tom@tromey.com>
4596
4597         * linux-fork.c (delete_checkpoint_command)
4598         (detach_checkpoint_command): Constify.
4599
4600 2017-09-27  Tom Tromey  <tom@tromey.com>
4601
4602         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4603
4604 2017-09-27  Tom Tromey  <tom@tromey.com>
4605
4606         * arc-tdep.c (dump_arc_instruction_command): Constify.
4607
4608 2017-09-27  Tom Tromey  <tom@tromey.com>
4609
4610         * valprint.c (set_radix, show_radix): Constify.
4611
4612 2017-09-27  Tom Tromey  <tom@tromey.com>
4613
4614         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4615
4616 2017-09-27  Tom Tromey  <tom@tromey.com>
4617
4618         * command.h (not_just_help_class_command): Update.
4619         * cli/cli-decode.h (not_just_help_class_command): Update.
4620         * cli/cli-decode.c (not_just_help_class_command): Constify.
4621
4622 2017-09-27  Tom Tromey  <tom@tromey.com>
4623
4624         * gdb_bfd.c (maintenance_info_bfds): Constify.
4625
4626 2017-09-27  Tom Tromey  <tom@tromey.com>
4627
4628         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4629         overloads.
4630         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4631         (do_const_cfunc): New function.
4632         (cmd_cfunc_eq): New overload.
4633         (cli_user_command_p): Check do_const_cfunc.
4634         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4635         const_cfunc.
4636         * command.h (add_cmd): Add const overload and no-function
4637         overload.
4638         (set_cmd_cfunc): Add const overload.
4639         (cmd_const_cfunc_ftype): Declare.
4640         (cmd_cfunc_eq): Add const overload.
4641         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4642         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4643         overload.
4644
4645 2017-09-27  Tom Tromey  <tom@tromey.com>
4646
4647         * macroexp.c (get_next_token_for_substitution): New function.
4648         (substitute_args): Call it.  Check for __VA_OPT__.
4649
4650 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4651             Pedro Alves <palves@redhat.com>
4652
4653         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4654         producer_is_icc_lt_14.
4655         (producer_is_icc_lt_14): New function.
4656         (check_producer): Add code for checking version of ICC.
4657         (producer_is_icc): Move to producer.c.
4658         (read_structure_type): Restrict ICC workaround to ICC<14.
4659         * producer.c: Include selftest.h.
4660         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4661         New functions.
4662         * producer.h (producer_is_icc): New declaration.
4663
4664 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4665
4666         * Makefile.in (SFILES): Add producer.c.
4667         (COMMON_OBS): Add producer.o
4668         * amd64-tdep.c (producer.h): Add new include.
4669         * dwarf2read.c (producer.h): Add new include.
4670         * producer.c: New file.
4671         * producer.h: New file.
4672         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4673         producer.c.
4674         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4675         producer.h.
4676
4677 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4678
4679         * configure.ac: Search ncursesw before ncurses.
4680         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4681         * gdb_curses.h: Include <ncursesw/ncurses.h>
4682         * config.in, configure: Regenerate.
4683
4684 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4685
4686         PR gdb/22185
4687         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4688         obsolete.
4689         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4690         Remove i386sol2 support.
4691         * configure.nat <i386sol2>: Remove.
4692         <sol2-64>: Fold into ...
4693         <sol2>: ... this.
4694         Move common settings to default section.
4695         Add sol-thread.o.
4696         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4697         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4698         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4699         <i[34567]86-*-solaris*>: Remove.
4700         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4701
4702         * configure.ac: Remove wctype in libw check.
4703         (_MSE_INT_H): Don't define on Solaris 7-9.
4704         <solaris*>: Remove libthread_db.so.1 check.
4705         * configure: Regenerate.
4706         * config.in: Regenerate.
4707
4708         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4709         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4710         (gdb_ps_size_t): Remove.
4711         Use base types in users.
4712         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4713
4714         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4715
4716 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4717
4718         PR build/22206
4719         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4720         (adi_is_addr_mapped): Likewise.
4721         (PSR_ICC): Don't redefine.
4722         (PSR_IMPL): Likewise.
4723
4724 2017-09-25  Tom Tromey  <tom@tromey.com>
4725
4726         * regcache.c (regcache::dump): Use string_printf.
4727
4728 2017-09-25  Tom Tromey  <tom@tromey.com>
4729
4730         * regcache.c (class regcache_invalidator): New.
4731         (struct register_to_invalidate): Remove.
4732         (make_cleanup_regcache_invalidate): Remove.
4733         (regcache::raw_write): Use regcache_invalidator.
4734
4735 2017-09-25  Tom Tromey  <tom@tromey.com>
4736
4737         * spu-tdep.c (spu2ppu_sniffer): Update.
4738         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4739         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4740         Remove.
4741         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4742         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4743         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4744         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4745         (frame_pop): Update.
4746
4747 2017-09-25  Tom Tromey  <tom@tromey.com>
4748
4749         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4750         * regcache.h (regcache_xfree): Don't declare.
4751         * regcache.c (regcache_xfree): Remove.
4752         (do_regcache_xfree): Use delete.
4753         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4754         * linux-fork.c (free_fork): Use delete.
4755         (fork_save_infrun_state): Likewise.
4756         * jit.c (jit_dealloc_cache): Use delete.
4757         * infrun.c (discard_infcall_suspend_state): Use delete.
4758
4759 2017-09-25  Tom Tromey  <tom@tromey.com>
4760
4761         * regcache.h (regcache_xmalloc): Don't declare.
4762         (regcache_raw_set_cached_value): Update comment.
4763         * regcache.c (regcache_xmalloc): Remove.
4764         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4765         * jit.c (jit_frame_sniffer): Use new.
4766         * frame.c (frame_save_as_regcache): Use new.
4767
4768 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4769
4770         * NEWS: Advertise support for guarded-storage registers on IBM z.
4771
4772 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4773
4774         * s390-linux-nat.c (have_regset_gs): New static variable.
4775         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4776         control block and guarded-storage broadcast control regsets.
4777         (s390_read_description): Detect whether the target has
4778         guarded-storage support, return appropriate tdesc.
4779         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4780         (features/s390x-gs-linux64.c): Likewise.
4781         (struct gdbarch_tdep) <have_gs>: New field.
4782         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4783         (s390_gsbc_regset): New variables.
4784         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4785         and s390_gsbc_regset, if applicable.
4786         (s390_core_read_description): Check whether core file was from a
4787         target with guarded-storage support; include appropriate regsets.
4788         (s390_gdbarch_init): Add registers for guarded-storage support.
4789         (_initialize_s390_tdep): Initialize new target descriptions that
4790         include registers for guarded-storage support.
4791         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4792         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4793         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4794         (S390_NUM_REGS): Adjust macro definition.
4795         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4796         (tdesc_s390x_gs_linux64): New declarations.
4797
4798 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4799
4800         * features/s390-gs-linux64.xml: New file.
4801         * features/s390-gs.xml: New file.
4802         * features/s390-gsbc.xml: New file.
4803         * features/s390x-gs-linux64.xml: New file.
4804         * features/Makefile (WHICH): Add s390-gs-linux64 and
4805         s390x-gs-linux64.
4806         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4807         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4808         * features/s390-gs-linux64.c: New generated file.
4809         * features/s390x-gs-linux64.c: New file.
4810         * regformats/s390-gs-linux64.dat: New file.
4811         * regformats/s390x-gs-linux64.dat: New file.
4812
4813 2017-09-23  Tom Tromey  <tom@tromey.com>
4814
4815         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4816
4817 2017-09-22  Tom Tromey  <tom@tromey.com>
4818
4819         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4820         type to scoped_restore_tmpl.
4821         <scoped_input_handler>: Initialize m_quit_handler directly.
4822
4823 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4824
4825         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4826         (cd_command): Likewise.  Free "current_directory" before
4827         assigning to it.
4828         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4829         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4830         * top.c (gdb_dirbuf): Remove global declaration.
4831         * top.h (gdb_dirbuf): Likewise.
4832
4833 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4834
4835         * gnulib/aclocal.m4: Regenerate.
4836         * gnulib/config.in: Regenerate.
4837         * gnulib/configure: Regenerate.
4838         * gnulib/import/Makefile.am: Regenerate.
4839         * gnulib/import/Makefile.in: Regenerate.
4840         * gnulib/import/assure.h: New file.
4841         * gnulib/import/at-func.c: Likewise
4842         * gnulib/import/chdir-long.c: New file.
4843         * gnulib/import/chdir-long.h: New file.
4844         * gnulib/import/cloexec.c: New file.
4845         * gnulib/import/cloexec.h: New file.
4846         * gnulib/import/close.c: New file.
4847         * gnulib/import/closedir.c: New file.
4848         * gnulib/import/dirent-private.h: New file.
4849         * gnulib/import/dup-safer.c: New file.
4850         * gnulib/import/dup.c: New file.
4851         * gnulib/import/dup2.c: New file.
4852         * gnulib/import/error.c: New file.
4853         * gnulib/import/error.h: New file.
4854         * gnulib/import/exitfail.c: New file.
4855         * gnulib/import/exitfail.h: New file.
4856         * gnulib/import/fchdir.c: New file.
4857         * gnulib/import/fcntl.c: New file.
4858         * gnulib/import/fcntl.in.h: New file.
4859         * gnulib/import/fd-hook.c: New file.
4860         * gnulib/import/fd-hook.h: New file.
4861         * gnulib/import/fd-safer.c: New file.
4862         * gnulib/import/fdopendir.c: New file.
4863         * gnulib/import/filename.h: New file.
4864         * gnulib/import/filenamecat-lgpl.c: New file.
4865         * gnulib/import/filenamecat.h: New file.
4866         * gnulib/import/fstat.c: New file.
4867         * gnulib/import/fstatat.c: New file.
4868         * gnulib/import/getcwd-lgpl.c: New file.
4869         * gnulib/import/getcwd.c: New file.
4870         * gnulib/import/getdtablesize.c: New file.
4871         * gnulib/import/getlogin_r.c: New file.
4872         * gnulib/import/getprogname.c: New file.
4873         * gnulib/import/getprogname.h: New file.
4874         * gnulib/import/gettext.h: New file.
4875         * gnulib/import/glob-libc.h: New file.
4876         * gnulib/import/glob.c: New file.
4877         * gnulib/import/glob.in.h: New file.
4878         * gnulib/import/intprops.h: New file.
4879         * gnulib/import/m4/chdir-long.m4: New file.
4880         * gnulib/import/m4/close.m4: New file.
4881         * gnulib/import/m4/closedir.m4: New file.
4882         * gnulib/import/m4/d-ino.m4: New file.
4883         * gnulib/import/m4/d-type.m4: New file.
4884         * gnulib/import/m4/dup.m4: New file.
4885         * gnulib/import/m4/dup2.m4: New file.
4886         * gnulib/import/m4/error.m4: New file.
4887         * gnulib/import/m4/fchdir.m4: New file.
4888         * gnulib/import/m4/fcntl.m4: New file.
4889         * gnulib/import/m4/fcntl_h.m4: New file.
4890         * gnulib/import/m4/fdopendir.m4: New file.
4891         * gnulib/import/m4/filenamecat.m4: New file.
4892         * gnulib/import/m4/fstat.m4: New file.
4893         * gnulib/import/m4/fstatat.m4: New file.
4894         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4895         * gnulib/import/m4/getcwd-path-max.m4: New file.
4896         * gnulib/import/m4/getcwd.m4: New file.
4897         * gnulib/import/m4/getdtablesize.m4: New file.
4898         * gnulib/import/m4/getlogin_r.m4: New file.
4899         * gnulib/import/m4/getprogname.m4: New file.
4900         * gnulib/import/m4/glob.m4: New file.
4901         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4902         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4903         * gnulib/import/m4/mempcpy.m4: New file.
4904         * gnulib/import/m4/memrchr.m4: New file.
4905         * gnulib/import/m4/mode_t.m4: New file.
4906         * gnulib/import/m4/msvc-inval.m4: New file.
4907         * gnulib/import/m4/msvc-nothrow.m4: New file.
4908         * gnulib/import/m4/open.m4: New file.
4909         * gnulib/import/m4/openat.m4: New file.
4910         * gnulib/import/m4/opendir.m4: New file.
4911         * gnulib/import/m4/readdir.m4: New file.
4912         * gnulib/import/m4/realloc.m4: New file.
4913         * gnulib/import/m4/rewinddir.m4: New file.
4914         * gnulib/import/m4/save-cwd.m4: New file.
4915         * gnulib/import/m4/strdup.m4: New file.
4916         * gnulib/import/m4/strerror.m4: New file.
4917         * gnulib/import/m4/unistd-safer.m4: New file.
4918         * gnulib/import/mempcpy.c: New file.
4919         * gnulib/import/memrchr.c: New file.
4920         * gnulib/import/msvc-inval.c: New file.
4921         * gnulib/import/msvc-inval.h: New file.
4922         * gnulib/import/msvc-nothrow.c: New file.
4923         * gnulib/import/msvc-nothrow.h: New file.
4924         * gnulib/import/open.c: New file.
4925         * gnulib/import/openat-die.c: New file.
4926         * gnulib/import/openat-priv.h: New file.
4927         * gnulib/import/openat-proc.c: New file.
4928         * gnulib/import/openat.c: New file.
4929         * gnulib/import/openat.h: New file.
4930         * gnulib/import/opendir.c: New file.
4931         * gnulib/import/pipe-safer.c: New file.
4932         * gnulib/import/readdir.c: New file.
4933         * gnulib/import/realloc.c: New file.
4934         * gnulib/import/rewinddir.c: New file.
4935         * gnulib/import/save-cwd.c: New file.
4936         * gnulib/import/save-cwd.h: New file.
4937         * gnulib/import/strdup.c: New file.
4938         * gnulib/import/strerror-override.c: New file.
4939         * gnulib/import/strerror-override.h: New file.
4940         * gnulib/import/strerror.c: New file.
4941         * gnulib/import/unistd--.h: New file.
4942         * gnulib/import/unistd-safer.h: New file.
4943         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4944         "getcwd" and "glob".
4945         * ser-tcp.c: Undefine "close" before redefining it.
4946
4947 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4948
4949         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4950         get rid of res_val.
4951
4952 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4953
4954         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4955         <sol2,sparc>: Likewise.
4956         <sol2-64,i386>: Likewise.
4957
4958         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4959         -Wdeprecated-declarations on *-*-solaris*.
4960         * configure: Regenerate.
4961
4962         * procfs.c: Include "nat/inferior.h".
4963         (procfs_info_proc): Fix typo.
4964
4965 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4966
4967         * remote.c (vector): Include.
4968         (struct private_thread_info): Add field, thread_handle.
4969         (free_private_thread_info): Deallocate storage associated with
4970         thread handle.
4971         (get_private_info_thread): Initialize `thread_handle' field.
4972         (struct thread_item): Add field, thread_handle.
4973         (clear_threads_listing_context): Deallocate storage associated
4974         with thread handle.
4975         (start_thread): Add support for "handle" attribute.
4976         (thread_attributes): Add "handle".
4977         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4978         field.
4979         (remote_update_thread_list): Update thread_handle.
4980         (remote_thread_handle_to_thread_info): New function.
4981         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4982
4983 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4984
4985         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4986         function.
4987         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4988         * python/python-internal.h (thread_object_type): Declare.
4989
4990 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4991
4992         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4993         (target_thread_handle_to_thread_info): Declare.
4994         * target.c (target_thread_handle_to_thread_info): New function.
4995         * target-delegates.c: Regenerate.
4996         * gdbthread.h (find_thread_by_handle): Declare.
4997         * thread.c (find_thread_by_handle): New function.
4998         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4999         function.
5000         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5001
5002 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5003
5004         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5005
5006 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5007
5008         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5009
5010 2017-09-21  Yao Qi  <yao.qi@linaro.org>
5011
5012         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5013         to gdb_target_obs.
5014
5015 2017-09-20  Tom Tromey  <tom@tromey.com>
5016
5017         * breakpoint.c (struct counted_command_line): Remove.
5018         (breakpoint_commands): Update.
5019         (alloc_counted_command_line, incref_counted_command_line)
5020         (decref_counted_command_line, do_cleanup_counted_command_line)
5021         (make_cleanup_decref_counted_command_line): Remove.
5022         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5023         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5024         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5025         (save_breakpoints): Update.
5026         * breakpoint.h (counted_command_line): Now a typedef to
5027         shared_ptr.
5028         (struct breakpoint) <commands>: Now a counted_command_line.
5029         (struct bpstats) <command>: Likewise.
5030
5031 2017-09-20  Tom Tromey  <tom@tromey.com>
5032
5033         * breakpoint.c (struct commands_info, do_map_commands_command):
5034         Remove.
5035         (commands_command_1): Update.
5036         (iterate_over_related_breakpoints): Take a function_view.
5037         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5038         (delete_command): Update.
5039         (map_breakpoint_numbers): Take a function_view.
5040         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5041         (disable_command): Update.
5042         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5043         (enable_command): Update.
5044         (struct disp_data, do_enable_breakpoint_disp)
5045         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5046         (do_map_enable_delete_breakpoint): Remove.
5047         (enable_once_command, enable_count_command, enable_delete_command)
5048         (delete_trace_variable_command): Update.
5049
5050 2017-09-20  Tom Tromey  <tom@tromey.com>
5051
5052         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
5053         (bpstat_clear): Use delete.
5054         (bpstats): New constructors.
5055         (bpstat_copy, bpstat_stop_status): Use new.
5056         (dprintf_after_condition_true): Update.
5057         * breakpoint.h (bpstats::bpstats): Add constructors.
5058         (bpstats::~bpstats): Add destructor.
5059
5060 2017-09-20  Pedro Alves  <palves@redhat.com>
5061
5062         * eval.c (make_params): Delete, refactored as ...
5063         (class fake_method): ... this new type's ctor.
5064         (fake_method::~fake_method): New.
5065         (evaluate_subexp_standard): Use 'fake_method'.
5066
5067 2017-09-20  Tom Tromey  <tom@tromey.com>
5068
5069         * windows-nat.c (get_windows_debug_event, windows_wait)
5070         (do_initial_windows_stuff, windows_attach): Update.
5071         * utils.c (vwarning, internal_vproblem): Update.
5072         (ui_unregister_input_event_handler_cleanup)
5073         (prepare_to_handle_input): Remove.
5074         (class scoped_input_handler): New.
5075         (defaulted_query, prompt_for_continue): Update.
5076         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5077         Update.
5078         * top.c (undo_terminal_modifications_before_exit): Update.
5079         * target/target.h (target_terminal_init, target_terminal_inferior)
5080         (target_terminal_ours): Don't declare.
5081         (class target_terminal): New.
5082         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5083         (target_terminal_ours_for_output)
5084         (make_cleanup_restore_target_terminal): Don't declare.
5085         (target_terminal_info): Remove.
5086         * target.c (enum terminal_state, terminal_state): Remove.
5087         (target_terminal::terminal_state): Define.
5088         (target_terminal::init): Rename from target_terminal_init.
5089         (target_terminal::inferior): Rename from
5090         target_terminal_inferior.
5091         (target_terminal::ours): Rename from target_terminal_ours.
5092         (target_terminal::ours_for_output): Rename from
5093         target_terminal_ours_for_output.
5094         (target_terminal::info): New method.
5095         (cleanup_restore_target_terminal)
5096         (make_cleanup_restore_target_terminal): Remove.
5097         * solib.c (handle_solib_event): Update.
5098         * remote.c (remote_serial_quit_handler): Update.
5099         (remote_terminal_inferior, remote_wait_as): Update.
5100         * record-full.c (record_full_wait_1): Update.
5101         * nto-procfs.c (procfs_create_inferior): Update.
5102         * nat/fork-inferior.c (startup_inferior): Update.
5103         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5104         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5105         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5106         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5107         (mi_breakpoint_created, mi_breakpoint_deleted)
5108         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5109         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5110         (mi_user_selected_context_changed, report_initial_inferior):
5111         Update.
5112         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5113         (linux_nat_terminal_inferior): Update.
5114         * infrun.c (follow_fork_inferior)
5115         (handle_vfork_child_exec_or_exit, do_target_resume)
5116         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5117         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5118         Update.
5119         * inflow.c (child_terminal_init, info_terminal_command): Update.
5120         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5121         (attach_command): Update.
5122         * infcall.c (call_thread_fsm_should_stop): Update.
5123         * gnu-nat.c (gnu_attach): Update.
5124         * extension.c (struct active_ext_lang_state)
5125         (restore_active_ext_lang): Update.
5126         * exceptions.c (print_flush): Update.
5127         * event-top.c (async_enable_stdin, default_quit_handler): Update.
5128         (struct quit_handler_cleanup_data, restore_quit_handler)
5129         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5130         Remove.
5131         * cp-support.c (gdb_demangle): Update.
5132         * breakpoint.c (update_inserted_breakpoint_locations)
5133         (insert_breakpoint_locations, handle_jit_event)
5134         (disable_breakpoints_in_unloaded_shlib): Update.
5135         * annotate.c (annotate_breakpoints_invalid)
5136         (annotate_frames_invalid): Update.
5137
5138 2017-09-20  Tom Tromey  <tom@tromey.com>
5139
5140         * main.c (catch_command_errors): Rename from
5141         catch_command_errors_const.
5142         (captured_main_1): Update.
5143
5144 2017-09-20  Pedro Alves  <palves@redhat.com>
5145
5146         * cli/cli-cmds.c (list_command): Use print_sal_location.
5147         (print_sal_location): New function.
5148         (ambiguous_line_spec): Use print_sal_location.
5149         * linespec.c (symbol_to_sal): Record the symbol in the sal.
5150         * symtab.c (find_function_start_sal): Likewise.
5151         * symtab.h (symtab_and_line::symbol): New field.
5152
5153 2017-09-20  Pedro Alves  <palves@redhat.com>
5154
5155         * linespec.c (minsym_found): Handle non-text minsyms.
5156         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5157
5158 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5159
5160         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5161         backslash.
5162
5163 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5164
5165         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5166         vmovups instead vmovaps.
5167         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5168
5169 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
5170
5171         * NEWS (Changes since GDB 8.0): Add starti.
5172         * infcmd.c (enum run_break): New.
5173         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5174         case.
5175         (run_command): Use enum run_how.
5176         (start_command): Likewise.
5177         (starti_command): New function.
5178         (RUN_ARGS_HELP): New macro.
5179         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5180         commands.  Add starti command.
5181
5182 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5183
5184         * Makefile.in (monitor.o): Remove the rule.
5185
5186 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5187
5188         * annotate.h (struct annotate_arg_emitter): Use
5189         DISABLE_COPY_AND_ASSIGN.
5190         * common/refcounted-object.h (refcounted_object): Likewise.
5191         * completer.h (struct completion_result): Likewise.
5192         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5193         * filename-seen-cache.h (filename_seen_cache): Likewise.
5194         * gdbcore.h (thread_section_name): Likewise.
5195         * gdb_regex.h (compiled_regex): Likewise.
5196         * gdbthread.h (scoped_restore_current_thread): Likewise.
5197         * inferior.h (scoped_restore_current_inferior): Likewise.
5198         * jit.c (jit_reader): Likewise.
5199         * linespec.h (struct linespec_result): Likewise.
5200         * mi/mi-parse.h (struct mi_parse): Likewise.
5201         * nat/fork-inferior.c (execv_argv): Likewise.
5202         * progspace.h (scoped_restore_current_program_space): Likewise.
5203         * python/python-internal.h (class gdbpy_enter): Likewise.
5204         * regcache.h (regcache): Likewise.
5205         * target-descriptions.c (struct tdesc_reg): Likewise.
5206         (struct tdesc_type): Likewise.
5207         (struct tdesc_feature): Likewise.
5208         * ui-out.h (ui_out_emit_type): Likewise.
5209
5210 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
5211
5212         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5213         label abort_expression.
5214
5215 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5216
5217         * common/buffer.c (buffer_xml_printf): Adjust.
5218         * common/xml-utils.c (xml_escape_text): Change return type to
5219         std::string, update code accordingly.
5220         * common/xml-utils.h (xml_escape_text): Change return type to
5221         std::string.
5222         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5223         * windows-tdep.c (windows_xfer_shared_library): Adjust.
5224         * unittests/xml-utils-selftests.c (test_xml_escape_text):
5225         Adjust.
5226
5227 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5228
5229         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5230         (SUBDIR_UNITTESTS_OBS): Add new object file.
5231         * unittests/xml-utils-selftests.c: New file.
5232
5233 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5234
5235         * common/selftest.h (selftest): New struct/interface.
5236         (register_test): Add name parameter, add new overload.
5237         (run_tests): Add filter parameter.
5238         (for_each_selftest_ftype): New typedef.
5239         (for_each_selftest): New declaration.
5240         * common/selftest.c (tests): Change type to
5241         map<string, unique_ptr<selftest>>.
5242         (simple_selftest): New struct.
5243         (register_test): New function.
5244         (register_test): Add name parameter and use it.
5245         (run_tests): Add filter parameter and use it.  Add prints.
5246         Adjust to vector -> map change.
5247         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5248         registering selftests.
5249         * arm-tdep.c (_initialize_arm_tdep): Likewise.
5250         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5251         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5252         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5253         * findvar.c (_initialize_findvar): Likewise.
5254         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5255         * maint.c (maintenance_selftest): Update call to run_tests.
5256         (maintenance_info_selftests): New function.
5257         (_initialize_maint_cmds): Register "maintenance info selftests"
5258         command.  Update "maintenance selftest" doc.
5259         * regcache.c (_initialize_regcache): Add names when registering
5260         selftests.
5261         * rust-exp.y (_initialize_rust_exp): Likewise.
5262         * selftest-arch.c (gdbarch_selftest): New struct.
5263         (gdbarch_tests): Remove.
5264         (register_test_foreach_arch): Add name parameter.  Call
5265         register_test.
5266         (tests_with_arch): Remove, move most content to
5267         gdbarch_selftest::operator().
5268         (_initialize_selftests_foreach_arch): Remove.
5269         * selftest-arch.h (register_test_foreach_arch): Add name
5270         parameter.
5271         (run_tests_with_arch): New declaration.
5272         * utils-selftests.c (_initialize_utils_selftests): Add names
5273         when registering selftests.
5274         * utils.c (_initialize_utils): Likewise.
5275         * unittests/array-view-selftests.c
5276         (_initialize_array_view_selftests): Likewise.
5277         * unittests/environ-selftests.c (_initialize_environ_selftests):
5278         Likewise.
5279         * unittests/function-view-selftests.c
5280         (_initialize_function_view_selftests): Likewise.
5281         * unittests/offset-type-selftests.c
5282         (_initialize_offset_type_selftests): Likewise.
5283         * unittests/optional-selftests.c
5284         (_initialize_optional_selftests): Likewise.
5285         * unittests/scoped_restore-selftests.c
5286         (_initialize_scoped_restore_selftests): Likewise.
5287         * NEWS: Document "maintenance selftest" and "maint info
5288         selftests".
5289
5290 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5291
5292         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5293         scoped_restore.
5294
5295 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5296
5297         * mi/mi-main.c (mi_load_progress): Make uiout variable
5298         a unique_ptr.
5299
5300 2017-09-15  Pedro Alves  <palves@redhat.com>
5301
5302         * compile/compile-c-types.c (convert_enum, convert_int)
5303         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5304
5305 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
5306
5307         * dwarf2read.c (copy_string): Remove.
5308         (parse_macro_definition): Replace copy_string with savestring.
5309
5310 2017-09-15  Yao Qi  <yao.qi@linaro.org>
5311
5312         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5313         gdb_target_obs.
5314         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5315         Likewise.
5316         (i[34567]86-*-linux*): Likewise.
5317
5318 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5319
5320         * dwarf2expr.h (dwarf_stack_value): Add constructor.
5321         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5322         <stack>: Change type to std::vector.
5323         <stack_len, stack_allocated>: Remove.
5324         <grow_stack>: Remove.
5325         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5326         (dwarf_expr_context::~dwarf_expr_context): Remove.
5327         (dwarf_expr_context::grow_stack): Remove.
5328         (dwarf_expr_context::push): Adjust.
5329         (dwarf_expr_context::pop): Adjust.
5330         (dwarf_expr_context::fetch): Adjust.
5331         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5332         (dwarf_expr_context::stack_empty_p): Adjust.
5333         (dwarf_expr_context::execute_stack_op): Adjust.
5334
5335 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5336
5337         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5338         return type to bool.
5339         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5340
5341 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5342
5343         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5344         Change type to bool.
5345         (dwarf_stack_value) <in_stack_memory>: Likewise.
5346         (dwarf_expr_context) <push_address>: Change parameter type to
5347         bool.
5348         <fetch_in_stack_memory>: Change return type to bool.
5349         <push>: Change parameter type to bool.
5350         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5351         to bool.
5352         (dwarf_expr_context::push_address): Likewise.
5353         (dwarf_expr_context::fetch_in_stack_memory): Change return type
5354         to bool.
5355         (dwarf_expr_context::execute_stack_op): Adjust.
5356         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5357
5358 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5359
5360         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5361         (struct dwarf_expr_context) <n_pieces>: Remove.
5362         <pieces>: Change type to std::vector.
5363         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5364         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5365         pieces.
5366         (dwarf_expr_context::add_piece): Adjust.
5367         * dwarf2loc.c (struct piece_closure): Initialize fields.
5368         <n_pieces>: Remove.
5369         <pieces>: Change type to std::vector.
5370         (allocate_piece_closure): Adjust, change parameter to
5371         std::vector rvalue and std::move it to piece_closure.
5372         (rw_pieced_value): Adjust.
5373         (check_pieced_synthetic_pointer): Adjust.
5374         (indirect_synthetic_pointer): Adjust.
5375         (coerce_pieced_ref): Adjust.
5376         (free_pieced_value_closure):  Adjust.  Use delete to free
5377         piece_closure.
5378         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
5379         to allocate_piece_closure.
5380         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5381
5382 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5383
5384         * probe.h (probe_ops_cp): Remove typedef.
5385         (DEF_VEC_P (probe_ops_cp)): Remove.
5386         (all_probe_ops): Change type to std::vector.
5387         * probe.c (info_probes_for_ops): Adjust to vector change.
5388         (probe_linespec_to_ops): Likewise.
5389         (all_probe_ops): Change type to std::vector.
5390         (_initialize_probe): Adjust to vector change.
5391         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5392         * elfread.c (elf_get_probes): Likewise.
5393         * stap-probe.c (_initialize_stap_probe): Likewise.
5394
5395 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5396
5397         * probe.h (struct bound_probe): Define constructors.
5398         * probe.c (bound_probe_s): Remove typedef.
5399         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5400         (collect_probes): Change return type to std::vector, remove
5401         cleanup.
5402         (compare_probes): Return bool, change parameter type.  Change
5403         semantic to "less than".
5404         (gen_ui_out_table_header_info): Change parameter to std::vector
5405         and update.
5406         (exists_probe_with_pops): Likewise.
5407         (info_probes_for_ops): Update to std::vector change.
5408         (enable_probes_command): Likewise.
5409         (disable_probes_command): Likewise.
5410
5411 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5412
5413         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5414         vec to std::vector.
5415         * probe.c (parse_probes_in_pspace): Update.
5416         (find_probes_in_objfile): Update.
5417         (find_probe_by_pc): Update.
5418         (collect_probes): Update.
5419         (probe_any_get_probes): Update.
5420         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5421         return type to reference to std::vector.
5422         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5423         std::vector and update.
5424         (dtrace_process_dof): Likewise.
5425         (dtrace_get_probes): Likewise.
5426         * elfread.c (elf_get_probes): Change return type to std::vector,
5427         store an std::vector in bfd_data.
5428         (probe_key_free): Update to std::vector.
5429         * stap-probe.c (handle_stap_probe): Change parameter to
5430         std::vector and update.
5431         (stap_get_probes): Likewise.
5432         * symfile-debug.c (debug_sym_get_probes): Change return type to
5433         std::vector and update.
5434
5435 2017-09-11  Tom Tromey  <tom@tromey.com>
5436
5437         * breakpoint.c (program_breakpoint_here_p): Update.
5438         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5439         from make_show_memory_breakpoints_cleanup.  Return a
5440         scoped_restore_tmpl<int>.
5441         (restore_show_memory_breakpoints): Remove.
5442         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5443         * mem-break.c (memory_validate_breakpoint): Update.
5444         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5445         (ia64_memory_remove_breakpoint): Update.
5446         (ia64_breakpoint_from_pc): Update.
5447         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5448         from make_show_memory_breakpoints_cleanup.
5449
5450 2017-09-11  Tom Tromey  <tom@tromey.com>
5451
5452         * d-namespace.c (d_lookup_symbol): Use std::string.
5453         (find_symbol_in_baseclass): Likewise.
5454
5455 2017-09-11  Tom Tromey  <tom@tromey.com>
5456
5457         * ctf.c (ctf_start): Use std::string.
5458
5459 2017-09-11  Tom Tromey  <tom@tromey.com>
5460
5461         * ada-lang.c (is_known_support_routine): Update.
5462         (ada_unhandled_exception_name_addr_from_raise): Update.
5463         * guile/scm-frame.c (gdbscm_frame_name): Update.
5464         * python/py-frame.c (frapy_name): Update.
5465         (frapy_function): Update.
5466         * stack.h (find_frame_funname): Update.
5467         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5468         (print_frame): Update.
5469
5470 2017-09-11  Tom Tromey  <tom@tromey.com>
5471
5472         * findcmd.c (put_bits): Take a gdb::byte_vector.
5473         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5474         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5475         cleanups.
5476         (find_command): Update.
5477
5478 2017-09-11  Tom Tromey  <tom@tromey.com>
5479
5480         * cli/cli-script.c (class scoped_restore_hook_in): New.
5481         (clear_hook_in_cleanup): Remove.
5482         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5483         scoped_restore_hook_in.
5484
5485 2017-09-11  Tom Tromey  <tom@tromey.com>
5486
5487         * cli/cli-script.c (restore_interp): Remove.
5488         (read_command_lines): Use scoped_restore_interp.
5489         * interps.c (scoped_restore_interp::set_temp): Rename from
5490         interp_set_temp.
5491         * interps.h (class scoped_restore_interp): New.
5492         (interp_set_temp): Remove.
5493
5494 2017-09-11  Tom Tromey  <tom@tromey.com>
5495
5496         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5497         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5498         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5499         scoped_restore.
5500         (mi_cmd_break_insert_1): Update.
5501         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5502         scoped_restore.
5503
5504 2017-09-11  Tom Tromey  <tom@tromey.com>
5505
5506         * demangle.c (demangle_command): Update.
5507         * breakpoint.c (disable_command): Update.
5508         (enable_command): Update.
5509         (find_location_by_number): Make "number" const.  Use
5510         get_number_trailer.
5511         * cli/cli-utils.c (extract_arg): Return std::string.
5512         * probe.c (parse_probe_linespec): Update.  Change types.
5513         (collect_probes): Take string arguments.
5514         (parse_probe_linespec): Likewise.
5515         (info_probes_for_ops): Update.
5516         (enable_probes_command): Update.
5517         (disable_probes_command): Update.
5518         * break-catch-sig.c (catch_signal_split_args): Update.
5519         * mi/mi-parse.c (mi_parse): Update.
5520
5521 2017-09-11  Tom Tromey  <tom@tromey.com>
5522
5523         * language.h (language_enum): Make argument const.
5524         * language.c (language_enum): Make argument const.
5525
5526 2017-09-11  Tom Tromey  <tom@tromey.com>
5527
5528         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5529         as function.
5530         (skip_to_space): Rename from skip_to_space_const.
5531         * common/common-utils.c (skip_to_space): New function.
5532         (skip_to_space): Rename from skip_to_space_const.
5533         * cli/cli-utils.h (get_number): Rename from get_number_const.
5534         (extract_arg): Rename from extract_arg_const.
5535         * cli/cli-utils.c (get_number): Rename from get_number_const.
5536         (extract_arg): Rename from extract_arg_const.
5537         (number_or_range_parser::get_number): Use ::get_number.
5538         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5539         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5540         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5541         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5542         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5543         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5544         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5545         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5546
5547 2017-09-11  Tom Tromey  <tom@tromey.com>
5548
5549         * python/python.c (do_start_initialization): Use
5550         py-event-types.def to initialize types.
5551         Define all object type structures.
5552         * python/python-internal.h: Don't declare event initialization
5553         functions.
5554         * python/py-threadevent.c (thread_event_object_type): Don't
5555         define.
5556         * python/py-stopevent.c (stop_event_object_type): Don't define.
5557         * python/py-signalevent.c (signal_event_object_type): Don't
5558         declare or define.
5559         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5560         (clear_objfiles_event_object_type): Don't declare or define.
5561         * python/py-infevents.c (inferior_call_pre_event_object_type)
5562         (inferior_call_post_event_object_type)
5563         (register_changed_event_object_type)
5564         (memory_changed_event_object_type): Don't declare or define.
5565         * python/py-inferior.c (new_thread_event_object_type)
5566         (new_inferior_event_object_type)
5567         (inferior_deleted_event_object_type): Don't declare or define.
5568         * python/py-exitedevent.c (exited_event_object_type): Don't
5569         declare or define.
5570         * python/py-evts.c (gdbpy_initialize_py_events): Use
5571         py-all-events.def.
5572         * python/py-events.h (thread_event_object_type): Don't declare.
5573         (events_object): Use py-all-events.def.
5574         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5575         py-event-types.def.
5576         * python/py-event-types.def: New file.
5577         * python/py-continueevent.c (create_continue_event_object): Don't
5578         declare or define.
5579         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5580         declare or define.
5581         * python/py-all-events.def: New file.
5582
5583 2017-09-11  Tom Tromey  <tom@tromey.com>
5584
5585         * python/py-threadevent.c (create_thread_event_object): Return
5586         gdbpy_ref.
5587         * python/py-stopevent.h (create_stop_event_object)
5588         (create_breakpoint_event_object, create_signal_event_object):
5589         Update.
5590         * python/py-stopevent.c (create_stop_event_object): Return
5591         gdbpy_ref.
5592         (emit_stop_event): Update.
5593         * python/py-signalevent.c (create_signal_event_object): Return
5594         gdbpy_ref.
5595         * python/py-infevents.c (create_inferior_call_event_object):
5596         Update.
5597         * python/py-event.h (create_event_object)
5598         (create_thread_event_object): Update.
5599         * python/py-event.c (create_event_object): Return gdbpy_ref.
5600         * python/py-continueevent.c: Return gdbpy_ref.
5601         * python/py-bpevent.c (create_breakpoint_event_object): Return
5602         gdbpy_ref.
5603
5604 2017-09-11  Tom Tromey  <tom@tromey.com>
5605
5606         PR python/15622:
5607         * NEWS: Add entry.
5608         * python/python.c (do_start_initialization): Initialize new event
5609         types.
5610         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5611         (gdbpy_initialize_inferior_deleted_event)
5612         (gdbpy_initialize_new_thread_event): Declare.
5613         * python/py-threadevent.c (create_thread_event_object): Add option
5614         "thread" parameter.
5615         * python/py-inferior.c (new_thread_event_object_type)
5616         (new_inferior_event_object_type)
5617         (inferior_deleted_event_object_type): Declare.
5618         (python_new_inferior, python_inferior_deleted): New functions.
5619         (add_thread_object): Emit new_thread event.
5620         (gdbpy_initialize_inferior): Attach new functions to corresponding
5621         observers.
5622         (new_thread, new_inferior, inferior_deleted): Define new event
5623         types.
5624         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5625         registries.
5626         * python/py-events.h (events_object) <new_inferior,
5627         inferior_deleted, new_thread>: New fields.
5628         * python/py-event.h (create_thread_event_breakpoint): Add optional
5629         "thread" parameter.
5630
5631 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5632
5633         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5634         check current_ui instead.
5635         (internal_vproblem): Likewise.
5636
5637 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5638
5639         * thread.c (print_thread_info_1): Remove unnecessary calls to
5640         uiout->is_mi_like_p.
5641
5642 2017-09-09  Tom Tromey  <tom@tromey.com>
5643
5644         * namespace.h (add_using_directive): Update.
5645         * namespace.c (add_using_directive): Change type of excludes to
5646         std::vector.
5647         * dwarf2read.c (read_import_statement): Use std::vector.
5648         (read_namespace): Update.
5649         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5650
5651 2017-09-09  Tom Tromey  <tom@tromey.com>
5652
5653         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5654
5655 2017-09-09  Tom Tromey  <tom@tromey.com>
5656
5657         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5658
5659 2017-09-09  Tom Tromey  <tom@tromey.com>
5660
5661         * stack.c (func_command): Use gdb::def_vector.
5662
5663 2017-09-09  Tom Tromey  <tom@tromey.com>
5664
5665         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5666         ui_out_emit_list, ui_out_emit_tuple.
5667         (mi_cmd_var_update): Likewise.
5668
5669 2017-09-09  Tom Tromey  <tom@tromey.com>
5670
5671         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5672         ui_out_redirect_pop.
5673         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5674         ui_out_redirect_pop.
5675         * utils.c (do_ui_out_redirect_pop)
5676         (make_cleanup_ui_out_redirect_pop): Remove.
5677         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5678         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5679         * ui-out.h (ui_out_redirect_pop): New class.
5680
5681 2017-09-09  Tom Tromey  <tom@tromey.com>
5682
5683         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5684         (list_available_thread_groups, mi_cmd_list_thread_groups)
5685         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5686         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5687         Likewise.
5688
5689 2017-09-09  Tom Tromey  <tom@tromey.com>
5690
5691         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5692         ui_out_emit_tuple.
5693
5694 2017-09-09  Tom Tromey  <tom@tromey.com>
5695
5696         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5697         * stack.c (print_frame): Use ui_out_emit_tuple.
5698         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5699         (info_spu_mailbox_command, info_spu_dma_command)
5700         (info_spu_proxydma_command): Likewise.
5701         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5702         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5703         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5704         ui_out_emit_tuple.
5705         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5706
5707 2017-09-09  Tom Tromey  <tom@tromey.com>
5708
5709         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5710         (class ui_out_emit_table): Update comment.
5711         * ui-out.c (do_cleanup_table_end)
5712         (make_cleanup_ui_out_table_begin_end): Remove.
5713         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5714         (info_spu_dma_cmdlist): Likewise.
5715         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5716         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5717         ui_out_emit_table.
5718
5719 2017-09-09  Tom Tromey  <tom@tromey.com>
5720
5721         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5722         ui_out_emit_list, gdb::optional.
5723
5724 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5725
5726         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5727         prototype.
5728         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5729         prototype.
5730         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5731         prototype.
5732         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5733         * ada-exp.y: Remove _initialize_ada_exp prototype.
5734         * ada-lang.c: Remove _initialize_ada_language prototype.
5735         * ada-tasks.c: Remove _initialize_tasks prototype.
5736         * addrmap.c: Remove _initialize_addrmap prototype.
5737         * agent.c: Remove _initialize_agent prototype.
5738         * aix-thread.c: Remove _initialize_aix_thread prototype.
5739         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5740         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5741         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5742         prototype.
5743         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5744         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5745         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5746         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5747         prototype.
5748         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5749         prototype.
5750         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5751         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5752         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5753         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5754         prototype.
5755         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5756         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5757         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5758         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5759         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5760         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5761         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5762         prototype.
5763         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5764         prototype.
5765         * annotate.c: Remove _initialize_annotate prototype.
5766         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5767         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5768         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5769         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5770         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5771         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5772         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5773         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5774         prototype.
5775         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5776         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5777         * auto-load.c: Remove _initialize_auto_load prototype.
5778         * auxv.c: Remove _initialize_auxv prototype.
5779         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5780         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5781         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5782         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5783         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5784         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5785         prototype.
5786         * break-catch-throw.c: Remove _initialize_break_catch_throw
5787         prototype.
5788         * breakpoint.c: Remove _initialize_breakpoint prototype.
5789         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5790         * btrace.c: Remove _initialize_btrace prototype.
5791         * charset.c: Remove _initialize_charset prototype.
5792         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5793         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5794         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5795         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5796         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5797         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5798         * coffread.c: Remove _initialize_coffread prototype.
5799         * compile/compile.c: Remove _initialize_compile prototype.
5800         * complaints.c: Remove _initialize_complaints prototype.
5801         * completer.c: Remove _initialize_completer prototype.
5802         * copying.awk: Remove _initialize_copying prototype.
5803         * copying.c: Regenerate.
5804         * core-regset.c: Remove _initialize_core_regset prototype.
5805         * corefile.c: Remove _initialize_core prototype.
5806         * corelow.c: Remove _initialize_corelow prototype.
5807         * cp-abi.c: Remove _initialize_cp_abi prototype.
5808         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5809         * cp-support.c: Remove _initialize_cp_support prototype.
5810         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5811         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5812         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5813         * ctf.c: Remove _initialize_ctf prototype.
5814         * d-lang.c: Remove _initialize_d_language prototype.
5815         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5816         prototype.
5817         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5818         * dbxread.c: Remove _initialize_dbxread prototype.
5819         * dcache.c: Remove _initialize_dcache prototype.
5820         * demangle.c: Remove _initialize_demangler prototype.
5821         * disasm-selftests.c: Remove _initialize_disasm_selftests
5822         prototype.
5823         * disasm.c: Remove _initialize_disasm prototype.
5824         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5825         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5826         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5827         prototype.
5828         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5829         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5830         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5831         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5832         * elfread.c: Remove _initialize_elfread prototype.
5833         * exec.c: Remove _initialize_exec prototype.
5834         * extension.c: Remove _initialize_extension prototype.
5835         * f-lang.c: Remove _initialize_f_language prototype.
5836         * f-valprint.c: Remove _initialize_f_valprint prototype.
5837         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5838         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5839         * filesystem.c: Remove _initialize_filesystem prototype.
5840         * findcmd.c: Remove _initialize_mem_search prototype.
5841         * fork-child.c: Remove _initialize_fork_child prototype.
5842         * frame-base.c: Remove _initialize_frame_base prototype.
5843         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5844         * frame.c: Remove _initialize_frame prototype.
5845         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5846         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5847         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5848         * gcore.c: Remove _initialize_gcore prototype.
5849         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5850         * gdbarch.c: Regenerate.
5851         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5852         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5853         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5854         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5855         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5856         * go-lang.c: Remove _initialize_go_language prototype.
5857         * go32-nat.c: Remove _initialize_go32_nat prototype.
5858         * guile/guile.c: Remove _initialize_guile prototype.
5859         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5860         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5861         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5862         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5863         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5864         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5865         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5866         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5867         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5868         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5869         prototype.
5870         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5871         prototype.
5872         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5873         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5874         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5875         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5876         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5877         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5878         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5879         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5880         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5881         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5882         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5883         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5884         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5885         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5886         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5887         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5888         prototype.
5889         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5890         prototype.
5891         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5892         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5893         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5894         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5895         * infcall.c: Remove _initialize_infcall prototype.
5896         * infcmd.c: Remove _initialize_infcmd prototype.
5897         * inferior.c: Remove _initialize_inferiors prototype.
5898         * inflow.c: Remove _initialize_inflow prototype.
5899         * infrun.c: Remove _initialize_infrun prototype.
5900         * interps.c: Remove _initialize_interpreter prototype.
5901         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5902         * jit.c: Remove _initialize_jit prototype.
5903         * language.c: Remove _initialize_language prototype.
5904         * linux-fork.c: Remove _initialize_linux_fork prototype.
5905         * linux-nat.c: Remove _initialize_linux_nat prototype.
5906         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5907         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5908         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5909         * m2-lang.c: Remove _initialize_m2_language prototype.
5910         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5911         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5912         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5913         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5914         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5915         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5916         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5917         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5918         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5919         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5920         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5921         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5922         * machoread.c: Remove _initialize_machoread prototype.
5923         * macrocmd.c: Remove _initialize_macrocmd prototype.
5924         * macroscope.c: Remove _initialize_macroscope prototype.
5925         * maint.c: Remove _initialize_maint_cmds prototype.
5926         * mdebugread.c: Remove _initialize_mdebugread prototype.
5927         * memattr.c: Remove _initialize_mem prototype.
5928         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5929         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5930         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5931         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5932         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5933         * microblaze-linux-tdep.c: Remove
5934         _initialize_microblaze_linux_tdep prototype.
5935         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5936         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5937         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5938         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5939         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5940         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5941         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5942         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5943         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5944         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5945         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5946         prototype.
5947         * mipsread.c: Remove _initialize_mipsread prototype.
5948         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5949         prototype.
5950         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5951         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5952         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5953         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5954         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5955         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5956         prototype.
5957         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5958         * nto-procfs.c: Remove _initialize_procfs prototype.
5959         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5960         * objc-lang.c: Remove _initialize_objc_language prototype.
5961         * objfiles.c: Remove _initialize_objfiles prototype.
5962         * observer.c: Remove observer_test_first_notification_function,
5963         observer_test_second_notification_function,
5964         observer_test_third_notification_function, and
5965         _initialize_observer prototypes.
5966         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5967         * osabi.c: Remove _initialize_gdb_osabi prototype.
5968         * osdata.c: Remove _initialize_osdata prototype.
5969         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5970         * parse.c: Remove _initialize_parse prototype.
5971         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5972         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5973         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5974         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5975         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5976         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5977         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5978         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5979         * printcmd.c: Remove _initialize_printcmd prototype.
5980         * probe.c: Remove _initialize_probe prototype.
5981         * proc-api.c: Remove _initialize_proc_api prototype.
5982         * proc-events.c: Remove _initialize_proc_events prototype.
5983         * proc-service.c: Remove _initialize_proc_service prototype.
5984         * procfs.c: Remove _initialize_procfs prototype.
5985         * psymtab.c: Remove _initialize_psymtab prototype.
5986         * python/python.c: Remove _initialize_python prototype.
5987         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5988         * record-btrace.c: Remove _initialize_record_btrace prototype.
5989         * record-full.c: Remove _initialize_record_full prototype.
5990         * record.c: Remove _initialize_record prototype.
5991         * regcache.c: Remove _initialize_regcache prototype.
5992         * reggroups.c: Remove _initialize_reggroup prototype.
5993         * remote-notif.c: Remove _initialize_notif prototype.
5994         * remote-sim.c: Remove _initialize_remote_sim prototype.
5995         * remote.c: Remove _initialize_remote prototype.
5996         * reverse.c: Remove _initialize_reverse prototype.
5997         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5998         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5999         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6000         prototype.
6001         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6002         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6003         * rust-exp.y: Remove _initialize_rust_exp prototype.
6004         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6005         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6006         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6007         * score-tdep.c: Remove _initialize_score_tdep prototype.
6008         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6009         prototype.
6010         * ser-go32.c: Remove _initialize_ser_dos prototype.
6011         * ser-mingw.c: Remove _initialize_ser_windows prototype.
6012         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6013         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6014         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6015         * serial.c: Remove _initialize_serial prototype.
6016         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6017         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6018         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6019         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6020         * skip.c: Remove _initialize_step_skip prototype.
6021         * sol-thread.c: Remove _initialize_sol_thread prototype.
6022         * solib-aix.c: Remove _initialize_solib_aix prototype.
6023         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6024         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6025         * solib-frv.c: Remove _initialize_frv_solib prototype.
6026         * solib-spu.c: Remove _initialize_spu_solib prototype.
6027         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6028         * solib-target.c: Remove _initialize_solib_target prototype.
6029         * solib.c: Remove _initialize_solib prototype.
6030         * source.c: Remove _initialize_source prototype.
6031         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6032         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6033         prototype.
6034         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6035         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6036         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6037         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6038         prototype.
6039         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6040         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6041         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6042         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6043         prototype.
6044         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6045         prototype.
6046         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6047         prototype.
6048         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6049         prototype.
6050         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6051         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6052         prototype.
6053         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6054         prototype.
6055         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6056         prototype.
6057         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6058         prototype.
6059         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6060         prototype.
6061         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6062         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6063         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6064         * stabsread.c: Remove _initialize_stabsread prototype.
6065         * stack.c: Remove _initialize_stack prototype.
6066         * stap-probe.c: Remove _initialize_stap_probe prototype.
6067         * std-regs.c: Remove _initialize_frame_reg prototype.
6068         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6069         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6070         * symfile.c: Remove _initialize_symfile prototype.
6071         * symmisc.c: Remove _initialize_symmisc prototype.
6072         * symtab.c: Remove _initialize_symtab prototype.
6073         * target-dcache.c: Remove _initialize_target_dcache prototype.
6074         * target-descriptions.c: Remove _initialize_target_descriptions
6075         prototype.
6076         * thread.c: Remove _initialize_thread prototype.
6077         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6078         prototype.
6079         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6080         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6081         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6082         prototype.
6083         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6084         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6085         * tracefile.c: Remove _initialize_tracefile prototype.
6086         * tracepoint.c: Remove _initialize_tracepoint prototype.
6087         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6088         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6089         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6090         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6091         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6092         * tui/tui-win.c: Remove _initialize_tui_win prototype.
6093         * tui/tui.c: Remove _initialize_tui prototype.
6094         * typeprint.c: Remove _initialize_typeprint prototype.
6095         * user-regs.c: Remove _initialize_user_regs prototype.
6096         * utils.c: Remove _initialize_utils prototype.
6097         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6098         * valarith.c: Remove _initialize_valarith prototype.
6099         * valops.c: Remove _initialize_valops prototype.
6100         * valprint.c: Remove _initialize_valprint prototype.
6101         * value.c: Remove _initialize_values prototype.
6102         * varobj.c: Remove _initialize_varobj prototype.
6103         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6104         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6105         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6106         * windows-nat.c: Remove _initialize_windows_nat,
6107         _initialize_check_for_gdb_ini, and _initialize_loadable
6108         prototypes.
6109         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6110         * xcoffread.c: Remove _initialize_xcoffread prototype.
6111         * xml-support.c: Remove _initialize_xml_support prototype.
6112         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6113         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6114         prototype.
6115         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6116         prototype.
6117         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6118
6119 2017-09-08  Keith Seitz  <keiths@redhat.com>
6120
6121         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6122         field.
6123
6124 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
6125
6126         * f-valprint.c (f_val_print): Remove check for one byte
6127         sized integers. Remove printing of character type.
6128
6129 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
6130             Christoph Weinmann  <christoph.t.weinmann@intel.com>
6131             Bernhard Heckel  <bernhard.heckel@intel.com>
6132
6133         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6134         to maintain proper indentation when printing pointers/refs.
6135
6136 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6137
6138         GDB 8.0.1 released.
6139
6140 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6141
6142         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6143
6144 2017-09-05  Tom Tromey  <tom@tromey.com>
6145
6146         * parse.c (funcall_chain): Now a std::vector.
6147         (start_arglist, end_arglist): Simplify.
6148         (free_funcalls): Remove.
6149         (parse_exp_in_context_1): Remove cleanup.
6150
6151 2017-09-05  Tom Tromey  <tom@tromey.com>
6152
6153         * go-exp.y (go_parse): Don't create a cleanup.
6154
6155 2017-09-05  Tom Tromey  <tom@tromey.com>
6156
6157         * d-exp.y (PrimaryExpression): Use std::string.
6158         (d_parse): Don't create a cleanup.
6159
6160 2017-09-05  Tom Tromey  <tom@tromey.com>
6161
6162         * utils.c (do_clear_parser_state): Remove.
6163         (make_cleanup_clear_parser_state): Remove.
6164         * p-exp.y (pascal_parse): Use scoped_restore.
6165         * m2-exp.y (m2_parse): Use scoped_restore.
6166         * f-exp.y (f_parse): Use scoped_restore.
6167         * d-exp.y (d_parse): Use scoped_restore.
6168         * c-exp.y (c_parse): Use scoped_restore.
6169         * ada-exp.y (ada_parse): Use scoped_restore.
6170         * utils.h (make_cleanup_clear_parser_state): Remove.
6171
6172 2017-09-06  Keith Seitz  <keiths@redhat.com>
6173
6174         * dwarf2read.c (dw2_linkage_name_attr): New function.
6175         (dw2_linkage_name): New function.
6176         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6177         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6178         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6179
6180 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6181
6182         * config/djgpp/djconfig.sh: Correct shell portability issue.
6183
6184 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6185
6186         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6187
6188 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6189
6190         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6191         * NEWS: Mention new FreeBSD/mips native configuration.
6192         * configure.host: Add aarch64*-*-freebsd*.
6193         * configure.nat: Likewise.
6194         * aarch64-fbsd-nat.c: New file.
6195
6196 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6197
6198         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6199         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6200         * NEWS: Mention new FreeBSD/aarch64 target.
6201         * configure.tgt: Add aarch64*-*-freebsd*.
6202         * aarch64-fbsd-tdep.c: New file.
6203         * aarch64-fbsd-tdep.h: New file.
6204
6205 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6206
6207         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6208
6209 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6210
6211         * parse.c (find_minsym_type_and_address): Don't relocate addresses
6212         of TLS symbols.
6213
6214 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6215
6216         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6217         call.
6218
6219 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6220
6221         * infrun.c (follow_exec): Call add_thread after
6222         target_find_description.
6223
6224 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6225
6226         * infrun.c (handle_inferior_event_1): When exec'ing, read
6227         stop_pc after follow_exec.
6228
6229 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6230
6231         * remote.c (process_g_packet): Update error message.
6232
6233 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6234
6235         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6236         targets.
6237
6238 2017-09-05  Pedro Alves  <palves@redhat.com>
6239
6240         * eval.c (eval_call, evaluate_funcall): New functions, factored
6241         out from ...
6242         (evaluate_subexp_standard): ... this.
6243
6244 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6245
6246         * amd64-tdep.c (amd64_target_description): Create target
6247         descriptions.
6248         (_initialize_amd64_tdep): Don't call functions
6249         initialize_tdesc_amd64_*.  Add self tests.
6250         * arch/amd64.c (amd64_create_target_description): Add parameter
6251         is_linux.  Call set_tdesc_osabi if is_linux is true.
6252         * arch/amd64.h (amd64_create_target_description): Update the
6253         declaration.
6254         * arch/i386.c (i386_create_target_description): Add parameter
6255         is_linux.  Call set_tdesc_osabi if is_linux is true.
6256         * arch/i386.h (i386_create_target_description): Update
6257         declaration.
6258         * configure.tgt: Add i386.o to gdb_target_obs.
6259         * features/Makefile (XMLTOC): Remove i386/*.xml.
6260         * features/i386/amd64-avx-avx512.c: Remove.
6261         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6262         * features/i386/amd64-avx-mpx.c: Remove.
6263         * features/i386/amd64-avx.c: Remove.
6264         * features/i386/amd64-mpx.c: Remove.
6265         * features/i386/amd64.c: Remove.
6266         * features/i386/i386-avx-avx512.c: Remove.
6267         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6268         * features/i386/i386-avx-mpx.c: Remove.
6269         * features/i386/i386-avx.c: Remove.
6270         * features/i386/i386-mmx.c: Remove.
6271         * features/i386/i386-mpx.c: Remove.
6272         * features/i386/i386.c: Remove.
6273         * i386-tdep.c: Don't include features/i386/i386*.c., include
6274         target-descriptions.h and arch/i386.h.
6275         (i386_target_description): Create target descriptions.
6276         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6277         functions.  Do self tests.
6278
6279 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6280
6281         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6282         * features/i386/amd64-avx-avx512-linux.c: Removed.
6283         * features/i386/amd64-avx-linux.c: Removed.
6284         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6285         * features/i386/amd64-avx-mpx-linux.c: Removed.
6286         * features/i386/amd64-linux.c: Removed.
6287         * features/i386/amd64-mpx-linux.c: Removed.
6288         * features/i386/x32-avx-avx512-linux.c: Removed.
6289         * features/i386/x32-avx-linux.c: Removed.
6290         * features/i386/x32-linux.c: Removed.
6291
6292 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6293
6294         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
6295         features/i386/*.c.
6296         (amd64_linux_read_description): Call
6297         amd64_create_target_description.
6298         * arch/amd64.c: New file.
6299         * arch/amd64.h: New file.
6300         * configure.tgt (x86_64-*-linux*): Append amd64.o.
6301         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6302
6303 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6304
6305         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6306         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
6307         (amd64_linux_read_description): Create target descriptions.
6308         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6309         functions.  Add unit tests.
6310         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6311         x32-core.xml.
6312         * features/i386/64bit-avx.c: Generated.
6313         * features/i386/64bit-avx512.c: Generated.
6314         * features/i386/64bit-core.c: Generated.
6315         * features/i386/64bit-linux.c: Generated.
6316         * features/i386/64bit-mpx.c: Generated.
6317         * features/i386/64bit-pkeys.c: Generated.
6318         * features/i386/64bit-segments.c: Generated.
6319         * features/i386/64bit-sse.c: Generated.
6320         * features/i386/x32-core.c: Generated.
6321         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6322         c files for amd64-linux and x32-linux.
6323
6324 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6325
6326         * amd64-linux-tdep.c (amd64_linux_read_description): New
6327         function.
6328         (amd64_linux_core_read_description): Call
6329         amd64_linux_read_description.
6330         (amd64_linux_init_abi): Likewise.
6331         (amd64_x32_linux_init_abi): Likewise.
6332         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6333         * x86-linux-nat.c (x86_linux_read_description): Call
6334         amd64_linux_read_description.
6335
6336 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6337
6338         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6339         comments.
6340
6341 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6342
6343         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6344         * features/i386/i386-avx-avx512-linux.c: Remove.
6345         * features/i386/i386-avx-linux.c: Remove.
6346         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6347         * features/i386/i386-avx-mpx-linux.c: Remove.
6348         * features/i386/i386-linux.c: Remove.
6349         * features/i386/i386-mmx-linux.c: Remove.
6350         * features/i386/i386-mpx-linux.c: Remove.
6351
6352 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6353
6354         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6355         (SFILES): Add arch/i386.c.
6356         (HFILES_NO_SRCDIR): Add arch/i386.h.
6357         * arch/i386.c: New file.
6358         * arch/i386.h: New file.
6359         * arch/tdesc.h (allocate_target_description): Declare.
6360         (set_tdesc_architecture): Declare.
6361         (set_tdesc_osabi): Declare.
6362         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6363         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6364         include arch/i386.h.
6365         (i386_linux_read_description): Remove code and call
6366         i386_create_target_description.
6367         (set_tdesc_architecture): New function.
6368         (set_tdesc_osabi): New function.
6369         * target-descriptions.h (allocate_target_description): Remove.
6370
6371 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6372
6373         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6374         * target-descriptions.c (tdesc_create_feature): Likewise, and
6375         adjust code.
6376         * features/i386/32bit-avx.c: Re-generated.
6377         * features/i386/32bit-avx512.c: Re-generated.
6378         * features/i386/32bit-core.c: Re-generated.
6379         * features/i386/32bit-linux.c: Re-generated.
6380         * features/i386/32bit-mpx.c: Re-generated.
6381         * features/i386/32bit-pkeys.c: Re-generated.
6382         * features/i386/32bit-sse.c: Re-generated.
6383
6384 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6385
6386         * regformats/regdef.h (struct reg): Override operator == and !=.
6387
6388 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6389
6390         * arch/tdesc.h: New file.
6391         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6392         * target-descriptions.c: Update comments.
6393         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6394         declarations.
6395         * features/i386/32bit-avx.c: Re-generated.
6396         * features/i386/32bit-avx512.c: Re-generated.
6397         * features/i386/32bit-core.c: Re-generated.
6398         * features/i386/32bit-linux.c: Re-generated.
6399         * features/i386/32bit-mpx.c: Re-generated.
6400         * features/i386/32bit-pkeys.c: Re-generated.
6401         * features/i386/32bit-sse.c: Re-generated.
6402
6403 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6404
6405         * regformats/regdat.sh: Update generated code.
6406
6407 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6408
6409         * regformats/regdat.sh: Adjust code order.
6410
6411 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6412
6413         * expprint.c (dump_subexp_body_standard): Use constant format
6414         string in fprintf_filtered call.
6415
6416 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6417
6418         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6419         NetBSD/i386.
6420         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6421
6422 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6423
6424         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6425
6426 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6427
6428         * bsd-kvm.o: Define _KMEMUSER.
6429         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6430         * configure: Regenerate.
6431
6432 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6433
6434         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6435         * i386-fbsd-nat.c: Likewise.
6436
6437 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6438
6439         * unittests/array-view-selftests.c: Add include of <array>.
6440
6441 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6442
6443         * spu-tdep.c (flush_ea_cache): Add missing argument to
6444         call_function_by_hand.
6445
6446 2017-09-04  Pedro Alves  <palves@redhat.com>
6447
6448         * NEWS (Safer support for debugging with no debug info): New.
6449
6450 2017-09-04  Pedro Alves  <palves@redhat.com>
6451
6452         * c-exp.y (function_method, function_method_void): Add current
6453         instance flags to TYPE_INSTANCE.
6454         * dwarf2read.c (check_modifier): New.
6455         (compute_delayed_physnames): Assert that only C++ adds delayed
6456         physnames.  Mark fn_fields as const/volatile depending on
6457         physname.
6458         * eval.c (make_params): New type_instance_flags parameter.  Use
6459         it as the new type's instance flags.
6460         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6461         flags element and pass it to make_params.
6462         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6463         instance flags element.
6464         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6465         * gdbtypes.h: Include "enum-flags.h".
6466         (type_instance_flags): New enum-flags type.
6467         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6468         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6469         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6470         (follow_type_instance_flags): New function.
6471         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6472         * parser-defs.h (follow_type_instance_flags): Declare.
6473         * valops.c (value_struct_elt_for_reference): const/volatile must
6474         match too.
6475
6476 2017-09-04  Pedro Alves  <palves@redhat.com>
6477
6478         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6479         function/method scopes; lookup the nested name as a function local
6480         static variable.
6481
6482 2017-09-04  Pedro Alves  <palves@redhat.com>
6483
6484         (%type <voidval>): Add function_method.
6485         * c-exp.y (exp): New production for calls with no arguments.
6486         (function_method, function_method_void_or_typelist): New
6487         productions.
6488         (exp): New production for "method()::static_var".
6489         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6490         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6491         Handle OP_FUNC_STATIC_VAR.
6492         * parse.c (operator_length_standard):
6493         Handle OP_FUNC_STATIC_VAR.
6494
6495 2017-09-04  Pedro Alves  <palves@redhat.com>
6496
6497         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6498         handling.
6499         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6500         Ditto.
6501         * parse.c (operator_length_standard, operator_check_standard):
6502         Ditto.
6503         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6504
6505 2017-09-04  Pedro Alves  <palves@redhat.com>
6506
6507         * ax-gdb.c: Include "typeprint.h".
6508         (gen_expr_for_cast): New function.
6509         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6510         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6511         type is unknown.
6512         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6513         nodebug_data_symbol.
6514         * eval.c: Include "typeprint.h".
6515         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6516         Error out if symbol has unknown type.
6517         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6518         evaluate_subexp_for_cast.
6519         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6520         OP_VAR_MSYM_VALUE.
6521         (evaluate_subexp_for_cast): New function.
6522         * gdbtypes.c (init_nodebug_var_type): New function.
6523         (objfile_type): Use it to initialize types of variables with no
6524         debug info.
6525         * typeprint.c (error_unknown_type): New.
6526         * typeprint.h (error_unknown_type): New declaration.
6527         * compile/compile-c-types.c (convert_type_basic): Handle
6528         TYPE_CODE_ERROR; warn and fallback to int for variables with
6529         unknown type.
6530
6531 2017-09-04  Pedro Alves  <palves@redhat.com>
6532
6533         * eval.c (evaluate_var_value): New function, factored out from ...
6534         (evaluate_subexp_standard): ... here.
6535
6536 2017-09-04  Pedro Alves  <palves@redhat.com>
6537
6538         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6539         Remove useless assignments to 'op'.
6540
6541 2017-09-04  Pedro Alves  <palves@redhat.com>
6542
6543         * eval.c (eval_skip_value): New function.
6544         (evaluate_subexp_standard): Use it.
6545
6546 2017-09-04  Pedro Alves  <palves@redhat.com>
6547
6548         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6549         function name from symbol/minsym and pass it to
6550         error_call_unknown_return_type.
6551
6552 2017-09-04  Pedro Alves  <palves@redhat.com>
6553
6554         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6555         * ax-gdb.c (gen_msym_var_ref): New function.
6556         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6557         * eval.c (evaluate_var_msym_value): New function.
6558         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6559         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6560         to call_function_by_hand.
6561         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6562         Handle OP_VAR_MSYM_VALUE.
6563         (union exp_element) <msymbol>: New field.
6564         * minsyms.h (struct type): Forward declare.
6565         (find_minsym_type_and_address): Declare.
6566         * parse.c (write_exp_elt_msym): New function.
6567         (write_exp_msymbol): Delete, refactored as ...
6568         (find_minsym_type_and_address): ... this new function.
6569         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6570         (operator_length_standard, operator_check_standard): Handle
6571         OP_VAR_MSYM_VALUE.
6572         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6573
6574 2017-09-04  Pedro Alves  <palves@redhat.com>
6575
6576         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6577         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6578         unknown.
6579         * ada-typeprint.c (print_func_type): Handle functions with unknown
6580         return type.
6581         * c-typeprint.c (c_type_print_base): Handle functions and methods
6582         with unknown return type.
6583         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6584         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6585         * compile/compile-c-types.c: Include "objfiles.h".
6586         (convert_func): For functions with unknown return type, warn and
6587         default to int.
6588         * compile/compile-object-run.c (compile_object_run): Adjust call
6589         to call_function_by_hand_dummy.
6590         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6591         call_function_by_hand.
6592         * eval.c (evaluate_subexp_standard): Adjust calls to
6593         call_function_by_hand.  Handle functions and methods with unknown
6594         return type.  Pass expect_type to call_function_by_hand.
6595         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6596         return type.
6597         * gcore.c (call_target_sbrk): Adjust call to
6598         call_function_by_hand.
6599         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6600         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6601         an integer address type instead of nodebug.
6602         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6603         call_function_by_hand.
6604         * infcall.c (error_call_unknown_return_type): New function.
6605         (call_function_by_hand): New "default_return_type" parameter.
6606         Pass it down.
6607         (call_function_by_hand_dummy): New "default_return_type"
6608         parameter.  Use it instead of defaulting to int.  If there's no
6609         default and the return type is unknown, throw an error.  If
6610         there's a default return type, and the called function has no
6611         debug info, then assume the function is prototyped.
6612         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6613         New "default_return_type" parameter.
6614         (error_call_unknown_return_type): New declaration.
6615         * linux-fork.c (call_lseek): Cast return type of lseek.
6616         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6617         call_function_by_hand.
6618         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6619         calls to call_function_by_hand.
6620         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6621         return type.
6622         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6623         (value_nsstring, print_object_command): Adjust calls to
6624         call_function_by_hand.
6625         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6626         functions with unknown return type.
6627         (pascal_type_print_func_varspec_suffix): New function.
6628         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6629         TYPE_CODE_METHOD>: Use it.
6630         * python/py-value.c (valpy_call): Adjust call to
6631         call_function_by_hand.
6632         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6633         call_function_by_hand.
6634         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6635         call_function_by_hand.
6636         * valops.c (value_allocate_space_in_inferior): Adjust call to
6637         call_function_by_hand.
6638         * typeprint.c (type_print_unknown_return_type): New function.
6639         * typeprint.h (type_print_unknown_return_type): New declaration.
6640
6641 2017-09-04  Pedro Alves  <palves@redhat.com>
6642
6643         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6644         types with more than one parameter as prototyped.
6645
6646 2017-09-04  Pedro Alves  <palves@redhat.com>
6647
6648         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6649         (disassemble_command): Use gdb_disassembly_flags instead of bare
6650         int.
6651         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6652         (dump_insns, do_mixed_source_and_assembly_deprecated)
6653         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6654         Use gdb_disassembly_flags instead of bare int.
6655         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6656         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6657         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6658         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6659         (enum gdb_disassembly_flag): ... values of this new enumeration.
6660         (gdb_disassembly_flags): Define.
6661         (gdb_disassembly)
6662         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6663         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6664         gdb_disassembly_flags instead of bare int.
6665         * record-btrace.c (btrace_insn_history)
6666         (record_btrace_insn_history, record_btrace_insn_history_range)
6667         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6668         instead of bare int.
6669         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6670         Use gdb_disassembly_flags instead of bare int.
6671         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6672         Define.
6673         * target-delegates.c: Regenerate.
6674         * target.c (target_insn_history, target_insn_history_from)
6675         (target_insn_history_range): Use gdb_disassembly_flags instead of
6676         bare int.
6677         * target.h: Include "disasm.h".
6678         (struct target_ops) <to_insn_history, to_insn_history_from,
6679         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6680         int.
6681         (target_insn_history, target_insn_history_from)
6682         (target_insn_history_range): Use gdb_disassembly_flags instead of
6683         bare int.
6684
6685 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6686
6687         * cli/cli-script.c (build_command_line): For if/while commands,
6688         check whether args is empty.
6689
6690 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6691
6692         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6693         (enum command_control_type): Likewise.
6694         (struct command_line): Likewise.
6695         (free_command_lines): Likewise.
6696         (struct command_lines_deleter): Likewise.
6697         (command_line_up): Likewise.
6698         (read_command_lines): Likewise.
6699         (read_command_lines_1): Likewise.
6700         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6701         (enum command_control_type): Likewise.
6702         (struct command_line): Likewise.
6703         (free_command_lines): Likewise.
6704         (struct command_lines_deleter): Likewise.
6705         (command_line_up): Likewise.
6706         (read_command_lines): Likewise.
6707         (read_command_lines_1): Likewise.
6708         * breakpoint.h: Include cli/cli-script.h.
6709         * extension-priv.h: Likewise.
6710         * gdbcmd.h: Likewise.
6711
6712 2017-09-04  Pedro Alves  <palves@redhat.com>
6713
6714         * ada-lang.c (is_known_support_routine): Move sal declaration to
6715         where it is initialized.
6716         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6717         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6718         (clear_command, update_static_tracepoint): Remove init_sal
6719         references.  Move declarations closer to initializations.
6720         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6721         initializations.
6722         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6723         references.  Move sal declarations closer to initializations.
6724         * frame.c (find_frame_sal): Return a symtab_and_line via function
6725         return instead of output parameter.  Remove init_sal references.
6726         * frame.h (find_frame_sal): Return a symtab_and_line via function
6727         return instead of output parameter.
6728         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6729         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6730         instead of memset.
6731         (gdbscm_find_pc_line): Remove init_sal reference.
6732         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6733         references.  Move declarations closer to initializations.
6734         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6735         initializations.
6736         (finish_backward): Remove init_sal references.  Move declarations
6737         closer to initializations.
6738         * infrun.c (process_event_stop_test, handle_step_into_function)
6739         (insert_hp_step_resume_breakpoint_at_frame)
6740         (insert_step_resume_breakpoint_at_caller): Likewise.
6741         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6742         (symbol_to_sal): Likewise.
6743         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6744         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6745         to its initialization.
6746         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6747         init_sal references.  Move declarations closer to initializations.
6748         * source.c (get_current_source_symtab_and_line): Remove brace
6749         initialization.
6750         (set_current_source_symtab_and_line): Now takes the sal by const
6751         reference.  Remove brace initialization.
6752         (line_info): Remove init_sal reference.
6753         * source.h (set_current_source_symtab_and_line): Now takes a
6754         symtab_and_line via const reference.
6755         * stack.c (set_current_sal_from_frame): Adjust.
6756         (print_frame_info): Adjust.
6757         (get_last_displayed_sal): Return the sal via function return
6758         instead of via output parameter.  Simplify.
6759         (frame_info): Adjust.
6760         * stack.h (get_last_displayed_sal): Return the sal via function
6761         return instead of via output parameter.
6762         * symtab.c (init_sal): Delete.
6763         (find_pc_sect_line): Remove init_sal references.  Move
6764         declarations closer to initializations.
6765         (find_function_start_sal): Remove init_sal references.  Move
6766         declarations closer to initializations.
6767         * symtab.h (struct symtab_and_line): In-class initialize all
6768         fields.
6769         * tracepoint.c (set_traceframe_context)
6770         (print_one_static_tracepoint_marker): Remove init_sal references.
6771         Move declarations closer to initializations.
6772         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6773         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6774         declarations closer to initializations.
6775         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6776         init_sal references.  Adjust.
6777
6778 2017-09-04  Pedro Alves  <palves@redhat.com>
6779
6780         * ax-gdb.c (agent_command_1): Use range-for.
6781         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6782         * breakpoint.c: Include "common/array-view.h".
6783         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6784         parameter from struct symtabs_and_lines to
6785         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6786         (breakpoint_sals_to_pc): Change sals parameter from struct
6787         symtabs_and_lines to std::vector reference.
6788         (check_fast_tracepoint_sals): Change sals parameter from struct
6789         symtabs_and_lines to std::array_view.  Use range-for.
6790         (decode_static_tracepoint_spec): Return a std::vector instead of
6791         symtabs_and_lines.  Update.
6792         (create_breakpoint): Update.
6793         (break_range_command, until_break_command, clear_command): Update.
6794         (base_breakpoint_decode_location, bkpt_decode_location)
6795         (bkpt_probe_create_sals_from_location)
6796         (bkpt_probe_decode_location, tracepoint_decode_location)
6797         (tracepoint_probe_decode_location)
6798         (strace_marker_create_sals_from_location): Return a std::vector
6799         instead of symtabs_and_lines.
6800         (strace_marker_create_breakpoints_sal): Update.
6801         (strace_marker_decode_location): Return a std::vector instead of
6802         symtabs_and_lines.  Update.
6803         (update_breakpoint_locations): Change struct symtabs_and_lines
6804         parameters to gdb::array_view.  Adjust.
6805         (location_to_sals): Return a std::vector instead of
6806         symtabs_and_lines.  Update.
6807         (breakpoint_re_set_default): Use std::vector instead of struct
6808         symtabs_and_lines.
6809         (decode_location_default): Return a std::vector instead of
6810         symtabs_and_lines.  Update.
6811         * breakpoint.h: Include "common/array-view.h".
6812         (struct breakpoint_ops) <decode_location>: Now returns a
6813         std::vector instead of returning a symtabs_and_lines via output
6814         parameter.
6815         (update_breakpoint_locations): Change sals parameters to use
6816         gdb::array_view.
6817         * cli/cli-cmds.c (edit_command, list_command): Update to use
6818         std::vector and gdb::array_view.
6819         (ambiguous_line_spec): Adjust to use gdb::array_view and
6820         range-for.
6821         (compare_symtabs): Rename to ...
6822         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6823         const reference and adjust.
6824         (filter_sals): Rewrite using std::vector and standard algorithms.
6825         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6826         (jump_command): Update to use std::vector.
6827         * linespec.c (struct linespec_state) <canonical_names>: Update
6828         comment.
6829         (add_sal_to_sals_basic): Delete.
6830         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6831         (decode_line_2, create_sals_line_offset)
6832         (convert_address_location_to_sals, convert_linespec_to_sals)
6833         (convert_explicit_location_to_sals, parse_linespec)
6834         (event_location_to_sals, decode_line_full, decode_line_1)
6835         (decode_line_with_current_source)
6836         (decode_line_with_last_displayed, decode_objc)
6837         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6838         (linespec_result::~linespec_result): Adjust to use std::vector
6839         instead of symtabs_and_lines.
6840         * linespec.h (linespec_sals::sals): Now a std::vector.
6841         (struct linespec_result): Use std::vector, bool, and in-class
6842         initialization.
6843         (decode_line_1, decode_line_with_current_source)
6844         (decode_line_with_last_displayed): Return std::vector.
6845         * macrocmd.c (info_macros_command): Use std::vector.
6846         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6847         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6848         std::vector.
6849         * probe.h (parse_probes): Return a std::vector.
6850         * python/python.c (gdbpy_decode_line): Use std::vector and
6851         gdb::array_view.
6852         * source.c (select_source_symtab, line_info): Use std::vector.
6853         * stack.c (func_command): Use std::vector.
6854         * symtab.h (struct symtabs_and_lines): Delete.
6855         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6856
6857 2017-09-04  Pedro Alves  <palves@redhat.com>
6858
6859         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6860         unittests/array-view-selftests.c.
6861         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6862         * common/array-view.h: New file.
6863         * unittests/array-view-selftests.c: New file.
6864
6865 2017-09-04  Pedro Alves  <palves@redhat.com>
6866
6867         * cli/cli-cmds.c (edit_command): Pass message to
6868         ambiguous_line_spec.
6869         (list_command): Pass message to ambiguous_line_spec.  Say
6870         "first"/"last" instead of "start" and "end" to be consistent with
6871         the manual.
6872         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6873         them to print formatted message.
6874
6875 2017-09-04  Pedro Alves  <palves@redhat.com>
6876
6877         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6878         ftrace_update_insns by reference instead of pointer.
6879
6880 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6881
6882         * i386-go32-tdep.c: Include x86-xstate.h.
6883         (i386_go32_init_abi): Call i386_target_description.
6884         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6885         if xcr0 is X86_XSTATE_X87_MASK.
6886         * i386-tdep.h (tdesc_i386): Remove the declaration.
6887         (tdesc_i386_mmx): Likewise.
6888
6889 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6890
6891         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6892         X86_XSTATE_SSE_MASK instead of 0.
6893
6894 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6895
6896         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6897         i386_target_description.
6898         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6899         i386_target_description.
6900         * i386-tdep.c (i386_gdbarch_init): Likewise.
6901
6902 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6903
6904         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6905         (x86_darwin_init_abi_64): Call amd64_target_description.
6906         * amd64-dicos-tdep.c: Likewise.
6907         * amd64-fbsd-nat.c: Likewise.
6908         * amd64-fbsd-tdep.c: Likewise.
6909         * amd64-nbsd-tdep.c: Likewise.
6910         * amd64-obsd-tdep.c: Likewise.
6911         * amd64-sol2-tdep.c: Likewise.
6912         * amd64-windows-tdep.c: Likewise.
6913         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6914
6915 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6916
6917         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6918         (btrace_function) <insn>: Change type to use std::vector.
6919         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6920         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6921         ftrace_update_insns, ftrace_compute_global_level_offset,
6922         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6923         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6924         change to std::vector.
6925         (ftrace_update_insns): Adjust to change to std::vector, change
6926         type of INSN parameter.
6927         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6928         * record-btrace.c (btrace_call_history_insn_range,
6929         btrace_compute_src_line_range,
6930         record_btrace_frame_prev_register): Adjust to change to
6931         std::vector.
6932         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6933         to change to std::vector.
6934
6935 2017-09-03  Tom Tromey  <tom@tromey.com>
6936
6937         * corefile.c (reopen_exec_file): Use std::string.
6938
6939 2017-09-03  Tom Tromey  <tom@tromey.com>
6940
6941         * compile/compile.c (compile_register_name_mangled): Return
6942         std::string.
6943         * compile/compile-loc2c.c (pushf_register_address): Update.
6944         (pushf_register): Update.
6945         * compile/compile-c-types.c (convert_array): Update.
6946         * compile/compile-c-symbols.c (generate_vla_size): Update.
6947         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6948         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6949         (convert_one_symbol): Update.
6950         (generate_c_for_for_one_variable): Update.
6951         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6952         std::string.
6953         (generate_register_struct): Update.
6954         * compile/compile-internal.h (c_get_range_decl_name): Return a
6955         std::string.
6956         (compile_register_name_mangled): Return std::string.
6957
6958 2017-09-03  Tom Tromey  <tom@tromey.com>
6959
6960         * utils.c (perror_string): Return a std::string.
6961         (throw_perror_with_name, perror_warning_with_name): Update.
6962
6963 2017-09-03  Tom Tromey  <tom@tromey.com>
6964
6965         * demangle.c (demangle_command): Use std::string,
6966         unique_xmalloc_ptr.
6967
6968 2017-09-03  Tom Tromey  <tom@tromey.com>
6969
6970         * cli/cli-setshow.c (do_set_command): Use std::string.
6971
6972 2017-09-03  Tom Tromey  <tom@tromey.com>
6973
6974         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6975
6976 2017-09-03  Tom Tromey  <tom@tromey.com>
6977
6978         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6979
6980 2017-09-03  Tom Tromey  <tom@tromey.com>
6981
6982         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6983         gdb::unique_xmalloc_ptr.
6984
6985 2017-09-03  Tom Tromey  <tom@tromey.com>
6986
6987         * thread.c (print_thread_info_1): Use string_printf.
6988         (thread_apply_command, thread_apply_all_command): Use
6989         std::string.
6990
6991 2017-09-03  Tom Tromey  <tom@tromey.com>
6992
6993         * valprint.c (val_print_string): Update.
6994         * gdbcore.h (memory_error_message): Return std::string.
6995         * corefile.c (memory_error_message): Return std::string.
6996         (memory_error): Update.
6997         * breakpoint.c (insert_bp_location): Update.
6998
6999 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
7000
7001         * target/waitstatus.h (target_waitstatus_to_string): Change
7002         return type to std::string.
7003         * target/waitstatus.c (target_waitstatus_to_string): Return
7004         std::string.
7005         * target.h (target_waitstatus_to_string): Remove declaration.
7006         * infrun.c (resume, clear_proceed_status_thread,
7007         print_target_wait_results, do_target_wait, save_waitstatus,
7008         stop_all_threads): Adjust.
7009         * record-btrace.c (record_btrace_wait): Adjust.
7010         * target-debug.h
7011         (target_debug_print_struct_target_waitstatus_p): Adjust.
7012
7013 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
7014
7015         PR gdb/22046
7016         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7017         detection.
7018
7019 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
7020
7021         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7022         for setting/unsetting environment variables on the remote target.
7023         (New remote packets): Add entries for QEnvironmentHexEncoded,
7024         QEnvironmentUnset and QEnvironmentReset.
7025         * common/environ.c (gdb_environ::operator=): Extend method to
7026         handle m_user_set_env_list and m_user_unset_env_list.
7027         (gdb_environ::clear): Likewise.
7028         (match_var_in_string): Change type of first parameter from 'char
7029         *' to 'const char *'.
7030         (gdb_environ::set): Extend method to handle
7031         m_user_set_env_list and m_user_unset_env_list.
7032         (gdb_environ::unset): Likewise.
7033         (gdb_environ::clear_user_set_env): New method.
7034         (gdb_environ::user_set_envp): Likewise.
7035         (gdb_environ::user_unset_envp): Likewise.
7036         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7037         m_user_unset_env_list on move constructor/assignment.
7038         (unset): Add new default parameter 'update_unset_list = true'.
7039         (clear_user_set_env): New method.
7040         (user_set_envp): Likewise.
7041         (user_unset_envp): Likewise.
7042         (m_user_set_env_list): New std::set.
7043         (m_user_unset_env_list): Likewise.
7044         * common/rsp-low.c (hex2str): New function.
7045         (bin2hex): New overload for bin2hex function.
7046         * common/rsp-low.c (hex2str): New prototype.
7047         (str2hex): New overload prototype.
7048         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7049         QEnvironmentUnset and QEnvironmentReset.
7050         (remote_protocol_features): Add QEnvironmentHexEncoded,
7051         QEnvironmentUnset and QEnvironmentReset packets.
7052         (send_environment_packet): New function.
7053         (extended_remote_environment_support): Likewise.
7054         (extended_remote_create_inferior): Call
7055         extended_remote_environment_support.
7056         (_initialize_remote): Add QEnvironmentHexEncoded,
7057         QEnvironmentUnset and QEnvironmentReset packet configs.
7058         * unittests/environ-selftests.c (gdb_selftest_env_var):
7059         New variable.
7060         (test_vector_initialization): New function.
7061         (test_init_from_host_environ): Likewise.
7062         (test_reinit_from_host_environ): Likewise.
7063         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7064         Likewise.
7065         (test_unset_set_empty_vector): Likewise.
7066         (test_vector_clear): Likewise.
7067         (test_std_move): Likewise.
7068         (test_move_constructor):
7069         (test_self_move): Likewise.
7070         (test_set_unset_reset): Likewise.
7071         (run_tests): Rewrite in terms of the functions above.
7072
7073 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
7074
7075         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7076         (adi_available): Use a temp variable of type CORE_ADDR as argument
7077         3 when calling target_auxv_search.
7078         (adi_normalize_address): Use masks and xor operators to calculate
7079         normalized address.
7080         (adi_read_versions, adi_write_versions, adi_print_versions)
7081         (do_examine, do_assign): Use paddress.
7082
7083 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
7084
7085         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7086         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7087         out of loop and add supply of FIR.
7088         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7089         add collect of FIR.
7090
7091 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
7092
7093         PR gdb/21827
7094         * cli/cli-script.c (define_command): Don't convert command name
7095         to lower case.
7096
7097 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
7098
7099         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7100         Update all callers accordingly. Remove all code blocks handling
7101         the case where DISPP is not NULL.
7102
7103 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7104
7105         PR symtab/22003
7106         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7107         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7108         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7109
7110 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7111
7112         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7113         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7114         (read_comp_units_from_section): New parameter abbrev_section, use
7115         read_and_check_comp_unit_head, allocate signatured_type if needed.
7116         (create_all_comp_units): Update read_comp_units_from_section caller.
7117
7118 2017-08-23  Pedro Alves  <palves@redhat.com>
7119
7120         PR remote/21852
7121         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7122         to null_ptid and switch to thread without reading the registers
7123         after adding the inferior.
7124
7125 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7126
7127         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7128         compile-gcc.
7129         * compile/compile.c (compile_gcc, show_compile_gcc): New.
7130         (compile_to_object): Implement compile_gcc.
7131         (_initialize_compile): Install "set compile-gcc".  Initialize
7132         compile_gcc.
7133
7134 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7135
7136         * compile/compile.c (compile_to_object): Conditionally call
7137         set_verbose.  Conditionally call compile or compile_v0.
7138
7139 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
7140
7141         * sparc64-tdep.h: (adi_normalize_address): New export.
7142         * sparc-nat.h: (open_adi_tag_fd): New export.
7143         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7144         * sparc64-linux-tdep.c:
7145         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7146         (sparc64_linux_handle_segmentation_fault): New function.
7147         (sparc64_linux_init_abi): Register
7148         sparc64_linux_handle_segmentation_fault
7149         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7150         (sparc64_addr_bits_remove): New function.
7151         (sparc64_init_abi): Register sparc64_addr_bits_remove.
7152         (MAX_PROC_NAME_SIZE): New macro.
7153         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7154         (sparc64adilist): New variable.
7155         (adi_proc_list): New variable.
7156         (find_adi_info): New function.
7157         (add_adi_info): New function.
7158         (get_adi_info_proc): New function.
7159         (get_adi_info): New function.
7160         (info_adi_command): New function.
7161         (read_maps_entry): New function.
7162         (adi_available): New function.
7163         (adi_normalize_address): New function.
7164         (adi_align_address): New function.
7165         (adi_convert_byte_count): New function.
7166         (adi_tag_fd): New function.
7167         (adi_is_addr_mapped): New function.
7168         (adi_read_versions): New function.
7169         (adi_write_versions): New function.
7170         (adi_print_versions): New function.
7171         (do_examine): New function.
7172         (do_assign): New function.
7173         (adi_examine_command): New function.
7174         (adi_assign_command): New function.
7175         (_initialize_sparc64_adi_tdep): New function.
7176
7177 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
7178
7179         * breakpoint.c (breakpoints_info): Rename to ...
7180         (info_breakpoints_command): ... this.
7181         (watchpoints_info): Rename to ...
7182         (info_watchpoints_command): ... this.
7183         (tracepoints_info): Rename to ...
7184         (info_tracepoints_command): ... this.
7185         (_initialize_breakpoint): Adjust.
7186         * dcache.c (dcache_info): Rename to ...
7187         (info_display_command): ... this.
7188         (_initialize_dcache): Adjust.
7189         * frame.h (args_info): Rename to ...
7190         (info_args_command): ... this.
7191         (locals_info): Rename to ...
7192         (info_locals_command): ... this.
7193         * infcmd.c (nofp_registers_info): Rename to ...
7194         (info_registers_command): ... this.
7195         (float_info): Rename to ...
7196         (info_float_command): ... this.
7197         (program_info): Rename to ...
7198         (info_program_command): ... this.
7199         (all_registers_info): Rename to ...
7200         (info_all_registers_command): ... this.
7201         (vector_info): Rename to ...
7202         (info_vector_command): ... this.
7203         (float_info): Rename to ...
7204         (info_float_command): ... this.
7205         (_initialize_infcmd): Adjust.
7206         * inferior.h (term_info): Rename to ...
7207         (info_terminal_command): ... this.
7208         * inflow.c (term_info): Rename to ...
7209         (info_terminal_command): ... this.
7210         (_initialize_inflow): Adjust.
7211         * infrun.c (signals_info): Rename to ...
7212         (info_signals_command): ... this.
7213         (_initialize_infrun): Adjust.
7214         * objc-lang.c (classes_info): Rename to ...
7215         (info_classes_command): ... this.
7216         (selectors_info): Rename to ...
7217         (info_selectors_command): ... this.
7218         (_initialize_objc_language): Adjust.
7219         * printcmd.c (sym_info): Rename to ...
7220         (info_symbol_command): ... this.
7221         (address_info): Rename to ...
7222         (info_address_command): ... this.
7223         (display_info): Rename to ...
7224         (info_display_command): ... this.
7225         (_initialize_printcmd): Adjust.
7226         * reverse.c (bookmarks_info): Rename to ...
7227         (info_breakpoints_command): ... this.
7228         (_initialize_reverse): Adjust.
7229         * ser-go32.c (dos_info): Rename to ...
7230         (info_serial_command): ... this.
7231         (_initialize_ser_dos): Adjust.
7232         * skip.c (skip_info): Rename to ...
7233         (info_skip_command): ... this.
7234         (_initialize_step_skip): Adjust.
7235         * source.c (line_info): Rename to ...
7236         (info_line_command): ... this.
7237         (source_info): Rename to ...
7238         (info_source_command)
7239         * stack.c (frame_info): Rename to ...
7240         (info_frame_command): ... this.
7241         (locals_info): Rename to ...
7242         (info_locals_command): ... this.
7243         (args_info): Rename to ...
7244         (info_args_command): ... this.
7245         (_initialize_stack): Adjust.
7246         * symtab.c (sources_info): Rename to ...
7247         (info_sources_command): ... this.
7248         (variables_info): Rename to ...
7249         (info_variables_command): ... this.
7250         (functions_info): Rename to ...
7251         (info_functions_command): ... this.
7252         (types_info): Rename to ...
7253         (info_types_command): ... this.
7254         (_initialize_symtab): Adjust.
7255         * target.c (target_info): Rename to ...
7256         (info_target_command): ... this.
7257         (initialize_targets): Adjust.
7258         * tracepoint.c (tvariables_info): Rename to ...
7259         (info_tvariables_command): ... this.
7260         (scope_info): Rename to ...
7261         (info_scope_command): ... this.
7262         (trace_dump_actions): Adjust.
7263         (_initialize_tracepoint): Adjust.
7264
7265 2017-08-22  Tom Tromey  <tom@tromey.com>
7266
7267         * breakpoint.h (install_breakpoint): Update.
7268         * breakpoint.c (add_solib_catchpoint): Update.
7269         (install_breakpoint): Change argument to a std::unique_ptr.
7270         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7271         (create_breakpoint_sal, create_breakpoint): Update.
7272         (watch_command_1, catch_exec_command_1)
7273         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7274         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7275         Return the breakpoint.
7276         (set_raw_breakpoint_without_location, set_raw_breakpoint)
7277         (new_single_step_breakpoint): Update.
7278         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7279         std::unique_ptr.
7280         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7281         std::unique_ptr.
7282         * break-catch-sig.c (create_signal_catchpoint): Use
7283         std::unique_ptr.
7284         * ada-lang.c (create_ada_exception_catchpoint): Use
7285         std::unique_ptr.
7286
7287 2017-08-22  Tom Tromey  <tom@tromey.com>
7288
7289         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7290
7291 2017-08-22  Tom Tromey  <tom@tromey.com>
7292
7293         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7294         (lookup_partial_symbol): Update.
7295
7296 2017-08-22  Tom Tromey  <tom@tromey.com>
7297
7298         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7299         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7300         (find_and_open_source, symtab_to_fullname): Update.
7301         * psymtab.c (psymtab_to_fullname): Update.
7302
7303 2017-08-22  Tom Tromey  <tom@tromey.com>
7304
7305         * exec.c (exec_file_attach): Update.
7306         * linux-thread-db.c (try_thread_db_load): Update.
7307         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7308         * utils.c (gdb_realpath): Change return type.
7309         (gdb_realpath_keepfile): Update.
7310         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7311         (_initialize_utils): Register the new self test.
7312         * source.c (openp): Update.
7313         (find_and_open_source): Update.
7314         * nto-tdep.c (nto_find_and_open_solib): Update.
7315         * main.c (set_gdb_data_directory): Update.
7316         (captured_main_1): Update.
7317         * dwarf2read.c (dwarf2_get_dwz_file): Update
7318         (dw2_map_symbol_filenames): Update.
7319         * auto-load.c (auto_load_safe_path_vec_update): Update.
7320         (filename_is_in_auto_load_safe_path_vec): Change type of
7321         "filename_realp".
7322         (auto_load_objfile_script): Update.
7323         (file_is_auto_load_safe): Update.  Use std::string.
7324         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7325
7326 2017-08-22  Tom Tromey  <tom@tromey.com>
7327
7328         * utils.c (gdb_realpath_keepfile): Return a
7329         gdb::unique_xmalloc_ptr.
7330         * exec.c (exec_file_attach): Update.
7331         * utils.h (gdb_realpath_keepfile): Return a
7332         gdb::unique_xmalloc_ptr.
7333
7334 2017-08-22  Tom Tromey  <tom@tromey.com>
7335
7336         * compile/compile.c (compile_file_command): Use
7337         gdb::unique_xmalloc_ptr, std::string.
7338         * utils.c (gdb_abspath): Change return type.
7339         * source.c (openp): Update.
7340         * objfiles.c (allocate_objfile): Update.
7341         * main.c (set_gdb_data_directory): Update.
7342         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7343
7344 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
7345
7346         * cli-cmds.c (list_commands): List actual code around more than
7347         one location.
7348
7349 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
7350
7351         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7352
7353 2017-08-21  Pedro Alves  <palves@redhat.com>
7354
7355         PR gdb/19487
7356         * c-exp.y (variable production): Handle function aliases.
7357         * minsyms.c (msymbol_is_text): New function.
7358         * minsyms.h (msymbol_is_text): Declare.
7359         * symtab.c (find_function_alias_target): New function.
7360         * symtab.h (find_function_alias_target): Declare.
7361
7362 2017-08-21  Pedro Alves  <palves@redhat.com>
7363
7364         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7365         typedefs.
7366         * typeprint.c (whatis_exp): If handling "whatis", and expression
7367         is OP_TYPE, strip one typedef level.  Otherwise don't strip
7368         typedefs here.
7369         * valops.c (value_cast): Save "to" type before resolving
7370         stubs/typedefs.  Use that type as resulting value's type.
7371
7372 2017-08-18  Tom Tromey  <tom@tromey.com>
7373             Pedro Alves  <palves@redhat.com>
7374
7375         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7376         * sol-thread.c (sol_thread_resume, sol_thread_wait)
7377         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7378         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7379         * proc-service.c (ps_xfer_memory): Use scoped_restore.
7380         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7381         (linux_get_siginfo_data): Add "thread" argument.  Use
7382         scoped_restore.
7383         * linux-nat.c (linux_child_follow_fork)
7384         (check_stopped_by_watchpoint): Use scoped_restore.
7385         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7386         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7387         (restore_inferior_ptid, save_inferior_ptid): Remove.
7388         * btrace.c (btrace_fetch): Use scoped_restore.
7389         * bsd-uthread.c (bsd_uthread_fetch_registers)
7390         (bsd_uthread_store_registers): Use scoped_restore.
7391         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7392         scoped_restore.
7393         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7394         (aix_thread_xfer_partial): Use scoped_restore.
7395         * inferior.h (save_inferior_ptid): Remove.
7396
7397 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7398
7399         PR tdep/21818
7400         * arm-tdep.c (gdb_print_insn_arm): Mark
7401         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7402
7403 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7404
7405         * NEWS: Mention GDBserver's new option "--selftest".
7406         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7407         * selftest.c: Move it to common/selftest.c.
7408         * selftest.h: Move it to common/selftest.h.
7409         * selftest-arch.c (reset): New function.
7410         (tests_with_arch): Call reset.
7411
7412 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7413
7414         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7415         instead of exception_fprintf and printf_filtered.
7416
7417 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7418
7419         * selftest.c (register_self_test): Rename it to
7420         selftests::register_test.
7421         (run_self_tests): selftest::run_tests.
7422         * selftest.h: Update declarations.
7423         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7424         selftests::register_test_foreach_arch.
7425         * selftest-arch.h: Update declaration.
7426         * aarch64-tdep.c: Update.
7427         * arm-tdep.c: Likewise.
7428         * disasm-selftests.c: Likewise.
7429         * dwarf2loc.c: Likewise.
7430         * dwarf2-frame.c: Likewise.
7431         * findvar.c: Likewise.
7432         * gdbarch-selftests.c: Likewise.
7433         * maint.c (maintenance_selftest): Likewise.
7434         * regcache.c: Likewise.
7435         * rust-exp.y: Likewise.
7436         * selftest-arch.c: Likewise.
7437         * unittests/environ-selftests.c: Likewise.
7438         * unittests/function-view-selftests.c: Likewise.
7439         * unittests/offset-type-selftests.c: Likewise.
7440         * unittests/optional-selftests.c: Likewise.
7441         * unittests/scoped_restore-selftests.c: Likewise.
7442         * utils-selftests.c: Likewise.
7443
7444 2017-08-17  Pedro Alves  <palves@redhat.com>
7445
7446         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7447         local.
7448
7449 2017-08-17  Pedro Alves  <palves@redhat.com>
7450
7451         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7452         field.
7453         (reset_die_in_process): Delete, replaced by ...
7454         (process_die_scope): ... this new class.  Make it responsible for
7455         freeing cu->line_header too.
7456         (process_die): Use process_die_scope.
7457         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7458         cu->line_header_die_owner.  Don't release the line header if it's
7459         owned by the CU.
7460         (setup_type_unit_groups): Make the CU/DIE own the line header.
7461         Don't release the line header here.
7462
7463 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7464
7465         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7466
7467 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7468
7469         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7470         Single-Key mode
7471
7472 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7473
7474         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7475         mode command list.
7476
7477 2017-08-15  Stafford Horne  <shorne@gmail.com>
7478
7479         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7480
7481 2017-08-15  Stafford Horne  <shorne@gmail.com>
7482
7483         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7484
7485 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7486
7487         PR gdb/21954
7488         * infcmd.c (unset_environment_command): Use the 'clear' method on
7489         the environment instead of resetting it.
7490
7491 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7492
7493         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7494         platforms.
7495
7496 2017-08-14  Tom Tromey  <tom@tromey.com>
7497
7498         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7499         (print_binary_chars): Likewise.
7500         (BITS_IN_BYTES): Remove.
7501
7502 2017-08-14  Tom Tromey  <tom@tromey.com>
7503
7504         PR gdb/21675
7505         * valprint.c (LOW_ZERO): Change value to 034.
7506         (print_octal_chars): Add static_asserts for octal constants.
7507         * printcmd.c (print_scalar_formatted): Add 'd' case.
7508
7509 2017-08-11  Tom Tromey  <tom@tromey.com>
7510
7511         * symfile.c (add_symbol_file_command): Use std::vector.
7512
7513 2017-08-14  Tom Tromey  <tom@tromey.com>
7514
7515         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7516         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7517         std::move.
7518         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7519
7520 2017-08-11  Pedro Alves  <palves@redhat.com>
7521
7522         * infrun.c (process_event_stop_test): Adjust
7523         function_name_is_marked_for_skip call.
7524         * skip.c: Include <list>.
7525         (skiplist_entry): Make it a class with private fields, and
7526         getters/setters.
7527         (skiplist_entry_chain): Delete.
7528         (skiplist_entries): New.
7529         (skiplist_entry_count): Delete.
7530         (highest_skiplist_entry_num): New.
7531         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7532         (add_skiplist_entry): Delete.
7533         (skiplist_entry::skiplist_entry): New.
7534         (skiplist_entry::add_entry): New.
7535         (skip_file_command, skip_function): Adjust.
7536         (compile_skip_regexp): Delete.
7537         (skip_command): Don't compile regexp here.  Adjust to use
7538         skiplist_entry::add_entry.
7539         (skip_info): Adjust to use range-for and getters.
7540         (skip_enable_command, skip_disable_command): Adjust to use
7541         range-for and setters.
7542         (skip_delete_command): Adjust to use std::list.
7543         (add_skiplist_entry): Delete.
7544         (skip_file_p): Delete, refactored as ...
7545         (skiplist_entry::do_skip_file_p): ... this new method.
7546         (skip_gfile_p): Delete, refactored as ...
7547         (skiplist_entry::do_gskip_file_p): ... this new method.
7548         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7549         (skiplist_entry::skip_function_p): ... this new method.
7550         (function_name_is_marked_for_skip): Now returns bool, and takes
7551         the function sal by const reference.  Adjust to use range-for and
7552         skiplist_entry methods.
7553         (_initialize_step_skip): Remove references to
7554         skiplist_entry_chain, skiplist_entry_count.
7555         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7556         takes the function sal by const reference.
7557
7558 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7559
7560         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7561         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7562         (dwarf2_frame_cache):
7563         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7564         RETURN_MASK_ALL and set *this_case to NULL.
7565         * frame-unwind.h: Update comments.
7566
7567 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7568
7569         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7570         (dwarf2_frame_state_copy_regs): Remove.
7571         (dwarf2_frame_state_free_regs): Remove.
7572         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7573         (dwarf2_restore_rule): Call method .alloc_regs instead of
7574         dwarf2_frame_state_alloc_regs.
7575         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7576         constructor.  Call std::move.
7577         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7578         (dwarf2_frame_cache): Likewise.
7579
7580         [GDB_SELF_TEST]: Include selftest.h and
7581         selftest-arch.h.
7582         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7583         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7584         execute_cfa_program_test.
7585
7586         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7587         copy ctor, assignment operator, move assignment.
7588         <alloc_regs>: New method.
7589         <swap>: New method.
7590         (struct dwarf2_frame_state): Delete dtor.
7591         (dwarf2_frame_state_alloc_regs): Remove declaration.
7592         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7593         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7594
7595 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7596
7597         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7598         (dwarf2_frame_state::dwarf2_frame_state): New.
7599         (dwarf2_frame_state::~dwarf2_frame_state): New.
7600         (dwarf2_fetch_cfa_info): Update.
7601         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7602         rather than a pointer.  Update code.
7603         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7604         dtor.
7605         <data_align, code_align, retaddr_column>: Change them to const.
7606         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7607         to bool.
7608
7609 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7610
7611         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7612         <loc.exp>: New field.
7613         * dwarf2-frame.c (execute_cfa_program): Update.
7614         (dwarf2_frame_prev_register): Update.
7615
7616 2017-08-10  Pedro Alves  <palves@redhat.com>
7617
7618         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7619
7620 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7621
7622         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7623         (fbsd_pending_children): Use std::list.
7624         (fbsd_remember_child): Likewise.
7625         (fbsd_is_child_pending): Likewise.
7626         (fbsd_pending_vfork_done): Use std::forward_list.
7627         (fbsd_add_vfork_done): Likewise.
7628         (fbsd_is_vfork_done_pending): Likewise.
7629         (fbsd_next_vfork_done): Likewise.
7630
7631 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7632
7633         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7634         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7635         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7636         for `mapfilename'.
7637         (fbsd_xfer_partial): Use gdb::byte_vector.
7638         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7639
7640 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7641
7642         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7643         "filestuff.h".
7644         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7645
7646 2017-08-09  Tom Tromey  <tom@tromey.com>
7647
7648         * skip.c (skiplist_entry): New constructor.
7649         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7650         (skiplist_entry::file_is_glob): Now bool.
7651         (skiplist_entry::file, skiplist_entry::function): Now
7652         std::string.
7653         (make_skip_entry): Return a unique_ptr.  Use new.
7654         (free_skiplist_entry, free_skiplist_entry_cleanup)
7655         (make_free_skiplist_entry_cleanup): Remove.
7656         (skip_command, skip_disable_command, add_skiplist_entry)
7657         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7658         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7659         (function_name_is_marked_for_skip): Update.
7660         (skip_delete_command): Update.  Use delete.
7661
7662 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7663
7664         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7665         (aarch64_linux_core_read_description): New function.
7666         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7667
7668 2017-08-09  Pedro Alves  <palves@redhat.com>
7669
7670         * cp-name-parser.y (cp_comp_to_string): Return a
7671         gdb::unique_xmalloc_ptr<char>.
7672         * cp-support.c (replace_typedefs_qualified_name)
7673         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7674         (cp_canonicalize_string_full): Use op= instead of explicit
7675         convertion.
7676         (cp_class_name_from_physname, method_name_from_physname)
7677         (cp_func_name, cp_remove_params): Adjust to use
7678         gdb::unique_xmalloc_ptr<char>.
7679         * cp-support.h (cp_comp_to_string): Return a
7680         gdb::unique_xmalloc_ptr<char>.
7681         * python/py-type.c (typy_lookup_type): Adjust to use
7682         gdb::unique_xmalloc_ptr<char>.
7683
7684 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7685
7686         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7687
7688 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7689             Yao Qi  <yao.qi@linaro.org>
7690
7691         * cp-support.c (cp_canonicalize_string_full): Use
7692         gdb::unique_xmalloc_ptr<char>.
7693         (cp_canonicalize_string): Likewise.
7694
7695 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7696
7697         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7698         * regformats/i386/amd64-avx-avx512.dat: Remove.
7699         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7700         * regformats/i386/amd64-avx-mpx.dat:Remove.
7701         * regformats/i386/amd64-avx.dat: Remove.
7702         * regformats/i386/amd64-mpx.dat: Remove.
7703         * regformats/i386/i386-avx-avx512.dat: Remove.
7704         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7705         * regformats/i386/i386-avx-mpx.dat: Remove.
7706         * regformats/i386/i386-mmx.dat: Remove.
7707         * regformats/i386/i386-mpx.dat: Remove.
7708
7709 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7710
7711         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7712         * amd64-tdep.c: Don't include features/i386/x32*.c.
7713         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7714         functions.
7715         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7716         and i386/x32-avx-avx512.
7717         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7718         and i386/x32.xml.
7719         * features/i386/x32-avx-avx512.c: Removed.
7720         * features/i386/x32-avx-avx512.xml: Removed.
7721         * features/i386/x32-avx.c: Removed.
7722         * features/i386/x32-avx.xml: Removed.
7723         * features/i386/x32.c: Removed.
7724         * features/i386/x32.xml: Removed.
7725         * regformats/i386/x32-avx-avx512.dat: Removed.
7726         * regformats/i386/x32-avx.dat: Removed.
7727         * regformats/i386/x32.dat: Removed.
7728
7729 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7730
7731         PR breakpoints/21886
7732         * mem-break.c (default_memory_insert_breakpoint): Use
7733         `->placed_address' rather than `->reqstd_address' for the
7734         breakpoint location.
7735
7736 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7737
7738         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7739         assertions.
7740
7741 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7742
7743         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7744         a union of `tdep_info', `tdesc_data' and `id'.
7745         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7746         rather than `info.tdep_info'.
7747         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7748         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7749         * i386-tdep.c (i386_gdbarch_init): Likewise.
7750         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7751         * mips-tdep.c (mips_gdbarch_init): Likewise.
7752         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7753         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7754         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7755         `info.tdep_info'.
7756         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7757         `info.tdep_info'.
7758         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7759         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7760         `info.tdep_info'.
7761         * spu-tdep.c (spu_gdbarch_init): Likewise.
7762         * gdbarch.h: Regenerate.
7763
7764 2017-08-07  Leszek Swirski  <leszeks@google.com>
7765
7766         PR symtab/20899
7767         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7768
7769 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7770
7771         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7772         (gdbsim_open): Rename gdb_argv args object to argv.
7773
7774 2017-08-05  Tom Tromey  <tom@tromey.com>
7775
7776         * compile/compile-object-load.c (compile_object_load): Use
7777         gdb::unique_xmalloc_ptr.
7778         * cli/cli-dump.c (scan_filename): Rename from
7779         scan_filename_with_cleanup.  Change return type.
7780         (scan_expression): Rename from scan_expression_with_cleanup.
7781         Change return type.
7782         (dump_memory_to_file, dump_value_to_file, restore_command):
7783         Use gdb::unique_xmalloc_ptr.  Update.
7784         * cli/cli-cmds.c (find_and_open_script): Use
7785         gdb::unique_xmalloc_ptr.
7786         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7787         * symmisc.c (maintenance_print_symbols)
7788         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7789         * symfile.c (symfile_bfd_open, generic_load)
7790         (add_symbol_file_command, remove_symbol_file_command): Use
7791         gdb::unique_xmalloc_ptr.
7792         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7793         * psymtab.c (maintenance_print_psymbols): Use
7794         gdb::unique_xmalloc_ptr.
7795         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7796         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7797         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7798         (reload_shared_libraries_1): Likewise.
7799
7800 2017-08-05  Tom Tromey  <tom@tromey.com>
7801
7802         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7803         (rust_op_vector, rust_set_vector): New typedefs.
7804         (current_parser): New global.
7805         (work_obstack): Change to pointer type.  Update all users.
7806         (rust_ast, pstate): Remove globals.
7807         (struct rust_parser): New.
7808         (%union) <params, field_inits>: Change type.
7809         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7810         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7811         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7812         (convert_params_to_types, convert_params_to_expression): Change
7813         type of "params".
7814         (ast_string): Change type of "fields".
7815         (rust_parse): Make a rust_parser.  Remove cleanups.
7816         (rust_lex_tests): Make and install an auto_obstack.
7817
7818 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7819
7820         * configure.srv (ipa_x32_linux_regobj): New.
7821         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7822         instead of X86_TDESC_AVX512.
7823         (initialize_low_tracepoint): Call
7824         init_registers_x32_avx_avx512_linux.
7825
7826 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7827
7828         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7829
7830 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7831
7832         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7833
7834 2017-08-03  Tom Tromey  <tom@tromey.com>
7835
7836         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7837         Remove.
7838         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7839
7840 2017-08-03  Tom Tromey  <tom@tromey.com>
7841
7842         * python/py-param.c (compute_enum_values): Use gdb_argv.
7843
7844 2017-08-03  Tom Tromey  <tom@tromey.com>
7845
7846         * utils.h (struct gdb_argv_deleter): New.
7847         (gdb_argv): New class.
7848         * utils.c (gdb_argv::reset): New method.
7849         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7850         * tracefile.c (tsave_command): Use gdb_argv.
7851         * top.c (new_ui_command): Use gdb_argv.
7852         * symmisc.c (maintenance_print_symbols)
7853         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7854         * symfile.c (symbol_file_command, generic_load)
7855         (remove_symbol_file_command): Use gdb_argv.
7856         * stack.c (backtrace_command): Use gdb_argv.
7857         * source.c (add_path, show_substitute_path_command)
7858         (unset_substitute_path_command, set_substitute_path_command):
7859         Use gdb_argv.
7860         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7861         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7862         * remote.c (extended_remote_run, remote_put_command)
7863         (remote_get_command, remote_delete_command): Use gdb_argv.
7864         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7865         (gdbsim_open): Use gdb_argv.
7866         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7867         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7868         * procfs.c (procfs_info_proc): Use gdb_argv.
7869         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7870         * infrun.c (handle_command): Use gdb_argv.
7871         * inferior.c (add_inferior_command, clone_inferior_command):
7872         Use gdb_argv.
7873         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7874         * exec.c (exec_file_command): Use gdb_argv.
7875         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7876         * compile/compile.c (build_argc_argv): Use gdb_argv.
7877
7878 2017-08-03  Tom Tromey  <tom@tromey.com>
7879
7880         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7881
7882 2017-08-03  Tom Tromey  <tom@tromey.com>
7883
7884         * python/python.c (compute_python_string): Return std::string.
7885         (gdbpy_eval_from_control_command): Update.
7886         (do_start_initialization): Use std::string.
7887         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7888         xstrprintf.
7889         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7890         xstrprintf.
7891
7892 2017-08-03  Tom Tromey  <tom@tromey.com>
7893
7894         * top.h (do_restore_instream_cleanup): Remove.
7895         * top.c (do_restore_instream_cleanup): Remove.
7896         (read_command_file): Use scoped_restore.
7897         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7898
7899 2017-08-03  Tom Tromey  <tom@tromey.com>
7900
7901         * cli/cli-script.c (execute_user_command)
7902         (execute_control_command): Use scoped_restore.
7903
7904 2017-08-03  Tom Tromey  <tom@tromey.com>
7905
7906         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7907         (execute_user_command): Remove user_call_depth; use
7908         user_args_stack's size instead.
7909
7910 2017-08-03  Tom Tromey  <tom@tromey.com>
7911
7912         * top.h (in_user_command): Remove.
7913         * top.c (in_user_command): Remove.
7914         * cli/cli-script.c (do_restore_user_call_depth)
7915         (execute_user_command): Update.
7916
7917 2017-08-03  Tom Tromey  <tom@tromey.com>
7918
7919         * valops.c (search_struct_method): Use gdb::byte_vector.
7920         * valarith.c (value_concat): Use std::vector.
7921         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7922         (simple_search_memory): Likewise.
7923         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7924         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7925         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7926         * elfread.c (elf_rel_plt_read): Use std::string.
7927         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7928         * cli/cli-dump.c (restore_section_callback): Use
7929         gdb::byte_vector.
7930
7931 2017-08-03  Tom Tromey  <tom@tromey.com>
7932
7933         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7934
7935 2017-08-03  Tom Tromey  <tom@tromey.com>
7936
7937         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7938         (tui_register_format): Use scoped_restore.
7939
7940 2017-08-03  Tom Tromey  <tom@tromey.com>
7941
7942         * reverse.c (exec_direction_default): Remove.
7943         (exec_reverse_once): Use scoped_restore.
7944         * remote.c (restore_remote_timeout): Remove.
7945         (remote_flash_erase, remote_flash_write, remote_flash_done)
7946         (readchar, remote_serial_write): Use scoped_restore.
7947         * cli/cli-script.c (struct source_cleanup_lines_args)
7948         (source_cleanup_lines): Remove.
7949         (script_from_file): Use scoped_restore.
7950         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7951         (source_command): Use scoped_restore.
7952
7953 2017-08-03  Tom Tromey  <tom@tromey.com>
7954
7955         * utils.h (make_cleanup_free_so): Remove.
7956         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7957         * solist.h (struct so_deleter): New.
7958         (so_list_up): New typedef.
7959         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7960
7961 2017-08-03  Tom Tromey  <tom@tromey.com>
7962
7963         * utils.h (make_cleanup_restore_current_language): Remove.
7964         * utils.c (do_restore_current_language)
7965         (make_cleanup_restore_current_language): Remove.
7966         * parse.c (parse_exp_in_context_1)
7967         (parse_expression_with_language): Use
7968         scoped_restore_current_language.
7969         * mi/mi-main.c (mi_cmd_execute): Use
7970         scoped_restore_current_language.
7971         * language.h (scoped_restore_current_language): New class.
7972
7973 2017-08-03  Tom Tromey  <tom@tromey.com>
7974
7975         * compile/compile.c (cleanup_unlink_file): Remove.
7976         (compile_to_object): Use gdb::unlinker.
7977         (eval_compile_command): Likewise.
7978
7979 2017-08-03  Tom Tromey  <tom@tromey.com>
7980
7981         * utils.h (make_cleanup_fclose): Remove.
7982         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7983
7984 2017-08-03  Tom Tromey  <tom@tromey.com>
7985
7986         * top.c (open_terminal_stream): Return gdb_file_up.
7987         (new_ui_command): Update.
7988
7989 2017-08-03  Tom Tromey  <tom@tromey.com>
7990
7991         * source.c (print_source_lines_base, forward_search_command)
7992         (reverse_search_command): Use gdb_file_up.
7993
7994 2017-08-03  Tom Tromey  <tom@tromey.com>
7995
7996         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7997
7998 2017-08-03  Tom Tromey  <tom@tromey.com>
7999
8000         * cli/cli-cmds.c (find_and_open_script): Change return type.
8001         Remove "streamp" and "full_path" parameters.
8002         (source_script_with_search): Update.
8003         * auto-load.c (source_script_file): Update.
8004         * cli/cli-cmds.h (find_and_open_script): Change type.
8005         (open_script): New struct.
8006
8007 2017-08-03  Tom Tromey  <tom@tromey.com>
8008
8009         * xml-support.c (xml_fetch_content_from_file): Update.
8010         * ui-file.c (stdio_file::open): Update.
8011         * tracefile-tfile.c (tfile_start): Update.
8012         * remote.c (remote_file_put, remote_file_get): Update.
8013         * nat/linux-procfs.c (linux_proc_get_int)
8014         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8015         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8016         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8017         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8018         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8019         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8020         * linux-nat.c (linux_proc_pending_signals): Update.
8021         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8022         (file_closer): Remove.
8023         * compile/compile.c (compile_to_object): Update.
8024         * common/filestuff.h (struct gdb_file_deleter): New.
8025         (gdb_file_up): New typedef.
8026         (gdb_fopen_cloexec): Change return type.
8027         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8028         * cli/cli-dump.c (fopen_with_cleanup): Remove.
8029         (dump_binary_file, restore_binary_file): Update.
8030         * auto-load.c (auto_load_objfile_script_1): Update.
8031
8032 2017-08-03  Tom Tromey  <tom@tromey.com>
8033
8034         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8035         (info_static_tracepoint_markers_command): Likewise.
8036         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8037         * skip.c (skip_info): Use ui_out_emit_table.
8038         * progspace.c (print_program_space): Use ui_out_emit_table.
8039         * osdata.c (info_osdata): Use ui_out_emit_table.
8040         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8041         ui_out_emit_table.
8042         * linux-thread-db.c (info_auto_load_libthread_db): Use
8043         ui_out_emit_table.
8044         * inferior.c (print_inferior): Use ui_out_emit_table.
8045         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8046         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8047         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8048         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8049         * ui-out.h (class ui_out_emit_table): New.
8050
8051 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
8052
8053         * mips-tdep.c (mips_fpu_type_str): New function.
8054         (mips_dump_tdep): Call it.
8055
8056 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
8057
8058         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8059         `->mips_fpu_type'.
8060
8061 2017-07-31  Xavier Roirand  <roirand@adacore.com>
8062
8063         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8064
8065 2017-07-27  Xavier Roirand  <roirand@adacore.com>
8066
8067         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8068
8069 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8070
8071         * cli/cli-cmds.c (maintenancechecklist): New variable.
8072         * gdbcmd.h (maintenancechecklist): Declare it.
8073         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8074         Call i386_linux_read_description with different masks.
8075         * maint.c (maintenance_check_command): New function.
8076         (_initialize_maint_cmds): Call add_prefix_cmd.
8077         * target-descriptions.c (tdesc_reg): override operator != and ==.
8078         (tdesc_type): Likewise.
8079         (tdesc_feature): Likewise.
8080         (target_desc): Likewise.
8081         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8082         (maintenance_check_xml_descriptions): New function.
8083         (_initialize_target_descriptions) Add command "xml-descriptions".
8084         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8085
8086 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8087
8088         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8089         Include features/i386/32bit-*.c.
8090         (i386_linux_read_description): Generate target description if it
8091         doesn't exist.
8092         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8093         functions.
8094         * features/i386/32bit-linux.c: Re-generated.
8095         * features/i386/32bit-sse.c: Likewise.
8096         * target-descriptions.c (print_c_feature::visit): Print code to
8097         set register number if needed.
8098         (print_c_feature) <m_next_regnum>: New field.
8099
8100 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8101
8102         * features/Makefile (CFILES): Rename with TDESC_CFILES.
8103         (FEATURE_XMLFILES): New.
8104         (FEATURE_CFILES): New.
8105         New rules.
8106         (clean-cfiles): Remove generated c files.
8107         * features/i386/32bit-avx.c: Generated.
8108         * features/i386/32bit-avx512.c: Generated.
8109         * features/i386/32bit-core.c: Generated.
8110         * features/i386/32bit-linux.c: Generated.
8111         * features/i386/32bit-mpx.c: Generated.
8112         * features/i386/32bit-pkeys.c: Generated.
8113         * features/i386/32bit-sse.c: Generated.
8114         * target-descriptions.c: Include algorithm.
8115         (tdesc_element_visitor): Add method visit_end.
8116         (print_c_tdesc): Implement visit_end.
8117         (print_c_tdesc:: m_filename_after_features): Move it to
8118         protected.
8119         (print_c_feature): New class.
8120         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8121         name starts with "i386/32bit-".
8122
8123 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8124
8125         * target-descriptions.c (tdesc_element_visitor): New class.
8126         (tdesc_element): New class.
8127         (tdesc_reg): Inherit from tdesc_element.
8128         (tdesc_reg::accept): New function.
8129         (tdesc_type): Inherit from tdesc_element.
8130         (tdesc_type::accept): New function.
8131         (tdesc_feature): Inherit from tdesc_element.
8132         (tdesc_feature::accept): New function.
8133         (target_desc): Inherit from tdesc_element.
8134         (target_desc::target_desc): New.
8135         (target_desc::~target_desc): New.
8136         (target_desc::accept): New.
8137         (allocate_target_description): Use new.
8138         (free_target_description): Use delete.
8139         (print_c_tdesc): New class.
8140         (maint_print_c_tdesc_cmd): Adjust.
8141
8142         * features/aarch64.c: Re-generated.
8143         * features/arc-arcompact.c: Re-generated.
8144         * features/arc-v2.c: Re-generated.
8145         * features/arm/arm-with-iwmmxt.c: Re-generated.
8146         * features/arm/arm-with-m.c: Re-generated.
8147         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8148         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8149         * features/arm/arm-with-neon.c: Re-generated.
8150         * features/arm/arm-with-vfpv2.c: Re-generated.
8151         * features/arm/arm-with-vfpv3.c: Re-generated.
8152         * features/i386/amd64-avx-avx512.c: Re-generated.
8153         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8154         * features/i386/amd64-avx.c: Re-generated.
8155         * features/i386/amd64-avx-linux.c: Re-generated.
8156         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8157         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8158         * features/i386/amd64-avx-mpx.c: Re-generated.
8159         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8160         * features/i386/amd64.c: Re-generated.
8161         * features/i386/amd64-linux.c: Re-generated.
8162         * features/i386/amd64-mpx.c: Re-generated.
8163         * features/i386/amd64-mpx-linux.c: Re-generated.
8164         * features/i386/i386-avx-avx512.c: Re-generated.
8165         * features/i386/i386-avx-avx512-linux.c: Re-generated.
8166         * features/i386/i386-avx.c: Re-generated.
8167         * features/i386/i386-avx-linux.c: Re-generated.
8168         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8169         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8170         * features/i386/i386-avx-mpx.c: Re-generated.
8171         * features/i386/i386-avx-mpx-linux.c: Re-generated.
8172         * features/i386/i386.c: Re-generated.
8173         * features/i386/i386-linux.c: Re-generated.
8174         * features/i386/i386-mmx.c: Re-generated.
8175         * features/i386/i386-mmx-linux.c: Re-generated.
8176         * features/i386/i386-mpx.c: Re-generated.
8177         * features/i386/i386-mpx-linux.c: Re-generated.
8178         * features/i386/x32-avx-avx512.c: Re-generated.
8179         * features/i386/x32-avx-avx512-linux.c: Re-generated.
8180         * features/i386/x32-avx.c: Re-generated.
8181         * features/i386/x32-avx-linux.c: Re-generated.
8182         * features/i386/x32.c: Re-generated.
8183         * features/i386/x32-linux.c: Re-generated.
8184         * features/microblaze.c: Re-generated.
8185         * features/microblaze-with-stack-protect.c: Re-generated.
8186         * features/mips64-dsp-linux.c: Re-generated.
8187         * features/mips64-linux.c: Re-generated.
8188         * features/mips-dsp-linux.c: Re-generated.
8189         * features/mips-linux.c: Re-generated.
8190         * features/nds32.c: Re-generated.
8191         * features/nios2.c: Re-generated.
8192         * features/nios2-linux.c: Re-generated.
8193         * features/rs6000/powerpc-32.c: Re-generated.
8194         * features/rs6000/powerpc-32l.c: Re-generated.
8195         * features/rs6000/powerpc-403.c: Re-generated.
8196         * features/rs6000/powerpc-403gc.c : Re-generated.
8197         * features/rs6000/powerpc-405.c: Re-generated.
8198         * features/rs6000/powerpc-505.c: Re-generated.
8199         * features/rs6000/powerpc-601.c: Re-generated.
8200         * features/rs6000/powerpc-602.c: Re-generated.
8201         * features/rs6000/powerpc-603.c: Re-generated.
8202         * features/rs6000/powerpc-604.c: Re-generated.
8203         * features/rs6000/powerpc-64.c: Re-generated.
8204         * features/rs6000/powerpc-64l.c: Re-generated.
8205         * features/rs6000/powerpc-7400.c: Re-generated.
8206         * features/rs6000/powerpc-750.c: Re-generated.
8207         * features/rs6000/powerpc-860.c: Re-generated.
8208         * features/rs6000/powerpc-altivec32.c: Re-generated.
8209         * features/rs6000/powerpc-altivec32l.c: Re-generated.
8210         * features/rs6000/powerpc-altivec64.c: Re-generated.
8211         * features/rs6000/powerpc-altivec64l.c: Re-generated.
8212         * features/rs6000/powerpc-cell32l.c: Re-generated.
8213         * features/rs6000/powerpc-cell64l.c: Re-generated.
8214         * features/rs6000/powerpc-e500.c: Re-generated.
8215         * features/rs6000/powerpc-e500l.c: Re-generated.
8216         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8217         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8218         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8219         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8220         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8221         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8222         * features/rs6000/powerpc-vsx32.c: Re-generated.
8223         * features/rs6000/powerpc-vsx32l.c: Re-generated.
8224         * features/rs6000/powerpc-vsx64.c: Re-generated.
8225         * features/rs6000/powerpc-vsx64l.c: Re-generated.
8226         * features/rs6000/rs6000.c: Re-generated.
8227         * features/s390-linux32.c: Re-generated.
8228         * features/s390-linux32v1.c: Re-generated.
8229         * features/s390-linux32v2.c: Re-generated.
8230         * features/s390-linux64.c: Re-generated.
8231         * features/s390-linux64v1.c: Re-generated.
8232         * features/s390-linux64v2.c: Re-generated.
8233         * features/s390-te-linux64.c: Re-generated.
8234         * features/s390-tevx-linux64.c: Re-generated.
8235         * features/s390-vx-linux64.c: Re-generated.
8236         * features/s390x-linux64.c: Re-generated.
8237         * features/s390x-linux64v1.c: Re-generated.
8238         * features/s390x-linux64v2.c: Re-generated.
8239         * features/s390x-te-linux64.c: Re-generated.
8240         * features/s390x-tevx-linux64.c: Re-generated.
8241         * features/s390x-vx-linux64.c: Re-generated.
8242         * features/sparc/sparc32-solaris.c: Re-generated.
8243         * features/sparc/sparc64-solaris.c: Re-generated.
8244         * features/tic6x-c62x.c: Re-generated.
8245         * features/tic6x-c62x-linux.c: Re-generated.
8246         * features/tic6x-c64x.c: Re-generated.
8247         * features/tic6x-c64x-linux.c: Re-generated.
8248         * features/tic6x-c64xp.c: Re-generated.
8249         * features/tic6x-c64xp-linux.c: Re-generated.
8250
8251 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8252
8253         * i386-linux-tdep.c (i386_linux_read_description): New function.
8254         (i386_linux_core_read_description): Call
8255         i386_linux_read_description.
8256         * i386-linux-tdep.h (i386_linux_read_description): Declare.
8257         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8258         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8259         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8260         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8261         * x86-linux-nat.c (x86_linux_read_description): Call
8262         i386_linux_read_description.
8263
8264 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8265
8266         * NEWS: Mention it.
8267         * features/Makefile (%.c: %.xml): Pass the xml file name to
8268         command "maint print c-tdesc".
8269         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8270         name from 'arg'.
8271
8272 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8273
8274         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
8275         in-class initialization.
8276         (tdesc_create_feature): Call new instead of XCNEW.
8277         (free_target_description): Ue delete.
8278
8279 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
8280
8281         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8282
8283 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8284
8285         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8286         constant.
8287         (amd64_x32_init_abi): Likewise.
8288         * amd64-tdep.h (amd64_init_abi): Update declaration.
8289         (amd64_x32_init_abi): Likewise.
8290
8291 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8292
8293         PR tdep/21717
8294         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8295         condition for FPSCR.
8296         (arm_linux_store_inferior_registers): Likewise.
8297
8298 2017-07-22  Tom Tromey  <tom@tromey.com>
8299
8300         * break-catch-syscall.c (struct catch_syscall_inferior_data)
8301         <syscalls_counts>: Now a std::vector.
8302         (get_catch_syscall_inferior_data): Use "new".
8303         (catch_syscall_inferior_data_cleanup): Use "delete".
8304         (insert_catch_syscall, remove_catch_syscall)
8305         (clear_syscall_counts): Update.
8306
8307 2017-07-22  Tom Tromey  <tom@tromey.com>
8308
8309         * break-catch-syscall.c (syscall_catchpoint)
8310         <syscalls_to_be_caught>: Now a std::vector<int>
8311         (~syscall_catchpoint): Remove.
8312         (insert_catch_syscall, remove_catch_syscall)
8313         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8314         (print_mention_catch_syscall, print_recreate_catch_syscall):
8315         Update.
8316         (create_syscall_event_catchpoint): Change type of "filter"
8317         parameter.
8318         (catch_syscall_split_args): Return a std::vector.
8319         (catch_syscall_command_1, catching_syscall_number_1): Update.
8320
8321 2017-07-22  Tom Tromey  <tom@tromey.com>
8322
8323         * break-catch-throw.c (struct exception_catchpoint)
8324         <exception_rx>: Now a std::string.
8325         (~exception_catchpoint): Remove.
8326         (print_one_detail_exception_catchpoint): Update.
8327         (handle_gnu_v3_exceptions): Change type of except_rx.
8328         (extract_exception_regexp): Return a std::string.
8329         (catch_exception_command_1): Update.
8330
8331 2017-07-22  Tom Tromey  <tom@tromey.com>
8332
8333         * break-catch-sig.c (gdb_signal_type): Remove typedef.
8334         (struct signal_catchpoint) <signals_to_be_caught>: Now a
8335         std::vector.
8336         <catch_all>: Now a bool.
8337         (~signal_catchpoint): Remove.
8338         (signal_catchpoint_insert_location)
8339         (signal_catchpoint_remove_location)
8340         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8341         (signal_catchpoint_print_mention)
8342         (signal_catchpoint_print_recreate)
8343         (signal_catchpoint_explains_signal): Update.
8344         (create_signal_catchpoint): Change type of "filter" and
8345         "catch_all".
8346         (catch_signal_split_args): Return a std::vector.  Change type of
8347         "catch_all".
8348         (catch_signal_command): Update.
8349
8350 2017-07-20  Pedro Alves  <palves@redhat.com>
8351
8352         * ada-lang.c (ada_language_defn): Make extern.
8353         (_initialize_ada_language): Remove add_language call.
8354         * c-lang.c (c_language_defn, cplus_language_defn)
8355         (asm_language_defn, minimal_language_defn): Make extern.
8356         (_initialize_c_language): Delete.
8357         * completer.c (compare_cstrings): Delete, moved to utils.h.
8358         * d-lang.c (d_language_defn): Make extern.
8359         (_initialize_d_language): Remove add_language calls.
8360         * defs.h (enum language): Add comment.
8361         * f-lang.c (f_language_defn): Make extern.
8362         (_initialize_f_language): Remove add_language call.
8363         * go-lang.c (go_language_defn): Make extern.
8364         (_initialize_go_language): Remove add_language call.
8365         * language.c: Include <algorithm>.
8366         (languages): Redefine as const array.
8367         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8368         (set_language_command): Handle "local".  Use for-range loop.
8369         (set_language): Remove loop.
8370         (language_enum): Rewrite.
8371         (language_def, language_str): Remove loops.
8372         (add_language): Delete.
8373         (add_set_language_command): New, based on add_languages.
8374         (skip_language_trampoline): Adjust.
8375         (local_language_defn): Delete.
8376         (language_gdbarch_post_init): Adjust.
8377         (_initialize_language): Remove add_language calls.  Call
8378         add_set_language_command.
8379         * language.h (add_language): Delete.
8380         (auto_language_defn)
8381         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8382         (asm_language_defn, c_language_defn, cplus_language_defn)
8383         (d_language_defn, f_language_defn, go_language_defn)
8384         (m2_language_defn, objc_language_defn, opencl_language_defn)
8385         (pascal_language_defn, rust_language_defn): Declare.
8386         * m2-lang.c (m2_language_defn): Make extern.
8387         (_initialize_m2_language): Remove add_language call.
8388         * objc-lang.c (objc_language_defn): Make extern.
8389         (_initialize_objc_language): Remove add_language call.
8390         * opencl-lang.c (opencl_language_defn): Make extern.
8391         (_initialize_opencl_language): Remove add_language call.
8392         * p-lang.c (pascal_language_defn): Make extern.
8393         (_initialize_pascal_language): Delete.
8394         * rust-lang.c (rust_language_defn): Make extern.
8395         (_initialize_rust_language): Delete.
8396         * utils.h (compare_cstrings): New static inline function.
8397
8398 2017-07-20  Pedro Alves  <palves@redhat.com>
8399
8400         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8401         (get_var_value): Constify parameters.
8402         (get_int_var_value): Change prototype.
8403         (to_fixed_range_type): Adjust.
8404         * ada-lang.h (get_int_var_value): Change prototype.
8405
8406 2017-07-20  Pedro Alves  <palves@redhat.com>
8407
8408         * dwarf2read.c (dw2_lookup_symbol): Use
8409         SYMBOL_MATCHES_SEARCH_NAME.
8410         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8411
8412 2017-07-20  Pedro Alves  <palves@redhat.com>
8413
8414         * block.c (block_iter_name_step, block_iter_name_first)
8415         (block_iter_name_next): Delete.
8416         (block_lookup_symbol_primary): Adjust to use
8417         dict_iter_match_first/dict_iter_match_next.
8418         * block.h (block_iter_name_first, block_iter_name_next): Delete
8419         declarations.
8420         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8421         dict_iter_match_first/dict_iter_match_next.
8422
8423 2017-07-20  Pedro Alves  <palves@redhat.com>
8424
8425         * cp-support.c (cp_find_first_component_aux): Add missing case for
8426         end of string.
8427
8428 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8429
8430         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8431         of dwo_cu's dwo_file.
8432
8433 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8434
8435         * remote.c (store_registers_using_G): Remove one line comment.
8436
8437 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8438
8439         * regcache.c (regcache_cpy): Simplify it.
8440         (regcache::cpy_no_passthrough): Remove it.
8441         * regcache.h (cpy_no_passthrough): Remove it.
8442         (regcache_dup, regcache_cpy): Update comments.
8443
8444 2017-07-18  Pedro Alves  <palves@redhat.com>
8445
8446         * remote-sim.c (sim_command_completer): Adjust to work with a
8447         completion_tracker instead of a VEC.
8448
8449 2017-07-17  Pedro Alves  <palves@redhat.com>
8450
8451         * completer.c (complete_source_filenames): New function.
8452         (complete_address_and_linespec_locations): New function.
8453         (location_completer): Use complete_address_and_linespec_locations.
8454         (completion_tracker::build_completion_result): Honor the tracker's
8455         request to suppress append.
8456         * completer.h (completion_tracker::suppress_append_ws)
8457         (completion_tracker::set_suppress_append_ws): New methods.
8458         (completion_tracker::m_suppress_append_ws): New field.
8459         (complete_source_filenames): New declaration.
8460         * linespec.c (linespec_complete_what): New.
8461         (struct ls_parser) <complete_what, completion_word,
8462         completion_quote_char, completion_quote_end, completion_tracker>:
8463         New fields.
8464         (string_find_incomplete_keyword_at_end): New.
8465         (linespec_lexer_lex_string): Record quote char.  If in completion
8466         mode, don't throw.
8467         (linespec_lexer_consume_token): Advance the completion word point.
8468         (linespec_lexer_peek_token): Save/restore completion info.
8469         (save_stream_and_consume_token): New.
8470         (set_completion_after_number): New.
8471         (linespec_parse_basic): Set what to complete next depending on
8472         token.  Handle function and label completions specially.
8473         (parse_linespec): Disable objc shortcut in completion mode.  Set
8474         what to complete next depending on token type.  Skip keyword if in
8475         completion mode.
8476         (complete_linespec_component, linespec_complete): New.
8477         * linespec.h (linespec_complete): Declare.
8478
8479 2017-07-17  Pedro Alves  <palves@redhat.com>
8480
8481         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8482         Handle 'operator<' / 'operator<<'.
8483
8484 2017-07-17  Pedro Alves  <palves@redhat.com>
8485
8486         * completer.c (collect_explicit_location_matches): Handle
8487         MATCH_LABEL.
8488         (convert_explicit_location_to_linespec): New, factored out from
8489         ...
8490         (convert_explicit_location_to_sals): ... this.
8491         (complete_label): New.
8492         (linespec_complete_label, find_label_symbols_in_block): New.
8493         (find_label_symbols): Add completion_mode parameter and adjust to
8494         call find_label_symbols_in_block.
8495         * linespec.h (linespec_complete_label): Declare.
8496
8497 2017-07-17  Pedro Alves  <palves@redhat.com>
8498
8499         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8500         complete_symbol_mode parameter.
8501         * cli/cli-cmds.c (complete_command): Get the completion result out
8502         of the handle_brkchars tracker if used a custom word point.
8503         * completer.c: Include "linespec.h".
8504         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8505         (advance_to_expression_complete_word_point): New.
8506         (completion_tracker::completes_to_completion_word): New.
8507         (complete_files_symbols): Pass down
8508         complete_symbol_mode::EXPRESSION.
8509         (explicit_options, probe_options): New.
8510         (collect_explicit_location_matches): Complete on the
8511         explictit_loc->foo instead of word.  Use
8512         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8513         keyword and options completions.
8514         (backup_text_ptr): Delete.
8515         (skip_keyword): New.
8516         (complete_explicit_location): Remove 'word' parameter.  Add
8517         language, quoted_arg_start and quoted_arg_end parameters.
8518         Rewrite, parsing left to right.
8519         (location_completer): Rewrite.
8520         (location_completer_handle_brkchars): New function.
8521         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8522         (enum complete_line_internal_reason): Adjust comments.
8523         (completion_tracker::discard_completions): New.
8524         (completer_handle_brkchars_func_for_completer): Handle
8525         location_completer.
8526         (gdb_custom_word_point_brkchars)
8527         (gdb_org_rl_basic_quote_characters): New.
8528         (gdb_completion_word_break_characters_throw)
8529         (completion_find_completion_word): Handle trackers that use a
8530         custom word point.
8531         (completion_tracker::advance_custom_word_point_by): New.
8532         (completion_tracker::build_completion_result): Don't rely on
8533         readline appending the quote char.
8534         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8535         use a custom word point.
8536         (gdb_rl_attempted_completion_function): Restore
8537         rl_basic_quote_characters.
8538         * completer.h (class completion_tracker): Extend intro comment.
8539         (completion_tracker::set_quote_char)
8540         (completion_tracker::quote_char)
8541         (completion_tracker::set_use_custom_word_point)
8542         (completion_tracker::use_custom_word_point)
8543         (completion_tracker::custom_word_point)
8544         (completion_tracker::set_custom_word_point)
8545         (completion_tracker::advance_custom_word_point_by)
8546         (completion_tracker::completes_to_completion_word)
8547         (completion_tracker::discard_completions): New methods.
8548         (completion_tracker::m_quote_char)
8549         (completion_tracker::m_use_custom_word_point)
8550         (completion_tracker::m_custom_word_point): New fields.
8551         (advance_to_expression_complete_word_point): Declare.
8552         * f-lang.c (f_collect_symbol_completion_matches): Add
8553         complete_symbol_mode parameter.
8554         * language.h (struct language_defn)
8555         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8556         parameter.
8557         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8558         (linespec_complete_function): New function.
8559         (linespec_lexer_lex_keyword): Adjust.
8560         * linespec.h (linespec_keywords, linespec_complete_function): New
8561         declarations.
8562         * location.c (find_end_quote): New function.
8563         (explicit_location_lex_one): Add explicit_completion_info
8564         parameter.  Save quoting info.  Don't throw if being called for
8565         completion.  Don't handle Ada operators here.
8566         (is_cp_operator, skip_op_false_positives, first_of)
8567         (explicit_location_lex_one_function): New function.
8568         (string_to_explicit_location): Replace 'dont_throw' parameter with
8569         an explicit_completion_info pointer parameter.  Handle it.  Don't
8570         use explicit_location_lex_one to lex function names.  Use
8571         explicit_location_lex_one_function instead.
8572         * location.h (struct explicit_completion_info): New.
8573         (string_to_explicit_location): Replace 'dont_throw' parameter with
8574         an explicit_completion_info pointer parameter.
8575         * symtab.c (default_collect_symbol_completion_matches_break_on):
8576         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8577         (default_collect_symbol_completion_matches)
8578         (collect_symbol_completion_matches): Add complete_symbol_mode
8579         parameter.
8580         (collect_symbol_completion_matches_type): Pass down
8581         complete_symbol_mode::EXPRESSION.
8582         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8583         parameter.  Handle LINESPEC mode.
8584         * symtab.h (complete_symbol_mode): New.
8585         (default_collect_symbol_completion_matches_break_on)
8586         (default_collect_symbol_completion_matches)
8587         (collect_symbol_completion_matches)
8588         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8589         parameter.
8590
8591 2017-07-17  Pedro Alves  <palves@redhat.com>
8592
8593         * utils.c (enum class strncmp_iw_mode): New.
8594         (strcmp_iw): Rename to ...
8595         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8596         parameters.  Handle them.
8597         (strncmp_iw): New.
8598         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8599         * utils.h (strncmp_iw): Declare.
8600         (strcmp_iw): Move describing comments here.
8601
8602 2017-07-17  Pedro Alves  <palves@redhat.com>
8603
8604         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8605         CP_OPERATOR_STR.
8606         * c-typeprint.c (is_type_conversion_operator): Use
8607         CP_OPERATOR_STR.
8608         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8609         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8610         CP_OPERATOR_LEN.
8611         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8612         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8613         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8614         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8615         CP_OPERATOR_STR.
8616         * location.c: Include "cp-support.h".
8617         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8618         CP_OPERATOR_STR.
8619         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8620         CP_OPERATOR_LEN.
8621
8622 2017-07-17  Pedro Alves  <palves@redhat.com>
8623
8624         * cli/cli-cmds.c (complete_command): Use a completion tracker
8625         along with completion_find_completion_word for handle_brkchars
8626         phase.
8627         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8628         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8629         (struct gdb_rl_completion_word_info): New.
8630         (gdb_rl_find_completion_word): New.
8631         (completion_find_completion_word): New.
8632         * completer.h (completion_find_completion_word): Declare.
8633
8634 2017-07-17  Pedro Alves  <palves@redhat.com>
8635
8636         * ada-lang.c (symbol_completion_match): Adjust comments.
8637         (symbol_completion_add): Replace vector parameter with
8638         completion_tracker parameter.  Use it.
8639         (ada_make_symbol_completion_list): Rename to...
8640         (ada_collect_symbol_completion_matches): ... this.  Add
8641         completion_tracker parameter and use it.
8642         (ada_language_defn): Adjust.
8643         * break-catch-syscall.c (catch_syscall_completer): Adjust
8644         prototype and work with completion_tracker instead of VEC.
8645         * breakpoint.c (condition_completer): Adjust prototype and work
8646         with completion_tracker instead of VEC.
8647         * c-lang.c (c_language_defn, cplus_language_defn)
8648         (asm_language_defn, minimal_language_defn): Adjust to renames.
8649         * cli/cli-cmds.c (complete_command): Rework using
8650         completion_tracker.  Catch exceptions when completing.
8651         * cli/cli-decode.c (integer_unlimited_completer)
8652         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8653         with completion_tracker instead of VEC.
8654         * command.h (struct completion_tracker): Forward declare.
8655         (completer_ftype, completer_handle_brkchars_ftype): Change
8656         types.
8657         (complete_on_cmdlist, complete_on_enum): Adjust.
8658         * completer.c: Include <algorithm>.
8659         (struct gdb_completer_state): New.
8660         (current_completion): New global.
8661         (readline_line_completion_function): Delete.
8662         (noop_completer, filename_completer)
8663         (filename_completer_handle_brkchars, complete_files_symbols)
8664         (linespec_location_completer): Adjust to work with a
8665         completion_tracker instead of a VEC.
8666         (string_or_empty): New.
8667         (collect_explicit_location_matches): Adjust to work with a
8668         completion_tracker instead of a VEC.
8669         (explicit_location_completer): Rename to ...
8670         (complete_explicit_location): ... this and adjust to work with a
8671         completion_tracker instead of a VEC.
8672         (location_completer): Adjust to work with a completion_tracker
8673         instead of a VEC.
8674         (add_struct_fields): Adjust to work with a completion_list instead
8675         of VEC.
8676         (expression_completer): Rename to ...
8677         (complete_expression): ... this and adjust to work with a
8678         completion_tracker instead of a VEC.  Use complete_files_symbols.
8679         (expression_completer): Reimplement on top of complete_expression.
8680         (symbol_completer): Adjust to work with a completion_tracker
8681         instead of a VEC.
8682         (enum complete_line_internal_reason): Add describing comments.
8683         (complete_line_internal_normal_command): Adjust to work with a
8684         completion_tracker instead of a VEC.
8685         (complete_line_internal): Rename to ...
8686         (complete_line_internal_1): ... this and adjust to work with a
8687         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8688         handle_brkchars phase.
8689         (new_completion_tracker): Delete.
8690         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8691         complete_line_internal_1.
8692         (free_completion_tracker): Delete.
8693         (INITIAL_COMPLETION_HTAB_SIZE): New.
8694         (completion_tracker::completion_tracker)
8695         (completion_tracker::~completion_tracker): New.
8696         (maybe_add_completion): Delete.
8697         (completion_tracker::maybe_add_completion)
8698         (completion_tracker::add_completion)
8699         (completion_tracker::add_completions): New.
8700         (throw_max_completions_reached_error): Delete.
8701         (complete_line): Adjust to work with a completion_tracker instead
8702         of a VEC.  Don't create a completion_tracker_t or check for max
8703         completions here.
8704         (command_completer, command_completer_handle_brkchars)
8705         (signal_completer, reg_or_group_completer_1)
8706         (reg_or_group_completer, default_completer_handle_brkchars):
8707         Adjust to work with a completion_tracker.
8708         (gdb_completion_word_break_characters_throw): New.
8709         (gdb_completion_word_break_characters): Reimplement.
8710         (line_completion_function): Delete.
8711         (completion_tracker::recompute_lowest_common_denominator)
8712         (expand_preserving_ws)
8713         (completion_tracker::build_completion_result)
8714         (completion_result::completion_result)
8715         (completion_result::completion_result)
8716         (completion_result::~completion_result)
8717         (completion_result::completion_result)
8718         (completion_result::release_match_list, compare_cstrings)
8719         (completion_result::sort_match_list)
8720         (completion_result::reset_match_list)
8721         (gdb_rl_attempted_completion_function_throw)
8722         (gdb_rl_attempted_completion_function): New.
8723         * completer.h (completion_list, struct completion_result)
8724         (class completion_tracker): New.
8725         (complete_line): Add completion_tracker parameter.
8726         (readline_line_completion_function): Delete.
8727         (gdb_rl_attempted_completion_function): New.
8728         (noop_completer, filename_completer, expression_completer)
8729         (location_completer, symbol_completer, command_completer)
8730         (signal_completer, reg_or_group_completer): Update prototypes.
8731         (completion_tracker_t, new_completion_tracker)
8732         (make_cleanup_free_completion_tracker): Delete.
8733         (enum maybe_add_completion_enum): Delete.
8734         (maybe_add_completion): Delete.
8735         (throw_max_completions_reached_error): Delete.
8736         * corefile.c (complete_set_gnutarget): Adjust to work with a
8737         completion_tracker instead of a VEC.
8738         * cp-abi.c (cp_abi_completer): Adjust to work with a
8739         completion_tracker instead of a VEC.
8740         * d-lang.c (d_language_defn): Adjust.
8741         * disasm.c (disassembler_options_completer): Adjust to work with a
8742         completion_tracker instead of a VEC.
8743         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8744         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8745         with a completion_tracker instead of a VEC.
8746         (f_language_defn): Adjust.
8747         * go-lang.c (go_language_defn): Adjust.
8748         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8749         Adjust to work with a completion_tracker instead of a VEC.
8750         * infrun.c (handle_completer): Likewise.
8751         * interps.c (interpreter_completer): Likewise.
8752         * interps.h (interpreter_completer): Likewise.
8753         * language.c (unknown_language_defn, auto_language_defn)
8754         (local_language_defn): Adjust.
8755         * language.h (language_defn::la_make_symbol_completion_list):
8756         Rename to ...
8757         (language_defn::la_collect_symbol_completion_matches): ... this
8758         and adjust to work with a completion_tracker instead of a VEC.
8759         * m2-lang.c (m2_language_defn): Adjust.
8760         * objc-lang.c (objc_language_defn): Adjust.
8761         * opencl-lang.c (opencl_language_defn): Adjust.
8762         * p-lang.c (pascal_language_defn): Adjust.
8763         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8764         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8765         with a completion_tracker.
8766         * rust-lang.c (rust_language_defn): Adjust.
8767         * symtab.c (free_completion_list, do_free_completion_list)
8768         (return_val, completion_tracker): Delete.
8769         (completion_list_add_name, completion_list_add_symbol)
8770         (completion_list_add_msymbol, completion_list_objc_symbol)
8771         (completion_list_add_fields, add_symtab_completions): Add
8772         completion_tracker parameter and use it.
8773         (default_make_symbol_completion_list_break_on_1): Rename to...
8774         (default_collect_symbol_completion_matches_break_on): ... this.
8775         Add completion_tracker parameter and use it instead of allocating
8776         a completion tracker here.
8777         (default_make_symbol_completion_list_break_on): Delete old
8778         implementation.
8779         (default_make_symbol_completion_list): Delete.
8780         (default_collect_symbol_completion_matches): New.
8781         (make_symbol_completion_list): Delete.
8782         (collect_symbol_completion_matches): New.
8783         (make_symbol_completion_type): Rename to ...
8784         (collect_symbol_completion_matches_type): ... this.  Add
8785         completion_tracker parameter and use it instead of VEC.
8786         (make_file_symbol_completion_list_1): Rename to...
8787         (collect_file_symbol_completion_matches): ... this.  Add
8788         completion_tracker parameter and use it instead of VEC.
8789         (make_file_symbol_completion_list): Delete.
8790         (add_filename_to_list): Use completion_list instead of a VEC.
8791         (add_partial_filename_data::list): Now a completion_list.
8792         (make_source_files_completion_list): Work with a completion_list
8793         instead of a VEC.
8794         * symtab.h: Include "completer.h".
8795         (default_make_symbol_completion_list_break_on)
8796         (default_make_symbol_completion_list, make_symbol_completion_list)
8797         (make_symbol_completion_type, make_file_symbol_completion_list)
8798         (make_source_files_completion_list): Delete.
8799         (default_collect_symbol_completion_matches_break_on)
8800         (default_collect_symbol_completion_matches)
8801         (collect_symbol_completion_matches)
8802         (collect_symbol_completion_matches_type)
8803         (collect_file_symbol_completion_matches)
8804         (make_source_files_completion_list): New.
8805         * top.c (init_main): Don't install a rl_completion_entry_function
8806         hook.  Install a rl_attempted_completion_function hook instead.
8807         * tui/tui-layout.c (layout_completer): Adjust to work with a
8808         completion_tracker.
8809         * tui/tui-regs.c (tui_reggroup_completer):
8810         * tui/tui-win.c (window_name_completer, focus_completer)
8811         (winheight_completer): Adjust to work with a completion_tracker.
8812         * value.c: Include "completer.h".
8813         (complete_internalvar): Adjust to work with a completion_tracker.
8814         * value.h (complete_internalvar): Likewise.
8815
8816 2017-07-17  Pedro Alves  <palves@redhat.com>
8817
8818         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8819         renames.
8820         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8821         comments to completer_ftype's declaration.
8822         <completer_handle_brkchars>: Change type to
8823         completer_handle_brkchars_ftype.
8824         * command.h (completer_ftype): Add describing comment and give
8825         names to parameters.
8826         (completer_ftype_void): Rename to ...
8827         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8828         (set_cmd_completer_handle_brkchars): Adjust.
8829         * completer.c (filename_completer_handle_brkchars): New function.
8830         (complete_line_internal_normal_command): New function, factored
8831         out from ...
8832         (complete_line_internal): ... here.
8833         (command_completer_handle_brkchars)
8834         (default_completer_handle_brkchars)
8835         (completer_handle_brkchars_func_for_completer): New functions.
8836         * completer.h (set_gdb_completion_word_break_characters): Delete
8837         declaration.
8838         (completer_handle_brkchars_func_for_completer): New declaration.
8839         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8840         completer_handle_brkchars_func_for_completer.
8841
8842 2017-07-17  Pedro Alves  <palves@redhat.com>
8843
8844         * completer.c (symbol_completer): New function, based on
8845         make_symbol_completion_list_fn.
8846         * completer.h (symbol_completer): New declaration.
8847         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8848         * python/py-cmd.c (completers): Adjust.
8849         * symtab.c (make_symbol_completion_list_fn): Delete.
8850         * symtab.h (make_symbol_completion_list_fn): Delete.
8851         * cli/cli-decode.c (add_cmd): Adjust.
8852
8853 2017-07-17  Pedro Alves  <palves@redhat.com>
8854
8855         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8856         * dwarf2read.c: Include "filename-seen-cache.h".
8857         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8858         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8859         * filename-seen-cache.c: New file.
8860         * filename-seen-cache.h: New file.
8861         * symtab.c: Include "filename-seen-cache.h".
8862         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8863         (create_filename_seen_cache, clear_filename_seen_cache)
8864         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8865         to filename-seen-cache.h/filename-seen-cache.c.
8866         (output_source_filename, sources_info)
8867         (maybe_add_partial_symtab_filename)
8868         (make_source_files_completion_list): Adjust to use
8869         filename_seen_cache.
8870
8871 2017-07-17  Pedro Alves  <palves@redhat.com>
8872
8873         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8874         fields.
8875         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8876         dwarf2_debug_sections*)): New.
8877         (dwarf2_per_objfile::dwarf2_per_objfile(const
8878         dwarf2_per_objfile&)): Declare as deleted.
8879         (dwarf2_per_objfile::operator=): Declare as deleted.
8880         (dwarf2_per_objfile::dwarf2_per_objfile)
8881         (dwarf2_per_objfile::~dwarf2_per_objfile)
8882         (dwarf2_per_objfile::free_cached_comp_units): New.
8883         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8884         ctor.  Call dwarf2_per_objfile's ctor manually.
8885         (dwarf2_locate_sections): Deleted/refactored as ...
8886         (dwarf2_per_objfile::locate_sections): ... this new method.
8887         (free_cached_comp_units): Defer to
8888         dwarf2_per_objfile::free_cached_comp_units.
8889         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8890
8891 2017-07-14  Tom Tromey  <tom@tromey.com>
8892
8893         PR rust/21764:
8894         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8895         parameter.
8896         <UNOP_SIZEOF>: Split into separate case.
8897         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8898
8899 2017-07-14  Tom Tromey  <tom@tromey.com>
8900
8901         PR rust/21763:
8902         * symtab.c (symbol_matches_domain): Add language_rust to special
8903         case.
8904         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8905         treat LOC_TYPEDEF symbols as variables.
8906
8907 2017-07-14  Pedro Alves  <palves@redhat.com>
8908
8909         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8910         symtabs matching all symtabs with SRCFILE as file name instead of
8911         only considering the first hit, with lookup_symtab.
8912
8913 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8914
8915         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8916         operator_name parameters.
8917         (gen_expr): Update function call.
8918
8919 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8920
8921         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8922         parameter.
8923         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8924         Likewise.
8925         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8926         parameter, use agent_expr::gdbarch instead, update function
8927         calls.
8928         (locexpr_tracepoint_var_ref): Likewise.
8929         (loclist_tracepoint_var_ref): Likewise.
8930         * ax-gdb.c (gen_trace_static_fields): Likewise.
8931         (gen_traced_pop): Likewise.
8932         (gen_frame_args_address): Likewise.
8933         (gen_frame_locals_address): Likewise.
8934         (gen_var_ref): Likewise.
8935         (gen_struct_ref_recursive): Likewise.
8936         (gen_static_field): Likewise.
8937         (gen_maybe_namespace_elt): Likewise.
8938         (gen_expr): Likewise.
8939         (gen_trace_for_var): Likewise.
8940         (gen_trace_for_expr): Likewise.
8941         (gen_trace_for_return_address): Likewise.
8942
8943 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8944
8945         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8946         parameter.
8947         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8948
8949 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8950
8951         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8952         from ax, update calls.
8953         (gen_usual_arithmetic): Likewise.
8954         (gen_integral_promotions): Likewise.
8955         (gen_bitfield_ref): Likewise.
8956         (gen_primitive_field): Likewise.
8957         (gen_struct_ref_recursive): Likewise.
8958         (gen_struct_ref): Likewise.
8959         (gen_maybe_namespace_elt): Likewise.
8960         (gen_struct_elt_for_reference): Likewise.
8961         (gen_namespace_elt): Likewise.
8962         (gen_aggregate_elt_ref): Likewise.
8963         (gen_expr): Get gdbarch from ax, update calls.
8964         (gen_expr_binop_rest): Likewise.
8965
8966 2017-07-13  Pedro Alves  <palves@redhat.com>
8967
8968         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8969         as default tdesc.
8970         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8971         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8972         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8973         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8974         tdep.
8975         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8976         Get final tdesc from the tdep.
8977         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8978         default tdesc.
8979         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8980         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8981         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8982         Use it as default tdesc.
8983         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8984         down to amd_init_abi.  No longer handle fallback tdesc here.
8985         * amd64-tdep.h (tdesc_x32): Declare.
8986         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8987         parameter.
8988         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8989         as default tdesc.
8990
8991 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8992
8993         * s390-linux-tdep.c (s390_process_record): Add support for
8994         instructions new in arch12.
8995
8996 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8997
8998         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8999         PT_GETFSBASE and PT_GETGSBASE.
9000         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9001         PT_SETGSBASE.
9002
9003 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
9004
9005         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9006         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9007         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9008         those rules.
9009         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9010         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9011         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9012         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9013         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9014         * features/i386/amd64.xml: Add 64bit-segments.xml.
9015         * features/i386/amd64-avx-avx512.c: Regenerated.
9016         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9017         * features/i386/amd64-avx-mpx.c: Regenerated.
9018         * features/i386/amd64-avx.c: Regenerated.
9019         * features/i386/amd64-mpx.c: Regenerated.
9020         * features/i386/amd64.c: Regenerated.
9021         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9022         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9023         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9024         * regformats/i386/amd64-avx.dat: Regenerated.
9025         * regformats/i386/amd64-mpx.dat: Regenerated.
9026         * regformats/i386/amd64.dat: Regenerated.
9027
9028 2017-07-10  Yao Qi  <yao.qi@linaro.org>
9029
9030         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9031         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9032
9033 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
9034
9035         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9036         unsetenv.
9037         * gnulib/aclocal.m4: Regenerate.
9038         * gnulib/config.in: Regenerate.
9039         * gnulib/configure: Regenerate.
9040         * gnulib/import/Makefile.am: Regenerate.
9041         * gnulib/import/Makefile.in: Regenerate.
9042         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9043         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9044         * gnulib/import/m4/environ.m4: New file.
9045         * gnulib/import/m4/setenv.m4: New file.
9046         * gnulib/import/setenv.c: New file.
9047         * gnulib/import/unsetenv.c: New file.
9048
9049 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
9050
9051         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9052         address when op is DW_OP_addr.
9053
9054 2017-07-09  Tom Tromey  <tom@tromey.com>
9055
9056         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9057         check and apply to outer type.
9058
9059 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9060
9061         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9062         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9063         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9064         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9065
9066 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9067
9068         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9069
9070 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9071
9072         * corelow.c (get_core_siginfo): Remove.
9073         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9074         instead of get_core_siginfo.
9075         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9076         * gdbarch.h: Re-generate.
9077         * gdbarch.c: Re-generate.
9078         * linux-tdep.c (linux_core_xfer_siginfo): New.
9079         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9080
9081 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9082
9083         * corelow.c (thread_section_name): Move to ...
9084         * gdbcore.h (thread_section_name): ... here.
9085
9086 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9087
9088         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9089         (struct siginfo32): New.
9090         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9091         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9092         via ptrace(PT_LWPINFO).
9093
9094 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9095
9096         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9097         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9098         (fbsd_get_siginfo_type): New.
9099         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9100         (_initialize_fbsd_tdep): New.
9101
9102 2017-07-06  David Blaikie  <dblaikie@gmail.com>
9103
9104         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9105         a singular dwo_unit*) to support multiple CUs in the same way that
9106         multiple TUs are supported.
9107         (create_cus_hash_table): Replace create_dwo_cu with a function for
9108         parsing multiple CUs from a DWO file.
9109         (open_and_init_dwo_file): Use create_cus_hash_table rather than
9110         create_dwo_cu.
9111         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9112         htab_find, rather than comparing the signature to a singleton CU in
9113         the dwo_file.
9114
9115 2017-07-06  Pedro Alves  <palves@redhat.com>
9116
9117         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9118
9119 2017-07-04  Pedro Alves  <palves@redhat.com>
9120
9121         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9122         * gdbtypes.h (TYPE_STATIC): Delete.
9123         (struct fn_field) <is_public, is_abstract, is_static, is_final,
9124         is_synchronized, is_native>: Delete.
9125         <dummy>: Bump.
9126         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9127         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9128         (TYPE_FN_FIELD_ABSTRACT): Delete.
9129
9130 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
9131
9132         * buffer.h (buffer_finish): Fix spelling mistakes.
9133
9134 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
9135
9136         * .dir-locals.el: Automatically switch to C-style comments in
9137         versions of Emacs that support the feature.
9138
9139 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9140             Pedro Alves  <palves@redhat.com>
9141
9142         PR cli/21688
9143         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9144         (process_next_line): New variable 'inline_cmd'.
9145         Adjust 'if' clauses for "python", "compile" and "guile" to use
9146         'command_name_equals' and check for '!inline_cmd'.
9147
9148 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9149
9150         PR cli/21688
9151         * cli/cli-script.c (command_name_equals_not_inline): New function.
9152         (process_next_line): Adjust 'if' clauses for "python", "compile"
9153         and "guile" to use command_name_equals_not_inline.
9154
9155 2017-06-29  Pedro Alves  <palves@redhat.com>
9156
9157         * completer.c (expression_completer): Call
9158         linespec_location_completer instead of location_completer.
9159
9160 2017-06-29  Pedro Alves  <palves@redhat.com>
9161
9162         * completer.c (expression_completer): Remove code that recomputes
9163         'text' from 'word'.
9164
9165 2017-06-29  Yao Qi  <yao.qi@linaro.org>
9166
9167         * regformats/regdat.sh: Generate code with
9168         "ifndef IN_PROCESS_AGENT".
9169
9170 2017-06-28  Pedro Alves  <palves@redhat.com>
9171
9172         * command.h: Include "common/scoped_restore.h".
9173
9174 2017-06-28  Yao Qi  <yao.qi@linaro.org>
9175
9176         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9177         instead of obstack_grow.
9178
9179 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
9180
9181         PR gdb/21337
9182         * symfile.c (reread_symbols): Call objfiles_changed just before
9183         read_symbols.
9184
9185 2017-06-27  Pedro Alves  <palves@redhat.com>
9186
9187         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9188         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9189         (completion_list_add_symbol, completion_list_add_msymbol):
9190         ... these new functions.
9191         (add_symtab_completions)
9192         (default_make_symbol_completion_list_break_on_1): Adjust.
9193
9194 2017-06-27  Pedro Alves  <palves@redhat.com>
9195
9196         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9197         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
9198         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9199         dtor.
9200         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
9201         'storage_obstack' field an auto_obstack.  In-class initialize all
9202         non-bitfield fields.  Make minsyms_read bool.
9203         * symfile.c (read_symbols): Adjust.
9204
9205 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
9206
9207         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9208         (gdbsim_store_register): Likewise.
9209
9210 2017-06-27  Pedro Alves  <palves@redhat.com>
9211
9212         * c-exp.y (name_obstack): Now an auto_obstack.
9213         (yylex): Use auto_obstack::clear.
9214         (c_parse): Use auto_obstack::clear instead of reinitializing and
9215         freeing the obstack.
9216         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9217         * d-exp.y (name_obstack): Now an auto_obstack.
9218         (yylex): Use auto_obstack::clear.
9219         (d_parse): Use auto_obstack::clear instead of reinitializing and
9220         freeing the obstack.
9221         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9222         auto_obstack.
9223         * dwarf2read.c (create_addrmap_from_index)
9224         (dwarf2_build_psymtabs_hard)
9225         (update_enumeration_type_from_children): Likewise.
9226         * gdb_obstack.h (auto_obstack): New type.
9227         * go-exp.y (name_obstack): Now an auto_obstack.
9228         (build_packaged_name): Use auto_obstack::clear.
9229         (go_parse): Use auto_obstack::clear instead of reinitializing and
9230         freeing the obstack.
9231         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9232         auto_obstack.
9233         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9234         * rust-exp.y (work_obstack): Now an auto_obstack.
9235         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9236         reinitializing and freeing the obstack.
9237         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9238         (host_char_to_target): Use auto_obstack.
9239         * utils.h (make_cleanup_obstack_free): Delete declaration.
9240         * valprint.c (generic_emit_char, generic_printstr): Use
9241         auto_obstack.
9242
9243 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
9244
9245         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9246         thread.
9247         (darwin_init_thread_list): Don't update dummy thread.
9248         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9249
9250 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9251
9252         * record-full.c (netorder16): Remove.
9253
9254 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9255
9256         * common/diagnostics.h: Define macros for GCC.
9257         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9258         * common/vec.h: Include diagnostics.h.
9259         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9260         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9261         warning.
9262
9263 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9264
9265         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9266         New macro.
9267         * ada-lex.l: Ignore deprecated register warnings.
9268
9269 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9270
9271         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9272         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9273
9274 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9275
9276         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9277         its own line.
9278
9279 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9280
9281         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9282
9283 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
9284
9285         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9286         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9287         (xtensa_register_read_masked): Likewise.
9288
9289 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
9290
9291         * common/environ.c (gdb_environ::unset): Update comment.
9292
9293 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9294
9295         * python/py-unwind.c (pyuw_sniffer): Allocate space for
9296         registers.
9297
9298 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9299
9300         * record-full.c (record_full_exec_insn): Use byte_vector.
9301
9302 2017-06-22  Yao Qi  <yao.qi@linaro.org>
9303
9304         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9305         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9306
9307 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9308
9309         * remote.c (cached_reg): Move from here...
9310         * regcache.h (cached_reg): ...to here.
9311         * python/py-unwind.c (struct reg_info): Remove.
9312         (cached_frame_info): Use cached_reg_t.
9313         (pyuw_prev_register): Likewise.
9314         (pyuw_sniffer): Use cached_reg_t and allocate registers.
9315         (pyuw_dealloc_cache): Free all registers.
9316
9317 2017-06-22  Pedro Alves  <palves@redhat.com>
9318             Simon Marchi  <simon.marchi@ericsson.com>
9319
9320         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9321         warning.
9322         * common/diagnostics.h: New file.
9323
9324 2017-06-22  Pedro Alves  <palves@redhat.com>
9325
9326         * common/agent.h: Add include guards.
9327
9328 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
9329
9330         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9331         talk about addressable units instead of bytes.
9332
9333 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9334
9335         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9336         of '::const_iterator'.
9337
9338 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9339
9340         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9341         'unittests/environ-selftests.c'.
9342         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9343         * charset.c (find_charset_names): Declare object 'iconv_env'.
9344         Update code to use 'iconv_env' object.  Remove call to
9345         'free_environ'.
9346         * common/environ.c: Include <utility>.
9347         (make_environ): Delete function.
9348         (free_environ): Delete function.
9349         (gdb_environ::clear): New function.
9350         (gdb_environ::operator=): New function.
9351         (gdb_environ::get): Likewise.
9352         (environ_vector): Delete function.
9353         (set_in_environ): Delete function.
9354         (gdb_environ::set): New function.
9355         (unset_in_environ): Delete function.
9356         (gdb_environ::unset): New function.
9357         (gdb_environ::envp): Likewise.
9358         * common/environ.h: Include <vector>.
9359         (struct gdb_environ): Delete; transform into...
9360         (class gdb_environ): ... this class.
9361         (free_environ): Delete prototype.
9362         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9363         environ_vector): Likewise.
9364         * infcmd.c (run_command_1): Update code to call
9365         'envp' from 'gdb_environ' class.
9366         (environment_info): Update code to call methods from 'gdb_environ'
9367         class.
9368         (unset_environment_command): Likewise.
9369         (path_info): Likewise.
9370         (path_command): Likewise.
9371         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9372         (inferior::inferior): Initialize 'environment' using the host's
9373         information.
9374         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9375         Include "environ.h".
9376         (class inferior) <environment>: Change type from 'struct
9377         gdb_environ' to 'gdb_environ'.
9378         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9379         methods from 'gdb_environ' class.
9380         * solib.c (solib_find_1): Likewise
9381         * unittests/environ-selftests.c: New file.
9382
9383 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9384
9385         * features/i386/i386-linux.xml: Exchange the order of including
9386         32bit-linux.xml and 32bit-sse.xml.
9387         * features/i386/i386-linux.c: Regenerated.
9388
9389 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9390
9391         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9392         Delete copy ctor and assignment operator.
9393         (tdesc_type): Likewise.
9394         (tdesc_feature): Likewise.
9395         (tdesc_free_reg): Remove.
9396         (tdesc_create_reg): Use new.
9397         (tdesc_free_type): Remove.
9398         (tdesc_create_vector): Use new.
9399         (tdesc_create_union): Likewise.
9400         (tdesc_create_flags): Likewise.
9401         (tdesc_create_enum): Likewise.
9402         (tdesc_free_feature): Delete.
9403         (free_target_description): Use delete.
9404
9405 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9406
9407         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9408         registers.
9409
9410 2017-06-19  Pedro Alves  <palves@redhat.com>
9411
9412         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9413         after gdb::unlinker.
9414
9415 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9416
9417         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9418         gdb_environ to access an environment variable.
9419
9420 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9421
9422         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9423         gdb_byte*.
9424
9425 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9426
9427         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9428
9429 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9430
9431         * configure: Re-generate.
9432         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9433
9434 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9435
9436         * configure: Re-generate.
9437         * warning.m4: Pass -Werror to compiler when checking for
9438         supported warning flags.
9439
9440 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9441
9442         * Makefile.in (COMPILE.pre): Add "-x c++".
9443
9444 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9445             Pedro Alves  <palves@redhat.com>
9446             Yao Qi  <yao.qi@linaro.org>
9447
9448         * defs.h (RequireLongest): New.
9449         (extract_integer): Declare function template.
9450         (extract_signed_integer): Remove the declaration, but define it
9451         static inline.
9452         (extract_unsigned_integer): Likewise.
9453         (store_integer): Declare function template.
9454         (store_signed_integer): Remove the declaration, but define it
9455         static inline.
9456         (store_unsigned_integer): Likewise.
9457         * findvar.c (extract_integer): New function template.
9458         (extract_signed_integer): Remove.
9459         (extract_unsigned_integer): Remove.
9460         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9461         instantiations.
9462         (store_integer): New function template.
9463         (store_signed_integer): Remove.
9464         (store_unsigned_integer): Remove.
9465         (store_integer): Explicit instantiations.
9466         * regcache.c (regcache_raw_read_signed): Update.
9467         (regcache::raw_read): New function.
9468         (regcache::raw_read_signed): Remove.
9469         (regcache::raw_read_unsigned): Remove.
9470         (regcache_raw_read_unsigned): Update.
9471         (regcache_raw_write_unsigned): Update.
9472         (regcache::raw_write_signed): Remove.
9473         (regcache::raw_write): New function.
9474         (regcache_cooked_read_signed): Update.
9475         (regcache::raw_write_unsigned): Remove.
9476         (regcache::cooked_read_signed): Remove.
9477         (regcache_cooked_read_unsigned): Update.
9478         (regcache::cooked_read_unsigned): Remove.
9479         (regcache_cooked_write_signed): Update.
9480         (regcache_cooked_write_unsigned): Update.
9481         * regcache.h (regcache) <raw_read_signed>: Remove.
9482         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9483         <raw_read, raw_write>: New.
9484         <cooked_read_signed, cooked_write_signed>: Remove.
9485         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9486         <cooked_read, cooked_write>: New.
9487         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9488         (sh64_pseudo_register_write): Update.
9489
9490 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9491
9492         * arc-tdep.c (arc_disassembler_options): New variable.
9493         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9494         of default_print_insn.
9495         (arc_delayed_print_insn): Set info->section when needed,
9496         use default_print_insn to retrieve a disassembler.
9497
9498 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9499
9500         PR gdb/21574
9501         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9502         to mention $SHELL and startup-with-shell.
9503
9504 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9505
9506         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9507
9508 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9509
9510         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9511         default_print_insn instead of print_insn_aarch64.
9512         * arm-tdep.c (gdb_print_insn_arm): Call
9513         default_print_insn instead of print_insn_big_arm
9514         and print_insn_little_arm.
9515         * i386-tdep.c (i386_print_insn): Call default_print_insn
9516         instead of print_insn_i386.
9517         * ia64-tdep.c (ia64_print_insn): Call
9518         default_print_insn instead of print_insn_ia64.
9519         * mips-tdep.c (gdb_print_insn_mips): Call
9520         default_print_insn instead of print_insn_big_mips
9521         and print_insn_little_mips.
9522         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9523         instead of print_insn_spu.
9524
9525 2017-06-14  Pedro Alves  <palves@redhat.com>
9526
9527         * ada-lang.c: Include "common/byte-vector.h".
9528         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9529         * charset.c (wchar_iterator::iterate): Resize the vector instead
9530         of reserving it.
9531         * common/byte-vector.h: Include "common/def-vector.h".
9532         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9533         * cli/cli-dump.c: Include "common/byte-vector.h".
9534         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9535         * common/byte-vector.h: New file.
9536         * common/def-vector.h: New file.
9537         * common/default-init-alloc.h: New file.
9538         * dwarf2loc.c: Include "common/byte-vector.h".
9539         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9540         instead of reserving it.
9541         * dwarf2read.c: Include "common/byte-vector.h".
9542         (data_buf::m_vec): Now a gdb::byte_vector.
9543         * gdb_regex.c: Include "common/def-vector.h".
9544         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9545         * mi/mi-main.c: Include "common/byte-vector.h".
9546         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9547         * printcmd.c: Include "common/byte-vector.h".
9548         (print_scalar_formatted): Use gdb::byte_vector.
9549         * valprint.c: Include "common/byte-vector.h".
9550         (maybe_negate_by_bytes, print_decimal_chars): Use
9551         gdb::byte_vector.
9552
9553 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9554
9555         * darwin-nat.c: Include "nat/fork-inferior.h".
9556
9557 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9558
9559         * configure.nat: Factor out Darwin bits that are not
9560         architecture-specific.  Add fork-inferior.o.
9561
9562 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9563
9564         * configure.nat: Factor out AIX bits that are not
9565         architecture-specific.  Add fork-inferior.o.
9566
9567 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9568
9569         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9570         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9571         wrappers that just call rw_pieced_value.
9572
9573 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9574
9575         * dwarf2loc.c (write_pieced_value): When writing the data for a
9576         memory piece, use write_memory_with_notification instead of
9577         write_memory.
9578
9579 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9580
9581         * valops.c (read_value_memory): Change embedded_offset to
9582         represent a bit offset instead of a byte offset.
9583         * value.h (read_value_memory): Adjust comment.
9584
9585 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9586
9587         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9588         dest_offset_bits and source_offset_bits.
9589         (write_pieced_value): Likewise.
9590
9591 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9592
9593         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9594         given by DW_OP_bit_piece.
9595         (write_pieced_value): Likewise.
9596
9597 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9598
9599         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9600         some other preparations to the places where sufficient information
9601         is available.
9602         (write_pieced_value): Likewise.
9603
9604 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9605
9606         * dwarf2loc.c (bits_to_bytes): New function.
9607         (read_pieced_value): Fix offset calculations for register pieces
9608         on big-endian targets.
9609         (write_pieced_value): Likewise.
9610
9611 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9612
9613         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9614         (write_pieced_value): Likewise.
9615
9616 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9617
9618         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9619         transfer the source value's least significant bits, instead of its
9620         lowest-addressed ones.  Rename type_len to max_offset.
9621         (read_pieced_value): Mirror above changes to write_pieced_value as
9622         applicable.
9623
9624 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9625
9626         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9627         truncate full bytes from dest_offset_bits before using it as an
9628         offset into the buffer.
9629
9630 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9631
9632         * dwarf2loc.c (write_pieced_value): Include transfer size in
9633         byte-wise check.
9634
9635 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9636
9637         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9638         calculation of this_size.
9639
9640 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9641
9642         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9643         when targeting a bit-field.
9644         (write_pieced_value): Likewise.
9645
9646 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9647
9648         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9649         (allocate_piece_closure): Drop addr_size parameter.
9650         (dwarf2_evaluate_loc_desc_full): Adjust call to
9651         allocate_piece_closure.
9652
9653 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9654
9655         PR gdb/21226
9656         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9657         the LSB end, independent of endianness.
9658
9659 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9660
9661         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9662         size capping.
9663
9664 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9665
9666         * mips-linux-nat.c: Move include features/mips*-linux.c to
9667         mips-linux-tdep.c.
9668         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9669         to mips-linux-tdep.c.
9670         * mips-linux-tdep.c: Include features/mips*-linux.c
9671         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9672         functions.
9673         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9674         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9675         (tdesc_mips64_dsp_linux): Declare.
9676
9677 2017-06-12  Tom Tromey  <tom@tromey.com>
9678
9679         * valprint.h (val_print_type_code_int): Remove.
9680         * valprint.c (generic_val_print_int): Always call
9681         val_print_scalar_formatted.
9682         (val_print_type_code_int): Remove.
9683         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9684         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9685         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9686         * ada-valprint.c (ada_val_print_num): Use
9687         val_print_scalar_formatted.
9688
9689 2017-06-12  Tom Tromey  <tom@tromey.com>
9690
9691         * printcmd.c (print_scalar_formatted): Unify the two switches.
9692         Don't convert scalars to LONGEST.
9693
9694 2017-06-12  Tom Tromey  <tom@tromey.com>
9695
9696         PR exp/16225:
9697         * valprint.h (print_decimal_chars): Update.
9698         * valprint.c (maybe_negate_by_bytes): New function.
9699         (print_decimal_chars): Add "is_signed" argument.
9700         * printcmd.c (print_scalar_formatted): Update.
9701
9702 2017-06-12  Tom Tromey  <tom@tromey.com>
9703
9704         PR exp/16225:
9705         * valprint.h (print_binary_chars, print_hex_chars): Update.
9706         * valprint.c (val_print_type_code_int): Update.
9707         (print_binary_chars): Add "zero_pad" argument.
9708         (emit_octal_digit): New function.
9709         (print_octal_chars): Don't zero-pad.
9710         (print_decimal_chars): Likewise.
9711         (print_hex_chars): Add "zero_pad" argument.
9712         * sh64-tdep.c (sh64_do_fp_register): Update.
9713         * regcache.c (regcache::dump): Update.
9714         * printcmd.c (print_scalar_formatted): Update.
9715         * infcmd.c (default_print_one_register_info): Update.
9716
9717 2017-06-12  Pedro Alves  <palves@redhat.com>
9718             Alan Hayward  <alan.hayward@arm.com>
9719
9720         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9721         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9722         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9723         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9724         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9725
9726 2017-06-12  Pedro Alves  <palves@redhat.com>
9727
9728         * dwarf2read.c (mapped_symtab::data): Now a vector of
9729         symtab_index_entry instead of vector of
9730         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9731         whether an element's name is NULL instead of checking whether the
9732         element itself is NULL.
9733         (find_slot): Change return type.  Adjust.
9734         (hash_expand, , add_index_entry, uniquify_cu_indices)
9735         (write_hash_table): Adjust.
9736
9737 2017-06-12  Pedro Alves  <palves@redhat.com>
9738
9739         * dwarf2read.c (recursively_count_psymbols): New function.
9740         (write_psymtabs_to_index): Call it to compute number of psyms and
9741         pass estimate size of psyms_seen to unordered_set's ctor.
9742
9743 2017-06-12  Pedro Alves  <palves@redhat.com>
9744
9745         * dwarf2read.c (write_hash_table): Check if key already exists
9746         before emplacing.
9747
9748 2017-06-12  Pedro Alves  <palves@redhat.com>
9749
9750         * dwarf2read.c (data_buf::append_space): Rename to...
9751         (data_buf::grow): ... this, and make private.  Adjust all callers.
9752         (data_buf::append_uint): New method.
9753         (add_address_entry, write_one_signatured_type)
9754         (write_psymtabs_to_index): Use it.
9755
9756 2017-06-12  Pedro Alves  <palves@redhat.com>
9757
9758         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9759         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9760         (data_buf::file_write): Call ::fwrite directly.
9761
9762 2017-06-12  Pedro Alves  <palves@redhat.com>
9763
9764         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9765         std::vector::erase.
9766
9767 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9768
9769         Code cleanup: C++ify .gdb_index producer.
9770         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9771         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9772         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9773         (create_strtab, add_string): Remove.
9774         (file_write, data_buf): New.
9775         (struct symtab_index_entry): Use std::vector for cu_indices.
9776         (struct mapped_symtab): Use std::vector for data.
9777         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9778         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9779         Remove.
9780         (find_slot): Change return type.  Update it to the new data structures.
9781         (hash_expand, add_index_entry): Update it to the new data structures.
9782         (offset_type_compare): Remove.
9783         (uniquify_cu_indices): Update it to the new data structures.
9784         (c_str_view, c_str_view_hasher, vector_hasher): New.
9785         (add_indices_to_cpool): Remove.
9786         (write_hash_table): Update it to the new data structures.
9787         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9788         (eq_psymtab_cu_index): Remove.
9789         (psym_index_map): New typedef.
9790         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9791         reference and std::unordered_map for cu_index_htab.
9792         (add_address_entry, add_address_entry_worker, write_address_map)
9793         (write_psymbols): Update it to the new data structures.
9794         (write_obstack): Remove.
9795         (struct signatured_type_index_data): Change types_list to a data_buf
9796         reference and psyms_seen to a std::unordered_set reference.
9797         (write_one_signatured_type, recursively_write_psymbols)
9798         (write_psymtabs_to_index): Update it to the new data structures.
9799
9800 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9801
9802         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9803         separate-debug-file commands.
9804         * symfile.h (separate_debug_file_debug): New global.
9805         * symfile.c (separate_debug_file_debug): New global.
9806         (separate_debug_file_exists, find_separate_debug_file): Add
9807         debug output.
9808         (_initialize_symfile): Add "set debug separate-debug-file"
9809         command.
9810         * build-id.c (build_id_to_debug_bfd,
9811         find_separate_debug_file_by_buildid): Add debug output.
9812
9813 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9814
9815         * gdbarch.sh (displaced_step_free_closure): Remove.
9816         * gdbarch.h, gdbarch.c: Re-generate.
9817         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9818         displaced_step_free_closure.
9819         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9820         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9821         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9822         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9823         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9824         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9825         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9826         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9827         * infrun.c (displaced_step_clear): Call xfree instead of
9828         gdbarch_displaced_step_free_closure.
9829
9830 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9831
9832         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9833         NULL".
9834
9835 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9836
9837         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9838         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9839         (mn10300_push_dummy_call): Likewise.
9840
9841 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9842
9843         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9844
9845 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9846
9847         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9848
9849 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9850
9851         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9852         able to start inferiors using a shell.
9853         (New remote packets): Announce new packet "QStartupWithShell".
9854         * remote.c: Add PACKET_QStartupWithShell.
9855         (extended_remote_create_inferior): Handle new
9856         PACKET_QStartupWithShell.
9857         (remote_protocol_features) <QStartupWithShell>: New entry for
9858         PACKET_QStartupWithShell.
9859         (_initialize_remote): Call "add_packet_config_cmd" for
9860         QStartupShell.
9861
9862 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9863             Pedro Alves  <palves@redhat.com>
9864
9865         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9866         and "nat/fork-inferior.h".
9867         * common/common-inferior.h: New file, with contents from
9868         "gdb/inferior.h".
9869         * commom/common-utils.c: Include "common-utils.h".
9870         (stringify_argv): New function.
9871         * common/common-utils.h (stringify_argv): New prototype.
9872         * configure.nat: Add "fork-inferior.o" as a dependency for
9873         "*linux*", "fbsd*" and "nbsd*" hosts.
9874         * corefile.c (get_exec_file): Update comment.
9875         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9876         instead of "startup_inferior".
9877         (darwin_create_inferior): Call "add_thread_silent" after
9878         "fork_inferior".
9879         * fork-child.c: Cleanup unnecessary includes.
9880         (SHELL_FILE): Move to "common/common-fork-child.c".
9881         (environ): Likewise.
9882         (exec_wrapper): Initialize.
9883         (get_exec_wrapper): New function.
9884         (breakup_args): Move to "common/common-fork-child.c"; rename to
9885         "breakup_args_for_exec".
9886         (escape_bang_in_quoted_argument): Move to
9887         "common/common-fork-child.c".
9888         (saved_ui): New variable.
9889         (prefork_hook): New function.
9890         (postfork_hook): Likewise.
9891         (postfork_child_hook): Likewise.
9892         (gdb_startup_inferior): Likewise.
9893         (fork_inferior): Move to "common/common-fork-child.c".  Update
9894         function to support gdbserver.
9895         (startup_inferior): Likewise.
9896         * gdbcore.h (get_exec_file): Remove declaration.
9897         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9898         instead of "startup_inferior".  Call "add_thread_silent" after
9899         "fork_inferior".
9900         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9901         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9902         instead of "startup_inferior".  Call "add_thread_silent" after
9903         "fork_inferior".
9904         * inferior.h: Include "common-inferior.h".
9905         (trace_start_error): Move to "common/common-utils.h".
9906         (trace_start_error_with_name): Likewise.
9907         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9908         (startup_inferior): Likewise.
9909         (gdb_startup_inferior): New prototype.
9910         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9911         * nat/fork-inferior.h: New file.
9912         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9913         instead of "startup_inferior".  Call "add_thread_silent" after
9914         "fork_inferior".
9915         * target.h (target_terminal_init): Move prototype to
9916         "target/target.h".
9917         (target_terminal_inferior): Likewise.
9918         (target_terminal_ours): Likewise.
9919         * target/target.h (target_terminal_init): New prototype, moved
9920         from "target.h".
9921         (target_terminal_inferior): Likewise.
9922         (target_terminal_ours): Likewise.
9923         * utils.c (gdb_flush_out_err): New function.
9924
9925 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9926
9927         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9928         * common/common-gdbthread.h: New file, with parts from
9929         "gdb/gdbthread.h".
9930         * gdbthread.h: Include "common-gdbthread.h".
9931         (switch_to_thread): Moved to "common/common-gdbthread.h".
9932
9933 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9934
9935         * Makefile.in (SFILES): Add "common/job-control.c".
9936         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9937         (COMMON_OBS): Add "job-control.o".
9938         * common/job-control.c: New file, with contents from
9939         "gdb/inflow.c".
9940         * common/job-control.h: New file, with contents from "terminal.h".
9941         * fork-child.c: Include "job-control.h".
9942         * inflow.c: Include "job-control.h".
9943         (gdb_setpgid): Move to "common/common-inflow.c".
9944         (_initialize_inflow): Move setting of "job_control" to
9945         "handle_job_control".
9946         * terminal.h (job_control): Moved to "common/common-terminal.h".
9947         (gdb_setpgid): Likewise.
9948         * top.c: Include "job_control.h".
9949         * utils.c: Likewise.
9950         (job_control): Moved to "job-control.c".
9951
9952 2017-06-07  Pedro Alves  <palves@redhat.com>
9953
9954         * Makefile.in (SFILES): Add gdb_regex.c.
9955         (COMMON_OBS): Add gdb_regex.o.
9956         * ada-lang.c (ada_add_standard_exceptions)
9957         (ada_add_exceptions_from_frame, name_matches_regex)
9958         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9959         parameter type to compiled_regex.  Adjust.
9960         (ada_exceptions_list): Use compiled_regex.
9961         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9962         std::unique_ptr<compiled_regex>.
9963         (exception_catchpoint::~exception_catchpoint): Remove regfree
9964         call.
9965         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9966         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9967         * breakpoint.c (solib_catchpoint::compiled): Now a
9968         std::unique_ptr<compiled_regex>.
9969         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9970         (check_status_catch_solib): Adjust to use compiled_regex.
9971         (add_solib_catchpoint): Adjust to use compiled_regex.
9972         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9973         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9974         compiled_regex reference.  Adjust to use it.
9975         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9976         declaration.  Include "gdb_regex.h".
9977         (apropos_cmd): Change regex parameter to compiled_regex reference.
9978         * gdb_regex.c: New file.
9979         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9980         declarations.
9981         (class compiled_regex): New.
9982         * linux-tdep.c: Include "common/gdb_optional.h".
9983         (struct mapping_regexes): New, factored out from
9984         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9985         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9986         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9987         * probe.c: Include "common/gdb_optional.h".
9988         (collect_probes): Use compiled_regex and gdb::optional and remove
9989         cleanups.
9990         * skip.c: Include "common/gdb_optional.h".
9991         (skiplist_entry::compiled_function_regexp): Now a
9992         gdb::optional<compiled_regex>.
9993         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9994         (free_skiplist_entry): Remove regfree call.
9995         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9996         compiled_regex and gdb::optional.
9997         * symtab.c: Include "common/gdb_optional.h".
9998         (search_symbols): Use compiled_regex and gdb::optional.
9999         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10000         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
10001         to gdb_regex.c.
10002
10003 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10004
10005         * regcache.c (regcache::save): Avoid buffer use.
10006         (regcache::dump): Likewise.
10007
10008 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10009
10010         * sh-tdep.c (sh_pseudo_register_read): Remove
10011         MAX_REGISTER_SIZE.
10012         (sh_pseudo_register_write): Likewise.
10013         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10014         (sh64_pseudo_register_write): Likewise
10015
10016 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10017
10018         * aarch64-tdep.c (aarch64_store_return_value): Use
10019         V_REGISTER_SIZE.
10020         (aarch64_pseudo_read_value): Likewise.
10021         (aarch64_pseudo_write): Likewise.
10022
10023 2017-06-06  Yao Qi  <yao.qi@linaro.org>
10024
10025         * regformats/regdef.h (set_register_cache): Remove the
10026         declaration.
10027
10028 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
10029
10030         * frame.c (frame_unwind_register_signed): Use
10031         frame_unwind_register_value.
10032
10033 2017-06-06  Pedro Alves  <palves@redhat.com>
10034
10035         PR breakpoints/21553
10036         * breakpoint.c (create_breakpoints_sal_default)
10037         (init_breakpoint_sal, create_breakpoint_sal): Use
10038         gdb::unique_xmalloc_ptr for string parameters.
10039         (create_breakpoint): Constify 'extra_string' and 'cond_string'
10040         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
10041         (base_breakpoint_create_breakpoints_sal)
10042         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10043         (strace_marker_create_breakpoints_sal)
10044         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10045         string parameters.
10046         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10047         gdb::unique_xmalloc_ptr for string parameters.
10048         (create_breakpoint): Constify 'extra_string' and 'cond_string'
10049         parameters.
10050
10051 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
10052
10053         * alpha-tdep.c (alpha_register_to_value): Use
10054         get_frame_register_value.
10055         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10056
10057 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
10058
10059         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10060         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10061         (ia64_value_to_register): Likewise.
10062         (ia64_extract_return_value): Likewise.
10063         (ia64_store_return_value): Likewise.
10064         (ia64_push_dummy_call): Likewise.
10065
10066 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
10067
10068         GDB 8.0 released.
10069
10070 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
10071
10072         * x86-linux-nat.c (struct arch_lwp_info): Remove.
10073
10074 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
10075
10076         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10077         parameter.
10078         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10079
10080 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
10081
10082         * event-loop.c (poll_timers): Unallocate timer using delete
10083         instead of xfree.
10084
10085 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10086
10087         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10088         (struct breakpoint) <~breakpoint>: New.
10089         (struct watchpoint): Inherit from breakpoint.
10090         <~watchpoint>: New.
10091         <base>: Remove.
10092         (struct tracepoint): Inherit from breakpoint.
10093         <base>: Remove.
10094         * breakpoint.c (longjmp_breakpoint_ops): Remove.
10095         (struct longjmp_breakpoint): Inherit from breakpoint.
10096         <~longjmp_breakpoint>: New.
10097         <base>: Remove.
10098         (new_breakpoint_from_type): Remove casts.
10099         (watchpoint_in_thread_scope): Remove reference to base field.
10100         (watchpoint_del_at_next_stop): Likewise.
10101         (update_watchpoint): Likewise.
10102         (watchpoint_check): Likewise.
10103         (bpstat_check_watchpoint): Likewise.
10104         (set_longjmp_breakpoint): Likewise.
10105         (struct fork_catchpoint): Inherit from breakpoint.
10106         <base>: Remove.
10107         (struct solib_catchpoint): Inherit from breakpoint.
10108         <~solib_catchpoint>: New.
10109         <base>: Remove.
10110         (dtor_catch_solib): Change to ...
10111         (solib_catchpoint::~solib_catchpoint): ... this.
10112         (breakpoint_hit_catch_solib): Remove reference to base field.
10113         (add_solib_catchpoint): Likewise.
10114         (create_fork_vfork_event_catchpoint): Likewise.
10115         (struct exec_catchpoint): Inherit from breakpoint.
10116         <~exec_catchpoint>: New.
10117         <base>: Remove.
10118         (dtor_catch_exec): Change to ...
10119         (exec_catchpoint::~exec_catchpoint): ... this.
10120         (dtor_watchpoint): Change to ...
10121         (watchpoint::~watchpoint): ... this.
10122         (watch_command_1): Remove reference to base field.
10123         (catch_exec_command_1): Likewise.
10124         (base_breakpoint_dtor): Change to ...
10125         (breakpoint::~breakpoint): ... this.
10126         (base_breakpoint_ops): Remove dtor field value.
10127         (longjmp_bkpt_dtor): Change to ...
10128         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10129         (strace_marker_create_breakpoints_sal): Remove reference to base
10130         field.
10131         (delete_breakpoint): Don't manually call breakpoint destructor.
10132         (create_tracepoint_from_upload): Remove reference to base field.
10133         (trace_pass_set_count): Likewise.
10134         (initialize_breakpoint_ops): Don't initialize
10135         momentary_breakpoint_ops, don't set dtors.
10136         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10137         <~ada_catchpoint>: New.
10138         <base>: Remove.
10139         (create_excep_cond_exprs): Remove reference to base field.
10140         (dtor_exception): Change to ...
10141         (ada_catchpoint::~ada_catchpoint): ... this.
10142         (dtor_catch_exception): Remove.
10143         (dtor_catch_exception_unhandled): Remove.
10144         (dtor_catch_assert): Remove.
10145         (create_ada_exception_catchpoint): Remove reference to base
10146         field.
10147         (initialize_ada_catchpoint_ops): Don't set dtors.
10148         * break-catch-sig.c (struct signal_catchpoint): Inherit from
10149         breakpoint.
10150         <~signal_catchpoint>: New.
10151         <base>: Remove.
10152         (signal_catchpoint_dtor): Change to ...
10153         (signal_catchpoint::~signal_catchpoint): ... this.
10154         (create_signal_catchpoint): Remove reference to base field.
10155         (initialize_signal_catchpoint_ops): Don't set dtor.
10156         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10157         from breakpoint.
10158         <~syscall_catchpoint>: New.
10159         <base>: Remove.
10160         (dtor_catch_syscall): Change to ...
10161         (syscall_catchpoint::~syscall_catchpoint): ... this.
10162         (create_syscall_event_catchpoint): Remove reference to base
10163         field.
10164         (initialize_syscall_catchpoint_ops): Don't set dtor.
10165         * break-catch-throw.c (struct exception_catchpoint): Inherit
10166         from breakpoint.
10167         <~exception_catchpoint>: New.
10168         <base>: Remove.
10169         (dtor_exception_catchpoint): Change to ...
10170         (exception_catchpoint::~exception_catchpoint): ... this.
10171         (handle_gnu_v3_exceptions): Remove reference to base field.
10172         (initialize_throw_catchpoint_ops): Don't set dtor.
10173         * ctf.c (ctf_get_traceframe_address): Remove reference to base
10174         field.
10175         * remote.c (remote_get_tracepoint_status): Likewise.
10176         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10177         * tracefile.c (tracefile_fetch_registers): Likewise.
10178         * tracepoint.c (actions_command): Likewise.
10179         (validate_actionline): Likewise.
10180         (tfind_1): Likewise.
10181         (get_traceframe_location): Likewise.
10182         (find_matching_tracepoint_location): Likewise.
10183         (parse_tracepoint_status): Likewise.
10184         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10185
10186 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10187
10188         * breakpoint.c (struct longjmp_breakpoint): New struct.
10189         (is_tracepoint_type): Change return type to bool.
10190         (is_longjmp_type): New function.
10191         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10192         (set_raw_breakpoint_without_location): Use
10193         new_breakpoint_from_type.
10194         (set_raw_breakpoint): Likewise.
10195
10196 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10197
10198         * breakpoint.c (new_breakpoint_from_type): New function.
10199         (create_breakpoint_sal): Use new_breakpoint_from_type and
10200         unique_ptr.
10201         (create_breakpoint): Likewise.
10202
10203 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
10204
10205         * memattr.c (mem_info_command): Rename to ...
10206         (info_mem_command): ... this.
10207         (mem_enable_command): Rename to ...
10208         (enable_mem_command): ... this.
10209         (mem_disable_command): Rename to ...
10210         (disable_mem_command): ... this.
10211         (mem_delete_command): Rename to ...
10212         (delete_mem_command): ... this.
10213         (_initialize_mem): Adjust function names.
10214
10215 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10216
10217         * btrace.c (handle_pt_insn_events): New.
10218         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
10219         STATUS.  Split into this and ...
10220         (handle_pt_insn_event_flags): ... this.
10221
10222 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10223
10224         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10225         and struct pt_insn.resynced.
10226         * configure: Regenerated.
10227         * config.in: Regenerated.
10228
10229 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10230
10231         * btrace.c (ftrace_find_call_by_number): New function.
10232         (ftrace_new_function): Store objects, not pointers.
10233         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10234         ftrace_new_gap, ftrace_update_function,
10235         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10236         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10237         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10238         btrace_ends_with_single_insn, btrace_call_get): Account for
10239         btrace_thread_info::functions now storing objects.
10240         * btrace.h (struct btrace_thread_info): Add constructor.
10241         (struct btrace_thread_info) <functions>: Make std::vector.
10242         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10243         Initialize with default values.
10244         * record-btrace.c (record_btrace_frame_sniffer): Account for
10245         btrace_thread_info::functions now storing objects.
10246
10247 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10248
10249         * btrace.c: Remove typedef bfun_s.
10250         (ftrace_new_gap): Directly add gaps to the list of gaps.
10251         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10252         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10253         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10254         instead of gdb VEC.
10255
10256 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10257
10258         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10259         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10260         with btrace_thread_info::next_segment and
10261         btrace_thread_info::prev_segment.
10262         * btrace.h: Remove struct btrace_func_link.
10263         (struct btrace_function): Replace pair of function segment pointers
10264         with pair of indices.
10265         * python/py-record-btrace.c (btpy_call_prev_sibling,
10266         btpy_call_next_sibling): Replace references to
10267         btrace_thread_info::segment with btrace_thread_info::next_segment and
10268         btrace_thread_info::prev_segment.
10269         * record-btrace.c (record_btrace_frame_this_id): Use
10270         btrace_find_call_by_number.
10271
10272 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10273
10274         * btrace.c (ftrace_new_function, ftrace_fixup_level,
10275         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10276         btrace_insn_next, btrace_insn_prev): Remove references to
10277         btrace_thread_info::flow.
10278         * btrace.h (struct btrace_function): Remove FLOW.
10279
10280 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10281
10282         * btrace.c (ftrace_find_call_by_number): New function.
10283         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10284         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10285         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10286         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10287         index.
10288         * btrace.h (struct btrace_function): Turn UP into an index.
10289         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10290         as an index.
10291         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10292         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10293         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10294
10295 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10296
10297         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10298         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10299         ftrace_update_function, ftrace_compute_global_level_offset,
10300         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10301         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10302         btrace_insn_end, btrace_is_empty): Remove references to
10303         btrace_thread_info::begin and btrace_thread_info::end.
10304         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10305         (struct btrace_thread_info) <functions>: Adjust comment.
10306         * record-btrace.c (record_btrace_start_replaying): Remove reference to
10307         btrace_thread_info::begin.
10308
10309 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10310
10311         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10312         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10313         ftrace_update_function): Remove arguments that implicitly were always
10314         BTINFO->END.
10315         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10316         Don't pass BTINFO->END.
10317
10318 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10319
10320         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10321         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10322         btrace_find_insn_by_number): Replace function segment pointer with
10323         index.
10324         (btrace_insn_cmp): Simplify.
10325         * btrace.h: (struct btrace_insn_iterator) Rename index to
10326         insn_index.  Replace function segment pointer with index into function
10327         segment vector.
10328         * record-btrace.c (record_btrace_call_history): Replace function
10329         segment pointer use with index.
10330         (record_btrace_frame_sniffer): Retrieve function call segment through
10331         vector.
10332         (record_btrace_set_replay): Remove defunc't safety check.
10333
10334 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10335
10336         * btrace.c (btrace_ends_with_single_insn): New function.
10337         (btrace_call_get, btrace_call_number, btrace_call_begin,
10338         btrace_call_end, btrace_call_next, btrace_call_prev,
10339         btrace_find_call_by_number): Use index into call segment vector
10340         instead of pointer.
10341         (btrace_call_cmp): Simplify.
10342         * btrace.h (struct btrace_call_iterator): Replace function call segment
10343         pointer with index into vector.
10344         * record-btrace.c (record_btrace_call_history): Use index instead of
10345         pointer.
10346
10347 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10348
10349         * btrace.c (btrace_insn_begin, btrace_insn_end,
10350         btrace_find_insn_by_number): Add btinfo to iterator.
10351         * btrace.h (struct btrace_insn_iterator): Add btinfo.
10352
10353 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10354
10355         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10356         and save pointers directly.
10357         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10358         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10359         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
10360         changed signature of functions.
10361         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10362         (btrace_fetch): Remove code that adds btrace_function pointers to
10363         vector of btrace_functions.
10364         (btrace_clear): Simplify freeing vector of btrace_functions.
10365
10366 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10367
10368         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10369         Replace VEC_* with std::vector functions.
10370         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10371         (struct btrace_thread_info)<functions>: Change type to std::vector.
10372
10373 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
10374
10375         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
10376         "Removed targets and native configurations" up.  Merge duplicate
10377         "New commands" sub-sections.  Add "New options" sub-sections.
10378
10379 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
10380
10381         * defs.h (copy_integer_to_size): New declaration.
10382         * findvar.c (copy_integer_to_size): New function.
10383         (do_cint_test): New selftest function.
10384         (copy_integer_to_size_test): Likewise.
10385         (_initialize_findvar): Likewise.
10386         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10387         (mips_fbsd_collect_reg): Use raw_collect_integer.
10388         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10389         (mips64_fill_gregset): Use raw_collect_integer
10390         (mips64_fill_fpregset): Use raw_supply_integer.
10391         * regcache.c (regcache::raw_supply_integer): New function.
10392         (regcache::raw_collect_integer): Likewise.
10393         * regcache.h: (regcache::raw_supply_integer): New declaration.
10394         (regcache::raw_collect_integer): Likewise.
10395
10396 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10397
10398         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10399         (COMMON_OBS): Add gdbarch-selftests.o.
10400         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10401         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10402         * gdbarch-selftests.c: New file.
10403         * regcache.h (regcache) <~regcache>: Mark it virtual if
10404         GDB_SELF_TEST.
10405         <raw_write>: Likewise.
10406
10407 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10408
10409         * regcache.c (current_regcache): Change it to
10410         regcache::current_regcache.
10411         (regcache_observer_target_changed): Update.
10412         (regcache_thread_ptid_changed): Make it a regcache static
10413         method.
10414         (regcache_thread_ptid_changed): Update.
10415         (class regcache_access): New.
10416         (current_regcache_test): Update.
10417         (_initialize_regcache): Update.
10418         * regcache.h: Include forward_list.
10419         (regcache): Declare regcache_thread_ptid_changed and declare
10420         registers_changed_ptid as friend.
10421
10422 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10423
10424         * i387-tdep.c (i387_register_to_value): Use register_size
10425         instead of TYPE_LENGTH.
10426         * m68k-tdep.c (m68k_register_to_value): Likewise.
10427
10428 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10429
10430         * i387-tdep.c (i387_convert_register_p): Return false if type
10431         code isn't TYPE_CODE_FLT.
10432
10433 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10434
10435         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10436         length is 4.
10437         (alpha_register_to_value): Remove type length check.
10438         (alpha_value_to_register): Likewise.
10439
10440 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10441
10442         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10443         TYPE_CODE_FLT.
10444
10445 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10446
10447         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10448         TYPE_CODE_FLT or not.
10449
10450 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10451
10452         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10453         * avr-tdep.c (avr_gdbarch_init): Likewise.
10454         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10455         * cris-tdep.c (cris_gdbarch_init): Likewise.
10456         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10457         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10458         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10459         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10460         * mep-tdep.c (mep_gdbarch_init): Likewise.
10461         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10462         * mips-tdep.c (mips_gdbarch_init): Likewise.
10463         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10464         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10465         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10466         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10467         * v850-tdep.c (v850_gdbarch_init): Likewise.
10468
10469 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10470
10471         * selftest-arch.c (tests_with_arch): Call registers_changed
10472         and reinit_frame_cache.
10473         * selftest.c (run_self_tests): Likewise.
10474
10475 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10476
10477         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10478         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10479
10480 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10481
10482         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10483         set_gdbarch_print_insn.
10484
10485 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10486
10487         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10488         set_gdbarch_print_insn.
10489
10490 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10491
10492         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10493         set_gdbarch_print_insn.
10494         * arc-tdep.c (arc_gdbarch_init): Likewise.
10495         * arch-utils.c: include dis-asm.h.
10496         (default_print_insn): New function.
10497         * arch-utils.h (default_print_insn): Declare.
10498         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10499         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10500         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10501         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10502         * frv-tdep.c (frv_gdbarch_init): Likewise.
10503         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10504         * gdbarch.sh (print_insn): Use default_print_insn.
10505         * gdbarch.c: Regenerated.
10506         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10507         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10508         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10509         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10510         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10511         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10512         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10513         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10514         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10515         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10516         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10517         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10518         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10519         * mt-tdep.c (mt_gdbarch_init): Likewise.
10520         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10521         * nios2-tdep.c (nios2_print_insn): Remove.
10522         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10523         * rx-tdep.c (rx_gdbarch_init): Likewise.
10524         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10525         * score-tdep.c (score_print_insn): Remove.
10526         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10527         * sh-tdep.c (sh_gdbarch_init): Likewise.
10528         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10529         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10530         * tic6x-tdep.c (tic6x_print_insn): Remove.
10531         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10532         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10533         * v850-tdep.c (v850_gdbarch_init): Likewise.
10534         * vax-tdep.c (vax_gdbarch_init): Likewise.
10535         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10536         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10537
10538 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10539
10540         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10541         (MIPS_FP0_REGNUM): Remove.
10542         (MIPS_FSR_REGNUM): Remove.
10543         (mips_fbsd_supply_fpregs): Use mips_regnum.
10544         (mips_fbsd_supply_gregs): Likewise.
10545         (mips_fbsd_collect_fpregs): Likewise.
10546         (mips_fbsd_collect_gregs): Likewise.
10547
10548 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10549
10550         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10551         (getpfpregs_supplies): New function.
10552         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10553         getfpregs_supplies.
10554         (mips_fbsd_store_inferior_registers): Likewise.
10555
10556 2017-05-22  Pedro Alves <palves@redhat.com>
10557
10558         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10559         maintainer.
10560
10561 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10562
10563         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10564         (store_register): Likewise.
10565         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10566         (get_decimal_float_return_value): Likewise.
10567         (do_ppc_sysv_return_value): Likewise.
10568         (ppc64_sysv_abi_push_integer): Likewise.
10569         (ppc64_sysv_abi_push_freg): Likewise.
10570         (ppc64_sysv_abi_return_value_base): Likewise.
10571         (ppc64_sysv_abi_return_value): Likewise.
10572         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10573         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10574         * rs6000-nat.c: Likewise.
10575         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10576         (rs6000_value_to_register): Likewise.
10577         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10578
10579 2017-05-21  Tom Tromey  <tom@tromey.com>
10580
10581         PR rust/21466:
10582         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10583         arrays as "[T]", not "[T; ]".
10584
10585 2017-05-19  Tom Tromey  <tom@tromey.com>
10586
10587         PR rust/21484:
10588         * rust-lang.c (exp_descriptor_rust): New function.
10589         (rust_language_defn): Use it.
10590         * p-lang.c (pascal_language_defn): Update.
10591         * opencl-lang.c (opencl_language_defn): Update.
10592         * objc-lang.c (objc_language_defn): Update.
10593         * m2-lang.c (m2_language_defn): Update.
10594         * language.h (struct language_defn)
10595         <la_watch_location_expression>: New member.
10596         * language.c (unknown_language_defn, auto_language_defn)
10597         (local_language_defn): Update.
10598         * go-lang.c (go_language_defn): Update.
10599         * f-lang.c (f_language_defn): Update.
10600         * d-lang.c (d_language_defn): Update.
10601         * c-lang.h (c_watch_location_expression): Declare.
10602         * c-lang.c (c_watch_location_expression): New function.
10603         (c_language_defn, cplus_language_defn, asm_language_defn)
10604         (minimal_language_defn): Use it.
10605         * breakpoint.c (watch_command_1): Call
10606         la_watch_location_expression.
10607         * ada-lang.c (ada_language_defn): Update.
10608
10609 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10610
10611         PR tui/21482
10612         * gdb_curses.h (NOMACROS): Define.
10613         (NCURSES_NOMACROS): Define.
10614
10615 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10616
10617         PR tui/21482
10618         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10619         arg to char *.
10620         * tui/tui-wingeneral.c (box_win): Likewise.
10621         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10622         (tui_show_source_line): Likewise.
10623         (tui_show_exec_info_content): Likewise.
10624
10625 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10626
10627         * sparc-tdep.c (sparc_structure_return_p)
10628         (sparc_arg_on_registers_p): New functions.
10629         (sparc32_store_arguments): Use them.
10630         * sparc64-tdep.c (sparc64_16_byte_align_p)
10631         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10632         Handle TYPE_CODE_ARRAY.
10633
10634 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10635
10636         * cli/cli-decode.c (add_alias_cmd): New function.
10637         * command.h (add_alias_cmd): Declare.
10638         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10639         instead call add_alias_cmd.
10640
10641 2017-05-17  Pedro Alves  <palves@redhat.com>
10642
10643         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10644         (nat_makefile_frag): ... this.  All references updated.
10645         * configure.ac: Likewise.
10646         * configure.nat: Likewise.  Enhance comments.
10647         * configure: Regenerate.
10648
10649 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10650
10651         * procfs.c (procfs_create_inferior): Change prototype to match
10652         definition.
10653
10654 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10655
10656         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10657         C++ compiler warning.
10658
10659 2017-05-12  Tom Tromey  <tom@tromey.com>
10660
10661         PR rust/21483:
10662         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10663         recurse, just call value_struct_elt directly.
10664
10665 2017-05-12  Tom Tromey  <tom@tromey.com>
10666
10667         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10668         OP_RUST_ARRAY>: Fix.
10669
10670 2017-05-12  Tom Tromey  <tom@tromey.com>
10671
10672         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10673
10674 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10675
10676         * regcache.c: Include <forward_list>.
10677         (struct regcache_list): Remove.
10678         (current_regcache): Update.
10679         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10680         (regcache_thread_ptid_changed): Likewise.
10681         (registers_changed_ptid): Likewise.
10682         (current_regcache_size): Likewise.
10683
10684 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10685
10686         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10687         (current_regcache_size): New function.
10688         (current_regcache_test): New function.
10689         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10690
10691 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10692
10693         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10694         (print_gp_register_row): Use get_frame_register_value.
10695
10696 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10697
10698         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10699         (mips_supply_fpregset): Likewise.
10700         (mips64_supply_gregset): Likewise.
10701
10702 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10703
10704         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10705         regcache->raw_supply_zeroed.
10706
10707 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10708
10709         * configure.nat: Rearrange 'case' statements to match
10710         host before cpu.
10711
10712 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10713
10714         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10715         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10716         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10717         "@nat_extra_makefile_frag@".
10718         (Makefile): Remove dependency on "@frags@".
10719         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10720         (data-directory/Makefile): Likewise.
10721         * config/aarch64/linux.mh: Deleted; moved contents to
10722         "gdb/configure.nat".
10723         * config/alpha/alpha-linux.mh: Likewise.
10724         * config/alpha/nbsd.mh: Likewise.
10725         * config/arm/linux.mh: Likewise.
10726         * config/arm/nbsdelf.mh: Likewise.
10727         * config/i386/cygwin.mh: Likewise.
10728         * config/i386/cygwin64.mh: Likewise.
10729         * config/i386/darwin.mh: Likewise.
10730         * config/i386/fbsd.mh: Likewise.
10731         * config/i386/fbsd64.mh: Likewise.
10732         * config/i386/go32.mh: Likewise.
10733         * config/i386/i386gnu.mh: Likewise.
10734         * config/i386/i386sol2.mh: Likewise.
10735         * config/i386/linux.mh: Likewise.
10736         * config/i386/linux64.mh: Likewise.
10737         * config/i386/mingw.mh: Likewise.
10738         * config/i386/mingw64.mh: Likewise.
10739         * config/i386/nbsd64.mh: Likewise.
10740         * config/i386/nbsdelf.mh: Likewise.
10741         * config/i386/nto.mh: Likewise.
10742         * config/i386/obsd.mh: Likewise.
10743         * config/i386/obsd64.mh: Likewise.
10744         * config/i386/sol2-64.mh: Likewise.
10745         * config/ia64/linux.mh: Likewise.
10746         * config/m32r/linux.mh: Likewise.
10747         * config/m68k/linux.mh: Likewise.
10748         * config/m68k/nbsdelf.mh: Likewise.
10749         * config/m68k/obsd.mh: Likewise.
10750         * config/m88k/obsd.mh: Likewise.
10751         * config/mips/fbsd.mh: Likewise.
10752         * config/mips/linux.mh: Likewise.
10753         * config/mips/nbsd.mh: Likewise.
10754         * config/mips/obsd64.mh: Likewise.
10755         * config/pa/linux.mh: Likewise.
10756         * config/pa/nbsd.mh: Likewise.
10757         * config/pa/obsd.mh: Likewise.
10758         * config/powerpc/aix.mh: Likewise.
10759         * config/powerpc/fbsd.mh: Likewise.
10760         * config/powerpc/linux.mh: Likewise.
10761         * config/powerpc/nbsd.mh: Likewise.
10762         * config/powerpc/obsd.mh: Likewise.
10763         * config/powerpc/ppc64-linux.mh: Likewise.
10764         * config/powerpc/spu-linux.mh: Likewise.
10765         * config/s390/linux.mh: Likewise.
10766         * config/sh/nbsd.mh: Likewise.
10767         * config/sparc/fbsd.mh: Likewise.
10768         * config/sparc/linux.mh: Likewise.
10769         * config/sparc/linux64.mh: Likewise.
10770         * config/sparc/nbsd64.mh: Likewise.
10771         * config/sparc/nbsdelf.mh: Likewise.
10772         * config/sparc/obsd64.mh: Likewise.
10773         * config/sparc/sol2.mh: Likewise.
10774         * config/tilegx/linux.mh: Likewise.
10775         * config/vax/nbsdelf.mh: Likewise.
10776         * config/vax/obsd.mh: Likewise.
10777         * config/xtensa/linux.mh: Likewise.
10778         * config/i386/i386gnu.mn: New file, with excerpts from
10779         "config/i386/i386gnu.mh".
10780         * configure: Regenerate.
10781         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10782         *.mh files under "gdb/config".
10783         * configure.nat: New file, with contents from the
10784         "gdb/config/*/*.mh" files.
10785
10786 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10787
10788         * btrace.c (btrace_clear): Free insn vector.
10789
10790 2017-05-05  Pedro Alves  <palves@redhat.com>
10791
10792         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10793         * configure: Regenerate.
10794
10795 2017-05-04  Pedro Alves  <palves@redhat.com>
10796
10797         * Makefile.in (SFILES): Add progspace-and-thread.c.
10798         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10799         (COMMON_OBS): Add progspace-and-thread.o.
10800         * breakpoint.c: Include "progspace-and-thread.h".
10801         (update_inserted_breakpoint_locations)
10802         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10803         Use scoped_restore_current_pspace_and_thread.
10804         (create_std_terminate_master_breakpoint): Use
10805         scoped_restore_current_program_space.
10806         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10807         (print_breakpoint_location): Use
10808         scoped_restore_current_program_space.
10809         (bp_loc_is_permanent): Use
10810         scoped_restore_current_pspace_and_thread.
10811         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10812         (download_tracepoint_locations): Use
10813         scoped_restore_current_pspace_and_thread.
10814         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10815         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10816         (enum step_over_calls_kind): Moved from inferior.h.
10817         (class scoped_restore_current_thread): New class.
10818         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10819         declaration.
10820         (scoped_restore_current_thread): New class.
10821         * infcmd.c: Include "common/gdb_optional.h".
10822         (continue_1, proceed_after_attach): Use
10823         scoped_restore_current_thread.
10824         (notice_new_inferior): Use scoped_restore_current_thread.
10825         * inferior.c: Include "progspace-and-thread.h".
10826         (restore_inferior, save_current_inferior): Delete.
10827         (add_inferior_command, clone_inferior_command): Use
10828         scoped_restore_current_pspace_and_thread.
10829         * inferior.h (scoped_restore_current_inferior): New class.
10830         * infrun.c: Include "progspace-and-thread.h" and
10831         "common/gdb_optional.h".
10832         (follow_fork_inferior): Use
10833         scoped_restore_current_pspace_and_thread.
10834         (scoped_restore_exited_inferior): New class.
10835         (handle_vfork_child_exec_or_exit): Use
10836         scoped_restore_exited_inferior,
10837         scoped_restore_current_pspace_and_thread,
10838         scoped_restore_current_thread and scoped_restore.
10839         (fetch_inferior_event): Use scoped_restore_current_thread.
10840         * linespec.c (decode_line_full, decode_line_1): Use
10841         scoped_restore_current_program_space.
10842         * mi/mi-main.c: Include "progspace-and-thread.h".
10843         (exec_continue): Use scoped_restore_current_thread.
10844         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10845         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10846         * proc-service.c (ps_pglobal_lookup): Use
10847         scoped_restore_current_program_space.
10848         * progspace-and-thread.c: New file.
10849         * progspace-and-thread.h: New file.
10850         * progspace.c (release_program_space, clone_program_space): Use
10851         scoped_restore_current_program_space.
10852         (restore_program_space, save_current_program_space)
10853         (save_current_space_and_thread): Delete.
10854         (switch_to_program_space_and_thread): Moved to
10855         progspace-and-thread.c.
10856         * progspace.h (save_current_program_space)
10857         (save_current_space_and_thread): Delete declarations.
10858         (scoped_restore_current_program_space): New class.
10859         * remote.c (remote_btrace_maybe_reopen): Use
10860         scoped_restore_current_thread.
10861         * symtab.c: Include "progspace-and-thread.h".
10862         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10863         * thread.c (print_thread_info_1): Use
10864         scoped_restore_current_thread.
10865         (struct current_thread_cleanup): Delete.
10866         (do_restore_current_thread_cleanup)
10867         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10868         (scoped_restore_current_thread::~scoped_restore_current_thread):
10869         ... this new dtor.
10870         (make_cleanup_restore_current_thread): Rename/convert to ...
10871         (scoped_restore_current_thread::scoped_restore_current_thread):
10872         ... this new ctor.
10873         (thread_apply_all_command): Use scoped_restore_current_thread.
10874         (thread_apply_command): Use scoped_restore_current_thread.
10875         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10876         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10877
10878 2017-05-04  Pedro Alves  <palves@redhat.com>
10879
10880         * thread.c (make_cleanup_restore_current_thread): Move
10881         find_thread_ptid call before the is_stopped call.  Assert that the
10882         thread is found.  Replace is_stopped call by checking the thread's
10883         state directly.  Remove unnecessary NULL-thread check.
10884
10885 2017-05-04  Pedro Alves  <palves@redhat.com>
10886
10887         * corelow.c (thread_section_name): New class.
10888         (get_core_register_section, get_core_siginfo): Use it.
10889
10890 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10891
10892         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10893         (get_core_register_section): Remove xfree of NULL pointer.
10894
10895 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10896
10897         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10898         * regcache.c (regcache::raw_supply_zeroed): New function.
10899         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10900
10901 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10902
10903         * gdbarch.sh: Remove commented out definition of
10904         TARGET_CHAR_BIT.
10905         * gdbarch.h: Re-generate.
10906
10907 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10908
10909         * configure: Regenerate.
10910
10911 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10912
10913         * solib-target.c (solib_target_relocate_section_addresses):
10914         Remove num_section_bases, num_bases, segment_bases variables.
10915
10916 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10917
10918         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10919
10920 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10921
10922         * solib-target.c: Include <vector>
10923         (struct lm_info_target) <~lm_info_target>: Remove.
10924         <segment_bases, section_bases>: Change type to
10925         std::vector<CORE_ADDR>.
10926         (library_list_start_segment, library_list_start_section,
10927         library_list_end_library,
10928         solib_target_relocate_section_addresses): Adjust.
10929
10930 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10931
10932         * gdbarch.sh (software_single_step): Change return type to
10933         std::vector<CORE_ADDR>.
10934         * gdbarch.c, gdbarch.h: Re-generate.
10935         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10936         Adjust.
10937         (arm_deal_with_atomic_sequence_raw): Adjust.
10938         (thumb_get_next_pcs_raw): Adjust.
10939         (arm_get_next_pcs_raw): Adjust.
10940         (arm_get_next_pcs): Adjust.
10941         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10942         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10943         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10944         (alpha_software_single_step): Adjust.
10945         * alpha-tdep.h (alpha_software_single_step): Adjust.
10946         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10947         * arm-tdep.c (arm_software_single_step): Adjust.
10948         (arm_breakpoint_kind_from_current_state): Adjust.
10949         * arm-tdep.h (arm_software_single_step): Adjust.
10950         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10951         * cris-tdep.c (cris_software_single_step): Adjust.
10952         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10953         (micromips_deal_with_atomic_sequence): Adjust.
10954         (deal_with_atomic_sequence): Adjust.
10955         (mips_software_single_step): Adjust.
10956         * mips-tdep.h (mips_software_single_step): Adjust.
10957         * moxie-tdep.c (moxie_software_single_step): Adjust.
10958         * nios2-tdep.c (nios2_software_single_step): Adjust.
10959         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10960         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10961         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10962         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10963         * sparc-tdep.c (sparc_software_single_step): Adjust.
10964         * spu-tdep.c (spu_software_single_step): Adjust.
10965         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10966
10967 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10968
10969         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10970         * gdbarch.h: Re-generate.
10971
10972 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10973
10974         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10975         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10976         * python/py-instruction.c, python/py-instruction.h: New file.
10977         * python/py-record.c: Add py-instruction.h include.
10978         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10979         gdb.RecordInstruction.
10980         * python/python-internal.h: Add gdbpy_initialize_instruction
10981         declaration.
10982         * python/python.c (do_start_initialization): Add
10983         gdbpy_initialize_instruction.
10984
10985 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10986
10987         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10988         Remove.
10989         (btrace_func_from_recpy_func): New function.
10990         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10991         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10992         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10993         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10994         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10995         Also, use new helper functions.
10996         (btpy_list_item): Use new helper functions.
10997         (recpy_bt_function_call_history): Use new type name.
10998         (btpy_call_getset): Remove.
10999         (gdbpy_initialize_btrace): Remove code to initialize
11000         gdb.BtraceFunctionCall.
11001         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11002         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11003         recpy_bt_func_prev, recpy_bt_func_next): New export.
11004         * python/py-record.c (recpy_func_type): New static object.
11005         (recpy_func_new, recpy_func_level, recpy_func_symbol,
11006         recpy_func_instructions, recpy_func_up, recpy_func_prev,
11007         recpy_func_next): New function.
11008         (recpy_element_hash, recpy_element_richcompare): Updated comment.
11009         (recpy_func_getset): New static object.
11010         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11011         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11012
11013 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11014
11015         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11016         (btpy_object, btpy_insn_type, btpy_new): Remove.
11017         (btpy_list_object): Use gdb.RecordInstruction type instead of
11018         gdb.BtraceInstruction type.
11019         (btrace_insn_from_recpy_insn): New function.
11020         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11021         btpy_new.
11022         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11023         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11024         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11025         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11026         instead of btpy_object.
11027         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11028         btpy_insn_data, btpy_insn_decode): Rename to ...
11029         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11030         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11031         recpy_bt_insn_decode): This.  Also, use new helper functions.
11032         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11033         recpy_insn_type.
11034         (btpy_insn_getset): Remove.
11035         (gdbpy_initialize_btrace): Remove code to initialize
11036         gdb.BtraceInstruction.  Use recpy_element_object.
11037         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11038         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11039         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11040         * python/py-record.c (recpy_insn_type): New static object.
11041         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11042         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11043         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11044         New function.
11045         (recpy_insn_getset): New static object.
11046         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11047         * python/py-record.h (recpy_element_object): New typedef.
11048         (recpy_insn_type, recpy_insn_new): New export.
11049
11050 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11051
11052         * py-record-btrace.c (btpy_insn_new): Removed.
11053         (btpy_insn_or_gap_new): New function.
11054         (btpy_insn_error): Removed.
11055         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11056         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11057         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11058         btpy_insn_or_gap_new instead of btpy_insn_new.
11059         (btpy_insn_getset): Remove btpy_insn_error.
11060         * py-record.c (recpy_gap_type): New static object.
11061         (recpy_gap_object): New typedef.
11062         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11063         recpy_gap_reason_string): New function.
11064         (recpy_gap_getset): New static object.
11065         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11066         * py-record.h (recpy_gap_new): New export.
11067
11068 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11069
11070         * python/py-record.c (recpy_ptid): Remove.
11071         (recpy_record_getset): Remove recpy_ptid.
11072
11073 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11074
11075         * btrace.c (btrace_fetch): Set inferior_ptid.
11076         * python/py-record-btrace.c: Add "py-record.h" include.
11077         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11078         recpy_bt_end, recpy_bt_instruction_history,
11079         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11080         in gdb.Record object instead of current ptid.
11081         * python/py-record.c: Include new "py-record.h" file.
11082         (recpy_record_object): Moved to py-record.h.
11083         * python/py-record.h: New file.
11084
11085 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11086
11087         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11088         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11089         indentation.
11090
11091 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
11092
11093         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11094         the past maintainers section.
11095
11096 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11097
11098         * infcmd.c (get_return_value): Use regcache ctor, and remove
11099         cleanup.
11100
11101 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11102             Pedro Alves  <palves@redhat.com>
11103
11104         * regcache.c (regcache::regcache): New tag dispatch ctor.
11105         (do_cooked_read): Moved above.
11106         (regcache_dup): Use the tag dispatch ctor..
11107         * regcache.h (regcache): Declare ctor, delete copy ctor and
11108         assignment operator, remove friend regcache_dup.
11109
11110 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11111
11112         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11113         call method save instead of regcache_cpy.
11114         * regcache.h (struct regcache): Make regcache_dup a friend.
11115
11116 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11117
11118         * regcache.c (struct regcache): Move to regcache.h
11119         (regcache::arch): New method.
11120         (regcache_get_ptid): Update.
11121         (get_regcache_arch): Call arch method.
11122         (get_regcache_aspace): Call method aspace.
11123         (register_buffer): Change it to method.
11124         (regcache_save): Change it to regcache::save.
11125         (regcache_restore): Likewise.
11126         (regcache_cpy_no_passthrough): Remove the declaration.
11127         (regcache_cpy): Call methods restore and cpy_no_passthrough.
11128         (regcache_cpy_no_passthrough): Change it to method
11129         cpy_no_passthrough.
11130         (regcache_register_status): Change it to method
11131         get_register_status.
11132         (regcache_invalidate): Change it to method invalidate.
11133         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11134         (regcache_raw_update): Change it to method raw_update.
11135         (regcache_raw_read): Likewise.
11136         (regcache_raw_read_signed): Likewise.
11137         (regcache_raw_read_unsigned): Likewise.
11138         (regcache_raw_write_signed): Likewise.
11139         (regcache_raw_write_unsigned): Likewise.
11140         (regcache_cooked_read): Likewise.
11141         (regcache_cooked_read_value): Likewise.
11142         (regcache_cooked_read_signed): Likewise.
11143         (regcache_cooked_read_unsigned): Likewise.
11144         (regcache_cooked_write_signed): Likewise.
11145         (regcache_cooked_write_unsigned): Likewise.
11146         (regcache_raw_set_cached_value): Likewise.
11147         (regcache_raw_write): Likewise.
11148         (regcache_cooked_write): Likewise.
11149         (regcache_xfer_part): Likewise.
11150         (regcache_raw_read_part): Likewise.
11151         (regcache_raw_write_part): Likewise.
11152         (regcache_cooked_read_part): Likewise.
11153         (regcache_cooked_write_part): Likewise.
11154         (regcache_raw_supply): Likewise.
11155         (regcache_raw_collect): Likewise.
11156         (regcache_transfer_regset): Likewise.
11157         (regcache_supply_regset): Likewise.
11158         (regcache_collect_regset): Likewise.
11159         (regcache_debug_print_register): Likewise.
11160         (enum regcache_dump_what): Move it to regcache.h.
11161         (regcache_dump): Change it to method dump.
11162         * regcache.h (enum regcache_dump_what): New.
11163         (class regcache): New.
11164         * target.c (target_fetch_registers): Call method
11165         debug_print_register.
11166         (target_store_registers): Likewise.
11167
11168 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11169
11170         * windows-nat.c (struct lm_info_windows): Initialize field.
11171         (windows_make_so): Allocate lm_info_windows with new.
11172         (windows_free_so): Free lm_info_windows with delete.
11173
11174 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11175
11176         * solib-darwin.c (struct lm_info_darwin): Initialize field.
11177         (darwin_current_sos): Allocate lm_info_darwin with new, remove
11178         cleanup.
11179         (darwin_free_so): Free lm_info_darwin with delete.
11180
11181 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11182
11183         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11184         <l_addr_p>: Change type to bool.
11185         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11186         (svr4_free_so): Free lm_info_svr4 with delete.
11187         (svr4_copy_library_list): Replace memcpy with call to copy
11188         constructor.
11189         (library_list_start_library, svr4_default_sos): Allocate
11190         lm_info_svr4 with new.
11191
11192 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11193
11194         * solib-target.c (struct lm_info_target): Add destructor,
11195         initialize fields.
11196         <name>: Change type to std::string.
11197         (library_list_start_library): Allocate lm_info_target with new.
11198         (solib_target_free_library_list): Free lm_info_target with
11199         delete.
11200         (solib_target_current_sos): Adapt to std::string.
11201         (solib_target_free_so): Free lm_info_target with delete.
11202
11203 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11204
11205         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11206         fields.
11207         (frv_current_sos): Allocate lm_info_frv with new.
11208         (frv_relocate_main_executable): Free lm_info_frv with delete,
11209         allocate with new.
11210         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11211
11212 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11213
11214         * solib-frv.c (struct lm_info_frv): Fix indentation.
11215
11216 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11217
11218         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11219         map field.
11220         (dsbt_current_sos): Allocate lm_info_dsbt with new.
11221         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11222         and allocate with new.
11223         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11224
11225 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11226
11227         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11228         <filename, member_name>: Change type to std::string.
11229         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11230         (library_list_start_library): Allocate lm_info_aix with new.
11231         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11232         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11233         with copy constructor.
11234
11235 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11236
11237         * solist.h (struct lm_info): Remove.
11238         (struct lm_info_base): New class.
11239         (struct so_list) <lm_info>: Change type to lm_info_base *.
11240         * nto-tdep.c (struct lm_info): Remove.
11241         (lm_addr): Adjust.
11242         * solib-aix.c (struct lm_info): Rename to ...
11243         (struct lm_info_aix): ... this.  Extend lm_info_base.
11244         (lm_info_p): Rename to ...
11245         (lm_info_aix_p): ... this, and adjust.
11246         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11247         solib_aix_parse_libraries, library_list_start_library,
11248         solib_aix_free_library_list, solib_aix_parse_libraries,
11249         solib_aix_get_library_list,
11250         solib_aix_relocate_section_addresses, solib_aix_free_so,
11251         solib_aix_get_section_offsets,
11252         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11253         Adjust.
11254         (struct solib_aix_inferior_data) <library_list>: Adjust.
11255         * solib-darwin.c (struct lm_info): Rename to ...
11256         (struct lm_info_darwin): ... this.  Extend lm_info_base.
11257         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11258         * solib-dsbt.c (struct lm_info): Rename to ...
11259         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
11260         (struct dsbt_info) <main_executable_lm_info): Adjust.
11261         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11262         dsbt_relocate_section_addresses): Adjust.
11263         * solib-frv.c (struct lm_info): Rename to ...
11264         (struct lm_info_frv): ... this.  Extend lm_info_base.
11265         (main_executable_lm_info): Adjust.
11266         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11267         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11268         find_canonical_descriptor_in_load_object,
11269         frv_fdpic_find_canonical_descriptor): Adjust.
11270         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11271         to lm_info_svr4.
11272         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11273         svr4_clear_so, svr4_copy_library_list,
11274         library_list_start_library, svr4_default_sos, svr4_read_so_list,
11275         svr4_current_sos, svr4_fetch_objfile_link_map,
11276         solist_update_incremental): Adjust.
11277         * solib-svr4.h (struct lm_info_svr4): Move here from
11278         solib-svr4.c.
11279         * solib-target.c (struct lm_info): Rename to ...
11280         (struct lm_info_target): ... this.  Extend lm_info_base.
11281         (lm_info_p): Rename to ...
11282         (lm_info_target_p): ... this.
11283         (solib_target_parse_libraries, library_list_start_segment,
11284         library_list_start_section, library_list_start_library,
11285         library_list_end_library, solib_target_free_library_list,
11286         solib_target_current_sos, solib_target_free_so,
11287         solib_target_relocate_section_addresses): Adjust.
11288         * windows-nat.c (struct lm_info): Rename to ...
11289         (struct lm_info_windows): ... this.  Extend lm_info_base.
11290         (windows_make_so, handle_load_dll, handle_unload_dll,
11291         windows_xfer_shared_libraries): Adjust.
11292
11293 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11294
11295         * solib-darwin.c (struct darwin_so_list): Remove.
11296         (darwin_current_sos): Allocate an so_list object instead of a
11297         darwin_so_list, separately allocate an lm_info object.
11298         (darwin_free_so): Free lm_info.
11299
11300 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
11301
11302         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11303         with fprintf_filtered.
11304
11305 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11306
11307         * regcache.c (regcache::regcache): New function.
11308         (regcache::~regcache): New function.
11309         (regcache_xmalloc_1): Remove.
11310         (regcache_xmalloc): Call new regcache.
11311         (regcache_xfree): Call delete regcache.
11312         (get_thread_arch_aspace_regcache): Call new regcache.
11313
11314 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11315
11316         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11317         lwp instead of ptid_get_lwp.
11318
11319 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11320
11321         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11322         lwp_info instead of getting from inferior_ptid.
11323
11324 2017-04-27  Keith Seitz  <keiths@redhat.com>
11325
11326         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11327         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11328         (CV_CONVERSION_BADNESS): Define.
11329         (rank_one_type): Remove overly restrictive rvalue reference
11330         rank checks.
11331         Add cv-qualifier checks and subranks for type equality.
11332         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11333         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11334         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11335
11336 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
11337
11338         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11339         count when creating the object.
11340
11341 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
11342             Ulrich Weigand  <uweigand@de.ibm.com>
11343
11344         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11345         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11346         is used in AIX.
11347         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11348         (process_xcoff_symbol): Likewise.
11349         (scan_xcoff_symtab): Likewise.
11350
11351 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11352
11353         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11354         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11355         (ia64_access_reg): Use get_frame_register_unsigned.
11356         (ia64_access_rse_reg): Likewise.
11357         (ia64_libunwind_frame_prev_register): Likewise.
11358
11359 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
11360
11361         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11362         * gdbarch.c: Regenerated.
11363         * gdbarch.h: Regenerated.
11364         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11365         visibility external.
11366         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11367         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11368         (enum cfa_how_kind): Move to ...
11369         (struct dwarf2_frame_state_reg_info): Likewise.
11370         (struct dwarf2_frame_state): Likewise.
11371         * dwarf2-frame.h: ... here.
11372         (dwarf2_frame_state_alloc_regs): New declaration.
11373         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11374         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11375
11376 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11377
11378         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11379         regcache_raw_read_unsigned.
11380         (xtensa_pseudo_register_write): Likewise.
11381
11382 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11383
11384         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11385         (nds32_pseudo_register_write): Likewise.
11386
11387 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11388
11389         * regcache.c (struct regcache) <readonly_p>: Change its type
11390         to bool.
11391         (regcache_xmalloc_1): Update parameter type and callers update.
11392
11393 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11394
11395         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11396         set_gdbarch_wchar_bit.
11397         * arm-tdep.c (arm_gdbarch_init): Likewise.
11398
11399 2017-04-25  Pedro Alves  <palves@redhat.com>
11400
11401         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11402         (BothAreRelocatable, memcopy, memmove): Don't define.
11403         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11404         macros.
11405
11406 2017-04-25  Pedro Alves  <palves@redhat.com>
11407
11408         * common/common-defs.h: Include "common/poison.h".
11409         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11410         and adjust.
11411         * common/poison.h: New file.
11412         * common/traits.h: Include <type_traits>.
11413         (Not, Or, Requires): New, moved from common/function-view.h.
11414
11415 2017-04-25  Pedro Alves  <palves@redhat.com>
11416
11417         * breakpoint.h (struct breakpoint): In-class initialize all
11418         fields.  Make boolean fields "bool".
11419         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11420         memset call and initializations no longer necessary.
11421
11422 2017-04-25  Pedro Alves  <palves@redhat.com>
11423
11424         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11425         reference.
11426         (pt_btrace_insn): New function.
11427         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11428
11429 2017-04-25  Pedro Alves  <palves@redhat.com>
11430
11431         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11432         "base" field and inherit from "bp_location" instead.  Add
11433         non-default ctor.
11434         (allocate_location_exception): Use new non-default ctor.
11435         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11436         (init_bp_location): Convert to ...
11437         (bp_location::bp_location): ... this new ctor, and remove memset
11438         call.
11439         (base_breakpoint_allocate_location): Use the new non-default ctor.
11440         * breakpoint.h (bp_location): Now a class.  Declare default and
11441         non-default ctors.  In-class initialize all members.
11442         (init_bp_location): Remove declaration.
11443
11444 2017-04-25  Pedro Alves  <palves@redhat.com>
11445
11446         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11447         assignment operator.
11448
11449 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11450
11451         * doublest.c (convert_doublest_to_floatformat): Call
11452         floatformat_totalsize_bytes.
11453
11454 2017-04-22  Tom Tromey  <tom@tromey.com>
11455
11456         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11457         ui_out_emit_list.
11458         * stack.c (print_frame): Use ui_out_emit_list.
11459         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11460         ui_out_emit_list.
11461         * mi/mi-main.c (print_one_inferior)
11462         (mi_cmd_data_list_register_names)
11463         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11464         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11465         ui_out_emit_list.
11466         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11467         (mi_output_solib_attribs): Use ui_out_emit_list,
11468         ui_out_emit_tuple.
11469         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11470         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11471         (mi_cmd_stack_list_args, list_args_or_locals): Use
11472         ui_out_emit_list.
11473         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11474         * breakpoint.c (print_solib_event, output_thread_groups): Use
11475         ui_out_emit_list.
11476
11477 2017-04-22  Tom Tromey  <tom@tromey.com>
11478
11479         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11480         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11481         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11482
11483 2017-04-22  Tom Tromey  <tom@tromey.com>
11484
11485         * tracepoint.c (tvariables_info_1)
11486         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11487
11488 2017-04-22  Tom Tromey  <tom@tromey.com>
11489
11490         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11491         annotate_arg_emitter.
11492         * breakpoint.c (print_mention_watchpoint)
11493         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11494         * annotate.h (struct annotate_arg_emitter): New.
11495
11496 2017-04-22  Tom Tromey  <tom@tromey.com>
11497
11498         * record-btrace.c (record_btrace_insn_history)
11499         (record_btrace_insn_history_range, record_btrace_call_history)
11500         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11501         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11502         ui_out_emit_tuple.
11503         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11504         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11505         * skip.c (skip_info): Use ui_out_emit_tuple.
11506         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11507         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11508         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11509         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11510         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11511         ui_out_emit_tuple.
11512         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11513         (output_register, mi_cmd_data_read_memory)
11514         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11515         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11516         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11517         Use ui_out_emit_tuple.
11518         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11519         ui_out_emit_tuple.
11520         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11521         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11522         * linux-thread-db.c (info_auto_load_libthread_db): Use
11523         ui_out_emit_tuple.
11524         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11525         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11526         * disasm.c (do_mixed_source_and_assembly_deprecated)
11527         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11528         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11529         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11530         * breakpoint.c (print_one_breakpoint_location)
11531         (print_one_breakpoint): Use ui_out_emit_tuple.
11532         * auto-load.c (print_script, info_auto_load_cmd): Use
11533         ui_out_emit_tuple.
11534         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11535
11536 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11537
11538         * thread.c (print_thread_info_1): Remove dead code.
11539
11540 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11541
11542         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11543         GDB_SELF_TEST.
11544         * arm-tdep.c (selftests::arm_record_test): Likewise.
11545
11546 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11547
11548         * regcache.c (regcache_restore): Remove argument 2.  Replace
11549         argument 3 with regcache.  Get register status from
11550         src->register_status and get register contents from
11551         register_buffer (src, regnum).
11552         (regcache_cpy): Update.
11553
11554 2017-04-19  Pedro Alves  <palves@redhat.com>
11555
11556         * gdbthread.h (thread): Add missing closing parenthesis in
11557         comment.
11558
11559 2017-04-19  Pedro Alves  <palves@redhat.com>
11560
11561         * common/refcounted-object.h: New file.
11562         * gdbthread.h: Include "common/refcounted-object.h".
11563         (thread_info): Inherit from refcounted_object and add comments.
11564         (thread_info::incref, thread_info::decref)
11565         (thread_info::m_refcount): Delete.
11566         (thread_info::deletable): Use the refcounted_object::refcount()
11567         method.
11568         * inferior.c (current_inferior_): Add comment.
11569         (set_current_inferior): Increment/decrement refcounts.
11570         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11571         not-deletable instead of comparing with the current inferior.
11572         (initialize_inferiors): Increment the initial inferior's refcount.
11573         * inferior.h (struct inferior): Forward declare.
11574         Include "common/refcounted-object.h".
11575         (current_inferior, set_current_inferior): Move declaration to
11576         before struct inferior's definition, and fix comment.
11577         (inferior): Inherit from refcounted_object.  Add comments.
11578         * thread.c (switch_to_thread_no_regs): Reference the thread's
11579         inferior pointer directly instead of doing a ptid lookup.
11580         (switch_to_no_thread): New function.
11581         (switch_to_thread(thread_info *)): New function, factored out
11582         from ...
11583         (switch_to_thread(ptid_t)): ... this.
11584         (restore_current_thread): Delete.
11585         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11586         fields, and add 'inf' field.
11587         (do_restore_current_thread_cleanup): Check whether old->inf is
11588         alive instead of looking up an inferior by ptid.  Use
11589         switch_to_thread and switch_to_no_thread.
11590         (restore_current_thread_cleanup_dtor): Use old->inf directly
11591         instead of lookup up an inferior by id.  Decref the inferior.
11592         Don't restore 'removable'.
11593         (make_cleanup_restore_current_thread): Same the inferior pointer
11594         in old, instead of the inferior number.  Incref the inferior.
11595         Don't save/clear 'removable'.
11596
11597 2017-04-19  Pedro Alves  <palves@redhat.com>
11598
11599         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11600         unittests/scoped_restore-selftests.c.
11601         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11602         * common/scoped_restore.h (scoped_restore_base): Make "class".
11603         (scoped_restore_base::release): New public method.
11604         (scoped_restore_base::scoped_restore_base): New protected ctor.
11605         (scoped_restore_base::m_saved_var): New protected field.
11606         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11607         scoped_restore_base base class instead of m_saved_var directly.
11608         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11609         (scoped_restore_tmpl::scoped_restore_tmpl(const
11610         scoped_restore_tmpl<T>&)): Likewise.
11611         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11612         method.
11613         (scoped_restore_tmpl::saved_var): New method.
11614         (scoped_restore_tmpl::m_saved_var): Delete.
11615         * inferior.h (inferior::detaching): Now a bool.
11616         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11617         cleanup.
11618         * unittests/scoped_restore-selftests.c: New file.
11619
11620 2017-04-19  Pedro Alves  <palves@redhat.com>
11621
11622         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11623         Re-sort in alphabetic order.
11624
11625 2017-04-18  Pedro Alves  <palves@redhat.com>
11626
11627         * xml-support.c (obstack_xml_printf): Delete.
11628         * xml-support.h (obstack_xml_printf): Delete.
11629
11630 2017-04-18  Pedro Alves  <palves@redhat.com>
11631
11632         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11633         vdebug, verror, body_text, start_element, end_element, name,
11634         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11635         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11636         is_xinclude>: Make private and add m_ prefix.
11637         (gdb_xml_parser::body_text): New method, based on ...
11638         (gdb_xml_body_text): ... this.  Adjust.
11639         (gdb_xml_parser::vdebug): New method, based on ...
11640         (gdb_xml_debug): ... this.  Adjust.
11641         (gdb_xml_parser::verror): New method, based on ...
11642         (gdb_xml_error): ... this.  Adjust.
11643         (gdb_xml_parser::start_element): New method, based on ...
11644         (gdb_xml_start_element): ... this.  Adjust.
11645         (gdb_xml_start_element_wrapper): Defer to
11646         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11647         (gdb_xml_parser::end_element): New method, based on ...
11648         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11649         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11650         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11651         (gdb_xml_parser::use_dtd): New method, based on ...
11652         (gdb_xml_use_dtd): ... this.  Adjust.
11653         (gdb_xml_parser::parse): New method, based on ...
11654         (gdb_xml_parse): ... this.  Adjust.
11655         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11656         (xinclude_start_include): Adjust to call the parser's name method.
11657         (xml_xinclude_default, xml_xinclude_start_doctype)
11658         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11659         method.
11660         (xml_process_xincludes): Adjust to call parser methods.
11661         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11662         declarations.
11663
11664 2017-04-18  Pedro Alves  <palves@redhat.com>
11665
11666         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11667         gdb::optional<std::string>.
11668         * xml-support.c: Include <string>.
11669         (scope_level::scope_level(scope_level &&))
11670         (scope_level::~scope_level): Delete.
11671         (scope_level::body): Now a std::string.
11672         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11673         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11674         parameter.
11675         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11676         (xinclude_parsing_data::output): Now a std::string reference.
11677         (xinclude_start_include): Adjust.
11678         (xml_xinclude_default): Adjust.
11679         (xml_process_xincludes): Add 'output' parameter, and return bool.
11680         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11681         and return bool.
11682         * xml-tdesc.c: Include <unordered_map> and <string>.
11683         (tdesc_xml_cache): Delete.
11684         (tdesc_xml_cache_s): Delete.
11685         (xml_cache): Now an std::unordered_map.
11686         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11687         (target_fetch_description_xml): Change return type to
11688         gdb::optional<std::string>, and adjust.
11689         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11690         (target_fetch_description_xml): Change return type to
11691         gdb::optional<std::string>.
11692
11693 2017-04-18  Pedro Alves  <palves@redhat.com>
11694
11695         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11696         unittests/optional-selftests.c.
11697         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11698         * unittests/optional-selftests.c: New file.
11699         * unittests/optional/assignment/1.cc: New file.
11700         * unittests/optional/assignment/2.cc: New file.
11701         * unittests/optional/assignment/3.cc: New file.
11702         * unittests/optional/assignment/4.cc: New file.
11703         * unittests/optional/assignment/5.cc: New file.
11704         * unittests/optional/assignment/6.cc: New file.
11705         * unittests/optional/assignment/7.cc: New file.
11706         * unittests/optional/cons/copy.cc: New file.
11707         * unittests/optional/cons/default.cc: New file.
11708         * unittests/optional/cons/move.cc: New file.
11709         * unittests/optional/cons/value.cc: New file.
11710         * unittests/optional/in_place.cc: New file.
11711         * unittests/optional/observers/1.cc: New file.
11712         * unittests/optional/observers/2.cc: New file.
11713
11714 2017-04-18  Pedro Alves  <palves@redhat.com>
11715
11716         * common/gdb_optional.h: Include common/traits.h.
11717         (in_place_t): New type.
11718         (in_place): New constexpr variable.
11719         (optional::optional): Remove member initialization of
11720         m_instantiated.
11721         (optional::optional(in_place_t...)): New constructor.
11722         (optional::~optional): Use reset.
11723         (optional::optional(const optional&)): New.
11724         (optional::optional(const optional&&)): New.
11725         (optional::optional(T &)): New.
11726         (optional::optional(T &&)): New.
11727         (operator::operator=(const optional &)): New.
11728         (operator::operator=(optional &&)): New.
11729         (operator::operator= (const T &))
11730         (operator::operator= (T &&))
11731         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11732         (operator::reset): New.
11733         (operator::m_instantiated):: Add in-class initializer.
11734         * common/traits.h: Include <type_traits>.
11735         (struct And): New types.
11736
11737 2017-04-18  Pedro Alves  <palves@redhat.com>
11738
11739         * xml-support.c: Include <vector>.
11740         (scope_level::scope_level(const gdb_xml_element *))
11741         (scope_level::scope_level(scope_level&&)): New.
11742         (scope_level::~scope_level): New.
11743         (scope_level_s): Delete.
11744         (gdb_xml_parser::scopes): Now a std::vector.
11745         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11746         Use std::vector.
11747         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11748         scope cleanup code.
11749         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11750         of the scopes member.  Use std::vector::emplace_back.
11751
11752 2017-04-18  Pedro Alves  <palves@redhat.com>
11753
11754         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11755         a bool.
11756         (gdb_xml_end_element): Change type of first parameter.
11757         (gdb_xml_cleanup): Rename to ...
11758         (gdb_xml_parser::~gdb_xml_parser): ... this.
11759         (gdb_xml_create_parser_and_cleanup): Delete with ...
11760         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11761         to this new ctor.
11762         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11763         using gdb_xml_create_parser_and_cleanup.
11764         (xinclude_parsing_data): Add ctor/dtor.
11765         (xml_xinclude_cleanup): Delete.
11766         (xml_process_xincludes): Create a local xinclude_parsing_data
11767         instead of heap-allocating one.  Create a local gdb_xml_parser
11768         instead of heap-allocating one with
11769         gdb_xml_create_parser_and_cleanup.
11770
11771 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11772
11773         PR threads/20743
11774         * fbsd-nat.c (resume_one_thread_cb): Remove.
11775         (resume_all_threads_cb): Remove.
11776         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11777         iterate_over_threads.
11778
11779 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11780
11781         * NEWS: Create a new section for the next release branch.
11782         Rename the section of the current branch, now that it has
11783         been cut.
11784
11785 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11786
11787         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11788         * version.in: Bump version to 8.0.50.DATE-git.
11789
11790 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11791
11792         PR gdb/21385
11793         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11794         independently of the host, and fix build breakage on Cygwin.
11795
11796 2017-04-13  Pedro Alves  <palves@redhat.com>
11797
11798         * inferior.c (free_inferior): Convert to ...
11799         (inferior::~inferior): ... this dtor.
11800         (inferior::inferior): New ctor, factored out from ...
11801         (add_inferior_silent): ... here.  Allocate the inferior with a new
11802         expression.
11803         (delete_inferior): Call delete instead of free_inferior.
11804         * inferior.h (gdb_environ, continuation): Forward declare.
11805         (inferior): Now a class.  Add in-class initialization to all
11806         members.  Make boolean fields bool, except 'detaching'.
11807         (inferior::inferior): New explicit ctor.
11808         (inferior::~inferior): New.
11809
11810 2017-04-13  Pedro Alves  <palves@redhat.com>
11811
11812         * inferior.c (init_inferior_list): Delete.
11813         * inferior.h (init_inferior_list): Delete.
11814
11815 2017-04-13  Pedro Alves  <palves@redhat.com>
11816
11817         PR threads/13217
11818         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11819         (top level): Call it twice, with different thread sets.
11820
11821 2017-04-13  Pedro Alves  <palves@redhat.com>
11822
11823         * thread.c: Include <algorithm>.
11824         (thread_array_cleanup): Delete.
11825         (scoped_inc_dec_ref): New class.
11826         (live_threads_count): New function.
11827         (set_thread_refcount): Delete.
11828         (tp_array_compar_ascending): Now a bool.
11829         (tp_array_compar): Convert to a std::sort comparison function.
11830         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11831         and live_threads_count.
11832
11833 2017-04-13  Pedro Alves  <palves@redhat.com>
11834
11835         * infrun.c (follow_fork_inferior): Also switch the current
11836         inferior.
11837
11838 2017-04-13  Pedro Alves  <palves@redhat.com>
11839
11840         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11841         before calling create_internal_breakpoint.
11842
11843 2017-04-13  Pedro Alves  <palves@redhat.com>
11844
11845         * fork-child.c (execv_argv): New class.
11846         (breakup_args): Refactored as ...
11847         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11848         Copy arguments to storage and replace separators with NULL
11849         terminators in place.
11850         (escape_bang_in_quoted_argument): Adjust to return bool.
11851         (execv_argv::execv_argv): New ctor.
11852         (execv_argv::init_for_shell): New method, factored out from
11853         fork_inferior.  Don't strdup strings into the vector.
11854         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11855         Remove free_vector_argv call.
11856
11857 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11858
11859         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11860         tdep->rx_psw_type.
11861
11862 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11863
11864         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11865         * rx-tdep.c (rx_gdbarch_init): Likewise.
11866
11867 2017-04-13  Pedro Alves  <palves@redhat.com>
11868
11869         * breakpoint.h (struct breakpoint): Reindent.
11870
11871 2017-04-13  Pedro Alves  <palves@redhat.com>
11872
11873         * breakpoint.c (bp_location): Rename to ...
11874         (bp_locations): ... this.  All references updated.
11875         (bp_location_count): Rename to ...
11876         (bp_locations_count): ... this.  All references updated.
11877         (bp_location_placed_address_before_address_max): Rename to ...
11878         (bp_locations_placed_address_before_address_max): ... this.  All
11879         references updated.
11880         (bp_location_shadow_len_after_address_max): Rename to ...
11881         (bp_locations_shadow_len_after_address_max): ... this.  All
11882         references updated.
11883         (bp_location_compare_addrs): Rename to ...
11884         (bp_locations_compare_addrs): ... this.  All references updated.
11885         (bp_location_compare):Rename to ...
11886         (bp_locations_compare): ... this.  All references updated.
11887         (bp_location_target_extensions_update): Rename to ...
11888         (bp_locations_target_extensions_update): ... this.  All references
11889         updated.
11890
11891 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11892
11893         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11894         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11895         'sgtty.h'.
11896         * common/gdb_termios.h: New file, with parts of "terminal.h".
11897         * inflow.c: Include "gdb_termios.h".
11898         * ser-unix.c: Include "gdb_termios.h".
11899         * terminal.h: Move terminal-related defines to
11900         "common/gdb_termios.h".
11901
11902 2017-04-12  Tom Tromey  <tom@tromey.com>
11903
11904         * probe.c (parse_probes): Update.
11905         * location.h (delete_event_location): Don't declare.
11906         (event_location_deleter::operator()): Update.
11907         * location.c (event_location_deleter::operator()): Rename from
11908         delete_event_location.
11909         * linespec.h (linespec_result) <location>: Change type to
11910         event_location_up.
11911         * linespec.c (canonicalize_linespec, event_location_to_sals)
11912         (decode_objc): Update.
11913         (linespec_result): Don't call delete_event_location.
11914         * breakpoint.c (create_breakpoints_sal)
11915         (bkpt_probe_create_sals_from_location)
11916         (strace_marker_create_sals_from_location): Update.
11917
11918 2017-04-12  Tom Tromey  <tom@tromey.com>
11919
11920         * linespec.h (struct linespec_result): Add constructor and
11921         destructor.
11922         (init_linespec_result, destroy_linespec_result)
11923         (make_cleanup_destroy_linespec_result): Don't declare.
11924         * linespec.c (init_linespec_result): Remove.
11925         (linespec_result::~linespec_result): Rename from
11926         destroy_linespec_result.  Update.
11927         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11928         Remove.
11929         * breakpoint.c (create_breakpoint, break_range_command)
11930         (decode_location_default): Update.
11931         * ax-gdb.c (agent_command_1): Update.
11932
11933 2017-04-12  Tom Tromey  <tom@tromey.com>
11934
11935         * remote.c (remote_download_tracepoint): Update.
11936         * python/py-breakpoint.c (bppy_get_location): Update.
11937         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11938         (gdbscm_breakpoint_location): Update.
11939         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11940         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11941         Change type to event_location_up.
11942         * breakpoint.c (create_overlay_event_breakpoint)
11943         (create_longjmp_master_breakpoint)
11944         (create_std_terminate_master_breakpoint)
11945         (create_exception_master_breakpoint)
11946         (breakpoint_event_location_empty_p, print_breakpoint_location)
11947         (print_one_breakpoint_location, create_thread_event_breakpoint)
11948         (init_breakpoint_sal, create_breakpoint)
11949         (print_recreate_ranged_breakpoint, break_range_command)
11950         (init_ada_exception_breakpoint, say_where): Update.
11951         (base_breakpoint_dtor): Don't call delete_event_location.
11952         (bkpt_print_recreate, tracepoint_print_recreate)
11953         (dprintf_print_recreate, update_static_tracepoint)
11954         (breakpoint_re_set_default): Update.
11955
11956 2017-04-12  Tom Tromey  <tom@tromey.com>
11957
11958         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11959         type of "to_do".  Update.
11960         (compute_stack_depth): Use std::vector.
11961
11962 2017-04-12  Tom Tromey  <tom@tromey.com>
11963
11964         * printcmd.c (find_instruction_backward): Use std::vector.
11965
11966 2017-04-12  Tom Tromey  <tom@tromey.com>
11967
11968         * symfile.c (objfilep): Remove typedef.
11969         (reread_symbols): Use a std::vector.
11970
11971 2017-04-12  Tom Tromey  <tom@tromey.com>
11972
11973         * mi/mi-main.c (exec_direction_forward): Remove.
11974         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11975         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11976         scoped_restore.
11977         * guile/guile.c (guile_repl_command, guile_command)
11978         (gdbscm_execute_gdb_command): Use scoped_restore.
11979         * go-exp.y (go_parse): Use scoped_restore.
11980         * d-exp.y (d_parse): Use scoped_restore.
11981         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11982         * c-exp.y (c_parse): Use scoped_restore.
11983
11984 2017-04-12  Tom Tromey  <tom@tromey.com>
11985
11986         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11987         (mi_parse): Update return type.
11988         (mi_parse_free): Remove.
11989         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11990         (mi_parse::~mi_parse): Rename from mi_parse_free.
11991         (mi_parse_cleanup): Remove.
11992         (mi_parse): Return a unique_ptr.  Use new.
11993         * mi/mi-main.c (mi_execute_command): Update.
11994
11995 2017-04-12  Tom Tromey  <tom@tromey.com>
11996
11997         * location.c (explicit_location_lex_one): Return a
11998         unique_xmalloc_ptr.
11999         (string_to_explicit_location): Update.  Remove cleanups.
12000
12001 2017-04-12  Tom Tromey  <tom@tromey.com>
12002
12003         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12004         (compare_value_and_voffset): Change type.  Update.
12005         (compute_vtable_size): Change type of "offset_vec".
12006         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
12007         (gnuv3_get_typeid): Remove extraneous declaration.
12008
12009 2017-04-12  Tom Tromey  <tom@tromey.com>
12010
12011         * charset.h (wchar_iterator): Fix comment.
12012
12013 2017-04-12  Tom Tromey  <tom@tromey.com>
12014
12015         * charset.c (iconv_wrapper): New class.
12016         (cleanup_iconv): Remove.
12017         (convert_between_encodings): Use it.
12018
12019 2017-04-12  Tom Tromey  <tom@tromey.com>
12020
12021         * symfile.h (increment_reading_symtab): Update type.
12022         * symfile.c (decrement_reading_symtab): Remove.
12023         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12024         * psymtab.c (psymtab_to_symtab): Update.
12025         * dwarf2read.c (dw2_instantiate_symtab): Update.
12026
12027 2017-04-12  Tom Tromey  <tom@tromey.com>
12028
12029         * jit.c (struct jit_reader): Declare separately.  Add constructor
12030         and destructor.  Change type of "handle".
12031         (loaded_jit_reader): Define separately.
12032         (jit_reader_load): Update.  New "new".
12033         (jit_reader_unload_command): Use "delete".
12034         * gdb-dlfcn.h (struct dlclose_deleter): New.
12035         (gdb_dlhandle_up): New typedef.
12036         (gdb_dlopen, gdb_dlsym): Update types.
12037         (gdb_dlclose): Remove.
12038         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12039         (gdb_dlsym): Change type of "handle".
12040         (make_cleanup_dlclose): Remove.
12041         (dlclose_deleter::operator()): Rename from gdb_dlclose.
12042         * compile/compile-c-support.c (load_libcc): Update.
12043
12044 2017-04-12  Tom Tromey  <tom@tromey.com>
12045
12046         * symtab.h (find_pcs_for_symtab_line): Change return type.
12047         * symtab.c (find_pcs_for_symtab_line): Change return type.
12048         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12049         type of "vec".  Update.
12050         (ltpy_get_pcs_for_line): Update.
12051         * linespec.c (decode_digits_ordinary): Update.
12052
12053 2017-04-12  Tom Tromey  <tom@tromey.com>
12054
12055         * tracepoint.c (actions_command): Update.
12056         * python/python.c (python_command, python_interactive_command):
12057         Update.
12058         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12059         * guile/guile.c (guile_command): Update.
12060         * defs.h (read_command_lines, read_command_lines_1): Return
12061         command_line_up.
12062         (command_lines_deleter): New struct.
12063         (command_line_up): New typedef.
12064         * compile/compile.c (compile_code_command)
12065         (compile_print_command): Update.
12066         * cli/cli-script.h (get_command_line, copy_command_lines): Return
12067         command_line_up.
12068         (make_cleanup_free_command_lines): Remove.
12069         * cli/cli-script.c (get_command_line, read_command_lines_1)
12070         (copy_command_lines): Return command_line_up.
12071         (while_command, if_command, read_command_lines, define_command)
12072         (document_command): Update.
12073         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12074         Remove.
12075         * breakpoint.h (breakpoint_set_commands): Change type of
12076         "commands".
12077         * breakpoint.c (breakpoint_set_commands): Change type of
12078         "commands".  Update.
12079         (do_map_commands_command, update_dprintf_command_list)
12080         (create_tracepoint_from_upload): Update.
12081
12082 2017-04-12  Tom Tromey  <tom@tromey.com>
12083
12084         * tracepoint.c (scope_info): Update.
12085         * spu-tdep.c (spu_catch_start): Update.
12086         * python/python.c (gdbpy_decode_line): Update.
12087         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12088         * python/py-breakpoint.c (bppy_init): Update.
12089         * probe.c (parse_probes): Update.
12090         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12091         * location.h (event_location_deleter): New struct.
12092         (event_location_up): New typedef.
12093         (new_linespec_location, new_address_location, new_probe_location)
12094         (new_explicit_location, copy_event_location)
12095         (string_to_event_location, string_to_event_location_basic)
12096         (string_to_explicit_location): Update return type.
12097         (make_cleanup_delete_event_location): Remove.
12098         * location.c (new_linespec_location, new_address_location)
12099         (new_probe_location, new_explicit_location, copy_event_location):
12100         Return event_location_up.
12101         (delete_event_location_cleanup)
12102         (make_cleanup_delete_event_location): Remove.
12103         (string_to_explicit_location, string_to_event_location_basic)
12104         (string_to_event_location): Return event_location_up.
12105         * linespec.c (canonicalize_linespec, event_location_to_sals)
12106         (decode_line_with_current_source)
12107         (decode_line_with_last_displayed, decode_objc): Update.
12108         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12109         * completer.c (location_completer): Update.
12110         * cli/cli-cmds.c (edit_command, list_command): Update.
12111         * breakpoint.c (create_overlay_event_breakpoint)
12112         (create_longjmp_master_breakpoint)
12113         (create_std_terminate_master_breakpoint)
12114         (create_exception_master_breakpoint)
12115         (create_thread_event_breakpoint): Update.
12116         (init_breakpoint_sal): Update.  Remove some dead code.
12117         (create_breakpoint_sal): Change type of "location".  Update.
12118         (create_breakpoints_sal, create_breakpoint, break_command_1)
12119         (dprintf_command, break_range_command, until_break_command)
12120         (init_ada_exception_breakpoint)
12121         (strace_marker_create_sals_from_location)
12122         (update_static_tracepoint, trace_command, ftrace_command)
12123         (strace_command, create_tracepoint_from_upload): Update.
12124         * break-catch-throw.c (re_set_exception_catchpoint): Update.
12125         * ax-gdb.c (agent_command_1): Update.
12126
12127 2017-04-12  Pedro Alves  <palves@redhat.com>
12128
12129         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12130         * configure.tgt: Handle i[34567]86-*-go32* and
12131         i[34567]86-*-msdosdjgpp*.
12132         * i386-tdep.c (i386_svr4_reg_to_regnum):
12133         Make extern.
12134         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12135         i386-go32-tdep.c.
12136         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12137         * i386-go32-tdep.c: New file.
12138         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12139         declarations.
12140
12141 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
12142
12143         * aix-thread.c (pd_status2str): Change return type to const char *.
12144
12145 2017-04-12  Pedro Alves  <palves@redhat.com>
12146
12147         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12148         calls to set_gdbarch_gnu_triplet_regexp.
12149
12150 2017-04-12  Pedro Alves  <palves@redhat.com>
12151
12152         PR gdb/21323
12153         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12154         New enum value.
12155         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12156         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12157         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12158         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12159         * gdbarch.h, gdbarch.c: Regenerate.
12160         * aarch64-tdep.c (aarch64_gdbarch_init): Override
12161         gdbarch_wchar_bit and gdbarch_wchar_signed.
12162         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12163         * arm-tdep.c (arm_gdbarch_init): Likewise.
12164         * avr-tdep.c (avr_gdbarch_init): Likewise.
12165         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12166         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12167         * i386-tdep.c (i386_go32_init_abi): Likewise.
12168         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12169         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12170         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12171         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12172         * sh-tdep.c (sh_gdbarch_init): Likewise.
12173         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12174         * sparc64-tdep.c (sparc64_init_abi): Likewise.
12175         * windows-tdep.c (windows_init_abi): Likewise.
12176         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12177
12178 2017-04-12  Pedro Alves  <palves@redhat.com>
12179
12180         PR c++/21323
12181         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12182         cplus_primitive_type_char32_t>: New enum values.
12183         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12184         and cplus_primitive_type_char32_t.
12185         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12186         32, use the archtecture's built-in type for char16_t and char32_t,
12187         respectively.  Otherwise, fallback to init_integer_type as before,
12188         but make the type unsigned, and issue a complaint.
12189         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12190
12191 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
12192
12193         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12194         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12195
12196 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12197
12198         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12199         'const char *'.
12200
12201 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12202
12203         * common/common-utils.c (free_vector_argv): New function.
12204         * common/common-utils.h: Include <vector>.
12205         (free_vector_argv): New prototype.
12206         * darwin-nat.c (darwin_create_inferior): Rewrite function
12207         prototype in order to constify "exec_file" and accept a
12208         "std::string" for "allargs".
12209         * fork-child.c: Include <vector>.
12210         (breakup_args): Rewrite function, using C++.
12211         (fork_inferior): Rewrite function header, constify "exec_file_arg"
12212         and accept "std::string" for "allargs".  Update the code to
12213         calculate "argv" based on "allargs".  Update calls to "exec_fun"
12214         and "execvp".
12215         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12216         order to constify "exec_file" and accept a "std::string" for
12217         "allargs".
12218         * go32-nat.c (go32_create_inferior): Likewise.
12219         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12220         * infcmd.c (run_command_1): Constify "exec_file".  Use
12221         "std::string" for inferior arguments.
12222         * inferior.h (fork_inferior): Update prototype.
12223         * linux-nat.c (linux_nat_create_inferior): Rewrite function
12224         prototype in order to constify "exec_file" and accept a
12225         "std::string" for "allargs".
12226         * nto-procfs.c (procfs_create_inferior): Likewise.
12227         * procfs.c (procfs_create_inferior): Likewise.
12228         * remote-sim.c (gdbsim_create_inferior): Likewise.
12229         * remote.c (extended_remote_run): Update code to accept
12230         "std::string" as argument.
12231         (extended_remote_create_inferior): Rewrite function prototype in
12232         order to constify "exec_file" and accept a "std::string" for
12233         "allargs".
12234         * rs6000-nat.c (super_create_inferior): Likewise.
12235         (rs6000_create_inferior): Likewise.
12236         * target.h (struct target_ops) <to_create_inferior>: Likewise.
12237         * windows-nat.c (windows_create_inferior): Likewise.
12238
12239 2017-04-11  Pedro Alves  <palves@redhat.com>
12240
12241         * thread.c: Fix whitespace throughout.
12242
12243 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12244
12245         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12246
12247 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
12248
12249         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12250
12251 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
12252
12253         PR gdb/21364
12254         * osdata.c (info_osdata): Check if 'type' is an empty string
12255         instead of NULL.
12256
12257 2017-04-10  Pedro Alves  <palves@redhat.com>
12258
12259         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12260         (ptid_to_global_thread_id, in_thread_list)
12261         (do_captured_list_thread_ids, set_resumed, set_running)
12262         (set_executing, set_stop_requested, finish_thread_state)
12263         (validate_registers_access, can_access_registers_ptid)
12264         (print_thread_info_1, switch_to_thread)
12265         (do_restore_current_thread_cleanup)
12266         (make_cleanup_restore_current_thread, thread_command)
12267         (thread_name_command): Use operator== instead of ptid_equal.
12268
12269 2017-04-10  Pedro Alves  <palves@redhat.com>
12270
12271         * thread.c (struct current_thread_cleanup) <next>: Delete field.
12272         (current_thread_cleanup_chain): Delete.
12273         (restore_current_thread_cleanup_dtor)
12274         (make_cleanup_restore_current_thread): Remove references to
12275         current_thread_cleanup_chain.
12276
12277 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
12278
12279         * msp430-tdep.c (msp430_pseudo_register_read): Never return
12280         REG_UNKNOWN.
12281
12282 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12283
12284         PR gdb/19942
12285         * gdbthread.h (thread_info::deletable): New method.
12286         (thread_info::incref): New method.
12287         (thread_info::decref): New method.
12288         (thread_info::refcount): Move it to private.
12289         * infrun.c (save_stop_context): Call inc_refcount.
12290         (release_stop_context_cleanup): Likewise.
12291         * thread.c (set_thread_exited): New function.
12292         (init_thread_list): Delete "tp" only it is deletable, otherwise
12293         call set_thread_exited.
12294         (delete_thread_1): Call set_thread_exited.
12295         (current_thread_cleanup) <inferior_pid>: Remove.
12296         <thread>: New field.
12297         (restore_current_thread_ptid_changed): Removed.
12298         (do_restore_current_thread_cleanup): Adjust.
12299         (restore_current_thread_cleanup_dtor): Don't call
12300         find_thread_ptid.
12301         (set_thread_refcount): Use dec_refcount.
12302         (make_cleanup_restore_current_thread): Adjust.
12303         (thread_apply_all_command): Call inc_refcount.
12304         (_initialize_thread): Don't call
12305         observer_attach_thread_ptid_changed.
12306
12307 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12308
12309         * thread.c (delete_thread_1): Hoist code on marking thread as
12310         exited.
12311
12312 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12313
12314         * windows-nat.c (windows_detach): Initialize ptid with
12315         minus_one_ptid.
12316
12317 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12318
12319         * unittests/ptid-selftests.c: Fix erroneous assert messages.
12320
12321 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
12322
12323         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12324         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12325         (bfin_pseudo_register_write): Likewise
12326
12327 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
12328
12329         * common/ptid.h (struct ptid): Change to...
12330         (class ptid_t): ... this.
12331         <ptid_t>: New constructors.
12332         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12333         matches>: New methods.
12334         <make_null, make_minus_one>: New static methods.
12335         <pid>: Rename to...
12336         <m_pid>: ...this.
12337         <lwp>: Rename to...
12338         <m_lwp>: ...this.
12339         <tid>: Rename to...
12340         <m_tid>: ...this.
12341         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12342         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12343         as references, move comment to class ptid_t.
12344         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12345         ptid_t static methods.
12346         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12347         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12348         Take ptid arguments as references, implement using ptid_t methods.
12349         * unittests/ptid-selftests.c: New file.
12350         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12351         unittests/ptid-selftests.c.
12352         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12353
12354 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12355
12356         * python/python.c (python_run_simple_file): Cast mode literal to
12357         non-const char pointer as expected by PyFile_FromString.
12358
12359 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
12360
12361         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12362         minus_one_ptid and null_ptid.
12363
12364 2017-04-05  Pedro Alves  <palves@redhat.com>
12365
12366         * warning.m4 (build_warnings): Remove -Wno-write-strings.
12367         * configure: Regenerate.
12368
12369 2017-04-05  Pedro Alves  <palves@redhat.com>
12370
12371         * ada-exp.y (yyerror): Constify.
12372         * ada-lang.c (bound_name, get_selections)
12373         (ada_variant_discrim_type)
12374         (ada_variant_discrim_name, ada_value_struct_elt)
12375         (ada_lookup_struct_elt_type, is_unchecked_variant)
12376         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12377         (catch_ada_exception_command_split)
12378         (catch_ada_assert_command_split, catch_assert_command)
12379         (ada_op_name): Constify.
12380         * ada-lang.h (ada_yyerror, get_selections)
12381         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12382         * arc-tdep.c (arc_print_frame_cache): Constify.
12383         * arm-tdep.c (arm_skip_stub): Constify.
12384         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12385         (gen_aggregate_elt_ref): Constify.
12386         * bcache.c (print_bcache_statistics): Constify.
12387         * bcache.h (print_bcache_statistics): Constify.
12388         * break-catch-throw.c (catch_exception_command_1):
12389         * breakpoint.c (struct ep_type_description::description):
12390         Constify.
12391         (add_solib_catchpoint): Constify.
12392         (catch_fork_command_1): Add cast.
12393         (add_catch_command): Constify.
12394         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12395         Constify.
12396         * bsd-uthread.c (bsd_uthread_state): Constify.
12397         * buildsym.c (patch_subfile_names): Constify.
12398         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12399         Constify.
12400         * c-exp.y (yyerror): Constify.
12401         (token::oper): Constify.
12402         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12403         * c-varobj.c (cplus_describe_child): Constify.
12404         * charset.c (find_charset_names): Add cast.
12405         (find_charset_names): Constify array and add const_cast.
12406         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12407         (edit_command): Constify.
12408         * cli/cli-decode.c (lookup_cmd): Constify.
12409         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12410         Constify.
12411         (struct dump_context): Constify.
12412         (add_dump_command, restore_command): Constify.
12413         * cli/cli-script.c (get_command_line): Constify.
12414         * cli/cli-script.h (get_command_line): Constify.
12415         * cli/cli-utils.c (check_for_argument): Constify.
12416         * cli/cli-utils.h (check_for_argument): Constify.
12417         * coff-pe-read.c (struct read_pe_section_data): Constify.
12418         * command.h (lookup_cmd): Constify.
12419         * common/print-utils.c (decimal2str): Constify.
12420         * completer.c (gdb_print_filename): Constify.
12421         * corefile.c (set_gnutarget): Constify.
12422         * cp-name-parser.y (yyerror): Constify.
12423         * cp-valprint.c (cp_print_class_member): Constify.
12424         * cris-tdep.c (cris_register_name, crisv32_register_name):
12425         Constify.
12426         * d-exp.y (yyerror): Constify.
12427         (struct token::oper): Constify.
12428         * d-lang.h (d_yyerror): Constify.
12429         * dbxread.c (struct header_file_location::name): Constify.
12430         (add_old_header_file, add_new_header_file, last_function_name)
12431         (dbx_next_symbol_text, add_bincl_to_list)
12432         (find_corresponding_bincl_psymtab, set_namestring)
12433         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12434         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12435         * defs.h (command_line_input, print_address_symbolic)
12436         (deprecated_readline_begin_hook): Constify.
12437         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12438         Constify.
12439         * event-top.c (handle_line_of_input): Constify and add cast.
12440         * exceptions.c (catch_errors): Constify.
12441         * exceptions.h (catch_errors): Constify.
12442         * expprint.c (print_subexp_standard, op_string, op_name)
12443         (op_name_standard, dump_raw_expression, dump_raw_expression):
12444         * expression.h (op_name, op_string, dump_raw_expression):
12445         Constify.
12446         * f-exp.y (yyerror): Constify.
12447         (struct token::oper): Constify.
12448         (struct f77_boolean_val::name): Constify.
12449         * f-lang.c (f_word_break_characters): Constify.
12450         * f-lang.h (f_yyerror): Constify.
12451         * fork-child.c (fork_inferior): Add cast.
12452         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12453         (new_variant): Constify.
12454         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12455         * gdbarch.c: Regenerate.
12456         * gdbcore.h (set_gnutarget): Constify.
12457         * go-exp.y (yyerror): Constify.
12458         (token::oper): Constify.
12459         * go-lang.h (go_yyerror): Constify.
12460         * go32-nat.c (go32_sysinfo): Constify.
12461         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12462         * guile/scm-cmd.c (cmdscm_function): Constify.
12463         * guile/scm-param.c (pascm_param_value): Constify.
12464         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12465         (h8300sx_register_name): Constify.
12466         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12467         Constify.
12468         * ia64-tdep.c (ia64_register_names): Constify.
12469         * infcmd.c (construct_inferior_arguments): Constify.
12470         (path_command, attach_post_wait): Constify.
12471         * language.c (show_range_command, show_case_command)
12472         (unk_lang_error): Constify.
12473         * language.h (language_defn::la_error)
12474         (language_defn::la_name_of_this): Constify.
12475         * linespec.c (decode_line_2): Constify.
12476         * linux-thread-db.c (thread_db_err_str): Constify.
12477         * lm32-tdep.c (lm32_register_name): Constify.
12478         * m2-exp.y (yyerror): Constify.
12479         * m2-lang.h (m2_yyerror): Constify.
12480         * m32r-tdep.c (m32r_register_names): Constify and make static.
12481         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12482         * m88k-tdep.c (m88k_register_name): Constify.
12483         * macroexp.c (appendmem): Constify.
12484         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12485         (upgrade_type, parse_external, parse_partial_symbols)
12486         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12487         (new_symbol): Constify.
12488         * memattr.c (mem_info_command): Constify.
12489         * mep-tdep.c (register_name_from_keyword): Constify.
12490         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12491         Constify.
12492         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12493         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12494         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12495         cast.
12496         (mi_execute_async_cli_command): Constify.
12497         * mips-tdep.c (mips_register_name): Constify.
12498         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12499         (am33_register_name, am33_2_register_name)
12500         * moxie-tdep.c (moxie_register_names): Constify.
12501         * nat/linux-osdata.c (osdata_type): Constify fields.
12502         * nto-tdep.c (nto_parse_redirection): Constify.
12503         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12504         (lookup_child_selector): Constify.
12505         (objc_methcall::name): Constify.
12506         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12507         (lookup_struct_typedef): Constify.
12508         * objfiles.c (pc_in_section): Constify.
12509         * objfiles.h (pc_in_section): Constify.
12510         * p-exp.y (struct token::oper): Constify.
12511         (yyerror): Constify.
12512         * p-lang.h (pascal_yyerror): Constify.
12513         * parser-defs.h (op_name_standard): Constify.
12514         (op_print::string): Constify.
12515         (exp_descriptor::op_name): Constify.
12516         * printcmd.c (print_address_symbolic): Constify.
12517         * psymtab.c (print_partial_symbols): Constify.
12518         * python/py-breakpoint.c (stop_func): Constify.
12519         (bppy_get_expression): Constify.
12520         * python/py-cmd.c (cmdpy_completer::name): Constify.
12521         (cmdpy_function): Constify.
12522         * python/py-event.c (evpy_add_attribute)
12523         (gdbpy_initialize_event_generic): Constify.
12524         * python/py-event.h (evpy_add_attribute)
12525         (gdbpy_initialize_event_generic): Constify.
12526         * python/py-evts.c (add_new_registry): Constify.
12527         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12528         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12529         * python/py-inferior.c (get_buffer): Add cast.
12530         * python/py-param.c (parm_constant::name): Constify.
12531         * python/py-unwind.c (fprint_frame_id): Constify.
12532         * python/python.c (gdbpy_parameter_value): Constify.
12533         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12534         * remote.c (memory_packet_config::name): Constify.
12535         (show_packet_config_cmd, remote_write_bytes)
12536         (remote_buffer_add_string):
12537         * reverse.c (exec_reverse_once): Constify.
12538         * rs6000-tdep.c (variant::name, variant::description): Constify.
12539         * rust-exp.y (rustyyerror): Constify.
12540         * rust-lang.c (rust_op_name): Constify.
12541         * rust-lang.h (rustyyerror): Constify.
12542         * serial.h (serial_ops::name): Constify.
12543         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12544         (sh_sh3e_register_name, sh_sh2e_register_name)
12545         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12546         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12547         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12548         (sh_sh4al_dsp_register_name): Constify.
12549         * sh64-tdep.c (sh64_register_name): Constify.
12550         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12551         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12552         * stabsread.c (patch_block_stabs, read_type_number)
12553         (ref_map::stabs, ref_add, process_reference)
12554         (symbol_reference_defined, define_symbol, define_symbol)
12555         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12556         (read_one_struct_field, read_struct_fields, read_baseclasses)
12557         (read_tilde_fields, read_struct_type, read_array_type)
12558         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12559         (read_huge_number, read_range_type, read_args, common_block_start)
12560         (find_name_end): Constify.
12561         * stabsread.h (common_block_start, define_symbol)
12562         (process_one_symbol, symbol_reference_defined, ref_add):
12563         * symfile.c (get_section_index, add_symbol_file_command):
12564         * symfile.h (get_section_index): Constify.
12565         * target-descriptions.c (tdesc_type::name): Constify.
12566         (tdesc_free_type): Add cast.
12567         * target.c (find_default_run_target):
12568         (add_deprecated_target_alias, find_default_run_target)
12569         (target_announce_detach): Constify.
12570         (do_option): Constify.
12571         * target.h (add_deprecated_target_alias): Constify.
12572         * thread.c (print_thread_info_1): Constify.
12573         * top.c (deprecated_readline_begin_hook, command_line_input):
12574         Constify.
12575         (init_main): Add casts.
12576         * top.h (handle_line_of_input): Constify.
12577         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12578         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12579         (tfind_command): Rename to ...
12580         (tfind_command_1): ... this and constify.
12581         (tfind_command): New function.
12582         (tfind_end_command, tfind_start_command): Adjust.
12583         (encode_source_string): Constify.
12584         * tracepoint.h (encode_source_string): Constify.
12585         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12586         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12587         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12588         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12589         * tui/tui-win.c (parse_scrolling_args): Constify.
12590         * tui/tui-windata.c (tui_erase_data_content): Constify.
12591         * tui/tui-windata.h (tui_erase_data_content): Constify.
12592         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12593         * tui/tui.c (tui_enable): Add cast.
12594         * utils.c (defaulted_query): Constify.
12595         (init_page_info): Add cast.
12596         (puts_debug, subset_compare): Constify.
12597         * utils.h (subset_compare): Constify.
12598         * varobj.c (varobj_format_string): Constify.
12599         * varobj.h (varobj_format_string): Constify.
12600         * vax-tdep.c (vax_register_name): Constify.
12601         * windows-nat.c (windows_detach): Constify.
12602         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12603         * xml-support.c (gdb_xml_end_element): Constify.
12604         * xml-tdesc.c (tdesc_start_reg): Constify.
12605         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12606         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12607         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12608
12609 2017-04-05  Pedro Alves  <palves@redhat.com>
12610
12611         * proc-api.c (struct trans): Constify.
12612         (procfs_note): Constify.
12613         * proc-events.c (struct trans, syscall_table):
12614         * proc-flags.c (struct trans): Constify.
12615         * proc-utils.h (procfs_note): Constify.
12616         * proc-why.c (struct trans): Constify.
12617         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12618         (procfs_detach): Constify.
12619         * sol-thread.c (struct string_map): Constify.
12620         (td_err_string, td_state_string): Constify.
12621
12622 2017-04-05  Pedro Alves  <palves@redhat.com>
12623
12624         * proc-api.c (procfs_filename): Don't initialize
12625         procfs_filename.
12626         (prepare_to_trace): Assume procfs_filename is non-NULL.
12627         (_initialize_proc_api): Give procfs_filename a default value here.
12628
12629 2017-04-05  Pedro Alves  <palves@redhat.com>
12630
12631         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12632         'cond_string' parameter.
12633         (extract_exception_regexp): Constify 'string' parameter.
12634         (catch_exception_command_1): Constify.
12635         * breakpoint.c (init_catchpoint)
12636         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12637         parameter.
12638         (ep_parse_optional_if_clause, catch_fork_command_1)
12639         (catch_exec_command_1): Constify.
12640         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12641         parameter.
12642         (ep_parse_optional_if_clause): Constify.
12643         * cli/cli-utils.c (remove_trailing_whitespace)
12644         (check_for_argument): Constify.
12645         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12646         non-const overload.
12647         (check_for_argument): Likewise.
12648
12649 2017-04-05  Pedro Alves  <palves@redhat.com>
12650
12651         * event-top.c (command_line_handler): Add cast to execute_command
12652         call.
12653         * record-btrace.c (cmd_record_btrace_bts_start)
12654         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12655         (cmd_record_btrace_start): Add cast to execute_command call.
12656         * record-full.c (record_full_goto_insn):
12657         * record.c (record_start, record_stop): Add cast to
12658         execute_command_to_string calls.
12659         (cmd_record_start): Add cast to execute_command calls.
12660
12661 2017-04-05  Pedro Alves  <palves@redhat.com>
12662
12663         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12664         static inline function.
12665         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12666         array and use gdb_PyArg_ParseTupleAndKeywords.
12667         * python/py-cmd.c (cmdpy_init): Likewise.
12668         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12669         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12670         (infpy_search_memory): Likewise.
12671         * python/py-objfile.c (objfpy_add_separate_debug_file)
12672         (gdbpy_lookup_objfile): Likewise.
12673         * python/py-symbol.c (gdbpy_lookup_symbol)
12674         (gdbpy_lookup_global_symbol): Likewise.
12675         * python/py-type.c (gdbpy_lookup_type): Likewise.
12676         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12677         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12678         Likewise.
12679
12680 2017-04-05  Pedro Alves  <palves@redhat.com>
12681
12682         * python/python-internal.h (gdb_PyGetSetDef): New type.
12683         * python/py-block.c (block_object_getset)
12684         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12685         * python/py-event.c (event_object_getset)
12686         (finish_breakpoint_object_getset): Likewise.
12687         * python/py-inferior.c (inferior_object_getset): Likewise.
12688         * python/py-infthread.c (thread_object_getset): Likewise.
12689         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12690         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12691         * python/py-objfile.c (objfile_getset): Likewise.
12692         * python/py-progspace.c (pspace_getset): Likewise.
12693         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12694         Likewise.
12695         * python/py-record.c (recpy_record_getset): Likewise.
12696         * python/py-symbol.c (symbol_object_getset): Likewise.
12697         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12698         Likewise.
12699         * python/py-type.c (type_object_getset, field_object_getset):
12700         Likewise.
12701         * python/py-value.c (value_object_getset): Likewise.
12702
12703 2017-04-05  Pedro Alves  <palves@redhat.com>
12704
12705         * python/python-internal.h (gdb_PyObject_CallMethod)
12706         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12707         New functions.
12708         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12709         (PySys_GetObject, PySys_SetPath): New macros.
12710
12711 2017-04-05  Pedro Alves  <palves@redhat.com>
12712
12713         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12714         info_osdata_command.
12715         * osdata.c (info_osdata_command): Rename to ...
12716         (info_osdata): ... this.  Constify 'type' parameter, and remove
12717         the 'from_tty' parameter.  Accept NULL TYPE.
12718         (info_osdata_command): New function.
12719         * osdata.h (info_osdata_command): Remove declaration.
12720         (info_osdata): New declaration.
12721
12722 2017-04-05  Pedro Alves  <palves@redhat.com>
12723
12724         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12725         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12726         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12727         parameter.
12728         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12729         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12730         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12731         parameter.
12732         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12733         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12734         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12735         (mi_cmd_file_list_exec_source_files)
12736         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12737         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12738         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12739         parameter.
12740         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12741         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12742         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12743         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12744         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12745         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12746         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12747         'command' parameter.
12748         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12749         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12750         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12751         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12752         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12753         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12754         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12755         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12756         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12757         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12758         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12759         parameter.
12760         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12761         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12762         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12763         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12764         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12765         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12766         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12767         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12768         (mi_cmd_data_list_changed_registers)
12769         (mi_cmd_data_write_register_values)
12770         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12771         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12772         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12773         (mi_cmd_list_features, mi_cmd_list_target_features)
12774         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12775         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12776         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12777         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12778         (mi_cmd_trace_frame_collected): Constify 'command'
12779         parameter.
12780         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12781         'command' parameter.
12782
12783 2017-04-05  Pedro Alves  <palves@redhat.com>
12784
12785         * ada-lang.c (ada_completer_word_break_characters): Now a const
12786         array.
12787         (ada_get_gdb_completer_word_break_characters): Constify.
12788         * completer.c (gdb_completer_command_word_break_characters)
12789         (gdb_completer_file_name_break_characters)
12790         (gdb_completer_quote_characters): Now const arrays.
12791         (get_gdb_completer_quote_characters): Constify.
12792         (set_rl_completer_word_break_characters): New function.
12793         (set_gdb_completion_word_break_characters)
12794         (complete_line_internal): Use it.
12795         * completer.h (get_gdb_completer_quote_characters): Constify.
12796         (set_rl_completer_word_break_characters): Declare.
12797         * f-lang.c (f_word_break_characters): Constify.
12798         * language.c (default_word_break_characters): Constify.
12799         * language.h (language_defn::la_word_break_characters): Constify.
12800         (default_word_break_characters): Constify.
12801         * top.c (init_main): Use set_rl_completer_word_break_characters.
12802
12803 2017-04-05  Pedro Alves  <palves@redhat.com>
12804
12805         * aix-thread.c (aix_thread_pid_to_str)
12806         (aix_thread_extra_thread_info): Constify.
12807         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12808         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12809         (bsd_uthread_pid_to_str): Constify.
12810         * corelow.c (core_pid_to_str): Constify.
12811         * darwin-nat.c (darwin_pid_to_str): Constify.
12812         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12813         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12814         Constify.
12815         * gnu-nat.c (gnu_pid_to_str): Constify.
12816         * go32-nat.c (go32_pid_to_str): Constify.
12817         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12818         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12819         * inferior.c (inferior_pid_to_str): Constify.
12820         * linux-nat.c (linux_nat_pid_to_str): Constify.
12821         * linux-tdep.c (linux_core_pid_to_str): Constify.
12822         * linux-thread-db.c (thread_db_pid_to_str)
12823         (thread_db_extra_thread_info): Constify.
12824         * nto-tdep.c (nto_extra_thread_info): Constify.
12825         * nto-tdep.h (nto_extra_thread_info): Constify.
12826         * obsd-nat.c (obsd_pid_to_str): Constify.
12827         * procfs.c (procfs_pid_to_str): Constify.
12828         * ravenscar-thread.c (ravenscar_extra_thread_info)
12829         (ravenscar_pid_to_str): Constify.
12830         * remote-sim.c (gdbsim_pid_to_str): Constify.
12831         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12832         Constify.
12833         * sol-thread.c (solaris_pid_to_str): Constify.
12834         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12835         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12836         * target.c (default_pid_to_str, target_pid_to_str)
12837         (normal_pid_to_str, default_pid_to_str): Constify.
12838         * target.h (target_ops::to_pid_to_str)
12839         (target_ops::to_extra_thread_info): Constify.
12840         (target_pid_to_str, normal_pid_to_str): Constify.
12841         * windows-nat.c (windows_pid_to_str): Constify.
12842         * gdbarch.sh (core_pid_to_str): Constify.
12843         * target-delegates.c: Regenerate.
12844         * gdbarch.h, gdbarch.c: Regenerate.
12845
12846 2017-04-05  Pedro Alves  <palves@redhat.com>
12847
12848         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12849         the memory of the temporary warning_pre_print override.
12850         * utils.c (warning_pre_print): Constify.
12851         * utils.h (warning_pre_print): Constify.
12852
12853 2017-04-05  Pedro Alves  <palves@redhat.com>
12854
12855         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12856         (shell_command): New function.
12857         (make_command): Use std::string.
12858         (init_cli_cmds): Register shell_command instead of shell_escape.
12859
12860 2017-04-05  Pedro Alves  <palves@redhat.com>
12861
12862         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12863         * tracepoint.c (default_collect): Don't initialize.
12864
12865 2017-04-05  Pedro Alves  <palves@redhat.com>
12866
12867         * macroexp.c (macro_buffer::shared): Now a bool.
12868         (init_buffer): Update.
12869         (init_shared_buffer): Constify 'addr' parameter.
12870         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12871         casts.
12872
12873 2017-04-05  Pedro Alves  <palves@redhat.com>
12874
12875         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12876         * disasm.c (set_disassembler_options): Constify local.
12877         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12878
12879 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12880
12881         PR gdb/21352
12882         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12883         option.
12884
12885 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12886
12887         * frame.c (frame_unwind_register_unsigned): Call
12888         frame_unwind_register_value.
12889
12890 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12891
12892         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12893         Use gdb_test_multiple, and don't match anchor.
12894
12895 2017-04-05  Pedro Alves  <palves@redhat.com>
12896
12897         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12898         (Write After Approval): Remove Simon Marchi.
12899
12900 2017-04-05  Pedro Alves  <palves@redhat.com>
12901
12902         * common/gdb_optional.h (optional::optional): Make constexpr and
12903         initialize m_dummy.
12904
12905 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12906
12907         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12908         (amd64fbsd_jmp_buf_reg_offset): Remove.
12909         (amd64fbsd_supply_uthread): Remove function.
12910         (amd64fbsd_collect_uthread): Remove function.
12911         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12912         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12913         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12914         (fbsd-nat.c): Update comment.
12915         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12916         (i386fbsd_jmp_buf_reg_offset): Remove.
12917         (i386fbsd_supply_uthread): Remove function.
12918         (i386fbsd_collect_uthread): Remove function.
12919         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12920
12921 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12922
12923         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12924         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12925         * NEWS: Mention that support for FreeBSD/alpha was removed.
12926         * alpha-fbsd-tdep.c: Delete file.
12927         * config/alpha/fbsd.mh: Delete file.
12928         * configure.host: Delete alpha*-*-freebsd* and
12929         alpha*-*-kfreebsd*-gnu.
12930         * configure.tgt: Delete alpha*-*-freebsd* and
12931         alpha*-*-kfreebsd*-gnu.
12932
12933 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12934
12935         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12936         amd64bsd_store_inferior_registers): Use ptid from regcache.
12937
12938 2017-04-04  Pedro Alves  <palves@redhat.com>
12939
12940         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12941         data fields, make them private and add "m_" prefixes.
12942         (lnp_state_machine::lnp_state_machine): New ctor.
12943         (record_line, check_line_address, handle_set_discriminator)
12944         (handle_set_address, handle_advance_pc, handle_special_opcode)
12945         (handle_advance_line, handle_set_file, handle_negate_stmt)
12946         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12947         (end_sequence, advance_line): New methods.
12948         (m_gdbarch, m_record_lines_p): New fields.
12949         (lnp_reader_state): Delete.
12950         (dwarf_record_line): Rename to ...
12951         (lnp_state_machine::record_line): ... adjust.
12952         (init_lnp_state_machine): Delete.
12953         (lnp_state_machine::lnp_state_machine): New.
12954         (check_line_address): Rename to ...
12955         (lnp_state_machine::check_line_address): This.
12956         (dwarf_decode_lines_1): Remove reference to "reader_state".
12957         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12958         State machine internal state manipulation moved to
12959         lnp_state_machine methods.
12960
12961 2017-04-04  Pedro Alves  <palves@redhat.com>
12962
12963         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12964         unittests/offset-type-selftests.c.
12965         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12966         * common/offset-type.h: New file.
12967         * common/preprocessor.h: New file.
12968         * common/traits.h: New file.
12969         * common/valid-expr.h: New file.
12970         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12971         sect_offset and cu_offset strong typedefs throughout.
12972         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12973         typedefs throughout.
12974         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12975         sect_offset and cu_offset strong typedefs throughout.
12976         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12977         typedefs throughout.
12978         * gdbtypes.h: Include "common/offset-type.h".
12979         (cu_offset): Now an offset type (strong typedef) instead of a
12980         struct.
12981         (sect_offset): Likewise.
12982         (union call_site_parameter_u): Rename "param_offset" field to
12983         "param_cu_off".
12984         * unittests/offset-type-selftests.c: New file.
12985
12986 2017-04-04  Pedro Alves  <palves@redhat.com>
12987
12988         * common/underlying.h: New file.
12989         * dwarf2read.c: Include "common/gdb_optional.h" and
12990         "common/underlying.h".
12991         (dir_index, file_name_index): New types.
12992         (file_entry): Use them.
12993         (file_entry::include): Use to_underlying.
12994         (line_header::add_file_name): Use dir_index.
12995         (read_formatted_entries): Use gdb::optional.  Read form before
12996         writting to file_entry.
12997         (dwarf_decode_line_header): Use dir_index.
12998         (lnp_state_machine::current_file): Use to_underlying.
12999         (lnp_state_machine::file): Change type to file_name_index.
13000         (dwarf_record_line): Use to_underlying.
13001         (init_lnp_state_machine): Use file_name_index.
13002         (dwarf_decode_lines_1): Use dir_index and file_name_index.
13003
13004 2017-04-04  Pedro Alves  <palves@redhat.com>
13005
13006         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13007         operator bool, has_value and get methods.
13008
13009 2017-04-04  Pedro Alves  <palves@redhat.com>
13010
13011         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13012         fields.
13013         (line_header): Initialize all data fields.  Change type of
13014         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13015         Change type of include_dirs to std::vector<const char *>.  Remove
13016         num_include_dirs, include_dirs_size.  Change type of file_names to
13017         std::vector<file_entry>.  Remove num_file_names, file_names_size.
13018         (line_header::line_header): New.
13019         (line_header::add_include_dir, line_header::add_file_name): New
13020         methods.
13021         (line_header::include_dir_at): Remove NULL check.
13022         (line_header::file_name_at): Add const overload.
13023         (line_header_up): New unique_ptr typedef.
13024         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
13025         std::vector.  Remove free_line_header call.
13026         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
13027         free_line_header call.
13028         (free_cu_line_header): Delete.
13029         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13030         (setup_type_unit_groups): Use line_header_up instead of cleanups.
13031         Adjust to use std::vector.
13032         (free_line_header): Delete.
13033         (free_line_header_voidp): Use delete.
13034         (add_include_dir): Replace with ...
13035         (line_header::add_include_dir): ... this method.  Use std::vector.
13036         (add_file_name): Replace with ...
13037         (line_header::add_file_name): ... this method.  Use std::vector.
13038         (add_include_dir_stub): Delete.
13039         (read_formatted_entries): Remove memset.
13040         (dwarf_decode_line_header): Return a line_header_up instead of a
13041         raw pointer.  Remove cleanup handling.  Pass lambdas to
13042         read_formatted_entries.  Adjust to use line_header methods.
13043         (dwarf_decode_lines_1): Adjust to use line_header methods.
13044         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13045         use std::vector.
13046
13047 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
13048
13049         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13050         instead of struct ptid.
13051
13052 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
13053
13054         * frame.c (get_frame_register_bytes): Unwind using value.
13055         (put_frame_register_bytes): Likewise.
13056
13057 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
13058
13059         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13060         aggregate-like.
13061
13062 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
13063
13064         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13065
13066 2017-03-29  Yao Qi  <yao.qi@linaro.org>
13067
13068         * gdbthread.h (struct thread_info): Declare constructor and
13069         destructor.  Add some in-class member initializers.
13070         * thread.c (free_thread): Remove.
13071         (init_thread_list): Call delete instead of free_thread.
13072         (new_thread): Call thread_info constructor.
13073         (thread_info::thread_info): New function.
13074         (thread_info::~thread_info): New function.
13075         (delete_thread_1): Call delete instead of free_thread.
13076         (make_cleanup_restore_current_thread): Move tp and frame to
13077         inner block.
13078
13079 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13080
13081         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13082         (arc_skip_prologue): Likewise.
13083         (arc_make_frame_cache): Likewise.
13084         (arc_pv_get_operand): New function.
13085         (arc_is_in_prologue): Likewise.
13086         (arc_analyze_prologue): Likewise.
13087         (arc_print_frame_cache): Likewise.
13088         (MAX_PROLOGUE_LENGTH): New constant.
13089
13090 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13091
13092         * configure.tgt: Add arc-insn.o.
13093         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13094         (dump_arc_instruction_command): New function.
13095         (arc_fprintf_disasm): Likewise.
13096         (arc_disassemble_info): Likewise.
13097         (arc_insn_get_operand_value): Likewise.
13098         (arc_insn_get_operand_value_signed): Likewise.
13099         (arc_insn_get_memory_base_reg): Likewise.
13100         (arc_insn_get_memory_offset): Likewise.
13101         (arc_insn_get_branch_target): Likewise.
13102         (arc_insn_dump): Likewise.
13103         (arc_insn_get_linear_next_pc): Likewise.
13104         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13105         (arc_disassemble_info): Likewise.
13106         (arc_insn_get_branch_target): Likewise.
13107         (arc_insn_get_linear_next_pc): Likewise.
13108         * NEWS: Mention new "maint print arc arc-instruction".
13109
13110 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13111
13112         * arc-tdep (maintenance_print_arc_list): New variable.
13113         (maintenance_print_arc_command): New function.
13114
13115 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13116
13117         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13118         Add "limm" and "reserved".
13119         (arc_cannot_fetch_register, arc_cannot_store_register): Add
13120         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13121         * arc-tdep.h (arc_regnum): Likewise.
13122
13123 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13124
13125         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13126         for THREADPTR register.
13127         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13128         register.
13129         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13130         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13131         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13132
13133 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13134
13135         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13136         registers above gdbarch_num_regs (gdbarch) as privileged in
13137         call0 ABI.
13138
13139 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13140
13141         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13142         for a single specified register or for all registers in
13143         a0_base..a0_base + C0_NREGS range.
13144         (supply_gregset_reg): Call regcache_raw_supply for a single
13145         specified register or for all registers in a0_base..a0_base +
13146         C0_NREGS range.
13147
13148 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13149
13150         * arch/xtensa.h (C0_NREGS): Add definition.
13151         * xtensa-tdep.c (C0_NREGS): Remove definition.
13152
13153 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13154
13155         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13156         Drop xtensa_default_isa initialization.
13157         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13158
13159 2017-03-27  Pedro Alves  <palves@redhat.com>
13160
13161         * dwarf2read.c (file_entry) <dir_index>: Add comment.
13162         (file_entry::include_dir): New method.
13163         (line_header::include_dir_at, line_header::file_name_at): New
13164         methods.
13165         (setup_type_unit_groups, setup_type_unit_groups)
13166         (psymtab_include_file_name): Simplify using the new methods.
13167         (lnp_state_machine) <the_line_header>: New field.
13168         <file>: Add comment.
13169         (lnp_state_machine::current_file): New method.
13170         (dwarf_record_line): Simplify using the new methods.
13171         (init_lnp_state_machine): Initialize the "the_line_header" field.
13172         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13173         Simplify using the new methods.
13174
13175 2017-03-27  Pedro Alves  <palves@redhat.com>
13176
13177         * cp-name-parser.y (make_empty): Delete.
13178         (demangler_special, nested_name, ptr_operator, array_indicator)
13179         (direct_declarator, declarator_1): Use fill_comp instead of
13180         make_empty.
13181
13182 2017-03-27  Pedro Alves  <palves@redhat.com>
13183
13184         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13185         to ATTRIBUTE_PRINTF.
13186         * solib-target.c (library_list_start_list): Print "string" not
13187         "version".
13188         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13189         gdb_xml_error call.
13190
13191 2017-03-27  Pedro Alves  <palves@redhat.com>
13192
13193         * dwarf2read.c (struct file_and_directory): New.
13194         (dwarf2_get_dwz_file): Adjust to use std::string.
13195         (dw2_get_file_names_reader): Adjust to use file_and_directory.
13196         (find_file_and_directory): Adjust to return a file_and_directory
13197         object.
13198         (read_file_scope): Adjust to use file_and_directory.  Remove
13199         make_cleanup/do_cleanups calls.
13200         (open_and_init_dwp_file): Adjust to use std::string.  Remove
13201         make_cleanup/do_cleanups calls.
13202         * python/python.c (do_start_initialization): Adjust to ldirname
13203         returning a std::string.
13204         * utils.c (ldirname): Now returns a std::string.
13205         * utils.h (ldirname): Change return type to std::string.
13206         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13207         returning a std::string.
13208         * xml-tdesc.c (file_read_description_xml): Likewise.
13209
13210 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
13211
13212         * regcache.c (regcache_debug_print_register): New function.
13213         * regcache.h (regcache_debug_print_register): New declaration.
13214         * target.c (debug_print_register): Remove.
13215         (target_fetch_registers): Call regcache_debug_print_register.
13216         (target_store_registers): Likewise.
13217
13218 2017-03-24  Pádraig Brady  <pbrady@fb.com>
13219
13220         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13221         reference beyond the 'lh->include_dirs' array before accessing to
13222         it.
13223         (psymtab_include_file_name): Likewise.
13224         (dwarf_decode_lines_1): Likewise.
13225         (dwarf_decode_lines): Likewise.
13226         (file_file_name): Likewise.
13227
13228 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
13229
13230         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13231         inferior_ptid.
13232         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13233         ps_lsetfpregs): Likewise.
13234         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13235         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13236         ps_lsetfpregs): Likewise.
13237         * target.c (target_fetch_registers, target_store_registers):
13238         Remove asserts.
13239
13240 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
13241
13242         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13243
13244 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13245
13246         * aarch64-tdep.c (aarch64_process_record_test): Declare.
13247         (_initialize_aarch64_tdep): Register it.
13248         (aarch64_record_load_store): Handle PRFM instruction.
13249         (aarch64_process_record_test): New function.
13250
13251 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13252
13253         * aarch64-tdep.c (aarch64_record_load_store): Fix code
13254         indentation.
13255
13256 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13257
13258         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13259
13260 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13261
13262         python/python.c (do_start_initialization): Fix memory leak.
13263
13264 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13265
13266         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13267         using get_ptrace_pid.
13268         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13269         inferior_ptid.
13270         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13271         inferior_ptid instead of pid.
13272
13273 2017-03-22  Yao Qi  <yao.qi@linaro.org>
13274
13275         * aarch64-tdep.c: Wrap locally used classes in anonymous
13276         namespace.
13277         * arm-tdep.c: Likewise.
13278         * linespec.c: Likewise.
13279         * ui-out.c: Likewise.
13280
13281 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
13282
13283         PR gdb/19637
13284         * python/lib/gdb/printer/bound_registers.py: Import sys.
13285
13286 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13287
13288         * windows-nat.c (do_windows_fetch_inferior_registers): Add
13289         windows_thread_info parameter and use it instead of
13290         current_thread.
13291         (windows_fetch_inferior_registers): Don't set current_thread,
13292         pass the thread to do_windows_fetch_inferior_registers.  Use
13293         ptid from regcache instead of inferior_ptid.
13294         (do_windows_store_inferior_registers): Add windows_thread_info
13295         parameter and use it instead of current_thread.
13296         (windows_store_inferior_registers): Don't set current_thread,
13297         pass the thread to do_windows_store_inferior_registers.  Use
13298         ptid from regcache instead of inferior_ptid.
13299
13300 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13301
13302         * ser-mingw.c (ser_windows_raw): Remove reference to
13303         struct serial::current_timeout.
13304
13305 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
13306
13307         PR tdep/20928
13308         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13309         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13310         (sparc64_fsr_type): Fix %fsr decoding.
13311
13312 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
13313
13314         * python/py-record-btrace.c (btpy_insn_data): Change return type
13315         for Python 2.
13316
13317 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13318
13319         * spu-linux-nat.c (spu_fetch_inferior_registers,
13320         spu_store_inferior_registers): Use ptid from regcache, set and
13321         restore inferior_ptid.
13322         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13323         Likewise.
13324
13325 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13326
13327         * i386-linux-nat.c (fetch_register, store_register,
13328         i386_linux_fetch_inferior_registers,
13329         i386_linux_store_inferior_registers): Use ptid from regcache.
13330         * ia64-linux-nat.c (ia64_linux_fetch_register,
13331         ia64_linux_store_register): Likewise.
13332         * inf-ptrace.c (inf_ptrace_fetch_register,
13333         inf_ptrace_store_register): Likewise.
13334         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13335         m32r_linux_store_inferior_registers): Likewise.
13336         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13337         m68kbsd_store_inferior_registers): Likewise.
13338         * m68k-linux-nat.c (fetch_register, store_register,
13339         m68k_linux_fetch_inferior_registers,
13340         m68k_linux_store_inferior_registers): Likewise.
13341         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13342         m88kbsd_store_inferior_registers): Likewise.
13343         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13344         mips_fbsd_store_inferior_registers): Likewise.
13345         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13346         mips64_linux_regsets_store_registers): Likewise.
13347         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13348         mipsnbsd_store_inferior_registers): Likewise.
13349         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13350         mips64obsd_store_inferior_registers): Likewise.
13351         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13352         Likewise.
13353         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13354         ppcfbsd_store_inferior_registers): Likewise.
13355         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13356         ppc_linux_store_inferior_registers): Likewise.
13357         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13358         ppcnbsd_store_inferior_registers): Likewise.
13359         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13360         ppcobsd_store_registers): Likewise.
13361         * procfs.c (procfs_fetch_registers, procfs_store_registers):
13362         Likewise.
13363         * ravenscar-thread.c (ravenscar_fetch_registers,
13364         ravenscar_store_registers, ravenscar_prepare_to_store):
13365         Likewise.
13366         * record-btrace.c (record_btrace_fetch_registers,
13367         record_btrace_store_registers, record_btrace_prepare_to_store):
13368         Likewise.
13369         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13370         Lookup inferior using ptid from regcache, instead of
13371         current_inferior.
13372         * remote.c (remote_fetch_registers, remote_store_registers): Use
13373         ptid from regcache.
13374         * rs6000-nat.c (fetch_register, store_register): Likewise.
13375         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13376         s390_linux_store_inferior_registers): Likewise.
13377         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13378         shnbsd_store_inferior_registers): Likewise.
13379         * sol-thread.c (sol_thread_fetch_registers,
13380         sol_thread_store_registers): Likewise.
13381         * sparc-nat.c (sparc_fetch_inferior_registers,
13382         sparc_store_inferior_registers): Likewise.
13383         * tilegx-linux-nat.c (fetch_inferior_registers,
13384         store_inferior_registers): Likewise.
13385         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13386         vaxbsd_store_inferior_registers): Likewise.
13387         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13388         store_xtregs): Likewise.
13389
13390 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13391
13392         PR gdb/14441
13393         * NEWS: Mention support for rvalue references in GDB and python.
13394         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13395         supports both lvalue and rvalue references.
13396
13397 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13398
13399         PR gdb/14441
13400         * gdbtypes.c (rank_one_type): Implement overloading
13401         resolution rules regarding rvalue references.
13402
13403 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13404
13405         PR gdb/14441
13406         * aarch64-tdep.c (aarch64_type_align)
13407         (aarch64_extract_return_value, aarch64_store_return_value): Change
13408         lvalue reference type checks to general reference type checks.
13409         * amd64-tdep.c (amd64_classify): Likewise.
13410         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13411         Likewise.
13412         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13413         (arm_store_return_value): Likewise.
13414         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13415         * c-typeprint.c (c_print_type): Likewise.
13416         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13417         (cplus_number_of_children, cplus_describe_child): Likewise.
13418         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13419         * completer.c (expression_completer): Likewise.
13420         * cp-support.c (make_symbol_overload_list_adl_namespace):
13421         Likewise.
13422         * darwin-nat-info.c (info_mach_region_command): Likewise.
13423         * dwarf2loc.c (entry_data_value_coerce_ref)
13424         (value_of_dwarf_reg_entry): Likewise.
13425         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13426         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13427         Likewise.
13428         * findvar.c (extract_typed_address, store_typed_address):
13429         Likewise.
13430         * gdbtypes.c (rank_one_type): Likewise.
13431         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13432         * infcall.c (value_arg_coerce): Likewise.
13433         * language.c (pointer_type): Likewise.
13434         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13435         Likewise.
13436         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13437         * mn10300-tdep.c (mn10300_type_align): Likewise.
13438         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13439         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13440         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13441         Likewise.
13442         * printcmd.c (print_formatted, x_command): Likewise.
13443         * python/py-type.c (typy_get_composite, typy_template_argument):
13444         Likewise.
13445         * python/py-value.c (valpy_referenced_value)
13446         (valpy_get_dynamic_type, value_has_field): Likewise.
13447         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13448         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13449         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13450         * spu-tdep.c (spu_scalar_value_p): Likewise.
13451         * symtab.c (lookup_symbol_aux): Likewise.
13452         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13453         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13454         Likewise.
13455         * valops.c (value_cast_pointers, value_cast)
13456         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13457         (value_struct_elt, value_struct_elt_bitpos)
13458         (value_find_oload_method_list, find_overload_match)
13459         (value_rtti_indirect_type): Likewise.
13460         * valprint.c (val_print_scalar_type_p, generic_val_print):
13461         Likewise.
13462         * value.c (value_actual_type, value_as_address, unpack_long)
13463         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13464         (coerce_ref): Likewise.
13465         * varobj.c (varobj_get_value_type): Likewise.
13466
13467 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13468
13469         PR gdb/14441
13470         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13471         table of constants.
13472         * python/lib/gdb/command/explore.py: Support exploring values
13473         of rvalue reference types.
13474         * python/lib/gdb/types.py: Implement get_basic_type() for
13475         rvalue reference types.
13476         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13477         constant.
13478         * python/py-value.c (valpy_getitem): Add an rvalue reference
13479         check.
13480         (valpy_reference_value): Add new parameter "refcode".
13481         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13482         New wrappers for valpy_reference_value().
13483         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13484         (gdbpy_invoke_xmethod): Likewise.
13485
13486 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13487
13488         PR gdb/14441
13489         * dwarf2read.c (process_die, read_type_die_1): Handle the
13490         DW_TAG_rvalue_reference_type DIE.
13491         (read_tag_reference_type): Add new parameter "refcode".
13492
13493 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13494
13495         PR gdb/14441
13496         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13497         (c_type_print_modifier, c_type_print_varspec_suffix)
13498         (c_type_print_base): Support printing rvalue reference types.
13499         * c-valprint.c (c_val_print, c_value_print): Support printing
13500         rvalue reference values.
13501
13502 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13503
13504         PR gdb/14441
13505         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13506         typename.
13507         * cp-support.c (replace_typedefs): Handle
13508         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13509         * python/py-type.c (typy_lookup_type): Likewise.
13510
13511 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13512
13513         PR gdb/14441
13514         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13515         * parse.c (insert_type): Change assert statement.
13516         (follow_types): Handle rvalue reference types.
13517         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13518         constant.
13519
13520 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13521
13522         PR gdb/14441
13523         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13524         value_ref() interface.
13525         * c-valprint.c (c_value_print): Likewise.
13526         * infcall.c (value_arg_coerce): Likewise.
13527         * python/py-value.c (valpy_reference_value): Likewise.
13528         * valops.c (value_cast, value_reinterpret_cast)
13529         (value_dynamic_cast, typecmp): Likewise.
13530         (value_ref): Parameterize by kind of return value reference type.
13531         * value.h (value_ref): Add new parameter "refcode".
13532
13533 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13534
13535         PR gdb/14441
13536         * dwarf2read.c (read_tag_reference_type): Use
13537         lookup_lvalue_reference_type() instead of lookup_reference_type().
13538         * eval.c (evaluate_subexp_standard): Likewise.
13539         * f-exp.y: Likewise.
13540         * gdbtypes.c (make_reference_type, lookup_reference_type):
13541         Generalize with rvalue reference types.
13542         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13543         convenience wrappers for lookup_reference_type().
13544         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13545         reference kind parameter.
13546         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13547         wrappers for lookup_reference_type().
13548         * guile/scm-type.c (gdbscm_type_reference): Use
13549         lookup_lvalue_reference_type() instead of lookup_reference_type().
13550         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13551         * parse.c (follow_types): Likewise.
13552         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13553         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13554         Likewise.
13555         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13556         (gdbpy_invoke_xmethod): Likewise.
13557         * stabsread.c: Provide extra argument to make_reference_type()
13558         call.
13559         * valops.c (value_ref, value_rtti_indirect_type): Use
13560         lookup_lvalue_reference_type() instead of lookup_reference_type().
13561
13562 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13563
13564         PR gdb/14441
13565         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13566         (TYPE_IS_REFERENCE): New macro.
13567         (struct type): Add rvalue_reference_type field.
13568         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13569
13570 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13571
13572         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13573         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13574         New function definition.
13575         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13576         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13577         New function declaration.
13578         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13579         * mi/mi-interp.h: New file.
13580         * solib.c (info_sharedlibrary_command): Replace for loop with
13581         ALL_SO_LIBS macro
13582         * solib.h (update_solib_list): New function declaration.
13583         (so_list_head): Move macro.
13584         * solist.h (ALL_SO_LIBS): New macro.
13585
13586 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13587
13588         * infcmd.c (post_create_inferior): Remove unused argument in
13589         call to solib_add.
13590         * remote.c (remote_start_remote): Likewise.
13591         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13592         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13593         (enable_break): Likewise.
13594         * solib.c (update_solib_list): Remove unused target argument
13595         and its documentation.
13596         (solib_add): Remove unused target argument.  Remove unused
13597         argument in call to update_solib_list.
13598         (info_sharedlibrary_command): Remove unused argument in call
13599         to update_solib_list.
13600         (sharedlibrary_command): Remove unused argument in call to
13601         solib_add.
13602         (handle_solib_event): Likewise.
13603         (reload_shared_libraries): Likewise.
13604         * solib.h (solib_add): Remove unused target argument.
13605
13606 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13607
13608         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13609         (s390_displaced_step_fixup): Cover relative branches with the
13610         default fixup handling.  This fixes lack of support for some
13611         relative branch instructions.
13612
13613 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13614
13615         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13616         ptid from regcache.
13617
13618 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13619
13620         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13621         i386_darwin_store_inferior_registers): Use ptid from regcache.
13622
13623 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13624
13625         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13626         i386bsd_store_inferior_registers): Use ptid from regcache.
13627
13628 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13629
13630         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13631         hppaobsd_store_registers): Use ptid from regcache.
13632
13633 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13634
13635         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13636         hppanbsd_store_registers): Use ptid from regcache.
13637
13638 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13639
13640         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13641         from regcache.  Use get_ptrace_pid.
13642
13643 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13644
13645         * corelow.c (get_core_register_section): Use ptid from regcache,
13646         update doc.
13647
13648 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13649
13650         * bsd-uthread.c (bsd_uthread_fetch_registers,
13651         bsd_uthread_store_registers): Use ptid from regcache, set and
13652         restore inferior_ptid.
13653
13654 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13655
13656         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13657         fetch_fp_regs, store_register, store_regs, store_fp_register,
13658         store_fp_regs): Use ptid from regcache.
13659
13660 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13661
13662         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13663         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13664         store_vfp_regs): Use ptid from regcache.
13665
13666 2017-03-17  Pedro Alves  <palves@redhat.com>
13667
13668         PR remote/21188
13669         * ser-base.c (ser_base_wait_for): Add comment.
13670         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13671         version.
13672         * ser-unix.c (hardwire_raw): Remove reference to
13673         scb->current_timeout.
13674         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13675         (hardwire_ops): Install ser_base_readchar instead of
13676         hardwire_readchar.
13677         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13678         Remove fields.
13679
13680 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13681
13682         PR gdb/19637
13683         * python/lib/gdb/printer/bound_registers.py: Add support for
13684         Python 3.
13685
13686 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13687
13688         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13689         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13690         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13691         byte_offset to subobj_byte_offset.  Fix the handling of
13692         DWARF_VALUE_STACK on big-endian targets when coming via an
13693         implicit pointer.
13694         (dwarf2_evaluate_loc_desc): Adjust call to
13695         dwarf2_evaluate_loc_desc_full.
13696         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13697         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13698
13699 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13700
13701         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13702         and REVSH instructions.
13703
13704 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13705
13706         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13707         (arm_record_test): Declare.
13708         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13709         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13710         align with the manual.
13711         (thumb_record_misc): Adjust the code order to align with the
13712         manual.
13713         (thumb2_record_decode_insn_handler): Fix instruction matching.
13714         (instruction_reader_thumb): New class.
13715         (arm_record_test): New function.
13716
13717 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13718
13719         * arm-tdep.c (abstract_memory_reader): New class.
13720         (instruction_reader): New class.
13721         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13722         (decode_insn): Likewise.
13723
13724 2017-03-16  Doug Evans  <dje@google.com>
13725
13726         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13727         member.  Change type of TYPE member to SCM.  All uses updated.
13728         (lsscm_make_lazy_string_smob): Add assert.
13729         (lsscm_make_lazy_string): Flag bad length values.
13730         (lsscm_elt_type): New function.
13731         (gdbscm_lazy_string_to_value): Rewrite to use
13732         lsscm_safe_lazy_string_to_value.
13733         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13734         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13735         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13736         in incoming type.
13737         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13738         * guile/scm-type.c (tyscm_scm_to_type): New function.
13739
13740 2017-03-15  Doug Evans  <dje@google.com>
13741
13742         PR python/17728, python/18439, python/18779
13743         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13744         member.  Change type of TYPE member to PyObject *.  All uses updated.
13745         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13746         (gdbpy_create_lazy_string_object): Flag bad length values.
13747         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13748         Handle typedefs in incoming type.
13749         (stpy_lazy_string_elt_type): New function.
13750         (gdbpy_extract_lazy_string): Call it.
13751         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13752         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13753         typedefs in incoming type.
13754
13755 2017-03-16  Doug Evans  <dje@google.com>
13756
13757         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13758         * guile/scm-type.c (tyscm_scm_to_type): New function.
13759
13760 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13761
13762         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13763         "ULONGEST" for "skip".
13764
13765 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13766
13767         PR gdb/21220
13768         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13769         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13770         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13771         over ptrace peek/poke until end of buffer or error.
13772
13773 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13774
13775         * parse.c (length_of_subexp): Make static.
13776         * parser-defs.h (length_of_subexp): Remove.
13777
13778 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13779
13780         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13781         as well.
13782
13783 2017-03-14  Pedro Alves  <palves@redhat.com>
13784
13785         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13786         (main): Use std::unique_ptr.  Remove calls to
13787         cp_demangled_name_parse_free.
13788
13789 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13790
13791         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13792         alphabsd_store_inferior_registers): Use regcache->ptid instead
13793         of inferior_ptid.
13794
13795 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13796
13797         * aix-thread.c (aix_thread_fetch_registers,
13798         aix_thread_store_registers): Use regcache->ptid instead of
13799         inferior_ptid.
13800
13801 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13802
13803         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13804         store_gregs_to_thread, fetch_fpregs_from_thread,
13805         store_fpregs_to_thread): Use regcache->ptid instead of
13806         inferior_ptid.
13807
13808 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13809
13810         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13811         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13812         instead of inferior_ptid.
13813
13814 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13815
13816         * target.c (target_fetch_registers, target_store_registers): Add
13817         assert.
13818
13819 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13820
13821         * regcache.h (regcache_get_ptid): New function.
13822         * regcache.c (regcache_get_ptid): New function.
13823
13824 2017-03-13  Mark Wielaard  <mark@klomp.org>
13825
13826         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13827
13828 2017-03-10  Keith Seitz  <keiths@redhat.com>
13829
13830         PR c++/8218
13831         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13832
13833 2017-03-08  Pedro Alves  <palves@redhat.com>
13834
13835         PR gdb/18360
13836         * infrun.c (start_step_over, do_target_resume, resume)
13837         (restart_threads): Assert we're not resuming a thread that is
13838         meant to be stopped.
13839         (infrun_thread_stop_requested_callback): Delete.
13840         (infrun_thread_stop_requested): If the thread is internally
13841         stopped, queue a pending stop event and clear the thread's
13842         inline-frame state.
13843         (handle_stop_requested): New function.
13844         (handle_syscall_event, handle_inferior_event_1): Use
13845         handle_stop_requested.
13846         (handle_stop_requested): New function.
13847         (handle_signal_stop): Set the thread's stop_signal here instead of
13848         at caller.
13849         (finish_step_over): Clear step over info unconditionally.
13850         (handle_signal_stop): If the user had interrupted the event
13851         thread, consider the stop a random signal.
13852         (handle_signal_stop) <signal arrived while stepping over
13853         breakpoint>: Don't restart threads here.
13854         (stop_waiting): Don't clear step-over info here.
13855
13856 2017-03-08  Pedro Alves  <palves@redhat.com>
13857
13858         PR 21206
13859         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13860         goes to argument 2, not 1.
13861
13862 2017-03-08  Pedro Alves  <palves@redhat.com>
13863
13864         PR cli/21218
13865         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13866         display_gdb_prompt.
13867         (command_line_input): Add comment.
13868
13869 2017-03-08  Pedro Alves  <palves@redhat.com>
13870
13871         PR tui/21216
13872         * tui/tui-file.c (tui_file::write): New.
13873         * tui/tui-file.h (tui_file): Override "write".
13874         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13875         factored out from ...
13876         (tui_puts): ... here.
13877         (tui_putc): Use them.
13878         (tui_write): New function.
13879         * tui/tui-io.h (tui_write): Declare.
13880
13881 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13882
13883         * Makefile.in (SFILES): Replace "environ.c" with
13884         "common/environ.c".
13885         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13886         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13887         to...
13888         * common/environ.c: ... here.
13889         * environ.h: Moved to...
13890         * common/environ.h: ... here.
13891
13892 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13893
13894         * gdbarch.sh (pstring_ptr): New static function.
13895         (gdbarch_disassembler_options): Use it.
13896         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13897         not valid_disassembler_option->name.
13898         * gdbarch.c: Regenerate.
13899
13900 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13901
13902         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13903
13904 2017-03-07  Pedro Alves  <palves@redhat.com>
13905
13906         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13907
13908 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13909
13910         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13911         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13912         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13913         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13914
13915 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13916
13917         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13918
13919 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13920
13921         * remote.c (remote_add_target_side_commands): Use range-based
13922         for loop.
13923
13924 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13925
13926         PR gdb/21165
13927         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13928         value is lazy.
13929         * valprint.c (common_val_print): Likewise.
13930
13931 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13932
13933         * NEWS: Mention new set/show disassembler-options commands.
13934         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13935         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13936         (prospective_options): New static variable.
13937         (gdb_disassembler::gdb_disassembler): Initialize
13938         m_di.disassembler_options.
13939         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13940         (get_disassembler_options): New function.
13941         (set_disassembler_options): Likewise.
13942         (set_disassembler_options_sfunc): Likewise.
13943         (show_disassembler_options_sfunc): Likewise.
13944         (disassembler_options_completer): Likewise.
13945         (_initialize_disasm): Likewise.
13946         * disasm.h (get_disassembler_options): New prototype.
13947         (set_disassembler_options): Likewise.
13948         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13949         (gdbarch_verify_disassembler_options): Likewise.
13950         * gdbarch.c: Regenerate.
13951         * gdbarch.h: Likewise.
13952         * arm-tdep.c (num_disassembly_options): Delete.
13953         (set_disassembly_style): Likewise.
13954         (arm_disassembler_options): New static variable.
13955         (set_disassembly_style_sfunc): Convert short style name into long
13956         option name.  Call set_disassembler_options.
13957         (show_disassembly_style_sfunc): New function.
13958         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13959         set_gdbarch_verify_disassembler_options.
13960         (_initialize_arm_tdep): Delete regnames variable and update callers.
13961         (arm_disassembler_options): Initialize.
13962         (disasm_options): New variable.
13963         (num_disassembly_options): Rename from this...
13964         (num_disassembly_styles): ...to this.  Compute by scanning through
13965         disasm_options.
13966         (valid_disassembly_styles): Initialize using disasm_options.
13967         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13968         set_arm_regname_option.
13969         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13970         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13971         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13972         set_gdbarch_verify_disassembler_options.
13973         * s390-tdep.c (s390_disassembler_options): New static variable.
13974         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13975         set_gdbarch_verify_disassembler_options.
13976
13977 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13978
13979         * remote.c (remote_add_target_side_condition): Remove "struct"
13980         keyword from range-based for loop.
13981
13982 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13983
13984         * remote.c (remote_add_target_side_condition): Use range-based
13985         for loop.  Update comment.
13986
13987 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13988
13989         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13990
13991 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13992
13993         * regcache.c (regcache_raw_update): New function.
13994         (regcache_raw_read): Move code to regcache_raw_update.
13995         * regcache.h (regcache_raw_update): New declaration.
13996         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13997
13998 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13999
14000         * dwarf2read.c (create_debug_type_hash_table): Initialize
14001         header.signature and header.type_offset_in_tu.
14002
14003 2017-02-24  Pedro Alves  <palves@redhat.com>
14004
14005         * symtab.c (make_file_symbol_completion_list_1): Use
14006         add_symtab_completions.
14007
14008 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
14009
14010         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14011
14012 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
14013
14014         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14015         I386_MAX_REGISTER_SIZE.
14016         (i386_pseudo_register_write): Likewise.
14017         (i386_process_record): Likewise.
14018         * i387-tdep.c (i387_supply_xsave): Likewise.
14019         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14020         (store_register): Likewise.
14021
14022 2017-02-23  Pedro Alves  <palves@redhat.com>
14023
14024         * ada-lang.c: Include "common/function-view.h".
14025         (ada_iterate_over_symbols): Adjust to use function_view as
14026         callback type.
14027         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14028         (ada_make_symbol_completion_list): Use a lambda.
14029         (ada_exc_search_name_matches): Delete.
14030         (name_matches_regex): New.
14031         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14032         * compile/compile-c-support.c: Include "common/function-view.h".
14033         (print_one_macro): Change prototype to accept a ui_file pointer.
14034         (write_macro_definitions): Use a lambda.
14035         * dwarf2read.c: Include "common/function-view.h".
14036         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14037         (dw2_expand_symtabs_matching): Adjust to use function_view as
14038         callback type.
14039         * language.h: Include "common/function-view.h".
14040         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14041         function_view as callback type.
14042         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14043         * linespec.c: Include "common/function-view.h".
14044         (collect_info::add_symbol): New method.
14045         (struct symbol_and_data_callback, iterate_inline_only, struct
14046         symbol_matcher_data, iterate_name_matcher): Delete.
14047         (iterate_over_all_matching_symtabs): Adjust to use function_view
14048         as callback type and lambdas.
14049         (iterate_over_file_blocks): Adjust to use function_view as
14050         callback type.
14051         (decode_compound_collector): Now a class with private fields.
14052         (decode_compound_collector::release_symbols): New method.
14053         (collect_one_symbol): Rename to...
14054         (decode_compound_collector::operator()): ... this and adjust.
14055         (lookup_prefix_sym): decode_compound_collector construction bits
14056         move to decode_compound_collector ctor.  Pass the
14057         decode_compound_collector object directly as callback.  Remove
14058         cleanups and use decode_compound_collector::release_symbols
14059         instead.
14060         (symtab_collector): Now a class with private fields.
14061         (symtab_collector::release_symtabs): New method.
14062         (add_symtabs_to_list): Rename to...
14063         (symtab_collector::operator()): ... this and adjust.
14064         (collect_symtabs_from_filename): symtab_collector construction
14065         bits move to symtab_collector ctor.  Pass the symtab_collector
14066         object directly as callback.  Remove cleanups and use
14067         symtab_collector::release_symtabs instead.
14068         (collect_symbols): Delete.
14069         (add_matching_symbols_to_info): Use lambdas.
14070         * macrocmd.c (print_macro_callback): Delete.
14071         (info_macro_command): Use a lambda.
14072         (info_macros_command): Pass print_macro_definition as callable
14073         directly.
14074         (print_one_macro): Remove 'ignore' parameter.
14075         (macro_list_command): Adjust.
14076         * macrotab.c (macro_for_each_data::fn): Now a function_view.
14077         (macro_for_each_data::user_data): Delete field.
14078         (foreach_macro): Adjust to call the function_view.
14079         (macro_for_each): Adjust to use function_view as callback type.
14080         (foreach_macro_in_scope): Adjust to call the function_view.
14081         (macro_for_each_in_scope): Adjust to use function_view as callback
14082         type.
14083         * macrotab.h: Include "common/function-view.h".
14084         (macro_callback_fn): Declare a prototype instead of a pointer.
14085         Remove "user_data" parameter.
14086         (macro_for_each, macro_for_each_in_scope): Adjust to use
14087         function_view as callback type.
14088         * psymtab.c (partial_map_expand_apply)
14089         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14090         Adjust to use function_view as callback type and to return bool.
14091         (psym_expand_symtabs_matching): Adjust to use function_view as
14092         callback types.
14093         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14094         to use function_view as callback type and to return bool.
14095         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14096         callback types.
14097         * symfile.c (expand_symtabs_matching): Adjust to use function_view
14098         as callback types.
14099         * symfile.h: Include "common/function-view.h".
14100         (expand_symtabs_file_matcher_ftype)
14101         (expand_symtabs_symbol_matcher_ftype)
14102         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14103         return bool.
14104         (quick_symbol_functions::map_symtabs_matching_filename)
14105         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14106         function_view as callback type and return bool.
14107         (expand_symtabs_matching): Adjust to use function_view as callback
14108         type.
14109         (maintenance_expand_name_matcher)
14110         (maintenance_expand_file_matcher): Delete.
14111         (maintenance_expand_symtabs): Use lambdas.
14112         * symtab.c (iterate_over_some_symtabs): Adjust to use
14113         function_view as callback types and return bool.
14114         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
14115         of a cleanup.
14116         (lookup_symtab_callback): Delete.
14117         (lookup_symtab): Use a lambda.
14118         (iterate_over_symbols): Adjust to use function_view as callback
14119         type.
14120         (struct search_symbols_data, search_symbols_file_matches)
14121         (search_symbols_name_matches): Delete.
14122         (search_symbols): Use a pair of lambdas.
14123         (struct add_name_data, add_macro_name, symbol_completion_matcher)
14124         (symtab_expansion_callback): Delete.
14125         (default_make_symbol_completion_list_break_on_1): Use lambdas.
14126         * symtab.h: Include "common/function-view.h".
14127         (iterate_over_some_symtabs): Adjust to use function_view as
14128         callback type and return bool.
14129         (iterate_over_symtabs): Adjust to use function_view as callback
14130         type.
14131         (symbol_found_callback_ftype): Remove 'data' parameter and return
14132         bool.
14133         (iterate_over_symbols): Adjust to use function_view as callback
14134         type.
14135
14136 2017-02-23  Pedro Alves  <palves@redhat.com>
14137
14138         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14139         (%.o) <unittests/%.c>: New pattern.
14140         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14141         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14142         * common/function-view.h: New file.
14143         * unittests/function-view-selftests.c: New file.
14144         * configure: Regenerate.
14145
14146 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
14147
14148         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14149         inferior_ptid.
14150         * go32-nat.c (go32_thread_alive): Likewise.
14151
14152 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14153
14154         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14155         delete.
14156
14157 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14158
14159         * varobj.c (varobj_clear_saved_item): Use delete instead of
14160         xfree.
14161         (update_dynamic_varobj_children): Likewise.
14162
14163 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14164
14165         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14166
14167 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
14168
14169         * common/enum-flags.h (enum_flags::enum_flags): Initialize
14170         m_enum_value to 0 in default constructor.
14171
14172 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
14173
14174         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14175         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14176         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14177         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14178         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14179         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14180         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14181         IS_STORE_CONDITIONAL_INSN.
14182
14183 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14184
14185         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14186
14187 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14188
14189         * NEWS (Changes since GDB 7.12): Add DWARF-5.
14190
14191 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14192
14193         * dwarf2read.c (skip_one_die, read_attribute_value)
14194         (dwarf2_const_value_attr, dump_die_shallow)
14195         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14196         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14197
14198 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14199
14200         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14201         (dwarf_parse_macro_header): Accept DWARF version 5.
14202         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14203
14204 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14205
14206         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14207         DW_AT_GNU_*.
14208         * common/common-exceptions.h (enum errors): Likewise.
14209         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14210         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14211         (dwarf_expr_context::execute_stack_op): Likewise.
14212         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14213         Likewise.
14214         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14215         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14216         (show_entry_values_debug, call_site_to_target_addr)
14217         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14218         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14219         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14220         (value_of_dwarf_block_entry, indirect_pieced_value)
14221         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14222         (disassemble_dwarf_expression): Likewise.
14223         * dwarf2read.c (process_die, inherit_abstract_dies)
14224         (read_call_site_scope): Likewise.
14225         * gdbtypes.h (struct func_type, struct call_site_parameter)
14226         (struct call_site): Likewise.
14227         * stack.c (read_frame_arg): Likewise.
14228         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14229
14230 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14231
14232         * defs.h (read_unsigned_leb128): New declaration.
14233         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14234         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14235         (dwarf2_find_location_expression): Call also
14236         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
14237         * dwarf2loc.h (dwarf2_version): New declaration.
14238         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14239         rnglists.
14240         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14241         .debug_rnglists.
14242         (struct dwop_section_names): Add loclists_dwo.
14243         (dwop_section_names): Add .debug_loclists.dwo.
14244         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14245         (struct dwarf2_per_cu_data): Add dwarf_version.
14246         (struct dwo_sections): Add loclists.
14247         (struct attr_abbrev): Add implicit_const.
14248         (read_indirect_line_string): New declaration.
14249         (read_unsigned_leb128): Delete declaration.
14250         (rcuh_kind): New definition.
14251         (read_and_check_comp_unit_head): Change parameter
14252         is_debug_types_section to section_kind.
14253         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14254         (read_comp_unit_head): Change parameter abfd to section, add parameter
14255         section_kind.  Handle DWARF-5.
14256         (error_check_comp_unit_head): Accept also DWARF version 5.
14257         (read_and_check_comp_unit_head): Change parameter
14258         is_debug_types_section to section_kind.
14259         (read_and_check_type_unit_head): Delete function.
14260         (read_abbrev_offset): Handle DWARF-5.
14261         (create_debug_type_hash_table): Add parameter section_kind.  Process
14262         only DW_UT_type.  Use signature and type_offset_in_tu from struct
14263         comp_unit_head.
14264         (create_debug_types_hash_table): Update create_debug_type_hash_table
14265         caller.
14266         (create_all_type_units): Call create_debug_type_hash_table.
14267         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14268         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14269         caller.
14270         (skip_one_die): Handle DW_FORM_implicit_const.
14271         (dwarf2_rnglists_process): New function.
14272         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14273         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14274         (read_attribute_value): Handle DW_FORM_implicit_const,
14275         DW_FORM_line_strp.
14276         (read_attribute): Handle DW_FORM_implicit_const.
14277         (read_indirect_string_at_offset_from): New function from
14278         read_indirect_string_at_offset.
14279         (read_indirect_string_at_offset): Call
14280         read_indirect_string_at_offset_from.
14281         (read_indirect_line_string_at_offset): New function.
14282         (read_indirect_string): New function comment.
14283         (read_indirect_line_string): New function.
14284         (read_unsigned_leb128): Make it global.
14285         (dwarf2_string_attr): Handle DWARF-5.
14286         (add_include_dir_stub, read_formatted_entries): New functions.
14287         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14288         Handle DWARF-5.
14289         (per_cu_header_read_in): Update read_comp_unit_head caller.
14290         (dwarf2_version): New function.
14291         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14292         rnglists.
14293         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14294         fields.
14295
14296 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14297
14298         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14299
14300 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14301
14302         * dwarf2read.c (dwarf2_ranges_process): New function from
14303         dwarf2_ranges_read.
14304         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14305         dwarf2_ranges_process.
14306
14307 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14308
14309         * dwarf2read.c (create_debug_type_hash_table): New function from
14310         create_debug_types_hash_table.
14311         (create_debug_types_hash_table): Call create_debug_type_hash_table.
14312         (create_all_type_units, open_and_init_dwo_file): Update
14313         create_debug_types_hash_table callers.
14314
14315 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14316
14317         PR gdb/16188
14318         * fork-child.c (trace_start_error): Fix thinko.  va_end should
14319         refer to 'ap', not 'args'.
14320
14321 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14322             Pedro Alves  <palves@redhat.com>
14323
14324         PR gdb/16188
14325         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14326         calls succeeded.
14327         * fork-child.c (trace_start_error): New function.
14328         (trace_start_error_with_name): Likewise.
14329         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14330         * inf-ptrace.c (inf_ptrace_me): Likewise.
14331         * inferior.h (trace_start_error): New prototype.
14332         (trace_start_error_with_name): Likewise.
14333
14334 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
14335
14336         PR gdb/21164
14337         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14338         NULL before using it.
14339         * symmisc.c (maintenance_print_symbols): Likewise.
14340         (maintenance_print_msymbols): Likewise.
14341
14342 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14343
14344         * NEWS: Add record Python bindings entry.
14345
14346 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14347
14348         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14349         py-record-full.o.
14350         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14351         * python/py-record-btrace.c, python/py-record-btrace.h,
14352         python/py-record-full.c, python/py-record-full.h: New file.
14353         * python/py-record.c: Add include for py-record-btrace.h and
14354         py-record-full.h.
14355         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14356         recpy_instruction_history, recpy_function_call_history, recpy_begin,
14357         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14358         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14359         New definition.
14360         (gdbpy_initialize_btrace): New export.
14361         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14362
14363 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14364
14365         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14366         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14367         * python/py-record.c: New file.
14368         * python/python-internal.h (gdbpy_start_recording,
14369         gdbpy_current_recording, gdpy_stop_recording,
14370         gdbpy_initialize_record): New export.
14371         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14372         (python_GdbMethods): Add gdbpy_start_recording,
14373         gdbpy_current_recording and gdbpy_stop_recording.
14374
14375 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14376
14377         * record-btrace.c (record_btrace_record_method): New function.
14378         (init_record_btrace_ops): Initialize to_record_method.
14379         * record-full.c (record_full_record_method): New function.
14380         (init_record_full_ops, init_record_full_core_ops): Add
14381         record_full_record_method.
14382         * record.h (enum record_method): New enum.
14383         * target-debug.h (target_debug_print_enum_record_method: New define.
14384         * target-delegates.c: Regenerate.
14385         * target.c (target_record_method): New function.
14386         * target.h: Include record.h.
14387         (struct target_ops) <to_record_method>: New field.
14388         (target_record_method): New export.
14389
14390 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14391
14392         * record.h (record_start, record_stop): New export.
14393         * record.c (record_start, record_stop): New function.
14394
14395 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14396
14397         * btrace.c (btrace_fetch): Copy function call segments pointer
14398         into a vector.
14399         (btrace_clear): Clear the vector.
14400         (btrace_find_insn_by_number): Use binary search to find the correct
14401         function call segment.
14402         * btrace.h (brace_fun_p): New typedef.
14403         (struct btrace_thread_info) <functions>: New field.
14404
14405 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14406
14407         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14408         * btrace.c (btrace_decode_error): ... here.  New function.
14409         * btrace.h (btrace_decode_error): New export.
14410
14411 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14412
14413         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14414         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14415         btrace_find_insn_by_number): Remove special case for gaps.
14416         * btrace.h (btrace_insn_get_error): New export.
14417         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14418         * record-btrace.c (btrace_insn_history): Print number for gaps.
14419         (record_btrace_info, record_btrace_goto): Handle gaps.
14420
14421 2017-02-14  Tom Tromey  <tom@tromey.com>
14422
14423         PR python/13598:
14424         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14425         event.
14426         * python/py-evts.c (gdbpy_initialize_py_events): Add
14427         before_prompt registry.
14428         * python/py-events.h (events_object) <before_prompt>: New field.
14429
14430 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14431
14432         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14433
14434 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14435
14436         * symfile (_initialize_symfile): Add usage text to the load command's
14437         help text.
14438
14439 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14440
14441         * utils.c (defaulted_query): Don't query on secondary UIs.
14442
14443 2017-02-10  Tom Tromey  <tom@tromey.com>
14444
14445         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14446
14447 2017-02-10  Tom Tromey  <tom@tromey.com>
14448
14449         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14450         "cleanup" local.
14451         * python/py-type.c (typy_legacy_template_argument): Remove
14452         unnecessary "cleanup" local.
14453
14454 2017-02-10  Tom Tromey  <tom@tromey.com>
14455
14456         * python/python.c (do_start_initialization): New function, from
14457         _initialize_python.
14458         (_initialize_python): Call do_start_initialization.
14459         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14460         goto.
14461
14462 2017-02-10  Tom Tromey  <tom@tromey.com>
14463
14464         * python/py-prettyprint.c (pretty_print_one_value): Use
14465         gdbpy_ref.
14466
14467 2017-02-10  Tom Tromey  <tom@tromey.com>
14468
14469         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14470         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14471         gdbpy_ref.
14472         * python/py-type.c (field_new): Use gdbpy_ref.
14473         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14474         gdbpy_ref.
14475         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14476         (py_free_pspace): Likewise.
14477         (pspace_to_pspace_object): Likewise.
14478         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14479         (py_free_objfile): Likewise.
14480         (objfile_to_objfile_object): Likewise.
14481         * python/py-inferior.c (delete_thread_object): Use
14482         gdbpy_ref.
14483         (infpy_read_memory): Likewise.
14484         (py_free_inferior): Likewise.
14485         * python/py-evtregistry.c (create_eventregistry_object): Use
14486         gdbpy_ref.
14487         * python/py-event.c (create_event_object): Use gdbpy_ref.
14488
14489 2017-02-10  Tom Tromey  <tom@tromey.com>
14490
14491         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14492         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14493         used.
14494         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14495         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14496         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14497         python/py-framefilter.c, python/py-function.c,
14498         python/py-inferior.c, python/py-infevents.c,
14499         python/py-linetable.c, python/py-newobjfileevent.c,
14500         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14501         python/py-signalevent.c, python/py-stopevent.c,
14502         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14503         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14504         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14505         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14506
14507 2017-02-10  Tom Tromey  <tom@tromey.com>
14508
14509         * ui-out.h (ui_out_emit_type): New class.
14510         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14511         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14512         and ui_out_emit_tuple.
14513         (enumerate_locals): Likewise.
14514         (py_mi_print_variables, py_print_locals, py_print_args): Use
14515         ui_out_emit_list.
14516         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14517         ui_out_emit_list.
14518         * common/gdb_optional.h: New file.
14519
14520 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14521
14522         * MAINTAINERS (Write After Approval): Update my e-mail address.
14523
14524 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14525
14526         PR gdb/21122
14527         * breakpoint.c (_initialize_breakpoint): Update the help description
14528         of the 'commands' command to indicate that it takes a list argument.
14529
14530 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14531
14532         * interps.c (current_interp_set_logging): Remove "return".
14533
14534 2017-02-09  Gary Benson  <gbenson@redhat.com>
14535
14536         * symtab.c (add_symtab_completions): Prevent NULL pointer
14537         dereference.
14538
14539 2017-02-08  Pedro Alves  <palves@redhat.com>
14540
14541         * interps.c (interp::interp): Remove reference to quiet_p.
14542         (interp_set): Make static.  Remove dead "Switching to" output
14543         code.
14544         (interp_quiet_p, interp_set_quiet): Delete.
14545         (interpreter_exec_cmd): Don't set the interpreter quiet.
14546         * interps.h (interp_quiet_p): Make static.
14547         (class interp) <quiet_p>: Remove field
14548
14549 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14550
14551         * cli/cli-decode.c (find_command_name_length): Make it extern.
14552         * cli/cli-decode.h (find_command_name_length): Declare.
14553         * cli/cli-script.c (command_name_equals, line_first_arg):
14554         New functions.
14555         (process_next_line): Use cli-decode to parse command names.
14556         (build_command_line): Make args a constant pointer.
14557
14558 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14559
14560         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14561         Remove case-insensitive search.
14562
14563 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14564
14565         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14566         at the end of the line.  Avoids an ARI warning.
14567
14568 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14569
14570         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14571         rdseed instructions.
14572         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14573
14574 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14575
14576         PR tdep/20936
14577         Provide and use sparc32 and sparc64 target description XML files.
14578         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14579         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14580         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14581         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14582         * features/sparc/sparc32-solaris.xml: New file.
14583         * features/sparc/sparc64-solaris.xml: New file.
14584         * features/sparc/sparc32-solaris.c: Generated.
14585         * features/sparc/sparc64-solaris.c: Generated.
14586         * sparc-tdep.h: Account for differences in target descriptions.
14587         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14588         (sparc32_register_type): Use target provided registers.
14589         (validate_tdesc_registers): New function.
14590         (sparc32_gdbarch_init): Use tdesc_has_registers.
14591         Set pseudoregister functions.
14592         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14593         (sparc64_register_type): Use target provided registers.
14594         (sparc64_init_abi): Set pseudoregister functions.
14595
14596 2017-02-03  Tom Tromey  <tom@tromey.com>
14597
14598         PR rust/21097:
14599         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14600         with a single member.
14601
14602 2017-02-03  Pedro Alves  <palves@redhat.com>
14603
14604         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14605         (cli_interp_base::~cli_interp_base): New.
14606         (cli_interp): New struct.
14607         (as_cli_interp): Cast the interp itself to cli_interp.
14608         (cli_interpreter_pre_command_loop): Rename to ...
14609         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14610         parameter.
14611         (cli_interpreter_init): Rename to ...
14612         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14613         boolean.  Make extern.
14614         (cli_interpreter_resume): Rename to ...
14615         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14616         extern.
14617         (cli_interpreter_suspend): Rename to ...
14618         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14619         extern.
14620         (cli_interpreter_exec): Rename to ...
14621         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14622         extern.
14623         (cli_interpreter_supports_command_editing): Rename to ...
14624         (cli_interp_base::supports_command_editing): ... this.  Remove
14625         'interp' parameter.  Make extern.
14626         (cli_ui_out): Rename to ...
14627         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14628         Make extern.
14629         (cli_set_logging): Rename to ...
14630         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14631         parameter.  Make extern.
14632         (cli_interp_procs): Delete.
14633         (cli_interp_factory): Adjust to use "new".
14634         * cli/cli-interp.h: Include "interps.h".
14635         (struct cli_interp_base): New struct.
14636         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14637         (interp_new): Delete.
14638         (interp::interp, interp::~interp): New.
14639         (interp_set): Use bool, and return void.  Assume the interpreter
14640         has suspend, init and resume methods, and that the all return
14641         void.
14642         (set_top_level_interpreter): interp_set returns void.
14643         (interp_ui_out): Adapt.
14644         (current_interp_set_logging): Adapt.
14645         (interp_data): Delete.
14646         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14647         (interp_exec): Adapt.
14648         (top_level_interpreter_data): Delete.
14649         * interps.h (interp_init_ftype, interp_resume_ftype)
14650         (interp_suspend_ftype, interp_exec_ftype)
14651         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14652         (class interp): New.
14653         (interp_new): Delete.
14654         (interp_set): Now returns void.  Use bool.
14655         (interp_data, top_level_interpreter_data): Delete.
14656         * mi/mi-common.h: Include interps.h.
14657         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14658         init, resume, suspect, exec, interp_ui_out, set_logging and
14659         pre_command_loop methods.
14660         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14661         (mi_interpreter_init): Rename to ...
14662         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14663         bool, return void and make extern.  Adjust.
14664         (mi_interpreter_resume): ... Rename to ...
14665         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14666         return void and make extern.  Adjust.
14667         (mi_interpreter_suspend): ... Rename to ...
14668         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14669         return void and make extern.  Adjust.
14670         (mi_interpreter_exec): ... Rename to ...
14671         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14672         extern.  Adjust.
14673         (mi_interpreter_pre_command_loop): ... Rename to ...
14674         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14675         parameter and make extern.
14676         (mi_on_normal_stop_1): Adjust.
14677         (mi_ui_out): Rename to ...
14678         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14679         parameter and make extern.  Adjust.
14680         (mi_set_logging): Rename to ...
14681         (mi_interp::set_logging): ... this.  Remove the 'interp'
14682         parameter and make extern.  Adjust.
14683         (mi_interp_procs): Delete.
14684         (mi_interp_factory): Adjust to use 'new'.
14685         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14686         (mi_print_exception, mi_execute_command, mi_load_progress):
14687         Adjust.
14688         * tui/tui-interp.c (tui_interp): New class.
14689         (as_tui_interp): Return a tui_interp pointer.
14690         (tui_on_normal_stop, tui_on_signal_received)
14691         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14692         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14693         to use interp::interp_ui_out.
14694         (tui_init): Rename to ...
14695         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14696         bool, return void and make extern.  Adjust.
14697         (tui_resume): Rename to ...
14698         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14699         return void and make extern.  Adjust.
14700         (tui_suspend): Rename to ...
14701         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14702         return void and make extern.  Adjust.
14703         (tui_ui_out): Rename to ...
14704         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14705         parameter, and make extern.  Adjust.
14706         (tui_exec): Rename to ...
14707         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14708         make extern.
14709         (tui_interp_procs): Delete.
14710         (tui_interp_factory): Use "new".
14711
14712 2017-02-02  Tom Tromey  <tom@tromey.com>
14713
14714         * rust-exp.y (ends_raw_string, space_then_number)
14715         (rust_identifier_start_p): Return bool.
14716         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14717         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14718         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14719         (rust_chartype_p): Return bool.
14720         (val_print_struct, rust_print_struct_def, rust_print_type):
14721         Update.
14722         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14723         Return bool.
14724
14725 2017-02-02  Tom Tromey  <tom@tromey.com>
14726
14727         * rust-lang.c: Reindent.
14728
14729 2017-02-02  Tom Tromey  <tom@tromey.com>
14730
14731         * rust-lang.h (rust_crate_for_block): Update.
14732         * rust-lang.c (rust_crate_for_block): Return std::string.
14733         (rust_get_disr_info): Use std:;string, not
14734         gdb::unique_xmalloc_ptr.
14735         * rust-exp.y (crate_name): Update.
14736
14737 2017-02-02  Pedro Alves  <palves@redhat.com>
14738
14739         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14740         field out of gdb_disassembler_test and make it static.
14741
14742 2017-02-02  Pedro Alves  <palves@redhat.com>
14743
14744         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14745         mi1_interp and mi_interp fields.
14746
14747 2017-02-02  Pedro Alves  <palves@redhat.com>
14748
14749         * cli/cli-interp.c (struct saved_output_files, saved_output):
14750         Moved from cli/cli-logging.c.
14751         (cli_set_logging): New function.
14752         (cli_interp_procs): Install cli_set_logging.
14753         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14754         Declare.
14755         * cli/cli-logging.c (struct saved_output_files, saved_output):
14756         Moved to cli/cli-interp.c.
14757         (pop_output_files): Don't save outputs here.
14758         (make_logging_output): New function.
14759         (handle_redirections): Don't build tee nor save previous outputs
14760         here.
14761         * interps.c (current_interp_set_logging): Change prototype.
14762         Assume there's always a set_logging_proc method installed.
14763         * interps.h (interp_set_logging_ftype): Change prototype.
14764         (current_interp_set_logging): Change prototype and adjust comment.
14765         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14766         use make_logging_output.
14767         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14768 2017-02-02  Pedro Alves  <palves@redhat.com>
14769
14770         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14771         from ...
14772         (set_logging_overwrite): ... here.
14773         (logging_no_redirect_file): Delete.
14774         (set_logging_redirect): Don't handle redirection on the fly.
14775         Instead warn that "logging off" / "logging on" is necessary.
14776         (pop_output_files): Delete references to logging_no_redirect_file.
14777         (show_logging_command): Always speak in terms of what will happen
14778         once logging is reenabled.
14779
14780 2017-02-02  Pedro Alves  <palves@redhat.com>
14781
14782         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14783
14784 2017-02-02  Pedro Alves  <palves@redhat.com>
14785
14786         * disasm.c (gdb_pretty_print_insn): Rename to ...
14787         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14788         Remove gdbarch parameter.  Adapt to clear the object's buffers
14789         instead of allocating new buffers, and to print using the object's
14790         gdb_disassembler instead of calling gdb_print_insn.
14791         (dump_insns): Use gdb_pretty_print_disassembler.
14792         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14793         (gdb_pretty_print_disassembler): New class.
14794         * record-btrace.c (btrace_insn_history): Use
14795         gdb_pretty_print_disassembler.
14796
14797 2017-02-02  Pedro Alves  <palves@redhat.com>
14798
14799         * ada-lang.c (type_as_string): Use string_file.
14800         * ada-valprint.c (ada_print_floating): Use string_file.
14801         * ada-varobj.c (ada_varobj_scalar_image)
14802         (ada_varobj_get_value_image): Use string_file.
14803         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14804         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14805         * breakpoint.c (update_inserted_breakpoint_locations)
14806         (insert_breakpoint_locations, reattach_breakpoints)
14807         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14808         (print_it_watchpoint): Use string_file.
14809         (save_breakpoints): Use stdio_file.
14810         * c-exp.y (oper): Use string_file.
14811         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14812         tee_file.
14813         (pop_output_files): Use delete.
14814         (handle_redirections): Use stdio_file and tee_file.
14815         * cli/cli-setshow.c (do_show_command): Use string_file.
14816         * compile/compile-c-support.c (c_compute_program): Use
14817         string_file.
14818         * compile/compile-c-symbols.c (generate_vla_size): Take a
14819         'string_file &' instead of a 'ui_file *'.
14820         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14821         of a 'ui_file *'.  Use string_file.
14822         (generate_c_for_variable_locations): Take a 'string_file &'
14823         instead of a 'ui_file *'.
14824         * compile/compile-internal.h (generate_c_for_for_one_variable):
14825         Take a 'string_file &' instead of a 'ui_file *'.
14826         * compile/compile-loc2c.c (push, pushf, unary, binary)
14827         (print_label, pushf_register_address, pushf_register)
14828         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14829         'ui_file *'.  Adjust.
14830         * compile/compile.c (compile_to_object): Use string_file.
14831         * compile/compile.h (compile_dwarf_expr_to_c)
14832         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14833         'ui_file *'.
14834         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14835         (replace_typedefs_qualified_name): Use string_file and
14836         obstack_copy0.
14837         * disasm.c (gdb_pretty_print_insn): Use string_file.
14838         (gdb_disassembly): Adjust reference the null_stream global.
14839         (do_ui_file_delete): Delete.
14840         (gdb_insn_length): Use null_stream.
14841         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14842         * dwarf2loc.c (dwarf2_compile_property_to_c)
14843         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14844         'string_file &' instead of a 'ui_file *'.
14845         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14846         * dwarf2read.c (do_ui_file_peek_last): Delete.
14847         (dwarf2_compute_name): Use string_file.
14848         * event-top.c (gdb_setup_readline): Use stdio_file.
14849         * gdbarch.sh (verify_gdbarch): Use string_file.
14850         * gdbtypes.c (safe_parse_type): Use null_stream.
14851         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14852         string_file.
14853         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14854         'string_file *' instead of a 'ui_file *'.
14855         (gdbscm_arch_disassemble): Use string_file.
14856         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14857         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14858         inherits from ui_file.
14859         (ioscm_file_port_delete, ioscm_file_port_rewind)
14860         (ioscm_file_port_put): Delete.
14861         (ioscm_file_port_write): Rename to ...
14862         (ioscm_file_port::write): ... this.  Remove file_port_magic
14863         checks.
14864         (ioscm_file_port_new): Delete.
14865         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14866         ui_file_up.
14867         * guile/scm-type.c (tyscm_type_name): Use string_file.
14868         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14869         Use string_file.
14870         * infcmd.c (print_return_value_1): Use string_file.
14871         * infrun.c (print_target_wait_results): Use string_file.
14872         * language.c (add_language): Use string_file.
14873         * location.c (explicit_to_string_internal): Use string_file.
14874         * main.c (captured_main_1): Use null_file.
14875         * maint.c (maintenance_print_architecture): Use stdio_file.
14876         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14877         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14878         event_channel>: Change type to mi_console_file pointer.
14879         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14880         (mi_console_file_delete): Delete.
14881         (struct mi_console_file): Delete.
14882         (mi_console_file_magic): Delete.
14883         (mi_console_file_new): Delete.
14884         (mi_console_file::mi_console_file): New.
14885         (mi_console_file_delete): Delete.
14886         (mi_console_file_fputs): Delete.
14887         (mi_console_file::write): New.
14888         (mi_console_raw_packet): Delete.
14889         (mi_console_file::flush): New.
14890         (mi_console_file_flush): Delete.
14891         (mi_console_set_raw): Rename to ...
14892         (mi_console_file::set_raw): ... this.
14893         * mi/mi-console.h (class mi_console_file): New class.
14894         (mi_console_file_new, mi_console_set_raw): Delete.
14895         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14896         (mi_set_logging): Use delete and tee_file.  Adjust.
14897         * mi/mi-main.c (output_register): Use string_file.
14898         (mi_cmd_data_evaluate_expression): Use string_file.
14899         (mi_cmd_data_read_memory): Use string_file.
14900         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14901         * mi/mi-out.c (mi_ui_out::main_stream): New.
14902         (mi_ui_out::rewind): Use main_stream and
14903         string_file.
14904         (mi_ui_out::put): Use main_stream and string_file.
14905         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14906         Allocate a 'string_file' instead.
14907         (mi_out_new): Don't allocate a mem_fileopen stream here.
14908         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14909         (mi_ui_out::main_stream): Declare method.
14910         * printcmd.c (eval_command): Use string_file.
14911         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14912         * python/py-arch.c (archpy_disassemble): Use string_file.
14913         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14914         * python/py-frame.c (frapy_str): Use string_file.
14915         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14916         Use string_file.
14917         * python/py-type.c (typy_str): Use string_file.
14918         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14919         * python/py-value.c (valpy_str): Use string_file.
14920         * record-btrace.c (btrace_insn_history): Use string_file.
14921         * regcache.c (regcache_print): Use stdio_file.
14922         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14923         * remote.c (escape_buffer): Use string_file.
14924         * rust-lang.c (rust_get_disr_info): Use string_file.
14925         * serial.c (serial_open_ops_1): Use stdio_file.
14926         (do_serial_close): Use delete.
14927         * stack.c (print_frame_arg): Use string_file.
14928         (print_frame_args): Remove local mem_fileopen stream, not used.
14929         (print_frame): Use string_file.
14930         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14931         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14932         Take a 'string_file *' instead of a 'ui_file *'.
14933         * top.c (new_ui): Use stdio_file and stderr_file.
14934         (free_ui): Use delete.
14935         (execute_command_to_string): Use string_file.
14936         (quit_confirm): Use string_file.
14937         * tracepoint.c (collection_list::append_exp): Use string_file.
14938         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14939         * tui/tui-file.c: Don't include "ui-file.h".
14940         (enum streamtype, struct tui_stream): Delete.
14941         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14942         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14943         (tui_file::tui_file): New method.
14944         (tui_file_fputs): Delete.
14945         (tui_file_get_strbuf): Delete.
14946         (tui_file::puts): New method.
14947         (tui_file_adjust_strbuf): Delete.
14948         (tui_file_flush): Delete.
14949         (tui_file::flush): New method.
14950         * tui/tui-file.h: Tweak intro comment.
14951         Include ui-file.h.
14952         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14953         (tui_file_adjust_strbuf): Delete declarations.
14954         (class tui_file): New class.
14955         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14956         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14957         (tui_register_format): Use string_stream.
14958         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14959         (tui_get_function_from_frame): Use string_file.
14960         * typeprint.c (type_to_string): Use string_file.
14961         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14962         (null_stream): New global.
14963         (ui_file_delete): Delete.
14964         (ui_file::ui_file): New.
14965         (null_file_isatty): Delete.
14966         (ui_file::~ui_file): New.
14967         (null_file_rewind): Delete.
14968         (ui_file::printf): New.
14969         (null_file_put): Delete.
14970         (null_file_flush): Delete.
14971         (ui_file::putstr): New.
14972         (null_file_write): Delete.
14973         (ui_file::putstrn): New.
14974         (null_file_read): Delete.
14975         (ui_file::putc): New.
14976         (null_file_fputs): Delete.
14977         (null_file_write_async_safe): Delete.
14978         (ui_file::vprintf): New.
14979         (null_file_delete): Delete.
14980         (null_file::write): New.
14981         (null_file_fseek): Delete.
14982         (null_file::puts): New.
14983         (ui_file_data): Delete.
14984         (null_file::write_async_safe): New.
14985         (gdb_flush, ui_file_isatty): Adjust.
14986         (ui_file_put, ui_file_rewind): Delete.
14987         (ui_file_write): Adjust.
14988         (ui_file_write_for_put): Delete.
14989         (ui_file_write_async_safe, ui_file_read): Adjust.
14990         (ui_file_fseek): Delete.
14991         (fputs_unfiltered): Adjust.
14992         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14993         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14994         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14995         (set_ui_file_data): Delete.
14996         (string_file::~string_file, string_file::write)
14997         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14998         (do_ui_file_as_string, ui_file_as_string): Delete.
14999         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15000         (struct mem_file): Delete.
15001         (mem_file_new): Delete.
15002         (stdio_file::stdio_file): New.
15003         (mem_file_delete): Delete.
15004         (stdio_file::stdio_file): New.
15005         (mem_fileopen): Delete.
15006         (stdio_file::~stdio_file): New.
15007         (mem_file_rewind): Delete.
15008         (stdio_file::set_stream): New.
15009         (mem_file_put): Delete.
15010         (stdio_file::open): New.
15011         (mem_file_write): Delete.
15012         (stdio_file_magic, struct stdio_file): Delete.
15013         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15014         (stdio_file::flush): New.
15015         (stdio_file_read): Rename to ...
15016         (stdio_file::read): ... this.  Adjust.
15017         (stdio_file_write): Rename to ...
15018         (stdio_file::write): ... this.  Adjust.
15019         (stdio_file_write_async_safe): Rename to ...
15020         (stdio_file::write_async_safe) ... this.  Adjust.
15021         (stdio_file_fputs): Rename to ...
15022         (stdio_file::puts) ... this.  Adjust.
15023         (stdio_file_isatty): Delete.
15024         (stdio_file_fseek): Delete.
15025         (stdio_file::isatty): New.
15026         (stderr_file_write): Rename to ...
15027         (stderr_file::write) ... this.  Adjust.
15028         (stderr_file_fputs): Rename to ...
15029         (stderr_file::puts) ... this.  Adjust.
15030         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15031         (stderr_file::stderr_file): New.
15032         (tee_file_magic): Delete.
15033         (struct tee_file): Delete.
15034         (tee_file::tee_file): New.
15035         (tee_file_new): Delete.
15036         (tee_file::~tee_file): New.
15037         (tee_file_delete): Delete.
15038         (tee_file_flush): Rename to ...
15039         (tee_file::flush): ... this.  Adjust.
15040         (tee_file_write): Rename to ...
15041         (tee_file::write): ... this.  Adjust.
15042         (tee_file::write_async_safe): New.
15043         (tee_file_fputs): Rename to ...
15044         (tee_file::puts): ... this.  Adjust.
15045         (tee_file_isatty): Rename to ...
15046         (tee_file::isatty): ... this.  Adjust.
15047         * ui-file.h (struct obstack, struct ui_file): Don't
15048         forward-declare.
15049         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15050         (ui_file_write_ftype)
15051         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15052         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15053         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15054         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15055         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15056         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15057         (set_ui_file_fseek): Delete.
15058         (ui_file_data, ui_file_delete, ui_file_rewind)
15059         (struct ui_file): New.
15060         (ui_file_up): New.
15061         (class null_file): New.
15062         (null_stream): Declare.
15063         (ui_file_write_for_put, ui_file_put): Delete.
15064         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15065         Delete.
15066         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15067         (gdb_fopen, tee_file_new): Delete.
15068         (struct string_file): New.
15069         (struct stdio_file): New.
15070         (stdio_file_up): New.
15071         (struct stderr_file): New.
15072         (class tee_file): New.
15073         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15074         of a 'ui_file *'.  Adjust.
15075         * ui-out.h (class ui_out) <field_stream>: Likewise.
15076         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15077         (null_stream): Delete.
15078         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15079         Adjust.
15080         * utils.h (struct ui_file): Delete forward declaration..
15081         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15082         (error_stream): Take a 'string_file &' instead of a
15083         'ui_file *'.
15084         * varobj.c (varobj_value_get_print_value): Use string_file.
15085         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15086         * gdbarch.c: Regenerate.
15087
15088 2017-02-02  Pedro Alves  <palves@redhat.com>
15089
15090         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15091         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
15092         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
15093         Adjust to call gdb_print_insn instead of
15094         gdb_disassembler::print_insn.
15095         (dump_insns, do_mixed_source_and_assembly_deprecated)
15096         (do_mixed_source_and_assembly, do_assembly_only): Add back a
15097         'gdbarch' parameter.  Remove gdb_disassembler parameter.
15098         (gdb_disassembly): Don't allocate a gdb_disassembler here.
15099         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15100         declaration.
15101         (gdb_pretty_print_insn): Re-add declaration.
15102         * record-btrace.c (btrace_insn_history): Don't allocate a
15103         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
15104
15105 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
15106
15107         * disasm.h (gdb_disassembly): Remove file_string parameter.
15108         * disasm.c (gdb_disassembly): Likewise.
15109         * cli/cli-cmds.c (print_disassembly): Adapt.
15110         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15111         * stack.c (do_gdb_disassembly): Likewise.
15112
15113 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15114
15115         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15116         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15117         targets.  And if the implicit value is longer than needed, extract
15118         the first bytes instead of the "least significant" ones.
15119
15120 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15121
15122         * btrace.c (btrace_enable): Do not call btrace_add_pc for
15123         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15124         (btrace_fetch): Assert can_access_registers_ptid.
15125         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15126         validate_registers_access.
15127
15128 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15129
15130         * gdbthread.h (can_access_registers_ptid): New.
15131         * thread.c (can_access_registers_ptid): New.
15132
15133 2017-02-01  Pedro Alves  <palves@redhat.com>
15134
15135         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15136
15137 2017-01-31  Pedro Alves  <palves@redhat.com>
15138
15139         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15140         Fix typos.
15141
15142 2017-01-31  Pedro Alves  <palves@redhat.com>
15143
15144         * stack.c (print_frame_args): Remove local mem_fileopen stream,
15145         not used.
15146
15147 2017-01-31  Pedro Alves  <palves@redhat.com>
15148
15149         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15150
15151 2017-01-31  Pedro Alves  <palves@redhat.com>
15152
15153         * common/scoped_restore.h
15154         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15155         change the value's parameter type to T2.
15156         (make_scoped_restore): Likewise.
15157
15158 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15159             Richard Henderson  <rth@redhat.com>
15160
15161         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15162         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15163         GS_BASE for older kernels.
15164         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15165         GS_BASE for older kernels.
15166         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15167         and GS_BASE to the offset table.
15168         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15169         system register group.
15170         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15171         for older kernels.
15172         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15173         amd64 ABI.
15174         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15175         AMD64_GSBASE_REGNUM.
15176         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15177         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15178         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15179         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15180         i386/64bit-segments.xml in those rules.
15181         * features/i386/64bit-segments.xml: New file.
15182         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15183         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15184         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15185         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15186         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15187         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15188         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15189         * features/i386/amd64-avx-linux.c: Regenerated.
15190         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15191         * features/i386/amd64-avx-mpx.c: Regenerated.
15192         * features/i386/amd64-avx512-linux.c: Regenerated.
15193         * features/i386/amd64-linux.c: Regenerated.
15194         * features/i386/amd64-mpx-linux.c: Regenerated.
15195         * features/i386/i386-avx-mpx-linux.c: Regenerated.
15196         * features/i386/i386-avx-mpx.c: Regenerated.
15197         * features/i386/x32-avx-linux.c: Regenerated.
15198         * features/i386/x32-avx512-linux.c: Regenerated.
15199         * regformats/i386/amd64-avx-linux.dat: Regenerated.
15200         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15201         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15202         * regformats/i386/amd64-linux.dat: Regenerated.
15203         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15204         * regformats/i386/x32-avx-linux.dat: Regenerated.
15205         * regformats/i386/x32-avx512-linux.dat: Regenerated.
15206         * regformats/i386/x32-linux.dat: Regenerated.
15207
15208 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15209
15210         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15211         Set to AMD64_NUM_REGS.
15212
15213 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15214
15215         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15216         that checks validity of a register number.
15217
15218 2017-01-27  Kees Cook  <keescook@google.com>
15219
15220         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15221         fetch_fpregs if target has fpa registers.
15222         (arm_linux_store_inferior_registers): Call store_fpregs if target
15223         has fpa registers.
15224
15225 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15226
15227         * cris-tdep.c (cris_gdbarch_init): Remove check for
15228         info.byte_order and force it to BFD_ENDIAN_LITTLE.
15229
15230 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
15231
15232         * corelow.c (get_core_register_section): Check for regset
15233         existence before checking for REGSET_VARIABLE_SIZE.
15234
15235 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15236             Pedro Alves  <palves@redhat.com>
15237
15238         PR gdb/20939
15239         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15240         call memory_error, save memaddr instead.
15241         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15242         negative, cal memory_error.
15243         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15244
15245 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15246
15247         * disasm-selftests.c (memory_error_test): New function.
15248         (_initialize_disasm_selftests): Register memory_error_test.
15249
15250 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15251
15252         * Makefile.in (SFILES): Add disasm-selftests.c and
15253         selftest-arch.c.
15254         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15255         * disasm-selftests.c: New file.
15256         * selftest-arch.c: New file.
15257         * selftest-arch.h: New file.
15258
15259 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15260
15261         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15262         to bfd_arch_mep.  Don't return 0 if section is not
15263         found.  Call print_insn_mep.
15264
15265 2017-01-26  Pedro Alves  <palves@redhat.com>
15266             Yao Qi  <yao.qi@linaro.org>
15267
15268         * arm-tdep.c: Include "disasm.h".
15269         (gdb_print_insn_arm): Update code to get gdbarch.
15270         * disasm.c (dis_asm_read_memory): Change it to
15271         gdb_disassembler::dis_asm_read_memory.
15272         (dis_asm_memory_error): Likewise.
15273         (dis_asm_print_address): Likewise.
15274         (gdb_pretty_print_insn): Change it to
15275         gdb_disassembler::pretty_print_insn.
15276         (dump_insns): Add one argument gdb_disassemlber.  All
15277         callers updated.
15278         (do_mixed_source_and_assembly_deprecated): Likewise.
15279         (do_mixed_source_and_assembly): Likewise.
15280         (do_assembly_only): Likewise.
15281         (gdb_disassembler::gdb_disassembler): New.
15282         (gdb_disassembler::print_insn): New.
15283         * disasm.h (class gdb_disassembler): New.
15284         (gdb_pretty_print_insn): Remove declaration.
15285         (gdb_disassemble_info): Likewise.
15286         * guile/scm-disasm.c (class gdbscm_disassembler): New.
15287         (gdbscm_disasm_read_memory_worker): Update.
15288         (gdbscm_disasm_read_memory): Update.
15289         (gdbscm_disasm_memory_error): Remove.
15290         (gdbscm_disasm_print_address): Remove.
15291         (gdbscm_disassembler::gdbscm_disassembler): New.
15292         (gdbscm_print_insn_from_port): Update.
15293         * mips-tdep.c: Include disasm.h.
15294         (gdb_print_insn_mips): Update code to get gdbarch.
15295         * record-btrace.c (btrace_insn_history): Update.
15296         * spu-tdep.c: Include disasm.h.
15297         (struct spu_dis_asm_data): Remove.
15298         (struct spu_dis_asm_info): New.
15299         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15300         SPU id.
15301         (gdb_print_insn_spu): Cast disassemble_info to
15302         spu_dis_asm_info.
15303
15304 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15305
15306         * disasm.c (do_ui_file_delete): Delete.
15307         (gdb_insn_length): Move code creating stream to ...
15308         * utils.c (null_stream): ... here.  New function.
15309         * utils.h (null_stream): Declare.
15310
15311 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
15312
15313         * python/py-inferior.c (find_thread_object): Return directly
15314         from the loop.  Remove "found" variable.
15315
15316 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
15317
15318         GDB 7.12.1 released.
15319
15320 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15321
15322         * python/py-function.c (fnpy_call): Reorder declarations to have
15323         the gdbpy_enter object declared first.
15324         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15325
15326 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15327
15328         PR python/21068
15329         * python/python-internal.h (PyMem_RawMalloc): Define for
15330         Python < 3.4.
15331         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15332         PyMem_RawMalloc instead of PyMem_Malloc.
15333
15334 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
15335             Luis Machado  <lgustavo@codesourcery.com>
15336
15337         * NEWS (New commands): Mention flash-erase.
15338         (New MI commands): Mention target-flash-erase.
15339         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15340         command.
15341         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15342         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15343         * target.c (flash_erase_command): New function.
15344         (initialize_targets): Add new flash-erase command.
15345         * target.h (flash_erase_command): New declaration.
15346
15347 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
15348
15349         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15350         HAVE_SYS_PROCFS_H is defined.
15351
15352 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15353
15354         * remote.c (struct cached_reg): Change data into a pointer.
15355         * (stop_reply_dtr): Free data pointers before deleting vector.
15356         (process_stop_reply): Likewise.
15357         (remote_parse_stop_reply): Allocate space for data
15358
15359 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15360
15361         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15362         MAX_REGISTER_SIZE.
15363         (amd64_pseudo_register_read_value): Likewise.
15364         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15365         (store_register_using_P): Likewise.
15366         * regcache.c (regcache_xfer_part): Likewise.
15367
15368 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
15369
15370         Split real and pseudo registers.
15371         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15372         (sparc32_pseudo_regnum): New enum.
15373         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15374         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15375         (SPARC32_CP0_REGISTERS): New macro.
15376         (sparc32_pseudo_register_name): New function.
15377         (sparc32_register_name): Use sparc32_pseudo_register_name.
15378         (sparc32_pseudo_register_type): New function.
15379         (sparc32_register_type): Use sparc32_pseudo_register_type.
15380         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15381         pseudo register numbers.
15382         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15383         (SPARC64_CP0_REGISTERS): New macro.
15384         (sparc64_pseudo_register_name): New function.
15385         (sparc64_register_name): Use sparc64_pseudo_register_name.
15386         (sparc64_pseudo_register_type): New function.
15387         (sparc64_register_type): Use sparc64_pseudo_register_type.
15388         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15389         pseudo register numbers.
15390         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15391         sparc64_store_arguments): Handle pseudo register numbers.
15392
15393 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15394
15395         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15396         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15397         output.
15398         (getpkt_or_notif_sane_1): Likewise.
15399
15400 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15401
15402         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15403         of CC.  Pass "-x c++-header" instead of "-x c".
15404
15405 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15406
15407         * remote.c (remote_can_async_p): Update comment.
15408
15409 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15410
15411         * linux-nat.c (linux_nat_can_async_p): Update comment.
15412
15413 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15414
15415         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15416
15417 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15418
15419         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15420
15421 2017-01-10  Tom Tromey  <tom@tromey.com>
15422
15423         * python/py-type.c (typy_legacy_template_argument): Update.
15424         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15425         ~demangle_parse_info): Declare new members.
15426         (cp_demangled_name_to_comp): Return unique_ptr.
15427         (cp_demangled_name_parse_free)
15428         (make_cleanup_cp_demangled_name_parse_free)
15429         (cp_new_demangle_parse_info): Remove.
15430         * cp-support.c (do_demangled_name_parse_free_cleanup)
15431         (make_cleanup_cp_demangled_name_parse_free): Remove.
15432         (inspect_type, cp_canonicalize_string_full)
15433         (cp_canonicalize_string): Update.
15434         (mangled_name_to_comp): Change return type.
15435         (cp_class_name_from_physname, method_name_from_physname)
15436         (cp_func_name, cp_remove_params): Update.
15437         * cp-name-parser.y (demangle_parse_info): New constructor, from
15438         cp_new_demangle_parse_info.
15439         (~demangle_parse_info): New destructor, from
15440         cp_demangled_name_parse_free.
15441         (cp_merge_demangle_parse_infos): Update.
15442         (cp_demangled_name_to_comp): Change return type.
15443
15444 2017-01-10  Tom Tromey  <tom@tromey.com>
15445
15446         * top.c (prevent_dont_repeat): Change return type.
15447         * python/python.c (execute_gdb_command): Use std::string.
15448         Update.
15449         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15450         * command.h (prevent_dont_repeat): Change return type.
15451         * breakpoint.c (bpstat_do_actions_1): Update.
15452
15453 2017-01-10  Tom Tromey  <tom@tromey.com>
15454
15455         * value.h (scoped_value_mark::~scoped_value_mark): Call
15456         free_to_mark.
15457         (scoped_value_mark::free_to_mark): New method.
15458         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15459         scoped_value_mark.
15460
15461 2017-01-10  Tom Tromey  <tom@tromey.com>
15462
15463         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15464         (valpy_reference_value, valpy_const_value, valpy_get_address)
15465         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15466         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15467         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15468         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15469         scoped_value_mark.
15470         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15471         * value.h (scoped_value_mark): New class.
15472
15473 2017-01-10  Tom Tromey  <tom@tromey.com>
15474
15475         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15476         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15477         * psymtab.c (discard_psymtabs_upto): Remove.
15478         (make_cleanup_discard_psymtabs): Remove.
15479         (struct psymtab_state): Remove.
15480
15481 2017-01-10  Tom Tromey  <tom@tromey.com>
15482
15483         * record-full.c (record_full_save_cleanups): Remove.
15484         (record_full_save): Use gdb::unlinker.
15485         * gcore.c (do_bfd_delete_cleanup): Remove.
15486         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15487         cleanups.
15488         * dwarf2read.c (unlink_if_set): Remove.
15489         (write_psymtabs_to_index): Use gdb::unlinker.
15490         * common/gdb_unlinker.h: New file.
15491
15492 2017-01-10  Tom Tromey  <tom@tromey.com>
15493
15494         * windows-tdep.c (windows_xfer_shared_library): Update.
15495         * windows-nat.c (windows_make_so): Update.
15496         * utils.h (make_cleanup_bfd_unref): Remove.
15497         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15498         * symfile.h (symfile_bfd_open)
15499         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15500         * symfile.c (read_symbols, symbol_file_add)
15501         (separate_debug_file_exists): Update.
15502         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15503         (generic_load, reread_symbols): Update.
15504         * symfile-mem.c (symbol_file_add_from_memory): Update.
15505         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15506         (spu_symbol_file_add_from_memory): Update.
15507         * solist.h (struct target_so_ops) <bfd_open>: Return
15508         gdb_bfd_ref_ptr.
15509         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15510         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15511         gdb_bfd_ref_ptr.
15512         (solib_map_sections, reload_shared_libraries_1): Update.
15513         * solib-svr4.c (enable_break): Update.
15514         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15515         * solib-frv.c (enable_break2): Update.
15516         * solib-dsbt.c (enable_break): Update.
15517         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15518         gdb_bfd_ref_ptr.
15519         (darwin_solib_get_all_image_info_addr_at_init): Update.
15520         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15521         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15522         * record-full.c (record_full_save): Update.
15523         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15524         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15525         * minidebug.c (find_separate_debug_file_in_section): Return
15526         gdb_bfd_ref_ptr.
15527         * machoread.c (macho_add_oso_symfile): Change abfd to
15528         gdb_bfd_ref_ptr.
15529         (macho_symfile_read_all_oso): Update.
15530         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15531         (macho_symfile_read): Update.
15532         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15533         (jit_bfd_try_read_symtab): Update.
15534         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15535         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15536         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15537         gdb_bfd_ref_ptr.
15538         (gdb_bfd_ref_policy): New struct.
15539         (gdb_bfd_ref_ptr): New typedef.
15540         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15541         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15542         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15543         gdb_bfd_ref_ptr.
15544         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15545         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15546         (gcore_command): Update.
15547         * exec.c (exec_file_attach): Update.
15548         * elfread.c (elf_symfile_read): Update.
15549         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15550         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15551         (open_and_init_dwo_file): Update.
15552         (open_dwp_file): Return gdb_bfd_ref_ptr.
15553         (open_and_init_dwp_file): Update.
15554         * corelow.c (core_open): Update.
15555         * compile/compile-object-load.c (compile_object_load): Update.
15556         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15557         * coffread.c (coff_symfile_read): Update.
15558         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15559         gdb_bfd_ref_ptr.  Rename.
15560         (dump_bfd_file, restore_command): Update.
15561         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15562         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15563         (find_separate_debug_file_by_buildid): Update.
15564
15565 2017-01-10  Tom Tromey  <tom@tromey.com>
15566
15567         * common/gdb_ref_ptr.h: New file.
15568         * python/py-ref.h (struct gdbpy_ref_policy): New.
15569         (gdbpy_ref): Now a typedef.
15570
15571 2017-01-10  Tom Tromey  <tom@tromey.com>
15572
15573         * utils.h (make_cleanup_htab_delete): Don't declare.
15574         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15575         Remove.
15576         * linespec.c (decode_compound_collector): Add constructor,
15577         destructor.
15578         (lookup_prefix_sym): Remove cleanup.
15579         (symtab_collector): Add constructor, destructor.
15580         (collect_symtabs_from_filename): Remove cleanup.
15581         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15582         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15583         Use htab_up.
15584         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15585         * dwarf2read.c (dw2_expand_symtabs_matching)
15586         (dw2_map_symbol_filenames, dwarf_decode_macros)
15587         (write_psymtabs_to_index): Use htab_up.
15588         * dwarf2loc.c (func_verify_no_selftailcall)
15589         (call_site_find_chain_1, func_verify_no_selftailcall)
15590         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15591         std::vector, gdb::unique_xmalloc_ptr.
15592         (call_sitep): Remove typedef.
15593         (dwarf2_locexpr_baton_eval): Remove unused variable.
15594
15595 2017-01-10  Tom Tromey  <tom@tromey.com>
15596
15597         * python/python-internal.h (make_cleanup_py_decref)
15598         (make_cleanup_py_xdecref): Don't declare.
15599         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15600         (py_xdecref, make_cleanup_py_xdecref): Remove.
15601
15602 2017-01-10  Tom Tromey  <tom@tromey.com>
15603
15604         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15605         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15606
15607 2017-01-10  Tom Tromey  <tom@tromey.com>
15608
15609         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15610
15611 2017-01-10  Tom Tromey  <tom@tromey.com>
15612
15613         * python/py-utils.c (unicode_to_encoded_string)
15614         (python_string_to_target_string)
15615         (python_string_to_target_python_string)
15616         (python_string_to_host_string, gdbpy_obj_to_string)
15617         (get_addr_from_python): Use gdbpy_ref.
15618
15619 2017-01-10  Tom Tromey  <tom@tromey.com>
15620
15621         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15622         gdbpy_ref.
15623
15624 2017-01-10  Tom Tromey  <tom@tromey.com>
15625
15626         * python/python.c (eval_python_command, gdbpy_decode_line)
15627         (gdbpy_run_events, gdbpy_start_type_printers)
15628         (gdbpy_apply_type_printers): Use gdbpy_ref.
15629
15630 2017-01-10  Tom Tromey  <tom@tromey.com>
15631
15632         * python/py-param.c (get_doc_string, compute_enum_values): Use
15633         gdbpy_ref.
15634
15635 2017-01-10  Tom Tromey  <tom@tromey.com>
15636
15637         * python/py-inferior.c (find_thread_object, build_inferior_list):
15638         Use gdbpy_ref.
15639
15640 2017-01-10  Tom Tromey  <tom@tromey.com>
15641
15642         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15643
15644 2017-01-10  Tom Tromey  <tom@tromey.com>
15645
15646         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15647         gdbpy_ref.
15648
15649 2017-01-10  Tom Tromey  <tom@tromey.com>
15650
15651         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15652         extra incref.
15653         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15654         Use gdbpy_ref.
15655
15656 2017-01-10  Tom Tromey  <tom@tromey.com>
15657
15658         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15659         gdbpy_ref.
15660
15661 2017-01-10  Tom Tromey  <tom@tromey.com>
15662
15663         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15664         decref results of PyArg_ParseTupleAndKeywords.
15665
15666 2017-01-10  Tom Tromey  <tom@tromey.com>
15667
15668         * python/python.c (python_run_simple_file): Use
15669         unique_xmalloc_ptr, gdbpy_ref.
15670
15671 2017-01-10  Tom Tromey  <tom@tromey.com>
15672
15673         * python/py-prettyprint.c (print_stack_unless_memory_error)
15674         (print_string_repr, print_children): Use gdbpy_ref.
15675         (dummy_python_frame): New class.
15676         (dummy_python_frame::dummy_python_frame): Rename from
15677         push_dummy_python_frame.
15678         (py_restore_tstate): Remove.
15679
15680 2017-01-10  Tom Tromey  <tom@tromey.com>
15681
15682         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15683
15684 2017-01-10  Tom Tromey  <tom@tromey.com>
15685
15686         * python/python.c (ensure_python_env, restore_python_env):
15687         Remove.
15688         * python/python-internal.h (ensure_python_env): Don't declare.
15689         * varobj.h (varobj_ensure_python_env): Don't declare.
15690         * varobj.c (varobj_ensure_python_env): Remove.
15691
15692 2017-01-10  Tom Tromey  <tom@tromey.com>
15693
15694         * varobj.c (varobj_value_get_print_value): Use
15695         gdbpy_enter_varobj.
15696
15697 2017-01-10  Tom Tromey  <tom@tromey.com>
15698
15699         * python/py-prettyprint.c (print_string_repr, print_children):
15700         Update.
15701         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15702         of "encoding".
15703         * varobj.c (varobj_value_get_print_value): Update.
15704         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15705
15706 2017-01-10  Tom Tromey  <tom@tromey.com>
15707
15708         * varobj.c (varobj_get_display_hint)
15709         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15710         (varobj_set_visualizer, free_variable): Use
15711         gdbpy_enter_varobj.
15712
15713 2017-01-10  Tom Tromey  <tom@tromey.com>
15714
15715         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15716         (do_finish_initialization): New function.  Use gdbpy_ref.
15717         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15718         do_finish_initialization.
15719
15720 2017-01-10  Tom Tromey  <tom@tromey.com>
15721
15722         * python/py-param.c (get_set_value, get_show_value): Use
15723         gdbpy_enter, gdbpy_ref.
15724
15725 2017-01-10  Tom Tromey  <tom@tromey.com>
15726
15727         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15728
15729 2017-01-10  Tom Tromey  <tom@tromey.com>
15730
15731         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15732
15733 2017-01-10  Tom Tromey  <tom@tromey.com>
15734
15735         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15736         Use gdbpy_enter_varobj.
15737
15738 2017-01-10  Tom Tromey  <tom@tromey.com>
15739
15740         * varobj.c (gdbpy_enter_varobj): New constructor.
15741         * python/python-internal.h (gdbpy_enter_varobj): New class.
15742         * python/py-varobj.c (py_varobj_get_iterator): Use
15743         gdbpy_enter_varobj.
15744
15745 2017-01-10  Tom Tromey  <tom@tromey.com>
15746
15747         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15748         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15749         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15750         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15751         unique_xmalloc_ptr.
15752         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15753
15754 2017-01-10  Tom Tromey  <tom@tromey.com>
15755
15756         * python/py-xmethods.c (invoke_match_method): Use
15757         gdbpy_ref.
15758
15759 2017-01-10  Tom Tromey  <tom@tromey.com>
15760
15761         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15762         gdbpy_enter, gdbpy_ref.
15763
15764 2017-01-10  Tom Tromey  <tom@tromey.com>
15765
15766         * python/python.c (python_interactive_command): Use gdbpy_enter.
15767
15768 2017-01-10  Tom Tromey  <tom@tromey.com>
15769
15770         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15771         gdbpy_ref.
15772
15773 2017-01-10  Tom Tromey  <tom@tromey.com>
15774
15775         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15776         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15777
15778 2017-01-10  Tom Tromey  <tom@tromey.com>
15779
15780         * utils.h (htab_deleter): New struct.
15781         (htab_up): New typedef.
15782         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15783         gdbpy_enter, gdbpy_ref, htab_up.
15784
15785 2017-01-10  Tom Tromey  <tom@tromey.com>
15786
15787         * python/py-unwind.c (pending_frame_invalidate): Remove.
15788         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15789
15790 2017-01-10  Tom Tromey  <tom@tromey.com>
15791
15792         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15793         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15794
15795 2017-01-10  Tom Tromey  <tom@tromey.com>
15796
15797         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15798
15799 2017-01-10  Tom Tromey  <tom@tromey.com>
15800
15801         * python/python.c (gdbpy_eval_from_control_command)
15802         (gdbpy_source_script, gdbpy_run_events)
15803         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15804         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15805         gdbpy_enter.
15806
15807 2017-01-10  Tom Tromey  <tom@tromey.com>
15808
15809         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15810
15811 2017-01-10  Tom Tromey  <tom@tromey.com>
15812
15813         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15814
15815 2017-01-10  Tom Tromey  <tom@tromey.com>
15816
15817         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15818         (python_on_inferior_call_pre, python_on_inferior_call_post)
15819         (python_on_memory_change, python_on_register_change)
15820         (python_inferior_exit, python_new_objfile, add_thread_object)
15821         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15822
15823 2017-01-10  Tom Tromey  <tom@tromey.com>
15824
15825         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15826         (bpfinishpy_handle_exit): Use gdbpy_enter.
15827
15828 2017-01-10  Tom Tromey  <tom@tromey.com>
15829
15830         * python/py-cmd.c (cmdpy_destroyer)
15831         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15832         gdbpy_enter.
15833
15834 2017-01-10  Tom Tromey  <tom@tromey.com>
15835
15836         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15837         gdbpy_enter.
15838         (gdbpy_breakpoint_has_cond): Likewise.
15839
15840 2017-01-10  Tom Tromey  <tom@tromey.com>
15841
15842         * python/python.c (gdbpy_enter): New constructor.
15843         (~gdbpy_enter): New destructor.
15844         (restore_python_env, ensure_python_env): Rewrite.
15845         * python/python-internal.h (gdbpy_enter): New class.
15846
15847 2017-01-10  Tom Tromey  <tom@tromey.com>
15848
15849         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15850
15851 2017-01-10  Tom Tromey  <tom@tromey.com>
15852
15853         * python/py-value.c (value_has_field, get_field_flag)
15854         (get_field_type, valpy_getitem, convert_value_from_python): Use
15855         gdbpy_ref.
15856
15857 2017-01-10  Tom Tromey  <tom@tromey.com>
15858
15859         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15860         gdbpy_ref.
15861
15862 2017-01-10  Tom Tromey  <tom@tromey.com>
15863
15864         * python/py-prettyprint.c (search_pp_list)
15865         (find_pretty_printer_from_objfiles)
15866         (find_pretty_printer_from_progspace)
15867         (find_pretty_printer_from_gdb, find_pretty_printer)
15868         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15869         gdbpy_ref.
15870
15871 2017-01-10  Tom Tromey  <tom@tromey.com>
15872
15873         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15874
15875 2017-01-10  Tom Tromey  <tom@tromey.com>
15876
15877         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15878         (ltpy_get_all_source_lines): Use gdbpy_ref.
15879
15880 2017-01-10  Tom Tromey  <tom@tromey.com>
15881
15882         * python/py-framefilter.c (extract_sym, extract_value)
15883         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15884         gdbpy_ref.
15885
15886 2017-01-10  Tom Tromey  <tom@tromey.com>
15887
15888         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15889
15890 2017-01-10  Tom Tromey  <tom@tromey.com>
15891
15892         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15893
15894 2017-01-10  Tom Tromey  <tom@tromey.com>
15895
15896         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15897         gdbpy_ref.
15898
15899 2017-01-10  Tom Tromey  <tom@tromey.com>
15900
15901         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15902
15903 2017-01-10  Tom Tromey  <tom@tromey.com>
15904
15905         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15906         (typy_range): Use gdbpy_ref.
15907
15908 2017-01-10  Tom Tromey  <tom@tromey.com>
15909
15910         * python/py-threadevent.c (create_thread_event_object): Use
15911         gdbpy_ref.
15912         * python/py-stopevent.c (create_stop_event_object): Simplify.
15913         (emit_stop_event): Use gdbpy_ref.
15914         * python/py-signalevent.c (create_signal_event_object): Use
15915         gdbpy_ref.
15916         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15917         (emit_new_objfile_event, create_clear_objfiles_event_object)
15918         (emit_clear_objfiles_event): Use gdbpy_ref.
15919         * python/py-infevents.c (create_inferior_call_event_object)
15920         (create_register_changed_event_object)
15921         (create_memory_changed_event_object, emit_inferior_call_event)
15922         (emit_memory_changed_event, emit_register_changed_event): Use
15923         gdbpy_ref.
15924         * python/py-exitedevent.c (create_exited_event_object)
15925         (emit_exited_event): Use gdbpy_ref.
15926         * python/py-event.h (evpy_emit_event): Remove
15927         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15928         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15929         * python/py-continueevent.c (emit_continue_event): Use
15930         gdbpy_ref.
15931         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15932         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15933         gdbpy_ref.
15934         * python/py-bpevent.c (create_breakpoint_event_object): Use
15935         gdbpy_ref.
15936
15937 2017-01-10  Tom Tromey  <tom@tromey.com>
15938
15939         * python/py-ref.h: New file.
15940
15941 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15942
15943         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15944         void.
15945         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15946         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15947         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15948         * ui-out.c (ui_out::redirect): Likewise.
15949         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15950         * cli/cli-logging.c (set_logging_redirect): Update call site of
15951         ui_out::redirect.
15952         (handle_redirections): Likewise.
15953         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15954         * top.c (execute_command_to_string): Likewise.
15955         * utils.c (do_ui_out_redirect_pop): Likewise.
15956
15957 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15958
15959         * stack.c (_initialize_stack): Update "frame" command help message.
15960
15961 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15962
15963         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15964
15965 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15966
15967         * x86-linux-nat.h: Include gdb_proc_service.h.
15968
15969 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15970
15971         * ser-base.h: Include serial.h.
15972
15973 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15974
15975         * ppc-linux-tdep.h: Include ppc-tdep.h.
15976
15977 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15978
15979         * nat/amd64-linux-siginfo.h: Include signal.h.
15980
15981 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15982
15983         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15984
15985 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15986
15987         * mi/mi-parse.h: Include mi-cmds.h.
15988
15989 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15990
15991         * inf-loop.c: Don't include "target.h".
15992         * inf-loop.h: Include it here.
15993
15994 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15995
15996         * dfp.h: Include "dboulest.h" and "expression.h".
15997
15998 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15999
16000         * ax-gdb.h: Include "ax.h".
16001
16002 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16003
16004         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16005         with nat/gdb_ptrace.h.
16006
16007 2017-01-05  Yao Qi  <yao.qi@linaro.org>
16008
16009         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16010         new line.
16011         (mips64_fbsd_sigframe_init): Likewise.
16012
16013 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16014
16015         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16016         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16017
16018 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16019
16020         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16021         * NEWS: Mention new FreeBSD/mips native configuration.
16022         * config/mips/fbsd.mh: New file.
16023         * configure.host: Add mips*-*-freebsd*.
16024         * mips-fbsd-nat.c: New file.
16025
16026 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16027
16028         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16029         (ALLDEPFILES): Add mips-fbsd-tdep.c.
16030         * NEWS: Mention new FreeBSD/mips target.
16031         * configure.tgt: Add mips*-*-freebsd*.
16032         * mips-fbsd-tdep.c: New file.
16033         * mips-fbsd-tdep.h: New file.
16034
16035 2017-01-04  Yao Qi  <yao.qi@linaro.org>
16036
16037         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16038         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16039
16040 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
16041
16042         Update copyright year range in all GDB files.
16043
16044 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
16045
16046         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
16047
16048 For older changes see ChangeLog-2016.
16049 \f
16050 Local Variables:
16051 mode: change-log
16052 left-margin: 8
16053 fill-column: 74
16054 version-control: never
16055 coding: utf-8
16056 End: