Target FP: Use target format throughout expression parsing
[external/binutils.git] / gdb / ChangeLog
1 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2
3         * doublest.c (floatformat_from_string): New function.
4         * doublest.h (floatformat_from_string): Add prototype.
5
6         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
7         (OP_FLOAT): ... this.
8         * expression.h: Do not include "doublest.h".
9         (union exp_element): Replace doubleconst and decfloatconst by
10         new element floatconst.
11         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
12         (ada_evaluate_subexp): Likewise.
13         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
14         OP_DOUBLE and OP_DECFLOAT.
15         * expprint.c (print_subexp_standard): Likewise.
16         (dump_subexp_body_standard): Likewise.
17         * breakpoint.c (watchpoint_exp_is_const): Likewise.
18
19         * parse.c: Include "dfp.h".
20         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
21         (write_exp_elt_floatcst): New function.
22         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
23         and OP_DECFLOAT.
24         (operator_check_standard): Likewise.
25         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
26         Return target format buffer instead of host DOUBLEST.
27         Use floatformat_from_string and decimal_from_string to parse
28         either binary or decimal floating-point types.
29         (parse_c_float): Remove.
30         * parser-defs.h: Do not include "doublest.h".
31         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
32         (write_exp_elt_floatcst): Add prototype.
33         (parse_float): Update prototype.
34         (parse_c_float): Remove.
35
36         * c-exp.y: Do not include "dfp.h".
37         (typed_val_float): Use byte buffer instead of DOUBLEST.
38         (typed_val_decfloat): Remove.
39         (DECFLOAT): Remove.
40         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
41         (parse_number): Update to new parse_float interface.
42         Parse suffixes and determine type before calling parse_float.
43         Handle decimal and binary FP types the same way.
44
45         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
46         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
47         (parse_number): Update to new parse_float interface.
48         Parse suffixes and determine type before calling parse_float.
49
50         * f-exp.y: Replace dval by typed_val_float.
51         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
52         (parse_number): Use parse_float instead of atof.
53
54         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
55         (parse_go_float): Remove.
56         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
57         (parse_number): Call parse_float instead of parse_go_float.
58         Parse suffixes and determine type before calling parse_float.
59
60         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
61         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
62         (parse_number): Update to new parse_float interface.
63         Parse suffixes and determine type before calling parse_float.
64
65         * m2-exp.y: Replace dval by byte buffer val.
66         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
67         (parse_number): Call parse_float instead of atof.
68
69         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
70         (lex_number): Call parse_float instead of strtod.
71         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
72         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
73         Use write_exp_elt_floatcst.
74         (unit_testing): Remove static variable.
75         (rust_type): Do not check unit_testing.
76         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
77
78         * ada-exp.y (type_float, type_double): Remove.
79         (typed_val_float): Use byte buffer instead of DOUBLEST.
80         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
81         * ada-lex.l (processReal): Use parse_float instead of sscanf.
82
83 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
84
85         * aarch64-tdep.h (enum aarch64_regnum): Remove.
86         * arch/aarch64.h: New file.
87
88 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
89
90         * dfp.h (decimal_from_string): Use const reference for argument.
91         * dfp.c (decimal_from_string): Likewise.
92
93 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
94
95         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
96         * sh64-tdep.c (sh64_do_fp_register): Likewise.
97         * mips-tdep.c (mips_print_fp_register): Likewise.
98
99 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
100
101         * common/format.h (enum argclass): Replace decfloat_arg by
102         dec32float_arg, dec64float_arg, and dec128float_arg.
103         * common/format.c (parse_format_string): Update to return
104         new decimal float argument classes.
105
106         * printcmd.c (printf_decfloat): Rename to ...
107         (printf_floating): ... this.  Add argclass argument, and use it
108         instead of parsing the format string again.  Add support for
109         binary floating-point values, using floatformat_to_string.
110         Convert value to the target format if it doesn't already match.
111         (ui_printf): Call printf_floating instead of printf_decfloat,
112         also for double_arg / long_double_arg.  Pass argclass.
113
114         * dfp.c (decimal_to_string): Add format string argument.
115         * dfp.h (decimal_to_string): Likewise.
116
117         * doublest.c (floatformat_to_string): Add format string argument.
118         * doublest.h (floatformat_to_string): Likewise.
119
120 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
121
122         * doublest.c (floatformat_precision): New routine.
123         (floatformat_to_string): Likewise.
124         * doublest.c (floatformat_to_string): Add prototype.
125
126         * printcmd.c (print_scalar_formatted): Only call print_floating
127         on floating-point types.
128         * valprint.c: Do not include "floatformat.h".
129         (generic_val_print_decfloat): Remove.
130         (generic_val_print): Call generic_val_print_float for both
131         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
132         (print_floating): Use floatformat_to_string.  Handle decimal float.
133         (print_decimal_floating): Remove, merge into floatformat_to_string.
134         * value.h (print_decimal_floating): Remove.
135
136         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
137
138 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
139
140         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
141
142 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
143
144         * memattr.h: Don't include vec.h.
145         (struct mem_attrib): Initialize fields.
146         <unknown>: New static method.
147         (struct mem_region): Add constructors, operator<, initialize
148         fields.
149         * memattr.c: Include algorithm.
150         (default_mem_attrib, unknown_mem_attrib): Remove.
151         (user_mem_region_list): New global.
152         (target_mem_region_list, mem_region_list): Change type to
153         std::vector<mem_region>.
154         (mem_use_target): Now a function.
155         (target_mem_regions_valid): Change type to bool.
156         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
157         (require_user_regions): Adjust.
158         (require_target_regions): Adjust.
159         (create_mem_region): Adjust.
160         (lookup_mem_region): Adjust.
161         (invalidate_target_mem_regions): Adjust.
162         (mem_clear): Rename to...
163         (user_mem_clear): ... this, and adjust.
164         (mem_command): Adjust.
165         (info_mem_command): Adjust.
166         (mem_enable, enable_mem_command, mem_disable,
167         disable_mem_command): Adjust.
168         (mem_delete): Adjust.
169         (delete_mem_command): Adjust.
170         * memory-map.h (parse_memory_map): Return an std::vector.
171         * memory-map.c (parse_memory_map): Likewise.
172         (struct memory_map_parsing_data): Add constructor.
173         <memory_map>: Point to std::vector.
174         (memory_map_start_memory): Adjust.
175         (memory_map_end_memory): Adjust.
176         (memory_map_end_property): Adjust.
177         (clear_result): Remove.
178         * remote.c (remote_memory_map): Return an std::vector.
179         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
180         Remove.
181         (target_debug_print_mem_region_vector): New.
182         * target-delegates.c: Regenerate.
183         * target.h (mem_region_vector): New typedef.
184         (to_memory_map): Return mem_region_vector.
185         (target_memory_map): Return an std::vector.
186         * target.c (target_memory_map): Return an std::vector.
187         (flash_erase_command): Adjust.
188
189 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
190
191         * memory-map.c (struct memory_map_parsing_data) <property_name>:
192         Change type to std::string.
193         (memory_map_start_property): Adjust.
194         (memory_map_end_property): Adjust.
195
196 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
197
198         * infrun.h: Include common/byte-vector.h.
199         (struct displaced_step_closure): New struct.
200         (struct buf_displaced_step_closure): New struct.
201         * infrun.c (displaced_step_closure::~displaced_step_closure):
202         Provide default implementation.
203         (displaced_step_clear): Deallocate step closure with delete.
204         * aarch64-tdep.c (displaced_step_closure): Rename to ...
205         (aarch64_displaced_step_closure): ... this, extend
206         displaced_step_closure.
207         (aarch64_displaced_step_data) <dsc>: Change type to
208         aarch64_displaced_step_closure.
209         (aarch64_displaced_step_copy_insn): Adjust to type change, use
210         unique_ptr.
211         (aarch64_displaced_step_fixup): Add cast for displaced step
212         closure.
213         * amd64-tdep.c (displaced_step_closure): Rename to ...
214         (amd64_displaced_step_closure): ... this, extend
215         displaced_step_closure.
216         <insn_buf>: Change type to std::vector<gdb_byte>.
217         <max_len>: Remove.
218         (fixup_riprel): Change type of DSC parameter, adjust to type
219         change of insn_buf.
220         (fixup_displaced_copy): Change type of DSC parameter.
221         (amd64_displaced_step_copy_insn): Instantiate
222         amd64_displaced_step_closure.
223         (amd64_displaced_step_fixup): Add cast for closure type, adjust
224         to type change of insn_buf.
225         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
226         parameter DSC.
227         (arm_linux_copy_svc): Likewise.
228         (cleanup_kernel_helper_return): Likewise.
229         (arm_catch_kernel_helper_return): Likewise.
230         (arm_linux_displaced_step_copy_insn): Instantiate
231         arm_displaced_step_closure.
232         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
233         (displaced_read_reg): Change type of parameter DSC.
234         (branch_write_pc): Likewise.
235         (load_write_pc): Likewise.
236         (alu_write_pc): Likewise.
237         (displaced_write_reg): Likewise.
238         (arm_copy_unmodified): Likewise.
239         (thumb_copy_unmodified_32bit): Likewise.
240         (thumb_copy_unmodified_16bit): Likewise.
241         (cleanup_preload): Likewise.
242         (install_preload): Likewise.
243         (arm_copy_preload): Likewise.
244         (thumb2_copy_preload): Likewise.
245         (install_preload_reg): Likewise.
246         (arm_copy_preload_reg): Likewise.
247         (cleanup_copro_load_store): Likewise.
248         (install_copro_load_store): Likewise.
249         (arm_copy_copro_load_store) Likewise.
250         (thumb2_copy_copro_load_store): Likewise.
251         (cleanup_branch): Likewise.
252         (install_b_bl_blx): Likewise.
253         (arm_copy_b_bl_blx): Likewise.
254         (thumb2_copy_b_bl_blx): Likewise.
255         (thumb_copy_b): Likewise.
256         (install_bx_blx_reg): Likewise.
257         (arm_copy_bx_blx_reg): Likewise.
258         (thumb_copy_bx_blx_reg): Likewise.
259         (cleanup_alu_imm): Likewise.
260         (arm_copy_alu_imm): Likewise.
261         (thumb2_copy_alu_imm): Likewise.
262         (cleanup_alu_reg): Likewise.
263         (install_alu_reg): Likewise.
264         (arm_copy_alu_reg): Likewise.
265         (thumb_copy_alu_reg): Likewise.
266         (cleanup_alu_shifted_reg): Likewise.
267         (install_alu_shifted_reg): Likewise.
268         (arm_copy_alu_shifted_reg): Likewise.
269         (cleanup_load): Likewise.
270         (cleanup_store): Likewise.
271         (arm_copy_extra_ld_st): Likewise.
272         (install_load_store): Likewise.
273         (thumb2_copy_load_literal): Likewise.
274         (thumb2_copy_load_reg_imm): Likewise.
275         (arm_copy_ldr_str_ldrb_strb): Likewise.
276         (cleanup_block_load_all): Likewise.
277         (cleanup_block_store_pc): Likewise.
278         (cleanup_block_load_pc): Likewise.
279         (arm_copy_block_xfer): Likewise.
280         (thumb2_copy_block_xfer): Likewise.
281         (cleanup_svc): Likewise.
282         (install_svc): Likewise.
283         (arm_copy_svc): Likewise.
284         (thumb_copy_svc): Likewise.
285         (arm_copy_undef): Likewise.
286         (thumb_32bit_copy_undef): Likewise.
287         (arm_copy_unpred): Likewise.
288         (arm_decode_misc_memhint_neon): Likewise.
289         (arm_decode_unconditional): Likewise.
290         (arm_decode_miscellaneous): Likewise.
291         (arm_decode_dp_misc): Likewise.
292         (arm_decode_ld_st_word_ubyte): Likewise.
293         (arm_decode_media): Likewise.
294         (arm_decode_b_bl_ldmstm): Likewise.
295         (arm_decode_ext_reg_ld_st): Likewise.
296         (thumb2_decode_dp_shift_reg): Likewise.
297         (thumb2_decode_ext_reg_ld_st): Likewise.
298         (arm_decode_svc_copro): Likewise.
299         (thumb2_decode_svc_copro): Likewise.
300         (install_pc_relative): Likewise.
301         (thumb_copy_pc_relative_16bit): Likewise.
302         (thumb_decode_pc_relative_16bit): Likewise.
303         (thumb_copy_pc_relative_32bit): Likewise.
304         (thumb_copy_16bit_ldr_literal): Likewise.
305         (thumb_copy_cbnz_cbz): Likewise.
306         (thumb2_copy_table_branch): Likewise.
307         (cleanup_pop_pc_16bit_all): Likewise.
308         (thumb_copy_pop_pc_16bit): Likewise.
309         (thumb_process_displaced_16bit_insn): Likewise.
310         (decode_thumb_32bit_ld_mem_hints): Likewise.
311         (thumb_process_displaced_32bit_insn): Likewise.
312         (thumb_process_displaced_insn): Likewise.
313         (arm_process_displaced_insn): Likewise.
314         (arm_displaced_init_closure): Likewise.
315         (arm_displaced_step_fixup): Add cast for closure.
316         * arm-tdep.h: Include infrun.h.
317         (displaced_step_closure): Rename to ...
318         (arm_displaced_step_closure): ... this, extend
319         displaced_step_closure.
320         <u::svc::copy_svc_os>: Change type of parameter DSC.
321         <cleanup>: Likewise.
322         (arm_process_displaced_insn): Likewise.
323         (arm_displaced_init_closure): Likewise.
324         (displaced_read_reg): Likewise.
325         (displaced_write_reg): Likewise.
326         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
327         Adjust.
328         * i386-tdep.h: Include infrun.h.
329         (i386_displaced_step_closure): New typedef.
330         * i386-tdep.c (i386_displaced_step_copy_insn): Use
331         i386_displaced_step_closure.
332         (i386_displaced_step_fixup): Adjust.
333         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
334         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
335         and unique_ptr.
336         (ppc_displaced_step_fixup): Adjust.
337         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
338         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
339         and unique_ptr.
340         (s390_displaced_step_fixup): Adjust.
341
342 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
343
344         * interps.h (interp_resume, interp_suspend, interp_set_temp):
345         Remove declarations.
346
347 2017-10-20  Tom Tromey  <tom@tromey.com>
348
349         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
350         std::vector.
351         (gdb_bfd_record_inclusion): Update.
352         (bfdp): Remove typedef.
353
354 2017-10-20  Tom Tromey  <tom@tromey.com>
355
356         * gdb_bfd.c (gdb_bfd_ref): Use new.
357         (struct gdb_bfd_data): Add constructor, destructor, and member
358         initializers.
359         (gdb_bfd_unref): Use delete.
360
361 2017-10-20  Tom Tromey  <tom@tromey.com>
362
363         * exec.c (exec_file_attach): Use new_bfd_ref.
364         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
365         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
366         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
367         new_bfd_ref.
368         * gdb_bfd.h (new_bfd_ref): New function.
369
370 2017-10-20  Pedro Alves  <palves@redhat.com>
371
372         * main.c (captured_command_loop): Add attribute noinline.
373
374 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
375
376         * interps.c (struct interp_factory): Add constructor.
377         (interp_factory_p): Remove typedef.
378         (DEF_VEC_P(interp_factory_p)): Remove.
379         (interpreter_factories): Change type to std::vector.
380         (interp_factory_register): Adjust.
381         (interp_lookup): Adjust.
382         (interpreter_completer): Adjust.
383
384 2017-10-19  Tom Tromey  <tom@tromey.com>
385
386         * break-catch-syscall.c (catch_syscall_completer): Use
387         std::string, gdb::unique_xmalloc_ptr.
388
389 2017-10-19  Tom Tromey  <tom@tromey.com>
390
391         * infcall.c (call_function_by_hand_dummy): Use std::string.
392
393 2017-10-19  Tom Tromey  <tom@tromey.com>
394
395         * mi/mi-main.c (mi_cmd_execute): Update.
396         * top.h (prepare_execute_command): Return scoped_value_mark.
397         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
398         Add move constructor.
399         * top.c (prepare_execute_command): Return scoped_value_mark.
400         (execute_command): Update.
401
402 2017-10-19  Pedro Alves  <palves@redhat.com>
403
404         * xml-support.c (xml_fetch_content_from_file): Check fread's
405         return.
406
407 2017-10-19  Pedro Alves  <palves@redhat.com>
408
409         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
410         async.
411         (handle_error_fd): New function.
412         (ser_base_async): Add/delete an event loop file handler for
413         error_fd.
414
415 2017-10-19  Pedro Alves  <palves@redhat.com>
416
417         * xml-support.c (xml_fetch_content_from_file): Don't read in
418         chunks.  Instead use fseek to determine the file's size, and read
419         it in one go.
420
421 2017-11-18  Keith Seitz  <keiths@redhat.com>
422
423         * c-exp.y (oper): Canonicalize conversion operators of user-defined
424         types.
425         Add whitespace to front of type name.
426
427 2017-10-18  Keith Seitz  <keiths@redhat.com>
428
429         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
430         DW_AT_accessibility.
431
432 2017-10-18  Yao Qi  <yao.qi@linaro.org>
433
434         * features/tic6x-c62x-linux.c: Remove.
435
436 2017-10-17  Tom Tromey  <tom@tromey.com>
437
438         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
439         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
440         (do_mixed_source_and_assembly): Likewise.
441
442 2017-10-17  Tom Tromey  <tom@tromey.com>
443
444         * regcache.c (regcache::xfer_part): Remove assertion.
445
446 2017-10-17  Pedro Alves  <palves@redhat.com>
447
448         * xml-support.c (xml_fetch_content_from_file): Call
449         unique_ptr::release() instead unique_ptr::get() when passing
450         through xrealloc.
451
452 2017-10-17  Yao Qi  <yao.qi@linaro.org>
453
454         * regcache.c (regcache::xfer_part): Remove parameters read and
455         write, add parameter is_raw.  All callers are updated.
456
457 2017-10-16  Keith Seitz  <keiths@redhat.com>
458
459         * c-typeprint.c (enum access_specifier): Moved here from
460         c_type_print_base.
461         (output_access_specifier): New function.
462         (c_type_print_base): Consider typedefs when assessing
463         whether access labels are needed.
464         Use output_access_specifier as needed.
465         Output access specifier for typedefs, if needed.
466         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
467         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
468         fields.
469         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
470         accessor macros.
471
472 2017-10-16  Tom Tromey  <tom@tromey.com>
473
474         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
475         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
476         * target.c (target_fileio_read_stralloc): Update.
477         * sparc64-tdep.c (adi_is_addr_mapped): Update.
478         * target.h (target_fileio_read_stralloc): Return
479         unique_xmalloc_ptr.
480
481 2017-10-16  Tom Tromey  <tom@tromey.com>
482
483         * xml-syscall.c (xml_init_syscalls_info): Update.
484         * xml-support.c (xinclude_start_include): Update.
485         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
486         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
487         (xml_fetch_content_from_file): Likewise.
488         * osdata.c (get_osdata): Update.
489         * target.h (target_read_stralloc, target_get_osdata): Return
490         unique_xmalloc_ptr.
491         * solib-aix.c (solib_aix_get_library_list): Update.
492         * solib-target.c (solib_target_current_sos): Update.
493         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
494         * xml-tdesc.c (fetch_available_features_from_target): Update.
495         (target_fetch_description_xml): Update.
496         (file_read_description_xml): Update.
497         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
498         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
499         (remote_pid_to_exec_file): Update.
500         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
501         (target_get_osdata): Likewise.
502
503 2017-10-16  Tom Tromey  <tom@tromey.com>
504
505         * remote.c (remote_register_number_and_offset): Use std::vector.
506         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
507         (putpkt_binary): Use gdb::def_vector.
508         (compare_sections_command): Use gdb::byte_vector.
509
510 2017-10-16  Tom Tromey  <tom@tromey.com>
511
512         * ppc-linux-nat.c (hwdebug_insert_point): Use
513         gdb::unique_xmalloc_ptr, XDUP.
514
515 2017-10-16  Tom Tromey  <tom@tromey.com>
516
517         * probe.c (parse_probes): Use std::string.
518         (info_probes_for_ops, enable_probes_command)
519         (disable_probes_command): Remove cleanups.
520
521 2017-10-16  Tom Tromey  <tom@tromey.com>
522
523         * buildsym.c (block_compar): Remove.
524         (end_symtab_get_static_block): Use std::vector.
525
526 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
527
528         * memrange.h (struct mem_range): Define operator< and operator==.
529         (mem_range_s): Remove.
530         (DEF_VEC_O (mem_range_s)): Remove.
531         (normalize_mem_ranges): Change parameter type to std::vector.
532         * memrange.c (compare_mem_ranges): Remove.
533         (normalize_mem_ranges): Change parameter type to std::vector,
534         adjust to vector change.
535         * exec.c (section_table_available_memory): Return vector, remove
536         parameter.
537         (section_table_read_available_memory): Adjust to std::vector
538         change.
539         * remote.c (remote_read_bytes): Adjust to std::vector
540         change.
541         * tracepoint.h (traceframe_available_memory): Change parameter
542         type to std::vector.
543         * tracepoint.c (traceframe_available_memory): Change parameter
544         type to std::vector, adjust.
545         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
546         std::vector change.
547         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
548         unittests/memrange-selftests.c.
549         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
550         * gdb/unittests/memrange-selftests.c: New file.
551
552 2017-10-16  Pedro Alves  <palves@redhat.com>
553
554         * elfread.c (probe_key_free): Rename range-for variable.
555         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
556         (find_probe_by_pc, collect_probes): Rename range-for variable.
557
558 2017-10-16  Yao Qi  <yao.qi@linaro.org>
559
560         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
561         * features/tic6x-c62x.c: Remove.
562         * features/tic6x-c64x-linux.c: Remove.
563         * features/tic6x-c64x.c: Remove.
564         * features/tic6x-c64xp-linux.c: Remove.
565         * features/tic6x-c64xp.c: Remove.
566         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
567         initialize_tdesc_tic6x_*_linux functions.
568         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
569         initialize_tdesc_tic6x_* functions.
570
571 2017-10-16  Yao Qi  <yao.qi@linaro.org>
572
573         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
574         tic6x-c62x.
575         * regformats/tic6x-c62x.dat: Remove.
576         * regformats/tic6x-c64x.dat: Remove.
577         * regformats/tic6x-c64xp.dat: Remove.
578
579 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
580
581         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
582         (the !HAVE_LIBEXPAT version).
583
584 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
585
586         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
587         const.
588
589 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
590
591         * target.h: Include tracepoint.h.
592         (enum trace_find_type): Move to tracepoint.h.
593         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
594         * tracepoint.h: Don't include target.h
595         (enum trace_find_type): Move from target.h.
596         (parse_traceframe_info): Return a unique ptr.
597         * tracepoint.c (current_traceframe_info): Change type to unique
598         ptr.
599         (free_traceframe_info): Remove.
600         (clear_traceframe_info): Don't manually free
601         current_traceframe_info.
602         (free_result): Remove.
603         (parse_traceframe_info): Return a unique ptr.
604         (get_traceframe_info): Adjust to unique ptr.
605         * ctf.c (ctf_traceframe_info): Return a unique ptr.
606         * remote.c (remote_traceframe_info): Return a unique ptr.
607         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
608         ptr.
609         * target-debug.h (target_debug_print_traceframe_info_up): New
610         macro.
611         * target-delegates.c: Regenerate.
612
613 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
614
615         * memrange.h (struct mem_range): Add constructors.
616         * tracepoint.h (struct traceframe_info) <memory>: Change type to
617         std::vector<mem_range>.
618         * tracepoint.c (free_traceframe_info): Don't manually free
619         vector.
620         (traceframe_info_start_memory): Adjust to vector change.
621         (traceframe_available_memory): Likewise.
622         * tracefile-tfile.c (build_traceframe_info): Likewise.
623         * ctf.c (ctf_traceframe_info): Likewise.
624
625 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
626
627         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
628         std::vector<int>.
629         * tracepoint.c (free_traceframe_info): Deallocate with delete.
630         (traceframe_info_start_tvar): Adjust to vector change.
631         (parse_traceframe_info): Allocate with new.
632         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
633         vector change.
634         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
635         change.
636         tfile_traceframe_info): Allocate with new.
637         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
638         change.
639
640 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
641
642         * tracepoint.c (traceframe_info): Rename to...
643         (current_traceframe_info): ...this.
644         (clear_traceframe_info): Adjust.
645         (get_traceframe_info): Adjust.
646
647 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
648
649         * nat/linux-osdata.c: Include algorithm.
650         (compare_processes): Remove.
651         (struct pid_pgid_entry): New struct.
652         (linux_xfer_osdata_processgroups): Use std::vector instead of
653         XNEWVEC.
654
655 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
656
657         * objfiles.h: Don't include symfile.h.
658         (struct partial_symbol): Remove forward-declaration.
659         (struct objfile) <global_psymbols, static_psymbols>: Change type
660         to std::vector<partial_symbol *>.
661         * objfiles.c (objfile::objfile): Don't memset those fields.
662         (objfile::~objfile): Don't free those fields.
663         * psympriv.h (struct psymbol_allocation_list): Remove
664         forward-declaration.
665         (add_psymbol_to_list): Change psymbol_allocation_list parameter
666         to std::vector.
667         (start_psymtab_common): Change parameters to std::vector.
668         * psymtab.c: Include algorithm.
669         (require_partial_symbols): Call shrink_to_fit.
670         (find_pc_sect_psymbol): Adjust to vector change.
671         (match_partial_symbol): Likewise.
672         (lookup_partial_symbol): Likewise.
673         (psym_relocate): Likewise.
674         (dump_psymtab): Likewise.
675         (recursively_search_psymtabs): Likewise.
676         (compare_psymbols): Remove.
677         (sort_pst_symbols): Adjust to vector change.
678         (start_psymtab_common): Likewise.
679         (end_psymtab_common): Likewise.
680         (psymbol_bcache_full): De-constify return value.
681         (add_psymbol_to_bcache): Likewise.
682         (extend_psymbol_list): Remove.
683         (append_psymbol_to_list): Adjust to vector change.
684         (add_psymbol_to_list): Likewise.
685         (init_psymbol_list): Likewise.
686         (maintenance_info_psymtabs): Likewise.
687         (maintenance_check_psymtabs): Likewise.
688         * symfile.h (struct psymbol_allocation_list): Remove.
689         * symfile.c (reread_symbols): Adjust to vector change.
690         * dbxread.c (start_psymtab): Change type of parameters.
691         (dbx_symfile_read): Adjust to vector change.
692         (read_dbx_symtab): Likewise.
693         (start_psymtab): Change type of parameters.
694         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
695         (create_partial_symtab): Likewise.
696         (add_partial_symbol): Likewise.
697         (write_one_signatured_type): Likewise.
698         (recursively_write_psymbols): Likewise.
699         * mdebugread.c (parse_partial_symbols): Likewise.
700         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
701         (scan_xcoff_symtab): Adjust to vector change.
702         (xcoff_initial_scan): Likewise.
703
704 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
705
706         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
707
708 2017-10-13  Yao Qi  <yao.qi@linaro.org>
709
710         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
711         Remove s390x-*-expedite, add s390x-expedite.
712
713 2017-10-13  Yao Qi  <yao.qi@linaro.org>
714
715         * features/s390-gs-linux64.c: Regenerated.
716         * features/s390x-gs-linux64.c: Regenerated.
717
718 2017-10-13  Tom Tromey  <tom@tromey.com>
719
720         * compile/compile-object-run.c (do_module_cleanup): Use delete.
721         * solib.c (update_solib_list, reload_shared_libraries_1): Use
722         delete.
723         * symfile.c (symbol_file_add_with_addrs): Use new.
724         (symbol_file_add_separate): Update comment.
725         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
726         * jit.c (jit_object_close_impl): Use new.
727         (jit_unregister_code): Use delete.
728         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
729         (~objfile): Rename from free_objfile.
730         (free_objfile_separate_debug, do_free_objfile_cleanup)
731         (free_all_objfiles, objfile_purge_solibs): Use delete.
732         * objfiles.h (struct objfile): Add constructor and destructor.
733         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
734         (allocate_objfile, free_objfile): Don't declare.
735         (struct objstats): Add initializers.
736
737 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
738
739         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
740         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
741         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
742         * gdbarch.h: Regenerate.
743         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
744         Adjust comment.
745         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
746         (i386_displaced_step_fixup): Adjust comment.
747         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
748
749 2017-10-12  Tom Tromey  <tom@tromey.com>
750
751         * prologue-value.h (pv_area::store_would_trash): Return bool.
752         (pv_area::find_reg): Likewise.
753         * prologue-value.c (pv_area::store_would_trash): Return bool.
754         (pv_area::find_reg): Likewise.
755
756 2017-10-12  Tom Tromey  <tom@tromey.com>
757
758         * s390-linux-tdep.c (s390_store, s390_load)
759         (s390_check_for_saved, s390_analyze_prologue): Update.
760         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
761         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
762         * prologue-value.h (class pv_area): Move from prologue-value.c.
763         Change names of members.  Add constructor, destructor, member
764         functions.
765         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
766         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
767         (pv_area_fetch, pv_area_scan): Don't declare.
768         * prologue-value.c (struct pv_area::area_entry): Now member of
769         pv_area.
770         (struct pv_area): Move to prologue-value.h.
771         (pv_area::pv_area): Rename from make_pv_area.
772         (pv_area::~pv_area): Rename from free_pv_area.
773         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
774         (clear_entries, find_entry, overlaps, store_would_trash, store)
775         (fetch, find_reg, scan): Now member of pv_area.
776         Remove "area" argument.  Update.
777         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
778         Update.
779         * mn10300-tdep.c (push_reg, check_for_saved)
780         (mn10300_analyze_prologue): Update.
781         * mep-tdep.c (is_arg_spill, check_for_saved)
782         (mep_analyze_prologue): Update.
783         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
784         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
785         (m32c_is_struct_return, m32c_analyze_prologue): Update.
786         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
787         Update.
788         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
789         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
790
791 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
792
793         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
794         * linux-nat.c (linux_nat_delete_thread): New variable.
795         (lwp_free): Invoke linux_nat_delete_thread if set.
796         (linux_nat_set_delete_thread): New function.
797         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
798         thread delete callback.
799         * arm-linux-nat.c (arm_linux_delete_thread): New function.
800         (_initialize_arm_linux_nat): Assign thread delete callback.
801         * s390-linux-nat.c (s390_delete_thread): New function.
802         (_initialize_s390_nat): Assign thread delete callback.
803         * x86-linux-nat.c (x86_linux_add_target): Likewise.
804         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
805         function.
806         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
807         declaration.
808         * nat/x86-linux.c (x86_linux_delete_thread): New function.
809         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
810
811 2017-10-09  Tom Tromey  <tom@tromey.com>
812
813         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
814         std::string.
815         * tui/tui-layout.c (enum tui_status): Use std::string.
816
817 2017-10-11  Tom Tromey  <tom@tromey.com>
818
819         * gdbthread.h (thread_command): Constify.
820         * inferior.h (detach_command): Constify.
821         * top.h (set_history, show_history): Constify.
822         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
823         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
824         * bsd-kvm.c (bsd_kvm_cmd): Constify.
825         * printcmd.c (set_command): Constify.
826         (non_const_set_command): New function.
827         * dcache.c (set_dcache_command, show_dcache_command): Constify.
828         * breakpoint.c (enable_command, disable_command, delete_command)
829         (catch_command, tcatch_command, set_breakpoint_cmd)
830         (show_breakpoint_cmd): Constify.
831         * macrocmd.c (macro_command): Constify.
832         * infcmd.c (unset_command, kill_command, detach_command)
833         (info_proc_cmd): Constify.
834         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
835         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
836         (info_auto_load_cmd): Constify.
837         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
838         (unset_tdesc_cmd): Constify.
839         * ada-lang.c (set_ada_command, show_ada_command)
840         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
841         * guile/guile.c (set_guile_command, show_guile_command)
842         (info_guile_command): Constify.
843         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
844         Constify.
845         * skip.c (skip_command): Constify.
846         * compile/compile.c (_initialize_compile): Constify.
847         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
848         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
849         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
850         (maint_btrace_pt_show_cmd): Constify.
851         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
852         Constify.
853         * python/python.c (user_show_python, user_set_python): Constify.
854         * mips-tdep.c (set_mips_command, show_mips_command)
855         (set_mipsfpu_command): Constify.
856         * record-btrace.c (cmd_record_btrace_start)
857         (cmd_set_record_btrace, cmd_show_record_btrace)
858         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
859         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
860         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
861         Constify.
862         * symfile.c (overlay_command): Constify.
863         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
864         * cli/cli-logging.c (set_logging_command, show_logging_command):
865         Constify.
866         * cli/cli-dump.c (dump_command, append_command)
867         (srec_dump_command, ihex_dump_command, verilog_dump_command)
868         (tekhex_dump_command, binary_dump_command)
869         (binary_append_command): Constify.
870         * cli/cli-decode.c (struct cmd_list_element): Change type of
871         "fun".
872         * cli/cli-cmds.c (info_command, show_command, set_debug)
873         (show_debug): Constify.
874         (show_command): Add non-const overload.
875         * top.c (set_history, show_history): Constify.
876         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
877         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
878         * target.c (target_command): Constify.
879         * sparc64-tdep.c (info_adi_command): Constify.
880         * record-full.c (cmd_record_full_start): Constify.
881         (set_record_full_command): Constify.  Fix typo.
882         (show_record_full_command): Constify.
883         * thread.c (thread_command, thread_apply_command): Constify.
884         * memattr.c (dummy_cmd): Constify.
885         * value.c (function_command): Constify.
886         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
887         * probe.c (info_probes_command): Constify.
888         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
889         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
890         (show_thread_cmd, set_thread_default_cmd)
891         (show_thread_default_cmd): Constify.
892         (check_empty): Constify.
893         * tracepoint.c (tfind_command): Constify.
894         * cp-support.c (maint_cplus_command): Constify.
895         * windows-tdep.c (info_w32_command): Constify.
896         * record.c (cmd_record_start, set_record_command)
897         (show_record_command, info_record_command, cmd_record_goto):
898         Constify.
899         * ravenscar-thread.c (set_ravenscar_command)
900         (show_ravenscar_command): Constify.
901         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
902         Constify.
903         (add_internal_problem_command): Remove casts.
904         * arc-tdep.c (maintenance_print_arc_command): Constify.
905         * valprint.c (set_print, show_print, set_print_raw)
906         (show_print_raw): Constify.
907         * maint.c (maintenance_command, maintenance_info_command)
908         (maintenance_print_command, maintenance_set_cmd)
909         (maintenance_show_cmd, set_per_command_cmd)
910         (show_per_command_cmd, maintenance_check_command): Constify.
911         * language.c (set_check, show_check): Constify.
912         * typeprint.c (show_print_type, set_print_type): Constify.
913         * go32-nat.c (go32_info_dos_command): Constify.
914
915 2017-10-11  Tom Tromey  <tom@tromey.com>
916
917         * breakpoint.c (prepare_re_set_context): Remove.
918         (breakpoint_re_set_one): Update.  Don't use cleanups.
919         (breakpoint_re_set): Use scoped_restore, std::string, and
920         scoped_restore_current_language.
921
922 2017-10-11  Tom Tromey  <tom@tromey.com>
923
924         * breakpoint.c (commands_command_1): Use std::string.
925         (cleanup_executing_breakpoints): Remove.
926         (bpstat_do_actions_1): Use scoped_restore.
927         (bpstat_check_watchpoint): Use std::string.
928         (decode_static_tracepoint_spec): Likewise.
929         (break_range_command): Likewise.
930         (watch_command_1): Likewise.
931         (compare_breakpoints): Change argument types.
932         (clear_command): Use std::vector.
933         (cleanup_executing_breakpoints): Remove.
934         (update_global_location_list): Use unique_xmalloc_ptr.
935         (strace_command): Remove unused declaration.
936
937 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
938
939         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
940         * NEWS: Mention new FreeBSD/arm native configuration.
941         * configure.host: Add arm*-*-freebsd*.
942         * configure.nat: Likewise.
943         * arm-fbsd-nat.c: New file.
944
945 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
946
947         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
948         (ALLDEPFILES): Add arm-fbsd-tdep.c.
949         * NEWS: Mention new FreeBSD/arm target.
950         * configure.tgt: Add arm*-*-freebsd*.
951         * arm-fbsd-tdep.c: New file.
952         * arm-fbsd-tdep.h: New file.
953
954 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
955
956         * linux-tdep.c (linux_make_corefile_notes): Remove call to
957         `gdbarch_elfcore_write_linux_prpsinfo'.
958         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
959         method.
960         (elf_internal_linux_prpsinfo): Remove declaration.
961         * gdbarch.h: Regenerate.
962         * gdbarch.c: Regenerate.
963
964 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
965
966         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
967         `set_gdbarch_elfcore_write_linux_prpsinfo'.
968
969 2017-10-11  Pedro Alves  <palves@redhat.com>
970
971         * breakpoint.c (reattach_breakpoints): Delete.
972         * breakpoint.h (reattach_breakpoints): Delete.
973
974 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
975
976         * symfile.c (registered_sym_fns): Make struct, not typedef.
977         (DEF_VEC_O (registered_sym_fns)): Remove.
978         (symtab_fns): Change type to std::vector.
979         (add_symtab_fns): Adjust.
980         (find_sym_fns): Adjust.
981
982 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
983
984         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
985         * arc-tdep.h (arc_arch_is_em): New function.
986         (arc_arch_is_hs): Likewise.
987
988 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
989
990         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
991         parentheses in the declaration.
992         (macro_lookup_inclusion): Likewise.
993         (macro_lookup_definition): Likewise.
994         * p-lang.h (pascal_builtin_types): Likewise.
995         * tui/tui-data.c (tui_win_list): Likewise.
996         * tui/tui-data.h (tui_win_list): Likewise.
997         * utils.h (make_cleanup_free_section_addr_info): Likewise.
998
999 2017-10-11  Mark Rages  <markrages@gmail.com>
1000
1001         * target-memory.c (block_boundaries): Fix for block address not
1002         aligned on block size.
1003
1004 2017-10-10  Pedro Alves <palves@redhat.com>
1005             Tom Tromey  <tom@tromey.com>
1006
1007         * breakpoint.c (struct captured_breakpoint_query_args)
1008         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1009         (print_breakpoint): New.
1010         * breakpoint.h (print_breakpoint): Declare.
1011         * common/common-exceptions.h (enum return_reason): Remove
1012         references to catch_exceptions.
1013         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1014         Delete.
1015         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1016         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1017         * gdb.h: Delete.
1018         * gdbthread.h (thread_select): Declare.
1019         * mi/mi-cmd-break.c: Don't include gdb.h.
1020         (breakpoint_notify): Use print_breakpoint.
1021         * mi/mi-cmd-catch.c: Don't include gdb.h.
1022         * mi/mi-interp.c: Don't include gdb.h.
1023         (mi_print_breakpoint_for_event): New.
1024         (mi_breakpoint_created, mi_breakpoint_modified): Use
1025         mi_print_breakpoint_for_event.
1026         * mi/mi-main.c: Don't include gdb.h.
1027         (mi_cmd_thread_select): Parse the global thread ID here.  Use
1028         thread_select instead of gdb_thread_select.
1029         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1030         of using gdb_list_thread_ids.
1031         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
1032         FILEIO_ENOSYS here.
1033         (remote_fileio_request): Use TRY/CATCH instead of
1034         catch_exceptions.
1035         * symfile-mem.c (struct symbol_file_add_from_memory_args)
1036         (symbol_file_add_from_memory_wrapper): Delete.
1037         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1038         * thread.c: Don't include gdb.h.
1039         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1040         (thread_alive): Use thread_select.
1041         (do_captured_thread_select): Delete, parts salvaged as ...
1042         (thread_select): ... this new function.
1043         (gdb_thread_select): Delete.
1044
1045 2017-10-10  Pedro Alves  <palves@redhat.com>
1046             Tom Tromey  <tom@tromey.com>
1047
1048         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1049         and reverse logic.
1050         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1051         No longer macros.  Instead ...
1052         (enum wp_check_result): They're now values of this new
1053         enumeration.
1054         (watchpoint_check): Change return type to wp_check_result and
1055         parameter type to bpstat.
1056         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1057         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1058         catch_errors.  Reverse logic of watchpoint_check call.
1059         (breakpoint_re_set_one): Now returns void and takes a breakpoint
1060         pointer as parameter.
1061         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1062         * common/common-exceptions.c (throw_exception_sjlj): Update
1063         comments to avoid mentioning catch_errors.
1064         * exceptions.c (catch_errors): Delete.
1065         * exceptions.h: Update comments to avoid mentioning catch_errors.
1066         (catch_errors_ftype, catch_errors): Delete.
1067         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1068         (hook_stop_stub): Delete.
1069         (restore_selected_frame): Change return type to void, and
1070         parameter type to const frame_id &.
1071         (restore_infcall_control_state): Use TRY/CATCH instead of
1072         catch_errors.
1073         * main.c (captured_command_loop): Return void and remove
1074         parameter.  Remove references to catch_errors.
1075         (captured_main): Use TRY/CATCH instead of catch_errors.
1076         * objc-lang.c (objc_submethod_helper_data)
1077         (find_objc_msgcall_submethod_helper): Delete.
1078         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1079         catch_errors.
1080         * record-full.c (record_full_message): Return void.
1081         (record_full_message_args, record_full_message_wrapper): Delete.
1082         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1083         instead of catch_errors.
1084         * solib-aix.c (solib_aix_open_symbol_file_object): Change
1085         parameter type to int.
1086         * solib-darwin.c (open_symbol_file_object): Ditto.
1087         * solib-dsbt.c (open_symbol_file_object): Ditto.
1088         * solib-frv.c (open_symbol_file_object): Ditto.
1089         * solib-svr4.c (open_symbol_file_object): Ditto.
1090         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1091         * solib.c (update_solib_list): Use TRY/CATCH instead of
1092         catch_errors.
1093         * solist.h (struct target_so_ops) <open_symbol_file_object>:
1094         Change type.
1095         * symmisc.c (struct print_symbol_args): Remove.
1096         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1097         (print_symbol): Change type.
1098         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1099         and remove parameters.
1100         (catch_errors): New.
1101         (get_windows_debug_event): Adjust.
1102
1103 2017-10-09  Tom Tromey  <tom@tromey.com>
1104
1105         * mi/mi-main.c (free_splay_tree): Remove.
1106         (list_available_thread_groups): Use splay_tree_up.
1107         * common/gdb_splay_tree.h: New file.
1108
1109 2017-10-09  Tom Tromey  <tom@tromey.com>
1110
1111         * mi/mi-main.c (do_nothing): Remove.
1112         (list_available_thread_groups): Update.
1113
1114 2017-10-09  Pedro Alves  <palves@redhat.com>
1115
1116         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1117         reading registers when switching context.
1118
1119 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
1120
1121         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1122         (fbsd_convert_siginfo): Likewise.
1123         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1124
1125 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
1126
1127         * configure.ac (try_guile_versions): Remove guile-2.2.
1128         * configure: Regenerate.
1129
1130 2017-10-09  Tom Tromey  <tom@tromey.com>
1131
1132         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1133         (COMPILE.pre): Use $(CXX).
1134
1135 2017-10-09  Pedro Alves  <palves@redhat.com>
1136
1137         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1138         Use bool.
1139         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1140         * cp-support.h (cp_remove_params): Now returns a
1141         gdb::unique_xmalloc_ptr.
1142         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1143         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1144         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1145         returning a gdb::unique_xmalloc_ptr.
1146         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1147         * stack.c (find_frame_funname): Adjust to cp_remove_params
1148         returning a gdb::unique_xmalloc_ptr.
1149
1150 2017-10-08  Tom Tromey  <tom@tromey.com>
1151
1152         * dwarf2read.c (dwarf2_get_dwz_file): Use
1153         gdb::unique_xmalloc_ptr.
1154         (find_slot_in_mapped_hash): Likewise.
1155         (dwarf2_physname): Likewise.
1156         (create_dwo_unit_in_dwp_v1): Use std::string.
1157         (create_dwo_unit_in_dwp_v2): Likewise.
1158         (lookup_dwo_cutu): Likewise.
1159         (inherit_abstract_dies): Use std::vector.
1160         (read_array_type): Likewise.
1161         (dwarf_decode_macros): Remove unused declaration.
1162         (unsigned_int_compar): Remove.
1163         (dwarf2_build_psymtabs_hard): Use scoped_restore.
1164         (psymtabs_addrmap_cleanup): Remove.
1165
1166 2017-10-08  Tom Tromey  <tom@tromey.com>
1167
1168         * frame-unwind.c (frame_unwind_try_unwinder): Update.
1169         * frame.h (frame_cleanup_after_sniffer): Declare.
1170         (frame_prepare_for_sniffer): Return void.
1171         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
1172         type of argument.
1173         (frame_prepare_for_sniffer): Return void.
1174
1175 2017-10-08  Tom Tromey  <tom@tromey.com>
1176
1177         * utils.h (make_cleanup_value_free): Remove.
1178         * utils.c (do_value_free, struct cleanup): Remove.
1179         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1180         Use gdb_value_up.
1181         * value.h (struct value_deleter): New.
1182         (gdb_value_up): New typedef.
1183
1184 2017-10-08  Tom Tromey  <tom@tromey.com>
1185
1186         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1187         (make_cleanup_free_search_symbols): Remove.
1188         (search_symbols): Return std::vector.
1189         (symbol_search::compare_search_syms): Now member of
1190         symbol_search.  Change arguments.
1191         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
1192         (symtab_symbol_info, rbreak_command): Update.
1193         * symtab.h (struct symbol_search) <next>: Remove.
1194         Add constructors.
1195         (symbol_search::operator<): New function.
1196         (symbol_search::operator==): New function.
1197         (search_symbols): Remove std::vector.
1198         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1199         (symbol_search::compare_search_syms): Declare.
1200
1201 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1202
1203         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1204         arch/aarch64-insn.o.
1205         Remove one rule.
1206         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1207
1208 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1209
1210         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1211         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1212         arch/arm-linux.o respectively.
1213         * configure.tgt: Likewise.
1214
1215 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1216
1217         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1218         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1219
1220 2017-10-06  Pedro Alves  <palves@redhat.com>
1221
1222         * windows-nat.c: Include <algorithm>.
1223
1224 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1225
1226         * configure.tgt (i386_tobjs): New variable.
1227         (amd64_tobjs): New variable.
1228         Set $cpu_obs and $os_obs.
1229
1230 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1231
1232         * Makefile.in (CONFIG_SRC_SUBDIR): New.
1233         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1234         (clean): Remove object files and dependency files.
1235         (distclean): Remove the directory.
1236         * configure.ac: Invoke AC_CONFIG_COMMANDS.
1237         * configure: Re-generated.
1238         * configure.tgt: Replace amd64.o with arch/amd64.o.
1239
1240 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
1241
1242         PR build/22188
1243         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1244         and SETEND.
1245
1246 2017-10-05  Pedro Alves  <palves@redhat.com>
1247
1248         * linux-nat.c (linux_child_follow_fork): When following the parent
1249         and detaching the child, consult the parent thread's architecture
1250         instead of the child's.
1251
1252 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1253
1254         * ax.h: Do not include "doublest.h".
1255         (union agent_val): Remove.
1256
1257 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1258
1259         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1260         (decimal_to_string): Return std::string object.
1261         (decimal_from_string): Accept std::string object.  Return bool.
1262         (decimal_from_integral, decimal_from_doublest): Remove.
1263         (decimal_from_longest): Add prototype.
1264         (decimal_from_ulongest): Likewise.
1265         (decimal_to_longest): Likewise.
1266         (decimal_from_doublest): Likewise.
1267         * dfp.c: Do not include "gdbtypes.h" or "value.h".
1268         (MAX_DECIMAL_STRING): Move here.
1269         (decimal_to_string): Return std::string object.
1270         (decimal_from_string): Accept std::string object.  Return bool.
1271         (decimal_from_integral): Remove, replace by ...
1272         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1273         (decimal_to_longest): New function.
1274         (decimal_from_floating): Remove, replace by ...
1275         (decimal_from_doublest): ... this new function.
1276         (decimal_to_doublest): Update to new decimal_to_string interface.
1277
1278         * value.c (unpack_long): Use decimal_to_longest.
1279         * valops.c (value_cast): Use decimal_from_doublest instead of
1280         decimal_from_floating.  Use decimal_from_[u]longest isntead of
1281         decimal_from_integral.
1282         * valarith.c (value_args_as_decimal): Likewise.
1283         * valprint.c (print_decimal_floating): Update to new
1284         decimal_to_string interface.
1285         * printcmd.c (printf_decfloat): Likewise.
1286         * c-exp.y (parse_number): Update to new decimal_from_string interface.
1287
1288 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1289
1290         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
1291         * gdbtypes.c: Include "floatformat.h".
1292         * value.c: Likewise.
1293         * m68k-tdep.c: Likewise.
1294
1295         * findvar.c: Do not include "floatformat.h".
1296         * amd64-darwin-tdep.c: Likewise.
1297         * arm-linux-tdep.c: Likewise.
1298         * i386-darwin-tdep.c: Likewise.
1299         * i387-tdep.c: Likewise.
1300         * m68k-linux-tdep.c: Likewise.
1301         * mep-tdep.c: Likewise.
1302         * mips-tdep.c: Likewise.
1303         * nios2-tdep.c: Likewise.
1304         * s390-linux-tdep.c: Likewise.
1305         * sparc-obsd-tdep.c: Likewise.
1306         * sparc-tdep.c: Likewise.
1307         * sparc64-tdep.c: Likewise.
1308         * spu-tdep.c: Likewise.
1309         * tic6x-tdep.c: Likewise.
1310         * tilegx-tdep.c: Likewise.
1311         * vax-tdep.c: Likewise.
1312         * xstormy16-tdep.c: Likewise.
1313         * xtensa-tdep.c: Likewise.
1314
1315         * top.c: Do not include "doublest.h".
1316         * aarch64-tdep.c: Likewise.
1317         * alpha-tdep.c: Likewise.
1318         * arm-linux-tdep.c: Likewise.
1319         * m68k-linux-tdep.c: Likewise.
1320         * tilegx-tdep.c: Likewise.
1321         * xstormy16-tdep.c: Likewise.
1322
1323 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1324
1325         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
1326         (mipsn32_fbsd_sigframe): Define.
1327         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
1328         for FreeBSD/mipsn32.
1329
1330 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1331
1332         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
1333         AT_HWCAP.
1334
1335 2017-10-05  Tristan Gingold  <tgingold@free.fr>
1336
1337         * MAINTAINERS (Misc): Update my email address.
1338
1339 2017-10-04  Pedro Alves  <palves@redhat.com>
1340
1341         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
1342         it instead of target_gdbarch.
1343         (get_remote_state, get_remote_packet_size): Adjust
1344         get_remote_arch_state calls, passing down target_gdbarch
1345         explicitly.
1346         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1347         'gdbarch' and use it instead of target_gdbarch.
1348         (get_memory_packet_size): Adjust get_remote_arch_state calls,
1349         passing down target_gdbarch explicitly.
1350         (struct stop_reply) <arch>: New field.
1351         (remote_parse_stop_reply): Use the stopped thread's architecture,
1352         not the current inferior's.  Save the architecture in the
1353         stop_reply.
1354         (process_stop_reply): Use the stop reply's architecture.
1355         (process_g_packet, remote_fetch_registers)
1356         (remote_prepare_to_store, store_registers_using_G)
1357         (remote_store_registers): Adjust get_remote_arch_state calls,
1358         using the regcache's architecture.
1359         (remote_get_trace_status): Adjust get_remote_arch_state calls,
1360         passing down target_gdbarch explicitly.
1361         * spu-multiarch.c (spu_thread_architecture): Defer to the target
1362         beneath instead of calling target_gdbarch.
1363         * target.c (default_thread_architecture): Use the specified
1364         inferior's architecture, instead of the current inferior's
1365         architecture (via target_gdbarch).
1366
1367 2017-10-04  Pedro Alves  <palves@redhat.com>
1368
1369         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1370         case.
1371         (regcache_print): Handle !target_has_registers here instead.
1372
1373 2017-10-04  Pedro Alves  <palves@redhat.com>
1374
1375         * frame.c (create_test_frame): Delete.
1376         * frame.h (create_test_frame): Delete.
1377         * gdbarch-selftests.c: Include gdbthread.h and target.h.
1378         (class regcache_test): Delete.
1379         (test_target_has_registers, test_target_has_stack)
1380         (test_target_has_memory, test_target_prepare_to_store)
1381         (test_target_store_registers): New functions.
1382         (test_target_ops): New class.
1383         (register_to_value_test): Error out if there's already a
1384         process_stratum (or higher) target pushed.  Create a fuller mock
1385         environment, with mock target_ops, inferior, address space, thread
1386         and inferior_ptid.
1387         * progspace.c (struct address_space): Move to ...
1388         * progspace.h (struct address_space): ... here.
1389         * regcache.h (regcache::~regcache, regcache::raw_write)
1390         [GDB_SELF_TEST]: No longer virtual.
1391
1392 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1393
1394         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1395
1396 2017-10-04  Pedro Alves  <palves@redhat.com>
1397
1398         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1399         out of 'between TRY and CATCH'.
1400
1401 2017-10-04  Pedro Alves  <palves@redhat.com>
1402
1403         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1404         * common/common-exceptions.h (TRY): Open an outermost scope.
1405         Expand intro comment.
1406         (CATCH): Reindent.
1407         (END_CATCH): Close the outermost scope.
1408         * completer.c (complete_line_internal): Add missing END_CATCH.
1409
1410 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1411
1412         * NEWS (Changes since GDB 8.0): Add entry about new
1413         'set-cwd-on-gdbserver' feature.
1414         (New remote packets): Add entry for QSetWorkingDir.
1415         * common/common-inferior.h (set_inferior_cwd): New prototype.
1416         * infcmd.c (set_inferior_cwd): Remove "static".
1417         (show_cwd_command): Expand text to include remote debugging.
1418         * remote.c: Add PACKET_QSetWorkingDir.
1419         (remote_protocol_features) <QSetWorkingDir>: New entry for
1420         PACKET_QSetWorkingDir.
1421         (extended_remote_set_inferior_cwd): New function.
1422         (extended_remote_create_inferior): Call
1423         "extended_remote_set_inferior_cwd".
1424         (_initialize_remote): Call "add_packet_config_cmd" for
1425         QSetWorkingDir.
1426
1427 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1428
1429         * NEWS (New commands): Mention "set/show cwd".
1430         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
1431         "cd" command's help text.
1432         * common/common-inferior.h (get_inferior_cwd): New prototype.
1433         * infcmd.c (inferior_cwd_scratch): New global variable.
1434         (set_inferior_cwd): New function.
1435         (get_inferior_cwd): Likewise.
1436         (set_cwd_command): Likewise.
1437         (show_cwd_command): Likewise.
1438         (_initialize_infcmd): Add "set/show cwd" commands.
1439         * inferior.h (class inferior) <cwd>: New field.
1440         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
1441         (fork_inferior): Change inferior's cwd before its execution.
1442         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
1443         to CreateProcess.
1444
1445 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1446
1447         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
1448         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
1449         (COMMON_OBS): Add gdb_tilde_expand.o.
1450         * common/gdb_tilde_expand.c: New file.
1451         * common/gdb_tilde_expand.h: Likewise.
1452
1453 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
1454
1455         * gdbarch.sh (objfile): Remove duplicate declaration.
1456         * gdbarch.h: Regenerate.
1457
1458 2017-10-03  Tom Tromey  <tom@tromey.com>
1459
1460         * utils.c (internal_vproblem): Use string_vprintf.
1461
1462 2017-10-03  Tom Tromey  <tom@tromey.com>
1463
1464         * printcmd.c (info_symbol_command): Use std::string.
1465
1466 2017-10-03  Tom Tromey  <tom@tromey.com>
1467
1468         * top.c (gdb_safe_append_history): Use std::string.
1469
1470 2017-10-03  Tom Tromey  <tom@tromey.com>
1471
1472         * event-top.c (stdin_event_handler): Update.
1473         * main.c (captured_main_1): Update.
1474         * top.h (make_delete_ui_cleanup): Remove.
1475         (struct ui): Add constructor and destructor.
1476         (new_ui, delete_ui): Remove.
1477         * top.c (make_delete_ui_cleanup): Remove.
1478         (new_ui_command): Use std::unique_ptr.
1479         (delete_ui_cleanup): Remove.
1480         (ui::ui): Rename from new_ui.  Update.
1481         (free_ui): Remove.
1482         (ui::~ui): Rename from delete_ui.  Update.
1483
1484 2017-10-03  Tom Tromey  <tom@tromey.com>
1485
1486         * symfile.c (load_progress): Use gdb::byte_vector.
1487
1488 2017-10-03  Tom Tromey  <tom@tromey.com>
1489
1490         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
1491         declaration.
1492         * printcmd.c (x_command): Remove unused declaration.
1493         * symfile.c (symbol_file_command): Remove unused declaration.
1494
1495 2017-10-03  Tom Tromey  <tom@tromey.com>
1496
1497         * utils.c (internal_vproblem): Use std::string.
1498         (defaulted_query): Likewise.
1499
1500 2017-10-03  Tom Tromey  <tom@tromey.com>
1501
1502         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
1503         * top.c (execute_command_to_string): Update.
1504         * utils.c (make_cleanup_restore_page_info): Remove.
1505         (do_restore_page_info_cleanup): Remove.
1506         (set_batch_flag_and_restore_page_info):
1507         New.
1508         (make_cleanup_restore_page_info): Remove.
1509         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1510         (~set_batch_flag_and_restore_page_info): New
1511         (make_cleanup_restore_uinteger): Remove.
1512         (make_cleanup_restore_integer): Remove.
1513         (struct restore_integer_closure): Remove.
1514         (restore_integer): Remove.
1515         * utils.h (struct set_batch_flag_and_restore_page_info): New
1516         class.
1517         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1518         (make_cleanup_restore_page_info): Remove.
1519         (make_cleanup_restore_uinteger) Remove.
1520         (make_cleanup_restore_integer) Remove.
1521
1522 2017-10-03  Tom Tromey  <tom@tromey.com>
1523
1524         * record-full.h (record_full_gdb_operation_disable_set): Return
1525         scoped_restore_tmpl<int>.
1526         * infrun.c (adjust_pc_after_break): Update.
1527         (handle_signal_stop): Update.
1528         * record-full.c (record_full_gdb_operation_disable_set): Return
1529         scoped_restore_tmpl<int>.
1530         (record_full_wait_1, record_full_insert_breakpoint)
1531         (record_full_remove_breakpoint, record_full_save)
1532         (record_full_goto_insn): Update.
1533
1534 2017-10-02  Tom Tromey  <tom@tromey.com>
1535
1536         PR rust/22236:
1537         * rust-lang.c (rust_val_print_str): New function.
1538         (val_print_struct): Call it.
1539         (rust_subscript): Preserve name of slice type.
1540
1541 2017-10-02  Tom Tromey  <tom@tromey.com>
1542
1543         * rust-lang.c (rust_subscript): Handle slices in
1544         EVAL_AVOID_SIDE_EFFECTS case.
1545
1546 2017-10-02  Tom Tromey  <tom@tromey.com>
1547
1548         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
1549
1550 2017-10-02  Tom Tromey  <tom@tromey.com>
1551
1552         * rust-lang.h (rust_slice_type): Add "extern".
1553
1554 2017-10-02  Tom Tromey  <tom@tromey.com>
1555             Pedro Alves  <palves@redhat.com>
1556
1557         * ada-lang.h (ada_exc_info::operator<): Make const.
1558         (ada_exc_info::operator==): Make const.
1559         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
1560         Make const.
1561
1562 2017-09-29  Tom Tromey  <tom@tromey.com>
1563
1564         * target.c (read_whatever_is_readable): Change type of "result".
1565         Update.
1566         (free_memory_read_result_vector): Remove.
1567         (read_memory_robust): Change return type.  Update.
1568         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
1569         bin2hex, std::string.
1570         * target.h (memory_read_result_s): Remove typedef.
1571         (free_memory_read_result_vector): Remove.
1572         (read_memory_robust): Return std::vector.
1573
1574 2017-09-29  Tom Tromey  <tom@tromey.com>
1575
1576         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
1577
1578 2017-09-29  Tom Tromey  <tom@tromey.com>
1579
1580         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
1581         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
1582         operator< and operator==.
1583         (ada_exceptions_list): Return a std::vector.
1584         * ada-lang.c (ada_exc_info::operator<): Rename from
1585         compare_ada_exception_info.
1586         (ada_exc_info::operator==): New.
1587         (sort_remove_dups_ada_exceptions_list): Change type of
1588         "exceptions".
1589         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
1590         (ada_add_global_exceptions): Likewise.
1591         (ada_exceptions_list_1): Return a std::vector.
1592         (ada_exceptions_list): Likewise.
1593
1594 2017-09-29  Tom Tromey  <tom@tromey.com>
1595
1596         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
1597         'std::set *'.
1598         (print_one_inferior): Update.
1599         (free_vector_of_ints): Remove.
1600         (list_available_thread_groups): Change "ids" to std::set.
1601         (mi_cmd_list_thread_groups): Update.
1602         (struct collect_cores_data) <core>: Now a std::set.
1603         (collect_cores): Update.
1604         (unique): Remove.
1605         (print_one_inferior): Update.
1606
1607 2017-09-29  Tom Tromey  <tom@tromey.com>
1608
1609         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
1610         (mi_execute_async_cli_command): Likewise.
1611         (mi_cmd_trace_frame_collected): Use field_fmt.
1612
1613 2017-09-29  Tom Tromey  <tom@tromey.com>
1614
1615         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
1616         gdb::byte_vector.
1617
1618 2017-09-29  Tom Tromey  <tom@tromey.com>
1619
1620         * mi/mi-parse.c (mi_parse): Remove unused declaration.
1621
1622 2017-09-29  Tom Tromey  <tom@tromey.com>
1623
1624         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
1625
1626 2017-09-29  Tom Tromey  <tom@tromey.com>
1627
1628         * varobj.h (varobj_gen_name): Return std::string.
1629         * varobj.c (varobj_gen_name): Return std::string.
1630         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
1631         (mi_cmd_var_delete): Don't copy "name".
1632
1633 2017-09-29  Tom Tromey  <tom@tromey.com>
1634
1635         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
1636         (mi_cmd_break_insert_1): Update.
1637
1638 2017-09-29  Tom Tromey  <tom@tromey.com>
1639
1640         * target.h (make_scoped_defer_target_commit_resume): Update.
1641         * target.c (make_scoped_defer_target_commit_resume): Rename from
1642         make_cleanup_defer_target_commit_resume.  Return a
1643         scoped_restore.
1644         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
1645
1646 2017-09-29  Tom Tromey  <tom@tromey.com>
1647
1648         * main.c (captured_main_1): Remove unused declaration.
1649         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
1650
1651 2017-09-29  Tom Tromey  <tom@tromey.com>
1652
1653         * symtab.c (search_symbols): Remove unused outer cleanup.
1654         (make_source_files_completion_list): Remove unused declaration.
1655
1656 2017-09-29  Tom Tromey  <tom@tromey.com>
1657
1658         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
1659
1660 2017-09-29  Tom Tromey  <tom@tromey.com>
1661
1662         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
1663         gdb::byte_vector.
1664
1665 2017-09-29  Tom Tromey  <tom@tromey.com>
1666
1667         * complaints.c (vcomplaint): Use std::string.
1668
1669 2017-09-29  Tom Tromey  <tom@tromey.com>
1670
1671         * tracepoint.c (trace_variable_command): Use std::string.
1672         (encode_actions_1): Remove unused declarations.
1673         (create_tsv_from_upload): Use std::string.
1674
1675 2017-09-29  Tom Tromey  <tom@tromey.com>
1676
1677         * cp-support.c (gdb_demangle): Use std::string.
1678
1679 2017-09-29  Tom Tromey  <tom@tromey.com>
1680
1681         * stack.c (parse_frame_specification): Use std::string
1682         (info_frame_command): Use gdb::unique_xmalloc_ptr.
1683
1684 2017-09-29  Tom Tromey  <tom@tromey.com>
1685
1686         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
1687
1688 2017-09-29  Tom Tromey  <tom@tromey.com>
1689
1690         * utils.c (vfprintf_maybe_filtered): Use std::string.
1691         (vfprintf_unfiltered): Likewise.
1692
1693 2017-09-29  Tom Tromey  <tom@tromey.com>
1694
1695         * event-top.c (top_level_prompt): Return std::string.
1696         (display_gdb_prompt): Update.
1697
1698 2017-09-29  Tom Tromey  <tom@tromey.com>
1699
1700         * unittests/common-utils-selftests.c (format): New function.
1701         (string_vprintf_tests): New function.
1702         (_initialize_common_utils_selftests): Register new tests.
1703         * common/common-utils.c (string_vprintf): New function.
1704         * common/common-utils.h (string_vprintf): Declare.
1705
1706 2017-09-29  Pedro Alves  <palves@redhat.com>
1707
1708         * common/rsp-low.c (unpack_varlen_hex): Constify.
1709         * common/rsp-low.h (unpack_varlen_hex): Constify.
1710         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
1711         Constify.
1712         * remote.c (remote_set_permissions, read_ptid)
1713         (remote_current_thread, remote_get_threads_with_qthreadinfo)
1714         (remote_static_tracepoint_marker_at)
1715         (remote_static_tracepoint_markers_by_strid)
1716         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
1717         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
1718         (parse_tracepoint_definition, parse_tsv_definition)
1719         (parse_static_tracepoint_marker_definition): Constify.
1720         * tracepoint.h (parse_static_tracepoint_marker_definition)
1721         (parse_trace_status, parse_tracepoint_status)
1722         (parse_tracepoint_definition, parse_tsv_definition): Constify.
1723
1724 2017-09-29  Pedro Alves  <palves@redhat.com>
1725
1726         * remote.c (target_buf, target_buf_size): Delete.
1727         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
1728         Use the connection's packet buffer instead.
1729         All callers adjusted.
1730         (_initialize_remote): Remove references to target_buf and
1731         target_buf_size.
1732
1733 2017-09-28  Pedro Alves  <palves@redhat.com>
1734
1735         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1736         unittests/common-utils-selftests.c.
1737         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
1738         (COMMON_OBS): Remove utils-selftests.o.
1739         * utils-selftests.c: Move to ...
1740         * unittests/common-utils-selftests.c: ... here and rename self
1741         test to "string_printf".
1742
1743 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
1744
1745         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
1746         having NULL cus or tus.
1747
1748 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1749
1750         * arm-tdep.c: (convert_from_extended): Remove.
1751         (convert_to_extended): Likewise.
1752         (arm_extract_return_value): Use convert_typed_floating.
1753         (arm_store_return_value): Likewise.
1754
1755         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1756         * sh-tdep.c: Do not include "floatformat.h".
1757         (sh_littlebyte_bigword_type): New function.
1758         (sh_register_convert_to_virtual): Use convert_typed_floating.
1759         (sh_register_convert_to_raw): Likewise.
1760         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1761         (sh64_littlebyte_bigword_type): New function.
1762         (sh64_extract_return_value): Use convert_typed_floating.
1763         (sh64_register_convert_to_virtual): Likewise.
1764         (sh64_register_convert_to_raw): Likewise.
1765
1766 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1767
1768         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
1769         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
1770
1771         * gdbtypes.h (union type_specific): Make field floatformat hold
1772         just a single struct floatformat, not an array.
1773         (floatformat_from_type): Move here.
1774         * gdbtypes.c (floatformat_from_type): Move here.  Update to
1775         changed TYPE_FLOATFORMAT definition.
1776         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
1777         (recursive_dump_type): Likewise.
1778         (init_float_type): Install correct floatformat for byte order.
1779         (arch_float_type): Likewise.
1780
1781 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1782
1783         * gdbtypes.c (init_type): Change incoming argument from
1784         length-in-bytes to length-in-bits.  Assert length is a
1785         multiple of TARGET_CHAR_BITS.
1786         (arch_type, arch_flags_type): Likewise.
1787         (init_integer_type): Update call to init_type.
1788         (init_character_type): Likewise.
1789         (init_boolean_type): Likewise.
1790         (init_float_type): Likewise.
1791         (init_decfloat_type): Likewise.
1792         (init_complex_type): Likewise.
1793         (init_pointer_type): Likewise.
1794         (objfile_type): Likewise.
1795         (arch_integer_type): Update call to arch_type.
1796         (arch_character_type): Likewise.
1797         (arch_boolean_type): Likewise.
1798         (arch_float_type): Likewise.
1799         (arch_decfloat_type): Likewise.
1800         (arch_complex_type): Likewise.
1801         (arch_pointer_type): Likewise.
1802         (gdbtypes_post_init): Likewise.
1803
1804         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
1805         (read_base_type): Likewise.
1806         * mdebugread.c (basic_type): Likewise.
1807         * stabsread.c (dbx_init_float_type): Likewise.
1808         (rs6000_builtin_type): Likewise.
1809         (read_range_type): Likewise.  Also, fix call to init_integer_type
1810         with erroneous length argument.
1811
1812         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
1813         * d-lang.c (build_d_types): Likewise.
1814         * f-lang.c (build_fortran_types): Likewise.
1815         * go-lang.c (build_go_types): Likewise.
1816         * opencl-lang.c (build_opencl_types): Likewise.
1817         * jit.c (finalize_symtab): Likewise.
1818         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
1819         (build_std_type_info_type): Likewise.
1820         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
1821         update call to arch_flags_type.
1822
1823         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
1824         arch_type.
1825         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
1826         * windows-tdep.c (windows_get_tlb_type): Likewise.
1827
1828         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
1829         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1830         * m32c-tdep.c (make_types): Likewise.
1831         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
1832         (rl78_psw_type): Update call to arch_flags_type.
1833         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
1834         * rx-tdep.c (rx_psw_type): Likewise.
1835         (rx_fpsw_type): Likewise.
1836         * sparc-tdep.c (sparc_psr_type): Likewise.
1837         (sparc_fsr_type): Likewise.
1838         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
1839         (sparc64_ccr_type): Likewise.
1840         (sparc64_fsr_type): Likewise.
1841         (sparc64_fprs_type): Likewise.
1842
1843 2017-09-27  Tom Tromey  <tom@tromey.com>
1844
1845         * findcmd.c (find_command): Constify.
1846
1847 2017-09-27  Tom Tromey  <tom@tromey.com>
1848
1849         * ada-tasks.c (task_command_1, task_command): Constify.
1850
1851 2017-09-27  Tom Tromey  <tom@tromey.com>
1852
1853         * symtab.c (maintenance_print_symbol_cache)
1854         (maintenance_flush_symbol_cache)
1855         (maintenance_print_symbol_cache_statistics): Constify.
1856
1857 2017-09-27  Tom Tromey  <tom@tromey.com>
1858
1859         * inferior.c (detach_inferior_command, kill_inferior_command)
1860         (inferior_command): Constify.
1861
1862 2017-09-27  Tom Tromey  <tom@tromey.com>
1863
1864         * regcache.c (regcache_print, maintenance_print_registers)
1865         (maintenance_print_raw_registers)
1866         (maintenance_print_cooked_registers)
1867         (maintenance_print_register_groups)
1868         (maintenance_print_remote_registers): Constify.
1869
1870 2017-09-27  Tom Tromey  <tom@tromey.com>
1871
1872         * printcmd.c (map_display_numbers, undisplay_command)
1873         (enable_disable_display_command, enable_display_command)
1874         (disable_display_command): Constify.
1875
1876 2017-09-27  Tom Tromey  <tom@tromey.com>
1877
1878         * breakpoint.h (delete_command): Don't declare.
1879         * breakpoint.c (delete_command, enable_once_command)
1880         (enable_count_command, enable_delete_command, breakpoint_1)
1881         (maintenance_info_breakpoints, stopin_command, stopat_command)
1882         (delete_command, delete_trace_command, save_breakpoints)
1883         (save_breakpoints_command, save_tracepoints_command): Constify.
1884
1885 2017-09-27  Tom Tromey  <tom@tromey.com>
1886
1887         * macrocmd.c (macro_expand_command, macro_expand_once_command)
1888         (skip_ws, extract_identifier, macro_define_command)
1889         (macro_undef_command, macro_list_command): Constify.
1890
1891 2017-09-27  Tom Tromey  <tom@tromey.com>
1892
1893         * infcmd.c (environment_info, set_environment_command)
1894         (unset_environment_command, path_info, info_proc_cmd_1)
1895         (info_proc_cmd_mappings, info_proc_cmd_stat)
1896         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
1897         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
1898
1899 2017-09-27  Tom Tromey  <tom@tromey.com>
1900
1901         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
1902         Constify.
1903
1904 2017-09-27  Tom Tromey  <tom@tromey.com>
1905
1906         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
1907
1908 2017-09-27  Tom Tromey  <tom@tromey.com>
1909
1910         * demangle.c (demangle_command): Constify.
1911
1912 2017-09-27  Tom Tromey  <tom@tromey.com>
1913
1914         * progspace.c (maintenance_info_program_spaces_command):
1915         Constify.
1916
1917 2017-09-27  Tom Tromey  <tom@tromey.com>
1918
1919         * compile/compile.c (check_raw_argument, compile_file_command)
1920         (compile_code_command, compile_print_command): Constify.
1921
1922 2017-09-27  Tom Tromey  <tom@tromey.com>
1923
1924         * reggroups.c (maintenance_print_reggroups): Constify.
1925
1926 2017-09-27  Tom Tromey  <tom@tromey.com>
1927
1928         * dwarf2read.c (save_gdb_index_command): Constify.
1929
1930 2017-09-27  Tom Tromey  <tom@tromey.com>
1931
1932         * stap-probe.c (info_probes_stap_command): Constify.
1933
1934 2017-09-27  Tom Tromey  <tom@tromey.com>
1935
1936         * fork-child.c (unset_exec_wrapper_command): Constify.
1937
1938 2017-09-27  Tom Tromey  <tom@tromey.com>
1939
1940         * btrace.c (get_uint, get_context_size, no_chunk)
1941         (maint_btrace_packet_history_cmd)
1942         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
1943         (maint_info_btrace_cmd): Constify.
1944
1945 2017-09-27  Tom Tromey  <tom@tromey.com>
1946
1947         * reverse.c (delete_bookmark_command): Constify.
1948
1949 2017-09-27  Tom Tromey  <tom@tromey.com>
1950
1951         * remote.c (set_memory_packet_size)
1952         (set_memory_write_packet_size, show_memory_write_packet_size)
1953         (set_memory_read_packet_size, show_memory_read_packet_size)
1954         (compare_sections_command, packet_command, remote_put_command)
1955         (remote_get_command, remote_delete_command): Constify.
1956
1957 2017-09-27  Tom Tromey  <tom@tromey.com>
1958
1959         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
1960         (set_mipsfpu_double_command, set_mipsfpu_none_command)
1961         (set_mipsfpu_auto_command): Constify.
1962
1963 2017-09-27  Tom Tromey  <tom@tromey.com>
1964
1965         * cli/cli-cmds.h (cd_command): Constify.
1966         * cli/cli-cmds.c (cd_command): Constify.
1967
1968 2017-09-27  Tom Tromey  <tom@tromey.com>
1969
1970         * thread.c (thread_name_command, thread_find_command): Constify.
1971
1972 2017-09-27  Tom Tromey  <tom@tromey.com>
1973
1974         * probe.c (enable_probes_command, disable_probes_command):
1975         Constify.
1976
1977 2017-09-27  Tom Tromey  <tom@tromey.com>
1978
1979         * symfile.c (symbol_file_command): Constify.
1980         * gdbcore.h (deprecated_file_changed_hook): Constify.
1981         * exec.c (deprecated_file_changed_hook, exec_file_command)
1982         (file_command): Constify.
1983         * defs.h (symbol_file_command): Constify.
1984
1985 2017-09-27  Tom Tromey  <tom@tromey.com>
1986
1987         * remote-fileio.c (set_system_call_allowed)
1988         (show_system_call_allowed): Constify.
1989
1990 2017-09-27  Tom Tromey  <tom@tromey.com>
1991
1992         * tracepoint.c (delete_trace_variable_command)
1993         (tfind_end_command, tfind_start_command, tfind_pc_command)
1994         (tfind_tracepoint_command, tfind_line_command)
1995         (tfind_range_command, tfind_outside_command): Constify.
1996
1997 2017-09-27  Tom Tromey  <tom@tromey.com>
1998
1999         * ax-gdb.c (maint_agent_printf_command, agent_command)
2000         (agent_eval_command): Constify.
2001
2002 2017-09-27  Tom Tromey  <tom@tromey.com>
2003
2004         * tracepoint.c (info_scope_command): Constify.
2005         * python/python.c (gdbpy_decode_line): Constify.
2006         * python/py-breakpoint.c (bppy_init): Constify.
2007         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2008         * location.h: (new_linespec_location)
2009         (string_to_event_location_basic, string_to_event_location):
2010         Constify.
2011         * location.c (new_linespec_location)
2012         (string_to_event_location_basic, string_to_event_location):
2013         Constify.
2014         * linespec.h (decode_line_with_current_source)
2015         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2016         * linespec.c (linespec_lex_to_end)
2017         (decode_line_with_current_source)
2018         (decode_line_with_last_displayed): Constify.
2019         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2020         Constify.
2021         * cli/cli-cmds.c (edit_command, list_command): Constify.
2022         * breakpoint.h (until_break_command, watch_command_wrapper)
2023         (awatch_command_wrapper, rwatch_command_wrapper)
2024         (init_ada_exception_breakpoint): Constify.
2025         * breakpoint.c (break_command_1, dprintf_command)
2026         (break_range_command, watch_command_wrapper)
2027         (rwatch_command_wrapper, awatch_command_wrapper)
2028         (until_break_command, init_ada_exception_breakpoint)
2029         (strace_marker_create_sals_from_location, trace_command)
2030         (ftrace_command, strace_command, struct tracepoint): Constify.
2031         * ax-gdb.c (agent_command_1): Constify.
2032         * ada-lang.c (ada_exception_sal): Constify.
2033
2034 2017-09-27  Tom Tromey  <tom@tromey.com>
2035
2036         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2037         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2038         (get_context_size, no_chunk, get_insn_history_modifiers)
2039         (cmd_record_insn_history, get_call_history_modifiers)
2040         (cmd_record_call_history): Constify.
2041
2042 2017-09-27  Tom Tromey  <tom@tromey.com>
2043
2044         * source.c (show_substitute_path_command)
2045         (unset_substitute_path_command, set_substitute_path_command):
2046         Constify.
2047
2048 2017-09-27  Tom Tromey  <tom@tromey.com>
2049
2050         * typeprint.c (maintenance_print_type): Constify.
2051         * maint.c (maintenance_dump_me, maintenance_demangle)
2052         (maintenance_time_display, maintenance_info_sections)
2053         (maintenance_print_statistics, maintenance_deprecate)
2054         (maintenance_undeprecate): Constify.
2055         (maintenance_do_deprecate): Constify.  Use std::string.
2056         (maintenance_selftest): Constify.
2057         * gdbtypes.h (maintenance_print_type): Constify.
2058
2059 2017-09-27  Tom Tromey  <tom@tromey.com>
2060
2061         * hppa-tdep.c (unwind_command): Constify.
2062
2063 2017-09-27  Tom Tromey  <tom@tromey.com>
2064
2065         * target-descriptions.c (unset_tdesc_filename_cmd)
2066         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2067         Constify.
2068
2069 2017-09-27  Tom Tromey  <tom@tromey.com>
2070
2071         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2072
2073 2017-09-27  Tom Tromey  <tom@tromey.com>
2074
2075         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2076
2077 2017-09-27  Tom Tromey  <tom@tromey.com>
2078
2079         * tui/tui-regs.c (tui_reg_command): Constify.
2080
2081 2017-09-27  Tom Tromey  <tom@tromey.com>
2082
2083         * skip.c (skip_file_command, skip_function_command)
2084         (skip_enable_command, skip_disable_command, skip_delete_command):
2085         Constify.
2086
2087 2017-09-27  Tom Tromey  <tom@tromey.com>
2088
2089         * record-btrace.c (cmd_record_btrace_bts_start)
2090         (cmd_record_btrace_pt_start): Constify.
2091
2092 2017-09-27  Tom Tromey  <tom@tromey.com>
2093
2094         * symmisc.c (maintenance_print_symbols)
2095         (maintenance_print_msymbols, maintenance_print_objfiles)
2096         (maintenance_info_symtabs, maintenance_check_symtabs)
2097         (maintenance_expand_symtabs, maintenance_info_line_tables):
2098         Constify.
2099
2100 2017-09-27  Tom Tromey  <tom@tromey.com>
2101
2102         * top.c (new_ui_command): Constify.
2103
2104 2017-09-27  Tom Tromey  <tom@tromey.com>
2105
2106         * symfile.c (add_symbol_file_command)
2107         (remove_symbol_file_command, list_overlays_command)
2108         (map_overlay_command, unmap_overlay_command)
2109         (overlay_auto_command, overlay_manual_command)
2110         (overlay_off_command, overlay_load_command): Constify.
2111
2112 2017-09-27  Tom Tromey  <tom@tromey.com>
2113
2114         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2115         (info_spu_mailbox_command, info_spu_dma_command)
2116         (info_spu_proxydma_command): Constify.
2117
2118 2017-09-27  Tom Tromey  <tom@tromey.com>
2119
2120         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2121
2122 2017-09-27  Tom Tromey  <tom@tromey.com>
2123
2124         * cli/cli-script.c (user_defined_command): Constify.
2125
2126 2017-09-27  Tom Tromey  <tom@tromey.com>
2127
2128         * cli/cli-dump.c (dump_memory_command, dump_value_command)
2129         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2130         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2131         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2132         (dump_binary_value, append_binary_memory, append_binary_value):
2133         Constify.
2134         (struct dump_context) <func>: Constify.
2135         (add_dump_command): Update.
2136
2137 2017-09-27  Tom Tromey  <tom@tromey.com>
2138
2139         * cli/cli-cmds.c (show_version, show_configuration)
2140         (source_command, show_user): Constify.
2141
2142 2017-09-27  Tom Tromey  <tom@tromey.com>
2143
2144         * target.c (maintenance_print_target_stack): Constify.
2145
2146 2017-09-27  Tom Tromey  <tom@tromey.com>
2147
2148         * interps.c (interpreter_exec_cmd): Constify.
2149
2150 2017-09-27  Tom Tromey  <tom@tromey.com>
2151
2152         * record-full.c (cmd_record_full_restore): Constify.
2153
2154 2017-09-27  Tom Tromey  <tom@tromey.com>
2155
2156         * memattr.c (enable_mem_command, disable_mem_command)
2157         (delete_mem_command): Constify.
2158
2159 2017-09-27  Tom Tromey  <tom@tromey.com>
2160
2161         * value.c (show_convenience): Constify.
2162
2163 2017-09-27  Tom Tromey  <tom@tromey.com>
2164
2165         * gdbcore.h (core_file_command): Update.
2166         * corefile.c (core_file_command): Constify.
2167
2168 2017-09-27  Tom Tromey  <tom@tromey.com>
2169
2170         * user-regs.c (maintenance_print_user_registers): Constify.
2171
2172 2017-09-27  Tom Tromey  <tom@tromey.com>
2173
2174         * cp-namespace.c (maintenance_cplus_namespace): Constify.
2175
2176 2017-09-27  Tom Tromey  <tom@tromey.com>
2177
2178         * cp-support.c (first_component_command): Constify.
2179
2180 2017-09-27  Tom Tromey  <tom@tromey.com>
2181
2182         * psymtab.c (maintenance_print_psymbols)
2183         (maintenance_info_psymtabs, maintenance_check_psymtabs):
2184         Constify.
2185
2186 2017-09-27  Tom Tromey  <tom@tromey.com>
2187
2188         * windows-tdep.c (display_tib): Constify.
2189
2190 2017-09-27  Tom Tromey  <tom@tromey.com>
2191
2192         * linux-fork.c (delete_checkpoint_command)
2193         (detach_checkpoint_command): Constify.
2194
2195 2017-09-27  Tom Tromey  <tom@tromey.com>
2196
2197         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2198
2199 2017-09-27  Tom Tromey  <tom@tromey.com>
2200
2201         * arc-tdep.c (dump_arc_instruction_command): Constify.
2202
2203 2017-09-27  Tom Tromey  <tom@tromey.com>
2204
2205         * valprint.c (set_radix, show_radix): Constify.
2206
2207 2017-09-27  Tom Tromey  <tom@tromey.com>
2208
2209         * dtrace-probe.c (info_probes_dtrace_command): Constify.
2210
2211 2017-09-27  Tom Tromey  <tom@tromey.com>
2212
2213         * command.h (not_just_help_class_command): Update.
2214         * cli/cli-decode.h (not_just_help_class_command): Update.
2215         * cli/cli-decode.c (not_just_help_class_command): Constify.
2216
2217 2017-09-27  Tom Tromey  <tom@tromey.com>
2218
2219         * gdb_bfd.c (maintenance_info_bfds): Constify.
2220
2221 2017-09-27  Tom Tromey  <tom@tromey.com>
2222
2223         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2224         overloads.
2225         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
2226         (do_const_cfunc): New function.
2227         (cmd_cfunc_eq): New overload.
2228         (cli_user_command_p): Check do_const_cfunc.
2229         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2230         const_cfunc.
2231         * command.h (add_cmd): Add const overload and no-function
2232         overload.
2233         (set_cmd_cfunc): Add const overload.
2234         (cmd_const_cfunc_ftype): Declare.
2235         (cmd_cfunc_eq): Add const overload.
2236         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2237         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2238         overload.
2239
2240 2017-09-27  Tom Tromey  <tom@tromey.com>
2241
2242         * macroexp.c (get_next_token_for_substitution): New function.
2243         (substitute_args): Call it.  Check for __VA_OPT__.
2244
2245 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2246             Pedro Alves <palves@redhat.com>
2247
2248         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2249         producer_is_icc_lt_14.
2250         (producer_is_icc_lt_14): New function.
2251         (check_producer): Add code for checking version of ICC.
2252         (producer_is_icc): Move to producer.c.
2253         (read_structure_type): Restrict ICC workaround to ICC<14.
2254         * producer.c: Include selftest.h.
2255         (producer_is_icc, producer_parsing_tests, _initialize_producer):
2256         New functions.
2257         * producer.h (producer_is_icc): New declaration.
2258
2259 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2260
2261         * Makefile.in (SFILES): Add producer.c.
2262         (COMMON_OBS): Add producer.o
2263         * amd64-tdep.c (producer.h): Add new include.
2264         * dwarf2read.c (producer.h): Add new include.
2265         * producer.c: New file.
2266         * producer.h: New file.
2267         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2268         producer.c.
2269         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2270         producer.h.
2271
2272 2017-09-26  Matthias Klose  <doko@ubuntu.com>
2273
2274         * configure.ac: Search ncursesw before ncurses.
2275         Check ncursesw/ncurses.h before ncurses/ncurses.h.
2276         * gdb_curses.h: Include <ncursesw/ncurses.h>
2277         * config.in, configure: Regenerate.
2278
2279 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2280
2281         PR gdb/22185
2282         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2283         obsolete.
2284         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2285         Remove i386sol2 support.
2286         * configure.nat <i386sol2>: Remove.
2287         <sol2-64>: Fold into ...
2288         <sol2>: ... this.
2289         Move common settings to default section.
2290         Add sol-thread.o.
2291         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2292         x86_64-*-solaris2.1[0-9]*>: Rename to ...
2293         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2294         <i[34567]86-*-solaris*>: Remove.
2295         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2296
2297         * configure.ac: Remove wctype in libw check.
2298         (_MSE_INT_H): Don't define on Solaris 7-9.
2299         <solaris*>: Remove libthread_db.so.1 check.
2300         * configure: Regenerate.
2301         * config.in: Regenerate.
2302
2303         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2304         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2305         (gdb_ps_size_t): Remove.
2306         Use base types in users.
2307         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2308
2309         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2310
2311 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2312
2313         PR build/22206
2314         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2315         (adi_is_addr_mapped): Likewise.
2316         (PSR_ICC): Don't redefine.
2317         (PSR_IMPL): Likewise.
2318
2319 2017-09-25  Tom Tromey  <tom@tromey.com>
2320
2321         * regcache.c (regcache::dump): Use string_printf.
2322
2323 2017-09-25  Tom Tromey  <tom@tromey.com>
2324
2325         * regcache.c (class regcache_invalidator): New.
2326         (struct register_to_invalidate): Remove.
2327         (make_cleanup_regcache_invalidate): Remove.
2328         (regcache::raw_write): Use regcache_invalidator.
2329
2330 2017-09-25  Tom Tromey  <tom@tromey.com>
2331
2332         * spu-tdep.c (spu2ppu_sniffer): Update.
2333         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
2334         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
2335         Remove.
2336         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
2337         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
2338         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
2339         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
2340         (frame_pop): Update.
2341
2342 2017-09-25  Tom Tromey  <tom@tromey.com>
2343
2344         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2345         * regcache.h (regcache_xfree): Don't declare.
2346         * regcache.c (regcache_xfree): Remove.
2347         (do_regcache_xfree): Use delete.
2348         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2349         * linux-fork.c (free_fork): Use delete.
2350         (fork_save_infrun_state): Likewise.
2351         * jit.c (jit_dealloc_cache): Use delete.
2352         * infrun.c (discard_infcall_suspend_state): Use delete.
2353
2354 2017-09-25  Tom Tromey  <tom@tromey.com>
2355
2356         * regcache.h (regcache_xmalloc): Don't declare.
2357         (regcache_raw_set_cached_value): Update comment.
2358         * regcache.c (regcache_xmalloc): Remove.
2359         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2360         * jit.c (jit_frame_sniffer): Use new.
2361         * frame.c (frame_save_as_regcache): Use new.
2362
2363 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2364
2365         * NEWS: Advertise support for guarded-storage registers on IBM z.
2366
2367 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2368
2369         * s390-linux-nat.c (have_regset_gs): New static variable.
2370         (s390_linux_fetch_inferior_registers): Handle guarded-storage
2371         control block and guarded-storage broadcast control regsets.
2372         (s390_read_description): Detect whether the target has
2373         guarded-storage support, return appropriate tdesc.
2374         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2375         (features/s390x-gs-linux64.c): Likewise.
2376         (struct gdbarch_tdep) <have_gs>: New field.
2377         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2378         (s390_gsbc_regset): New variables.
2379         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2380         and s390_gsbc_regset, if applicable.
2381         (s390_core_read_description): Check whether core file was from a
2382         target with guarded-storage support; include appropriate regsets.
2383         (s390_gdbarch_init): Add registers for guarded-storage support.
2384         (_initialize_s390_tdep): Initialize new target descriptions that
2385         include registers for guarded-storage support.
2386         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2387         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2388         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2389         (S390_NUM_REGS): Adjust macro definition.
2390         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2391         (tdesc_s390x_gs_linux64): New declarations.
2392
2393 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2394
2395         * features/s390-gs-linux64.xml: New file.
2396         * features/s390-gs.xml: New file.
2397         * features/s390-gsbc.xml: New file.
2398         * features/s390x-gs-linux64.xml: New file.
2399         * features/Makefile (WHICH): Add s390-gs-linux64 and
2400         s390x-gs-linux64.
2401         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2402         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2403         * features/s390-gs-linux64.c: New generated file.
2404         * features/s390x-gs-linux64.c: New file.
2405         * regformats/s390-gs-linux64.dat: New file.
2406         * regformats/s390x-gs-linux64.dat: New file.
2407
2408 2017-09-23  Tom Tromey  <tom@tromey.com>
2409
2410         * defs.h (make_cleanup_override_quit_handler): Don't declare.
2411
2412 2017-09-22  Tom Tromey  <tom@tromey.com>
2413
2414         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
2415         type to scoped_restore_tmpl.
2416         <scoped_input_handler>: Initialize m_quit_handler directly.
2417
2418 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2419
2420         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2421         (cd_command): Likewise.  Free "current_directory" before
2422         assigning to it.
2423         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2424         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2425         * top.c (gdb_dirbuf): Remove global declaration.
2426         * top.h (gdb_dirbuf): Likewise.
2427
2428 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2429
2430         * gnulib/aclocal.m4: Regenerate.
2431         * gnulib/config.in: Regenerate.
2432         * gnulib/configure: Regenerate.
2433         * gnulib/import/Makefile.am: Regenerate.
2434         * gnulib/import/Makefile.in: Regenerate.
2435         * gnulib/import/assure.h: New file.
2436         * gnulib/import/at-func.c: Likewise
2437         * gnulib/import/chdir-long.c: New file.
2438         * gnulib/import/chdir-long.h: New file.
2439         * gnulib/import/cloexec.c: New file.
2440         * gnulib/import/cloexec.h: New file.
2441         * gnulib/import/close.c: New file.
2442         * gnulib/import/closedir.c: New file.
2443         * gnulib/import/dirent-private.h: New file.
2444         * gnulib/import/dup-safer.c: New file.
2445         * gnulib/import/dup.c: New file.
2446         * gnulib/import/dup2.c: New file.
2447         * gnulib/import/error.c: New file.
2448         * gnulib/import/error.h: New file.
2449         * gnulib/import/exitfail.c: New file.
2450         * gnulib/import/exitfail.h: New file.
2451         * gnulib/import/fchdir.c: New file.
2452         * gnulib/import/fcntl.c: New file.
2453         * gnulib/import/fcntl.in.h: New file.
2454         * gnulib/import/fd-hook.c: New file.
2455         * gnulib/import/fd-hook.h: New file.
2456         * gnulib/import/fd-safer.c: New file.
2457         * gnulib/import/fdopendir.c: New file.
2458         * gnulib/import/filename.h: New file.
2459         * gnulib/import/filenamecat-lgpl.c: New file.
2460         * gnulib/import/filenamecat.h: New file.
2461         * gnulib/import/fstat.c: New file.
2462         * gnulib/import/fstatat.c: New file.
2463         * gnulib/import/getcwd-lgpl.c: New file.
2464         * gnulib/import/getcwd.c: New file.
2465         * gnulib/import/getdtablesize.c: New file.
2466         * gnulib/import/getlogin_r.c: New file.
2467         * gnulib/import/getprogname.c: New file.
2468         * gnulib/import/getprogname.h: New file.
2469         * gnulib/import/gettext.h: New file.
2470         * gnulib/import/glob-libc.h: New file.
2471         * gnulib/import/glob.c: New file.
2472         * gnulib/import/glob.in.h: New file.
2473         * gnulib/import/intprops.h: New file.
2474         * gnulib/import/m4/chdir-long.m4: New file.
2475         * gnulib/import/m4/close.m4: New file.
2476         * gnulib/import/m4/closedir.m4: New file.
2477         * gnulib/import/m4/d-ino.m4: New file.
2478         * gnulib/import/m4/d-type.m4: New file.
2479         * gnulib/import/m4/dup.m4: New file.
2480         * gnulib/import/m4/dup2.m4: New file.
2481         * gnulib/import/m4/error.m4: New file.
2482         * gnulib/import/m4/fchdir.m4: New file.
2483         * gnulib/import/m4/fcntl.m4: New file.
2484         * gnulib/import/m4/fcntl_h.m4: New file.
2485         * gnulib/import/m4/fdopendir.m4: New file.
2486         * gnulib/import/m4/filenamecat.m4: New file.
2487         * gnulib/import/m4/fstat.m4: New file.
2488         * gnulib/import/m4/fstatat.m4: New file.
2489         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
2490         * gnulib/import/m4/getcwd-path-max.m4: New file.
2491         * gnulib/import/m4/getcwd.m4: New file.
2492         * gnulib/import/m4/getdtablesize.m4: New file.
2493         * gnulib/import/m4/getlogin_r.m4: New file.
2494         * gnulib/import/m4/getprogname.m4: New file.
2495         * gnulib/import/m4/glob.m4: New file.
2496         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2497         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2498         * gnulib/import/m4/mempcpy.m4: New file.
2499         * gnulib/import/m4/memrchr.m4: New file.
2500         * gnulib/import/m4/mode_t.m4: New file.
2501         * gnulib/import/m4/msvc-inval.m4: New file.
2502         * gnulib/import/m4/msvc-nothrow.m4: New file.
2503         * gnulib/import/m4/open.m4: New file.
2504         * gnulib/import/m4/openat.m4: New file.
2505         * gnulib/import/m4/opendir.m4: New file.
2506         * gnulib/import/m4/readdir.m4: New file.
2507         * gnulib/import/m4/realloc.m4: New file.
2508         * gnulib/import/m4/rewinddir.m4: New file.
2509         * gnulib/import/m4/save-cwd.m4: New file.
2510         * gnulib/import/m4/strdup.m4: New file.
2511         * gnulib/import/m4/strerror.m4: New file.
2512         * gnulib/import/m4/unistd-safer.m4: New file.
2513         * gnulib/import/mempcpy.c: New file.
2514         * gnulib/import/memrchr.c: New file.
2515         * gnulib/import/msvc-inval.c: New file.
2516         * gnulib/import/msvc-inval.h: New file.
2517         * gnulib/import/msvc-nothrow.c: New file.
2518         * gnulib/import/msvc-nothrow.h: New file.
2519         * gnulib/import/open.c: New file.
2520         * gnulib/import/openat-die.c: New file.
2521         * gnulib/import/openat-priv.h: New file.
2522         * gnulib/import/openat-proc.c: New file.
2523         * gnulib/import/openat.c: New file.
2524         * gnulib/import/openat.h: New file.
2525         * gnulib/import/opendir.c: New file.
2526         * gnulib/import/pipe-safer.c: New file.
2527         * gnulib/import/readdir.c: New file.
2528         * gnulib/import/realloc.c: New file.
2529         * gnulib/import/rewinddir.c: New file.
2530         * gnulib/import/save-cwd.c: New file.
2531         * gnulib/import/save-cwd.h: New file.
2532         * gnulib/import/strdup.c: New file.
2533         * gnulib/import/strerror-override.c: New file.
2534         * gnulib/import/strerror-override.h: New file.
2535         * gnulib/import/strerror.c: New file.
2536         * gnulib/import/unistd--.h: New file.
2537         * gnulib/import/unistd-safer.h: New file.
2538         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
2539         "getcwd" and "glob".
2540         * ser-tcp.c: Undefine "close" before redefining it.
2541
2542 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2543
2544         * guile/scm-value.c (gdbscm_value_address): Initialize address,
2545         get rid of res_val.
2546
2547 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2548
2549         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
2550         <sol2,sparc>: Likewise.
2551         <sol2-64,i386>: Likewise.
2552
2553         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
2554         -Wdeprecated-declarations on *-*-solaris*.
2555         * configure: Regenerate.
2556
2557         * procfs.c: Include "nat/inferior.h".
2558         (procfs_info_proc): Fix typo.
2559
2560 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2561
2562         * remote.c (vector): Include.
2563         (struct private_thread_info): Add field, thread_handle.
2564         (free_private_thread_info): Deallocate storage associated with
2565         thread handle.
2566         (get_private_info_thread): Initialize `thread_handle' field.
2567         (struct thread_item): Add field, thread_handle.
2568         (clear_threads_listing_context): Deallocate storage associated
2569         with thread handle.
2570         (start_thread): Add support for "handle" attribute.
2571         (thread_attributes): Add "handle".
2572         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
2573         field.
2574         (remote_update_thread_list): Update thread_handle.
2575         (remote_thread_handle_to_thread_info): New function.
2576         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
2577
2578 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2579
2580         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
2581         function.
2582         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
2583         * python/python-internal.h (thread_object_type): Declare.
2584
2585 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2586
2587         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
2588         (target_thread_handle_to_thread_info): Declare.
2589         * target.c (target_thread_handle_to_thread_info): New function.
2590         * target-delegates.c: Regenerate.
2591         * gdbthread.h (find_thread_by_handle): Declare.
2592         * thread.c (find_thread_by_handle): New function.
2593         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
2594         function.
2595         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
2596
2597 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2598
2599         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
2600
2601 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2602
2603         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
2604
2605 2017-09-21  Yao Qi  <yao.qi@linaro.org>
2606
2607         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
2608         to gdb_target_obs.
2609
2610 2017-09-20  Tom Tromey  <tom@tromey.com>
2611
2612         * breakpoint.c (struct counted_command_line): Remove.
2613         (breakpoint_commands): Update.
2614         (alloc_counted_command_line, incref_counted_command_line)
2615         (decref_counted_command_line, do_cleanup_counted_command_line)
2616         (make_cleanup_decref_counted_command_line): Remove.
2617         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
2618         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
2619         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
2620         (save_breakpoints): Update.
2621         * breakpoint.h (counted_command_line): Now a typedef to
2622         shared_ptr.
2623         (struct breakpoint) <commands>: Now a counted_command_line.
2624         (struct bpstats) <command>: Likewise.
2625
2626 2017-09-20  Tom Tromey  <tom@tromey.com>
2627
2628         * breakpoint.c (struct commands_info, do_map_commands_command):
2629         Remove.
2630         (commands_command_1): Update.
2631         (iterate_over_related_breakpoints): Take a function_view.
2632         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
2633         (delete_command): Update.
2634         (map_breakpoint_numbers): Take a function_view.
2635         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
2636         (disable_command): Update.
2637         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
2638         (enable_command): Update.
2639         (struct disp_data, do_enable_breakpoint_disp)
2640         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
2641         (do_map_enable_delete_breakpoint): Remove.
2642         (enable_once_command, enable_count_command, enable_delete_command)
2643         (delete_trace_variable_command): Update.
2644
2645 2017-09-20  Tom Tromey  <tom@tromey.com>
2646
2647         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
2648         (bpstat_clear): Use delete.
2649         (bpstats): New constructors.
2650         (bpstat_copy, bpstat_stop_status): Use new.
2651         (dprintf_after_condition_true): Update.
2652         * breakpoint.h (bpstats::bpstats): Add constructors.
2653         (bpstats::~bpstats): Add destructor.
2654
2655 2017-09-20  Pedro Alves  <palves@redhat.com>
2656
2657         * eval.c (make_params): Delete, refactored as ...
2658         (class fake_method): ... this new type's ctor.
2659         (fake_method::~fake_method): New.
2660         (evaluate_subexp_standard): Use 'fake_method'.
2661
2662 2017-09-20  Tom Tromey  <tom@tromey.com>
2663
2664         * windows-nat.c (get_windows_debug_event, windows_wait)
2665         (do_initial_windows_stuff, windows_attach): Update.
2666         * utils.c (vwarning, internal_vproblem): Update.
2667         (ui_unregister_input_event_handler_cleanup)
2668         (prepare_to_handle_input): Remove.
2669         (class scoped_input_handler): New.
2670         (defaulted_query, prompt_for_continue): Update.
2671         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
2672         Update.
2673         * top.c (undo_terminal_modifications_before_exit): Update.
2674         * target/target.h (target_terminal_init, target_terminal_inferior)
2675         (target_terminal_ours): Don't declare.
2676         (class target_terminal): New.
2677         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
2678         (target_terminal_ours_for_output)
2679         (make_cleanup_restore_target_terminal): Don't declare.
2680         (target_terminal_info): Remove.
2681         * target.c (enum terminal_state, terminal_state): Remove.
2682         (target_terminal::terminal_state): Define.
2683         (target_terminal::init): Rename from target_terminal_init.
2684         (target_terminal::inferior): Rename from
2685         target_terminal_inferior.
2686         (target_terminal::ours): Rename from target_terminal_ours.
2687         (target_terminal::ours_for_output): Rename from
2688         target_terminal_ours_for_output.
2689         (target_terminal::info): New method.
2690         (cleanup_restore_target_terminal)
2691         (make_cleanup_restore_target_terminal): Remove.
2692         * solib.c (handle_solib_event): Update.
2693         * remote.c (remote_serial_quit_handler): Update.
2694         (remote_terminal_inferior, remote_wait_as): Update.
2695         * record-full.c (record_full_wait_1): Update.
2696         * nto-procfs.c (procfs_create_inferior): Update.
2697         * nat/fork-inferior.c (startup_inferior): Update.
2698         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
2699         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
2700         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
2701         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
2702         (mi_breakpoint_created, mi_breakpoint_deleted)
2703         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
2704         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2705         (mi_user_selected_context_changed, report_initial_inferior):
2706         Update.
2707         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
2708         (linux_nat_terminal_inferior): Update.
2709         * infrun.c (follow_fork_inferior)
2710         (handle_vfork_child_exec_or_exit, do_target_resume)
2711         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
2712         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
2713         Update.
2714         * inflow.c (child_terminal_init, info_terminal_command): Update.
2715         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
2716         (attach_command): Update.
2717         * infcall.c (call_thread_fsm_should_stop): Update.
2718         * gnu-nat.c (gnu_attach): Update.
2719         * extension.c (struct active_ext_lang_state)
2720         (restore_active_ext_lang): Update.
2721         * exceptions.c (print_flush): Update.
2722         * event-top.c (async_enable_stdin, default_quit_handler): Update.
2723         (struct quit_handler_cleanup_data, restore_quit_handler)
2724         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
2725         Remove.
2726         * cp-support.c (gdb_demangle): Update.
2727         * breakpoint.c (update_inserted_breakpoint_locations)
2728         (insert_breakpoint_locations, handle_jit_event)
2729         (disable_breakpoints_in_unloaded_shlib): Update.
2730         * annotate.c (annotate_breakpoints_invalid)
2731         (annotate_frames_invalid): Update.
2732
2733 2017-09-20  Tom Tromey  <tom@tromey.com>
2734
2735         * main.c (catch_command_errors): Rename from
2736         catch_command_errors_const.
2737         (captured_main_1): Update.
2738
2739 2017-09-20  Pedro Alves  <palves@redhat.com>
2740
2741         * cli/cli-cmds.c (list_command): Use print_sal_location.
2742         (print_sal_location): New function.
2743         (ambiguous_line_spec): Use print_sal_location.
2744         * linespec.c (symbol_to_sal): Record the symbol in the sal.
2745         * symtab.c (find_function_start_sal): Likewise.
2746         * symtab.h (symtab_and_line::symbol): New field.
2747
2748 2017-09-20  Pedro Alves  <palves@redhat.com>
2749
2750         * linespec.c (minsym_found): Handle non-text minsyms.
2751         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
2752
2753 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2754
2755         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
2756         backslash.
2757
2758 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2759
2760         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
2761         vmovups instead vmovaps.
2762         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
2763
2764 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
2765
2766         * NEWS (Changes since GDB 8.0): Add starti.
2767         * infcmd.c (enum run_break): New.
2768         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
2769         case.
2770         (run_command): Use enum run_how.
2771         (start_command): Likewise.
2772         (starti_command): New function.
2773         (RUN_ARGS_HELP): New macro.
2774         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
2775         commands.  Add starti command.
2776
2777 2017-09-19  Yao Qi  <yao.qi@linaro.org>
2778
2779         * Makefile.in (monitor.o): Remove the rule.
2780
2781 2017-09-19  Yao Qi  <yao.qi@linaro.org>
2782
2783         * annotate.h (struct annotate_arg_emitter): Use
2784         DISABLE_COPY_AND_ASSIGN.
2785         * common/refcounted-object.h (refcounted_object): Likewise.
2786         * completer.h (struct completion_result): Likewise.
2787         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
2788         * filename-seen-cache.h (filename_seen_cache): Likewise.
2789         * gdbcore.h (thread_section_name): Likewise.
2790         * gdb_regex.h (compiled_regex): Likewise.
2791         * gdbthread.h (scoped_restore_current_thread): Likewise.
2792         * inferior.h (scoped_restore_current_inferior): Likewise.
2793         * jit.c (jit_reader): Likewise.
2794         * linespec.h (struct linespec_result): Likewise.
2795         * mi/mi-parse.h (struct mi_parse): Likewise.
2796         * nat/fork-inferior.c (execv_argv): Likewise.
2797         * progspace.h (scoped_restore_current_program_space): Likewise.
2798         * python/python-internal.h (class gdbpy_enter): Likewise.
2799         * regcache.h (regcache): Likewise.
2800         * target-descriptions.c (struct tdesc_reg): Likewise.
2801         (struct tdesc_type): Likewise.
2802         (struct tdesc_feature): Likewise.
2803         * ui-out.h (ui_out_emit_type): Likewise.
2804
2805 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2806
2807         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
2808         label abort_expression.
2809
2810 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2811
2812         * common/buffer.c (buffer_xml_printf): Adjust.
2813         * common/xml-utils.c (xml_escape_text): Change return type to
2814         std::string, update code accordingly.
2815         * common/xml-utils.h (xml_escape_text): Change return type to
2816         std::string.
2817         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
2818         * windows-tdep.c (windows_xfer_shared_library): Adjust.
2819         * unittests/xml-utils-selftests.c (test_xml_escape_text):
2820         Adjust.
2821
2822 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2823
2824         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
2825         (SUBDIR_UNITTESTS_OBS): Add new object file.
2826         * unittests/xml-utils-selftests.c: New file.
2827
2828 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2829
2830         * common/selftest.h (selftest): New struct/interface.
2831         (register_test): Add name parameter, add new overload.
2832         (run_tests): Add filter parameter.
2833         (for_each_selftest_ftype): New typedef.
2834         (for_each_selftest): New declaration.
2835         * common/selftest.c (tests): Change type to
2836         map<string, unique_ptr<selftest>>.
2837         (simple_selftest): New struct.
2838         (register_test): New function.
2839         (register_test): Add name parameter and use it.
2840         (run_tests): Add filter parameter and use it.  Add prints.
2841         Adjust to vector -> map change.
2842         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
2843         registering selftests.
2844         * arm-tdep.c (_initialize_arm_tdep): Likewise.
2845         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
2846         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
2847         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
2848         * findvar.c (_initialize_findvar): Likewise.
2849         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
2850         * maint.c (maintenance_selftest): Update call to run_tests.
2851         (maintenance_info_selftests): New function.
2852         (_initialize_maint_cmds): Register "maintenance info selftests"
2853         command.  Update "maintenance selftest" doc.
2854         * regcache.c (_initialize_regcache): Add names when registering
2855         selftests.
2856         * rust-exp.y (_initialize_rust_exp): Likewise.
2857         * selftest-arch.c (gdbarch_selftest): New struct.
2858         (gdbarch_tests): Remove.
2859         (register_test_foreach_arch): Add name parameter.  Call
2860         register_test.
2861         (tests_with_arch): Remove, move most content to
2862         gdbarch_selftest::operator().
2863         (_initialize_selftests_foreach_arch): Remove.
2864         * selftest-arch.h (register_test_foreach_arch): Add name
2865         parameter.
2866         (run_tests_with_arch): New declaration.
2867         * utils-selftests.c (_initialize_utils_selftests): Add names
2868         when registering selftests.
2869         * utils.c (_initialize_utils): Likewise.
2870         * unittests/array-view-selftests.c
2871         (_initialize_array_view_selftests): Likewise.
2872         * unittests/environ-selftests.c (_initialize_environ_selftests):
2873         Likewise.
2874         * unittests/function-view-selftests.c
2875         (_initialize_function_view_selftests): Likewise.
2876         * unittests/offset-type-selftests.c
2877         (_initialize_offset_type_selftests): Likewise.
2878         * unittests/optional-selftests.c
2879         (_initialize_optional_selftests): Likewise.
2880         * unittests/scoped_restore-selftests.c
2881         (_initialize_scoped_restore_selftests): Likewise.
2882         * NEWS: Document "maintenance selftest" and "maint info
2883         selftests".
2884
2885 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2886
2887         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
2888         scoped_restore.
2889
2890 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2891
2892         * mi/mi-main.c (mi_load_progress): Make uiout variable
2893         a unique_ptr.
2894
2895 2017-09-15  Pedro Alves  <palves@redhat.com>
2896
2897         * compile/compile-c-types.c (convert_enum, convert_int)
2898         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
2899
2900 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
2901
2902         * dwarf2read.c (copy_string): Remove.
2903         (parse_macro_definition): Replace copy_string with savestring.
2904
2905 2017-09-15  Yao Qi  <yao.qi@linaro.org>
2906
2907         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
2908         gdb_target_obs.
2909         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
2910         Likewise.
2911         (i[34567]86-*-linux*): Likewise.
2912
2913 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2914
2915         * dwarf2expr.h (dwarf_stack_value): Add constructor.
2916         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
2917         <stack>: Change type to std::vector.
2918         <stack_len, stack_allocated>: Remove.
2919         <grow_stack>: Remove.
2920         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2921         (dwarf_expr_context::~dwarf_expr_context): Remove.
2922         (dwarf_expr_context::grow_stack): Remove.
2923         (dwarf_expr_context::push): Adjust.
2924         (dwarf_expr_context::pop): Adjust.
2925         (dwarf_expr_context::fetch): Adjust.
2926         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
2927         (dwarf_expr_context::stack_empty_p): Adjust.
2928         (dwarf_expr_context::execute_stack_op): Adjust.
2929
2930 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2931
2932         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
2933         return type to bool.
2934         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
2935
2936 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2937
2938         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
2939         Change type to bool.
2940         (dwarf_stack_value) <in_stack_memory>: Likewise.
2941         (dwarf_expr_context) <push_address>: Change parameter type to
2942         bool.
2943         <fetch_in_stack_memory>: Change return type to bool.
2944         <push>: Change parameter type to bool.
2945         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
2946         to bool.
2947         (dwarf_expr_context::push_address): Likewise.
2948         (dwarf_expr_context::fetch_in_stack_memory): Change return type
2949         to bool.
2950         (dwarf_expr_context::execute_stack_op): Adjust.
2951         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
2952
2953 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2954
2955         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
2956         (struct dwarf_expr_context) <n_pieces>: Remove.
2957         <pieces>: Change type to std::vector.
2958         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2959         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
2960         pieces.
2961         (dwarf_expr_context::add_piece): Adjust.
2962         * dwarf2loc.c (struct piece_closure): Initialize fields.
2963         <n_pieces>: Remove.
2964         <pieces>: Change type to std::vector.
2965         (allocate_piece_closure): Adjust, change parameter to
2966         std::vector rvalue and std::move it to piece_closure.
2967         (rw_pieced_value): Adjust.
2968         (check_pieced_synthetic_pointer): Adjust.
2969         (indirect_synthetic_pointer): Adjust.
2970         (coerce_pieced_ref): Adjust.
2971         (free_pieced_value_closure):  Adjust.  Use delete to free
2972         piece_closure.
2973         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
2974         to allocate_piece_closure.
2975         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2976
2977 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2978
2979         * probe.h (probe_ops_cp): Remove typedef.
2980         (DEF_VEC_P (probe_ops_cp)): Remove.
2981         (all_probe_ops): Change type to std::vector.
2982         * probe.c (info_probes_for_ops): Adjust to vector change.
2983         (probe_linespec_to_ops): Likewise.
2984         (all_probe_ops): Change type to std::vector.
2985         (_initialize_probe): Adjust to vector change.
2986         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2987         * elfread.c (elf_get_probes): Likewise.
2988         * stap-probe.c (_initialize_stap_probe): Likewise.
2989
2990 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2991
2992         * probe.h (struct bound_probe): Define constructors.
2993         * probe.c (bound_probe_s): Remove typedef.
2994         (DEF_VEC_O (bound_probe_s)): Remove VEC.
2995         (collect_probes): Change return type to std::vector, remove
2996         cleanup.
2997         (compare_probes): Return bool, change parameter type.  Change
2998         semantic to "less than".
2999         (gen_ui_out_table_header_info): Change parameter to std::vector
3000         and update.
3001         (exists_probe_with_pops): Likewise.
3002         (info_probes_for_ops): Update to std::vector change.
3003         (enable_probes_command): Likewise.
3004         (disable_probes_command): Likewise.
3005
3006 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3007
3008         * probe.h (struct probe_ops) <get_probes>: Change parameter from
3009         vec to std::vector.
3010         * probe.c (parse_probes_in_pspace): Update.
3011         (find_probes_in_objfile): Update.
3012         (find_probe_by_pc): Update.
3013         (collect_probes): Update.
3014         (probe_any_get_probes): Update.
3015         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3016         return type to reference to std::vector.
3017         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3018         std::vector and update.
3019         (dtrace_process_dof): Likewise.
3020         (dtrace_get_probes): Likewise.
3021         * elfread.c (elf_get_probes): Change return type to std::vector,
3022         store an std::vector in bfd_data.
3023         (probe_key_free): Update to std::vector.
3024         * stap-probe.c (handle_stap_probe): Change parameter to
3025         std::vector and update.
3026         (stap_get_probes): Likewise.
3027         * symfile-debug.c (debug_sym_get_probes): Change return type to
3028         std::vector and update.
3029
3030 2017-09-11  Tom Tromey  <tom@tromey.com>
3031
3032         * breakpoint.c (program_breakpoint_here_p): Update.
3033         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3034         from make_show_memory_breakpoints_cleanup.  Return a
3035         scoped_restore_tmpl<int>.
3036         (restore_show_memory_breakpoints): Remove.
3037         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3038         * mem-break.c (memory_validate_breakpoint): Update.
3039         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3040         (ia64_memory_remove_breakpoint): Update.
3041         (ia64_breakpoint_from_pc): Update.
3042         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3043         from make_show_memory_breakpoints_cleanup.
3044
3045 2017-09-11  Tom Tromey  <tom@tromey.com>
3046
3047         * d-namespace.c (d_lookup_symbol): Use std::string.
3048         (find_symbol_in_baseclass): Likewise.
3049
3050 2017-09-11  Tom Tromey  <tom@tromey.com>
3051
3052         * ctf.c (ctf_start): Use std::string.
3053
3054 2017-09-11  Tom Tromey  <tom@tromey.com>
3055
3056         * ada-lang.c (is_known_support_routine): Update.
3057         (ada_unhandled_exception_name_addr_from_raise): Update.
3058         * guile/scm-frame.c (gdbscm_frame_name): Update.
3059         * python/py-frame.c (frapy_name): Update.
3060         (frapy_function): Update.
3061         * stack.h (find_frame_funname): Update.
3062         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3063         (print_frame): Update.
3064
3065 2017-09-11  Tom Tromey  <tom@tromey.com>
3066
3067         * findcmd.c (put_bits): Take a gdb::byte_vector.
3068         (parse_find_args): Return gdb::byte_vector.  "args" now const.
3069         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
3070         cleanups.
3071         (find_command): Update.
3072
3073 2017-09-11  Tom Tromey  <tom@tromey.com>
3074
3075         * cli/cli-script.c (class scoped_restore_hook_in): New.
3076         (clear_hook_in_cleanup): Remove.
3077         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3078         scoped_restore_hook_in.
3079
3080 2017-09-11  Tom Tromey  <tom@tromey.com>
3081
3082         * cli/cli-script.c (restore_interp): Remove.
3083         (read_command_lines): Use scoped_restore_interp.
3084         * interps.c (scoped_restore_interp::set_temp): Rename from
3085         interp_set_temp.
3086         * interps.h (class scoped_restore_interp): New.
3087         (interp_set_temp): Remove.
3088
3089 2017-09-11  Tom Tromey  <tom@tromey.com>
3090
3091         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3092         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3093         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3094         scoped_restore.
3095         (mi_cmd_break_insert_1): Update.
3096         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3097         scoped_restore.
3098
3099 2017-09-11  Tom Tromey  <tom@tromey.com>
3100
3101         * demangle.c (demangle_command): Update.
3102         * breakpoint.c (disable_command): Update.
3103         (enable_command): Update.
3104         (find_location_by_number): Make "number" const.  Use
3105         get_number_trailer.
3106         * cli/cli-utils.c (extract_arg): Return std::string.
3107         * probe.c (parse_probe_linespec): Update.  Change types.
3108         (collect_probes): Take string arguments.
3109         (parse_probe_linespec): Likewise.
3110         (info_probes_for_ops): Update.
3111         (enable_probes_command): Update.
3112         (disable_probes_command): Update.
3113         * break-catch-sig.c (catch_signal_split_args): Update.
3114         * mi/mi-parse.c (mi_parse): Update.
3115
3116 2017-09-11  Tom Tromey  <tom@tromey.com>
3117
3118         * language.h (language_enum): Make argument const.
3119         * language.c (language_enum): Make argument const.
3120
3121 2017-09-11  Tom Tromey  <tom@tromey.com>
3122
3123         * common/common-utils.h (skip_to_space): Remove macro, redeclare
3124         as function.
3125         (skip_to_space): Rename from skip_to_space_const.
3126         * common/common-utils.c (skip_to_space): New function.
3127         (skip_to_space): Rename from skip_to_space_const.
3128         * cli/cli-utils.h (get_number): Rename from get_number_const.
3129         (extract_arg): Rename from extract_arg_const.
3130         * cli/cli-utils.c (get_number): Rename from get_number_const.
3131         (extract_arg): Rename from extract_arg_const.
3132         (number_or_range_parser::get_number): Use ::get_number.
3133         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3134         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3135         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3136         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3137         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3138         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3139         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3140         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3141
3142 2017-09-11  Tom Tromey  <tom@tromey.com>
3143
3144         * python/python.c (do_start_initialization): Use
3145         py-event-types.def to initialize types.
3146         Define all object type structures.
3147         * python/python-internal.h: Don't declare event initialization
3148         functions.
3149         * python/py-threadevent.c (thread_event_object_type): Don't
3150         define.
3151         * python/py-stopevent.c (stop_event_object_type): Don't define.
3152         * python/py-signalevent.c (signal_event_object_type): Don't
3153         declare or define.
3154         * python/py-newobjfileevent.c (new_objfile_event_object_type)
3155         (clear_objfiles_event_object_type): Don't declare or define.
3156         * python/py-infevents.c (inferior_call_pre_event_object_type)
3157         (inferior_call_post_event_object_type)
3158         (register_changed_event_object_type)
3159         (memory_changed_event_object_type): Don't declare or define.
3160         * python/py-inferior.c (new_thread_event_object_type)
3161         (new_inferior_event_object_type)
3162         (inferior_deleted_event_object_type): Don't declare or define.
3163         * python/py-exitedevent.c (exited_event_object_type): Don't
3164         declare or define.
3165         * python/py-evts.c (gdbpy_initialize_py_events): Use
3166         py-all-events.def.
3167         * python/py-events.h (thread_event_object_type): Don't declare.
3168         (events_object): Use py-all-events.def.
3169         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
3170         py-event-types.def.
3171         * python/py-event-types.def: New file.
3172         * python/py-continueevent.c (create_continue_event_object): Don't
3173         declare or define.
3174         * python/py-bpevent.c (breakpoint_event_object_type): Don't
3175         declare or define.
3176         * python/py-all-events.def: New file.
3177
3178 2017-09-11  Tom Tromey  <tom@tromey.com>
3179
3180         * python/py-threadevent.c (create_thread_event_object): Return
3181         gdbpy_ref.
3182         * python/py-stopevent.h (create_stop_event_object)
3183         (create_breakpoint_event_object, create_signal_event_object):
3184         Update.
3185         * python/py-stopevent.c (create_stop_event_object): Return
3186         gdbpy_ref.
3187         (emit_stop_event): Update.
3188         * python/py-signalevent.c (create_signal_event_object): Return
3189         gdbpy_ref.
3190         * python/py-infevents.c (create_inferior_call_event_object):
3191         Update.
3192         * python/py-event.h (create_event_object)
3193         (create_thread_event_object): Update.
3194         * python/py-event.c (create_event_object): Return gdbpy_ref.
3195         * python/py-continueevent.c: Return gdbpy_ref.
3196         * python/py-bpevent.c (create_breakpoint_event_object): Return
3197         gdbpy_ref.
3198
3199 2017-09-11  Tom Tromey  <tom@tromey.com>
3200
3201         PR python/15622:
3202         * NEWS: Add entry.
3203         * python/python.c (do_start_initialization): Initialize new event
3204         types.
3205         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3206         (gdbpy_initialize_inferior_deleted_event)
3207         (gdbpy_initialize_new_thread_event): Declare.
3208         * python/py-threadevent.c (create_thread_event_object): Add option
3209         "thread" parameter.
3210         * python/py-inferior.c (new_thread_event_object_type)
3211         (new_inferior_event_object_type)
3212         (inferior_deleted_event_object_type): Declare.
3213         (python_new_inferior, python_inferior_deleted): New functions.
3214         (add_thread_object): Emit new_thread event.
3215         (gdbpy_initialize_inferior): Attach new functions to corresponding
3216         observers.
3217         (new_thread, new_inferior, inferior_deleted): Define new event
3218         types.
3219         * python/py-evts.c (gdbpy_initialize_py_events): Add new
3220         registries.
3221         * python/py-events.h (events_object) <new_inferior,
3222         inferior_deleted, new_thread>: New fields.
3223         * python/py-event.h (create_thread_event_breakpoint): Add optional
3224         "thread" parameter.
3225
3226 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3227
3228         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3229         check current_ui instead.
3230         (internal_vproblem): Likewise.
3231
3232 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3233
3234         * thread.c (print_thread_info_1): Remove unnecessary calls to
3235         uiout->is_mi_like_p.
3236
3237 2017-09-09  Tom Tromey  <tom@tromey.com>
3238
3239         * namespace.h (add_using_directive): Update.
3240         * namespace.c (add_using_directive): Change type of excludes to
3241         std::vector.
3242         * dwarf2read.c (read_import_statement): Use std::vector.
3243         (read_namespace): Update.
3244         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3245
3246 2017-09-09  Tom Tromey  <tom@tromey.com>
3247
3248         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3249
3250 2017-09-09  Tom Tromey  <tom@tromey.com>
3251
3252         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3253
3254 2017-09-09  Tom Tromey  <tom@tromey.com>
3255
3256         * stack.c (func_command): Use gdb::def_vector.
3257
3258 2017-09-09  Tom Tromey  <tom@tromey.com>
3259
3260         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3261         ui_out_emit_list, ui_out_emit_tuple.
3262         (mi_cmd_var_update): Likewise.
3263
3264 2017-09-09  Tom Tromey  <tom@tromey.com>
3265
3266         * mi/mi-interp.c (mi_user_selected_context_changed): Use
3267         ui_out_redirect_pop.
3268         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3269         ui_out_redirect_pop.
3270         * utils.c (do_ui_out_redirect_pop)
3271         (make_cleanup_ui_out_redirect_pop): Remove.
3272         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3273         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3274         * ui-out.h (ui_out_redirect_pop): New class.
3275
3276 2017-09-09  Tom Tromey  <tom@tromey.com>
3277
3278         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3279         (list_available_thread_groups, mi_cmd_list_thread_groups)
3280         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3281         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3282         Likewise.
3283
3284 2017-09-09  Tom Tromey  <tom@tromey.com>
3285
3286         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3287         ui_out_emit_tuple.
3288
3289 2017-09-09  Tom Tromey  <tom@tromey.com>
3290
3291         * target.c (flash_erase_command): Use ui_out_emit_tuple.
3292         * stack.c (print_frame): Use ui_out_emit_tuple.
3293         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3294         (info_spu_mailbox_command, info_spu_dma_command)
3295         (info_spu_proxydma_command): Likewise.
3296         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3297         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3298         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3299         ui_out_emit_tuple.
3300         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3301
3302 2017-09-09  Tom Tromey  <tom@tromey.com>
3303
3304         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3305         (class ui_out_emit_table): Update comment.
3306         * ui-out.c (do_cleanup_table_end)
3307         (make_cleanup_ui_out_table_begin_end): Remove.
3308         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3309         (info_spu_dma_cmdlist): Likewise.
3310         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3311         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3312         ui_out_emit_table.
3313
3314 2017-09-09  Tom Tromey  <tom@tromey.com>
3315
3316         * thread.c (print_thread_info_1): Use ui_out_emit_table,
3317         ui_out_emit_list, gdb::optional.
3318
3319 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
3320
3321         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
3322         prototype.
3323         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
3324         prototype.
3325         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
3326         prototype.
3327         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
3328         * ada-exp.y: Remove _initialize_ada_exp prototype.
3329         * ada-lang.c: Remove _initialize_ada_language prototype.
3330         * ada-tasks.c: Remove _initialize_tasks prototype.
3331         * addrmap.c: Remove _initialize_addrmap prototype.
3332         * agent.c: Remove _initialize_agent prototype.
3333         * aix-thread.c: Remove _initialize_aix_thread prototype.
3334         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
3335         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
3336         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
3337         prototype.
3338         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
3339         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
3340         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3341         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3342         prototype.
3343         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3344         prototype.
3345         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3346         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3347         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3348         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3349         prototype.
3350         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3351         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3352         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3353         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3354         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3355         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3356         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3357         prototype.
3358         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3359         prototype.
3360         * annotate.c: Remove _initialize_annotate prototype.
3361         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3362         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3363         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3364         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3365         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3366         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3367         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3368         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3369         prototype.
3370         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3371         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3372         * auto-load.c: Remove _initialize_auto_load prototype.
3373         * auxv.c: Remove _initialize_auxv prototype.
3374         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3375         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3376         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3377         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3378         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3379         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3380         prototype.
3381         * break-catch-throw.c: Remove _initialize_break_catch_throw
3382         prototype.
3383         * breakpoint.c: Remove _initialize_breakpoint prototype.
3384         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3385         * btrace.c: Remove _initialize_btrace prototype.
3386         * charset.c: Remove _initialize_charset prototype.
3387         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3388         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3389         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3390         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3391         * cli/cli-script.c: Remove _initialize_cli_script prototype.
3392         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3393         * coffread.c: Remove _initialize_coffread prototype.
3394         * compile/compile.c: Remove _initialize_compile prototype.
3395         * complaints.c: Remove _initialize_complaints prototype.
3396         * completer.c: Remove _initialize_completer prototype.
3397         * copying.awk: Remove _initialize_copying prototype.
3398         * copying.c: Regenerate.
3399         * core-regset.c: Remove _initialize_core_regset prototype.
3400         * corefile.c: Remove _initialize_core prototype.
3401         * corelow.c: Remove _initialize_corelow prototype.
3402         * cp-abi.c: Remove _initialize_cp_abi prototype.
3403         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3404         * cp-support.c: Remove _initialize_cp_support prototype.
3405         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3406         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3407         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3408         * ctf.c: Remove _initialize_ctf prototype.
3409         * d-lang.c: Remove _initialize_d_language prototype.
3410         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
3411         prototype.
3412         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
3413         * dbxread.c: Remove _initialize_dbxread prototype.
3414         * dcache.c: Remove _initialize_dcache prototype.
3415         * demangle.c: Remove _initialize_demangler prototype.
3416         * disasm-selftests.c: Remove _initialize_disasm_selftests
3417         prototype.
3418         * disasm.c: Remove _initialize_disasm prototype.
3419         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3420         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3421         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3422         prototype.
3423         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3424         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3425         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3426         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3427         * elfread.c: Remove _initialize_elfread prototype.
3428         * exec.c: Remove _initialize_exec prototype.
3429         * extension.c: Remove _initialize_extension prototype.
3430         * f-lang.c: Remove _initialize_f_language prototype.
3431         * f-valprint.c: Remove _initialize_f_valprint prototype.
3432         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
3433         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
3434         * filesystem.c: Remove _initialize_filesystem prototype.
3435         * findcmd.c: Remove _initialize_mem_search prototype.
3436         * fork-child.c: Remove _initialize_fork_child prototype.
3437         * frame-base.c: Remove _initialize_frame_base prototype.
3438         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
3439         * frame.c: Remove _initialize_frame prototype.
3440         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
3441         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
3442         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
3443         * gcore.c: Remove _initialize_gcore prototype.
3444         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
3445         * gdbarch.c: Regenerate.
3446         * gdbarch.sh: Remove _initialize_gdbarch prototype.
3447         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
3448         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
3449         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
3450         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
3451         * go-lang.c: Remove _initialize_go_language prototype.
3452         * go32-nat.c: Remove _initialize_go32_nat prototype.
3453         * guile/guile.c: Remove _initialize_guile prototype.
3454         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
3455         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
3456         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
3457         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
3458         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
3459         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
3460         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
3461         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
3462         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
3463         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
3464         prototype.
3465         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
3466         prototype.
3467         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
3468         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
3469         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
3470         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
3471         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
3472         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
3473         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
3474         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
3475         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
3476         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
3477         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
3478         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
3479         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
3480         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3481         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
3482         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
3483         prototype.
3484         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
3485         prototype.
3486         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
3487         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
3488         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
3489         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
3490         * infcall.c: Remove _initialize_infcall prototype.
3491         * infcmd.c: Remove _initialize_infcmd prototype.
3492         * inferior.c: Remove _initialize_inferiors prototype.
3493         * inflow.c: Remove _initialize_inflow prototype.
3494         * infrun.c: Remove _initialize_infrun prototype.
3495         * interps.c: Remove _initialize_interpreter prototype.
3496         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
3497         * jit.c: Remove _initialize_jit prototype.
3498         * language.c: Remove _initialize_language prototype.
3499         * linux-fork.c: Remove _initialize_linux_fork prototype.
3500         * linux-nat.c: Remove _initialize_linux_nat prototype.
3501         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
3502         * linux-thread-db.c: Remove _initialize_thread_db prototype.
3503         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
3504         * m2-lang.c: Remove _initialize_m2_language prototype.
3505         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
3506         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
3507         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
3508         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
3509         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
3510         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3511         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3512         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
3513         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
3514         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
3515         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3516         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3517         * machoread.c: Remove _initialize_machoread prototype.
3518         * macrocmd.c: Remove _initialize_macrocmd prototype.
3519         * macroscope.c: Remove _initialize_macroscope prototype.
3520         * maint.c: Remove _initialize_maint_cmds prototype.
3521         * mdebugread.c: Remove _initialize_mdebugread prototype.
3522         * memattr.c: Remove _initialize_mem prototype.
3523         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
3524         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
3525         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
3526         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
3527         * mi/mi-main.c: Remove _initialize_mi_main prototype.
3528         * microblaze-linux-tdep.c: Remove
3529         _initialize_microblaze_linux_tdep prototype.
3530         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
3531         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
3532         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
3533         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
3534         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
3535         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
3536         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
3537         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
3538         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
3539         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
3540         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
3541         prototype.
3542         * mipsread.c: Remove _initialize_mipsread prototype.
3543         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
3544         prototype.
3545         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
3546         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
3547         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
3548         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
3549         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
3550         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
3551         prototype.
3552         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
3553         * nto-procfs.c: Remove _initialize_procfs prototype.
3554         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
3555         * objc-lang.c: Remove _initialize_objc_language prototype.
3556         * objfiles.c: Remove _initialize_objfiles prototype.
3557         * observer.c: Remove observer_test_first_notification_function,
3558         observer_test_second_notification_function,
3559         observer_test_third_notification_function, and
3560         _initialize_observer prototypes.
3561         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
3562         * osabi.c: Remove _initialize_gdb_osabi prototype.
3563         * osdata.c: Remove _initialize_osdata prototype.
3564         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
3565         * parse.c: Remove _initialize_parse prototype.
3566         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
3567         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
3568         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
3569         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
3570         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
3571         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
3572         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
3573         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
3574         * printcmd.c: Remove _initialize_printcmd prototype.
3575         * probe.c: Remove _initialize_probe prototype.
3576         * proc-api.c: Remove _initialize_proc_api prototype.
3577         * proc-events.c: Remove _initialize_proc_events prototype.
3578         * proc-service.c: Remove _initialize_proc_service prototype.
3579         * procfs.c: Remove _initialize_procfs prototype.
3580         * psymtab.c: Remove _initialize_psymtab prototype.
3581         * python/python.c: Remove _initialize_python prototype.
3582         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
3583         * record-btrace.c: Remove _initialize_record_btrace prototype.
3584         * record-full.c: Remove _initialize_record_full prototype.
3585         * record.c: Remove _initialize_record prototype.
3586         * regcache.c: Remove _initialize_regcache prototype.
3587         * reggroups.c: Remove _initialize_reggroup prototype.
3588         * remote-notif.c: Remove _initialize_notif prototype.
3589         * remote-sim.c: Remove _initialize_remote_sim prototype.
3590         * remote.c: Remove _initialize_remote prototype.
3591         * reverse.c: Remove _initialize_reverse prototype.
3592         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
3593         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
3594         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
3595         prototype.
3596         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
3597         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
3598         * rust-exp.y: Remove _initialize_rust_exp prototype.
3599         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
3600         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
3601         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
3602         * score-tdep.c: Remove _initialize_score_tdep prototype.
3603         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
3604         prototype.
3605         * ser-go32.c: Remove _initialize_ser_dos prototype.
3606         * ser-mingw.c: Remove _initialize_ser_windows prototype.
3607         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
3608         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
3609         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
3610         * serial.c: Remove _initialize_serial prototype.
3611         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
3612         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
3613         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
3614         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
3615         * skip.c: Remove _initialize_step_skip prototype.
3616         * sol-thread.c: Remove _initialize_sol_thread prototype.
3617         * solib-aix.c: Remove _initialize_solib_aix prototype.
3618         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
3619         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
3620         * solib-frv.c: Remove _initialize_frv_solib prototype.
3621         * solib-spu.c: Remove _initialize_spu_solib prototype.
3622         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
3623         * solib-target.c: Remove _initialize_solib_target prototype.
3624         * solib.c: Remove _initialize_solib prototype.
3625         * source.c: Remove _initialize_source prototype.
3626         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
3627         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
3628         prototype.
3629         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
3630         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
3631         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
3632         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
3633         prototype.
3634         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
3635         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
3636         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
3637         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
3638         prototype.
3639         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
3640         prototype.
3641         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
3642         prototype.
3643         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
3644         prototype.
3645         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
3646         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
3647         prototype.
3648         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
3649         prototype.
3650         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
3651         prototype.
3652         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
3653         prototype.
3654         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
3655         prototype.
3656         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
3657         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
3658         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
3659         * stabsread.c: Remove _initialize_stabsread prototype.
3660         * stack.c: Remove _initialize_stack prototype.
3661         * stap-probe.c: Remove _initialize_stap_probe prototype.
3662         * std-regs.c: Remove _initialize_frame_reg prototype.
3663         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
3664         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
3665         * symfile.c: Remove _initialize_symfile prototype.
3666         * symmisc.c: Remove _initialize_symmisc prototype.
3667         * symtab.c: Remove _initialize_symtab prototype.
3668         * target-dcache.c: Remove _initialize_target_dcache prototype.
3669         * target-descriptions.c: Remove _initialize_target_descriptions
3670         prototype.
3671         * thread.c: Remove _initialize_thread prototype.
3672         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
3673         prototype.
3674         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
3675         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
3676         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
3677         prototype.
3678         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
3679         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
3680         * tracefile.c: Remove _initialize_tracefile prototype.
3681         * tracepoint.c: Remove _initialize_tracepoint prototype.
3682         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
3683         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
3684         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
3685         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
3686         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
3687         * tui/tui-win.c: Remove _initialize_tui_win prototype.
3688         * tui/tui.c: Remove _initialize_tui prototype.
3689         * typeprint.c: Remove _initialize_typeprint prototype.
3690         * user-regs.c: Remove _initialize_user_regs prototype.
3691         * utils.c: Remove _initialize_utils prototype.
3692         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
3693         * valarith.c: Remove _initialize_valarith prototype.
3694         * valops.c: Remove _initialize_valops prototype.
3695         * valprint.c: Remove _initialize_valprint prototype.
3696         * value.c: Remove _initialize_values prototype.
3697         * varobj.c: Remove _initialize_varobj prototype.
3698         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
3699         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
3700         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
3701         * windows-nat.c: Remove _initialize_windows_nat,
3702         _initialize_check_for_gdb_ini, and _initialize_loadable
3703         prototypes.
3704         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
3705         * xcoffread.c: Remove _initialize_xcoffread prototype.
3706         * xml-support.c: Remove _initialize_xml_support prototype.
3707         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
3708         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
3709         prototype.
3710         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
3711         prototype.
3712         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
3713
3714 2017-09-08  Keith Seitz  <keiths@redhat.com>
3715
3716         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
3717         field.
3718
3719 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
3720
3721         * f-valprint.c (f_val_print): Remove check for one byte
3722         sized integers. Remove printing of character type.
3723
3724 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
3725             Christoph Weinmann  <christoph.t.weinmann@intel.com>
3726             Bernhard Heckel  <bernhard.heckel@intel.com>
3727
3728         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
3729         to maintain proper indentation when printing pointers/refs.
3730
3731 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
3732
3733         GDB 8.0.1 released.
3734
3735 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
3736
3737         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
3738
3739 2017-09-05  Tom Tromey  <tom@tromey.com>
3740
3741         * parse.c (funcall_chain): Now a std::vector.
3742         (start_arglist, end_arglist): Simplify.
3743         (free_funcalls): Remove.
3744         (parse_exp_in_context_1): Remove cleanup.
3745
3746 2017-09-05  Tom Tromey  <tom@tromey.com>
3747
3748         * go-exp.y (go_parse): Don't create a cleanup.
3749
3750 2017-09-05  Tom Tromey  <tom@tromey.com>
3751
3752         * d-exp.y (PrimaryExpression): Use std::string.
3753         (d_parse): Don't create a cleanup.
3754
3755 2017-09-05  Tom Tromey  <tom@tromey.com>
3756
3757         * utils.c (do_clear_parser_state): Remove.
3758         (make_cleanup_clear_parser_state): Remove.
3759         * p-exp.y (pascal_parse): Use scoped_restore.
3760         * m2-exp.y (m2_parse): Use scoped_restore.
3761         * f-exp.y (f_parse): Use scoped_restore.
3762         * d-exp.y (d_parse): Use scoped_restore.
3763         * c-exp.y (c_parse): Use scoped_restore.
3764         * ada-exp.y (ada_parse): Use scoped_restore.
3765         * utils.h (make_cleanup_clear_parser_state): Remove.
3766
3767 2017-09-06  Keith Seitz  <keiths@redhat.com>
3768
3769         * dwarf2read.c (dw2_linkage_name_attr): New function.
3770         (dw2_linkage_name): New function.
3771         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
3772         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
3773         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
3774
3775 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3776
3777         * config/djgpp/djconfig.sh: Correct shell portability issue.
3778
3779 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3780
3781         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
3782
3783 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
3784
3785         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
3786         * NEWS: Mention new FreeBSD/mips native configuration.
3787         * configure.host: Add aarch64*-*-freebsd*.
3788         * configure.nat: Likewise.
3789         * aarch64-fbsd-nat.c: New file.
3790
3791 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
3792
3793         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
3794         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
3795         * NEWS: Mention new FreeBSD/aarch64 target.
3796         * configure.tgt: Add aarch64*-*-freebsd*.
3797         * aarch64-fbsd-tdep.c: New file.
3798         * aarch64-fbsd-tdep.h: New file.
3799
3800 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3801
3802         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
3803
3804 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
3805
3806         * parse.c (find_minsym_type_and_address): Don't relocate addresses
3807         of TLS symbols.
3808
3809 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3810
3811         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
3812         call.
3813
3814 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3815
3816         * infrun.c (follow_exec): Call add_thread after
3817         target_find_description.
3818
3819 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3820
3821         * infrun.c (handle_inferior_event_1): When exec'ing, read
3822         stop_pc after follow_exec.
3823
3824 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3825
3826         * remote.c (process_g_packet): Update error message.
3827
3828 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3829
3830         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
3831         targets.
3832
3833 2017-09-05  Pedro Alves  <palves@redhat.com>
3834
3835         * eval.c (eval_call, evaluate_funcall): New functions, factored
3836         out from ...
3837         (evaluate_subexp_standard): ... this.
3838
3839 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3840
3841         * amd64-tdep.c (amd64_target_description): Create target
3842         descriptions.
3843         (_initialize_amd64_tdep): Don't call functions
3844         initialize_tdesc_amd64_*.  Add self tests.
3845         * arch/amd64.c (amd64_create_target_description): Add parameter
3846         is_linux.  Call set_tdesc_osabi if is_linux is true.
3847         * arch/amd64.h (amd64_create_target_description): Update the
3848         declaration.
3849         * arch/i386.c (i386_create_target_description): Add parameter
3850         is_linux.  Call set_tdesc_osabi if is_linux is true.
3851         * arch/i386.h (i386_create_target_description): Update
3852         declaration.
3853         * configure.tgt: Add i386.o to gdb_target_obs.
3854         * features/Makefile (XMLTOC): Remove i386/*.xml.
3855         * features/i386/amd64-avx-avx512.c: Remove.
3856         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
3857         * features/i386/amd64-avx-mpx.c: Remove.
3858         * features/i386/amd64-avx.c: Remove.
3859         * features/i386/amd64-mpx.c: Remove.
3860         * features/i386/amd64.c: Remove.
3861         * features/i386/i386-avx-avx512.c: Remove.
3862         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
3863         * features/i386/i386-avx-mpx.c: Remove.
3864         * features/i386/i386-avx.c: Remove.
3865         * features/i386/i386-mmx.c: Remove.
3866         * features/i386/i386-mpx.c: Remove.
3867         * features/i386/i386.c: Remove.
3868         * i386-tdep.c: Don't include features/i386/i386*.c., include
3869         target-descriptions.h and arch/i386.h.
3870         (i386_target_description): Create target descriptions.
3871         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
3872         functions.  Do self tests.
3873
3874 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3875
3876         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
3877         * features/i386/amd64-avx-avx512-linux.c: Removed.
3878         * features/i386/amd64-avx-linux.c: Removed.
3879         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
3880         * features/i386/amd64-avx-mpx-linux.c: Removed.
3881         * features/i386/amd64-linux.c: Removed.
3882         * features/i386/amd64-mpx-linux.c: Removed.
3883         * features/i386/x32-avx-avx512-linux.c: Removed.
3884         * features/i386/x32-avx-linux.c: Removed.
3885         * features/i386/x32-linux.c: Removed.
3886
3887 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3888
3889         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
3890         features/i386/*.c.
3891         (amd64_linux_read_description): Call
3892         amd64_create_target_description.
3893         * arch/amd64.c: New file.
3894         * arch/amd64.h: New file.
3895         * configure.tgt (x86_64-*-linux*): Append amd64.o.
3896         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
3897
3898 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3899
3900         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
3901         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
3902         (amd64_linux_read_description): Create target descriptions.
3903         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
3904         functions.  Add unit tests.
3905         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
3906         x32-core.xml.
3907         * features/i386/64bit-avx.c: Generated.
3908         * features/i386/64bit-avx512.c: Generated.
3909         * features/i386/64bit-core.c: Generated.
3910         * features/i386/64bit-linux.c: Generated.
3911         * features/i386/64bit-mpx.c: Generated.
3912         * features/i386/64bit-pkeys.c: Generated.
3913         * features/i386/64bit-segments.c: Generated.
3914         * features/i386/64bit-sse.c: Generated.
3915         * features/i386/x32-core.c: Generated.
3916         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
3917         c files for amd64-linux and x32-linux.
3918
3919 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3920
3921         * amd64-linux-tdep.c (amd64_linux_read_description): New
3922         function.
3923         (amd64_linux_core_read_description): Call
3924         amd64_linux_read_description.
3925         (amd64_linux_init_abi): Likewise.
3926         (amd64_x32_linux_init_abi): Likewise.
3927         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
3928         * x86-linux-nat.c (x86_linux_read_description): Call
3929         amd64_linux_read_description.
3930
3931 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3932
3933         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
3934         comments.
3935
3936 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3937
3938         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
3939         * features/i386/i386-avx-avx512-linux.c: Remove.
3940         * features/i386/i386-avx-linux.c: Remove.
3941         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
3942         * features/i386/i386-avx-mpx-linux.c: Remove.
3943         * features/i386/i386-linux.c: Remove.
3944         * features/i386/i386-mmx-linux.c: Remove.
3945         * features/i386/i386-mpx-linux.c: Remove.
3946
3947 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3948
3949         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
3950         (SFILES): Add arch/i386.c.
3951         (HFILES_NO_SRCDIR): Add arch/i386.h.
3952         * arch/i386.c: New file.
3953         * arch/i386.h: New file.
3954         * arch/tdesc.h (allocate_target_description): Declare.
3955         (set_tdesc_architecture): Declare.
3956         (set_tdesc_osabi): Declare.
3957         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
3958         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
3959         include arch/i386.h.
3960         (i386_linux_read_description): Remove code and call
3961         i386_create_target_description.
3962         (set_tdesc_architecture): New function.
3963         (set_tdesc_osabi): New function.
3964         * target-descriptions.h (allocate_target_description): Remove.
3965
3966 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3967
3968         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
3969         * target-descriptions.c (tdesc_create_feature): Likewise, and
3970         adjust code.
3971         * features/i386/32bit-avx.c: Re-generated.
3972         * features/i386/32bit-avx512.c: Re-generated.
3973         * features/i386/32bit-core.c: Re-generated.
3974         * features/i386/32bit-linux.c: Re-generated.
3975         * features/i386/32bit-mpx.c: Re-generated.
3976         * features/i386/32bit-pkeys.c: Re-generated.
3977         * features/i386/32bit-sse.c: Re-generated.
3978
3979 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3980
3981         * regformats/regdef.h (struct reg): Override operator == and !=.
3982
3983 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3984
3985         * arch/tdesc.h: New file.
3986         * regformats/regdat.sh: Generate code using tdesc_create_reg.
3987         * target-descriptions.c: Update comments.
3988         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
3989         declarations.
3990         * features/i386/32bit-avx.c: Re-generated.
3991         * features/i386/32bit-avx512.c: Re-generated.
3992         * features/i386/32bit-core.c: Re-generated.
3993         * features/i386/32bit-linux.c: Re-generated.
3994         * features/i386/32bit-mpx.c: Re-generated.
3995         * features/i386/32bit-pkeys.c: Re-generated.
3996         * features/i386/32bit-sse.c: Re-generated.
3997
3998 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3999
4000         * regformats/regdat.sh: Update generated code.
4001
4002 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4003
4004         * regformats/regdat.sh: Adjust code order.
4005
4006 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4007
4008         * expprint.c (dump_subexp_body_standard): Use constant format
4009         string in fprintf_filtered call.
4010
4011 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4012
4013         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4014         NetBSD/i386.
4015         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4016
4017 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4018
4019         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4020
4021 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4022
4023         * bsd-kvm.o: Define _KMEMUSER.
4024         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4025         * configure: Regenerate.
4026
4027 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4028
4029         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4030         * i386-fbsd-nat.c: Likewise.
4031
4032 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4033
4034         * unittests/array-view-selftests.c: Add include of <array>.
4035
4036 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4037
4038         * spu-tdep.c (flush_ea_cache): Add missing argument to
4039         call_function_by_hand.
4040
4041 2017-09-04  Pedro Alves  <palves@redhat.com>
4042
4043         * NEWS (Safer support for debugging with no debug info): New.
4044
4045 2017-09-04  Pedro Alves  <palves@redhat.com>
4046
4047         * c-exp.y (function_method, function_method_void): Add current
4048         instance flags to TYPE_INSTANCE.
4049         * dwarf2read.c (check_modifier): New.
4050         (compute_delayed_physnames): Assert that only C++ adds delayed
4051         physnames.  Mark fn_fields as const/volatile depending on
4052         physname.
4053         * eval.c (make_params): New type_instance_flags parameter.  Use
4054         it as the new type's instance flags.
4055         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4056         flags element and pass it to make_params.
4057         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4058         instance flags element.
4059         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4060         * gdbtypes.h: Include "enum-flags.h".
4061         (type_instance_flags): New enum-flags type.
4062         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4063         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4064         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4065         (follow_type_instance_flags): New function.
4066         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4067         * parser-defs.h (follow_type_instance_flags): Declare.
4068         * valops.c (value_struct_elt_for_reference): const/volatile must
4069         match too.
4070
4071 2017-09-04  Pedro Alves  <palves@redhat.com>
4072
4073         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4074         function/method scopes; lookup the nested name as a function local
4075         static variable.
4076
4077 2017-09-04  Pedro Alves  <palves@redhat.com>
4078
4079         (%type <voidval>): Add function_method.
4080         * c-exp.y (exp): New production for calls with no arguments.
4081         (function_method, function_method_void_or_typelist): New
4082         productions.
4083         (exp): New production for "method()::static_var".
4084         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4085         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4086         Handle OP_FUNC_STATIC_VAR.
4087         * parse.c (operator_length_standard):
4088         Handle OP_FUNC_STATIC_VAR.
4089
4090 2017-09-04  Pedro Alves  <palves@redhat.com>
4091
4092         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4093         handling.
4094         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4095         Ditto.
4096         * parse.c (operator_length_standard, operator_check_standard):
4097         Ditto.
4098         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4099
4100 2017-09-04  Pedro Alves  <palves@redhat.com>
4101
4102         * ax-gdb.c: Include "typeprint.h".
4103         (gen_expr_for_cast): New function.
4104         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4105         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4106         type is unknown.
4107         * dwarf2read.c (new_symbol_full): Fallback to int instead of
4108         nodebug_data_symbol.
4109         * eval.c: Include "typeprint.h".
4110         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4111         Error out if symbol has unknown type.
4112         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4113         evaluate_subexp_for_cast.
4114         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4115         OP_VAR_MSYM_VALUE.
4116         (evaluate_subexp_for_cast): New function.
4117         * gdbtypes.c (init_nodebug_var_type): New function.
4118         (objfile_type): Use it to initialize types of variables with no
4119         debug info.
4120         * typeprint.c (error_unknown_type): New.
4121         * typeprint.h (error_unknown_type): New declaration.
4122         * compile/compile-c-types.c (convert_type_basic): Handle
4123         TYPE_CODE_ERROR; warn and fallback to int for variables with
4124         unknown type.
4125
4126 2017-09-04  Pedro Alves  <palves@redhat.com>
4127
4128         * eval.c (evaluate_var_value): New function, factored out from ...
4129         (evaluate_subexp_standard): ... here.
4130
4131 2017-09-04  Pedro Alves  <palves@redhat.com>
4132
4133         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4134         Remove useless assignments to 'op'.
4135
4136 2017-09-04  Pedro Alves  <palves@redhat.com>
4137
4138         * eval.c (eval_skip_value): New function.
4139         (evaluate_subexp_standard): Use it.
4140
4141 2017-09-04  Pedro Alves  <palves@redhat.com>
4142
4143         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4144         function name from symbol/minsym and pass it to
4145         error_call_unknown_return_type.
4146
4147 2017-09-04  Pedro Alves  <palves@redhat.com>
4148
4149         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4150         * ax-gdb.c (gen_msym_var_ref): New function.
4151         (gen_expr): Handle OP_VAR_MSYM_VALUE.
4152         * eval.c (evaluate_var_msym_value): New function.
4153         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4154         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4155         to call_function_by_hand.
4156         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4157         Handle OP_VAR_MSYM_VALUE.
4158         (union exp_element) <msymbol>: New field.
4159         * minsyms.h (struct type): Forward declare.
4160         (find_minsym_type_and_address): Declare.
4161         * parse.c (write_exp_elt_msym): New function.
4162         (write_exp_msymbol): Delete, refactored as ...
4163         (find_minsym_type_and_address): ... this new function.
4164         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4165         (operator_length_standard, operator_check_standard): Handle
4166         OP_VAR_MSYM_VALUE.
4167         * std-operator.def (OP_VAR_MSYM_VALUE): New.
4168
4169 2017-09-04  Pedro Alves  <palves@redhat.com>
4170
4171         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4172         TYPE_GNU_IFUNC specially here.  Throw error if return type is
4173         unknown.
4174         * ada-typeprint.c (print_func_type): Handle functions with unknown
4175         return type.
4176         * c-typeprint.c (c_type_print_base): Handle functions and methods
4177         with unknown return type.
4178         * compile/compile-c-symbols.c (convert_symbol_bmsym)
4179         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4180         * compile/compile-c-types.c: Include "objfiles.h".
4181         (convert_func): For functions with unknown return type, warn and
4182         default to int.
4183         * compile/compile-object-run.c (compile_object_run): Adjust call
4184         to call_function_by_hand_dummy.
4185         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4186         call_function_by_hand.
4187         * eval.c (evaluate_subexp_standard): Adjust calls to
4188         call_function_by_hand.  Handle functions and methods with unknown
4189         return type.  Pass expect_type to call_function_by_hand.
4190         * f-typeprint.c (f_type_print_base): Handle functions with unknown
4191         return type.
4192         * gcore.c (call_target_sbrk): Adjust call to
4193         call_function_by_hand.
4194         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4195         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
4196         an integer address type instead of nodebug.
4197         * guile/scm-value.c (gdbscm_value_call): Adjust call to
4198         call_function_by_hand.
4199         * infcall.c (error_call_unknown_return_type): New function.
4200         (call_function_by_hand): New "default_return_type" parameter.
4201         Pass it down.
4202         (call_function_by_hand_dummy): New "default_return_type"
4203         parameter.  Use it instead of defaulting to int.  If there's no
4204         default and the return type is unknown, throw an error.  If
4205         there's a default return type, and the called function has no
4206         debug info, then assume the function is prototyped.
4207         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4208         New "default_return_type" parameter.
4209         (error_call_unknown_return_type): New declaration.
4210         * linux-fork.c (call_lseek): Cast return type of lseek.
4211         (inferior_call_waitpid, checkpoint_command): Adjust calls to
4212         call_function_by_hand.
4213         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4214         calls to call_function_by_hand.
4215         * m2-typeprint.c (m2_procedure): Handle functions with unknown
4216         return type.
4217         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4218         (value_nsstring, print_object_command): Adjust calls to
4219         call_function_by_hand.
4220         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4221         functions with unknown return type.
4222         (pascal_type_print_func_varspec_suffix): New function.
4223         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4224         TYPE_CODE_METHOD>: Use it.
4225         * python/py-value.c (valpy_call): Adjust call to
4226         call_function_by_hand.
4227         * rust-lang.c (rust_evaluate_funcall): Adjust call to
4228         call_function_by_hand.
4229         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4230         call_function_by_hand.
4231         * valops.c (value_allocate_space_in_inferior): Adjust call to
4232         call_function_by_hand.
4233         * typeprint.c (type_print_unknown_return_type): New function.
4234         * typeprint.h (type_print_unknown_return_type): New declaration.
4235
4236 2017-09-04  Pedro Alves  <palves@redhat.com>
4237
4238         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4239         types with more than one parameter as prototyped.
4240
4241 2017-09-04  Pedro Alves  <palves@redhat.com>
4242
4243         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4244         (disassemble_command): Use gdb_disassembly_flags instead of bare
4245         int.
4246         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4247         (dump_insns, do_mixed_source_and_assembly_deprecated)
4248         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4249         Use gdb_disassembly_flags instead of bare int.
4250         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4251         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4252         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4253         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
4254         (enum gdb_disassembly_flag): ... values of this new enumeration.
4255         (gdb_disassembly_flags): Define.
4256         (gdb_disassembly)
4257         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4258         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4259         gdb_disassembly_flags instead of bare int.
4260         * record-btrace.c (btrace_insn_history)
4261         (record_btrace_insn_history, record_btrace_insn_history_range)
4262         (record_btrace_insn_history_from): Use gdb_disassembly_flags
4263         instead of bare int.
4264         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4265         Use gdb_disassembly_flags instead of bare int.
4266         * target-debug.h (target_debug_print_gdb_disassembly_flags):
4267         Define.
4268         * target-delegates.c: Regenerate.
4269         * target.c (target_insn_history, target_insn_history_from)
4270         (target_insn_history_range): Use gdb_disassembly_flags instead of
4271         bare int.
4272         * target.h: Include "disasm.h".
4273         (struct target_ops) <to_insn_history, to_insn_history_from,
4274         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4275         int.
4276         (target_insn_history, target_insn_history_from)
4277         (target_insn_history_range): Use gdb_disassembly_flags instead of
4278         bare int.
4279
4280 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4281
4282         * cli/cli-script.c (build_command_line): For if/while commands,
4283         check whether args is empty.
4284
4285 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4286
4287         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4288         (enum command_control_type): Likewise.
4289         (struct command_line): Likewise.
4290         (free_command_lines): Likewise.
4291         (struct command_lines_deleter): Likewise.
4292         (command_line_up): Likewise.
4293         (read_command_lines): Likewise.
4294         (read_command_lines_1): Likewise.
4295         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4296         (enum command_control_type): Likewise.
4297         (struct command_line): Likewise.
4298         (free_command_lines): Likewise.
4299         (struct command_lines_deleter): Likewise.
4300         (command_line_up): Likewise.
4301         (read_command_lines): Likewise.
4302         (read_command_lines_1): Likewise.
4303         * breakpoint.h: Include cli/cli-script.h.
4304         * extension-priv.h: Likewise.
4305         * gdbcmd.h: Likewise.
4306
4307 2017-09-04  Pedro Alves  <palves@redhat.com>
4308
4309         * ada-lang.c (is_known_support_routine): Move sal declaration to
4310         where it is initialized.
4311         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4312         (parse_breakpoint_sals, decode_static_tracepoint_spec)
4313         (clear_command, update_static_tracepoint): Remove init_sal
4314         references.  Move declarations closer to initializations.
4315         * cli/cli-cmds.c (list_command): Move sal declarations closer to
4316         initializations.
4317         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
4318         references.  Move sal declarations closer to initializations.
4319         * frame.c (find_frame_sal): Return a symtab_and_line via function
4320         return instead of output parameter.  Remove init_sal references.
4321         * frame.h (find_frame_sal): Return a symtab_and_line via function
4322         return instead of output parameter.
4323         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
4324         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
4325         instead of memset.
4326         (gdbscm_find_pc_line): Remove init_sal reference.
4327         * infcall.c (call_function_by_hand_dummy): Remove init_sal
4328         references.  Move declarations closer to initializations.
4329         * infcmd.c (set_step_frame): Update.  Move declarations closer to
4330         initializations.
4331         (finish_backward): Remove init_sal references.  Move declarations
4332         closer to initializations.
4333         * infrun.c (process_event_stop_test, handle_step_into_function)
4334         (insert_hp_step_resume_breakpoint_at_frame)
4335         (insert_step_resume_breakpoint_at_caller): Likewise.
4336         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
4337         (symbol_to_sal): Likewise.
4338         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
4339         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
4340         to its initialization.
4341         * reverse.c (save_bookmark_command): Use new/delete.  Remove
4342         init_sal references.  Move declarations closer to initializations.
4343         * source.c (get_current_source_symtab_and_line): Remove brace
4344         initialization.
4345         (set_current_source_symtab_and_line): Now takes the sal by const
4346         reference.  Remove brace initialization.
4347         (line_info): Remove init_sal reference.
4348         * source.h (set_current_source_symtab_and_line): Now takes a
4349         symtab_and_line via const reference.
4350         * stack.c (set_current_sal_from_frame): Adjust.
4351         (print_frame_info): Adjust.
4352         (get_last_displayed_sal): Return the sal via function return
4353         instead of via output parameter.  Simplify.
4354         (frame_info): Adjust.
4355         * stack.h (get_last_displayed_sal): Return the sal via function
4356         return instead of via output parameter.
4357         * symtab.c (init_sal): Delete.
4358         (find_pc_sect_line): Remove init_sal references.  Move
4359         declarations closer to initializations.
4360         (find_function_start_sal): Remove init_sal references.  Move
4361         declarations closer to initializations.
4362         * symtab.h (struct symtab_and_line): In-class initialize all
4363         fields.
4364         * tracepoint.c (set_traceframe_context)
4365         (print_one_static_tracepoint_marker): Remove init_sal references.
4366         Move declarations closer to initializations.
4367         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4368         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
4369         declarations closer to initializations.
4370         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4371         init_sal references.  Adjust.
4372
4373 2017-09-04  Pedro Alves  <palves@redhat.com>
4374
4375         * ax-gdb.c (agent_command_1): Use range-for.
4376         * break-catch-throw.c (re_set_exception_catchpoint): Update.
4377         * breakpoint.c: Include "common/array-view.h".
4378         (init_breakpoint_sal, create_breakpoint_sal): Change sals
4379         parameter from struct symtabs_and_lines to
4380         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
4381         (breakpoint_sals_to_pc): Change sals parameter from struct
4382         symtabs_and_lines to std::vector reference.
4383         (check_fast_tracepoint_sals): Change sals parameter from struct
4384         symtabs_and_lines to std::array_view.  Use range-for.
4385         (decode_static_tracepoint_spec): Return a std::vector instead of
4386         symtabs_and_lines.  Update.
4387         (create_breakpoint): Update.
4388         (break_range_command, until_break_command, clear_command): Update.
4389         (base_breakpoint_decode_location, bkpt_decode_location)
4390         (bkpt_probe_create_sals_from_location)
4391         (bkpt_probe_decode_location, tracepoint_decode_location)
4392         (tracepoint_probe_decode_location)
4393         (strace_marker_create_sals_from_location): Return a std::vector
4394         instead of symtabs_and_lines.
4395         (strace_marker_create_breakpoints_sal): Update.
4396         (strace_marker_decode_location): Return a std::vector instead of
4397         symtabs_and_lines.  Update.
4398         (update_breakpoint_locations): Change struct symtabs_and_lines
4399         parameters to gdb::array_view.  Adjust.
4400         (location_to_sals): Return a std::vector instead of
4401         symtabs_and_lines.  Update.
4402         (breakpoint_re_set_default): Use std::vector instead of struct
4403         symtabs_and_lines.
4404         (decode_location_default): Return a std::vector instead of
4405         symtabs_and_lines.  Update.
4406         * breakpoint.h: Include "common/array-view.h".
4407         (struct breakpoint_ops) <decode_location>: Now returns a
4408         std::vector instead of returning a symtabs_and_lines via output
4409         parameter.
4410         (update_breakpoint_locations): Change sals parameters to use
4411         gdb::array_view.
4412         * cli/cli-cmds.c (edit_command, list_command): Update to use
4413         std::vector and gdb::array_view.
4414         (ambiguous_line_spec): Adjust to use gdb::array_view and
4415         range-for.
4416         (compare_symtabs): Rename to ...
4417         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
4418         const reference and adjust.
4419         (filter_sals): Rewrite using std::vector and standard algorithms.
4420         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4421         (jump_command): Update to use std::vector.
4422         * linespec.c (struct linespec_state) <canonical_names>: Update
4423         comment.
4424         (add_sal_to_sals_basic): Delete.
4425         (add_sal_to_sals, filter_results, convert_results_to_lsals)
4426         (decode_line_2, create_sals_line_offset)
4427         (convert_address_location_to_sals, convert_linespec_to_sals)
4428         (convert_explicit_location_to_sals, parse_linespec)
4429         (event_location_to_sals, decode_line_full, decode_line_1)
4430         (decode_line_with_current_source)
4431         (decode_line_with_last_displayed, decode_objc)
4432         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
4433         (linespec_result::~linespec_result): Adjust to use std::vector
4434         instead of symtabs_and_lines.
4435         * linespec.h (linespec_sals::sals): Now a std::vector.
4436         (struct linespec_result): Use std::vector, bool, and in-class
4437         initialization.
4438         (decode_line_1, decode_line_with_current_source)
4439         (decode_line_with_last_displayed): Return std::vector.
4440         * macrocmd.c (info_macros_command): Use std::vector.
4441         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
4442         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
4443         std::vector.
4444         * probe.h (parse_probes): Return a std::vector.
4445         * python/python.c (gdbpy_decode_line): Use std::vector and
4446         gdb::array_view.
4447         * source.c (select_source_symtab, line_info): Use std::vector.
4448         * stack.c (func_command): Use std::vector.
4449         * symtab.h (struct symtabs_and_lines): Delete.
4450         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
4451
4452 2017-09-04  Pedro Alves  <palves@redhat.com>
4453
4454         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4455         unittests/array-view-selftests.c.
4456         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
4457         * common/array-view.h: New file.
4458         * unittests/array-view-selftests.c: New file.
4459
4460 2017-09-04  Pedro Alves  <palves@redhat.com>
4461
4462         * cli/cli-cmds.c (edit_command): Pass message to
4463         ambiguous_line_spec.
4464         (list_command): Pass message to ambiguous_line_spec.  Say
4465         "first"/"last" instead of "start" and "end" to be consistent with
4466         the manual.
4467         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
4468         them to print formatted message.
4469
4470 2017-09-04  Pedro Alves  <palves@redhat.com>
4471
4472         * btrace.c (ftrace_add_pt): Pass btrace_insn to
4473         ftrace_update_insns by reference instead of pointer.
4474
4475 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4476
4477         * i386-go32-tdep.c: Include x86-xstate.h.
4478         (i386_go32_init_abi): Call i386_target_description.
4479         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
4480         if xcr0 is X86_XSTATE_X87_MASK.
4481         * i386-tdep.h (tdesc_i386): Remove the declaration.
4482         (tdesc_i386_mmx): Likewise.
4483
4484 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4485
4486         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
4487         X86_XSTATE_SSE_MASK instead of 0.
4488
4489 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4490
4491         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
4492         i386_target_description.
4493         * i386-fbsd-nat.c (i386fbsd_read_description): Call
4494         i386_target_description.
4495         * i386-tdep.c (i386_gdbarch_init): Likewise.
4496
4497 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4498
4499         * amd64-darwin-tdep.c: Include "x86-xstate.h".
4500         (x86_darwin_init_abi_64): Call amd64_target_description.
4501         * amd64-dicos-tdep.c: Likewise.
4502         * amd64-fbsd-nat.c: Likewise.
4503         * amd64-fbsd-tdep.c: Likewise.
4504         * amd64-nbsd-tdep.c: Likewise.
4505         * amd64-obsd-tdep.c: Likewise.
4506         * amd64-sol2-tdep.c: Likewise.
4507         * amd64-windows-tdep.c: Likewise.
4508         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
4509
4510 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4511
4512         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
4513         (btrace_function) <insn>: Change type to use std::vector.
4514         * btrace.c (ftrace_debug, ftrace_call_num_insn,
4515         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
4516         ftrace_update_insns, ftrace_compute_global_level_offset,
4517         btrace_stitch_bts, btrace_clear, btrace_insn_get,
4518         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
4519         change to std::vector.
4520         (ftrace_update_insns): Adjust to change to std::vector, change
4521         type of INSN parameter.
4522         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
4523         * record-btrace.c (btrace_call_history_insn_range,
4524         btrace_compute_src_line_range,
4525         record_btrace_frame_prev_register): Adjust to change to
4526         std::vector.
4527         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
4528         to change to std::vector.
4529
4530 2017-09-03  Tom Tromey  <tom@tromey.com>
4531
4532         * corefile.c (reopen_exec_file): Use std::string.
4533
4534 2017-09-03  Tom Tromey  <tom@tromey.com>
4535
4536         * compile/compile.c (compile_register_name_mangled): Return
4537         std::string.
4538         * compile/compile-loc2c.c (pushf_register_address): Update.
4539         (pushf_register): Update.
4540         * compile/compile-c-types.c (convert_array): Update.
4541         * compile/compile-c-symbols.c (generate_vla_size): Update.
4542         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
4543         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
4544         (convert_one_symbol): Update.
4545         (generate_c_for_for_one_variable): Update.
4546         * compile/compile-c-support.c (c_get_range_decl_name): Return a
4547         std::string.
4548         (generate_register_struct): Update.
4549         * compile/compile-internal.h (c_get_range_decl_name): Return a
4550         std::string.
4551         (compile_register_name_mangled): Return std::string.
4552
4553 2017-09-03  Tom Tromey  <tom@tromey.com>
4554
4555         * utils.c (perror_string): Return a std::string.
4556         (throw_perror_with_name, perror_warning_with_name): Update.
4557
4558 2017-09-03  Tom Tromey  <tom@tromey.com>
4559
4560         * demangle.c (demangle_command): Use std::string,
4561         unique_xmalloc_ptr.
4562
4563 2017-09-03  Tom Tromey  <tom@tromey.com>
4564
4565         * cli/cli-setshow.c (do_set_command): Use std::string.
4566
4567 2017-09-03  Tom Tromey  <tom@tromey.com>
4568
4569         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
4570
4571 2017-09-03  Tom Tromey  <tom@tromey.com>
4572
4573         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
4574
4575 2017-09-03  Tom Tromey  <tom@tromey.com>
4576
4577         * mi/mi-cmd-env.c (env_execute_cli_command): Use
4578         gdb::unique_xmalloc_ptr.
4579
4580 2017-09-03  Tom Tromey  <tom@tromey.com>
4581
4582         * thread.c (print_thread_info_1): Use string_printf.
4583         (thread_apply_command, thread_apply_all_command): Use
4584         std::string.
4585
4586 2017-09-03  Tom Tromey  <tom@tromey.com>
4587
4588         * valprint.c (val_print_string): Update.
4589         * gdbcore.h (memory_error_message): Return std::string.
4590         * corefile.c (memory_error_message): Return std::string.
4591         (memory_error): Update.
4592         * breakpoint.c (insert_bp_location): Update.
4593
4594 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
4595
4596         * target/waitstatus.h (target_waitstatus_to_string): Change
4597         return type to std::string.
4598         * target/waitstatus.c (target_waitstatus_to_string): Return
4599         std::string.
4600         * target.h (target_waitstatus_to_string): Remove declaration.
4601         * infrun.c (resume, clear_proceed_status_thread,
4602         print_target_wait_results, do_target_wait, save_waitstatus,
4603         stop_all_threads): Adjust.
4604         * record-btrace.c (record_btrace_wait): Adjust.
4605         * target-debug.h
4606         (target_debug_print_struct_target_waitstatus_p): Adjust.
4607
4608 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
4609
4610         PR gdb/22046
4611         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
4612         detection.
4613
4614 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
4615
4616         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
4617         for setting/unsetting environment variables on the remote target.
4618         (New remote packets): Add entries for QEnvironmentHexEncoded,
4619         QEnvironmentUnset and QEnvironmentReset.
4620         * common/environ.c (gdb_environ::operator=): Extend method to
4621         handle m_user_set_env_list and m_user_unset_env_list.
4622         (gdb_environ::clear): Likewise.
4623         (match_var_in_string): Change type of first parameter from 'char
4624         *' to 'const char *'.
4625         (gdb_environ::set): Extend method to handle
4626         m_user_set_env_list and m_user_unset_env_list.
4627         (gdb_environ::unset): Likewise.
4628         (gdb_environ::clear_user_set_env): New method.
4629         (gdb_environ::user_set_envp): Likewise.
4630         (gdb_environ::user_unset_envp): Likewise.
4631         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
4632         m_user_unset_env_list on move constructor/assignment.
4633         (unset): Add new default parameter 'update_unset_list = true'.
4634         (clear_user_set_env): New method.
4635         (user_set_envp): Likewise.
4636         (user_unset_envp): Likewise.
4637         (m_user_set_env_list): New std::set.
4638         (m_user_unset_env_list): Likewise.
4639         * common/rsp-low.c (hex2str): New function.
4640         (bin2hex): New overload for bin2hex function.
4641         * common/rsp-low.c (hex2str): New prototype.
4642         (str2hex): New overload prototype.
4643         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
4644         QEnvironmentUnset and QEnvironmentReset.
4645         (remote_protocol_features): Add QEnvironmentHexEncoded,
4646         QEnvironmentUnset and QEnvironmentReset packets.
4647         (send_environment_packet): New function.
4648         (extended_remote_environment_support): Likewise.
4649         (extended_remote_create_inferior): Call
4650         extended_remote_environment_support.
4651         (_initialize_remote): Add QEnvironmentHexEncoded,
4652         QEnvironmentUnset and QEnvironmentReset packet configs.
4653         * unittests/environ-selftests.c (gdb_selftest_env_var):
4654         New variable.
4655         (test_vector_initialization): New function.
4656         (test_init_from_host_environ): Likewise.
4657         (test_reinit_from_host_environ): Likewise.
4658         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
4659         Likewise.
4660         (test_unset_set_empty_vector): Likewise.
4661         (test_vector_clear): Likewise.
4662         (test_std_move): Likewise.
4663         (test_move_constructor):
4664         (test_self_move): Likewise.
4665         (test_set_unset_reset): Likewise.
4666         (run_tests): Rewrite in terms of the functions above.
4667
4668 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
4669
4670         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
4671         (adi_available): Use a temp variable of type CORE_ADDR as argument
4672         3 when calling target_auxv_search.
4673         (adi_normalize_address): Use masks and xor operators to calculate
4674         normalized address.
4675         (adi_read_versions, adi_write_versions, adi_print_versions)
4676         (do_examine, do_assign): Use paddress.
4677
4678 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
4679
4680         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
4681         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
4682         out of loop and add supply of FIR.
4683         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
4684         add collect of FIR.
4685
4686 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4687
4688         PR gdb/21827
4689         * cli/cli-script.c (define_command): Don't convert command name
4690         to lower case.
4691
4692 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
4693
4694         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
4695         Update all callers accordingly. Remove all code blocks handling
4696         the case where DISPP is not NULL.
4697
4698 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4699
4700         PR symtab/22003
4701         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
4702         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4703         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
4704
4705 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4706
4707         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
4708         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
4709         (read_comp_units_from_section): New parameter abbrev_section, use
4710         read_and_check_comp_unit_head, allocate signatured_type if needed.
4711         (create_all_comp_units): Update read_comp_units_from_section caller.
4712
4713 2017-08-23  Pedro Alves  <palves@redhat.com>
4714
4715         PR remote/21852
4716         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
4717         to null_ptid and switch to thread without reading the registers
4718         after adding the inferior.
4719
4720 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
4721
4722         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
4723         compile-gcc.
4724         * compile/compile.c (compile_gcc, show_compile_gcc): New.
4725         (compile_to_object): Implement compile_gcc.
4726         (_initialize_compile): Install "set compile-gcc".  Initialize
4727         compile_gcc.
4728
4729 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
4730
4731         * compile/compile.c (compile_to_object): Conditionally call
4732         set_verbose.  Conditionally call compile or compile_v0.
4733
4734 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
4735
4736         * sparc64-tdep.h: (adi_normalize_address): New export.
4737         * sparc-nat.h: (open_adi_tag_fd): New export.
4738         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
4739         * sparc64-linux-tdep.c:
4740         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
4741         (sparc64_linux_handle_segmentation_fault): New function.
4742         (sparc64_linux_init_abi): Register
4743         sparc64_linux_handle_segmentation_fault
4744         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
4745         (sparc64_addr_bits_remove): New function.
4746         (sparc64_init_abi): Register sparc64_addr_bits_remove.
4747         (MAX_PROC_NAME_SIZE): New macro.
4748         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
4749         (sparc64adilist): New variable.
4750         (adi_proc_list): New variable.
4751         (find_adi_info): New function.
4752         (add_adi_info): New function.
4753         (get_adi_info_proc): New function.
4754         (get_adi_info): New function.
4755         (info_adi_command): New function.
4756         (read_maps_entry): New function.
4757         (adi_available): New function.
4758         (adi_normalize_address): New function.
4759         (adi_align_address): New function.
4760         (adi_convert_byte_count): New function.
4761         (adi_tag_fd): New function.
4762         (adi_is_addr_mapped): New function.
4763         (adi_read_versions): New function.
4764         (adi_write_versions): New function.
4765         (adi_print_versions): New function.
4766         (do_examine): New function.
4767         (do_assign): New function.
4768         (adi_examine_command): New function.
4769         (adi_assign_command): New function.
4770         (_initialize_sparc64_adi_tdep): New function.
4771
4772 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
4773
4774         * breakpoint.c (breakpoints_info): Rename to ...
4775         (info_breakpoints_command): ... this.
4776         (watchpoints_info): Rename to ...
4777         (info_watchpoints_command): ... this.
4778         (tracepoints_info): Rename to ...
4779         (info_tracepoints_command): ... this.
4780         (_initialize_breakpoint): Adjust.
4781         * dcache.c (dcache_info): Rename to ...
4782         (info_display_command): ... this.
4783         (_initialize_dcache): Adjust.
4784         * frame.h (args_info): Rename to ...
4785         (info_args_command): ... this.
4786         (locals_info): Rename to ...
4787         (info_locals_command): ... this.
4788         * infcmd.c (nofp_registers_info): Rename to ...
4789         (info_registers_command): ... this.
4790         (float_info): Rename to ...
4791         (info_float_command): ... this.
4792         (program_info): Rename to ...
4793         (info_program_command): ... this.
4794         (all_registers_info): Rename to ...
4795         (info_all_registers_command): ... this.
4796         (vector_info): Rename to ...
4797         (info_vector_command): ... this.
4798         (float_info): Rename to ...
4799         (info_float_command): ... this.
4800         (_initialize_infcmd): Adjust.
4801         * inferior.h (term_info): Rename to ...
4802         (info_terminal_command): ... this.
4803         * inflow.c (term_info): Rename to ...
4804         (info_terminal_command): ... this.
4805         (_initialize_inflow): Adjust.
4806         * infrun.c (signals_info): Rename to ...
4807         (info_signals_command): ... this.
4808         (_initialize_infrun): Adjust.
4809         * objc-lang.c (classes_info): Rename to ...
4810         (info_classes_command): ... this.
4811         (selectors_info): Rename to ...
4812         (info_selectors_command): ... this.
4813         (_initialize_objc_language): Adjust.
4814         * printcmd.c (sym_info): Rename to ...
4815         (info_symbol_command): ... this.
4816         (address_info): Rename to ...
4817         (info_address_command): ... this.
4818         (display_info): Rename to ...
4819         (info_display_command): ... this.
4820         (_initialize_printcmd): Adjust.
4821         * reverse.c (bookmarks_info): Rename to ...
4822         (info_breakpoints_command): ... this.
4823         (_initialize_reverse): Adjust.
4824         * ser-go32.c (dos_info): Rename to ...
4825         (info_serial_command): ... this.
4826         (_initialize_ser_dos): Adjust.
4827         * skip.c (skip_info): Rename to ...
4828         (info_skip_command): ... this.
4829         (_initialize_step_skip): Adjust.
4830         * source.c (line_info): Rename to ...
4831         (info_line_command): ... this.
4832         (source_info): Rename to ...
4833         (info_source_command)
4834         * stack.c (frame_info): Rename to ...
4835         (info_frame_command): ... this.
4836         (locals_info): Rename to ...
4837         (info_locals_command): ... this.
4838         (args_info): Rename to ...
4839         (info_args_command): ... this.
4840         (_initialize_stack): Adjust.
4841         * symtab.c (sources_info): Rename to ...
4842         (info_sources_command): ... this.
4843         (variables_info): Rename to ...
4844         (info_variables_command): ... this.
4845         (functions_info): Rename to ...
4846         (info_functions_command): ... this.
4847         (types_info): Rename to ...
4848         (info_types_command): ... this.
4849         (_initialize_symtab): Adjust.
4850         * target.c (target_info): Rename to ...
4851         (info_target_command): ... this.
4852         (initialize_targets): Adjust.
4853         * tracepoint.c (tvariables_info): Rename to ...
4854         (info_tvariables_command): ... this.
4855         (scope_info): Rename to ...
4856         (info_scope_command): ... this.
4857         (trace_dump_actions): Adjust.
4858         (_initialize_tracepoint): Adjust.
4859
4860 2017-08-22  Tom Tromey  <tom@tromey.com>
4861
4862         * breakpoint.h (install_breakpoint): Update.
4863         * breakpoint.c (add_solib_catchpoint): Update.
4864         (install_breakpoint): Change argument to a std::unique_ptr.
4865         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
4866         (create_breakpoint_sal, create_breakpoint): Update.
4867         (watch_command_1, catch_exec_command_1)
4868         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
4869         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
4870         Return the breakpoint.
4871         (set_raw_breakpoint_without_location, set_raw_breakpoint)
4872         (new_single_step_breakpoint): Update.
4873         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
4874         std::unique_ptr.
4875         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4876         std::unique_ptr.
4877         * break-catch-sig.c (create_signal_catchpoint): Use
4878         std::unique_ptr.
4879         * ada-lang.c (create_ada_exception_catchpoint): Use
4880         std::unique_ptr.
4881
4882 2017-08-22  Tom Tromey  <tom@tromey.com>
4883
4884         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
4885
4886 2017-08-22  Tom Tromey  <tom@tromey.com>
4887
4888         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
4889         (lookup_partial_symbol): Update.
4890
4891 2017-08-22  Tom Tromey  <tom@tromey.com>
4892
4893         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
4894         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
4895         (find_and_open_source, symtab_to_fullname): Update.
4896         * psymtab.c (psymtab_to_fullname): Update.
4897
4898 2017-08-22  Tom Tromey  <tom@tromey.com>
4899
4900         * exec.c (exec_file_attach): Update.
4901         * linux-thread-db.c (try_thread_db_load): Update.
4902         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
4903         * utils.c (gdb_realpath): Change return type.
4904         (gdb_realpath_keepfile): Update.
4905         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
4906         (_initialize_utils): Register the new self test.
4907         * source.c (openp): Update.
4908         (find_and_open_source): Update.
4909         * nto-tdep.c (nto_find_and_open_solib): Update.
4910         * main.c (set_gdb_data_directory): Update.
4911         (captured_main_1): Update.
4912         * dwarf2read.c (dwarf2_get_dwz_file): Update
4913         (dw2_map_symbol_filenames): Update.
4914         * auto-load.c (auto_load_safe_path_vec_update): Update.
4915         (filename_is_in_auto_load_safe_path_vec): Change type of
4916         "filename_realp".
4917         (auto_load_objfile_script): Update.
4918         (file_is_auto_load_safe): Update.  Use std::string.
4919         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
4920
4921 2017-08-22  Tom Tromey  <tom@tromey.com>
4922
4923         * utils.c (gdb_realpath_keepfile): Return a
4924         gdb::unique_xmalloc_ptr.
4925         * exec.c (exec_file_attach): Update.
4926         * utils.h (gdb_realpath_keepfile): Return a
4927         gdb::unique_xmalloc_ptr.
4928
4929 2017-08-22  Tom Tromey  <tom@tromey.com>
4930
4931         * compile/compile.c (compile_file_command): Use
4932         gdb::unique_xmalloc_ptr, std::string.
4933         * utils.c (gdb_abspath): Change return type.
4934         * source.c (openp): Update.
4935         * objfiles.c (allocate_objfile): Update.
4936         * main.c (set_gdb_data_directory): Update.
4937         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
4938
4939 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
4940
4941         * cli-cmds.c (list_commands): List actual code around more than
4942         one location.
4943
4944 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
4945
4946         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
4947
4948 2017-08-21  Pedro Alves  <palves@redhat.com>
4949
4950         PR gdb/19487
4951         * c-exp.y (variable production): Handle function aliases.
4952         * minsyms.c (msymbol_is_text): New function.
4953         * minsyms.h (msymbol_is_text): Declare.
4954         * symtab.c (find_function_alias_target): New function.
4955         * symtab.h (find_function_alias_target): Declare.
4956
4957 2017-08-21  Pedro Alves  <palves@redhat.com>
4958
4959         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
4960         typedefs.
4961         * typeprint.c (whatis_exp): If handling "whatis", and expression
4962         is OP_TYPE, strip one typedef level.  Otherwise don't strip
4963         typedefs here.
4964         * valops.c (value_cast): Save "to" type before resolving
4965         stubs/typedefs.  Use that type as resulting value's type.
4966
4967 2017-08-18  Tom Tromey  <tom@tromey.com>
4968             Pedro Alves  <palves@redhat.com>
4969
4970         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
4971         * sol-thread.c (sol_thread_resume, sol_thread_wait)
4972         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4973         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4974         * proc-service.c (ps_xfer_memory): Use scoped_restore.
4975         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4976         (linux_get_siginfo_data): Add "thread" argument.  Use
4977         scoped_restore.
4978         * linux-nat.c (linux_child_follow_fork)
4979         (check_stopped_by_watchpoint): Use scoped_restore.
4980         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4981         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4982         (restore_inferior_ptid, save_inferior_ptid): Remove.
4983         * btrace.c (btrace_fetch): Use scoped_restore.
4984         * bsd-uthread.c (bsd_uthread_fetch_registers)
4985         (bsd_uthread_store_registers): Use scoped_restore.
4986         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4987         scoped_restore.
4988         * aix-thread.c (aix_thread_resume, aix_thread_wait)
4989         (aix_thread_xfer_partial): Use scoped_restore.
4990         * inferior.h (save_inferior_ptid): Remove.
4991
4992 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4993
4994         PR tdep/21818
4995         * arm-tdep.c (gdb_print_insn_arm): Mark
4996         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4997
4998 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4999
5000         * NEWS: Mention GDBserver's new option "--selftest".
5001         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5002         * selftest.c: Move it to common/selftest.c.
5003         * selftest.h: Move it to common/selftest.h.
5004         * selftest-arch.c (reset): New function.
5005         (tests_with_arch): Call reset.
5006
5007 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5008
5009         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
5010         instead of exception_fprintf and printf_filtered.
5011
5012 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5013
5014         * selftest.c (register_self_test): Rename it to
5015         selftests::register_test.
5016         (run_self_tests): selftest::run_tests.
5017         * selftest.h: Update declarations.
5018         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5019         selftests::register_test_foreach_arch.
5020         * selftest-arch.h: Update declaration.
5021         * aarch64-tdep.c: Update.
5022         * arm-tdep.c: Likewise.
5023         * disasm-selftests.c: Likewise.
5024         * dwarf2loc.c: Likewise.
5025         * dwarf2-frame.c: Likewise.
5026         * findvar.c: Likewise.
5027         * gdbarch-selftests.c: Likewise.
5028         * maint.c (maintenance_selftest): Likewise.
5029         * regcache.c: Likewise.
5030         * rust-exp.y: Likewise.
5031         * selftest-arch.c: Likewise.
5032         * unittests/environ-selftests.c: Likewise.
5033         * unittests/function-view-selftests.c: Likewise.
5034         * unittests/offset-type-selftests.c: Likewise.
5035         * unittests/optional-selftests.c: Likewise.
5036         * unittests/scoped_restore-selftests.c: Likewise.
5037         * utils-selftests.c: Likewise.
5038
5039 2017-08-17  Pedro Alves  <palves@redhat.com>
5040
5041         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5042         local.
5043
5044 2017-08-17  Pedro Alves  <palves@redhat.com>
5045
5046         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5047         field.
5048         (reset_die_in_process): Delete, replaced by ...
5049         (process_die_scope): ... this new class.  Make it responsible for
5050         freeing cu->line_header too.
5051         (process_die): Use process_die_scope.
5052         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5053         cu->line_header_die_owner.  Don't release the line header if it's
5054         owned by the CU.
5055         (setup_type_unit_groups): Make the CU/DIE own the line header.
5056         Don't release the line header here.
5057
5058 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
5059
5060         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5061
5062 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5063
5064         * NEWS: Mention new shortcuts for nexti and stepi in TUI
5065         Single-Key mode
5066
5067 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5068
5069         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5070         mode command list.
5071
5072 2017-08-15  Stafford Horne  <shorne@gmail.com>
5073
5074         * MAINTAINERS (Write After Approval): Add Stafford Horne.
5075
5076 2017-08-15  Stafford Horne  <shorne@gmail.com>
5077
5078         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5079
5080 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5081
5082         PR gdb/21954
5083         * infcmd.c (unset_environment_command): Use the 'clear' method on
5084         the environment instead of resetting it.
5085
5086 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
5087
5088         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5089         platforms.
5090
5091 2017-08-14  Tom Tromey  <tom@tromey.com>
5092
5093         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5094         (print_binary_chars): Likewise.
5095         (BITS_IN_BYTES): Remove.
5096
5097 2017-08-14  Tom Tromey  <tom@tromey.com>
5098
5099         PR gdb/21675
5100         * valprint.c (LOW_ZERO): Change value to 034.
5101         (print_octal_chars): Add static_asserts for octal constants.
5102         * printcmd.c (print_scalar_formatted): Add 'd' case.
5103
5104 2017-08-11  Tom Tromey  <tom@tromey.com>
5105
5106         * symfile.c (add_symbol_file_command): Use std::vector.
5107
5108 2017-08-14  Tom Tromey  <tom@tromey.com>
5109
5110         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5111         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5112         std::move.
5113         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5114
5115 2017-08-11  Pedro Alves  <palves@redhat.com>
5116
5117         * infrun.c (process_event_stop_test): Adjust
5118         function_name_is_marked_for_skip call.
5119         * skip.c: Include <list>.
5120         (skiplist_entry): Make it a class with private fields, and
5121         getters/setters.
5122         (skiplist_entry_chain): Delete.
5123         (skiplist_entries): New.
5124         (skiplist_entry_count): Delete.
5125         (highest_skiplist_entry_num): New.
5126         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5127         (add_skiplist_entry): Delete.
5128         (skiplist_entry::skiplist_entry): New.
5129         (skiplist_entry::add_entry): New.
5130         (skip_file_command, skip_function): Adjust.
5131         (compile_skip_regexp): Delete.
5132         (skip_command): Don't compile regexp here.  Adjust to use
5133         skiplist_entry::add_entry.
5134         (skip_info): Adjust to use range-for and getters.
5135         (skip_enable_command, skip_disable_command): Adjust to use
5136         range-for and setters.
5137         (skip_delete_command): Adjust to use std::list.
5138         (add_skiplist_entry): Delete.
5139         (skip_file_p): Delete, refactored as ...
5140         (skiplist_entry::do_skip_file_p): ... this new method.
5141         (skip_gfile_p): Delete, refactored as ...
5142         (skiplist_entry::do_gskip_file_p): ... this new method.
5143         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5144         (skiplist_entry::skip_function_p): ... this new method.
5145         (function_name_is_marked_for_skip): Now returns bool, and takes
5146         the function sal by const reference.  Adjust to use range-for and
5147         skiplist_entry methods.
5148         (_initialize_step_skip): Remove references to
5149         skiplist_entry_chain, skiplist_entry_count.
5150         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5151         takes the function sal by const reference.
5152
5153 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5154
5155         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5156         (dwarf2_frame_cache): Remove reset_cache_cleanup.
5157         (dwarf2_frame_cache):
5158         * frame-unwind.c (frame_unwind_try_unwinder): Catch
5159         RETURN_MASK_ALL and set *this_case to NULL.
5160         * frame-unwind.h: Update comments.
5161
5162 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5163
5164         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5165         (dwarf2_frame_state_copy_regs): Remove.
5166         (dwarf2_frame_state_free_regs): Remove.
5167         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5168         (dwarf2_restore_rule): Call method .alloc_regs instead of
5169         dwarf2_frame_state_alloc_regs.
5170         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
5171         constructor.  Call std::move.
5172         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5173         (dwarf2_frame_cache): Likewise.
5174
5175         [GDB_SELF_TEST]: Include selftest.h and
5176         selftest-arch.h.
5177         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5178         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5179         execute_cfa_program_test.
5180
5181         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5182         copy ctor, assignment operator, move assignment.
5183         <alloc_regs>: New method.
5184         <swap>: New method.
5185         (struct dwarf2_frame_state): Delete dtor.
5186         (dwarf2_frame_state_alloc_regs): Remove declaration.
5187         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5188         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5189
5190 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5191
5192         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5193         (dwarf2_frame_state::dwarf2_frame_state): New.
5194         (dwarf2_frame_state::~dwarf2_frame_state): New.
5195         (dwarf2_fetch_cfa_info): Update.
5196         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
5197         rather than a pointer.  Update code.
5198         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5199         dtor.
5200         <data_align, code_align, retaddr_column>: Change them to const.
5201         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5202         to bool.
5203
5204 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5205
5206         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5207         <loc.exp>: New field.
5208         * dwarf2-frame.c (execute_cfa_program): Update.
5209         (dwarf2_frame_prev_register): Update.
5210
5211 2017-08-10  Pedro Alves  <palves@redhat.com>
5212
5213         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5214
5215 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5216
5217         * fbsd-nat.c (struct fbsd_fork_info): Remove.
5218         (fbsd_pending_children): Use std::list.
5219         (fbsd_remember_child): Likewise.
5220         (fbsd_is_child_pending): Likewise.
5221         (fbsd_pending_vfork_done): Use std::forward_list.
5222         (fbsd_add_vfork_done): Likewise.
5223         (fbsd_is_vfork_done_pending): Likewise.
5224         (fbsd_next_vfork_done): Likewise.
5225
5226 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5227
5228         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5229         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5230         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5231         for `mapfilename'.
5232         (fbsd_xfer_partial): Use gdb::byte_vector.
5233         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
5234
5235 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5236
5237         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5238         "filestuff.h".
5239         (fbsd_find_memory_regions): Fix `mapfile' initialization.
5240
5241 2017-08-09  Tom Tromey  <tom@tromey.com>
5242
5243         * skip.c (skiplist_entry): New constructor.
5244         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5245         (skiplist_entry::file_is_glob): Now bool.
5246         (skiplist_entry::file, skiplist_entry::function): Now
5247         std::string.
5248         (make_skip_entry): Return a unique_ptr.  Use new.
5249         (free_skiplist_entry, free_skiplist_entry_cleanup)
5250         (make_free_skiplist_entry_cleanup): Remove.
5251         (skip_command, skip_disable_command, add_skiplist_entry)
5252         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5253         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5254         (function_name_is_marked_for_skip): Update.
5255         (skip_delete_command): Update.  Use delete.
5256
5257 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
5258
5259         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5260         (aarch64_linux_core_read_description): New function.
5261         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5262
5263 2017-08-09  Pedro Alves  <palves@redhat.com>
5264
5265         * cp-name-parser.y (cp_comp_to_string): Return a
5266         gdb::unique_xmalloc_ptr<char>.
5267         * cp-support.c (replace_typedefs_qualified_name)
5268         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5269         (cp_canonicalize_string_full): Use op= instead of explicit
5270         convertion.
5271         (cp_class_name_from_physname, method_name_from_physname)
5272         (cp_func_name, cp_remove_params): Adjust to use
5273         gdb::unique_xmalloc_ptr<char>.
5274         * cp-support.h (cp_comp_to_string): Return a
5275         gdb::unique_xmalloc_ptr<char>.
5276         * python/py-type.c (typy_lookup_type): Adjust to use
5277         gdb::unique_xmalloc_ptr<char>.
5278
5279 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
5280
5281         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5282
5283 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
5284             Yao Qi  <yao.qi@linaro.org>
5285
5286         * cp-support.c (cp_canonicalize_string_full): Use
5287         gdb::unique_xmalloc_ptr<char>.
5288         (cp_canonicalize_string): Likewise.
5289
5290 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5291
5292         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5293         * regformats/i386/amd64-avx-avx512.dat: Remove.
5294         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5295         * regformats/i386/amd64-avx-mpx.dat:Remove.
5296         * regformats/i386/amd64-avx.dat: Remove.
5297         * regformats/i386/amd64-mpx.dat: Remove.
5298         * regformats/i386/i386-avx-avx512.dat: Remove.
5299         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5300         * regformats/i386/i386-avx-mpx.dat: Remove.
5301         * regformats/i386/i386-mmx.dat: Remove.
5302         * regformats/i386/i386-mpx.dat: Remove.
5303
5304 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5305
5306         * amd64-tdep.h (tdesc_x32): Remove the declaration.
5307         * amd64-tdep.c: Don't include features/i386/x32*.c.
5308         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5309         functions.
5310         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5311         and i386/x32-avx-avx512.
5312         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5313         and i386/x32.xml.
5314         * features/i386/x32-avx-avx512.c: Removed.
5315         * features/i386/x32-avx-avx512.xml: Removed.
5316         * features/i386/x32-avx.c: Removed.
5317         * features/i386/x32-avx.xml: Removed.
5318         * features/i386/x32.c: Removed.
5319         * features/i386/x32.xml: Removed.
5320         * regformats/i386/x32-avx-avx512.dat: Removed.
5321         * regformats/i386/x32-avx.dat: Removed.
5322         * regformats/i386/x32.dat: Removed.
5323
5324 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5325
5326         PR breakpoints/21886
5327         * mem-break.c (default_memory_insert_breakpoint): Use
5328         `->placed_address' rather than `->reqstd_address' for the
5329         breakpoint location.
5330
5331 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5332
5333         * arch-utils.c (default_print_insn): Remove arch/mach/endian
5334         assertions.
5335
5336 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5337
5338         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
5339         a union of `tdep_info', `tdesc_data' and `id'.
5340         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5341         rather than `info.tdep_info'.
5342         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5343         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5344         * i386-tdep.c (i386_gdbarch_init): Likewise.
5345         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5346         * mips-tdep.c (mips_gdbarch_init): Likewise.
5347         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5348         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5349         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5350         `info.tdep_info'.
5351         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5352         `info.tdep_info'.
5353         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5354         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5355         `info.tdep_info'.
5356         * spu-tdep.c (spu_gdbarch_init): Likewise.
5357         * gdbarch.h: Regenerate.
5358
5359 2017-08-07  Leszek Swirski  <leszeks@google.com>
5360
5361         PR symtab/20899
5362         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5363
5364 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5365
5366         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5367         (gdbsim_open): Rename gdb_argv args object to argv.
5368
5369 2017-08-05  Tom Tromey  <tom@tromey.com>
5370
5371         * compile/compile-object-load.c (compile_object_load): Use
5372         gdb::unique_xmalloc_ptr.
5373         * cli/cli-dump.c (scan_filename): Rename from
5374         scan_filename_with_cleanup.  Change return type.
5375         (scan_expression): Rename from scan_expression_with_cleanup.
5376         Change return type.
5377         (dump_memory_to_file, dump_value_to_file, restore_command):
5378         Use gdb::unique_xmalloc_ptr.  Update.
5379         * cli/cli-cmds.c (find_and_open_script): Use
5380         gdb::unique_xmalloc_ptr.
5381         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5382         * symmisc.c (maintenance_print_symbols)
5383         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5384         * symfile.c (symfile_bfd_open, generic_load)
5385         (add_symbol_file_command, remove_symbol_file_command): Use
5386         gdb::unique_xmalloc_ptr.
5387         * source.c (openp): Use gdb::unique_xmalloc_ptr.
5388         * psymtab.c (maintenance_print_psymbols): Use
5389         gdb::unique_xmalloc_ptr.
5390         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5391         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5392         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5393         (reload_shared_libraries_1): Likewise.
5394
5395 2017-08-05  Tom Tromey  <tom@tromey.com>
5396
5397         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5398         (rust_op_vector, rust_set_vector): New typedefs.
5399         (current_parser): New global.
5400         (work_obstack): Change to pointer type.  Update all users.
5401         (rust_ast, pstate): Remove globals.
5402         (struct rust_parser): New.
5403         (%union) <params, field_inits>: Change type.
5404         (start, tuple_expr, unit_expr, struct_expr_list, literal)
5405         (field_expr, expr_list, maybe_expr_list, type_list): Update.
5406         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5407         (convert_params_to_types, convert_params_to_expression): Change
5408         type of "params".
5409         (ast_string): Change type of "fields".
5410         (rust_parse): Make a rust_parser.  Remove cleanups.
5411         (rust_lex_tests): Make and install an auto_obstack.
5412
5413 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5414
5415         * configure.srv (ipa_x32_linux_regobj): New.
5416         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
5417         instead of X86_TDESC_AVX512.
5418         (initialize_low_tracepoint): Call
5419         init_registers_x32_avx_avx512_linux.
5420
5421 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5422
5423         * utils.h (gdb_argv): Add namespace std for nullptr_t.
5424
5425 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5426
5427         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
5428
5429 2017-08-03  Tom Tromey  <tom@tromey.com>
5430
5431         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
5432         Remove.
5433         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
5434
5435 2017-08-03  Tom Tromey  <tom@tromey.com>
5436
5437         * python/py-param.c (compute_enum_values): Use gdb_argv.
5438
5439 2017-08-03  Tom Tromey  <tom@tromey.com>
5440
5441         * utils.h (struct gdb_argv_deleter): New.
5442         (gdb_argv): New class.
5443         * utils.c (gdb_argv::reset): New method.
5444         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
5445         * tracefile.c (tsave_command): Use gdb_argv.
5446         * top.c (new_ui_command): Use gdb_argv.
5447         * symmisc.c (maintenance_print_symbols)
5448         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
5449         * symfile.c (symbol_file_command, generic_load)
5450         (remove_symbol_file_command): Use gdb_argv.
5451         * stack.c (backtrace_command): Use gdb_argv.
5452         * source.c (add_path, show_substitute_path_command)
5453         (unset_substitute_path_command, set_substitute_path_command):
5454         Use gdb_argv.
5455         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
5456         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
5457         * remote.c (extended_remote_run, remote_put_command)
5458         (remote_get_command, remote_delete_command): Use gdb_argv.
5459         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
5460         (gdbsim_open): Use gdb_argv.
5461         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
5462         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
5463         * procfs.c (procfs_info_proc): Use gdb_argv.
5464         * interps.c (interpreter_exec_cmd): Use gdb_argv.
5465         * infrun.c (handle_command): Use gdb_argv.
5466         * inferior.c (add_inferior_command, clone_inferior_command):
5467         Use gdb_argv.
5468         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
5469         * exec.c (exec_file_command): Use gdb_argv.
5470         * cli/cli-cmds.c (alias_command): Use gdb_argv.
5471         * compile/compile.c (build_argc_argv): Use gdb_argv.
5472
5473 2017-08-03  Tom Tromey  <tom@tromey.com>
5474
5475         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
5476
5477 2017-08-03  Tom Tromey  <tom@tromey.com>
5478
5479         * python/python.c (compute_python_string): Return std::string.
5480         (gdbpy_eval_from_control_command): Update.
5481         (do_start_initialization): Use std::string.
5482         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
5483         xstrprintf.
5484         * python/py-breakpoint.c (local_setattro): Use string_printf, not
5485         xstrprintf.
5486
5487 2017-08-03  Tom Tromey  <tom@tromey.com>
5488
5489         * top.h (do_restore_instream_cleanup): Remove.
5490         * top.c (do_restore_instream_cleanup): Remove.
5491         (read_command_file): Use scoped_restore.
5492         * cli/cli-script.c (execute_user_command): Use scoped_restore.
5493
5494 2017-08-03  Tom Tromey  <tom@tromey.com>
5495
5496         * cli/cli-script.c (execute_user_command)
5497         (execute_control_command): Use scoped_restore.
5498
5499 2017-08-03  Tom Tromey  <tom@tromey.com>
5500
5501         * cli/cli-script.c (do_restore_user_call_depth): Remove.
5502         (execute_user_command): Remove user_call_depth; use
5503         user_args_stack's size instead.
5504
5505 2017-08-03  Tom Tromey  <tom@tromey.com>
5506
5507         * top.h (in_user_command): Remove.
5508         * top.c (in_user_command): Remove.
5509         * cli/cli-script.c (do_restore_user_call_depth)
5510         (execute_user_command): Update.
5511
5512 2017-08-03  Tom Tromey  <tom@tromey.com>
5513
5514         * valops.c (search_struct_method): Use gdb::byte_vector.
5515         * valarith.c (value_concat): Use std::vector.
5516         * target.c (memory_xfer_partial): Use gdb::byte_vector.
5517         (simple_search_memory): Likewise.
5518         * printcmd.c (find_string_backward): Use gdb::byte_vector.
5519         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
5520         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
5521         * elfread.c (elf_rel_plt_read): Use std::string.
5522         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
5523         * cli/cli-dump.c (restore_section_callback): Use
5524         gdb::byte_vector.
5525
5526 2017-08-03  Tom Tromey  <tom@tromey.com>
5527
5528         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
5529
5530 2017-08-03  Tom Tromey  <tom@tromey.com>
5531
5532         * tui/tui-regs.c (tui_restore_gdbout): Remove.
5533         (tui_register_format): Use scoped_restore.
5534
5535 2017-08-03  Tom Tromey  <tom@tromey.com>
5536
5537         * reverse.c (exec_direction_default): Remove.
5538         (exec_reverse_once): Use scoped_restore.
5539         * remote.c (restore_remote_timeout): Remove.
5540         (remote_flash_erase, remote_flash_write, remote_flash_done)
5541         (readchar, remote_serial_write): Use scoped_restore.
5542         * cli/cli-script.c (struct source_cleanup_lines_args)
5543         (source_cleanup_lines): Remove.
5544         (script_from_file): Use scoped_restore.
5545         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
5546         (source_command): Use scoped_restore.
5547
5548 2017-08-03  Tom Tromey  <tom@tromey.com>
5549
5550         * utils.h (make_cleanup_free_so): Remove.
5551         * utils.c (do_free_so, make_cleanup_free_so): Remove.
5552         * solist.h (struct so_deleter): New.
5553         (so_list_up): New typedef.
5554         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
5555
5556 2017-08-03  Tom Tromey  <tom@tromey.com>
5557
5558         * utils.h (make_cleanup_restore_current_language): Remove.
5559         * utils.c (do_restore_current_language)
5560         (make_cleanup_restore_current_language): Remove.
5561         * parse.c (parse_exp_in_context_1)
5562         (parse_expression_with_language): Use
5563         scoped_restore_current_language.
5564         * mi/mi-main.c (mi_cmd_execute): Use
5565         scoped_restore_current_language.
5566         * language.h (scoped_restore_current_language): New class.
5567
5568 2017-08-03  Tom Tromey  <tom@tromey.com>
5569
5570         * compile/compile.c (cleanup_unlink_file): Remove.
5571         (compile_to_object): Use gdb::unlinker.
5572         (eval_compile_command): Likewise.
5573
5574 2017-08-03  Tom Tromey  <tom@tromey.com>
5575
5576         * utils.h (make_cleanup_fclose): Remove.
5577         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
5578
5579 2017-08-03  Tom Tromey  <tom@tromey.com>
5580
5581         * top.c (open_terminal_stream): Return gdb_file_up.
5582         (new_ui_command): Update.
5583
5584 2017-08-03  Tom Tromey  <tom@tromey.com>
5585
5586         * source.c (print_source_lines_base, forward_search_command)
5587         (reverse_search_command): Use gdb_file_up.
5588
5589 2017-08-03  Tom Tromey  <tom@tromey.com>
5590
5591         * fbsd-nat.c (fbsd_find_memory_regions): Update.
5592
5593 2017-08-03  Tom Tromey  <tom@tromey.com>
5594
5595         * cli/cli-cmds.c (find_and_open_script): Change return type.
5596         Remove "streamp" and "full_path" parameters.
5597         (source_script_with_search): Update.
5598         * auto-load.c (source_script_file): Update.
5599         * cli/cli-cmds.h (find_and_open_script): Change type.
5600         (open_script): New struct.
5601
5602 2017-08-03  Tom Tromey  <tom@tromey.com>
5603
5604         * xml-support.c (xml_fetch_content_from_file): Update.
5605         * ui-file.c (stdio_file::open): Update.
5606         * tracefile-tfile.c (tfile_start): Update.
5607         * remote.c (remote_file_put, remote_file_get): Update.
5608         * nat/linux-procfs.c (linux_proc_get_int)
5609         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
5610         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
5611         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
5612         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
5613         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
5614         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
5615         * linux-nat.c (linux_proc_pending_signals): Update.
5616         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
5617         (file_closer): Remove.
5618         * compile/compile.c (compile_to_object): Update.
5619         * common/filestuff.h (struct gdb_file_deleter): New.
5620         (gdb_file_up): New typedef.
5621         (gdb_fopen_cloexec): Change return type.
5622         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
5623         * cli/cli-dump.c (fopen_with_cleanup): Remove.
5624         (dump_binary_file, restore_binary_file): Update.
5625         * auto-load.c (auto_load_objfile_script_1): Update.
5626
5627 2017-08-03  Tom Tromey  <tom@tromey.com>
5628
5629         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
5630         (info_static_tracepoint_markers_command): Likewise.
5631         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
5632         * skip.c (skip_info): Use ui_out_emit_table.
5633         * progspace.c (print_program_space): Use ui_out_emit_table.
5634         * osdata.c (info_osdata): Use ui_out_emit_table.
5635         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
5636         ui_out_emit_table.
5637         * linux-thread-db.c (info_auto_load_libthread_db): Use
5638         ui_out_emit_table.
5639         * inferior.c (print_inferior): Use ui_out_emit_table.
5640         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
5641         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
5642         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
5643         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
5644         * ui-out.h (class ui_out_emit_table): New.
5645
5646 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
5647
5648         * mips-tdep.c (mips_fpu_type_str): New function.
5649         (mips_dump_tdep): Call it.
5650
5651 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
5652
5653         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
5654         `->mips_fpu_type'.
5655
5656 2017-07-31  Xavier Roirand  <roirand@adacore.com>
5657
5658         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
5659
5660 2017-07-27  Xavier Roirand  <roirand@adacore.com>
5661
5662         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
5663
5664 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5665
5666         * cli/cli-cmds.c (maintenancechecklist): New variable.
5667         * gdbcmd.h (maintenancechecklist): Declare it.
5668         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
5669         Call i386_linux_read_description with different masks.
5670         * maint.c (maintenance_check_command): New function.
5671         (_initialize_maint_cmds): Call add_prefix_cmd.
5672         * target-descriptions.c (tdesc_reg): override operator != and ==.
5673         (tdesc_type): Likewise.
5674         (tdesc_feature): Likewise.
5675         (target_desc): Likewise.
5676         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
5677         (maintenance_check_xml_descriptions): New function.
5678         (_initialize_target_descriptions) Add command "xml-descriptions".
5679         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
5680
5681 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5682
5683         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
5684         Include features/i386/32bit-*.c.
5685         (i386_linux_read_description): Generate target description if it
5686         doesn't exist.
5687         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
5688         functions.
5689         * features/i386/32bit-linux.c: Re-generated.
5690         * features/i386/32bit-sse.c: Likewise.
5691         * target-descriptions.c (print_c_feature::visit): Print code to
5692         set register number if needed.
5693         (print_c_feature) <m_next_regnum>: New field.
5694
5695 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5696
5697         * features/Makefile (CFILES): Rename with TDESC_CFILES.
5698         (FEATURE_XMLFILES): New.
5699         (FEATURE_CFILES): New.
5700         New rules.
5701         (clean-cfiles): Remove generated c files.
5702         * features/i386/32bit-avx.c: Generated.
5703         * features/i386/32bit-avx512.c: Generated.
5704         * features/i386/32bit-core.c: Generated.
5705         * features/i386/32bit-linux.c: Generated.
5706         * features/i386/32bit-mpx.c: Generated.
5707         * features/i386/32bit-pkeys.c: Generated.
5708         * features/i386/32bit-sse.c: Generated.
5709         * target-descriptions.c: Include algorithm.
5710         (tdesc_element_visitor): Add method visit_end.
5711         (print_c_tdesc): Implement visit_end.
5712         (print_c_tdesc:: m_filename_after_features): Move it to
5713         protected.
5714         (print_c_feature): New class.
5715         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
5716         name starts with "i386/32bit-".
5717
5718 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5719
5720         * target-descriptions.c (tdesc_element_visitor): New class.
5721         (tdesc_element): New class.
5722         (tdesc_reg): Inherit from tdesc_element.
5723         (tdesc_reg::accept): New function.
5724         (tdesc_type): Inherit from tdesc_element.
5725         (tdesc_type::accept): New function.
5726         (tdesc_feature): Inherit from tdesc_element.
5727         (tdesc_feature::accept): New function.
5728         (target_desc): Inherit from tdesc_element.
5729         (target_desc::target_desc): New.
5730         (target_desc::~target_desc): New.
5731         (target_desc::accept): New.
5732         (allocate_target_description): Use new.
5733         (free_target_description): Use delete.
5734         (print_c_tdesc): New class.
5735         (maint_print_c_tdesc_cmd): Adjust.
5736
5737         * features/aarch64.c: Re-generated.
5738         * features/arc-arcompact.c: Re-generated.
5739         * features/arc-v2.c: Re-generated.
5740         * features/arm/arm-with-iwmmxt.c: Re-generated.
5741         * features/arm/arm-with-m.c: Re-generated.
5742         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
5743         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
5744         * features/arm/arm-with-neon.c: Re-generated.
5745         * features/arm/arm-with-vfpv2.c: Re-generated.
5746         * features/arm/arm-with-vfpv3.c: Re-generated.
5747         * features/i386/amd64-avx-avx512.c: Re-generated.
5748         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5749         * features/i386/amd64-avx.c: Re-generated.
5750         * features/i386/amd64-avx-linux.c: Re-generated.
5751         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
5752         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5753         * features/i386/amd64-avx-mpx.c: Re-generated.
5754         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
5755         * features/i386/amd64.c: Re-generated.
5756         * features/i386/amd64-linux.c: Re-generated.
5757         * features/i386/amd64-mpx.c: Re-generated.
5758         * features/i386/amd64-mpx-linux.c: Re-generated.
5759         * features/i386/i386-avx-avx512.c: Re-generated.
5760         * features/i386/i386-avx-avx512-linux.c: Re-generated.
5761         * features/i386/i386-avx.c: Re-generated.
5762         * features/i386/i386-avx-linux.c: Re-generated.
5763         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
5764         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
5765         * features/i386/i386-avx-mpx.c: Re-generated.
5766         * features/i386/i386-avx-mpx-linux.c: Re-generated.
5767         * features/i386/i386.c: Re-generated.
5768         * features/i386/i386-linux.c: Re-generated.
5769         * features/i386/i386-mmx.c: Re-generated.
5770         * features/i386/i386-mmx-linux.c: Re-generated.
5771         * features/i386/i386-mpx.c: Re-generated.
5772         * features/i386/i386-mpx-linux.c: Re-generated.
5773         * features/i386/x32-avx-avx512.c: Re-generated.
5774         * features/i386/x32-avx-avx512-linux.c: Re-generated.
5775         * features/i386/x32-avx.c: Re-generated.
5776         * features/i386/x32-avx-linux.c: Re-generated.
5777         * features/i386/x32.c: Re-generated.
5778         * features/i386/x32-linux.c: Re-generated.
5779         * features/microblaze.c: Re-generated.
5780         * features/microblaze-with-stack-protect.c: Re-generated.
5781         * features/mips64-dsp-linux.c: Re-generated.
5782         * features/mips64-linux.c: Re-generated.
5783         * features/mips-dsp-linux.c: Re-generated.
5784         * features/mips-linux.c: Re-generated.
5785         * features/nds32.c: Re-generated.
5786         * features/nios2.c: Re-generated.
5787         * features/nios2-linux.c: Re-generated.
5788         * features/rs6000/powerpc-32.c: Re-generated.
5789         * features/rs6000/powerpc-32l.c: Re-generated.
5790         * features/rs6000/powerpc-403.c: Re-generated.
5791         * features/rs6000/powerpc-403gc.c : Re-generated.
5792         * features/rs6000/powerpc-405.c: Re-generated.
5793         * features/rs6000/powerpc-505.c: Re-generated.
5794         * features/rs6000/powerpc-601.c: Re-generated.
5795         * features/rs6000/powerpc-602.c: Re-generated.
5796         * features/rs6000/powerpc-603.c: Re-generated.
5797         * features/rs6000/powerpc-604.c: Re-generated.
5798         * features/rs6000/powerpc-64.c: Re-generated.
5799         * features/rs6000/powerpc-64l.c: Re-generated.
5800         * features/rs6000/powerpc-7400.c: Re-generated.
5801         * features/rs6000/powerpc-750.c: Re-generated.
5802         * features/rs6000/powerpc-860.c: Re-generated.
5803         * features/rs6000/powerpc-altivec32.c: Re-generated.
5804         * features/rs6000/powerpc-altivec32l.c: Re-generated.
5805         * features/rs6000/powerpc-altivec64.c: Re-generated.
5806         * features/rs6000/powerpc-altivec64l.c: Re-generated.
5807         * features/rs6000/powerpc-cell32l.c: Re-generated.
5808         * features/rs6000/powerpc-cell64l.c: Re-generated.
5809         * features/rs6000/powerpc-e500.c: Re-generated.
5810         * features/rs6000/powerpc-e500l.c: Re-generated.
5811         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
5812         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
5813         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
5814         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
5815         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
5816         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
5817         * features/rs6000/powerpc-vsx32.c: Re-generated.
5818         * features/rs6000/powerpc-vsx32l.c: Re-generated.
5819         * features/rs6000/powerpc-vsx64.c: Re-generated.
5820         * features/rs6000/powerpc-vsx64l.c: Re-generated.
5821         * features/rs6000/rs6000.c: Re-generated.
5822         * features/s390-linux32.c: Re-generated.
5823         * features/s390-linux32v1.c: Re-generated.
5824         * features/s390-linux32v2.c: Re-generated.
5825         * features/s390-linux64.c: Re-generated.
5826         * features/s390-linux64v1.c: Re-generated.
5827         * features/s390-linux64v2.c: Re-generated.
5828         * features/s390-te-linux64.c: Re-generated.
5829         * features/s390-tevx-linux64.c: Re-generated.
5830         * features/s390-vx-linux64.c: Re-generated.
5831         * features/s390x-linux64.c: Re-generated.
5832         * features/s390x-linux64v1.c: Re-generated.
5833         * features/s390x-linux64v2.c: Re-generated.
5834         * features/s390x-te-linux64.c: Re-generated.
5835         * features/s390x-tevx-linux64.c: Re-generated.
5836         * features/s390x-vx-linux64.c: Re-generated.
5837         * features/sparc/sparc32-solaris.c: Re-generated.
5838         * features/sparc/sparc64-solaris.c: Re-generated.
5839         * features/tic6x-c62x.c: Re-generated.
5840         * features/tic6x-c62x-linux.c: Re-generated.
5841         * features/tic6x-c64x.c: Re-generated.
5842         * features/tic6x-c64x-linux.c: Re-generated.
5843         * features/tic6x-c64xp.c: Re-generated.
5844         * features/tic6x-c64xp-linux.c: Re-generated.
5845
5846 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5847
5848         * i386-linux-tdep.c (i386_linux_read_description): New function.
5849         (i386_linux_core_read_description): Call
5850         i386_linux_read_description.
5851         * i386-linux-tdep.h (i386_linux_read_description): Declare.
5852         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
5853         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
5854         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
5855         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
5856         * x86-linux-nat.c (x86_linux_read_description): Call
5857         i386_linux_read_description.
5858
5859 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5860
5861         * NEWS: Mention it.
5862         * features/Makefile (%.c: %.xml): Pass the xml file name to
5863         command "maint print c-tdesc".
5864         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
5865         name from 'arg'.
5866
5867 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5868
5869         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
5870         in-class initialization.
5871         (tdesc_create_feature): Call new instead of XCNEW.
5872         (free_target_description): Ue delete.
5873
5874 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
5875
5876         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
5877
5878 2017-07-25  Yao Qi  <yao.qi@linaro.org>
5879
5880         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
5881         constant.
5882         (amd64_x32_init_abi): Likewise.
5883         * amd64-tdep.h (amd64_init_abi): Update declaration.
5884         (amd64_x32_init_abi): Likewise.
5885
5886 2017-07-25  Yao Qi  <yao.qi@linaro.org>
5887
5888         PR tdep/21717
5889         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
5890         condition for FPSCR.
5891         (arm_linux_store_inferior_registers): Likewise.
5892
5893 2017-07-22  Tom Tromey  <tom@tromey.com>
5894
5895         * break-catch-syscall.c (struct catch_syscall_inferior_data)
5896         <syscalls_counts>: Now a std::vector.
5897         (get_catch_syscall_inferior_data): Use "new".
5898         (catch_syscall_inferior_data_cleanup): Use "delete".
5899         (insert_catch_syscall, remove_catch_syscall)
5900         (clear_syscall_counts): Update.
5901
5902 2017-07-22  Tom Tromey  <tom@tromey.com>
5903
5904         * break-catch-syscall.c (syscall_catchpoint)
5905         <syscalls_to_be_caught>: Now a std::vector<int>
5906         (~syscall_catchpoint): Remove.
5907         (insert_catch_syscall, remove_catch_syscall)
5908         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
5909         (print_mention_catch_syscall, print_recreate_catch_syscall):
5910         Update.
5911         (create_syscall_event_catchpoint): Change type of "filter"
5912         parameter.
5913         (catch_syscall_split_args): Return a std::vector.
5914         (catch_syscall_command_1, catching_syscall_number_1): Update.
5915
5916 2017-07-22  Tom Tromey  <tom@tromey.com>
5917
5918         * break-catch-throw.c (struct exception_catchpoint)
5919         <exception_rx>: Now a std::string.
5920         (~exception_catchpoint): Remove.
5921         (print_one_detail_exception_catchpoint): Update.
5922         (handle_gnu_v3_exceptions): Change type of except_rx.
5923         (extract_exception_regexp): Return a std::string.
5924         (catch_exception_command_1): Update.
5925
5926 2017-07-22  Tom Tromey  <tom@tromey.com>
5927
5928         * break-catch-sig.c (gdb_signal_type): Remove typedef.
5929         (struct signal_catchpoint) <signals_to_be_caught>: Now a
5930         std::vector.
5931         <catch_all>: Now a bool.
5932         (~signal_catchpoint): Remove.
5933         (signal_catchpoint_insert_location)
5934         (signal_catchpoint_remove_location)
5935         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
5936         (signal_catchpoint_print_mention)
5937         (signal_catchpoint_print_recreate)
5938         (signal_catchpoint_explains_signal): Update.
5939         (create_signal_catchpoint): Change type of "filter" and
5940         "catch_all".
5941         (catch_signal_split_args): Return a std::vector.  Change type of
5942         "catch_all".
5943         (catch_signal_command): Update.
5944
5945 2017-07-20  Pedro Alves  <palves@redhat.com>
5946
5947         * ada-lang.c (ada_language_defn): Make extern.
5948         (_initialize_ada_language): Remove add_language call.
5949         * c-lang.c (c_language_defn, cplus_language_defn)
5950         (asm_language_defn, minimal_language_defn): Make extern.
5951         (_initialize_c_language): Delete.
5952         * completer.c (compare_cstrings): Delete, moved to utils.h.
5953         * d-lang.c (d_language_defn): Make extern.
5954         (_initialize_d_language): Remove add_language calls.
5955         * defs.h (enum language): Add comment.
5956         * f-lang.c (f_language_defn): Make extern.
5957         (_initialize_f_language): Remove add_language call.
5958         * go-lang.c (go_language_defn): Make extern.
5959         (_initialize_go_language): Remove add_language call.
5960         * language.c: Include <algorithm>.
5961         (languages): Redefine as const array.
5962         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
5963         (set_language_command): Handle "local".  Use for-range loop.
5964         (set_language): Remove loop.
5965         (language_enum): Rewrite.
5966         (language_def, language_str): Remove loops.
5967         (add_language): Delete.
5968         (add_set_language_command): New, based on add_languages.
5969         (skip_language_trampoline): Adjust.
5970         (local_language_defn): Delete.
5971         (language_gdbarch_post_init): Adjust.
5972         (_initialize_language): Remove add_language calls.  Call
5973         add_set_language_command.
5974         * language.h (add_language): Delete.
5975         (auto_language_defn)
5976         (unknown_language_defn, minimal_language_defn, ada_language_defn)
5977         (asm_language_defn, c_language_defn, cplus_language_defn)
5978         (d_language_defn, f_language_defn, go_language_defn)
5979         (m2_language_defn, objc_language_defn, opencl_language_defn)
5980         (pascal_language_defn, rust_language_defn): Declare.
5981         * m2-lang.c (m2_language_defn): Make extern.
5982         (_initialize_m2_language): Remove add_language call.
5983         * objc-lang.c (objc_language_defn): Make extern.
5984         (_initialize_objc_language): Remove add_language call.
5985         * opencl-lang.c (opencl_language_defn): Make extern.
5986         (_initialize_opencl_language): Remove add_language call.
5987         * p-lang.c (pascal_language_defn): Make extern.
5988         (_initialize_pascal_language): Delete.
5989         * rust-lang.c (rust_language_defn): Make extern.
5990         (_initialize_rust_language): Delete.
5991         * utils.h (compare_cstrings): New static inline function.
5992
5993 2017-07-20  Pedro Alves  <palves@redhat.com>
5994
5995         * ada-lang.c (ada_to_fixed_type_1): Adjust.
5996         (get_var_value): Constify parameters.
5997         (get_int_var_value): Change prototype.
5998         (to_fixed_range_type): Adjust.
5999         * ada-lang.h (get_int_var_value): Change prototype.
6000
6001 2017-07-20  Pedro Alves  <palves@redhat.com>
6002
6003         * dwarf2read.c (dw2_lookup_symbol): Use
6004         SYMBOL_MATCHES_SEARCH_NAME.
6005         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6006
6007 2017-07-20  Pedro Alves  <palves@redhat.com>
6008
6009         * block.c (block_iter_name_step, block_iter_name_first)
6010         (block_iter_name_next): Delete.
6011         (block_lookup_symbol_primary): Adjust to use
6012         dict_iter_match_first/dict_iter_match_next.
6013         * block.h (block_iter_name_first, block_iter_name_next): Delete
6014         declarations.
6015         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6016         dict_iter_match_first/dict_iter_match_next.
6017
6018 2017-07-20  Pedro Alves  <palves@redhat.com>
6019
6020         * cp-support.c (cp_find_first_component_aux): Add missing case for
6021         end of string.
6022
6023 2017-07-18  David Blaikie  <dblaikie@gmail.com>
6024
6025         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6026         of dwo_cu's dwo_file.
6027
6028 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6029
6030         * remote.c (store_registers_using_G): Remove one line comment.
6031
6032 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6033
6034         * regcache.c (regcache_cpy): Simplify it.
6035         (regcache::cpy_no_passthrough): Remove it.
6036         * regcache.h (cpy_no_passthrough): Remove it.
6037         (regcache_dup, regcache_cpy): Update comments.
6038
6039 2017-07-18  Pedro Alves  <palves@redhat.com>
6040
6041         * remote-sim.c (sim_command_completer): Adjust to work with a
6042         completion_tracker instead of a VEC.
6043
6044 2017-07-17  Pedro Alves  <palves@redhat.com>
6045
6046         * completer.c (complete_source_filenames): New function.
6047         (complete_address_and_linespec_locations): New function.
6048         (location_completer): Use complete_address_and_linespec_locations.
6049         (completion_tracker::build_completion_result): Honor the tracker's
6050         request to suppress append.
6051         * completer.h (completion_tracker::suppress_append_ws)
6052         (completion_tracker::set_suppress_append_ws): New methods.
6053         (completion_tracker::m_suppress_append_ws): New field.
6054         (complete_source_filenames): New declaration.
6055         * linespec.c (linespec_complete_what): New.
6056         (struct ls_parser) <complete_what, completion_word,
6057         completion_quote_char, completion_quote_end, completion_tracker>:
6058         New fields.
6059         (string_find_incomplete_keyword_at_end): New.
6060         (linespec_lexer_lex_string): Record quote char.  If in completion
6061         mode, don't throw.
6062         (linespec_lexer_consume_token): Advance the completion word point.
6063         (linespec_lexer_peek_token): Save/restore completion info.
6064         (save_stream_and_consume_token): New.
6065         (set_completion_after_number): New.
6066         (linespec_parse_basic): Set what to complete next depending on
6067         token.  Handle function and label completions specially.
6068         (parse_linespec): Disable objc shortcut in completion mode.  Set
6069         what to complete next depending on token type.  Skip keyword if in
6070         completion mode.
6071         (complete_linespec_component, linespec_complete): New.
6072         * linespec.h (linespec_complete): Declare.
6073
6074 2017-07-17  Pedro Alves  <palves@redhat.com>
6075
6076         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6077         Handle 'operator<' / 'operator<<'.
6078
6079 2017-07-17  Pedro Alves  <palves@redhat.com>
6080
6081         * completer.c (collect_explicit_location_matches): Handle
6082         MATCH_LABEL.
6083         (convert_explicit_location_to_linespec): New, factored out from
6084         ...
6085         (convert_explicit_location_to_sals): ... this.
6086         (complete_label): New.
6087         (linespec_complete_label, find_label_symbols_in_block): New.
6088         (find_label_symbols): Add completion_mode parameter and adjust to
6089         call find_label_symbols_in_block.
6090         * linespec.h (linespec_complete_label): Declare.
6091
6092 2017-07-17  Pedro Alves  <palves@redhat.com>
6093
6094         * ada-lang.c (ada_collect_symbol_completion_matches): Add
6095         complete_symbol_mode parameter.
6096         * cli/cli-cmds.c (complete_command): Get the completion result out
6097         of the handle_brkchars tracker if used a custom word point.
6098         * completer.c: Include "linespec.h".
6099         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6100         (advance_to_expression_complete_word_point): New.
6101         (completion_tracker::completes_to_completion_word): New.
6102         (complete_files_symbols): Pass down
6103         complete_symbol_mode::EXPRESSION.
6104         (explicit_options, probe_options): New.
6105         (collect_explicit_location_matches): Complete on the
6106         explictit_loc->foo instead of word.  Use
6107         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
6108         keyword and options completions.
6109         (backup_text_ptr): Delete.
6110         (skip_keyword): New.
6111         (complete_explicit_location): Remove 'word' parameter.  Add
6112         language, quoted_arg_start and quoted_arg_end parameters.
6113         Rewrite, parsing left to right.
6114         (location_completer): Rewrite.
6115         (location_completer_handle_brkchars): New function.
6116         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6117         (enum complete_line_internal_reason): Adjust comments.
6118         (completion_tracker::discard_completions): New.
6119         (completer_handle_brkchars_func_for_completer): Handle
6120         location_completer.
6121         (gdb_custom_word_point_brkchars)
6122         (gdb_org_rl_basic_quote_characters): New.
6123         (gdb_completion_word_break_characters_throw)
6124         (completion_find_completion_word): Handle trackers that use a
6125         custom word point.
6126         (completion_tracker::advance_custom_word_point_by): New.
6127         (completion_tracker::build_completion_result): Don't rely on
6128         readline appending the quote char.
6129         (gdb_rl_attempted_completion_function_throw): Handle trackers that
6130         use a custom word point.
6131         (gdb_rl_attempted_completion_function): Restore
6132         rl_basic_quote_characters.
6133         * completer.h (class completion_tracker): Extend intro comment.
6134         (completion_tracker::set_quote_char)
6135         (completion_tracker::quote_char)
6136         (completion_tracker::set_use_custom_word_point)
6137         (completion_tracker::use_custom_word_point)
6138         (completion_tracker::custom_word_point)
6139         (completion_tracker::set_custom_word_point)
6140         (completion_tracker::advance_custom_word_point_by)
6141         (completion_tracker::completes_to_completion_word)
6142         (completion_tracker::discard_completions): New methods.
6143         (completion_tracker::m_quote_char)
6144         (completion_tracker::m_use_custom_word_point)
6145         (completion_tracker::m_custom_word_point): New fields.
6146         (advance_to_expression_complete_word_point): Declare.
6147         * f-lang.c (f_collect_symbol_completion_matches): Add
6148         complete_symbol_mode parameter.
6149         * language.h (struct language_defn)
6150         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6151         parameter.
6152         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
6153         (linespec_complete_function): New function.
6154         (linespec_lexer_lex_keyword): Adjust.
6155         * linespec.h (linespec_keywords, linespec_complete_function): New
6156         declarations.
6157         * location.c (find_end_quote): New function.
6158         (explicit_location_lex_one): Add explicit_completion_info
6159         parameter.  Save quoting info.  Don't throw if being called for
6160         completion.  Don't handle Ada operators here.
6161         (is_cp_operator, skip_op_false_positives, first_of)
6162         (explicit_location_lex_one_function): New function.
6163         (string_to_explicit_location): Replace 'dont_throw' parameter with
6164         an explicit_completion_info pointer parameter.  Handle it.  Don't
6165         use explicit_location_lex_one to lex function names.  Use
6166         explicit_location_lex_one_function instead.
6167         * location.h (struct explicit_completion_info): New.
6168         (string_to_explicit_location): Replace 'dont_throw' parameter with
6169         an explicit_completion_info pointer parameter.
6170         * symtab.c (default_collect_symbol_completion_matches_break_on):
6171         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
6172         (default_collect_symbol_completion_matches)
6173         (collect_symbol_completion_matches): Add complete_symbol_mode
6174         parameter.
6175         (collect_symbol_completion_matches_type): Pass down
6176         complete_symbol_mode::EXPRESSION.
6177         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6178         parameter.  Handle LINESPEC mode.
6179         * symtab.h (complete_symbol_mode): New.
6180         (default_collect_symbol_completion_matches_break_on)
6181         (default_collect_symbol_completion_matches)
6182         (collect_symbol_completion_matches)
6183         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6184         parameter.
6185
6186 2017-07-17  Pedro Alves  <palves@redhat.com>
6187
6188         * utils.c (enum class strncmp_iw_mode): New.
6189         (strcmp_iw): Rename to ...
6190         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
6191         parameters.  Handle them.
6192         (strncmp_iw): New.
6193         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6194         * utils.h (strncmp_iw): Declare.
6195         (strcmp_iw): Move describing comments here.
6196
6197 2017-07-17  Pedro Alves  <palves@redhat.com>
6198
6199         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6200         CP_OPERATOR_STR.
6201         * c-typeprint.c (is_type_conversion_operator): Use
6202         CP_OPERATOR_STR.
6203         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6204         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6205         CP_OPERATOR_LEN.
6206         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6207         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6208         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6209         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6210         CP_OPERATOR_STR.
6211         * location.c: Include "cp-support.h".
6212         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6213         CP_OPERATOR_STR.
6214         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6215         CP_OPERATOR_LEN.
6216
6217 2017-07-17  Pedro Alves  <palves@redhat.com>
6218
6219         * cli/cli-cmds.c (complete_command): Use a completion tracker
6220         along with completion_find_completion_word for handle_brkchars
6221         phase.
6222         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6223         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6224         (struct gdb_rl_completion_word_info): New.
6225         (gdb_rl_find_completion_word): New.
6226         (completion_find_completion_word): New.
6227         * completer.h (completion_find_completion_word): Declare.
6228
6229 2017-07-17  Pedro Alves  <palves@redhat.com>
6230
6231         * ada-lang.c (symbol_completion_match): Adjust comments.
6232         (symbol_completion_add): Replace vector parameter with
6233         completion_tracker parameter.  Use it.
6234         (ada_make_symbol_completion_list): Rename to...
6235         (ada_collect_symbol_completion_matches): ... this.  Add
6236         completion_tracker parameter and use it.
6237         (ada_language_defn): Adjust.
6238         * break-catch-syscall.c (catch_syscall_completer): Adjust
6239         prototype and work with completion_tracker instead of VEC.
6240         * breakpoint.c (condition_completer): Adjust prototype and work
6241         with completion_tracker instead of VEC.
6242         * c-lang.c (c_language_defn, cplus_language_defn)
6243         (asm_language_defn, minimal_language_defn): Adjust to renames.
6244         * cli/cli-cmds.c (complete_command): Rework using
6245         completion_tracker.  Catch exceptions when completing.
6246         * cli/cli-decode.c (integer_unlimited_completer)
6247         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6248         with completion_tracker instead of VEC.
6249         * command.h (struct completion_tracker): Forward declare.
6250         (completer_ftype, completer_handle_brkchars_ftype): Change
6251         types.
6252         (complete_on_cmdlist, complete_on_enum): Adjust.
6253         * completer.c: Include <algorithm>.
6254         (struct gdb_completer_state): New.
6255         (current_completion): New global.
6256         (readline_line_completion_function): Delete.
6257         (noop_completer, filename_completer)
6258         (filename_completer_handle_brkchars, complete_files_symbols)
6259         (linespec_location_completer): Adjust to work with a
6260         completion_tracker instead of a VEC.
6261         (string_or_empty): New.
6262         (collect_explicit_location_matches): Adjust to work with a
6263         completion_tracker instead of a VEC.
6264         (explicit_location_completer): Rename to ...
6265         (complete_explicit_location): ... this and adjust to work with a
6266         completion_tracker instead of a VEC.
6267         (location_completer): Adjust to work with a completion_tracker
6268         instead of a VEC.
6269         (add_struct_fields): Adjust to work with a completion_list instead
6270         of VEC.
6271         (expression_completer): Rename to ...
6272         (complete_expression): ... this and adjust to work with a
6273         completion_tracker instead of a VEC.  Use complete_files_symbols.
6274         (expression_completer): Reimplement on top of complete_expression.
6275         (symbol_completer): Adjust to work with a completion_tracker
6276         instead of a VEC.
6277         (enum complete_line_internal_reason): Add describing comments.
6278         (complete_line_internal_normal_command): Adjust to work with a
6279         completion_tracker instead of a VEC.
6280         (complete_line_internal): Rename to ...
6281         (complete_line_internal_1): ... this and adjust to work with a
6282         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
6283         handle_brkchars phase.
6284         (new_completion_tracker): Delete.
6285         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6286         complete_line_internal_1.
6287         (free_completion_tracker): Delete.
6288         (INITIAL_COMPLETION_HTAB_SIZE): New.
6289         (completion_tracker::completion_tracker)
6290         (completion_tracker::~completion_tracker): New.
6291         (maybe_add_completion): Delete.
6292         (completion_tracker::maybe_add_completion)
6293         (completion_tracker::add_completion)
6294         (completion_tracker::add_completions): New.
6295         (throw_max_completions_reached_error): Delete.
6296         (complete_line): Adjust to work with a completion_tracker instead
6297         of a VEC.  Don't create a completion_tracker_t or check for max
6298         completions here.
6299         (command_completer, command_completer_handle_brkchars)
6300         (signal_completer, reg_or_group_completer_1)
6301         (reg_or_group_completer, default_completer_handle_brkchars):
6302         Adjust to work with a completion_tracker.
6303         (gdb_completion_word_break_characters_throw): New.
6304         (gdb_completion_word_break_characters): Reimplement.
6305         (line_completion_function): Delete.
6306         (completion_tracker::recompute_lowest_common_denominator)
6307         (expand_preserving_ws)
6308         (completion_tracker::build_completion_result)
6309         (completion_result::completion_result)
6310         (completion_result::completion_result)
6311         (completion_result::~completion_result)
6312         (completion_result::completion_result)
6313         (completion_result::release_match_list, compare_cstrings)
6314         (completion_result::sort_match_list)
6315         (completion_result::reset_match_list)
6316         (gdb_rl_attempted_completion_function_throw)
6317         (gdb_rl_attempted_completion_function): New.
6318         * completer.h (completion_list, struct completion_result)
6319         (class completion_tracker): New.
6320         (complete_line): Add completion_tracker parameter.
6321         (readline_line_completion_function): Delete.
6322         (gdb_rl_attempted_completion_function): New.
6323         (noop_completer, filename_completer, expression_completer)
6324         (location_completer, symbol_completer, command_completer)
6325         (signal_completer, reg_or_group_completer): Update prototypes.
6326         (completion_tracker_t, new_completion_tracker)
6327         (make_cleanup_free_completion_tracker): Delete.
6328         (enum maybe_add_completion_enum): Delete.
6329         (maybe_add_completion): Delete.
6330         (throw_max_completions_reached_error): Delete.
6331         * corefile.c (complete_set_gnutarget): Adjust to work with a
6332         completion_tracker instead of a VEC.
6333         * cp-abi.c (cp_abi_completer): Adjust to work with a
6334         completion_tracker instead of a VEC.
6335         * d-lang.c (d_language_defn): Adjust.
6336         * disasm.c (disassembler_options_completer): Adjust to work with a
6337         completion_tracker instead of a VEC.
6338         * f-lang.c (f_make_symbol_completion_list): Rename to ...
6339         (f_collect_symbol_completion_matches): ... this.  Adjust to work
6340         with a completion_tracker instead of a VEC.
6341         (f_language_defn): Adjust.
6342         * go-lang.c (go_language_defn): Adjust.
6343         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6344         Adjust to work with a completion_tracker instead of a VEC.
6345         * infrun.c (handle_completer): Likewise.
6346         * interps.c (interpreter_completer): Likewise.
6347         * interps.h (interpreter_completer): Likewise.
6348         * language.c (unknown_language_defn, auto_language_defn)
6349         (local_language_defn): Adjust.
6350         * language.h (language_defn::la_make_symbol_completion_list):
6351         Rename to ...
6352         (language_defn::la_collect_symbol_completion_matches): ... this
6353         and adjust to work with a completion_tracker instead of a VEC.
6354         * m2-lang.c (m2_language_defn): Adjust.
6355         * objc-lang.c (objc_language_defn): Adjust.
6356         * opencl-lang.c (opencl_language_defn): Adjust.
6357         * p-lang.c (pascal_language_defn): Adjust.
6358         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6359         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6360         with a completion_tracker.
6361         * rust-lang.c (rust_language_defn): Adjust.
6362         * symtab.c (free_completion_list, do_free_completion_list)
6363         (return_val, completion_tracker): Delete.
6364         (completion_list_add_name, completion_list_add_symbol)
6365         (completion_list_add_msymbol, completion_list_objc_symbol)
6366         (completion_list_add_fields, add_symtab_completions): Add
6367         completion_tracker parameter and use it.
6368         (default_make_symbol_completion_list_break_on_1): Rename to...
6369         (default_collect_symbol_completion_matches_break_on): ... this.
6370         Add completion_tracker parameter and use it instead of allocating
6371         a completion tracker here.
6372         (default_make_symbol_completion_list_break_on): Delete old
6373         implementation.
6374         (default_make_symbol_completion_list): Delete.
6375         (default_collect_symbol_completion_matches): New.
6376         (make_symbol_completion_list): Delete.
6377         (collect_symbol_completion_matches): New.
6378         (make_symbol_completion_type): Rename to ...
6379         (collect_symbol_completion_matches_type): ... this.  Add
6380         completion_tracker parameter and use it instead of VEC.
6381         (make_file_symbol_completion_list_1): Rename to...
6382         (collect_file_symbol_completion_matches): ... this.  Add
6383         completion_tracker parameter and use it instead of VEC.
6384         (make_file_symbol_completion_list): Delete.
6385         (add_filename_to_list): Use completion_list instead of a VEC.
6386         (add_partial_filename_data::list): Now a completion_list.
6387         (make_source_files_completion_list): Work with a completion_list
6388         instead of a VEC.
6389         * symtab.h: Include "completer.h".
6390         (default_make_symbol_completion_list_break_on)
6391         (default_make_symbol_completion_list, make_symbol_completion_list)
6392         (make_symbol_completion_type, make_file_symbol_completion_list)
6393         (make_source_files_completion_list): Delete.
6394         (default_collect_symbol_completion_matches_break_on)
6395         (default_collect_symbol_completion_matches)
6396         (collect_symbol_completion_matches)
6397         (collect_symbol_completion_matches_type)
6398         (collect_file_symbol_completion_matches)
6399         (make_source_files_completion_list): New.
6400         * top.c (init_main): Don't install a rl_completion_entry_function
6401         hook.  Install a rl_attempted_completion_function hook instead.
6402         * tui/tui-layout.c (layout_completer): Adjust to work with a
6403         completion_tracker.
6404         * tui/tui-regs.c (tui_reggroup_completer):
6405         * tui/tui-win.c (window_name_completer, focus_completer)
6406         (winheight_completer): Adjust to work with a completion_tracker.
6407         * value.c: Include "completer.h".
6408         (complete_internalvar): Adjust to work with a completion_tracker.
6409         * value.h (complete_internalvar): Likewise.
6410
6411 2017-07-17  Pedro Alves  <palves@redhat.com>
6412
6413         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
6414         renames.
6415         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
6416         comments to completer_ftype's declaration.
6417         <completer_handle_brkchars>: Change type to
6418         completer_handle_brkchars_ftype.
6419         * command.h (completer_ftype): Add describing comment and give
6420         names to parameters.
6421         (completer_ftype_void): Rename to ...
6422         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
6423         (set_cmd_completer_handle_brkchars): Adjust.
6424         * completer.c (filename_completer_handle_brkchars): New function.
6425         (complete_line_internal_normal_command): New function, factored
6426         out from ...
6427         (complete_line_internal): ... here.
6428         (command_completer_handle_brkchars)
6429         (default_completer_handle_brkchars)
6430         (completer_handle_brkchars_func_for_completer): New functions.
6431         * completer.h (set_gdb_completion_word_break_characters): Delete
6432         declaration.
6433         (completer_handle_brkchars_func_for_completer): New declaration.
6434         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6435         completer_handle_brkchars_func_for_completer.
6436
6437 2017-07-17  Pedro Alves  <palves@redhat.com>
6438
6439         * completer.c (symbol_completer): New function, based on
6440         make_symbol_completion_list_fn.
6441         * completer.h (symbol_completer): New declaration.
6442         * guile/scm-cmd.c (cmdscm_completers): Adjust.
6443         * python/py-cmd.c (completers): Adjust.
6444         * symtab.c (make_symbol_completion_list_fn): Delete.
6445         * symtab.h (make_symbol_completion_list_fn): Delete.
6446         * cli/cli-decode.c (add_cmd): Adjust.
6447
6448 2017-07-17  Pedro Alves  <palves@redhat.com>
6449
6450         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
6451         * dwarf2read.c: Include "filename-seen-cache.h".
6452         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
6453         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
6454         * filename-seen-cache.c: New file.
6455         * filename-seen-cache.h: New file.
6456         * symtab.c: Include "filename-seen-cache.h".
6457         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
6458         (create_filename_seen_cache, clear_filename_seen_cache)
6459         (delete_filename_seen_cache, filename_seen): Delete, parts moved
6460         to filename-seen-cache.h/filename-seen-cache.c.
6461         (output_source_filename, sources_info)
6462         (maybe_add_partial_symtab_filename)
6463         (make_source_files_completion_list): Adjust to use
6464         filename_seen_cache.
6465
6466 2017-07-17  Pedro Alves  <palves@redhat.com>
6467
6468         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
6469         fields.
6470         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
6471         dwarf2_debug_sections*)): New.
6472         (dwarf2_per_objfile::dwarf2_per_objfile(const
6473         dwarf2_per_objfile&)): Declare as deleted.
6474         (dwarf2_per_objfile::operator=): Declare as deleted.
6475         (dwarf2_per_objfile::dwarf2_per_objfile)
6476         (dwarf2_per_objfile::~dwarf2_per_objfile)
6477         (dwarf2_per_objfile::free_cached_comp_units): New.
6478         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
6479         ctor.  Call dwarf2_per_objfile's ctor manually.
6480         (dwarf2_locate_sections): Deleted/refactored as ...
6481         (dwarf2_per_objfile::locate_sections): ... this new method.
6482         (free_cached_comp_units): Defer to
6483         dwarf2_per_objfile::free_cached_comp_units.
6484         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
6485
6486 2017-07-14  Tom Tromey  <tom@tromey.com>
6487
6488         PR rust/21764:
6489         * rust-exp.y (convert_ast_to_expression): Add "want_type"
6490         parameter.
6491         <UNOP_SIZEOF>: Split into separate case.
6492         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
6493
6494 2017-07-14  Tom Tromey  <tom@tromey.com>
6495
6496         PR rust/21763:
6497         * symtab.c (symbol_matches_domain): Add language_rust to special
6498         case.
6499         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
6500         treat LOC_TYPEDEF symbols as variables.
6501
6502 2017-07-14  Pedro Alves  <palves@redhat.com>
6503
6504         * symtab.c (make_file_symbol_completion_list_1): Iterate over
6505         symtabs matching all symtabs with SRCFILE as file name instead of
6506         only considering the first hit, with lookup_symtab.
6507
6508 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6509
6510         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
6511         operator_name parameters.
6512         (gen_expr): Update function call.
6513
6514 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6515
6516         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
6517         parameter.
6518         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
6519         Likewise.
6520         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
6521         parameter, use agent_expr::gdbarch instead, update function
6522         calls.
6523         (locexpr_tracepoint_var_ref): Likewise.
6524         (loclist_tracepoint_var_ref): Likewise.
6525         * ax-gdb.c (gen_trace_static_fields): Likewise.
6526         (gen_traced_pop): Likewise.
6527         (gen_frame_args_address): Likewise.
6528         (gen_frame_locals_address): Likewise.
6529         (gen_var_ref): Likewise.
6530         (gen_struct_ref_recursive): Likewise.
6531         (gen_static_field): Likewise.
6532         (gen_maybe_namespace_elt): Likewise.
6533         (gen_expr): Likewise.
6534         (gen_trace_for_var): Likewise.
6535         (gen_trace_for_expr): Likewise.
6536         (gen_trace_for_return_address): Likewise.
6537
6538 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6539
6540         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
6541         parameter.
6542         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
6543
6544 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6545
6546         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
6547         from ax, update calls.
6548         (gen_usual_arithmetic): Likewise.
6549         (gen_integral_promotions): Likewise.
6550         (gen_bitfield_ref): Likewise.
6551         (gen_primitive_field): Likewise.
6552         (gen_struct_ref_recursive): Likewise.
6553         (gen_struct_ref): Likewise.
6554         (gen_maybe_namespace_elt): Likewise.
6555         (gen_struct_elt_for_reference): Likewise.
6556         (gen_namespace_elt): Likewise.
6557         (gen_aggregate_elt_ref): Likewise.
6558         (gen_expr): Get gdbarch from ax, update calls.
6559         (gen_expr_binop_rest): Likewise.
6560
6561 2017-07-13  Pedro Alves  <palves@redhat.com>
6562
6563         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
6564         as default tdesc.
6565         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
6566         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
6567         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
6568         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
6569         tdep.
6570         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
6571         Get final tdesc from the tdep.
6572         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
6573         default tdesc.
6574         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6575         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6576         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
6577         Use it as default tdesc.
6578         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
6579         down to amd_init_abi.  No longer handle fallback tdesc here.
6580         * amd64-tdep.h (tdesc_x32): Declare.
6581         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
6582         parameter.
6583         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
6584         as default tdesc.
6585
6586 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6587
6588         * s390-linux-tdep.c (s390_process_record): Add support for
6589         instructions new in arch12.
6590
6591 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
6592
6593         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
6594         PT_GETFSBASE and PT_GETGSBASE.
6595         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
6596         PT_SETGSBASE.
6597
6598 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
6599
6600         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
6601         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
6602         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
6603         those rules.
6604         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
6605         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
6606         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
6607         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
6608         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
6609         * features/i386/amd64.xml: Add 64bit-segments.xml.
6610         * features/i386/amd64-avx-avx512.c: Regenerated.
6611         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
6612         * features/i386/amd64-avx-mpx.c: Regenerated.
6613         * features/i386/amd64-avx.c: Regenerated.
6614         * features/i386/amd64-mpx.c: Regenerated.
6615         * features/i386/amd64.c: Regenerated.
6616         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
6617         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6618         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
6619         * regformats/i386/amd64-avx.dat: Regenerated.
6620         * regformats/i386/amd64-mpx.dat: Regenerated.
6621         * regformats/i386/amd64.dat: Regenerated.
6622
6623 2017-07-10  Yao Qi  <yao.qi@linaro.org>
6624
6625         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6626         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6627
6628 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
6629
6630         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
6631         unsetenv.
6632         * gnulib/aclocal.m4: Regenerate.
6633         * gnulib/config.in: Regenerate.
6634         * gnulib/configure: Regenerate.
6635         * gnulib/import/Makefile.am: Regenerate.
6636         * gnulib/import/Makefile.in: Regenerate.
6637         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6638         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6639         * gnulib/import/m4/environ.m4: New file.
6640         * gnulib/import/m4/setenv.m4: New file.
6641         * gnulib/import/setenv.c: New file.
6642         * gnulib/import/unsetenv.c: New file.
6643
6644 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
6645
6646         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
6647         address when op is DW_OP_addr.
6648
6649 2017-07-09  Tom Tromey  <tom@tromey.com>
6650
6651         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
6652         check and apply to outer type.
6653
6654 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6655
6656         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
6657         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
6658         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
6659         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
6660
6661 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6662
6663         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
6664
6665 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6666
6667         * corelow.c (get_core_siginfo): Remove.
6668         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
6669         instead of get_core_siginfo.
6670         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
6671         * gdbarch.h: Re-generate.
6672         * gdbarch.c: Re-generate.
6673         * linux-tdep.c (linux_core_xfer_siginfo): New.
6674         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
6675
6676 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6677
6678         * corelow.c (thread_section_name): Move to ...
6679         * gdbcore.h (thread_section_name): ... here.
6680
6681 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6682
6683         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
6684         (struct siginfo32): New.
6685         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
6686         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
6687         via ptrace(PT_LWPINFO).
6688
6689 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6690
6691         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
6692         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
6693         (fbsd_get_siginfo_type): New.
6694         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
6695         (_initialize_fbsd_tdep): New.
6696
6697 2017-07-06  David Blaikie  <dblaikie@gmail.com>
6698
6699         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
6700         a singular dwo_unit*) to support multiple CUs in the same way that
6701         multiple TUs are supported.
6702         (create_cus_hash_table): Replace create_dwo_cu with a function for
6703         parsing multiple CUs from a DWO file.
6704         (open_and_init_dwo_file): Use create_cus_hash_table rather than
6705         create_dwo_cu.
6706         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
6707         htab_find, rather than comparing the signature to a singleton CU in
6708         the dwo_file.
6709
6710 2017-07-06  Pedro Alves  <palves@redhat.com>
6711
6712         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
6713
6714 2017-07-04  Pedro Alves  <palves@redhat.com>
6715
6716         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
6717         * gdbtypes.h (TYPE_STATIC): Delete.
6718         (struct fn_field) <is_public, is_abstract, is_static, is_final,
6719         is_synchronized, is_native>: Delete.
6720         <dummy>: Bump.
6721         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
6722         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
6723         (TYPE_FN_FIELD_ABSTRACT): Delete.
6724
6725 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
6726
6727         * buffer.h (buffer_finish): Fix spelling mistakes.
6728
6729 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
6730
6731         * .dir-locals.el: Automatically switch to C-style comments in
6732         versions of Emacs that support the feature.
6733
6734 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
6735             Pedro Alves  <palves@redhat.com>
6736
6737         PR cli/21688
6738         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
6739         (process_next_line): New variable 'inline_cmd'.
6740         Adjust 'if' clauses for "python", "compile" and "guile" to use
6741         'command_name_equals' and check for '!inline_cmd'.
6742
6743 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
6744
6745         PR cli/21688
6746         * cli/cli-script.c (command_name_equals_not_inline): New function.
6747         (process_next_line): Adjust 'if' clauses for "python", "compile"
6748         and "guile" to use command_name_equals_not_inline.
6749
6750 2017-06-29  Pedro Alves  <palves@redhat.com>
6751
6752         * completer.c (expression_completer): Call
6753         linespec_location_completer instead of location_completer.
6754
6755 2017-06-29  Pedro Alves  <palves@redhat.com>
6756
6757         * completer.c (expression_completer): Remove code that recomputes
6758         'text' from 'word'.
6759
6760 2017-06-29  Yao Qi  <yao.qi@linaro.org>
6761
6762         * regformats/regdat.sh: Generate code with
6763         "ifndef IN_PROCESS_AGENT".
6764
6765 2017-06-28  Pedro Alves  <palves@redhat.com>
6766
6767         * command.h: Include "common/scoped_restore.h".
6768
6769 2017-06-28  Yao Qi  <yao.qi@linaro.org>
6770
6771         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
6772         instead of obstack_grow.
6773
6774 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
6775
6776         PR gdb/21337
6777         * symfile.c (reread_symbols): Call objfiles_changed just before
6778         read_symbols.
6779
6780 2017-06-27  Pedro Alves  <palves@redhat.com>
6781
6782         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
6783         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
6784         (completion_list_add_symbol, completion_list_add_msymbol):
6785         ... these new functions.
6786         (add_symtab_completions)
6787         (default_make_symbol_completion_list_break_on_1): Adjust.
6788
6789 2017-06-27  Pedro Alves  <palves@redhat.com>
6790
6791         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
6792         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
6793         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
6794         dtor.
6795         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
6796         'storage_obstack' field an auto_obstack.  In-class initialize all
6797         non-bitfield fields.  Make minsyms_read bool.
6798         * symfile.c (read_symbols): Adjust.
6799
6800 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
6801
6802         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
6803         (gdbsim_store_register): Likewise.
6804
6805 2017-06-27  Pedro Alves  <palves@redhat.com>
6806
6807         * c-exp.y (name_obstack): Now an auto_obstack.
6808         (yylex): Use auto_obstack::clear.
6809         (c_parse): Use auto_obstack::clear instead of reinitializing and
6810         freeing the obstack.
6811         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
6812         * d-exp.y (name_obstack): Now an auto_obstack.
6813         (yylex): Use auto_obstack::clear.
6814         (d_parse): Use auto_obstack::clear instead of reinitializing and
6815         freeing the obstack.
6816         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
6817         auto_obstack.
6818         * dwarf2read.c (create_addrmap_from_index)
6819         (dwarf2_build_psymtabs_hard)
6820         (update_enumeration_type_from_children): Likewise.
6821         * gdb_obstack.h (auto_obstack): New type.
6822         * go-exp.y (name_obstack): Now an auto_obstack.
6823         (build_packaged_name): Use auto_obstack::clear.
6824         (go_parse): Use auto_obstack::clear instead of reinitializing and
6825         freeing the obstack.
6826         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
6827         auto_obstack.
6828         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
6829         * rust-exp.y (work_obstack): Now an auto_obstack.
6830         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
6831         reinitializing and freeing the obstack.
6832         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
6833         (host_char_to_target): Use auto_obstack.
6834         * utils.h (make_cleanup_obstack_free): Delete declaration.
6835         * valprint.c (generic_emit_char, generic_printstr): Use
6836         auto_obstack.
6837
6838 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6839
6840         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
6841         thread.
6842         (darwin_init_thread_list): Don't update dummy thread.
6843         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
6844
6845 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6846
6847         * record-full.c (netorder16): Remove.
6848
6849 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6850
6851         * common/diagnostics.h: Define macros for GCC.
6852         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
6853         * common/vec.h: Include diagnostics.h.
6854         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
6855         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
6856         warning.
6857
6858 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6859
6860         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
6861         New macro.
6862         * ada-lex.l: Ignore deprecated register warnings.
6863
6864 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6865
6866         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
6867         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
6868
6869 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6870
6871         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
6872         its own line.
6873
6874 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6875
6876         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
6877
6878 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
6879
6880         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
6881         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
6882         (xtensa_register_read_masked): Likewise.
6883
6884 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6885
6886         * common/environ.c (gdb_environ::unset): Update comment.
6887
6888 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6889
6890         * python/py-unwind.c (pyuw_sniffer): Allocate space for
6891         registers.
6892
6893 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6894
6895         * record-full.c (record_full_exec_insn): Use byte_vector.
6896
6897 2017-06-22  Yao Qi  <yao.qi@linaro.org>
6898
6899         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
6900         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6901
6902 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6903
6904         * remote.c (cached_reg): Move from here...
6905         * regcache.h (cached_reg): ...to here.
6906         * python/py-unwind.c (struct reg_info): Remove.
6907         (cached_frame_info): Use cached_reg_t.
6908         (pyuw_prev_register): Likewise.
6909         (pyuw_sniffer): Use cached_reg_t and allocate registers.
6910         (pyuw_dealloc_cache): Free all registers.
6911
6912 2017-06-22  Pedro Alves  <palves@redhat.com>
6913             Simon Marchi  <simon.marchi@ericsson.com>
6914
6915         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
6916         warning.
6917         * common/diagnostics.h: New file.
6918
6919 2017-06-22  Pedro Alves  <palves@redhat.com>
6920
6921         * common/agent.h: Add include guards.
6922
6923 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
6924
6925         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
6926         talk about addressable units instead of bytes.
6927
6928 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6929
6930         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
6931         of '::const_iterator'.
6932
6933 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6934
6935         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6936         'unittests/environ-selftests.c'.
6937         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
6938         * charset.c (find_charset_names): Declare object 'iconv_env'.
6939         Update code to use 'iconv_env' object.  Remove call to
6940         'free_environ'.
6941         * common/environ.c: Include <utility>.
6942         (make_environ): Delete function.
6943         (free_environ): Delete function.
6944         (gdb_environ::clear): New function.
6945         (gdb_environ::operator=): New function.
6946         (gdb_environ::get): Likewise.
6947         (environ_vector): Delete function.
6948         (set_in_environ): Delete function.
6949         (gdb_environ::set): New function.
6950         (unset_in_environ): Delete function.
6951         (gdb_environ::unset): New function.
6952         (gdb_environ::envp): Likewise.
6953         * common/environ.h: Include <vector>.
6954         (struct gdb_environ): Delete; transform into...
6955         (class gdb_environ): ... this class.
6956         (free_environ): Delete prototype.
6957         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
6958         environ_vector): Likewise.
6959         * infcmd.c (run_command_1): Update code to call
6960         'envp' from 'gdb_environ' class.
6961         (environment_info): Update code to call methods from 'gdb_environ'
6962         class.
6963         (unset_environment_command): Likewise.
6964         (path_info): Likewise.
6965         (path_command): Likewise.
6966         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
6967         (inferior::inferior): Initialize 'environment' using the host's
6968         information.
6969         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
6970         Include "environ.h".
6971         (class inferior) <environment>: Change type from 'struct
6972         gdb_environ' to 'gdb_environ'.
6973         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6974         methods from 'gdb_environ' class.
6975         * solib.c (solib_find_1): Likewise
6976         * unittests/environ-selftests.c: New file.
6977
6978 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6979
6980         * features/i386/i386-linux.xml: Exchange the order of including
6981         32bit-linux.xml and 32bit-sse.xml.
6982         * features/i386/i386-linux.c: Regenerated.
6983
6984 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6985
6986         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6987         Delete copy ctor and assignment operator.
6988         (tdesc_type): Likewise.
6989         (tdesc_feature): Likewise.
6990         (tdesc_free_reg): Remove.
6991         (tdesc_create_reg): Use new.
6992         (tdesc_free_type): Remove.
6993         (tdesc_create_vector): Use new.
6994         (tdesc_create_union): Likewise.
6995         (tdesc_create_flags): Likewise.
6996         (tdesc_create_enum): Likewise.
6997         (tdesc_free_feature): Delete.
6998         (free_target_description): Use delete.
6999
7000 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
7001
7002         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7003         registers.
7004
7005 2017-06-19  Pedro Alves  <palves@redhat.com>
7006
7007         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7008         after gdb::unlinker.
7009
7010 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
7011
7012         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7013         gdb_environ to access an environment variable.
7014
7015 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
7016
7017         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7018         gdb_byte*.
7019
7020 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7021
7022         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7023
7024 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7025
7026         * configure: Re-generate.
7027         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7028
7029 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7030
7031         * configure: Re-generate.
7032         * warning.m4: Pass -Werror to compiler when checking for
7033         supported warning flags.
7034
7035 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7036
7037         * Makefile.in (COMPILE.pre): Add "-x c++".
7038
7039 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
7040             Pedro Alves  <palves@redhat.com>
7041             Yao Qi  <yao.qi@linaro.org>
7042
7043         * defs.h (RequireLongest): New.
7044         (extract_integer): Declare function template.
7045         (extract_signed_integer): Remove the declaration, but define it
7046         static inline.
7047         (extract_unsigned_integer): Likewise.
7048         (store_integer): Declare function template.
7049         (store_signed_integer): Remove the declaration, but define it
7050         static inline.
7051         (store_unsigned_integer): Likewise.
7052         * findvar.c (extract_integer): New function template.
7053         (extract_signed_integer): Remove.
7054         (extract_unsigned_integer): Remove.
7055         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7056         instantiations.
7057         (store_integer): New function template.
7058         (store_signed_integer): Remove.
7059         (store_unsigned_integer): Remove.
7060         (store_integer): Explicit instantiations.
7061         * regcache.c (regcache_raw_read_signed): Update.
7062         (regcache::raw_read): New function.
7063         (regcache::raw_read_signed): Remove.
7064         (regcache::raw_read_unsigned): Remove.
7065         (regcache_raw_read_unsigned): Update.
7066         (regcache_raw_write_unsigned): Update.
7067         (regcache::raw_write_signed): Remove.
7068         (regcache::raw_write): New function.
7069         (regcache_cooked_read_signed): Update.
7070         (regcache::raw_write_unsigned): Remove.
7071         (regcache::cooked_read_signed): Remove.
7072         (regcache_cooked_read_unsigned): Update.
7073         (regcache::cooked_read_unsigned): Remove.
7074         (regcache_cooked_write_signed): Update.
7075         (regcache_cooked_write_unsigned): Update.
7076         * regcache.h (regcache) <raw_read_signed>: Remove.
7077         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7078         <raw_read, raw_write>: New.
7079         <cooked_read_signed, cooked_write_signed>: Remove.
7080         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7081         <cooked_read, cooked_write>: New.
7082         * sh64-tdep.c (sh64_pseudo_register_read): Update.
7083         (sh64_pseudo_register_write): Update.
7084
7085 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
7086
7087         * arc-tdep.c (arc_disassembler_options): New variable.
7088         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7089         of default_print_insn.
7090         (arc_delayed_print_insn): Set info->section when needed,
7091         use default_print_insn to retrieve a disassembler.
7092
7093 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
7094
7095         PR gdb/21574
7096         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7097         to mention $SHELL and startup-with-shell.
7098
7099 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
7100
7101         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7102
7103 2017-06-14  Yao Qi  <yao.qi@linaro.org>
7104
7105         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7106         default_print_insn instead of print_insn_aarch64.
7107         * arm-tdep.c (gdb_print_insn_arm): Call
7108         default_print_insn instead of print_insn_big_arm
7109         and print_insn_little_arm.
7110         * i386-tdep.c (i386_print_insn): Call default_print_insn
7111         instead of print_insn_i386.
7112         * ia64-tdep.c (ia64_print_insn): Call
7113         default_print_insn instead of print_insn_ia64.
7114         * mips-tdep.c (gdb_print_insn_mips): Call
7115         default_print_insn instead of print_insn_big_mips
7116         and print_insn_little_mips.
7117         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7118         instead of print_insn_spu.
7119
7120 2017-06-14  Pedro Alves  <palves@redhat.com>
7121
7122         * ada-lang.c: Include "common/byte-vector.h".
7123         (ada_value_primitive_packed_val): Use gdb::byte_vector.
7124         * charset.c (wchar_iterator::iterate): Resize the vector instead
7125         of reserving it.
7126         * common/byte-vector.h: Include "common/def-vector.h".
7127         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7128         * cli/cli-dump.c: Include "common/byte-vector.h".
7129         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7130         * common/byte-vector.h: New file.
7131         * common/def-vector.h: New file.
7132         * common/default-init-alloc.h: New file.
7133         * dwarf2loc.c: Include "common/byte-vector.h".
7134         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7135         instead of reserving it.
7136         * dwarf2read.c: Include "common/byte-vector.h".
7137         (data_buf::m_vec): Now a gdb::byte_vector.
7138         * gdb_regex.c: Include "common/def-vector.h".
7139         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7140         * mi/mi-main.c: Include "common/byte-vector.h".
7141         (mi_cmd_data_read_memory): Use gdb::byte_vector.
7142         * printcmd.c: Include "common/byte-vector.h".
7143         (print_scalar_formatted): Use gdb::byte_vector.
7144         * valprint.c: Include "common/byte-vector.h".
7145         (maybe_negate_by_bytes, print_decimal_chars): Use
7146         gdb::byte_vector.
7147
7148 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7149
7150         * darwin-nat.c: Include "nat/fork-inferior.h".
7151
7152 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7153
7154         * configure.nat: Factor out Darwin bits that are not
7155         architecture-specific.  Add fork-inferior.o.
7156
7157 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7158
7159         * configure.nat: Factor out AIX bits that are not
7160         architecture-specific.  Add fork-inferior.o.
7161
7162 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7163
7164         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
7165         (read_pieced_value, write_pieced_value): ...here.  Reduce to
7166         wrappers that just call rw_pieced_value.
7167
7168 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7169
7170         * dwarf2loc.c (write_pieced_value): When writing the data for a
7171         memory piece, use write_memory_with_notification instead of
7172         write_memory.
7173
7174 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7175
7176         * valops.c (read_value_memory): Change embedded_offset to
7177         represent a bit offset instead of a byte offset.
7178         * value.h (read_value_memory): Adjust comment.
7179
7180 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7181
7182         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7183         dest_offset_bits and source_offset_bits.
7184         (write_pieced_value): Likewise.
7185
7186 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7187
7188         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7189         given by DW_OP_bit_piece.
7190         (write_pieced_value): Likewise.
7191
7192 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7193
7194         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7195         some other preparations to the places where sufficient information
7196         is available.
7197         (write_pieced_value): Likewise.
7198
7199 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7200
7201         * dwarf2loc.c (bits_to_bytes): New function.
7202         (read_pieced_value): Fix offset calculations for register pieces
7203         on big-endian targets.
7204         (write_pieced_value): Likewise.
7205
7206 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7207
7208         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7209         (write_pieced_value): Likewise.
7210
7211 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7212
7213         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7214         transfer the source value's least significant bits, instead of its
7215         lowest-addressed ones.  Rename type_len to max_offset.
7216         (read_pieced_value): Mirror above changes to write_pieced_value as
7217         applicable.
7218
7219 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7220
7221         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7222         truncate full bytes from dest_offset_bits before using it as an
7223         offset into the buffer.
7224
7225 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7226
7227         * dwarf2loc.c (write_pieced_value): Include transfer size in
7228         byte-wise check.
7229
7230 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7231
7232         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7233         calculation of this_size.
7234
7235 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7236
7237         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7238         when targeting a bit-field.
7239         (write_pieced_value): Likewise.
7240
7241 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7242
7243         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7244         (allocate_piece_closure): Drop addr_size parameter.
7245         (dwarf2_evaluate_loc_desc_full): Adjust call to
7246         allocate_piece_closure.
7247
7248 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7249
7250         PR gdb/21226
7251         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7252         the LSB end, independent of endianness.
7253
7254 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7255
7256         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7257         size capping.
7258
7259 2017-06-13  Yao Qi  <yao.qi@linaro.org>
7260
7261         * mips-linux-nat.c: Move include features/mips*-linux.c to
7262         mips-linux-tdep.c.
7263         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7264         to mips-linux-tdep.c.
7265         * mips-linux-tdep.c: Include features/mips*-linux.c
7266         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7267         functions.
7268         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7269         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7270         (tdesc_mips64_dsp_linux): Declare.
7271
7272 2017-06-12  Tom Tromey  <tom@tromey.com>
7273
7274         * valprint.h (val_print_type_code_int): Remove.
7275         * valprint.c (generic_val_print_int): Always call
7276         val_print_scalar_formatted.
7277         (val_print_type_code_int): Remove.
7278         * printcmd.c (print_scalar_formatted): Handle options->format==0.
7279         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7280         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7281         * ada-valprint.c (ada_val_print_num): Use
7282         val_print_scalar_formatted.
7283
7284 2017-06-12  Tom Tromey  <tom@tromey.com>
7285
7286         * printcmd.c (print_scalar_formatted): Unify the two switches.
7287         Don't convert scalars to LONGEST.
7288
7289 2017-06-12  Tom Tromey  <tom@tromey.com>
7290
7291         PR exp/16225:
7292         * valprint.h (print_decimal_chars): Update.
7293         * valprint.c (maybe_negate_by_bytes): New function.
7294         (print_decimal_chars): Add "is_signed" argument.
7295         * printcmd.c (print_scalar_formatted): Update.
7296
7297 2017-06-12  Tom Tromey  <tom@tromey.com>
7298
7299         PR exp/16225:
7300         * valprint.h (print_binary_chars, print_hex_chars): Update.
7301         * valprint.c (val_print_type_code_int): Update.
7302         (print_binary_chars): Add "zero_pad" argument.
7303         (emit_octal_digit): New function.
7304         (print_octal_chars): Don't zero-pad.
7305         (print_decimal_chars): Likewise.
7306         (print_hex_chars): Add "zero_pad" argument.
7307         * sh64-tdep.c (sh64_do_fp_register): Update.
7308         * regcache.c (regcache::dump): Update.
7309         * printcmd.c (print_scalar_formatted): Update.
7310         * infcmd.c (default_print_one_register_info): Update.
7311
7312 2017-06-12  Pedro Alves  <palves@redhat.com>
7313             Alan Hayward  <alan.hayward@arm.com>
7314
7315         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7316         (mips_eabi_push_dummy_call): Rename local 'regsize' to
7317         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
7318         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
7319         Assert that abi_regsize bytes fit in 'ref_valbuf'.
7320
7321 2017-06-12  Pedro Alves  <palves@redhat.com>
7322
7323         * dwarf2read.c (mapped_symtab::data): Now a vector of
7324         symtab_index_entry instead of vector of
7325         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
7326         whether an element's name is NULL instead of checking whether the
7327         element itself is NULL.
7328         (find_slot): Change return type.  Adjust.
7329         (hash_expand, , add_index_entry, uniquify_cu_indices)
7330         (write_hash_table): Adjust.
7331
7332 2017-06-12  Pedro Alves  <palves@redhat.com>
7333
7334         * dwarf2read.c (recursively_count_psymbols): New function.
7335         (write_psymtabs_to_index): Call it to compute number of psyms and
7336         pass estimate size of psyms_seen to unordered_set's ctor.
7337
7338 2017-06-12  Pedro Alves  <palves@redhat.com>
7339
7340         * dwarf2read.c (write_hash_table): Check if key already exists
7341         before emplacing.
7342
7343 2017-06-12  Pedro Alves  <palves@redhat.com>
7344
7345         * dwarf2read.c (data_buf::append_space): Rename to...
7346         (data_buf::grow): ... this, and make private.  Adjust all callers.
7347         (data_buf::append_uint): New method.
7348         (add_address_entry, write_one_signatured_type)
7349         (write_psymtabs_to_index): Use it.
7350
7351 2017-06-12  Pedro Alves  <palves@redhat.com>
7352
7353         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7354         (file_write (FILE *, const std::vector<Elem>&)): Delete.
7355         (data_buf::file_write): Call ::fwrite directly.
7356
7357 2017-06-12  Pedro Alves  <palves@redhat.com>
7358
7359         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7360         std::vector::erase.
7361
7362 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7363
7364         Code cleanup: C++ify .gdb_index producer.
7365         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7366         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7367         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7368         (create_strtab, add_string): Remove.
7369         (file_write, data_buf): New.
7370         (struct symtab_index_entry): Use std::vector for cu_indices.
7371         (struct mapped_symtab): Use std::vector for data.
7372         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7373         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7374         Remove.
7375         (find_slot): Change return type.  Update it to the new data structures.
7376         (hash_expand, add_index_entry): Update it to the new data structures.
7377         (offset_type_compare): Remove.
7378         (uniquify_cu_indices): Update it to the new data structures.
7379         (c_str_view, c_str_view_hasher, vector_hasher): New.
7380         (add_indices_to_cpool): Remove.
7381         (write_hash_table): Update it to the new data structures.
7382         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7383         (eq_psymtab_cu_index): Remove.
7384         (psym_index_map): New typedef.
7385         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7386         reference and std::unordered_map for cu_index_htab.
7387         (add_address_entry, add_address_entry_worker, write_address_map)
7388         (write_psymbols): Update it to the new data structures.
7389         (write_obstack): Remove.
7390         (struct signatured_type_index_data): Change types_list to a data_buf
7391         reference and psyms_seen to a std::unordered_set reference.
7392         (write_one_signatured_type, recursively_write_psymbols)
7393         (write_psymtabs_to_index): Update it to the new data structures.
7394
7395 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7396
7397         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7398         separate-debug-file commands.
7399         * symfile.h (separate_debug_file_debug): New global.
7400         * symfile.c (separate_debug_file_debug): New global.
7401         (separate_debug_file_exists, find_separate_debug_file): Add
7402         debug output.
7403         (_initialize_symfile): Add "set debug separate-debug-file"
7404         command.
7405         * build-id.c (build_id_to_debug_bfd,
7406         find_separate_debug_file_by_buildid): Add debug output.
7407
7408 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7409
7410         * gdbarch.sh (displaced_step_free_closure): Remove.
7411         * gdbarch.h, gdbarch.c: Re-generate.
7412         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
7413         displaced_step_free_closure.
7414         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
7415         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
7416         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7417         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7418         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7419         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7420         * arch-utils.h (simple_displaced_step_free_closure): Remove.
7421         * arch-utils.c (simple_displaced_step_free_closure): Remove.
7422         * infrun.c (displaced_step_clear): Call xfree instead of
7423         gdbarch_displaced_step_free_closure.
7424
7425 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
7426
7427         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
7428         NULL".
7429
7430 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
7431
7432         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
7433         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
7434         (mn10300_push_dummy_call): Likewise.
7435
7436 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7437
7438         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
7439
7440 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7441
7442         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
7443
7444 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7445
7446         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
7447         able to start inferiors using a shell.
7448         (New remote packets): Announce new packet "QStartupWithShell".
7449         * remote.c: Add PACKET_QStartupWithShell.
7450         (extended_remote_create_inferior): Handle new
7451         PACKET_QStartupWithShell.
7452         (remote_protocol_features) <QStartupWithShell>: New entry for
7453         PACKET_QStartupWithShell.
7454         (_initialize_remote): Call "add_packet_config_cmd" for
7455         QStartupShell.
7456
7457 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7458             Pedro Alves  <palves@redhat.com>
7459
7460         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
7461         and "nat/fork-inferior.h".
7462         * common/common-inferior.h: New file, with contents from
7463         "gdb/inferior.h".
7464         * commom/common-utils.c: Include "common-utils.h".
7465         (stringify_argv): New function.
7466         * common/common-utils.h (stringify_argv): New prototype.
7467         * configure.nat: Add "fork-inferior.o" as a dependency for
7468         "*linux*", "fbsd*" and "nbsd*" hosts.
7469         * corefile.c (get_exec_file): Update comment.
7470         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
7471         instead of "startup_inferior".
7472         (darwin_create_inferior): Call "add_thread_silent" after
7473         "fork_inferior".
7474         * fork-child.c: Cleanup unnecessary includes.
7475         (SHELL_FILE): Move to "common/common-fork-child.c".
7476         (environ): Likewise.
7477         (exec_wrapper): Initialize.
7478         (get_exec_wrapper): New function.
7479         (breakup_args): Move to "common/common-fork-child.c"; rename to
7480         "breakup_args_for_exec".
7481         (escape_bang_in_quoted_argument): Move to
7482         "common/common-fork-child.c".
7483         (saved_ui): New variable.
7484         (prefork_hook): New function.
7485         (postfork_hook): Likewise.
7486         (postfork_child_hook): Likewise.
7487         (gdb_startup_inferior): Likewise.
7488         (fork_inferior): Move to "common/common-fork-child.c".  Update
7489         function to support gdbserver.
7490         (startup_inferior): Likewise.
7491         * gdbcore.h (get_exec_file): Remove declaration.
7492         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
7493         instead of "startup_inferior".  Call "add_thread_silent" after
7494         "fork_inferior".
7495         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
7496         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
7497         instead of "startup_inferior".  Call "add_thread_silent" after
7498         "fork_inferior".
7499         * inferior.h: Include "common-inferior.h".
7500         (trace_start_error): Move to "common/common-utils.h".
7501         (trace_start_error_with_name): Likewise.
7502         (fork_inferior): Move prototype to "nat/fork-inferior.h".
7503         (startup_inferior): Likewise.
7504         (gdb_startup_inferior): New prototype.
7505         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
7506         * nat/fork-inferior.h: New file.
7507         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
7508         instead of "startup_inferior".  Call "add_thread_silent" after
7509         "fork_inferior".
7510         * target.h (target_terminal_init): Move prototype to
7511         "target/target.h".
7512         (target_terminal_inferior): Likewise.
7513         (target_terminal_ours): Likewise.
7514         * target/target.h (target_terminal_init): New prototype, moved
7515         from "target.h".
7516         (target_terminal_inferior): Likewise.
7517         (target_terminal_ours): Likewise.
7518         * utils.c (gdb_flush_out_err): New function.
7519
7520 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7521
7522         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
7523         * common/common-gdbthread.h: New file, with parts from
7524         "gdb/gdbthread.h".
7525         * gdbthread.h: Include "common-gdbthread.h".
7526         (switch_to_thread): Moved to "common/common-gdbthread.h".
7527
7528 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7529
7530         * Makefile.in (SFILES): Add "common/job-control.c".
7531         (HFILES_NO_SRCDIR): Add "common/job-control.h".
7532         (COMMON_OBS): Add "job-control.o".
7533         * common/job-control.c: New file, with contents from
7534         "gdb/inflow.c".
7535         * common/job-control.h: New file, with contents from "terminal.h".
7536         * fork-child.c: Include "job-control.h".
7537         * inflow.c: Include "job-control.h".
7538         (gdb_setpgid): Move to "common/common-inflow.c".
7539         (_initialize_inflow): Move setting of "job_control" to
7540         "handle_job_control".
7541         * terminal.h (job_control): Moved to "common/common-terminal.h".
7542         (gdb_setpgid): Likewise.
7543         * top.c: Include "job_control.h".
7544         * utils.c: Likewise.
7545         (job_control): Moved to "job-control.c".
7546
7547 2017-06-07  Pedro Alves  <palves@redhat.com>
7548
7549         * Makefile.in (SFILES): Add gdb_regex.c.
7550         (COMMON_OBS): Add gdb_regex.o.
7551         * ada-lang.c (ada_add_standard_exceptions)
7552         (ada_add_exceptions_from_frame, name_matches_regex)
7553         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
7554         parameter type to compiled_regex.  Adjust.
7555         (ada_exceptions_list): Use compiled_regex.
7556         * break-catch-throw.c (exception_catchpoint::pattern): Now a
7557         std::unique_ptr<compiled_regex>.
7558         (exception_catchpoint::~exception_catchpoint): Remove regfree
7559         call.
7560         (check_status_exception_catchpoint): Adjust to use compiled_regex.
7561         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
7562         * breakpoint.c (solib_catchpoint::compiled): Now a
7563         std::unique_ptr<compiled_regex>.
7564         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
7565         (check_status_catch_solib): Adjust to use compiled_regex.
7566         (add_solib_catchpoint): Adjust to use compiled_regex.
7567         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
7568         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
7569         compiled_regex reference.  Adjust to use it.
7570         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
7571         declaration.  Include "gdb_regex.h".
7572         (apropos_cmd): Change regex parameter to compiled_regex reference.
7573         * gdb_regex.c: New file.
7574         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
7575         declarations.
7576         (class compiled_regex): New.
7577         * linux-tdep.c: Include "common/gdb_optional.h".
7578         (struct mapping_regexes): New, factored out from
7579         mapping_is_anonymous_p, and adjusted to use compiled_regex.
7580         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
7581         gdb::optional and remove cleanups.  Adjust to compiled_regex.
7582         * probe.c: Include "common/gdb_optional.h".
7583         (collect_probes): Use compiled_regex and gdb::optional and remove
7584         cleanups.
7585         * skip.c: Include "common/gdb_optional.h".
7586         (skiplist_entry::compiled_function_regexp): Now a
7587         gdb::optional<compiled_regex>.
7588         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
7589         (free_skiplist_entry): Remove regfree call.
7590         (compile_skip_regexp, skip_rfunction_p): Adjust to use
7591         compiled_regex and gdb::optional.
7592         * symtab.c: Include "common/gdb_optional.h".
7593         (search_symbols): Use compiled_regex and gdb::optional.
7594         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
7595         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
7596         to gdb_regex.c.
7597
7598 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7599
7600         * regcache.c (regcache::save): Avoid buffer use.
7601         (regcache::dump): Likewise.
7602
7603 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7604
7605         * sh-tdep.c (sh_pseudo_register_read): Remove
7606         MAX_REGISTER_SIZE.
7607         (sh_pseudo_register_write): Likewise.
7608         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
7609         (sh64_pseudo_register_write): Likewise
7610
7611 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7612
7613         * aarch64-tdep.c (aarch64_store_return_value): Use
7614         V_REGISTER_SIZE.
7615         (aarch64_pseudo_read_value): Likewise.
7616         (aarch64_pseudo_write): Likewise.
7617
7618 2017-06-06  Yao Qi  <yao.qi@linaro.org>
7619
7620         * regformats/regdef.h (set_register_cache): Remove the
7621         declaration.
7622
7623 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
7624
7625         * frame.c (frame_unwind_register_signed): Use
7626         frame_unwind_register_value.
7627
7628 2017-06-06  Pedro Alves  <palves@redhat.com>
7629
7630         PR breakpoints/21553
7631         * breakpoint.c (create_breakpoints_sal_default)
7632         (init_breakpoint_sal, create_breakpoint_sal): Use
7633         gdb::unique_xmalloc_ptr for string parameters.
7634         (create_breakpoint): Constify 'extra_string' and 'cond_string'
7635         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
7636         (base_breakpoint_create_breakpoints_sal)
7637         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
7638         (strace_marker_create_breakpoints_sal)
7639         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
7640         string parameters.
7641         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
7642         gdb::unique_xmalloc_ptr for string parameters.
7643         (create_breakpoint): Constify 'extra_string' and 'cond_string'
7644         parameters.
7645
7646 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
7647
7648         * alpha-tdep.c (alpha_register_to_value): Use
7649         get_frame_register_value.
7650         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
7651
7652 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
7653
7654         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
7655         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
7656         (ia64_value_to_register): Likewise.
7657         (ia64_extract_return_value): Likewise.
7658         (ia64_store_return_value): Likewise.
7659         (ia64_push_dummy_call): Likewise.
7660
7661 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
7662
7663         GDB 8.0 released.
7664
7665 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
7666
7667         * x86-linux-nat.c (struct arch_lwp_info): Remove.
7668
7669 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
7670
7671         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
7672         parameter.
7673         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
7674
7675 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7676
7677         * event-loop.c (poll_timers): Unallocate timer using delete
7678         instead of xfree.
7679
7680 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7681
7682         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
7683         (struct breakpoint) <~breakpoint>: New.
7684         (struct watchpoint): Inherit from breakpoint.
7685         <~watchpoint>: New.
7686         <base>: Remove.
7687         (struct tracepoint): Inherit from breakpoint.
7688         <base>: Remove.
7689         * breakpoint.c (longjmp_breakpoint_ops): Remove.
7690         (struct longjmp_breakpoint): Inherit from breakpoint.
7691         <~longjmp_breakpoint>: New.
7692         <base>: Remove.
7693         (new_breakpoint_from_type): Remove casts.
7694         (watchpoint_in_thread_scope): Remove reference to base field.
7695         (watchpoint_del_at_next_stop): Likewise.
7696         (update_watchpoint): Likewise.
7697         (watchpoint_check): Likewise.
7698         (bpstat_check_watchpoint): Likewise.
7699         (set_longjmp_breakpoint): Likewise.
7700         (struct fork_catchpoint): Inherit from breakpoint.
7701         <base>: Remove.
7702         (struct solib_catchpoint): Inherit from breakpoint.
7703         <~solib_catchpoint>: New.
7704         <base>: Remove.
7705         (dtor_catch_solib): Change to ...
7706         (solib_catchpoint::~solib_catchpoint): ... this.
7707         (breakpoint_hit_catch_solib): Remove reference to base field.
7708         (add_solib_catchpoint): Likewise.
7709         (create_fork_vfork_event_catchpoint): Likewise.
7710         (struct exec_catchpoint): Inherit from breakpoint.
7711         <~exec_catchpoint>: New.
7712         <base>: Remove.
7713         (dtor_catch_exec): Change to ...
7714         (exec_catchpoint::~exec_catchpoint): ... this.
7715         (dtor_watchpoint): Change to ...
7716         (watchpoint::~watchpoint): ... this.
7717         (watch_command_1): Remove reference to base field.
7718         (catch_exec_command_1): Likewise.
7719         (base_breakpoint_dtor): Change to ...
7720         (breakpoint::~breakpoint): ... this.
7721         (base_breakpoint_ops): Remove dtor field value.
7722         (longjmp_bkpt_dtor): Change to ...
7723         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
7724         (strace_marker_create_breakpoints_sal): Remove reference to base
7725         field.
7726         (delete_breakpoint): Don't manually call breakpoint destructor.
7727         (create_tracepoint_from_upload): Remove reference to base field.
7728         (trace_pass_set_count): Likewise.
7729         (initialize_breakpoint_ops): Don't initialize
7730         momentary_breakpoint_ops, don't set dtors.
7731         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
7732         <~ada_catchpoint>: New.
7733         <base>: Remove.
7734         (create_excep_cond_exprs): Remove reference to base field.
7735         (dtor_exception): Change to ...
7736         (ada_catchpoint::~ada_catchpoint): ... this.
7737         (dtor_catch_exception): Remove.
7738         (dtor_catch_exception_unhandled): Remove.
7739         (dtor_catch_assert): Remove.
7740         (create_ada_exception_catchpoint): Remove reference to base
7741         field.
7742         (initialize_ada_catchpoint_ops): Don't set dtors.
7743         * break-catch-sig.c (struct signal_catchpoint): Inherit from
7744         breakpoint.
7745         <~signal_catchpoint>: New.
7746         <base>: Remove.
7747         (signal_catchpoint_dtor): Change to ...
7748         (signal_catchpoint::~signal_catchpoint): ... this.
7749         (create_signal_catchpoint): Remove reference to base field.
7750         (initialize_signal_catchpoint_ops): Don't set dtor.
7751         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
7752         from breakpoint.
7753         <~syscall_catchpoint>: New.
7754         <base>: Remove.
7755         (dtor_catch_syscall): Change to ...
7756         (syscall_catchpoint::~syscall_catchpoint): ... this.
7757         (create_syscall_event_catchpoint): Remove reference to base
7758         field.
7759         (initialize_syscall_catchpoint_ops): Don't set dtor.
7760         * break-catch-throw.c (struct exception_catchpoint): Inherit
7761         from breakpoint.
7762         <~exception_catchpoint>: New.
7763         <base>: Remove.
7764         (dtor_exception_catchpoint): Change to ...
7765         (exception_catchpoint::~exception_catchpoint): ... this.
7766         (handle_gnu_v3_exceptions): Remove reference to base field.
7767         (initialize_throw_catchpoint_ops): Don't set dtor.
7768         * ctf.c (ctf_get_traceframe_address): Remove reference to base
7769         field.
7770         * remote.c (remote_get_tracepoint_status): Likewise.
7771         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
7772         * tracefile.c (tracefile_fetch_registers): Likewise.
7773         * tracepoint.c (actions_command): Likewise.
7774         (validate_actionline): Likewise.
7775         (tfind_1): Likewise.
7776         (get_traceframe_location): Likewise.
7777         (find_matching_tracepoint_location): Likewise.
7778         (parse_tracepoint_status): Likewise.
7779         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
7780
7781 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7782
7783         * breakpoint.c (struct longjmp_breakpoint): New struct.
7784         (is_tracepoint_type): Change return type to bool.
7785         (is_longjmp_type): New function.
7786         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
7787         (set_raw_breakpoint_without_location): Use
7788         new_breakpoint_from_type.
7789         (set_raw_breakpoint): Likewise.
7790
7791 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7792
7793         * breakpoint.c (new_breakpoint_from_type): New function.
7794         (create_breakpoint_sal): Use new_breakpoint_from_type and
7795         unique_ptr.
7796         (create_breakpoint): Likewise.
7797
7798 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
7799
7800         * memattr.c (mem_info_command): Rename to ...
7801         (info_mem_command): ... this.
7802         (mem_enable_command): Rename to ...
7803         (enable_mem_command): ... this.
7804         (mem_disable_command): Rename to ...
7805         (disable_mem_command): ... this.
7806         (mem_delete_command): Rename to ...
7807         (delete_mem_command): ... this.
7808         (_initialize_mem): Adjust function names.
7809
7810 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
7811
7812         * btrace.c (handle_pt_insn_events): New.
7813         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
7814         STATUS.  Split into this and ...
7815         (handle_pt_insn_event_flags): ... this.
7816
7817 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
7818
7819         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
7820         and struct pt_insn.resynced.
7821         * configure: Regenerated.
7822         * config.in: Regenerated.
7823
7824 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7825
7826         * btrace.c (ftrace_find_call_by_number): New function.
7827         (ftrace_new_function): Store objects, not pointers.
7828         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
7829         ftrace_new_gap, ftrace_update_function,
7830         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
7831         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
7832         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
7833         btrace_ends_with_single_insn, btrace_call_get): Account for
7834         btrace_thread_info::functions now storing objects.
7835         * btrace.h (struct btrace_thread_info): Add constructor.
7836         (struct btrace_thread_info) <functions>: Make std::vector.
7837         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
7838         Initialize with default values.
7839         * record-btrace.c (record_btrace_frame_sniffer): Account for
7840         btrace_thread_info::functions now storing objects.
7841
7842 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7843
7844         * btrace.c: Remove typedef bfun_s.
7845         (ftrace_new_gap): Directly add gaps to the list of gaps.
7846         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
7847         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
7848         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
7849         instead of gdb VEC.
7850
7851 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7852
7853         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
7854         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
7855         with btrace_thread_info::next_segment and
7856         btrace_thread_info::prev_segment.
7857         * btrace.h: Remove struct btrace_func_link.
7858         (struct btrace_function): Replace pair of function segment pointers
7859         with pair of indices.
7860         * python/py-record-btrace.c (btpy_call_prev_sibling,
7861         btpy_call_next_sibling): Replace references to
7862         btrace_thread_info::segment with btrace_thread_info::next_segment and
7863         btrace_thread_info::prev_segment.
7864         * record-btrace.c (record_btrace_frame_this_id): Use
7865         btrace_find_call_by_number.
7866
7867 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7868
7869         * btrace.c (ftrace_new_function, ftrace_fixup_level,
7870         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
7871         btrace_insn_next, btrace_insn_prev): Remove references to
7872         btrace_thread_info::flow.
7873         * btrace.h (struct btrace_function): Remove FLOW.
7874
7875 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7876
7877         * btrace.c (ftrace_find_call_by_number): New function.
7878         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
7879         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
7880         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
7881         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
7882         index.
7883         * btrace.h (struct btrace_function): Turn UP into an index.
7884         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
7885         as an index.
7886         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
7887         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
7888         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
7889
7890 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7891
7892         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7893         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7894         ftrace_update_function, ftrace_compute_global_level_offset,
7895         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
7896         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
7897         btrace_insn_end, btrace_is_empty): Remove references to
7898         btrace_thread_info::begin and btrace_thread_info::end.
7899         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
7900         (struct btrace_thread_info) <functions>: Adjust comment.
7901         * record-btrace.c (record_btrace_start_replaying): Remove reference to
7902         btrace_thread_info::begin.
7903
7904 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7905
7906         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7907         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7908         ftrace_update_function): Remove arguments that implicitly were always
7909         BTINFO->END.
7910         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
7911         Don't pass BTINFO->END.
7912
7913 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7914
7915         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
7916         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
7917         btrace_find_insn_by_number): Replace function segment pointer with
7918         index.
7919         (btrace_insn_cmp): Simplify.
7920         * btrace.h: (struct btrace_insn_iterator) Rename index to
7921         insn_index.  Replace function segment pointer with index into function
7922         segment vector.
7923         * record-btrace.c (record_btrace_call_history): Replace function
7924         segment pointer use with index.
7925         (record_btrace_frame_sniffer): Retrieve function call segment through
7926         vector.
7927         (record_btrace_set_replay): Remove defunc't safety check.
7928
7929 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7930
7931         * btrace.c (btrace_ends_with_single_insn): New function.
7932         (btrace_call_get, btrace_call_number, btrace_call_begin,
7933         btrace_call_end, btrace_call_next, btrace_call_prev,
7934         btrace_find_call_by_number): Use index into call segment vector
7935         instead of pointer.
7936         (btrace_call_cmp): Simplify.
7937         * btrace.h (struct btrace_call_iterator): Replace function call segment
7938         pointer with index into vector.
7939         * record-btrace.c (record_btrace_call_history): Use index instead of
7940         pointer.
7941
7942 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7943
7944         * btrace.c (btrace_insn_begin, btrace_insn_end,
7945         btrace_find_insn_by_number): Add btinfo to iterator.
7946         * btrace.h (struct btrace_insn_iterator): Add btinfo.
7947
7948 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7949
7950         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
7951         and save pointers directly.
7952         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
7953         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
7954         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
7955         changed signature of functions.
7956         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
7957         (btrace_fetch): Remove code that adds btrace_function pointers to
7958         vector of btrace_functions.
7959         (btrace_clear): Simplify freeing vector of btrace_functions.
7960
7961 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7962
7963         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
7964         Replace VEC_* with std::vector functions.
7965         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
7966         (struct btrace_thread_info)<functions>: Change type to std::vector.
7967
7968 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7969
7970         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
7971         "Removed targets and native configurations" up.  Merge duplicate
7972         "New commands" sub-sections.  Add "New options" sub-sections.
7973
7974 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
7975
7976         * defs.h (copy_integer_to_size): New declaration.
7977         * findvar.c (copy_integer_to_size): New function.
7978         (do_cint_test): New selftest function.
7979         (copy_integer_to_size_test): Likewise.
7980         (_initialize_findvar): Likewise.
7981         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7982         (mips_fbsd_collect_reg): Use raw_collect_integer.
7983         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7984         (mips64_fill_gregset): Use raw_collect_integer
7985         (mips64_fill_fpregset): Use raw_supply_integer.
7986         * regcache.c (regcache::raw_supply_integer): New function.
7987         (regcache::raw_collect_integer): Likewise.
7988         * regcache.h: (regcache::raw_supply_integer): New declaration.
7989         (regcache::raw_collect_integer): Likewise.
7990
7991 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7992
7993         * Makefile.in (SFILES): Add gdbarch-selftests.c.
7994         (COMMON_OBS): Add gdbarch-selftests.o.
7995         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7996         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7997         * gdbarch-selftests.c: New file.
7998         * regcache.h (regcache) <~regcache>: Mark it virtual if
7999         GDB_SELF_TEST.
8000         <raw_write>: Likewise.
8001
8002 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8003
8004         * regcache.c (current_regcache): Change it to
8005         regcache::current_regcache.
8006         (regcache_observer_target_changed): Update.
8007         (regcache_thread_ptid_changed): Make it a regcache static
8008         method.
8009         (regcache_thread_ptid_changed): Update.
8010         (class regcache_access): New.
8011         (current_regcache_test): Update.
8012         (_initialize_regcache): Update.
8013         * regcache.h: Include forward_list.
8014         (regcache): Declare regcache_thread_ptid_changed and declare
8015         registers_changed_ptid as friend.
8016
8017 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8018
8019         * i387-tdep.c (i387_register_to_value): Use register_size
8020         instead of TYPE_LENGTH.
8021         * m68k-tdep.c (m68k_register_to_value): Likewise.
8022
8023 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8024
8025         * i387-tdep.c (i387_convert_register_p): Return false if type
8026         code isn't TYPE_CODE_FLT.
8027
8028 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8029
8030         * alpha-tdep.c (alpha_convert_register_p): Return true if type
8031         length is 4.
8032         (alpha_register_to_value): Remove type length check.
8033         (alpha_value_to_register): Likewise.
8034
8035 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8036
8037         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8038         TYPE_CODE_FLT.
8039
8040 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8041
8042         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8043         TYPE_CODE_FLT or not.
8044
8045 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8046
8047         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8048         * avr-tdep.c (avr_gdbarch_init): Likewise.
8049         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8050         * cris-tdep.c (cris_gdbarch_init): Likewise.
8051         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8052         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8053         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8054         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8055         * mep-tdep.c (mep_gdbarch_init): Likewise.
8056         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8057         * mips-tdep.c (mips_gdbarch_init): Likewise.
8058         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8059         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8060         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8061         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8062         * v850-tdep.c (v850_gdbarch_init): Likewise.
8063
8064 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8065
8066         * selftest-arch.c (tests_with_arch): Call registers_changed
8067         and reinit_frame_cache.
8068         * selftest.c (run_self_tests): Likewise.
8069
8070 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8071
8072         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8073         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8074
8075 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8076
8077         * rl78-tdep.c (rl78_gdbarch_init): Don't call
8078         set_gdbarch_print_insn.
8079
8080 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8081
8082         * h8300-tdep.c (h8300_gdbarch_init): Don't call
8083         set_gdbarch_print_insn.
8084
8085 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8086
8087         * alpha-tdep.c (alpha_gdbarch_init): Don't call
8088         set_gdbarch_print_insn.
8089         * arc-tdep.c (arc_gdbarch_init): Likewise.
8090         * arch-utils.c: include dis-asm.h.
8091         (default_print_insn): New function.
8092         * arch-utils.h (default_print_insn): Declare.
8093         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8094         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8095         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8096         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8097         * frv-tdep.c (frv_gdbarch_init): Likewise.
8098         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8099         * gdbarch.sh (print_insn): Use default_print_insn.
8100         * gdbarch.c: Regenerated.
8101         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8102         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8103         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8104         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8105         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8106         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8107         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8108         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8109         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8110         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8111         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8112         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8113         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8114         * mt-tdep.c (mt_gdbarch_init): Likewise.
8115         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8116         * nios2-tdep.c (nios2_print_insn): Remove.
8117         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8118         * rx-tdep.c (rx_gdbarch_init): Likewise.
8119         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8120         * score-tdep.c (score_print_insn): Remove.
8121         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8122         * sh-tdep.c (sh_gdbarch_init): Likewise.
8123         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8124         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8125         * tic6x-tdep.c (tic6x_print_insn): Remove.
8126         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8127         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8128         * v850-tdep.c (v850_gdbarch_init): Likewise.
8129         * vax-tdep.c (vax_gdbarch_init): Likewise.
8130         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8131         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8132
8133 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8134
8135         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8136         (MIPS_FP0_REGNUM): Remove.
8137         (MIPS_FSR_REGNUM): Remove.
8138         (mips_fbsd_supply_fpregs): Use mips_regnum.
8139         (mips_fbsd_supply_gregs): Likewise.
8140         (mips_fbsd_collect_fpregs): Likewise.
8141         (mips_fbsd_collect_gregs): Likewise.
8142
8143 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8144
8145         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8146         (getpfpregs_supplies): New function.
8147         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8148         getfpregs_supplies.
8149         (mips_fbsd_store_inferior_registers): Likewise.
8150
8151 2017-05-22  Pedro Alves <palves@redhat.com>
8152
8153         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8154         maintainer.
8155
8156 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
8157
8158         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8159         (store_register): Likewise.
8160         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8161         (get_decimal_float_return_value): Likewise.
8162         (do_ppc_sysv_return_value): Likewise.
8163         (ppc64_sysv_abi_push_integer): Likewise.
8164         (ppc64_sysv_abi_push_freg): Likewise.
8165         (ppc64_sysv_abi_return_value_base): Likewise.
8166         (ppc64_sysv_abi_return_value): Likewise.
8167         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8168         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8169         * rs6000-nat.c: Likewise.
8170         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8171         (rs6000_value_to_register): Likewise.
8172         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8173
8174 2017-05-21  Tom Tromey  <tom@tromey.com>
8175
8176         PR rust/21466:
8177         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8178         arrays as "[T]", not "[T; ]".
8179
8180 2017-05-19  Tom Tromey  <tom@tromey.com>
8181
8182         PR rust/21484:
8183         * rust-lang.c (exp_descriptor_rust): New function.
8184         (rust_language_defn): Use it.
8185         * p-lang.c (pascal_language_defn): Update.
8186         * opencl-lang.c (opencl_language_defn): Update.
8187         * objc-lang.c (objc_language_defn): Update.
8188         * m2-lang.c (m2_language_defn): Update.
8189         * language.h (struct language_defn)
8190         <la_watch_location_expression>: New member.
8191         * language.c (unknown_language_defn, auto_language_defn)
8192         (local_language_defn): Update.
8193         * go-lang.c (go_language_defn): Update.
8194         * f-lang.c (f_language_defn): Update.
8195         * d-lang.c (d_language_defn): Update.
8196         * c-lang.h (c_watch_location_expression): Declare.
8197         * c-lang.c (c_watch_location_expression): New function.
8198         (c_language_defn, cplus_language_defn, asm_language_defn)
8199         (minimal_language_defn): Use it.
8200         * breakpoint.c (watch_command_1): Call
8201         la_watch_location_expression.
8202         * ada-lang.c (ada_language_defn): Update.
8203
8204 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8205
8206         PR tui/21482
8207         * gdb_curses.h (NOMACROS): Define.
8208         (NCURSES_NOMACROS): Define.
8209
8210 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8211
8212         PR tui/21482
8213         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8214         arg to char *.
8215         * tui/tui-wingeneral.c (box_win): Likewise.
8216         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8217         (tui_show_source_line): Likewise.
8218         (tui_show_exec_info_content): Likewise.
8219
8220 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8221
8222         * sparc-tdep.c (sparc_structure_return_p)
8223         (sparc_arg_on_registers_p): New functions.
8224         (sparc32_store_arguments): Use them.
8225         * sparc64-tdep.c (sparc64_16_byte_align_p)
8226         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8227         Handle TYPE_CODE_ARRAY.
8228
8229 2017-05-17  Yao Qi  <yao.qi@linaro.org>
8230
8231         * cli/cli-decode.c (add_alias_cmd): New function.
8232         * command.h (add_alias_cmd): Declare.
8233         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8234         instead call add_alias_cmd.
8235
8236 2017-05-17  Pedro Alves  <palves@redhat.com>
8237
8238         * Makefile.in (nat_extra_makefile_frag): Rename to ...
8239         (nat_makefile_frag): ... this.  All references updated.
8240         * configure.ac: Likewise.
8241         * configure.nat: Likewise.  Enhance comments.
8242         * configure: Regenerate.
8243
8244 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8245
8246         * procfs.c (procfs_create_inferior): Change prototype to match
8247         definition.
8248
8249 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
8250
8251         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8252         C++ compiler warning.
8253
8254 2017-05-12  Tom Tromey  <tom@tromey.com>
8255
8256         PR rust/21483:
8257         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8258         recurse, just call value_struct_elt directly.
8259
8260 2017-05-12  Tom Tromey  <tom@tromey.com>
8261
8262         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8263         OP_RUST_ARRAY>: Fix.
8264
8265 2017-05-12  Tom Tromey  <tom@tromey.com>
8266
8267         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8268
8269 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8270
8271         * regcache.c: Include <forward_list>.
8272         (struct regcache_list): Remove.
8273         (current_regcache): Update.
8274         (get_thread_arch_aspace_regcache): Update for std::forward_list.
8275         (regcache_thread_ptid_changed): Likewise.
8276         (registers_changed_ptid): Likewise.
8277         (current_regcache_size): Likewise.
8278
8279 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8280
8281         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8282         (current_regcache_size): New function.
8283         (current_regcache_test): New function.
8284         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8285
8286 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8287
8288         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8289         (print_gp_register_row): Use get_frame_register_value.
8290
8291 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8292
8293         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8294         (mips_supply_fpregset): Likewise.
8295         (mips64_supply_gregset): Likewise.
8296
8297 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8298
8299         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
8300         regcache->raw_supply_zeroed.
8301
8302 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8303
8304         * configure.nat: Rearrange 'case' statements to match
8305         host before cpu.
8306
8307 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8308
8309         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
8310         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8311         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
8312         "@nat_extra_makefile_frag@".
8313         (Makefile): Remove dependency on "@frags@".
8314         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8315         (data-directory/Makefile): Likewise.
8316         * config/aarch64/linux.mh: Deleted; moved contents to
8317         "gdb/configure.nat".
8318         * config/alpha/alpha-linux.mh: Likewise.
8319         * config/alpha/nbsd.mh: Likewise.
8320         * config/arm/linux.mh: Likewise.
8321         * config/arm/nbsdelf.mh: Likewise.
8322         * config/i386/cygwin.mh: Likewise.
8323         * config/i386/cygwin64.mh: Likewise.
8324         * config/i386/darwin.mh: Likewise.
8325         * config/i386/fbsd.mh: Likewise.
8326         * config/i386/fbsd64.mh: Likewise.
8327         * config/i386/go32.mh: Likewise.
8328         * config/i386/i386gnu.mh: Likewise.
8329         * config/i386/i386sol2.mh: Likewise.
8330         * config/i386/linux.mh: Likewise.
8331         * config/i386/linux64.mh: Likewise.
8332         * config/i386/mingw.mh: Likewise.
8333         * config/i386/mingw64.mh: Likewise.
8334         * config/i386/nbsd64.mh: Likewise.
8335         * config/i386/nbsdelf.mh: Likewise.
8336         * config/i386/nto.mh: Likewise.
8337         * config/i386/obsd.mh: Likewise.
8338         * config/i386/obsd64.mh: Likewise.
8339         * config/i386/sol2-64.mh: Likewise.
8340         * config/ia64/linux.mh: Likewise.
8341         * config/m32r/linux.mh: Likewise.
8342         * config/m68k/linux.mh: Likewise.
8343         * config/m68k/nbsdelf.mh: Likewise.
8344         * config/m68k/obsd.mh: Likewise.
8345         * config/m88k/obsd.mh: Likewise.
8346         * config/mips/fbsd.mh: Likewise.
8347         * config/mips/linux.mh: Likewise.
8348         * config/mips/nbsd.mh: Likewise.
8349         * config/mips/obsd64.mh: Likewise.
8350         * config/pa/linux.mh: Likewise.
8351         * config/pa/nbsd.mh: Likewise.
8352         * config/pa/obsd.mh: Likewise.
8353         * config/powerpc/aix.mh: Likewise.
8354         * config/powerpc/fbsd.mh: Likewise.
8355         * config/powerpc/linux.mh: Likewise.
8356         * config/powerpc/nbsd.mh: Likewise.
8357         * config/powerpc/obsd.mh: Likewise.
8358         * config/powerpc/ppc64-linux.mh: Likewise.
8359         * config/powerpc/spu-linux.mh: Likewise.
8360         * config/s390/linux.mh: Likewise.
8361         * config/sh/nbsd.mh: Likewise.
8362         * config/sparc/fbsd.mh: Likewise.
8363         * config/sparc/linux.mh: Likewise.
8364         * config/sparc/linux64.mh: Likewise.
8365         * config/sparc/nbsd64.mh: Likewise.
8366         * config/sparc/nbsdelf.mh: Likewise.
8367         * config/sparc/obsd64.mh: Likewise.
8368         * config/sparc/sol2.mh: Likewise.
8369         * config/tilegx/linux.mh: Likewise.
8370         * config/vax/nbsdelf.mh: Likewise.
8371         * config/vax/obsd.mh: Likewise.
8372         * config/xtensa/linux.mh: Likewise.
8373         * config/i386/i386gnu.mn: New file, with excerpts from
8374         "config/i386/i386gnu.mh".
8375         * configure: Regenerate.
8376         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8377         *.mh files under "gdb/config".
8378         * configure.nat: New file, with contents from the
8379         "gdb/config/*/*.mh" files.
8380
8381 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
8382
8383         * btrace.c (btrace_clear): Free insn vector.
8384
8385 2017-05-05  Pedro Alves  <palves@redhat.com>
8386
8387         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8388         * configure: Regenerate.
8389
8390 2017-05-04  Pedro Alves  <palves@redhat.com>
8391
8392         * Makefile.in (SFILES): Add progspace-and-thread.c.
8393         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8394         (COMMON_OBS): Add progspace-and-thread.o.
8395         * breakpoint.c: Include "progspace-and-thread.h".
8396         (update_inserted_breakpoint_locations)
8397         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8398         Use scoped_restore_current_pspace_and_thread.
8399         (create_std_terminate_master_breakpoint): Use
8400         scoped_restore_current_program_space.
8401         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8402         (print_breakpoint_location): Use
8403         scoped_restore_current_program_space.
8404         (bp_loc_is_permanent): Use
8405         scoped_restore_current_pspace_and_thread.
8406         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8407         (download_tracepoint_locations): Use
8408         scoped_restore_current_pspace_and_thread.
8409         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
8410         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
8411         (enum step_over_calls_kind): Moved from inferior.h.
8412         (class scoped_restore_current_thread): New class.
8413         * gdbthread.h (make_cleanup_restore_current_thread): Delete
8414         declaration.
8415         (scoped_restore_current_thread): New class.
8416         * infcmd.c: Include "common/gdb_optional.h".
8417         (continue_1, proceed_after_attach): Use
8418         scoped_restore_current_thread.
8419         (notice_new_inferior): Use scoped_restore_current_thread.
8420         * inferior.c: Include "progspace-and-thread.h".
8421         (restore_inferior, save_current_inferior): Delete.
8422         (add_inferior_command, clone_inferior_command): Use
8423         scoped_restore_current_pspace_and_thread.
8424         * inferior.h (scoped_restore_current_inferior): New class.
8425         * infrun.c: Include "progspace-and-thread.h" and
8426         "common/gdb_optional.h".
8427         (follow_fork_inferior): Use
8428         scoped_restore_current_pspace_and_thread.
8429         (scoped_restore_exited_inferior): New class.
8430         (handle_vfork_child_exec_or_exit): Use
8431         scoped_restore_exited_inferior,
8432         scoped_restore_current_pspace_and_thread,
8433         scoped_restore_current_thread and scoped_restore.
8434         (fetch_inferior_event): Use scoped_restore_current_thread.
8435         * linespec.c (decode_line_full, decode_line_1): Use
8436         scoped_restore_current_program_space.
8437         * mi/mi-main.c: Include "progspace-and-thread.h".
8438         (exec_continue): Use scoped_restore_current_thread.
8439         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
8440         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
8441         * proc-service.c (ps_pglobal_lookup): Use
8442         scoped_restore_current_program_space.
8443         * progspace-and-thread.c: New file.
8444         * progspace-and-thread.h: New file.
8445         * progspace.c (release_program_space, clone_program_space): Use
8446         scoped_restore_current_program_space.
8447         (restore_program_space, save_current_program_space)
8448         (save_current_space_and_thread): Delete.
8449         (switch_to_program_space_and_thread): Moved to
8450         progspace-and-thread.c.
8451         * progspace.h (save_current_program_space)
8452         (save_current_space_and_thread): Delete declarations.
8453         (scoped_restore_current_program_space): New class.
8454         * remote.c (remote_btrace_maybe_reopen): Use
8455         scoped_restore_current_thread.
8456         * symtab.c: Include "progspace-and-thread.h".
8457         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
8458         * thread.c (print_thread_info_1): Use
8459         scoped_restore_current_thread.
8460         (struct current_thread_cleanup): Delete.
8461         (do_restore_current_thread_cleanup)
8462         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
8463         (scoped_restore_current_thread::~scoped_restore_current_thread):
8464         ... this new dtor.
8465         (make_cleanup_restore_current_thread): Rename/convert to ...
8466         (scoped_restore_current_thread::scoped_restore_current_thread):
8467         ... this new ctor.
8468         (thread_apply_all_command): Use scoped_restore_current_thread.
8469         (thread_apply_command): Use scoped_restore_current_thread.
8470         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
8471         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
8472
8473 2017-05-04  Pedro Alves  <palves@redhat.com>
8474
8475         * thread.c (make_cleanup_restore_current_thread): Move
8476         find_thread_ptid call before the is_stopped call.  Assert that the
8477         thread is found.  Replace is_stopped call by checking the thread's
8478         state directly.  Remove unnecessary NULL-thread check.
8479
8480 2017-05-04  Pedro Alves  <palves@redhat.com>
8481
8482         * corelow.c (thread_section_name): New class.
8483         (get_core_register_section, get_core_siginfo): Use it.
8484
8485 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8486
8487         * corelow.c (sniff_core_bfd): Remove extra semicolon.
8488         (get_core_register_section): Remove xfree of NULL pointer.
8489
8490 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
8491
8492         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
8493         * regcache.c (regcache::raw_supply_zeroed): New function.
8494         * regcache.h (regcache::raw_supply_zeroed): New declaration.
8495
8496 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8497
8498         * gdbarch.sh: Remove commented out definition of
8499         TARGET_CHAR_BIT.
8500         * gdbarch.h: Re-generate.
8501
8502 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
8503
8504         * configure: Regenerate.
8505
8506 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
8507
8508         * solib-target.c (solib_target_relocate_section_addresses):
8509         Remove num_section_bases, num_bases, segment_bases variables.
8510
8511 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8512
8513         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
8514
8515 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8516
8517         * solib-target.c: Include <vector>
8518         (struct lm_info_target) <~lm_info_target>: Remove.
8519         <segment_bases, section_bases>: Change type to
8520         std::vector<CORE_ADDR>.
8521         (library_list_start_segment, library_list_start_section,
8522         library_list_end_library,
8523         solib_target_relocate_section_addresses): Adjust.
8524
8525 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8526
8527         * gdbarch.sh (software_single_step): Change return type to
8528         std::vector<CORE_ADDR>.
8529         * gdbarch.c, gdbarch.h: Re-generate.
8530         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
8531         Adjust.
8532         (arm_deal_with_atomic_sequence_raw): Adjust.
8533         (thumb_get_next_pcs_raw): Adjust.
8534         (arm_get_next_pcs_raw): Adjust.
8535         (arm_get_next_pcs): Adjust.
8536         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
8537         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
8538         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
8539         (alpha_software_single_step): Adjust.
8540         * alpha-tdep.h (alpha_software_single_step): Adjust.
8541         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
8542         * arm-tdep.c (arm_software_single_step): Adjust.
8543         (arm_breakpoint_kind_from_current_state): Adjust.
8544         * arm-tdep.h (arm_software_single_step): Adjust.
8545         * breakpoint.c (insert_single_step_breakpoint): Adjust.
8546         * cris-tdep.c (cris_software_single_step): Adjust.
8547         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
8548         (micromips_deal_with_atomic_sequence): Adjust.
8549         (deal_with_atomic_sequence): Adjust.
8550         (mips_software_single_step): Adjust.
8551         * mips-tdep.h (mips_software_single_step): Adjust.
8552         * moxie-tdep.c (moxie_software_single_step): Adjust.
8553         * nios2-tdep.c (nios2_software_single_step): Adjust.
8554         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
8555         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
8556         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
8557         * s390-linux-tdep.c (s390_software_single_step): Adjust.
8558         * sparc-tdep.c (sparc_software_single_step): Adjust.
8559         * spu-tdep.c (spu_software_single_step): Adjust.
8560         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
8561
8562 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8563
8564         * gdbarch.sh: Use semi-colon as field separator instead of colon.
8565         * gdbarch.h: Re-generate.
8566
8567 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8568
8569         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
8570         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
8571         * python/py-instruction.c, python/py-instruction.h: New file.
8572         * python/py-record.c: Add py-instruction.h include.
8573         (gdbpy_initialize_record): Make gdb.Instruction a super class of
8574         gdb.RecordInstruction.
8575         * python/python-internal.h: Add gdbpy_initialize_instruction
8576         declaration.
8577         * python/python.c (do_start_initialization): Add
8578         gdbpy_initialize_instruction.
8579
8580 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8581
8582         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
8583         Remove.
8584         (btrace_func_from_recpy_func): New function.
8585         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
8586         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
8587         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
8588         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
8589         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
8590         Also, use new helper functions.
8591         (btpy_list_item): Use new helper functions.
8592         (recpy_bt_function_call_history): Use new type name.
8593         (btpy_call_getset): Remove.
8594         (gdbpy_initialize_btrace): Remove code to initialize
8595         gdb.BtraceFunctionCall.
8596         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
8597         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
8598         recpy_bt_func_prev, recpy_bt_func_next): New export.
8599         * python/py-record.c (recpy_func_type): New static object.
8600         (recpy_func_new, recpy_func_level, recpy_func_symbol,
8601         recpy_func_instructions, recpy_func_up, recpy_func_prev,
8602         recpy_func_next): New function.
8603         (recpy_element_hash, recpy_element_richcompare): Updated comment.
8604         (recpy_func_getset): New static object.
8605         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
8606         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
8607
8608 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8609
8610         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
8611         (btpy_object, btpy_insn_type, btpy_new): Remove.
8612         (btpy_list_object): Use gdb.RecordInstruction type instead of
8613         gdb.BtraceInstruction type.
8614         (btrace_insn_from_recpy_insn): New function.
8615         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
8616         btpy_new.
8617         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
8618         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
8619         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
8620         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
8621         instead of btpy_object.
8622         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8623         btpy_insn_data, btpy_insn_decode): Rename to ...
8624         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
8625         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
8626         recpy_bt_insn_decode): This.  Also, use new helper functions.
8627         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
8628         recpy_insn_type.
8629         (btpy_insn_getset): Remove.
8630         (gdbpy_initialize_btrace): Remove code to initialize
8631         gdb.BtraceInstruction.  Use recpy_element_object.
8632         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
8633         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
8634         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
8635         * python/py-record.c (recpy_insn_type): New static object.
8636         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
8637         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
8638         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
8639         New function.
8640         (recpy_insn_getset): New static object.
8641         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
8642         * python/py-record.h (recpy_element_object): New typedef.
8643         (recpy_insn_type, recpy_insn_new): New export.
8644
8645 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8646
8647         * py-record-btrace.c (btpy_insn_new): Removed.
8648         (btpy_insn_or_gap_new): New function.
8649         (btpy_insn_error): Removed.
8650         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8651         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
8652         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
8653         btpy_insn_or_gap_new instead of btpy_insn_new.
8654         (btpy_insn_getset): Remove btpy_insn_error.
8655         * py-record.c (recpy_gap_type): New static object.
8656         (recpy_gap_object): New typedef.
8657         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
8658         recpy_gap_reason_string): New function.
8659         (recpy_gap_getset): New static object.
8660         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
8661         * py-record.h (recpy_gap_new): New export.
8662
8663 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8664
8665         * python/py-record.c (recpy_ptid): Remove.
8666         (recpy_record_getset): Remove recpy_ptid.
8667
8668 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8669
8670         * btrace.c (btrace_fetch): Set inferior_ptid.
8671         * python/py-record-btrace.c: Add "py-record.h" include.
8672         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
8673         recpy_bt_end, recpy_bt_instruction_history,
8674         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
8675         in gdb.Record object instead of current ptid.
8676         * python/py-record.c: Include new "py-record.h" file.
8677         (recpy_record_object): Moved to py-record.h.
8678         * python/py-record.h: New file.
8679
8680 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8681
8682         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
8683         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
8684         indentation.
8685
8686 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
8687
8688         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
8689         the past maintainers section.
8690
8691 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8692
8693         * infcmd.c (get_return_value): Use regcache ctor, and remove
8694         cleanup.
8695
8696 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8697             Pedro Alves  <palves@redhat.com>
8698
8699         * regcache.c (regcache::regcache): New tag dispatch ctor.
8700         (do_cooked_read): Moved above.
8701         (regcache_dup): Use the tag dispatch ctor..
8702         * regcache.h (regcache): Declare ctor, delete copy ctor and
8703         assignment operator, remove friend regcache_dup.
8704
8705 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8706
8707         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
8708         call method save instead of regcache_cpy.
8709         * regcache.h (struct regcache): Make regcache_dup a friend.
8710
8711 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8712
8713         * regcache.c (struct regcache): Move to regcache.h
8714         (regcache::arch): New method.
8715         (regcache_get_ptid): Update.
8716         (get_regcache_arch): Call arch method.
8717         (get_regcache_aspace): Call method aspace.
8718         (register_buffer): Change it to method.
8719         (regcache_save): Change it to regcache::save.
8720         (regcache_restore): Likewise.
8721         (regcache_cpy_no_passthrough): Remove the declaration.
8722         (regcache_cpy): Call methods restore and cpy_no_passthrough.
8723         (regcache_cpy_no_passthrough): Change it to method
8724         cpy_no_passthrough.
8725         (regcache_register_status): Change it to method
8726         get_register_status.
8727         (regcache_invalidate): Change it to method invalidate.
8728         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
8729         (regcache_raw_update): Change it to method raw_update.
8730         (regcache_raw_read): Likewise.
8731         (regcache_raw_read_signed): Likewise.
8732         (regcache_raw_read_unsigned): Likewise.
8733         (regcache_raw_write_signed): Likewise.
8734         (regcache_raw_write_unsigned): Likewise.
8735         (regcache_cooked_read): Likewise.
8736         (regcache_cooked_read_value): Likewise.
8737         (regcache_cooked_read_signed): Likewise.
8738         (regcache_cooked_read_unsigned): Likewise.
8739         (regcache_cooked_write_signed): Likewise.
8740         (regcache_cooked_write_unsigned): Likewise.
8741         (regcache_raw_set_cached_value): Likewise.
8742         (regcache_raw_write): Likewise.
8743         (regcache_cooked_write): Likewise.
8744         (regcache_xfer_part): Likewise.
8745         (regcache_raw_read_part): Likewise.
8746         (regcache_raw_write_part): Likewise.
8747         (regcache_cooked_read_part): Likewise.
8748         (regcache_cooked_write_part): Likewise.
8749         (regcache_raw_supply): Likewise.
8750         (regcache_raw_collect): Likewise.
8751         (regcache_transfer_regset): Likewise.
8752         (regcache_supply_regset): Likewise.
8753         (regcache_collect_regset): Likewise.
8754         (regcache_debug_print_register): Likewise.
8755         (enum regcache_dump_what): Move it to regcache.h.
8756         (regcache_dump): Change it to method dump.
8757         * regcache.h (enum regcache_dump_what): New.
8758         (class regcache): New.
8759         * target.c (target_fetch_registers): Call method
8760         debug_print_register.
8761         (target_store_registers): Likewise.
8762
8763 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8764
8765         * windows-nat.c (struct lm_info_windows): Initialize field.
8766         (windows_make_so): Allocate lm_info_windows with new.
8767         (windows_free_so): Free lm_info_windows with delete.
8768
8769 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8770
8771         * solib-darwin.c (struct lm_info_darwin): Initialize field.
8772         (darwin_current_sos): Allocate lm_info_darwin with new, remove
8773         cleanup.
8774         (darwin_free_so): Free lm_info_darwin with delete.
8775
8776 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8777
8778         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
8779         <l_addr_p>: Change type to bool.
8780         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
8781         (svr4_free_so): Free lm_info_svr4 with delete.
8782         (svr4_copy_library_list): Replace memcpy with call to copy
8783         constructor.
8784         (library_list_start_library, svr4_default_sos): Allocate
8785         lm_info_svr4 with new.
8786
8787 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8788
8789         * solib-target.c (struct lm_info_target): Add destructor,
8790         initialize fields.
8791         <name>: Change type to std::string.
8792         (library_list_start_library): Allocate lm_info_target with new.
8793         (solib_target_free_library_list): Free lm_info_target with
8794         delete.
8795         (solib_target_current_sos): Adapt to std::string.
8796         (solib_target_free_so): Free lm_info_target with delete.
8797
8798 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8799
8800         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
8801         fields.
8802         (frv_current_sos): Allocate lm_info_frv with new.
8803         (frv_relocate_main_executable): Free lm_info_frv with delete,
8804         allocate with new.
8805         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
8806
8807 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8808
8809         * solib-frv.c (struct lm_info_frv): Fix indentation.
8810
8811 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8812
8813         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
8814         map field.
8815         (dsbt_current_sos): Allocate lm_info_dsbt with new.
8816         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
8817         and allocate with new.
8818         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
8819
8820 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8821
8822         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
8823         <filename, member_name>: Change type to std::string.
8824         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
8825         (library_list_start_library): Allocate lm_info_aix with new.
8826         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
8827         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
8828         with copy constructor.
8829
8830 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8831
8832         * solist.h (struct lm_info): Remove.
8833         (struct lm_info_base): New class.
8834         (struct so_list) <lm_info>: Change type to lm_info_base *.
8835         * nto-tdep.c (struct lm_info): Remove.
8836         (lm_addr): Adjust.
8837         * solib-aix.c (struct lm_info): Rename to ...
8838         (struct lm_info_aix): ... this.  Extend lm_info_base.
8839         (lm_info_p): Rename to ...
8840         (lm_info_aix_p): ... this, and adjust.
8841         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
8842         solib_aix_parse_libraries, library_list_start_library,
8843         solib_aix_free_library_list, solib_aix_parse_libraries,
8844         solib_aix_get_library_list,
8845         solib_aix_relocate_section_addresses, solib_aix_free_so,
8846         solib_aix_get_section_offsets,
8847         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
8848         Adjust.
8849         (struct solib_aix_inferior_data) <library_list>: Adjust.
8850         * solib-darwin.c (struct lm_info): Rename to ...
8851         (struct lm_info_darwin): ... this.  Extend lm_info_base.
8852         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
8853         * solib-dsbt.c (struct lm_info): Rename to ...
8854         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
8855         (struct dsbt_info) <main_executable_lm_info): Adjust.
8856         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
8857         dsbt_relocate_section_addresses): Adjust.
8858         * solib-frv.c (struct lm_info): Rename to ...
8859         (struct lm_info_frv): ... this.  Extend lm_info_base.
8860         (main_executable_lm_info): Adjust.
8861         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
8862         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
8863         find_canonical_descriptor_in_load_object,
8864         frv_fdpic_find_canonical_descriptor): Adjust.
8865         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
8866         to lm_info_svr4.
8867         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
8868         svr4_clear_so, svr4_copy_library_list,
8869         library_list_start_library, svr4_default_sos, svr4_read_so_list,
8870         svr4_current_sos, svr4_fetch_objfile_link_map,
8871         solist_update_incremental): Adjust.
8872         * solib-svr4.h (struct lm_info_svr4): Move here from
8873         solib-svr4.c.
8874         * solib-target.c (struct lm_info): Rename to ...
8875         (struct lm_info_target): ... this.  Extend lm_info_base.
8876         (lm_info_p): Rename to ...
8877         (lm_info_target_p): ... this.
8878         (solib_target_parse_libraries, library_list_start_segment,
8879         library_list_start_section, library_list_start_library,
8880         library_list_end_library, solib_target_free_library_list,
8881         solib_target_current_sos, solib_target_free_so,
8882         solib_target_relocate_section_addresses): Adjust.
8883         * windows-nat.c (struct lm_info): Rename to ...
8884         (struct lm_info_windows): ... this.  Extend lm_info_base.
8885         (windows_make_so, handle_load_dll, handle_unload_dll,
8886         windows_xfer_shared_libraries): Adjust.
8887
8888 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8889
8890         * solib-darwin.c (struct darwin_so_list): Remove.
8891         (darwin_current_sos): Allocate an so_list object instead of a
8892         darwin_so_list, separately allocate an lm_info object.
8893         (darwin_free_so): Free lm_info.
8894
8895 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
8896
8897         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
8898         with fprintf_filtered.
8899
8900 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8901
8902         * regcache.c (regcache::regcache): New function.
8903         (regcache::~regcache): New function.
8904         (regcache_xmalloc_1): Remove.
8905         (regcache_xmalloc): Call new regcache.
8906         (regcache_xfree): Call delete regcache.
8907         (get_thread_arch_aspace_regcache): Call new regcache.
8908
8909 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8910
8911         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
8912         lwp instead of ptid_get_lwp.
8913
8914 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8915
8916         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
8917         lwp_info instead of getting from inferior_ptid.
8918
8919 2017-04-27  Keith Seitz  <keiths@redhat.com>
8920
8921         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
8922         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
8923         (CV_CONVERSION_BADNESS): Define.
8924         (rank_one_type): Remove overly restrictive rvalue reference
8925         rank checks.
8926         Add cv-qualifier checks and subranks for type equality.
8927         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
8928         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
8929         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
8930
8931 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
8932
8933         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
8934         count when creating the object.
8935
8936 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
8937             Ulrich Weigand  <uweigand@de.ibm.com>
8938
8939         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
8940         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
8941         is used in AIX.
8942         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
8943         (process_xcoff_symbol): Likewise.
8944         (scan_xcoff_symtab): Likewise.
8945
8946 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8947
8948         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
8949         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
8950         (ia64_access_reg): Use get_frame_register_unsigned.
8951         (ia64_access_rse_reg): Likewise.
8952         (ia64_libunwind_frame_prev_register): Likewise.
8953
8954 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
8955
8956         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
8957         * gdbarch.c: Regenerated.
8958         * gdbarch.h: Regenerated.
8959         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
8960         visibility external.
8961         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
8962         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
8963         (enum cfa_how_kind): Move to ...
8964         (struct dwarf2_frame_state_reg_info): Likewise.
8965         (struct dwarf2_frame_state): Likewise.
8966         * dwarf2-frame.h: ... here.
8967         (dwarf2_frame_state_alloc_regs): New declaration.
8968         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
8969         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
8970
8971 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8972
8973         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8974         regcache_raw_read_unsigned.
8975         (xtensa_pseudo_register_write): Likewise.
8976
8977 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8978
8979         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8980         (nds32_pseudo_register_write): Likewise.
8981
8982 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8983
8984         * regcache.c (struct regcache) <readonly_p>: Change its type
8985         to bool.
8986         (regcache_xmalloc_1): Update parameter type and callers update.
8987
8988 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8989
8990         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8991         set_gdbarch_wchar_bit.
8992         * arm-tdep.c (arm_gdbarch_init): Likewise.
8993
8994 2017-04-25  Pedro Alves  <palves@redhat.com>
8995
8996         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8997         (BothAreRelocatable, memcopy, memmove): Don't define.
8998         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8999         macros.
9000
9001 2017-04-25  Pedro Alves  <palves@redhat.com>
9002
9003         * common/common-defs.h: Include "common/poison.h".
9004         * common/function-view.h: (Not, Or, Requires): Move to traits.h
9005         and adjust.
9006         * common/poison.h: New file.
9007         * common/traits.h: Include <type_traits>.
9008         (Not, Or, Requires): New, moved from common/function-view.h.
9009
9010 2017-04-25  Pedro Alves  <palves@redhat.com>
9011
9012         * breakpoint.h (struct breakpoint): In-class initialize all
9013         fields.  Make boolean fields "bool".
9014         * breakpoint.c (init_raw_breakpoint_without_location): Remove
9015         memset call and initializations no longer necessary.
9016
9017 2017-04-25  Pedro Alves  <palves@redhat.com>
9018
9019         * btrace.c (pt_btrace_insn_flags): Change parameter type to
9020         reference.
9021         (pt_btrace_insn): New function.
9022         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9023
9024 2017-04-25  Pedro Alves  <palves@redhat.com>
9025
9026         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
9027         "base" field and inherit from "bp_location" instead.  Add
9028         non-default ctor.
9029         (allocate_location_exception): Use new non-default ctor.
9030         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9031         (init_bp_location): Convert to ...
9032         (bp_location::bp_location): ... this new ctor, and remove memset
9033         call.
9034         (base_breakpoint_allocate_location): Use the new non-default ctor.
9035         * breakpoint.h (bp_location): Now a class.  Declare default and
9036         non-default ctors.  In-class initialize all members.
9037         (init_bp_location): Remove declaration.
9038
9039 2017-04-25  Pedro Alves  <palves@redhat.com>
9040
9041         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9042         assignment operator.
9043
9044 2017-04-24  Yao Qi  <yao.qi@linaro.org>
9045
9046         * doublest.c (convert_doublest_to_floatformat): Call
9047         floatformat_totalsize_bytes.
9048
9049 2017-04-22  Tom Tromey  <tom@tromey.com>
9050
9051         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9052         ui_out_emit_list.
9053         * stack.c (print_frame): Use ui_out_emit_list.
9054         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9055         ui_out_emit_list.
9056         * mi/mi-main.c (print_one_inferior)
9057         (mi_cmd_data_list_register_names)
9058         (mi_cmd_data_list_register_values, mi_cmd_list_features)
9059         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9060         ui_out_emit_list.
9061         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9062         (mi_output_solib_attribs): Use ui_out_emit_list,
9063         ui_out_emit_tuple.
9064         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9065         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9066         (mi_cmd_stack_list_args, list_args_or_locals): Use
9067         ui_out_emit_list.
9068         * disasm.c (do_assembly_only): Use ui_out_emit_list.
9069         * breakpoint.c (print_solib_event, output_thread_groups): Use
9070         ui_out_emit_list.
9071
9072 2017-04-22  Tom Tromey  <tom@tromey.com>
9073
9074         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9075         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9076         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9077
9078 2017-04-22  Tom Tromey  <tom@tromey.com>
9079
9080         * tracepoint.c (tvariables_info_1)
9081         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9082
9083 2017-04-22  Tom Tromey  <tom@tromey.com>
9084
9085         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9086         annotate_arg_emitter.
9087         * breakpoint.c (print_mention_watchpoint)
9088         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9089         * annotate.h (struct annotate_arg_emitter): New.
9090
9091 2017-04-22  Tom Tromey  <tom@tromey.com>
9092
9093         * record-btrace.c (record_btrace_insn_history)
9094         (record_btrace_insn_history_range, record_btrace_call_history)
9095         (record_btrace_call_history_range): Use ui_out_emit_tuple.
9096         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9097         ui_out_emit_tuple.
9098         * stack.c (print_frame_info): Use ui_out_emit_tuple.
9099         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9100         * skip.c (skip_info): Use ui_out_emit_tuple.
9101         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9102         * progspace.c (print_program_space): Use ui_out_emit_tuple.
9103         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9104         * osdata.c (info_osdata): Use ui_out_emit_tuple.
9105         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9106         ui_out_emit_tuple.
9107         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9108         (output_register, mi_cmd_data_read_memory)
9109         (mi_cmd_data_read_memory_bytes, mi_load_progress)
9110         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9111         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9112         Use ui_out_emit_tuple.
9113         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9114         ui_out_emit_tuple.
9115         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9116         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9117         * linux-thread-db.c (info_auto_load_libthread_db): Use
9118         ui_out_emit_tuple.
9119         * inferior.c (print_inferior): Use ui_out_emit_tuple.
9120         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9121         * disasm.c (do_mixed_source_and_assembly_deprecated)
9122         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9123         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9124         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9125         * breakpoint.c (print_one_breakpoint_location)
9126         (print_one_breakpoint): Use ui_out_emit_tuple.
9127         * auto-load.c (print_script, info_auto_load_cmd): Use
9128         ui_out_emit_tuple.
9129         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9130
9131 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
9132
9133         * thread.c (print_thread_info_1): Remove dead code.
9134
9135 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9136
9137         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9138         GDB_SELF_TEST.
9139         * arm-tdep.c (selftests::arm_record_test): Likewise.
9140
9141 2017-04-21  Yao Qi  <yao.qi@linaro.org>
9142
9143         * regcache.c (regcache_restore): Remove argument 2.  Replace
9144         argument 3 with regcache.  Get register status from
9145         src->register_status and get register contents from
9146         register_buffer (src, regnum).
9147         (regcache_cpy): Update.
9148
9149 2017-04-19  Pedro Alves  <palves@redhat.com>
9150
9151         * gdbthread.h (thread): Add missing closing parenthesis in
9152         comment.
9153
9154 2017-04-19  Pedro Alves  <palves@redhat.com>
9155
9156         * common/refcounted-object.h: New file.
9157         * gdbthread.h: Include "common/refcounted-object.h".
9158         (thread_info): Inherit from refcounted_object and add comments.
9159         (thread_info::incref, thread_info::decref)
9160         (thread_info::m_refcount): Delete.
9161         (thread_info::deletable): Use the refcounted_object::refcount()
9162         method.
9163         * inferior.c (current_inferior_): Add comment.
9164         (set_current_inferior): Increment/decrement refcounts.
9165         (prune_inferiors, remove_inferior_command): Skip inferiors marked
9166         not-deletable instead of comparing with the current inferior.
9167         (initialize_inferiors): Increment the initial inferior's refcount.
9168         * inferior.h (struct inferior): Forward declare.
9169         Include "common/refcounted-object.h".
9170         (current_inferior, set_current_inferior): Move declaration to
9171         before struct inferior's definition, and fix comment.
9172         (inferior): Inherit from refcounted_object.  Add comments.
9173         * thread.c (switch_to_thread_no_regs): Reference the thread's
9174         inferior pointer directly instead of doing a ptid lookup.
9175         (switch_to_no_thread): New function.
9176         (switch_to_thread(thread_info *)): New function, factored out
9177         from ...
9178         (switch_to_thread(ptid_t)): ... this.
9179         (restore_current_thread): Delete.
9180         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9181         fields, and add 'inf' field.
9182         (do_restore_current_thread_cleanup): Check whether old->inf is
9183         alive instead of looking up an inferior by ptid.  Use
9184         switch_to_thread and switch_to_no_thread.
9185         (restore_current_thread_cleanup_dtor): Use old->inf directly
9186         instead of lookup up an inferior by id.  Decref the inferior.
9187         Don't restore 'removable'.
9188         (make_cleanup_restore_current_thread): Same the inferior pointer
9189         in old, instead of the inferior number.  Incref the inferior.
9190         Don't save/clear 'removable'.
9191
9192 2017-04-19  Pedro Alves  <palves@redhat.com>
9193
9194         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9195         unittests/scoped_restore-selftests.c.
9196         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9197         * common/scoped_restore.h (scoped_restore_base): Make "class".
9198         (scoped_restore_base::release): New public method.
9199         (scoped_restore_base::scoped_restore_base): New protected ctor.
9200         (scoped_restore_base::m_saved_var): New protected field.
9201         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9202         scoped_restore_base base class instead of m_saved_var directly.
9203         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9204         (scoped_restore_tmpl::scoped_restore_tmpl(const
9205         scoped_restore_tmpl<T>&)): Likewise.
9206         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9207         method.
9208         (scoped_restore_tmpl::saved_var): New method.
9209         (scoped_restore_tmpl::m_saved_var): Delete.
9210         * inferior.h (inferior::detaching): Now a bool.
9211         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9212         cleanup.
9213         * unittests/scoped_restore-selftests.c: New file.
9214
9215 2017-04-19  Pedro Alves  <palves@redhat.com>
9216
9217         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9218         Re-sort in alphabetic order.
9219
9220 2017-04-18  Pedro Alves  <palves@redhat.com>
9221
9222         * xml-support.c (obstack_xml_printf): Delete.
9223         * xml-support.h (obstack_xml_printf): Delete.
9224
9225 2017-04-18  Pedro Alves  <palves@redhat.com>
9226
9227         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9228         vdebug, verror, body_text, start_element, end_element, name,
9229         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9230         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9231         is_xinclude>: Make private and add m_ prefix.
9232         (gdb_xml_parser::body_text): New method, based on ...
9233         (gdb_xml_body_text): ... this.  Adjust.
9234         (gdb_xml_parser::vdebug): New method, based on ...
9235         (gdb_xml_debug): ... this.  Adjust.
9236         (gdb_xml_parser::verror): New method, based on ...
9237         (gdb_xml_error): ... this.  Adjust.
9238         (gdb_xml_parser::start_element): New method, based on ...
9239         (gdb_xml_start_element): ... this.  Adjust.
9240         (gdb_xml_start_element_wrapper): Defer to
9241         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9242         (gdb_xml_parser::end_element): New method, based on ...
9243         (gdb_xml_end_element_wrapper): ... this.  Adjust.
9244         (gdb_xml_parser::~gdb_xml_parser): Adjust.
9245         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9246         (gdb_xml_parser::use_dtd): New method, based on ...
9247         (gdb_xml_use_dtd): ... this.  Adjust.
9248         (gdb_xml_parser::parse): New method, based on ...
9249         (gdb_xml_parse): ... this.  Adjust.
9250         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9251         (xinclude_start_include): Adjust to call the parser's name method.
9252         (xml_xinclude_default, xml_xinclude_start_doctype)
9253         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9254         method.
9255         (xml_process_xincludes): Adjust to call parser methods.
9256         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9257         declarations.
9258
9259 2017-04-18  Pedro Alves  <palves@redhat.com>
9260
9261         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9262         gdb::optional<std::string>.
9263         * xml-support.c: Include <string>.
9264         (scope_level::scope_level(scope_level &&))
9265         (scope_level::~scope_level): Delete.
9266         (scope_level::body): Now a std::string.
9267         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9268         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9269         parameter.
9270         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9271         (xinclude_parsing_data::output): Now a std::string reference.
9272         (xinclude_start_include): Adjust.
9273         (xml_xinclude_default): Adjust.
9274         (xml_process_xincludes): Add 'output' parameter, and return bool.
9275         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9276         and return bool.
9277         * xml-tdesc.c: Include <unordered_map> and <string>.
9278         (tdesc_xml_cache): Delete.
9279         (tdesc_xml_cache_s): Delete.
9280         (xml_cache): Now an std::unordered_map.
9281         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9282         (target_fetch_description_xml): Change return type to
9283         gdb::optional<std::string>, and adjust.
9284         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9285         (target_fetch_description_xml): Change return type to
9286         gdb::optional<std::string>.
9287
9288 2017-04-18  Pedro Alves  <palves@redhat.com>
9289
9290         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9291         unittests/optional-selftests.c.
9292         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9293         * unittests/optional-selftests.c: New file.
9294         * unittests/optional/assignment/1.cc: New file.
9295         * unittests/optional/assignment/2.cc: New file.
9296         * unittests/optional/assignment/3.cc: New file.
9297         * unittests/optional/assignment/4.cc: New file.
9298         * unittests/optional/assignment/5.cc: New file.
9299         * unittests/optional/assignment/6.cc: New file.
9300         * unittests/optional/assignment/7.cc: New file.
9301         * unittests/optional/cons/copy.cc: New file.
9302         * unittests/optional/cons/default.cc: New file.
9303         * unittests/optional/cons/move.cc: New file.
9304         * unittests/optional/cons/value.cc: New file.
9305         * unittests/optional/in_place.cc: New file.
9306         * unittests/optional/observers/1.cc: New file.
9307         * unittests/optional/observers/2.cc: New file.
9308
9309 2017-04-18  Pedro Alves  <palves@redhat.com>
9310
9311         * common/gdb_optional.h: Include common/traits.h.
9312         (in_place_t): New type.
9313         (in_place): New constexpr variable.
9314         (optional::optional): Remove member initialization of
9315         m_instantiated.
9316         (optional::optional(in_place_t...)): New constructor.
9317         (optional::~optional): Use reset.
9318         (optional::optional(const optional&)): New.
9319         (optional::optional(const optional&&)): New.
9320         (optional::optional(T &)): New.
9321         (optional::optional(T &&)): New.
9322         (operator::operator=(const optional &)): New.
9323         (operator::operator=(optional &&)): New.
9324         (operator::operator= (const T &))
9325         (operator::operator= (T &&))
9326         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
9327         (operator::reset): New.
9328         (operator::m_instantiated):: Add in-class initializer.
9329         * common/traits.h: Include <type_traits>.
9330         (struct And): New types.
9331
9332 2017-04-18  Pedro Alves  <palves@redhat.com>
9333
9334         * xml-support.c: Include <vector>.
9335         (scope_level::scope_level(const gdb_xml_element *))
9336         (scope_level::scope_level(scope_level&&)): New.
9337         (scope_level::~scope_level): New.
9338         (scope_level_s): Delete.
9339         (gdb_xml_parser::scopes): Now a std::vector.
9340         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9341         Use std::vector.
9342         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9343         scope cleanup code.
9344         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9345         of the scopes member.  Use std::vector::emplace_back.
9346
9347 2017-04-18  Pedro Alves  <palves@redhat.com>
9348
9349         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
9350         a bool.
9351         (gdb_xml_end_element): Change type of first parameter.
9352         (gdb_xml_cleanup): Rename to ...
9353         (gdb_xml_parser::~gdb_xml_parser): ... this.
9354         (gdb_xml_create_parser_and_cleanup): Delete with ...
9355         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9356         to this new ctor.
9357         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9358         using gdb_xml_create_parser_and_cleanup.
9359         (xinclude_parsing_data): Add ctor/dtor.
9360         (xml_xinclude_cleanup): Delete.
9361         (xml_process_xincludes): Create a local xinclude_parsing_data
9362         instead of heap-allocating one.  Create a local gdb_xml_parser
9363         instead of heap-allocating one with
9364         gdb_xml_create_parser_and_cleanup.
9365
9366 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
9367
9368         PR threads/20743
9369         * fbsd-nat.c (resume_one_thread_cb): Remove.
9370         (resume_all_threads_cb): Remove.
9371         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9372         iterate_over_threads.
9373
9374 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9375
9376         * NEWS: Create a new section for the next release branch.
9377         Rename the section of the current branch, now that it has
9378         been cut.
9379
9380 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9381
9382         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9383         * version.in: Bump version to 8.0.50.DATE-git.
9384
9385 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
9386
9387         PR gdb/21385
9388         * windows-nat.c (windows_create_inferior): Declare 'allargs'
9389         independently of the host, and fix build breakage on Cygwin.
9390
9391 2017-04-13  Pedro Alves  <palves@redhat.com>
9392
9393         * inferior.c (free_inferior): Convert to ...
9394         (inferior::~inferior): ... this dtor.
9395         (inferior::inferior): New ctor, factored out from ...
9396         (add_inferior_silent): ... here.  Allocate the inferior with a new
9397         expression.
9398         (delete_inferior): Call delete instead of free_inferior.
9399         * inferior.h (gdb_environ, continuation): Forward declare.
9400         (inferior): Now a class.  Add in-class initialization to all
9401         members.  Make boolean fields bool, except 'detaching'.
9402         (inferior::inferior): New explicit ctor.
9403         (inferior::~inferior): New.
9404
9405 2017-04-13  Pedro Alves  <palves@redhat.com>
9406
9407         * inferior.c (init_inferior_list): Delete.
9408         * inferior.h (init_inferior_list): Delete.
9409
9410 2017-04-13  Pedro Alves  <palves@redhat.com>
9411
9412         PR threads/13217
9413         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
9414         (top level): Call it twice, with different thread sets.
9415
9416 2017-04-13  Pedro Alves  <palves@redhat.com>
9417
9418         * thread.c: Include <algorithm>.
9419         (thread_array_cleanup): Delete.
9420         (scoped_inc_dec_ref): New class.
9421         (live_threads_count): New function.
9422         (set_thread_refcount): Delete.
9423         (tp_array_compar_ascending): Now a bool.
9424         (tp_array_compar): Convert to a std::sort comparison function.
9425         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9426         and live_threads_count.
9427
9428 2017-04-13  Pedro Alves  <palves@redhat.com>
9429
9430         * infrun.c (follow_fork_inferior): Also switch the current
9431         inferior.
9432
9433 2017-04-13  Pedro Alves  <palves@redhat.com>
9434
9435         * breakpoint.c (watch_command_1): Save watchpoint-frame info
9436         before calling create_internal_breakpoint.
9437
9438 2017-04-13  Pedro Alves  <palves@redhat.com>
9439
9440         * fork-child.c (execv_argv): New class.
9441         (breakup_args): Refactored as ...
9442         (execv_argv::init_for_no_shell): .. this method of execv_argv.
9443         Copy arguments to storage and replace separators with NULL
9444         terminators in place.
9445         (escape_bang_in_quoted_argument): Adjust to return bool.
9446         (execv_argv::execv_argv): New ctor.
9447         (execv_argv::init_for_shell): New method, factored out from
9448         fork_inferior.  Don't strdup strings into the vector.
9449         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
9450         Remove free_vector_argv call.
9451
9452 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9453
9454         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
9455         tdep->rx_psw_type.
9456
9457 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9458
9459         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
9460         * rx-tdep.c (rx_gdbarch_init): Likewise.
9461
9462 2017-04-13  Pedro Alves  <palves@redhat.com>
9463
9464         * breakpoint.h (struct breakpoint): Reindent.
9465
9466 2017-04-13  Pedro Alves  <palves@redhat.com>
9467
9468         * breakpoint.c (bp_location): Rename to ...
9469         (bp_locations): ... this.  All references updated.
9470         (bp_location_count): Rename to ...
9471         (bp_locations_count): ... this.  All references updated.
9472         (bp_location_placed_address_before_address_max): Rename to ...
9473         (bp_locations_placed_address_before_address_max): ... this.  All
9474         references updated.
9475         (bp_location_shadow_len_after_address_max): Rename to ...
9476         (bp_locations_shadow_len_after_address_max): ... this.  All
9477         references updated.
9478         (bp_location_compare_addrs): Rename to ...
9479         (bp_locations_compare_addrs): ... this.  All references updated.
9480         (bp_location_compare):Rename to ...
9481         (bp_locations_compare): ... this.  All references updated.
9482         (bp_location_target_extensions_update): Rename to ...
9483         (bp_locations_target_extensions_update): ... this.  All references
9484         updated.
9485
9486 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9487
9488         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
9489         * common/common.m4: Check headers 'termios.h', 'termio.h' and
9490         'sgtty.h'.
9491         * common/gdb_termios.h: New file, with parts of "terminal.h".
9492         * inflow.c: Include "gdb_termios.h".
9493         * ser-unix.c: Include "gdb_termios.h".
9494         * terminal.h: Move terminal-related defines to
9495         "common/gdb_termios.h".
9496
9497 2017-04-12  Tom Tromey  <tom@tromey.com>
9498
9499         * probe.c (parse_probes): Update.
9500         * location.h (delete_event_location): Don't declare.
9501         (event_location_deleter::operator()): Update.
9502         * location.c (event_location_deleter::operator()): Rename from
9503         delete_event_location.
9504         * linespec.h (linespec_result) <location>: Change type to
9505         event_location_up.
9506         * linespec.c (canonicalize_linespec, event_location_to_sals)
9507         (decode_objc): Update.
9508         (linespec_result): Don't call delete_event_location.
9509         * breakpoint.c (create_breakpoints_sal)
9510         (bkpt_probe_create_sals_from_location)
9511         (strace_marker_create_sals_from_location): Update.
9512
9513 2017-04-12  Tom Tromey  <tom@tromey.com>
9514
9515         * linespec.h (struct linespec_result): Add constructor and
9516         destructor.
9517         (init_linespec_result, destroy_linespec_result)
9518         (make_cleanup_destroy_linespec_result): Don't declare.
9519         * linespec.c (init_linespec_result): Remove.
9520         (linespec_result::~linespec_result): Rename from
9521         destroy_linespec_result.  Update.
9522         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
9523         Remove.
9524         * breakpoint.c (create_breakpoint, break_range_command)
9525         (decode_location_default): Update.
9526         * ax-gdb.c (agent_command_1): Update.
9527
9528 2017-04-12  Tom Tromey  <tom@tromey.com>
9529
9530         * remote.c (remote_download_tracepoint): Update.
9531         * python/py-breakpoint.c (bppy_get_location): Update.
9532         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
9533         (gdbscm_breakpoint_location): Update.
9534         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
9535         * breakpoint.h (struct breakpoint) <location, location_range_end>:
9536         Change type to event_location_up.
9537         * breakpoint.c (create_overlay_event_breakpoint)
9538         (create_longjmp_master_breakpoint)
9539         (create_std_terminate_master_breakpoint)
9540         (create_exception_master_breakpoint)
9541         (breakpoint_event_location_empty_p, print_breakpoint_location)
9542         (print_one_breakpoint_location, create_thread_event_breakpoint)
9543         (init_breakpoint_sal, create_breakpoint)
9544         (print_recreate_ranged_breakpoint, break_range_command)
9545         (init_ada_exception_breakpoint, say_where): Update.
9546         (base_breakpoint_dtor): Don't call delete_event_location.
9547         (bkpt_print_recreate, tracepoint_print_recreate)
9548         (dprintf_print_recreate, update_static_tracepoint)
9549         (breakpoint_re_set_default): Update.
9550
9551 2017-04-12  Tom Tromey  <tom@tromey.com>
9552
9553         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
9554         type of "to_do".  Update.
9555         (compute_stack_depth): Use std::vector.
9556
9557 2017-04-12  Tom Tromey  <tom@tromey.com>
9558
9559         * printcmd.c (find_instruction_backward): Use std::vector.
9560
9561 2017-04-12  Tom Tromey  <tom@tromey.com>
9562
9563         * symfile.c (objfilep): Remove typedef.
9564         (reread_symbols): Use a std::vector.
9565
9566 2017-04-12  Tom Tromey  <tom@tromey.com>
9567
9568         * mi/mi-main.c (exec_direction_forward): Remove.
9569         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
9570         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
9571         scoped_restore.
9572         * guile/guile.c (guile_repl_command, guile_command)
9573         (gdbscm_execute_gdb_command): Use scoped_restore.
9574         * go-exp.y (go_parse): Use scoped_restore.
9575         * d-exp.y (d_parse): Use scoped_restore.
9576         * cli/cli-decode.c (cmd_func): Use scoped_restore.
9577         * c-exp.y (c_parse): Use scoped_restore.
9578
9579 2017-04-12  Tom Tromey  <tom@tromey.com>
9580
9581         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
9582         (mi_parse): Update return type.
9583         (mi_parse_free): Remove.
9584         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
9585         (mi_parse::~mi_parse): Rename from mi_parse_free.
9586         (mi_parse_cleanup): Remove.
9587         (mi_parse): Return a unique_ptr.  Use new.
9588         * mi/mi-main.c (mi_execute_command): Update.
9589
9590 2017-04-12  Tom Tromey  <tom@tromey.com>
9591
9592         * location.c (explicit_location_lex_one): Return a
9593         unique_xmalloc_ptr.
9594         (string_to_explicit_location): Update.  Remove cleanups.
9595
9596 2017-04-12  Tom Tromey  <tom@tromey.com>
9597
9598         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
9599         (compare_value_and_voffset): Change type.  Update.
9600         (compute_vtable_size): Change type of "offset_vec".
9601         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
9602         (gnuv3_get_typeid): Remove extraneous declaration.
9603
9604 2017-04-12  Tom Tromey  <tom@tromey.com>
9605
9606         * charset.h (wchar_iterator): Fix comment.
9607
9608 2017-04-12  Tom Tromey  <tom@tromey.com>
9609
9610         * charset.c (iconv_wrapper): New class.
9611         (cleanup_iconv): Remove.
9612         (convert_between_encodings): Use it.
9613
9614 2017-04-12  Tom Tromey  <tom@tromey.com>
9615
9616         * symfile.h (increment_reading_symtab): Update type.
9617         * symfile.c (decrement_reading_symtab): Remove.
9618         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
9619         * psymtab.c (psymtab_to_symtab): Update.
9620         * dwarf2read.c (dw2_instantiate_symtab): Update.
9621
9622 2017-04-12  Tom Tromey  <tom@tromey.com>
9623
9624         * jit.c (struct jit_reader): Declare separately.  Add constructor
9625         and destructor.  Change type of "handle".
9626         (loaded_jit_reader): Define separately.
9627         (jit_reader_load): Update.  New "new".
9628         (jit_reader_unload_command): Use "delete".
9629         * gdb-dlfcn.h (struct dlclose_deleter): New.
9630         (gdb_dlhandle_up): New typedef.
9631         (gdb_dlopen, gdb_dlsym): Update types.
9632         (gdb_dlclose): Remove.
9633         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
9634         (gdb_dlsym): Change type of "handle".
9635         (make_cleanup_dlclose): Remove.
9636         (dlclose_deleter::operator()): Rename from gdb_dlclose.
9637         * compile/compile-c-support.c (load_libcc): Update.
9638
9639 2017-04-12  Tom Tromey  <tom@tromey.com>
9640
9641         * symtab.h (find_pcs_for_symtab_line): Change return type.
9642         * symtab.c (find_pcs_for_symtab_line): Change return type.
9643         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
9644         type of "vec".  Update.
9645         (ltpy_get_pcs_for_line): Update.
9646         * linespec.c (decode_digits_ordinary): Update.
9647
9648 2017-04-12  Tom Tromey  <tom@tromey.com>
9649
9650         * tracepoint.c (actions_command): Update.
9651         * python/python.c (python_command, python_interactive_command):
9652         Update.
9653         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9654         * guile/guile.c (guile_command): Update.
9655         * defs.h (read_command_lines, read_command_lines_1): Return
9656         command_line_up.
9657         (command_lines_deleter): New struct.
9658         (command_line_up): New typedef.
9659         * compile/compile.c (compile_code_command)
9660         (compile_print_command): Update.
9661         * cli/cli-script.h (get_command_line, copy_command_lines): Return
9662         command_line_up.
9663         (make_cleanup_free_command_lines): Remove.
9664         * cli/cli-script.c (get_command_line, read_command_lines_1)
9665         (copy_command_lines): Return command_line_up.
9666         (while_command, if_command, read_command_lines, define_command)
9667         (document_command): Update.
9668         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
9669         Remove.
9670         * breakpoint.h (breakpoint_set_commands): Change type of
9671         "commands".
9672         * breakpoint.c (breakpoint_set_commands): Change type of
9673         "commands".  Update.
9674         (do_map_commands_command, update_dprintf_command_list)
9675         (create_tracepoint_from_upload): Update.
9676
9677 2017-04-12  Tom Tromey  <tom@tromey.com>
9678
9679         * tracepoint.c (scope_info): Update.
9680         * spu-tdep.c (spu_catch_start): Update.
9681         * python/python.c (gdbpy_decode_line): Update.
9682         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
9683         * python/py-breakpoint.c (bppy_init): Update.
9684         * probe.c (parse_probes): Update.
9685         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
9686         * location.h (event_location_deleter): New struct.
9687         (event_location_up): New typedef.
9688         (new_linespec_location, new_address_location, new_probe_location)
9689         (new_explicit_location, copy_event_location)
9690         (string_to_event_location, string_to_event_location_basic)
9691         (string_to_explicit_location): Update return type.
9692         (make_cleanup_delete_event_location): Remove.
9693         * location.c (new_linespec_location, new_address_location)
9694         (new_probe_location, new_explicit_location, copy_event_location):
9695         Return event_location_up.
9696         (delete_event_location_cleanup)
9697         (make_cleanup_delete_event_location): Remove.
9698         (string_to_explicit_location, string_to_event_location_basic)
9699         (string_to_event_location): Return event_location_up.
9700         * linespec.c (canonicalize_linespec, event_location_to_sals)
9701         (decode_line_with_current_source)
9702         (decode_line_with_last_displayed, decode_objc): Update.
9703         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
9704         * completer.c (location_completer): Update.
9705         * cli/cli-cmds.c (edit_command, list_command): Update.
9706         * breakpoint.c (create_overlay_event_breakpoint)
9707         (create_longjmp_master_breakpoint)
9708         (create_std_terminate_master_breakpoint)
9709         (create_exception_master_breakpoint)
9710         (create_thread_event_breakpoint): Update.
9711         (init_breakpoint_sal): Update.  Remove some dead code.
9712         (create_breakpoint_sal): Change type of "location".  Update.
9713         (create_breakpoints_sal, create_breakpoint, break_command_1)
9714         (dprintf_command, break_range_command, until_break_command)
9715         (init_ada_exception_breakpoint)
9716         (strace_marker_create_sals_from_location)
9717         (update_static_tracepoint, trace_command, ftrace_command)
9718         (strace_command, create_tracepoint_from_upload): Update.
9719         * break-catch-throw.c (re_set_exception_catchpoint): Update.
9720         * ax-gdb.c (agent_command_1): Update.
9721
9722 2017-04-12  Pedro Alves  <palves@redhat.com>
9723
9724         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
9725         * configure.tgt: Handle i[34567]86-*-go32* and
9726         i[34567]86-*-msdosdjgpp*.
9727         * i386-tdep.c (i386_svr4_reg_to_regnum):
9728         Make extern.
9729         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
9730         i386-go32-tdep.c.
9731         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
9732         * i386-go32-tdep.c: New file.
9733         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
9734         declarations.
9735
9736 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
9737
9738         * aix-thread.c (pd_status2str): Change return type to const char *.
9739
9740 2017-04-12  Pedro Alves  <palves@redhat.com>
9741
9742         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
9743         calls to set_gdbarch_gnu_triplet_regexp.
9744
9745 2017-04-12  Pedro Alves  <palves@redhat.com>
9746
9747         PR gdb/21323
9748         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
9749         New enum value.
9750         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
9751         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
9752         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
9753         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
9754         * gdbarch.h, gdbarch.c: Regenerate.
9755         * aarch64-tdep.c (aarch64_gdbarch_init): Override
9756         gdbarch_wchar_bit and gdbarch_wchar_signed.
9757         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
9758         * arm-tdep.c (arm_gdbarch_init): Likewise.
9759         * avr-tdep.c (avr_gdbarch_init): Likewise.
9760         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
9761         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
9762         * i386-tdep.c (i386_go32_init_abi): Likewise.
9763         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9764         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9765         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9766         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9767         * sh-tdep.c (sh_gdbarch_init): Likewise.
9768         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9769         * sparc64-tdep.c (sparc64_init_abi): Likewise.
9770         * windows-tdep.c (windows_init_abi): Likewise.
9771         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9772
9773 2017-04-12  Pedro Alves  <palves@redhat.com>
9774
9775         PR c++/21323
9776         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
9777         cplus_primitive_type_char32_t>: New enum values.
9778         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
9779         and cplus_primitive_type_char32_t.
9780         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
9781         32, use the archtecture's built-in type for char16_t and char32_t,
9782         respectively.  Otherwise, fallback to init_integer_type as before,
9783         but make the type unsigned, and issue a complaint.
9784         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
9785
9786 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
9787
9788         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
9789         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
9790
9791 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9792
9793         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
9794         'const char *'.
9795
9796 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9797
9798         * common/common-utils.c (free_vector_argv): New function.
9799         * common/common-utils.h: Include <vector>.
9800         (free_vector_argv): New prototype.
9801         * darwin-nat.c (darwin_create_inferior): Rewrite function
9802         prototype in order to constify "exec_file" and accept a
9803         "std::string" for "allargs".
9804         * fork-child.c: Include <vector>.
9805         (breakup_args): Rewrite function, using C++.
9806         (fork_inferior): Rewrite function header, constify "exec_file_arg"
9807         and accept "std::string" for "allargs".  Update the code to
9808         calculate "argv" based on "allargs".  Update calls to "exec_fun"
9809         and "execvp".
9810         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
9811         order to constify "exec_file" and accept a "std::string" for
9812         "allargs".
9813         * go32-nat.c (go32_create_inferior): Likewise.
9814         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
9815         * infcmd.c (run_command_1): Constify "exec_file".  Use
9816         "std::string" for inferior arguments.
9817         * inferior.h (fork_inferior): Update prototype.
9818         * linux-nat.c (linux_nat_create_inferior): Rewrite function
9819         prototype in order to constify "exec_file" and accept a
9820         "std::string" for "allargs".
9821         * nto-procfs.c (procfs_create_inferior): Likewise.
9822         * procfs.c (procfs_create_inferior): Likewise.
9823         * remote-sim.c (gdbsim_create_inferior): Likewise.
9824         * remote.c (extended_remote_run): Update code to accept
9825         "std::string" as argument.
9826         (extended_remote_create_inferior): Rewrite function prototype in
9827         order to constify "exec_file" and accept a "std::string" for
9828         "allargs".
9829         * rs6000-nat.c (super_create_inferior): Likewise.
9830         (rs6000_create_inferior): Likewise.
9831         * target.h (struct target_ops) <to_create_inferior>: Likewise.
9832         * windows-nat.c (windows_create_inferior): Likewise.
9833
9834 2017-04-11  Pedro Alves  <palves@redhat.com>
9835
9836         * thread.c: Fix whitespace throughout.
9837
9838 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9839
9840         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
9841
9842 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
9843
9844         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
9845
9846 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
9847
9848         PR gdb/21364
9849         * osdata.c (info_osdata): Check if 'type' is an empty string
9850         instead of NULL.
9851
9852 2017-04-10  Pedro Alves  <palves@redhat.com>
9853
9854         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
9855         (ptid_to_global_thread_id, in_thread_list)
9856         (do_captured_list_thread_ids, set_resumed, set_running)
9857         (set_executing, set_stop_requested, finish_thread_state)
9858         (validate_registers_access, can_access_registers_ptid)
9859         (print_thread_info_1, switch_to_thread)
9860         (do_restore_current_thread_cleanup)
9861         (make_cleanup_restore_current_thread, thread_command)
9862         (thread_name_command): Use operator== instead of ptid_equal.
9863
9864 2017-04-10  Pedro Alves  <palves@redhat.com>
9865
9866         * thread.c (struct current_thread_cleanup) <next>: Delete field.
9867         (current_thread_cleanup_chain): Delete.
9868         (restore_current_thread_cleanup_dtor)
9869         (make_cleanup_restore_current_thread): Remove references to
9870         current_thread_cleanup_chain.
9871
9872 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
9873
9874         * msp430-tdep.c (msp430_pseudo_register_read): Never return
9875         REG_UNKNOWN.
9876
9877 2017-04-10  Yao Qi  <yao.qi@linaro.org>
9878
9879         PR gdb/19942
9880         * gdbthread.h (thread_info::deletable): New method.
9881         (thread_info::incref): New method.
9882         (thread_info::decref): New method.
9883         (thread_info::refcount): Move it to private.
9884         * infrun.c (save_stop_context): Call inc_refcount.
9885         (release_stop_context_cleanup): Likewise.
9886         * thread.c (set_thread_exited): New function.
9887         (init_thread_list): Delete "tp" only it is deletable, otherwise
9888         call set_thread_exited.
9889         (delete_thread_1): Call set_thread_exited.
9890         (current_thread_cleanup) <inferior_pid>: Remove.
9891         <thread>: New field.
9892         (restore_current_thread_ptid_changed): Removed.
9893         (do_restore_current_thread_cleanup): Adjust.
9894         (restore_current_thread_cleanup_dtor): Don't call
9895         find_thread_ptid.
9896         (set_thread_refcount): Use dec_refcount.
9897         (make_cleanup_restore_current_thread): Adjust.
9898         (thread_apply_all_command): Call inc_refcount.
9899         (_initialize_thread): Don't call
9900         observer_attach_thread_ptid_changed.
9901
9902 2017-04-10  Yao Qi  <yao.qi@linaro.org>
9903
9904         * thread.c (delete_thread_1): Hoist code on marking thread as
9905         exited.
9906
9907 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9908
9909         * windows-nat.c (windows_detach): Initialize ptid with
9910         minus_one_ptid.
9911
9912 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9913
9914         * unittests/ptid-selftests.c: Fix erroneous assert messages.
9915
9916 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
9917
9918         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
9919         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
9920         (bfin_pseudo_register_write): Likewise
9921
9922 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
9923
9924         * common/ptid.h (struct ptid): Change to...
9925         (class ptid_t): ... this.
9926         <ptid_t>: New constructors.
9927         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
9928         matches>: New methods.
9929         <make_null, make_minus_one>: New static methods.
9930         <pid>: Rename to...
9931         <m_pid>: ...this.
9932         <lwp>: Rename to...
9933         <m_lwp>: ...this.
9934         <tid>: Rename to...
9935         <m_tid>: ...this.
9936         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
9937         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
9938         as references, move comment to class ptid_t.
9939         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
9940         ptid_t static methods.
9941         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
9942         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
9943         Take ptid arguments as references, implement using ptid_t methods.
9944         * unittests/ptid-selftests.c: New file.
9945         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9946         unittests/ptid-selftests.c.
9947         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
9948
9949 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9950
9951         * python/python.c (python_run_simple_file): Cast mode literal to
9952         non-const char pointer as expected by PyFile_FromString.
9953
9954 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
9955
9956         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
9957         minus_one_ptid and null_ptid.
9958
9959 2017-04-05  Pedro Alves  <palves@redhat.com>
9960
9961         * warning.m4 (build_warnings): Remove -Wno-write-strings.
9962         * configure: Regenerate.
9963
9964 2017-04-05  Pedro Alves  <palves@redhat.com>
9965
9966         * ada-exp.y (yyerror): Constify.
9967         * ada-lang.c (bound_name, get_selections)
9968         (ada_variant_discrim_type)
9969         (ada_variant_discrim_name, ada_value_struct_elt)
9970         (ada_lookup_struct_elt_type, is_unchecked_variant)
9971         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
9972         (catch_ada_exception_command_split)
9973         (catch_ada_assert_command_split, catch_assert_command)
9974         (ada_op_name): Constify.
9975         * ada-lang.h (ada_yyerror, get_selections)
9976         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9977         * arc-tdep.c (arc_print_frame_cache): Constify.
9978         * arm-tdep.c (arm_skip_stub): Constify.
9979         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9980         (gen_aggregate_elt_ref): Constify.
9981         * bcache.c (print_bcache_statistics): Constify.
9982         * bcache.h (print_bcache_statistics): Constify.
9983         * break-catch-throw.c (catch_exception_command_1):
9984         * breakpoint.c (struct ep_type_description::description):
9985         Constify.
9986         (add_solib_catchpoint): Constify.
9987         (catch_fork_command_1): Add cast.
9988         (add_catch_command): Constify.
9989         * breakpoint.h (add_catch_command, add_solib_catchpoint):
9990         Constify.
9991         * bsd-uthread.c (bsd_uthread_state): Constify.
9992         * buildsym.c (patch_subfile_names): Constify.
9993         * buildsym.h (next_symbol_text_func, patch_subfile_names):
9994         Constify.
9995         * c-exp.y (yyerror): Constify.
9996         (token::oper): Constify.
9997         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9998         * c-varobj.c (cplus_describe_child): Constify.
9999         * charset.c (find_charset_names): Add cast.
10000         (find_charset_names): Constify array and add const_cast.
10001         * cli/cli-cmds.c (complete_command, cd_command): Constify.
10002         (edit_command): Constify.
10003         * cli/cli-decode.c (lookup_cmd): Constify.
10004         * cli/cli-dump.c (dump_memory_command, dump_value_command):
10005         Constify.
10006         (struct dump_context): Constify.
10007         (add_dump_command, restore_command): Constify.
10008         * cli/cli-script.c (get_command_line): Constify.
10009         * cli/cli-script.h (get_command_line): Constify.
10010         * cli/cli-utils.c (check_for_argument): Constify.
10011         * cli/cli-utils.h (check_for_argument): Constify.
10012         * coff-pe-read.c (struct read_pe_section_data): Constify.
10013         * command.h (lookup_cmd): Constify.
10014         * common/print-utils.c (decimal2str): Constify.
10015         * completer.c (gdb_print_filename): Constify.
10016         * corefile.c (set_gnutarget): Constify.
10017         * cp-name-parser.y (yyerror): Constify.
10018         * cp-valprint.c (cp_print_class_member): Constify.
10019         * cris-tdep.c (cris_register_name, crisv32_register_name):
10020         Constify.
10021         * d-exp.y (yyerror): Constify.
10022         (struct token::oper): Constify.
10023         * d-lang.h (d_yyerror): Constify.
10024         * dbxread.c (struct header_file_location::name): Constify.
10025         (add_old_header_file, add_new_header_file, last_function_name)
10026         (dbx_next_symbol_text, add_bincl_to_list)
10027         (find_corresponding_bincl_psymtab, set_namestring)
10028         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10029         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10030         * defs.h (command_line_input, print_address_symbolic)
10031         (deprecated_readline_begin_hook): Constify.
10032         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10033         Constify.
10034         * event-top.c (handle_line_of_input): Constify and add cast.
10035         * exceptions.c (catch_errors): Constify.
10036         * exceptions.h (catch_errors): Constify.
10037         * expprint.c (print_subexp_standard, op_string, op_name)
10038         (op_name_standard, dump_raw_expression, dump_raw_expression):
10039         * expression.h (op_name, op_string, dump_raw_expression):
10040         Constify.
10041         * f-exp.y (yyerror): Constify.
10042         (struct token::oper): Constify.
10043         (struct f77_boolean_val::name): Constify.
10044         * f-lang.c (f_word_break_characters): Constify.
10045         * f-lang.h (f_yyerror): Constify.
10046         * fork-child.c (fork_inferior): Add cast.
10047         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10048         (new_variant): Constify.
10049         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10050         * gdbarch.c: Regenerate.
10051         * gdbcore.h (set_gnutarget): Constify.
10052         * go-exp.y (yyerror): Constify.
10053         (token::oper): Constify.
10054         * go-lang.h (go_yyerror): Constify.
10055         * go32-nat.c (go32_sysinfo): Constify.
10056         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10057         * guile/scm-cmd.c (cmdscm_function): Constify.
10058         * guile/scm-param.c (pascm_param_value): Constify.
10059         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10060         (h8300sx_register_name): Constify.
10061         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10062         Constify.
10063         * ia64-tdep.c (ia64_register_names): Constify.
10064         * infcmd.c (construct_inferior_arguments): Constify.
10065         (path_command, attach_post_wait): Constify.
10066         * language.c (show_range_command, show_case_command)
10067         (unk_lang_error): Constify.
10068         * language.h (language_defn::la_error)
10069         (language_defn::la_name_of_this): Constify.
10070         * linespec.c (decode_line_2): Constify.
10071         * linux-thread-db.c (thread_db_err_str): Constify.
10072         * lm32-tdep.c (lm32_register_name): Constify.
10073         * m2-exp.y (yyerror): Constify.
10074         * m2-lang.h (m2_yyerror): Constify.
10075         * m32r-tdep.c (m32r_register_names): Constify and make static.
10076         * m68hc11-tdep.c (m68hc11_register_names): Constify.
10077         * m88k-tdep.c (m88k_register_name): Constify.
10078         * macroexp.c (appendmem): Constify.
10079         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10080         (upgrade_type, parse_external, parse_partial_symbols)
10081         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10082         (new_symbol): Constify.
10083         * memattr.c (mem_info_command): Constify.
10084         * mep-tdep.c (register_name_from_keyword): Constify.
10085         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10086         Constify.
10087         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10088         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10089         * mi/mi-main.c (captured_mi_execute_command): Constify and add
10090         cast.
10091         (mi_execute_async_cli_command): Constify.
10092         * mips-tdep.c (mips_register_name): Constify.
10093         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10094         (am33_register_name, am33_2_register_name)
10095         * moxie-tdep.c (moxie_register_names): Constify.
10096         * nat/linux-osdata.c (osdata_type): Constify fields.
10097         * nto-tdep.c (nto_parse_redirection): Constify.
10098         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10099         (lookup_child_selector): Constify.
10100         (objc_methcall::name): Constify.
10101         * objc-lang.h (lookup_objc_class, lookup_child_selector)
10102         (lookup_struct_typedef): Constify.
10103         * objfiles.c (pc_in_section): Constify.
10104         * objfiles.h (pc_in_section): Constify.
10105         * p-exp.y (struct token::oper): Constify.
10106         (yyerror): Constify.
10107         * p-lang.h (pascal_yyerror): Constify.
10108         * parser-defs.h (op_name_standard): Constify.
10109         (op_print::string): Constify.
10110         (exp_descriptor::op_name): Constify.
10111         * printcmd.c (print_address_symbolic): Constify.
10112         * psymtab.c (print_partial_symbols): Constify.
10113         * python/py-breakpoint.c (stop_func): Constify.
10114         (bppy_get_expression): Constify.
10115         * python/py-cmd.c (cmdpy_completer::name): Constify.
10116         (cmdpy_function): Constify.
10117         * python/py-event.c (evpy_add_attribute)
10118         (gdbpy_initialize_event_generic): Constify.
10119         * python/py-event.h (evpy_add_attribute)
10120         (gdbpy_initialize_event_generic): Constify.
10121         * python/py-evts.c (add_new_registry): Constify.
10122         * python/py-finishbreakpoint.c (outofscope_func): Constify.
10123         * python/py-framefilter.c (get_py_iter_from_func): Constify.
10124         * python/py-inferior.c (get_buffer): Add cast.
10125         * python/py-param.c (parm_constant::name): Constify.
10126         * python/py-unwind.c (fprint_frame_id): Constify.
10127         * python/python.c (gdbpy_parameter_value): Constify.
10128         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10129         * remote.c (memory_packet_config::name): Constify.
10130         (show_packet_config_cmd, remote_write_bytes)
10131         (remote_buffer_add_string):
10132         * reverse.c (exec_reverse_once): Constify.
10133         * rs6000-tdep.c (variant::name, variant::description): Constify.
10134         * rust-exp.y (rustyyerror): Constify.
10135         * rust-lang.c (rust_op_name): Constify.
10136         * rust-lang.h (rustyyerror): Constify.
10137         * serial.h (serial_ops::name): Constify.
10138         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10139         (sh_sh3e_register_name, sh_sh2e_register_name)
10140         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10141         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10142         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10143         (sh_sh4al_dsp_register_name): Constify.
10144         * sh64-tdep.c (sh64_register_name): Constify.
10145         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10146         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10147         * stabsread.c (patch_block_stabs, read_type_number)
10148         (ref_map::stabs, ref_add, process_reference)
10149         (symbol_reference_defined, define_symbol, define_symbol)
10150         (error_type, read_type, read_member_functions, read_cpp_abbrev)
10151         (read_one_struct_field, read_struct_fields, read_baseclasses)
10152         (read_tilde_fields, read_struct_type, read_array_type)
10153         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10154         (read_huge_number, read_range_type, read_args, common_block_start)
10155         (find_name_end): Constify.
10156         * stabsread.h (common_block_start, define_symbol)
10157         (process_one_symbol, symbol_reference_defined, ref_add):
10158         * symfile.c (get_section_index, add_symbol_file_command):
10159         * symfile.h (get_section_index): Constify.
10160         * target-descriptions.c (tdesc_type::name): Constify.
10161         (tdesc_free_type): Add cast.
10162         * target.c (find_default_run_target):
10163         (add_deprecated_target_alias, find_default_run_target)
10164         (target_announce_detach): Constify.
10165         (do_option): Constify.
10166         * target.h (add_deprecated_target_alias): Constify.
10167         * thread.c (print_thread_info_1): Constify.
10168         * top.c (deprecated_readline_begin_hook, command_line_input):
10169         Constify.
10170         (init_main): Add casts.
10171         * top.h (handle_line_of_input): Constify.
10172         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10173         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10174         (tfind_command): Rename to ...
10175         (tfind_command_1): ... this and constify.
10176         (tfind_command): New function.
10177         (tfind_end_command, tfind_start_command): Adjust.
10178         (encode_source_string): Constify.
10179         * tracepoint.h (encode_source_string): Constify.
10180         * tui/tui-data.c (tui_partial_win_by_name): Constify.
10181         * tui/tui-data.h (tui_partial_win_by_name): Constify.
10182         * tui/tui-source.c (tui_set_source_content_nil): Constify.
10183         * tui/tui-source.h (tui_set_source_content_nil): Constify.
10184         * tui/tui-win.c (parse_scrolling_args): Constify.
10185         * tui/tui-windata.c (tui_erase_data_content): Constify.
10186         * tui/tui-windata.h (tui_erase_data_content): Constify.
10187         * tui/tui-winsource.c (tui_erase_source_content): Constify.
10188         * tui/tui.c (tui_enable): Add cast.
10189         * utils.c (defaulted_query): Constify.
10190         (init_page_info): Add cast.
10191         (puts_debug, subset_compare): Constify.
10192         * utils.h (subset_compare): Constify.
10193         * varobj.c (varobj_format_string): Constify.
10194         * varobj.h (varobj_format_string): Constify.
10195         * vax-tdep.c (vax_register_name): Constify.
10196         * windows-nat.c (windows_detach): Constify.
10197         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10198         * xml-support.c (gdb_xml_end_element): Constify.
10199         * xml-tdesc.c (tdesc_start_reg): Constify.
10200         * xstormy16-tdep.c (xstormy16_register_name): Constify.
10201         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10202         * xtensa-tdep.h (xtensa_register_t::name): Constify.
10203
10204 2017-04-05  Pedro Alves  <palves@redhat.com>
10205
10206         * proc-api.c (struct trans): Constify.
10207         (procfs_note): Constify.
10208         * proc-events.c (struct trans, syscall_table):
10209         * proc-flags.c (struct trans): Constify.
10210         * proc-utils.h (procfs_note): Constify.
10211         * proc-why.c (struct trans): Constify.
10212         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10213         (procfs_detach): Constify.
10214         * sol-thread.c (struct string_map): Constify.
10215         (td_err_string, td_state_string): Constify.
10216
10217 2017-04-05  Pedro Alves  <palves@redhat.com>
10218
10219         * proc-api.c (procfs_filename): Don't initialize
10220         procfs_filename.
10221         (prepare_to_trace): Assume procfs_filename is non-NULL.
10222         (_initialize_proc_api): Give procfs_filename a default value here.
10223
10224 2017-04-05  Pedro Alves  <palves@redhat.com>
10225
10226         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10227         'cond_string' parameter.
10228         (extract_exception_regexp): Constify 'string' parameter.
10229         (catch_exception_command_1): Constify.
10230         * breakpoint.c (init_catchpoint)
10231         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10232         parameter.
10233         (ep_parse_optional_if_clause, catch_fork_command_1)
10234         (catch_exec_command_1): Constify.
10235         * breakpoint.h (init_catchpoint): Constify 'cond_string'
10236         parameter.
10237         (ep_parse_optional_if_clause): Constify.
10238         * cli/cli-utils.c (remove_trailing_whitespace)
10239         (check_for_argument): Constify.
10240         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10241         non-const overload.
10242         (check_for_argument): Likewise.
10243
10244 2017-04-05  Pedro Alves  <palves@redhat.com>
10245
10246         * event-top.c (command_line_handler): Add cast to execute_command
10247         call.
10248         * record-btrace.c (cmd_record_btrace_bts_start)
10249         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10250         (cmd_record_btrace_start): Add cast to execute_command call.
10251         * record-full.c (record_full_goto_insn):
10252         * record.c (record_start, record_stop): Add cast to
10253         execute_command_to_string calls.
10254         (cmd_record_start): Add cast to execute_command calls.
10255
10256 2017-04-05  Pedro Alves  <palves@redhat.com>
10257
10258         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10259         static inline function.
10260         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10261         array and use gdb_PyArg_ParseTupleAndKeywords.
10262         * python/py-cmd.c (cmdpy_init): Likewise.
10263         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10264         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10265         (infpy_search_memory): Likewise.
10266         * python/py-objfile.c (objfpy_add_separate_debug_file)
10267         (gdbpy_lookup_objfile): Likewise.
10268         * python/py-symbol.c (gdbpy_lookup_symbol)
10269         (gdbpy_lookup_global_symbol): Likewise.
10270         * python/py-type.c (gdbpy_lookup_type): Likewise.
10271         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10272         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10273         Likewise.
10274
10275 2017-04-05  Pedro Alves  <palves@redhat.com>
10276
10277         * python/python-internal.h (gdb_PyGetSetDef): New type.
10278         * python/py-block.c (block_object_getset)
10279         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10280         * python/py-event.c (event_object_getset)
10281         (finish_breakpoint_object_getset): Likewise.
10282         * python/py-inferior.c (inferior_object_getset): Likewise.
10283         * python/py-infthread.c (thread_object_getset): Likewise.
10284         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10285         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10286         * python/py-objfile.c (objfile_getset): Likewise.
10287         * python/py-progspace.c (pspace_getset): Likewise.
10288         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10289         Likewise.
10290         * python/py-record.c (recpy_record_getset): Likewise.
10291         * python/py-symbol.c (symbol_object_getset): Likewise.
10292         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10293         Likewise.
10294         * python/py-type.c (type_object_getset, field_object_getset):
10295         Likewise.
10296         * python/py-value.c (value_object_getset): Likewise.
10297
10298 2017-04-05  Pedro Alves  <palves@redhat.com>
10299
10300         * python/python-internal.h (gdb_PyObject_CallMethod)
10301         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10302         New functions.
10303         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10304         (PySys_GetObject, PySys_SetPath): New macros.
10305
10306 2017-04-05  Pedro Alves  <palves@redhat.com>
10307
10308         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10309         info_osdata_command.
10310         * osdata.c (info_osdata_command): Rename to ...
10311         (info_osdata): ... this.  Constify 'type' parameter, and remove
10312         the 'from_tty' parameter.  Accept NULL TYPE.
10313         (info_osdata_command): New function.
10314         * osdata.h (info_osdata_command): Remove declaration.
10315         (info_osdata): New declaration.
10316
10317 2017-04-05  Pedro Alves  <palves@redhat.com>
10318
10319         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
10320         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
10321         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
10322         parameter.
10323         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
10324         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
10325         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
10326         parameter.
10327         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
10328         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
10329         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
10330         (mi_cmd_file_list_exec_source_files)
10331         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
10332         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10333         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
10334         parameter.
10335         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
10336         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
10337         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
10338         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
10339         (mi_cmd_stack_info_frame): Constify 'command' parameter.
10340         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10341         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10342         'command' parameter.
10343         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10344         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10345         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10346         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10347         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10348         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10349         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10350         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10351         (mi_cmd_var_set_update_range): Constify 'command' parameter.
10352         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10353         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10354         parameter.
10355         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10356         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10357         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10358         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10359         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10360         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10361         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10362         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10363         (mi_cmd_data_list_changed_registers)
10364         (mi_cmd_data_write_register_values)
10365         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10366         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10367         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10368         (mi_cmd_list_features, mi_cmd_list_target_features)
10369         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10370         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10371         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10372         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10373         (mi_cmd_trace_frame_collected): Constify 'command'
10374         parameter.
10375         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10376         'command' parameter.
10377
10378 2017-04-05  Pedro Alves  <palves@redhat.com>
10379
10380         * ada-lang.c (ada_completer_word_break_characters): Now a const
10381         array.
10382         (ada_get_gdb_completer_word_break_characters): Constify.
10383         * completer.c (gdb_completer_command_word_break_characters)
10384         (gdb_completer_file_name_break_characters)
10385         (gdb_completer_quote_characters): Now const arrays.
10386         (get_gdb_completer_quote_characters): Constify.
10387         (set_rl_completer_word_break_characters): New function.
10388         (set_gdb_completion_word_break_characters)
10389         (complete_line_internal): Use it.
10390         * completer.h (get_gdb_completer_quote_characters): Constify.
10391         (set_rl_completer_word_break_characters): Declare.
10392         * f-lang.c (f_word_break_characters): Constify.
10393         * language.c (default_word_break_characters): Constify.
10394         * language.h (language_defn::la_word_break_characters): Constify.
10395         (default_word_break_characters): Constify.
10396         * top.c (init_main): Use set_rl_completer_word_break_characters.
10397
10398 2017-04-05  Pedro Alves  <palves@redhat.com>
10399
10400         * aix-thread.c (aix_thread_pid_to_str)
10401         (aix_thread_extra_thread_info): Constify.
10402         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10403         * bsd-uthread.c (bsd_uthread_extra_thread_info)
10404         (bsd_uthread_pid_to_str): Constify.
10405         * corelow.c (core_pid_to_str): Constify.
10406         * darwin-nat.c (darwin_pid_to_str): Constify.
10407         * fbsd-nat.c (fbsd_pid_to_str): Constify.
10408         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
10409         Constify.
10410         * gnu-nat.c (gnu_pid_to_str): Constify.
10411         * go32-nat.c (go32_pid_to_str): Constify.
10412         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
10413         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
10414         * inferior.c (inferior_pid_to_str): Constify.
10415         * linux-nat.c (linux_nat_pid_to_str): Constify.
10416         * linux-tdep.c (linux_core_pid_to_str): Constify.
10417         * linux-thread-db.c (thread_db_pid_to_str)
10418         (thread_db_extra_thread_info): Constify.
10419         * nto-tdep.c (nto_extra_thread_info): Constify.
10420         * nto-tdep.h (nto_extra_thread_info): Constify.
10421         * obsd-nat.c (obsd_pid_to_str): Constify.
10422         * procfs.c (procfs_pid_to_str): Constify.
10423         * ravenscar-thread.c (ravenscar_extra_thread_info)
10424         (ravenscar_pid_to_str): Constify.
10425         * remote-sim.c (gdbsim_pid_to_str): Constify.
10426         * remote.c (remote_threads_extra_info, remote_pid_to_str):
10427         Constify.
10428         * sol-thread.c (solaris_pid_to_str): Constify.
10429         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
10430         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
10431         * target.c (default_pid_to_str, target_pid_to_str)
10432         (normal_pid_to_str, default_pid_to_str): Constify.
10433         * target.h (target_ops::to_pid_to_str)
10434         (target_ops::to_extra_thread_info): Constify.
10435         (target_pid_to_str, normal_pid_to_str): Constify.
10436         * windows-nat.c (windows_pid_to_str): Constify.
10437         * gdbarch.sh (core_pid_to_str): Constify.
10438         * target-delegates.c: Regenerate.
10439         * gdbarch.h, gdbarch.c: Regenerate.
10440
10441 2017-04-05  Pedro Alves  <palves@redhat.com>
10442
10443         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
10444         the memory of the temporary warning_pre_print override.
10445         * utils.c (warning_pre_print): Constify.
10446         * utils.h (warning_pre_print): Constify.
10447
10448 2017-04-05  Pedro Alves  <palves@redhat.com>
10449
10450         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
10451         (shell_command): New function.
10452         (make_command): Use std::string.
10453         (init_cli_cmds): Register shell_command instead of shell_escape.
10454
10455 2017-04-05  Pedro Alves  <palves@redhat.com>
10456
10457         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
10458         * tracepoint.c (default_collect): Don't initialize.
10459
10460 2017-04-05  Pedro Alves  <palves@redhat.com>
10461
10462         * macroexp.c (macro_buffer::shared): Now a bool.
10463         (init_buffer): Update.
10464         (init_shared_buffer): Constify 'addr' parameter.
10465         (substitute_args, expand, macro_expand, macro_expand_next): Remove
10466         casts.
10467
10468 2017-04-05  Pedro Alves  <palves@redhat.com>
10469
10470         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
10471         * disasm.c (set_disassembler_options): Constify local.
10472         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
10473
10474 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
10475
10476         PR gdb/21352
10477         * tracefile.c (tsave_command): Fix argument parsing for '-r'
10478         option.
10479
10480 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10481
10482         * frame.c (frame_unwind_register_unsigned): Call
10483         frame_unwind_register_value.
10484
10485 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10486
10487         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
10488         Use gdb_test_multiple, and don't match anchor.
10489
10490 2017-04-05  Pedro Alves  <palves@redhat.com>
10491
10492         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
10493         (Write After Approval): Remove Simon Marchi.
10494
10495 2017-04-05  Pedro Alves  <palves@redhat.com>
10496
10497         * common/gdb_optional.h (optional::optional): Make constexpr and
10498         initialize m_dummy.
10499
10500 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10501
10502         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10503         (amd64fbsd_jmp_buf_reg_offset): Remove.
10504         (amd64fbsd_supply_uthread): Remove function.
10505         (amd64fbsd_collect_uthread): Remove function.
10506         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
10507         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
10508         (x86_64-*-freebsd*): Remove bsd-uthread.o.
10509         (fbsd-nat.c): Update comment.
10510         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10511         (i386fbsd_jmp_buf_reg_offset): Remove.
10512         (i386fbsd_supply_uthread): Remove function.
10513         (i386fbsd_collect_uthread): Remove function.
10514         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
10515
10516 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10517
10518         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
10519         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
10520         * NEWS: Mention that support for FreeBSD/alpha was removed.
10521         * alpha-fbsd-tdep.c: Delete file.
10522         * config/alpha/fbsd.mh: Delete file.
10523         * configure.host: Delete alpha*-*-freebsd* and
10524         alpha*-*-kfreebsd*-gnu.
10525         * configure.tgt: Delete alpha*-*-freebsd* and
10526         alpha*-*-kfreebsd*-gnu.
10527
10528 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10529
10530         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
10531         amd64bsd_store_inferior_registers): Use ptid from regcache.
10532
10533 2017-04-04  Pedro Alves  <palves@redhat.com>
10534
10535         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
10536         data fields, make them private and add "m_" prefixes.
10537         (lnp_state_machine::lnp_state_machine): New ctor.
10538         (record_line, check_line_address, handle_set_discriminator)
10539         (handle_set_address, handle_advance_pc, handle_special_opcode)
10540         (handle_advance_line, handle_set_file, handle_negate_stmt)
10541         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
10542         (end_sequence, advance_line): New methods.
10543         (m_gdbarch, m_record_lines_p): New fields.
10544         (lnp_reader_state): Delete.
10545         (dwarf_record_line): Rename to ...
10546         (lnp_state_machine::record_line): ... adjust.
10547         (init_lnp_state_machine): Delete.
10548         (lnp_state_machine::lnp_state_machine): New.
10549         (check_line_address): Rename to ...
10550         (lnp_state_machine::check_line_address): This.
10551         (dwarf_decode_lines_1): Remove reference to "reader_state".
10552         Adjust lnp_state_machine having a non-default ctor.  Use bool.
10553         State machine internal state manipulation moved to
10554         lnp_state_machine methods.
10555
10556 2017-04-04  Pedro Alves  <palves@redhat.com>
10557
10558         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10559         unittests/offset-type-selftests.c.
10560         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
10561         * common/offset-type.h: New file.
10562         * common/preprocessor.h: New file.
10563         * common/traits.h: New file.
10564         * common/valid-expr.h: New file.
10565         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
10566         sect_offset and cu_offset strong typedefs throughout.
10567         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
10568         typedefs throughout.
10569         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
10570         sect_offset and cu_offset strong typedefs throughout.
10571         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
10572         typedefs throughout.
10573         * gdbtypes.h: Include "common/offset-type.h".
10574         (cu_offset): Now an offset type (strong typedef) instead of a
10575         struct.
10576         (sect_offset): Likewise.
10577         (union call_site_parameter_u): Rename "param_offset" field to
10578         "param_cu_off".
10579         * unittests/offset-type-selftests.c: New file.
10580
10581 2017-04-04  Pedro Alves  <palves@redhat.com>
10582
10583         * common/underlying.h: New file.
10584         * dwarf2read.c: Include "common/gdb_optional.h" and
10585         "common/underlying.h".
10586         (dir_index, file_name_index): New types.
10587         (file_entry): Use them.
10588         (file_entry::include): Use to_underlying.
10589         (line_header::add_file_name): Use dir_index.
10590         (read_formatted_entries): Use gdb::optional.  Read form before
10591         writting to file_entry.
10592         (dwarf_decode_line_header): Use dir_index.
10593         (lnp_state_machine::current_file): Use to_underlying.
10594         (lnp_state_machine::file): Change type to file_name_index.
10595         (dwarf_record_line): Use to_underlying.
10596         (init_lnp_state_machine): Use file_name_index.
10597         (dwarf_decode_lines_1): Use dir_index and file_name_index.
10598
10599 2017-04-04  Pedro Alves  <palves@redhat.com>
10600
10601         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
10602         operator bool, has_value and get methods.
10603
10604 2017-04-04  Pedro Alves  <palves@redhat.com>
10605
10606         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
10607         fields.
10608         (line_header): Initialize all data fields.  Change type of
10609         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
10610         Change type of include_dirs to std::vector<const char *>.  Remove
10611         num_include_dirs, include_dirs_size.  Change type of file_names to
10612         std::vector<file_entry>.  Remove num_file_names, file_names_size.
10613         (line_header::line_header): New.
10614         (line_header::add_include_dir, line_header::add_file_name): New
10615         methods.
10616         (line_header::include_dir_at): Remove NULL check.
10617         (line_header::file_name_at): Add const overload.
10618         (line_header_up): New unique_ptr typedef.
10619         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
10620         std::vector.  Remove free_line_header call.
10621         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
10622         free_line_header call.
10623         (free_cu_line_header): Delete.
10624         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
10625         (setup_type_unit_groups): Use line_header_up instead of cleanups.
10626         Adjust to use std::vector.
10627         (free_line_header): Delete.
10628         (free_line_header_voidp): Use delete.
10629         (add_include_dir): Replace with ...
10630         (line_header::add_include_dir): ... this method.  Use std::vector.
10631         (add_file_name): Replace with ...
10632         (line_header::add_file_name): ... this method.  Use std::vector.
10633         (add_include_dir_stub): Delete.
10634         (read_formatted_entries): Remove memset.
10635         (dwarf_decode_line_header): Return a line_header_up instead of a
10636         raw pointer.  Remove cleanup handling.  Pass lambdas to
10637         read_formatted_entries.  Adjust to use line_header methods.
10638         (dwarf_decode_lines_1): Adjust to use line_header methods.
10639         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
10640         use std::vector.
10641
10642 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
10643
10644         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
10645         instead of struct ptid.
10646
10647 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
10648
10649         * frame.c (get_frame_register_bytes): Unwind using value.
10650         (put_frame_register_bytes): Likewise.
10651
10652 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
10653
10654         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
10655         aggregate-like.
10656
10657 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
10658
10659         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
10660
10661 2017-03-29  Yao Qi  <yao.qi@linaro.org>
10662
10663         * gdbthread.h (struct thread_info): Declare constructor and
10664         destructor.  Add some in-class member initializers.
10665         * thread.c (free_thread): Remove.
10666         (init_thread_list): Call delete instead of free_thread.
10667         (new_thread): Call thread_info constructor.
10668         (thread_info::thread_info): New function.
10669         (thread_info::~thread_info): New function.
10670         (delete_thread_1): Call delete instead of free_thread.
10671         (make_cleanup_restore_current_thread): Move tp and frame to
10672         inner block.
10673
10674 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10675
10676         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
10677         (arc_skip_prologue): Likewise.
10678         (arc_make_frame_cache): Likewise.
10679         (arc_pv_get_operand): New function.
10680         (arc_is_in_prologue): Likewise.
10681         (arc_analyze_prologue): Likewise.
10682         (arc_print_frame_cache): Likewise.
10683         (MAX_PROLOGUE_LENGTH): New constant.
10684
10685 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10686
10687         * configure.tgt: Add arc-insn.o.
10688         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
10689         (dump_arc_instruction_command): New function.
10690         (arc_fprintf_disasm): Likewise.
10691         (arc_disassemble_info): Likewise.
10692         (arc_insn_get_operand_value): Likewise.
10693         (arc_insn_get_operand_value_signed): Likewise.
10694         (arc_insn_get_memory_base_reg): Likewise.
10695         (arc_insn_get_memory_offset): Likewise.
10696         (arc_insn_get_branch_target): Likewise.
10697         (arc_insn_dump): Likewise.
10698         (arc_insn_get_linear_next_pc): Likewise.
10699         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
10700         (arc_disassemble_info): Likewise.
10701         (arc_insn_get_branch_target): Likewise.
10702         (arc_insn_get_linear_next_pc): Likewise.
10703         * NEWS: Mention new "maint print arc arc-instruction".
10704
10705 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10706
10707         * arc-tdep (maintenance_print_arc_list): New variable.
10708         (maintenance_print_arc_command): New function.
10709
10710 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10711
10712         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
10713         Add "limm" and "reserved".
10714         (arc_cannot_fetch_register, arc_cannot_store_register): Add
10715         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
10716         * arc-tdep.h (arc_regnum): Likewise.
10717
10718 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10719
10720         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10721         for THREADPTR register.
10722         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
10723         register.
10724         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
10725         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
10726         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
10727
10728 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10729
10730         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
10731         registers above gdbarch_num_regs (gdbarch) as privileged in
10732         call0 ABI.
10733
10734 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10735
10736         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10737         for a single specified register or for all registers in
10738         a0_base..a0_base + C0_NREGS range.
10739         (supply_gregset_reg): Call regcache_raw_supply for a single
10740         specified register or for all registers in a0_base..a0_base +
10741         C0_NREGS range.
10742
10743 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10744
10745         * arch/xtensa.h (C0_NREGS): Add definition.
10746         * xtensa-tdep.c (C0_NREGS): Remove definition.
10747
10748 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10749
10750         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
10751         Drop xtensa_default_isa initialization.
10752         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
10753
10754 2017-03-27  Pedro Alves  <palves@redhat.com>
10755
10756         * dwarf2read.c (file_entry) <dir_index>: Add comment.
10757         (file_entry::include_dir): New method.
10758         (line_header::include_dir_at, line_header::file_name_at): New
10759         methods.
10760         (setup_type_unit_groups, setup_type_unit_groups)
10761         (psymtab_include_file_name): Simplify using the new methods.
10762         (lnp_state_machine) <the_line_header>: New field.
10763         <file>: Add comment.
10764         (lnp_state_machine::current_file): New method.
10765         (dwarf_record_line): Simplify using the new methods.
10766         (init_lnp_state_machine): Initialize the "the_line_header" field.
10767         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
10768         Simplify using the new methods.
10769
10770 2017-03-27  Pedro Alves  <palves@redhat.com>
10771
10772         * cp-name-parser.y (make_empty): Delete.
10773         (demangler_special, nested_name, ptr_operator, array_indicator)
10774         (direct_declarator, declarator_1): Use fill_comp instead of
10775         make_empty.
10776
10777 2017-03-27  Pedro Alves  <palves@redhat.com>
10778
10779         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
10780         to ATTRIBUTE_PRINTF.
10781         * solib-target.c (library_list_start_list): Print "string" not
10782         "version".
10783         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
10784         gdb_xml_error call.
10785
10786 2017-03-27  Pedro Alves  <palves@redhat.com>
10787
10788         * dwarf2read.c (struct file_and_directory): New.
10789         (dwarf2_get_dwz_file): Adjust to use std::string.
10790         (dw2_get_file_names_reader): Adjust to use file_and_directory.
10791         (find_file_and_directory): Adjust to return a file_and_directory
10792         object.
10793         (read_file_scope): Adjust to use file_and_directory.  Remove
10794         make_cleanup/do_cleanups calls.
10795         (open_and_init_dwp_file): Adjust to use std::string.  Remove
10796         make_cleanup/do_cleanups calls.
10797         * python/python.c (do_start_initialization): Adjust to ldirname
10798         returning a std::string.
10799         * utils.c (ldirname): Now returns a std::string.
10800         * utils.h (ldirname): Change return type to std::string.
10801         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
10802         returning a std::string.
10803         * xml-tdesc.c (file_read_description_xml): Likewise.
10804
10805 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
10806
10807         * regcache.c (regcache_debug_print_register): New function.
10808         * regcache.h (regcache_debug_print_register): New declaration.
10809         * target.c (debug_print_register): Remove.
10810         (target_fetch_registers): Call regcache_debug_print_register.
10811         (target_store_registers): Likewise.
10812
10813 2017-03-24  Pádraig Brady  <pbrady@fb.com>
10814
10815         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
10816         reference beyond the 'lh->include_dirs' array before accessing to
10817         it.
10818         (psymtab_include_file_name): Likewise.
10819         (dwarf_decode_lines_1): Likewise.
10820         (dwarf_decode_lines): Likewise.
10821         (file_file_name): Likewise.
10822
10823 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
10824
10825         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
10826         inferior_ptid.
10827         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10828         ps_lsetfpregs): Likewise.
10829         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
10830         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10831         ps_lsetfpregs): Likewise.
10832         * target.c (target_fetch_registers, target_store_registers):
10833         Remove asserts.
10834
10835 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
10836
10837         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
10838
10839 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10840
10841         * aarch64-tdep.c (aarch64_process_record_test): Declare.
10842         (_initialize_aarch64_tdep): Register it.
10843         (aarch64_record_load_store): Handle PRFM instruction.
10844         (aarch64_process_record_test): New function.
10845
10846 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10847
10848         * aarch64-tdep.c (aarch64_record_load_store): Fix code
10849         indentation.
10850
10851 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10852
10853         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
10854
10855 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10856
10857         python/python.c (do_start_initialization): Fix memory leak.
10858
10859 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10860
10861         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
10862         using get_ptrace_pid.
10863         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
10864         inferior_ptid.
10865         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
10866         inferior_ptid instead of pid.
10867
10868 2017-03-22  Yao Qi  <yao.qi@linaro.org>
10869
10870         * aarch64-tdep.c: Wrap locally used classes in anonymous
10871         namespace.
10872         * arm-tdep.c: Likewise.
10873         * linespec.c: Likewise.
10874         * ui-out.c: Likewise.
10875
10876 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
10877
10878         PR gdb/19637
10879         * python/lib/gdb/printer/bound_registers.py: Import sys.
10880
10881 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
10882
10883         * windows-nat.c (do_windows_fetch_inferior_registers): Add
10884         windows_thread_info parameter and use it instead of
10885         current_thread.
10886         (windows_fetch_inferior_registers): Don't set current_thread,
10887         pass the thread to do_windows_fetch_inferior_registers.  Use
10888         ptid from regcache instead of inferior_ptid.
10889         (do_windows_store_inferior_registers): Add windows_thread_info
10890         parameter and use it instead of current_thread.
10891         (windows_store_inferior_registers): Don't set current_thread,
10892         pass the thread to do_windows_store_inferior_registers.  Use
10893         ptid from regcache instead of inferior_ptid.
10894
10895 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
10896
10897         * ser-mingw.c (ser_windows_raw): Remove reference to
10898         struct serial::current_timeout.
10899
10900 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
10901
10902         PR tdep/20928
10903         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
10904         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
10905         (sparc64_fsr_type): Fix %fsr decoding.
10906
10907 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
10908
10909         * python/py-record-btrace.c (btpy_insn_data): Change return type
10910         for Python 2.
10911
10912 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
10913
10914         * spu-linux-nat.c (spu_fetch_inferior_registers,
10915         spu_store_inferior_registers): Use ptid from regcache, set and
10916         restore inferior_ptid.
10917         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
10918         Likewise.
10919
10920 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
10921
10922         * i386-linux-nat.c (fetch_register, store_register,
10923         i386_linux_fetch_inferior_registers,
10924         i386_linux_store_inferior_registers): Use ptid from regcache.
10925         * ia64-linux-nat.c (ia64_linux_fetch_register,
10926         ia64_linux_store_register): Likewise.
10927         * inf-ptrace.c (inf_ptrace_fetch_register,
10928         inf_ptrace_store_register): Likewise.
10929         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
10930         m32r_linux_store_inferior_registers): Likewise.
10931         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
10932         m68kbsd_store_inferior_registers): Likewise.
10933         * m68k-linux-nat.c (fetch_register, store_register,
10934         m68k_linux_fetch_inferior_registers,
10935         m68k_linux_store_inferior_registers): Likewise.
10936         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
10937         m88kbsd_store_inferior_registers): Likewise.
10938         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
10939         mips_fbsd_store_inferior_registers): Likewise.
10940         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
10941         mips64_linux_regsets_store_registers): Likewise.
10942         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
10943         mipsnbsd_store_inferior_registers): Likewise.
10944         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
10945         mips64obsd_store_inferior_registers): Likewise.
10946         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
10947         Likewise.
10948         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
10949         ppcfbsd_store_inferior_registers): Likewise.
10950         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
10951         ppc_linux_store_inferior_registers): Likewise.
10952         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
10953         ppcnbsd_store_inferior_registers): Likewise.
10954         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
10955         ppcobsd_store_registers): Likewise.
10956         * procfs.c (procfs_fetch_registers, procfs_store_registers):
10957         Likewise.
10958         * ravenscar-thread.c (ravenscar_fetch_registers,
10959         ravenscar_store_registers, ravenscar_prepare_to_store):
10960         Likewise.
10961         * record-btrace.c (record_btrace_fetch_registers,
10962         record_btrace_store_registers, record_btrace_prepare_to_store):
10963         Likewise.
10964         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
10965         Lookup inferior using ptid from regcache, instead of
10966         current_inferior.
10967         * remote.c (remote_fetch_registers, remote_store_registers): Use
10968         ptid from regcache.
10969         * rs6000-nat.c (fetch_register, store_register): Likewise.
10970         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
10971         s390_linux_store_inferior_registers): Likewise.
10972         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10973         shnbsd_store_inferior_registers): Likewise.
10974         * sol-thread.c (sol_thread_fetch_registers,
10975         sol_thread_store_registers): Likewise.
10976         * sparc-nat.c (sparc_fetch_inferior_registers,
10977         sparc_store_inferior_registers): Likewise.
10978         * tilegx-linux-nat.c (fetch_inferior_registers,
10979         store_inferior_registers): Likewise.
10980         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10981         vaxbsd_store_inferior_registers): Likewise.
10982         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10983         store_xtregs): Likewise.
10984
10985 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10986
10987         PR gdb/14441
10988         * NEWS: Mention support for rvalue references in GDB and python.
10989         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10990         supports both lvalue and rvalue references.
10991
10992 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10993
10994         PR gdb/14441
10995         * gdbtypes.c (rank_one_type): Implement overloading
10996         resolution rules regarding rvalue references.
10997
10998 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10999
11000         PR gdb/14441
11001         * aarch64-tdep.c (aarch64_type_align)
11002         (aarch64_extract_return_value, aarch64_store_return_value): Change
11003         lvalue reference type checks to general reference type checks.
11004         * amd64-tdep.c (amd64_classify): Likewise.
11005         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11006         Likewise.
11007         * arm-tdep.c (arm_type_align, arm_extract_return_value)
11008         (arm_store_return_value): Likewise.
11009         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11010         * c-typeprint.c (c_print_type): Likewise.
11011         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11012         (cplus_number_of_children, cplus_describe_child): Likewise.
11013         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11014         * completer.c (expression_completer): Likewise.
11015         * cp-support.c (make_symbol_overload_list_adl_namespace):
11016         Likewise.
11017         * darwin-nat-info.c (info_mach_region_command): Likewise.
11018         * dwarf2loc.c (entry_data_value_coerce_ref)
11019         (value_of_dwarf_reg_entry): Likewise.
11020         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11021         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11022         Likewise.
11023         * findvar.c (extract_typed_address, store_typed_address):
11024         Likewise.
11025         * gdbtypes.c (rank_one_type): Likewise.
11026         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11027         * infcall.c (value_arg_coerce): Likewise.
11028         * language.c (pointer_type): Likewise.
11029         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11030         Likewise.
11031         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11032         * mn10300-tdep.c (mn10300_type_align): Likewise.
11033         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11034         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11035         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11036         Likewise.
11037         * printcmd.c (print_formatted, x_command): Likewise.
11038         * python/py-type.c (typy_get_composite, typy_template_argument):
11039         Likewise.
11040         * python/py-value.c (valpy_referenced_value)
11041         (valpy_get_dynamic_type, value_has_field): Likewise.
11042         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11043         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11044         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11045         * spu-tdep.c (spu_scalar_value_p): Likewise.
11046         * symtab.c (lookup_symbol_aux): Likewise.
11047         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11048         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11049         Likewise.
11050         * valops.c (value_cast_pointers, value_cast)
11051         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11052         (value_struct_elt, value_struct_elt_bitpos)
11053         (value_find_oload_method_list, find_overload_match)
11054         (value_rtti_indirect_type): Likewise.
11055         * valprint.c (val_print_scalar_type_p, generic_val_print):
11056         Likewise.
11057         * value.c (value_actual_type, value_as_address, unpack_long)
11058         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11059         (coerce_ref): Likewise.
11060         * varobj.c (varobj_get_value_type): Likewise.
11061
11062 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11063
11064         PR gdb/14441
11065         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11066         table of constants.
11067         * python/lib/gdb/command/explore.py: Support exploring values
11068         of rvalue reference types.
11069         * python/lib/gdb/types.py: Implement get_basic_type() for
11070         rvalue reference types.
11071         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11072         constant.
11073         * python/py-value.c (valpy_getitem): Add an rvalue reference
11074         check.
11075         (valpy_reference_value): Add new parameter "refcode".
11076         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11077         New wrappers for valpy_reference_value().
11078         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11079         (gdbpy_invoke_xmethod): Likewise.
11080
11081 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11082
11083         PR gdb/14441
11084         * dwarf2read.c (process_die, read_type_die_1): Handle the
11085         DW_TAG_rvalue_reference_type DIE.
11086         (read_tag_reference_type): Add new parameter "refcode".
11087
11088 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11089
11090         PR gdb/14441
11091         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11092         (c_type_print_modifier, c_type_print_varspec_suffix)
11093         (c_type_print_base): Support printing rvalue reference types.
11094         * c-valprint.c (c_val_print, c_value_print): Support printing
11095         rvalue reference values.
11096
11097 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11098
11099         PR gdb/14441
11100         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11101         typename.
11102         * cp-support.c (replace_typedefs): Handle
11103         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11104         * python/py-type.c (typy_lookup_type): Likewise.
11105
11106 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11107
11108         PR gdb/14441
11109         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11110         * parse.c (insert_type): Change assert statement.
11111         (follow_types): Handle rvalue reference types.
11112         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11113         constant.
11114
11115 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11116
11117         PR gdb/14441
11118         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11119         value_ref() interface.
11120         * c-valprint.c (c_value_print): Likewise.
11121         * infcall.c (value_arg_coerce): Likewise.
11122         * python/py-value.c (valpy_reference_value): Likewise.
11123         * valops.c (value_cast, value_reinterpret_cast)
11124         (value_dynamic_cast, typecmp): Likewise.
11125         (value_ref): Parameterize by kind of return value reference type.
11126         * value.h (value_ref): Add new parameter "refcode".
11127
11128 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11129
11130         PR gdb/14441
11131         * dwarf2read.c (read_tag_reference_type): Use
11132         lookup_lvalue_reference_type() instead of lookup_reference_type().
11133         * eval.c (evaluate_subexp_standard): Likewise.
11134         * f-exp.y: Likewise.
11135         * gdbtypes.c (make_reference_type, lookup_reference_type):
11136         Generalize with rvalue reference types.
11137         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11138         convenience wrappers for lookup_reference_type().
11139         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11140         reference kind parameter.
11141         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11142         wrappers for lookup_reference_type().
11143         * guile/scm-type.c (gdbscm_type_reference): Use
11144         lookup_lvalue_reference_type() instead of lookup_reference_type().
11145         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11146         * parse.c (follow_types): Likewise.
11147         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11148         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11149         Likewise.
11150         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11151         (gdbpy_invoke_xmethod): Likewise.
11152         * stabsread.c: Provide extra argument to make_reference_type()
11153         call.
11154         * valops.c (value_ref, value_rtti_indirect_type): Use
11155         lookup_lvalue_reference_type() instead of lookup_reference_type().
11156
11157 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11158
11159         PR gdb/14441
11160         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11161         (TYPE_IS_REFERENCE): New macro.
11162         (struct type): Add rvalue_reference_type field.
11163         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11164
11165 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11166
11167         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11168         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11169         New function definition.
11170         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11171         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11172         New function declaration.
11173         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11174         * mi/mi-interp.h: New file.
11175         * solib.c (info_sharedlibrary_command): Replace for loop with
11176         ALL_SO_LIBS macro
11177         * solib.h (update_solib_list): New function declaration.
11178         (so_list_head): Move macro.
11179         * solist.h (ALL_SO_LIBS): New macro.
11180
11181 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11182
11183         * infcmd.c (post_create_inferior): Remove unused argument in
11184         call to solib_add.
11185         * remote.c (remote_start_remote): Likewise.
11186         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11187         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11188         (enable_break): Likewise.
11189         * solib.c (update_solib_list): Remove unused target argument
11190         and its documentation.
11191         (solib_add): Remove unused target argument.  Remove unused
11192         argument in call to update_solib_list.
11193         (info_sharedlibrary_command): Remove unused argument in call
11194         to update_solib_list.
11195         (sharedlibrary_command): Remove unused argument in call to
11196         solib_add.
11197         (handle_solib_event): Likewise.
11198         (reload_shared_libraries): Likewise.
11199         * solib.h (solib_add): Remove unused target argument.
11200
11201 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11202
11203         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11204         (s390_displaced_step_fixup): Cover relative branches with the
11205         default fixup handling.  This fixes lack of support for some
11206         relative branch instructions.
11207
11208 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11209
11210         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11211         ptid from regcache.
11212
11213 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11214
11215         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11216         i386_darwin_store_inferior_registers): Use ptid from regcache.
11217
11218 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11219
11220         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11221         i386bsd_store_inferior_registers): Use ptid from regcache.
11222
11223 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11224
11225         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11226         hppaobsd_store_registers): Use ptid from regcache.
11227
11228 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11229
11230         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11231         hppanbsd_store_registers): Use ptid from regcache.
11232
11233 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11234
11235         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11236         from regcache.  Use get_ptrace_pid.
11237
11238 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11239
11240         * corelow.c (get_core_register_section): Use ptid from regcache,
11241         update doc.
11242
11243 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11244
11245         * bsd-uthread.c (bsd_uthread_fetch_registers,
11246         bsd_uthread_store_registers): Use ptid from regcache, set and
11247         restore inferior_ptid.
11248
11249 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11250
11251         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11252         fetch_fp_regs, store_register, store_regs, store_fp_register,
11253         store_fp_regs): Use ptid from regcache.
11254
11255 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11256
11257         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11258         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11259         store_vfp_regs): Use ptid from regcache.
11260
11261 2017-03-17  Pedro Alves  <palves@redhat.com>
11262
11263         PR remote/21188
11264         * ser-base.c (ser_base_wait_for): Add comment.
11265         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11266         version.
11267         * ser-unix.c (hardwire_raw): Remove reference to
11268         scb->current_timeout.
11269         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11270         (hardwire_ops): Install ser_base_readchar instead of
11271         hardwire_readchar.
11272         * serial.h (struct serial) <current_timeout, timeout_remaining>:
11273         Remove fields.
11274
11275 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
11276
11277         PR gdb/19637
11278         * python/lib/gdb/printer/bound_registers.py: Add support for
11279         Python 3.
11280
11281 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11282
11283         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11284         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11285         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11286         byte_offset to subobj_byte_offset.  Fix the handling of
11287         DWARF_VALUE_STACK on big-endian targets when coming via an
11288         implicit pointer.
11289         (dwarf2_evaluate_loc_desc): Adjust call to
11290         dwarf2_evaluate_loc_desc_full.
11291         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11292         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11293
11294 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11295
11296         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11297         and REVSH instructions.
11298
11299 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11300
11301         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11302         (arm_record_test): Declare.
11303         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11304         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11305         align with the manual.
11306         (thumb_record_misc): Adjust the code order to align with the
11307         manual.
11308         (thumb2_record_decode_insn_handler): Fix instruction matching.
11309         (instruction_reader_thumb): New class.
11310         (arm_record_test): New function.
11311
11312 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11313
11314         * arm-tdep.c (abstract_memory_reader): New class.
11315         (instruction_reader): New class.
11316         (extract_arm_insn): Add argument 'reader'.  Callers updated.
11317         (decode_insn): Likewise.
11318
11319 2017-03-16  Doug Evans  <dje@google.com>
11320
11321         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
11322         member.  Change type of TYPE member to SCM.  All uses updated.
11323         (lsscm_make_lazy_string_smob): Add assert.
11324         (lsscm_make_lazy_string): Flag bad length values.
11325         (lsscm_elt_type): New function.
11326         (gdbscm_lazy_string_to_value): Rewrite to use
11327         lsscm_safe_lazy_string_to_value.
11328         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
11329         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
11330         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
11331         in incoming type.
11332         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11333         * guile/scm-type.c (tyscm_scm_to_type): New function.
11334
11335 2017-03-15  Doug Evans  <dje@google.com>
11336
11337         PR python/17728, python/18439, python/18779
11338         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
11339         member.  Change type of TYPE member to PyObject *.  All uses updated.
11340         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11341         (gdbpy_create_lazy_string_object): Flag bad length values.
11342         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11343         Handle typedefs in incoming type.
11344         (stpy_lazy_string_elt_type): New function.
11345         (gdbpy_extract_lazy_string): Call it.
11346         * python/py-value.c (valpy_lazy_string): Flag bad length values.
11347         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
11348         typedefs in incoming type.
11349
11350 2017-03-16  Doug Evans  <dje@google.com>
11351
11352         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11353         * guile/scm-type.c (tyscm_scm_to_type): New function.
11354
11355 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
11356
11357         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11358         "ULONGEST" for "skip".
11359
11360 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11361
11362         PR gdb/21220
11363         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11364         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11365         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
11366         over ptrace peek/poke until end of buffer or error.
11367
11368 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
11369
11370         * parse.c (length_of_subexp): Make static.
11371         * parser-defs.h (length_of_subexp): Remove.
11372
11373 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11374
11375         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11376         as well.
11377
11378 2017-03-14  Pedro Alves  <palves@redhat.com>
11379
11380         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11381         (main): Use std::unique_ptr.  Remove calls to
11382         cp_demangled_name_parse_free.
11383
11384 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11385
11386         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11387         alphabsd_store_inferior_registers): Use regcache->ptid instead
11388         of inferior_ptid.
11389
11390 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11391
11392         * aix-thread.c (aix_thread_fetch_registers,
11393         aix_thread_store_registers): Use regcache->ptid instead of
11394         inferior_ptid.
11395
11396 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11397
11398         * aarch64-linux-nat.c (fetch_gregs_from_thread,
11399         store_gregs_to_thread, fetch_fpregs_from_thread,
11400         store_fpregs_to_thread): Use regcache->ptid instead of
11401         inferior_ptid.
11402
11403 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11404
11405         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11406         amd64_linux_fetch_inferior_registers): Use regcache->ptid
11407         instead of inferior_ptid.
11408
11409 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11410
11411         * target.c (target_fetch_registers, target_store_registers): Add
11412         assert.
11413
11414 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11415
11416         * regcache.h (regcache_get_ptid): New function.
11417         * regcache.c (regcache_get_ptid): New function.
11418
11419 2017-03-13  Mark Wielaard  <mark@klomp.org>
11420
11421         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11422
11423 2017-03-10  Keith Seitz  <keiths@redhat.com>
11424
11425         PR c++/8218
11426         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11427
11428 2017-03-08  Pedro Alves  <palves@redhat.com>
11429
11430         PR gdb/18360
11431         * infrun.c (start_step_over, do_target_resume, resume)
11432         (restart_threads): Assert we're not resuming a thread that is
11433         meant to be stopped.
11434         (infrun_thread_stop_requested_callback): Delete.
11435         (infrun_thread_stop_requested): If the thread is internally
11436         stopped, queue a pending stop event and clear the thread's
11437         inline-frame state.
11438         (handle_stop_requested): New function.
11439         (handle_syscall_event, handle_inferior_event_1): Use
11440         handle_stop_requested.
11441         (handle_stop_requested): New function.
11442         (handle_signal_stop): Set the thread's stop_signal here instead of
11443         at caller.
11444         (finish_step_over): Clear step over info unconditionally.
11445         (handle_signal_stop): If the user had interrupted the event
11446         thread, consider the stop a random signal.
11447         (handle_signal_stop) <signal arrived while stepping over
11448         breakpoint>: Don't restart threads here.
11449         (stop_waiting): Don't clear step-over info here.
11450
11451 2017-03-08  Pedro Alves  <palves@redhat.com>
11452
11453         PR 21206
11454         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
11455         goes to argument 2, not 1.
11456
11457 2017-03-08  Pedro Alves  <palves@redhat.com>
11458
11459         PR cli/21218
11460         * top.c (gdb_readline_wrapper): Avoid passing NULL to
11461         display_gdb_prompt.
11462         (command_line_input): Add comment.
11463
11464 2017-03-08  Pedro Alves  <palves@redhat.com>
11465
11466         PR tui/21216
11467         * tui/tui-file.c (tui_file::write): New.
11468         * tui/tui-file.h (tui_file): Override "write".
11469         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
11470         factored out from ...
11471         (tui_puts): ... here.
11472         (tui_putc): Use them.
11473         (tui_write): New function.
11474         * tui/tui-io.h (tui_write): Declare.
11475
11476 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11477
11478         * Makefile.in (SFILES): Replace "environ.c" with
11479         "common/environ.c".
11480         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
11481         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
11482         to...
11483         * common/environ.c: ... here.
11484         * environ.h: Moved to...
11485         * common/environ.h: ... here.
11486
11487 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
11488
11489         * gdbarch.sh (pstring_ptr): New static function.
11490         (gdbarch_disassembler_options): Use it.
11491         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
11492         not valid_disassembler_option->name.
11493         * gdbarch.c: Regenerate.
11494
11495 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
11496
11497         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
11498
11499 2017-03-07  Pedro Alves  <palves@redhat.com>
11500
11501         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
11502
11503 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11504
11505         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
11506         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
11507         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
11508         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
11509
11510 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
11511
11512         * xtensa-linux-nat.c (fetch_gregs): Remove const.
11513
11514 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
11515
11516         * remote.c (remote_add_target_side_commands): Use range-based
11517         for loop.
11518
11519 2017-03-03  Yao Qi  <yao.qi@linaro.org>
11520
11521         PR gdb/21165
11522         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
11523         value is lazy.
11524         * valprint.c (common_val_print): Likewise.
11525
11526 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
11527
11528         * NEWS: Mention new set/show disassembler-options commands.
11529         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
11530         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
11531         (prospective_options): New static variable.
11532         (gdb_disassembler::gdb_disassembler): Initialize
11533         m_di.disassembler_options.
11534         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
11535         (get_disassembler_options): New function.
11536         (set_disassembler_options): Likewise.
11537         (set_disassembler_options_sfunc): Likewise.
11538         (show_disassembler_options_sfunc): Likewise.
11539         (disassembler_options_completer): Likewise.
11540         (_initialize_disasm): Likewise.
11541         * disasm.h (get_disassembler_options): New prototype.
11542         (set_disassembler_options): Likewise.
11543         * gdbarch.sh (gdbarch_disassembler_options): New variable.
11544         (gdbarch_verify_disassembler_options): Likewise.
11545         * gdbarch.c: Regenerate.
11546         * gdbarch.h: Likewise.
11547         * arm-tdep.c (num_disassembly_options): Delete.
11548         (set_disassembly_style): Likewise.
11549         (arm_disassembler_options): New static variable.
11550         (set_disassembly_style_sfunc): Convert short style name into long
11551         option name.  Call set_disassembler_options.
11552         (show_disassembly_style_sfunc): New function.
11553         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
11554         set_gdbarch_verify_disassembler_options.
11555         (_initialize_arm_tdep): Delete regnames variable and update callers.
11556         (arm_disassembler_options): Initialize.
11557         (disasm_options): New variable.
11558         (num_disassembly_options): Rename from this...
11559         (num_disassembly_styles): ...to this.  Compute by scanning through
11560         disasm_options.
11561         (valid_disassembly_styles): Initialize using disasm_options.
11562         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
11563         set_arm_regname_option.
11564         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
11565         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
11566         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
11567         set_gdbarch_verify_disassembler_options.
11568         * s390-tdep.c (s390_disassembler_options): New static variable.
11569         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
11570         set_gdbarch_verify_disassembler_options.
11571
11572 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
11573
11574         * remote.c (remote_add_target_side_condition): Remove "struct"
11575         keyword from range-based for loop.
11576
11577 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
11578
11579         * remote.c (remote_add_target_side_condition): Use range-based
11580         for loop.  Update comment.
11581
11582 2017-02-27  Yao Qi  <yao.qi@linaro.org>
11583
11584         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
11585
11586 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
11587
11588         * regcache.c (regcache_raw_update): New function.
11589         (regcache_raw_read): Move code to regcache_raw_update.
11590         * regcache.h (regcache_raw_update): New declaration.
11591         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
11592
11593 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
11594
11595         * dwarf2read.c (create_debug_type_hash_table): Initialize
11596         header.signature and header.type_offset_in_tu.
11597
11598 2017-02-24  Pedro Alves  <palves@redhat.com>
11599
11600         * symtab.c (make_file_symbol_completion_list_1): Use
11601         add_symtab_completions.
11602
11603 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
11604
11605         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
11606
11607 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
11608
11609         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
11610         I386_MAX_REGISTER_SIZE.
11611         (i386_pseudo_register_write): Likewise.
11612         (i386_process_record): Likewise.
11613         * i387-tdep.c (i387_supply_xsave): Likewise.
11614         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
11615         (store_register): Likewise.
11616
11617 2017-02-23  Pedro Alves  <palves@redhat.com>
11618
11619         * ada-lang.c: Include "common/function-view.h".
11620         (ada_iterate_over_symbols): Adjust to use function_view as
11621         callback type.
11622         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
11623         (ada_make_symbol_completion_list): Use a lambda.
11624         (ada_exc_search_name_matches): Delete.
11625         (name_matches_regex): New.
11626         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
11627         * compile/compile-c-support.c: Include "common/function-view.h".
11628         (print_one_macro): Change prototype to accept a ui_file pointer.
11629         (write_macro_definitions): Use a lambda.
11630         * dwarf2read.c: Include "common/function-view.h".
11631         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
11632         (dw2_expand_symtabs_matching): Adjust to use function_view as
11633         callback type.
11634         * language.h: Include "common/function-view.h".
11635         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
11636         function_view as callback type.
11637         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
11638         * linespec.c: Include "common/function-view.h".
11639         (collect_info::add_symbol): New method.
11640         (struct symbol_and_data_callback, iterate_inline_only, struct
11641         symbol_matcher_data, iterate_name_matcher): Delete.
11642         (iterate_over_all_matching_symtabs): Adjust to use function_view
11643         as callback type and lambdas.
11644         (iterate_over_file_blocks): Adjust to use function_view as
11645         callback type.
11646         (decode_compound_collector): Now a class with private fields.
11647         (decode_compound_collector::release_symbols): New method.
11648         (collect_one_symbol): Rename to...
11649         (decode_compound_collector::operator()): ... this and adjust.
11650         (lookup_prefix_sym): decode_compound_collector construction bits
11651         move to decode_compound_collector ctor.  Pass the
11652         decode_compound_collector object directly as callback.  Remove
11653         cleanups and use decode_compound_collector::release_symbols
11654         instead.
11655         (symtab_collector): Now a class with private fields.
11656         (symtab_collector::release_symtabs): New method.
11657         (add_symtabs_to_list): Rename to...
11658         (symtab_collector::operator()): ... this and adjust.
11659         (collect_symtabs_from_filename): symtab_collector construction
11660         bits move to symtab_collector ctor.  Pass the symtab_collector
11661         object directly as callback.  Remove cleanups and use
11662         symtab_collector::release_symtabs instead.
11663         (collect_symbols): Delete.
11664         (add_matching_symbols_to_info): Use lambdas.
11665         * macrocmd.c (print_macro_callback): Delete.
11666         (info_macro_command): Use a lambda.
11667         (info_macros_command): Pass print_macro_definition as callable
11668         directly.
11669         (print_one_macro): Remove 'ignore' parameter.
11670         (macro_list_command): Adjust.
11671         * macrotab.c (macro_for_each_data::fn): Now a function_view.
11672         (macro_for_each_data::user_data): Delete field.
11673         (foreach_macro): Adjust to call the function_view.
11674         (macro_for_each): Adjust to use function_view as callback type.
11675         (foreach_macro_in_scope): Adjust to call the function_view.
11676         (macro_for_each_in_scope): Adjust to use function_view as callback
11677         type.
11678         * macrotab.h: Include "common/function-view.h".
11679         (macro_callback_fn): Declare a prototype instead of a pointer.
11680         Remove "user_data" parameter.
11681         (macro_for_each, macro_for_each_in_scope): Adjust to use
11682         function_view as callback type.
11683         * psymtab.c (partial_map_expand_apply)
11684         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
11685         Adjust to use function_view as callback type and to return bool.
11686         (psym_expand_symtabs_matching): Adjust to use function_view as
11687         callback types.
11688         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
11689         to use function_view as callback type and to return bool.
11690         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
11691         callback types.
11692         * symfile.c (expand_symtabs_matching): Adjust to use function_view
11693         as callback types.
11694         * symfile.h: Include "common/function-view.h".
11695         (expand_symtabs_file_matcher_ftype)
11696         (expand_symtabs_symbol_matcher_ftype)
11697         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
11698         return bool.
11699         (quick_symbol_functions::map_symtabs_matching_filename)
11700         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
11701         function_view as callback type and return bool.
11702         (expand_symtabs_matching): Adjust to use function_view as callback
11703         type.
11704         (maintenance_expand_name_matcher)
11705         (maintenance_expand_file_matcher): Delete.
11706         (maintenance_expand_symtabs): Use lambdas.
11707         * symtab.c (iterate_over_some_symtabs): Adjust to use
11708         function_view as callback types and return bool.
11709         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
11710         of a cleanup.
11711         (lookup_symtab_callback): Delete.
11712         (lookup_symtab): Use a lambda.
11713         (iterate_over_symbols): Adjust to use function_view as callback
11714         type.
11715         (struct search_symbols_data, search_symbols_file_matches)
11716         (search_symbols_name_matches): Delete.
11717         (search_symbols): Use a pair of lambdas.
11718         (struct add_name_data, add_macro_name, symbol_completion_matcher)
11719         (symtab_expansion_callback): Delete.
11720         (default_make_symbol_completion_list_break_on_1): Use lambdas.
11721         * symtab.h: Include "common/function-view.h".
11722         (iterate_over_some_symtabs): Adjust to use function_view as
11723         callback type and return bool.
11724         (iterate_over_symtabs): Adjust to use function_view as callback
11725         type.
11726         (symbol_found_callback_ftype): Remove 'data' parameter and return
11727         bool.
11728         (iterate_over_symbols): Adjust to use function_view as callback
11729         type.
11730
11731 2017-02-23  Pedro Alves  <palves@redhat.com>
11732
11733         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
11734         (%.o) <unittests/%.c>: New pattern.
11735         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
11736         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
11737         * common/function-view.h: New file.
11738         * unittests/function-view-selftests.c: New file.
11739         * configure: Regenerate.
11740
11741 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
11742
11743         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
11744         inferior_ptid.
11745         * go32-nat.c (go32_thread_alive): Likewise.
11746
11747 2017-02-23  Yao Qi  <yao.qi@linaro.org>
11748
11749         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
11750         delete.
11751
11752 2017-02-23  Yao Qi  <yao.qi@linaro.org>
11753
11754         * varobj.c (varobj_clear_saved_item): Use delete instead of
11755         xfree.
11756         (update_dynamic_varobj_children): Likewise.
11757
11758 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11759
11760         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
11761
11762 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
11763
11764         * common/enum-flags.h (enum_flags::enum_flags): Initialize
11765         m_enum_value to 0 in default constructor.
11766
11767 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
11768
11769         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
11770         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
11771         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
11772         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
11773         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
11774         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
11775         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
11776         IS_STORE_CONDITIONAL_INSN.
11777
11778 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11779
11780         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
11781
11782 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11783
11784         * NEWS (Changes since GDB 7.12): Add DWARF-5.
11785
11786 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11787
11788         * dwarf2read.c (skip_one_die, read_attribute_value)
11789         (dwarf2_const_value_attr, dump_die_shallow)
11790         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
11791         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
11792
11793 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11794
11795         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
11796         (dwarf_parse_macro_header): Accept DWARF version 5.
11797         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
11798
11799 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11800
11801         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
11802         DW_AT_GNU_*.
11803         * common/common-exceptions.h (enum errors): Likewise.
11804         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
11805         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
11806         (dwarf_expr_context::execute_stack_op): Likewise.
11807         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
11808         Likewise.
11809         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
11810         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
11811         (show_entry_values_debug, call_site_to_target_addr)
11812         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
11813         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
11814         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
11815         (value_of_dwarf_block_entry, indirect_pieced_value)
11816         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
11817         (disassemble_dwarf_expression): Likewise.
11818         * dwarf2read.c (process_die, inherit_abstract_dies)
11819         (read_call_site_scope): Likewise.
11820         * gdbtypes.h (struct func_type, struct call_site_parameter)
11821         (struct call_site): Likewise.
11822         * stack.c (read_frame_arg): Likewise.
11823         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
11824
11825 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11826
11827         * defs.h (read_unsigned_leb128): New declaration.
11828         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
11829         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
11830         (dwarf2_find_location_expression): Call also
11831         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
11832         * dwarf2loc.h (dwarf2_version): New declaration.
11833         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
11834         rnglists.
11835         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
11836         .debug_rnglists.
11837         (struct dwop_section_names): Add loclists_dwo.
11838         (dwop_section_names): Add .debug_loclists.dwo.
11839         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
11840         (struct dwarf2_per_cu_data): Add dwarf_version.
11841         (struct dwo_sections): Add loclists.
11842         (struct attr_abbrev): Add implicit_const.
11843         (read_indirect_line_string): New declaration.
11844         (read_unsigned_leb128): Delete declaration.
11845         (rcuh_kind): New definition.
11846         (read_and_check_comp_unit_head): Change parameter
11847         is_debug_types_section to section_kind.
11848         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
11849         (read_comp_unit_head): Change parameter abfd to section, add parameter
11850         section_kind.  Handle DWARF-5.
11851         (error_check_comp_unit_head): Accept also DWARF version 5.
11852         (read_and_check_comp_unit_head): Change parameter
11853         is_debug_types_section to section_kind.
11854         (read_and_check_type_unit_head): Delete function.
11855         (read_abbrev_offset): Handle DWARF-5.
11856         (create_debug_type_hash_table): Add parameter section_kind.  Process
11857         only DW_UT_type.  Use signature and type_offset_in_tu from struct
11858         comp_unit_head.
11859         (create_debug_types_hash_table): Update create_debug_type_hash_table
11860         caller.
11861         (create_all_type_units): Call create_debug_type_hash_table.
11862         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
11863         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
11864         caller.
11865         (skip_one_die): Handle DW_FORM_implicit_const.
11866         (dwarf2_rnglists_process): New function.
11867         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
11868         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
11869         (read_attribute_value): Handle DW_FORM_implicit_const,
11870         DW_FORM_line_strp.
11871         (read_attribute): Handle DW_FORM_implicit_const.
11872         (read_indirect_string_at_offset_from): New function from
11873         read_indirect_string_at_offset.
11874         (read_indirect_string_at_offset): Call
11875         read_indirect_string_at_offset_from.
11876         (read_indirect_line_string_at_offset): New function.
11877         (read_indirect_string): New function comment.
11878         (read_indirect_line_string): New function.
11879         (read_unsigned_leb128): Make it global.
11880         (dwarf2_string_attr): Handle DWARF-5.
11881         (add_include_dir_stub, read_formatted_entries): New functions.
11882         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
11883         Handle DWARF-5.
11884         (per_cu_header_read_in): Update read_comp_unit_head caller.
11885         (dwarf2_version): New function.
11886         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
11887         rnglists.
11888         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
11889         fields.
11890
11891 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11892
11893         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
11894
11895 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11896
11897         * dwarf2read.c (dwarf2_ranges_process): New function from
11898         dwarf2_ranges_read.
11899         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
11900         dwarf2_ranges_process.
11901
11902 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11903
11904         * dwarf2read.c (create_debug_type_hash_table): New function from
11905         create_debug_types_hash_table.
11906         (create_debug_types_hash_table): Call create_debug_type_hash_table.
11907         (create_all_type_units, open_and_init_dwo_file): Update
11908         create_debug_types_hash_table callers.
11909
11910 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11911
11912         PR gdb/16188
11913         * fork-child.c (trace_start_error): Fix thinko.  va_end should
11914         refer to 'ap', not 'args'.
11915
11916 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11917             Pedro Alves  <palves@redhat.com>
11918
11919         PR gdb/16188
11920         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
11921         calls succeeded.
11922         * fork-child.c (trace_start_error): New function.
11923         (trace_start_error_with_name): Likewise.
11924         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
11925         * inf-ptrace.c (inf_ptrace_me): Likewise.
11926         * inferior.h (trace_start_error): New prototype.
11927         (trace_start_error_with_name): Likewise.
11928
11929 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
11930
11931         PR gdb/21164
11932         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
11933         NULL before using it.
11934         * symmisc.c (maintenance_print_symbols): Likewise.
11935         (maintenance_print_msymbols): Likewise.
11936
11937 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11938
11939         * NEWS: Add record Python bindings entry.
11940
11941 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11942
11943         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
11944         py-record-full.o.
11945         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
11946         * python/py-record-btrace.c, python/py-record-btrace.h,
11947         python/py-record-full.c, python/py-record-full.h: New file.
11948         * python/py-record.c: Add include for py-record-btrace.h and
11949         py-record-full.h.
11950         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
11951         recpy_instruction_history, recpy_function_call_history, recpy_begin,
11952         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
11953         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
11954         New definition.
11955         (gdbpy_initialize_btrace): New export.
11956         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
11957
11958 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11959
11960         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
11961         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
11962         * python/py-record.c: New file.
11963         * python/python-internal.h (gdbpy_start_recording,
11964         gdbpy_current_recording, gdpy_stop_recording,
11965         gdbpy_initialize_record): New export.
11966         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
11967         (python_GdbMethods): Add gdbpy_start_recording,
11968         gdbpy_current_recording and gdbpy_stop_recording.
11969
11970 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11971
11972         * record-btrace.c (record_btrace_record_method): New function.
11973         (init_record_btrace_ops): Initialize to_record_method.
11974         * record-full.c (record_full_record_method): New function.
11975         (init_record_full_ops, init_record_full_core_ops): Add
11976         record_full_record_method.
11977         * record.h (enum record_method): New enum.
11978         * target-debug.h (target_debug_print_enum_record_method: New define.
11979         * target-delegates.c: Regenerate.
11980         * target.c (target_record_method): New function.
11981         * target.h: Include record.h.
11982         (struct target_ops) <to_record_method>: New field.
11983         (target_record_method): New export.
11984
11985 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11986
11987         * record.h (record_start, record_stop): New export.
11988         * record.c (record_start, record_stop): New function.
11989
11990 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11991
11992         * btrace.c (btrace_fetch): Copy function call segments pointer
11993         into a vector.
11994         (btrace_clear): Clear the vector.
11995         (btrace_find_insn_by_number): Use binary search to find the correct
11996         function call segment.
11997         * btrace.h (brace_fun_p): New typedef.
11998         (struct btrace_thread_info) <functions>: New field.
11999
12000 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12001
12002         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12003         * btrace.c (btrace_decode_error): ... here.  New function.
12004         * btrace.h (btrace_decode_error): New export.
12005
12006 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12007
12008         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12009         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12010         btrace_find_insn_by_number): Remove special case for gaps.
12011         * btrace.h (btrace_insn_get_error): New export.
12012         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12013         * record-btrace.c (btrace_insn_history): Print number for gaps.
12014         (record_btrace_info, record_btrace_goto): Handle gaps.
12015
12016 2017-02-14  Tom Tromey  <tom@tromey.com>
12017
12018         PR python/13598:
12019         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12020         event.
12021         * python/py-evts.c (gdbpy_initialize_py_events): Add
12022         before_prompt registry.
12023         * python/py-events.h (events_object) <before_prompt>: New field.
12024
12025 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
12026
12027         * btrace.c (ftrace_new_switch): Preserve up link and flags.
12028
12029 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
12030
12031         * symfile (_initialize_symfile): Add usage text to the load command's
12032         help text.
12033
12034 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
12035
12036         * utils.c (defaulted_query): Don't query on secondary UIs.
12037
12038 2017-02-10  Tom Tromey  <tom@tromey.com>
12039
12040         * rust-lang.c (rust_get_disr_info): Remove unused variable.
12041
12042 2017-02-10  Tom Tromey  <tom@tromey.com>
12043
12044         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12045         "cleanup" local.
12046         * python/py-type.c (typy_legacy_template_argument): Remove
12047         unnecessary "cleanup" local.
12048
12049 2017-02-10  Tom Tromey  <tom@tromey.com>
12050
12051         * python/python.c (do_start_initialization): New function, from
12052         _initialize_python.
12053         (_initialize_python): Call do_start_initialization.
12054         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12055         goto.
12056
12057 2017-02-10  Tom Tromey  <tom@tromey.com>
12058
12059         * python/py-prettyprint.c (pretty_print_one_value): Use
12060         gdbpy_ref.
12061
12062 2017-02-10  Tom Tromey  <tom@tromey.com>
12063
12064         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12065         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12066         gdbpy_ref.
12067         * python/py-type.c (field_new): Use gdbpy_ref.
12068         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12069         gdbpy_ref.
12070         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12071         (py_free_pspace): Likewise.
12072         (pspace_to_pspace_object): Likewise.
12073         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12074         (py_free_objfile): Likewise.
12075         (objfile_to_objfile_object): Likewise.
12076         * python/py-inferior.c (delete_thread_object): Use
12077         gdbpy_ref.
12078         (infpy_read_memory): Likewise.
12079         (py_free_inferior): Likewise.
12080         * python/py-evtregistry.c (create_eventregistry_object): Use
12081         gdbpy_ref.
12082         * python/py-event.c (create_event_object): Use gdbpy_ref.
12083
12084 2017-02-10  Tom Tromey  <tom@tromey.com>
12085
12086         * python/py-ref.h (gdbpy_ref_policy): Now a template.
12087         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12088         used.
12089         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12090         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12091         python/py-exitedevent.c, python/py-finishbreakpoint.c,
12092         python/py-framefilter.c, python/py-function.c,
12093         python/py-inferior.c, python/py-infevents.c,
12094         python/py-linetable.c, python/py-newobjfileevent.c,
12095         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12096         python/py-signalevent.c, python/py-stopevent.c,
12097         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12098         python/py-unwind.c, python/py-utils.c, python/py-value.c,
12099         python/py-varobj.c, python/py-xmethods.c, python/python.c,
12100         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12101
12102 2017-02-10  Tom Tromey  <tom@tromey.com>
12103
12104         * ui-out.h (ui_out_emit_type): New class.
12105         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12106         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12107         and ui_out_emit_tuple.
12108         (enumerate_locals): Likewise.
12109         (py_mi_print_variables, py_print_locals, py_print_args): Use
12110         ui_out_emit_list.
12111         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12112         ui_out_emit_list.
12113         * common/gdb_optional.h: New file.
12114
12115 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12116
12117         * MAINTAINERS (Write After Approval): Update my e-mail address.
12118
12119 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12120
12121         PR gdb/21122
12122         * breakpoint.c (_initialize_breakpoint): Update the help description
12123         of the 'commands' command to indicate that it takes a list argument.
12124
12125 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
12126
12127         * interps.c (current_interp_set_logging): Remove "return".
12128
12129 2017-02-09  Gary Benson  <gbenson@redhat.com>
12130
12131         * symtab.c (add_symtab_completions): Prevent NULL pointer
12132         dereference.
12133
12134 2017-02-08  Pedro Alves  <palves@redhat.com>
12135
12136         * interps.c (interp::interp): Remove reference to quiet_p.
12137         (interp_set): Make static.  Remove dead "Switching to" output
12138         code.
12139         (interp_quiet_p, interp_set_quiet): Delete.
12140         (interpreter_exec_cmd): Don't set the interpreter quiet.
12141         * interps.h (interp_quiet_p): Make static.
12142         (class interp) <quiet_p>: Remove field
12143
12144 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12145
12146         * cli/cli-decode.c (find_command_name_length): Make it extern.
12147         * cli/cli-decode.h (find_command_name_length): Declare.
12148         * cli/cli-script.c (command_name_equals, line_first_arg):
12149         New functions.
12150         (process_next_line): Use cli-decode to parse command names.
12151         (build_command_line): Make args a constant pointer.
12152
12153 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12154
12155         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12156         Remove case-insensitive search.
12157
12158 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
12159
12160         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12161         at the end of the line.  Avoids an ARI warning.
12162
12163 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
12164
12165         * NEWS: Mention support for record/replay of Intel 64 rdrand and
12166         rdseed instructions.
12167         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12168
12169 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
12170
12171         PR tdep/20936
12172         Provide and use sparc32 and sparc64 target description XML files.
12173         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12174         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12175         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12176         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12177         * features/sparc/sparc32-solaris.xml: New file.
12178         * features/sparc/sparc64-solaris.xml: New file.
12179         * features/sparc/sparc32-solaris.c: Generated.
12180         * features/sparc/sparc64-solaris.c: Generated.
12181         * sparc-tdep.h: Account for differences in target descriptions.
12182         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12183         (sparc32_register_type): Use target provided registers.
12184         (validate_tdesc_registers): New function.
12185         (sparc32_gdbarch_init): Use tdesc_has_registers.
12186         Set pseudoregister functions.
12187         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12188         (sparc64_register_type): Use target provided registers.
12189         (sparc64_init_abi): Set pseudoregister functions.
12190
12191 2017-02-03  Tom Tromey  <tom@tromey.com>
12192
12193         PR rust/21097:
12194         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12195         with a single member.
12196
12197 2017-02-03  Pedro Alves  <palves@redhat.com>
12198
12199         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12200         (cli_interp_base::~cli_interp_base): New.
12201         (cli_interp): New struct.
12202         (as_cli_interp): Cast the interp itself to cli_interp.
12203         (cli_interpreter_pre_command_loop): Rename to ...
12204         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
12205         parameter.
12206         (cli_interpreter_init): Rename to ...
12207         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
12208         boolean.  Make extern.
12209         (cli_interpreter_resume): Rename to ...
12210         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
12211         extern.
12212         (cli_interpreter_suspend): Rename to ...
12213         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
12214         extern.
12215         (cli_interpreter_exec): Rename to ...
12216         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
12217         extern.
12218         (cli_interpreter_supports_command_editing): Rename to ...
12219         (cli_interp_base::supports_command_editing): ... this.  Remove
12220         'interp' parameter.  Make extern.
12221         (cli_ui_out): Rename to ...
12222         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
12223         Make extern.
12224         (cli_set_logging): Rename to ...
12225         (cli_interp_base::set_logging): ... this.  Remove 'interp'
12226         parameter.  Make extern.
12227         (cli_interp_procs): Delete.
12228         (cli_interp_factory): Adjust to use "new".
12229         * cli/cli-interp.h: Include "interps.h".
12230         (struct cli_interp_base): New struct.
12231         * interps.c (struct interp): Delete.  Fields moved to interps.h.
12232         (interp_new): Delete.
12233         (interp::interp, interp::~interp): New.
12234         (interp_set): Use bool, and return void.  Assume the interpreter
12235         has suspend, init and resume methods, and that the all return
12236         void.
12237         (set_top_level_interpreter): interp_set returns void.
12238         (interp_ui_out): Adapt.
12239         (current_interp_set_logging): Adapt.
12240         (interp_data): Delete.
12241         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12242         (interp_exec): Adapt.
12243         (top_level_interpreter_data): Delete.
12244         * interps.h (interp_init_ftype, interp_resume_ftype)
12245         (interp_suspend_ftype, interp_exec_ftype)
12246         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12247         (class interp): New.
12248         (interp_new): Delete.
12249         (interp_set): Now returns void.  Use bool.
12250         (interp_data, top_level_interpreter_data): Delete.
12251         * mi/mi-common.h: Include interps.h.
12252         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
12253         init, resume, suspect, exec, interp_ui_out, set_logging and
12254         pre_command_loop methods.
12255         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12256         (mi_interpreter_init): Rename to ...
12257         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
12258         bool, return void and make extern.  Adjust.
12259         (mi_interpreter_resume): ... Rename to ...
12260         (mi_interp::resume): ... this.  Remove the 'data' parameter,
12261         return void and make extern.  Adjust.
12262         (mi_interpreter_suspend): ... Rename to ...
12263         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
12264         return void and make extern.  Adjust.
12265         (mi_interpreter_exec): ... Rename to ...
12266         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
12267         extern.  Adjust.
12268         (mi_interpreter_pre_command_loop): ... Rename to ...
12269         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
12270         parameter and make extern.
12271         (mi_on_normal_stop_1): Adjust.
12272         (mi_ui_out): Rename to ...
12273         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
12274         parameter and make extern.  Adjust.
12275         (mi_set_logging): Rename to ...
12276         (mi_interp::set_logging): ... this.  Remove the 'interp'
12277         parameter and make extern.  Adjust.
12278         (mi_interp_procs): Delete.
12279         (mi_interp_factory): Adjust to use 'new'.
12280         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12281         (mi_print_exception, mi_execute_command, mi_load_progress):
12282         Adjust.
12283         * tui/tui-interp.c (tui_interp): New class.
12284         (as_tui_interp): Return a tui_interp pointer.
12285         (tui_on_normal_stop, tui_on_signal_received)
12286         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12287         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12288         to use interp::interp_ui_out.
12289         (tui_init): Rename to ...
12290         (tui_interp::init): ... this.  Remove the 'self' parameter, use
12291         bool, return void and make extern.  Adjust.
12292         (tui_resume): Rename to ...
12293         (tui_interp::resume): ... this.  Remove the 'data' parameter,
12294         return void and make extern.  Adjust.
12295         (tui_suspend): Rename to ...
12296         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
12297         return void and make extern.  Adjust.
12298         (tui_ui_out): Rename to ...
12299         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
12300         parameter, and make extern.  Adjust.
12301         (tui_exec): Rename to ...
12302         (tui_interp::exec): ... this.  Remove the 'data' parameter and
12303         make extern.
12304         (tui_interp_procs): Delete.
12305         (tui_interp_factory): Use "new".
12306
12307 2017-02-02  Tom Tromey  <tom@tromey.com>
12308
12309         * rust-exp.y (ends_raw_string, space_then_number)
12310         (rust_identifier_start_p): Return bool.
12311         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12312         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12313         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12314         (rust_chartype_p): Return bool.
12315         (val_print_struct, rust_print_struct_def, rust_print_type):
12316         Update.
12317         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
12318         Return bool.
12319
12320 2017-02-02  Tom Tromey  <tom@tromey.com>
12321
12322         * rust-lang.c: Reindent.
12323
12324 2017-02-02  Tom Tromey  <tom@tromey.com>
12325
12326         * rust-lang.h (rust_crate_for_block): Update.
12327         * rust-lang.c (rust_crate_for_block): Return std::string.
12328         (rust_get_disr_info): Use std:;string, not
12329         gdb::unique_xmalloc_ptr.
12330         * rust-exp.y (crate_name): Update.
12331
12332 2017-02-02  Pedro Alves  <palves@redhat.com>
12333
12334         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
12335         field out of gdb_disassembler_test and make it static.
12336
12337 2017-02-02  Pedro Alves  <palves@redhat.com>
12338
12339         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
12340         mi1_interp and mi_interp fields.
12341
12342 2017-02-02  Pedro Alves  <palves@redhat.com>
12343
12344         * cli/cli-interp.c (struct saved_output_files, saved_output):
12345         Moved from cli/cli-logging.c.
12346         (cli_set_logging): New function.
12347         (cli_interp_procs): Install cli_set_logging.
12348         * cli/cli-interp.h (make_logging_output, cli_set_logging):
12349         Declare.
12350         * cli/cli-logging.c (struct saved_output_files, saved_output):
12351         Moved to cli/cli-interp.c.
12352         (pop_output_files): Don't save outputs here.
12353         (make_logging_output): New function.
12354         (handle_redirections): Don't build tee nor save previous outputs
12355         here.
12356         * interps.c (current_interp_set_logging): Change prototype.
12357         Assume there's always a set_logging_proc method installed.
12358         * interps.h (interp_set_logging_ftype): Change prototype.
12359         (current_interp_set_logging): Change prototype and adjust comment.
12360         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
12361         use make_logging_output.
12362         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
12363 2017-02-02  Pedro Alves  <palves@redhat.com>
12364
12365         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12366         from ...
12367         (set_logging_overwrite): ... here.
12368         (logging_no_redirect_file): Delete.
12369         (set_logging_redirect): Don't handle redirection on the fly.
12370         Instead warn that "logging off" / "logging on" is necessary.
12371         (pop_output_files): Delete references to logging_no_redirect_file.
12372         (show_logging_command): Always speak in terms of what will happen
12373         once logging is reenabled.
12374
12375 2017-02-02  Pedro Alves  <palves@redhat.com>
12376
12377         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12378
12379 2017-02-02  Pedro Alves  <palves@redhat.com>
12380
12381         * disasm.c (gdb_pretty_print_insn): Rename to ...
12382         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12383         Remove gdbarch parameter.  Adapt to clear the object's buffers
12384         instead of allocating new buffers, and to print using the object's
12385         gdb_disassembler instead of calling gdb_print_insn.
12386         (dump_insns): Use gdb_pretty_print_disassembler.
12387         * disasm.h (gdb_pretty_print_insn): Delete declaration.
12388         (gdb_pretty_print_disassembler): New class.
12389         * record-btrace.c (btrace_insn_history): Use
12390         gdb_pretty_print_disassembler.
12391
12392 2017-02-02  Pedro Alves  <palves@redhat.com>
12393
12394         * ada-lang.c (type_as_string): Use string_file.
12395         * ada-valprint.c (ada_print_floating): Use string_file.
12396         * ada-varobj.c (ada_varobj_scalar_image)
12397         (ada_varobj_get_value_image): Use string_file.
12398         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12399         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12400         * breakpoint.c (update_inserted_breakpoint_locations)
12401         (insert_breakpoint_locations, reattach_breakpoints)
12402         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12403         (print_it_watchpoint): Use string_file.
12404         (save_breakpoints): Use stdio_file.
12405         * c-exp.y (oper): Use string_file.
12406         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12407         tee_file.
12408         (pop_output_files): Use delete.
12409         (handle_redirections): Use stdio_file and tee_file.
12410         * cli/cli-setshow.c (do_show_command): Use string_file.
12411         * compile/compile-c-support.c (c_compute_program): Use
12412         string_file.
12413         * compile/compile-c-symbols.c (generate_vla_size): Take a
12414         'string_file &' instead of a 'ui_file *'.
12415         (generate_c_for_for_one_variable): Take a 'string_file &' instead
12416         of a 'ui_file *'.  Use string_file.
12417         (generate_c_for_variable_locations): Take a 'string_file &'
12418         instead of a 'ui_file *'.
12419         * compile/compile-internal.h (generate_c_for_for_one_variable):
12420         Take a 'string_file &' instead of a 'ui_file *'.
12421         * compile/compile-loc2c.c (push, pushf, unary, binary)
12422         (print_label, pushf_register_address, pushf_register)
12423         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12424         'ui_file *'.  Adjust.
12425         * compile/compile.c (compile_to_object): Use string_file.
12426         * compile/compile.h (compile_dwarf_expr_to_c)
12427         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
12428         'ui_file *'.
12429         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
12430         (replace_typedefs_qualified_name): Use string_file and
12431         obstack_copy0.
12432         * disasm.c (gdb_pretty_print_insn): Use string_file.
12433         (gdb_disassembly): Adjust reference the null_stream global.
12434         (do_ui_file_delete): Delete.
12435         (gdb_insn_length): Use null_stream.
12436         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
12437         * dwarf2loc.c (dwarf2_compile_property_to_c)
12438         (locexpr_generate_c_location, loclist_generate_c_location): Take a
12439         'string_file &' instead of a 'ui_file *'.
12440         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
12441         * dwarf2read.c (do_ui_file_peek_last): Delete.
12442         (dwarf2_compute_name): Use string_file.
12443         * event-top.c (gdb_setup_readline): Use stdio_file.
12444         * gdbarch.sh (verify_gdbarch): Use string_file.
12445         * gdbtypes.c (safe_parse_type): Use null_stream.
12446         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
12447         string_file.
12448         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
12449         'string_file *' instead of a 'ui_file *'.
12450         (gdbscm_arch_disassemble): Use string_file.
12451         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
12452         * guile/scm-ports.c (class ioscm_file_port): Now a class that
12453         inherits from ui_file.
12454         (ioscm_file_port_delete, ioscm_file_port_rewind)
12455         (ioscm_file_port_put): Delete.
12456         (ioscm_file_port_write): Rename to ...
12457         (ioscm_file_port::write): ... this.  Remove file_port_magic
12458         checks.
12459         (ioscm_file_port_new): Delete.
12460         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
12461         ui_file_up.
12462         * guile/scm-type.c (tyscm_type_name): Use string_file.
12463         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
12464         Use string_file.
12465         * infcmd.c (print_return_value_1): Use string_file.
12466         * infrun.c (print_target_wait_results): Use string_file.
12467         * language.c (add_language): Use string_file.
12468         * location.c (explicit_to_string_internal): Use string_file.
12469         * main.c (captured_main_1): Use null_file.
12470         * maint.c (maintenance_print_architecture): Use stdio_file.
12471         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
12472         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
12473         event_channel>: Change type to mi_console_file pointer.
12474         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
12475         (mi_console_file_delete): Delete.
12476         (struct mi_console_file): Delete.
12477         (mi_console_file_magic): Delete.
12478         (mi_console_file_new): Delete.
12479         (mi_console_file::mi_console_file): New.
12480         (mi_console_file_delete): Delete.
12481         (mi_console_file_fputs): Delete.
12482         (mi_console_file::write): New.
12483         (mi_console_raw_packet): Delete.
12484         (mi_console_file::flush): New.
12485         (mi_console_file_flush): Delete.
12486         (mi_console_set_raw): Rename to ...
12487         (mi_console_file::set_raw): ... this.
12488         * mi/mi-console.h (class mi_console_file): New class.
12489         (mi_console_file_new, mi_console_set_raw): Delete.
12490         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
12491         (mi_set_logging): Use delete and tee_file.  Adjust.
12492         * mi/mi-main.c (output_register): Use string_file.
12493         (mi_cmd_data_evaluate_expression): Use string_file.
12494         (mi_cmd_data_read_memory): Use string_file.
12495         (mi_cmd_execute, print_variable_or_computed): Use string_file.
12496         * mi/mi-out.c (mi_ui_out::main_stream): New.
12497         (mi_ui_out::rewind): Use main_stream and
12498         string_file.
12499         (mi_ui_out::put): Use main_stream and string_file.
12500         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12501         Allocate a 'string_file' instead.
12502         (mi_out_new): Don't allocate a mem_fileopen stream here.
12503         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12504         (mi_ui_out::main_stream): Declare method.
12505         * printcmd.c (eval_command): Use string_file.
12506         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
12507         * python/py-arch.c (archpy_disassemble): Use string_file.
12508         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
12509         * python/py-frame.c (frapy_str): Use string_file.
12510         * python/py-framefilter.c (py_print_type, py_print_single_arg):
12511         Use string_file.
12512         * python/py-type.c (typy_str): Use string_file.
12513         * python/py-unwind.c (unwind_infopy_str): Use string_file.
12514         * python/py-value.c (valpy_str): Use string_file.
12515         * record-btrace.c (btrace_insn_history): Use string_file.
12516         * regcache.c (regcache_print): Use stdio_file.
12517         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
12518         * remote.c (escape_buffer): Use string_file.
12519         * rust-lang.c (rust_get_disr_info): Use string_file.
12520         * serial.c (serial_open_ops_1): Use stdio_file.
12521         (do_serial_close): Use delete.
12522         * stack.c (print_frame_arg): Use string_file.
12523         (print_frame_args): Remove local mem_fileopen stream, not used.
12524         (print_frame): Use string_file.
12525         * symmisc.c (maintenance_print_symbols): Use stdio_file.
12526         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
12527         Take a 'string_file *' instead of a 'ui_file *'.
12528         * top.c (new_ui): Use stdio_file and stderr_file.
12529         (free_ui): Use delete.
12530         (execute_command_to_string): Use string_file.
12531         (quit_confirm): Use string_file.
12532         * tracepoint.c (collection_list::append_exp): Use string_file.
12533         * tui/tui-disasm.c (tui_disassemble): Use string_file.
12534         * tui/tui-file.c: Don't include "ui-file.h".
12535         (enum streamtype, struct tui_stream): Delete.
12536         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
12537         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
12538         (tui_file::tui_file): New method.
12539         (tui_file_fputs): Delete.
12540         (tui_file_get_strbuf): Delete.
12541         (tui_file::puts): New method.
12542         (tui_file_adjust_strbuf): Delete.
12543         (tui_file_flush): Delete.
12544         (tui_file::flush): New method.
12545         * tui/tui-file.h: Tweak intro comment.
12546         Include ui-file.h.
12547         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
12548         (tui_file_adjust_strbuf): Delete declarations.
12549         (class tui_file): New class.
12550         * tui/tui-io.c (tui_initialize_io): Use tui_file.
12551         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
12552         (tui_register_format): Use string_stream.
12553         * tui/tui-stack.c (tui_make_status_line): Use string_file.
12554         (tui_get_function_from_frame): Use string_file.
12555         * typeprint.c (type_to_string): Use string_file.
12556         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
12557         (null_stream): New global.
12558         (ui_file_delete): Delete.
12559         (ui_file::ui_file): New.
12560         (null_file_isatty): Delete.
12561         (ui_file::~ui_file): New.
12562         (null_file_rewind): Delete.
12563         (ui_file::printf): New.
12564         (null_file_put): Delete.
12565         (null_file_flush): Delete.
12566         (ui_file::putstr): New.
12567         (null_file_write): Delete.
12568         (ui_file::putstrn): New.
12569         (null_file_read): Delete.
12570         (ui_file::putc): New.
12571         (null_file_fputs): Delete.
12572         (null_file_write_async_safe): Delete.
12573         (ui_file::vprintf): New.
12574         (null_file_delete): Delete.
12575         (null_file::write): New.
12576         (null_file_fseek): Delete.
12577         (null_file::puts): New.
12578         (ui_file_data): Delete.
12579         (null_file::write_async_safe): New.
12580         (gdb_flush, ui_file_isatty): Adjust.
12581         (ui_file_put, ui_file_rewind): Delete.
12582         (ui_file_write): Adjust.
12583         (ui_file_write_for_put): Delete.
12584         (ui_file_write_async_safe, ui_file_read): Adjust.
12585         (ui_file_fseek): Delete.
12586         (fputs_unfiltered): Adjust.
12587         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
12588         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
12589         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
12590         (set_ui_file_data): Delete.
12591         (string_file::~string_file, string_file::write)
12592         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
12593         (do_ui_file_as_string, ui_file_as_string): Delete.
12594         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
12595         (struct mem_file): Delete.
12596         (mem_file_new): Delete.
12597         (stdio_file::stdio_file): New.
12598         (mem_file_delete): Delete.
12599         (stdio_file::stdio_file): New.
12600         (mem_fileopen): Delete.
12601         (stdio_file::~stdio_file): New.
12602         (mem_file_rewind): Delete.
12603         (stdio_file::set_stream): New.
12604         (mem_file_put): Delete.
12605         (stdio_file::open): New.
12606         (mem_file_write): Delete.
12607         (stdio_file_magic, struct stdio_file): Delete.
12608         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
12609         (stdio_file::flush): New.
12610         (stdio_file_read): Rename to ...
12611         (stdio_file::read): ... this.  Adjust.
12612         (stdio_file_write): Rename to ...
12613         (stdio_file::write): ... this.  Adjust.
12614         (stdio_file_write_async_safe): Rename to ...
12615         (stdio_file::write_async_safe) ... this.  Adjust.
12616         (stdio_file_fputs): Rename to ...
12617         (stdio_file::puts) ... this.  Adjust.
12618         (stdio_file_isatty): Delete.
12619         (stdio_file_fseek): Delete.
12620         (stdio_file::isatty): New.
12621         (stderr_file_write): Rename to ...
12622         (stderr_file::write) ... this.  Adjust.
12623         (stderr_file_fputs): Rename to ...
12624         (stderr_file::puts) ... this.  Adjust.
12625         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
12626         (stderr_file::stderr_file): New.
12627         (tee_file_magic): Delete.
12628         (struct tee_file): Delete.
12629         (tee_file::tee_file): New.
12630         (tee_file_new): Delete.
12631         (tee_file::~tee_file): New.
12632         (tee_file_delete): Delete.
12633         (tee_file_flush): Rename to ...
12634         (tee_file::flush): ... this.  Adjust.
12635         (tee_file_write): Rename to ...
12636         (tee_file::write): ... this.  Adjust.
12637         (tee_file::write_async_safe): New.
12638         (tee_file_fputs): Rename to ...
12639         (tee_file::puts): ... this.  Adjust.
12640         (tee_file_isatty): Rename to ...
12641         (tee_file::isatty): ... this.  Adjust.
12642         * ui-file.h (struct obstack, struct ui_file): Don't
12643         forward-declare.
12644         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
12645         (ui_file_write_ftype)
12646         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
12647         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
12648         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
12649         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
12650         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
12651         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
12652         (set_ui_file_fseek): Delete.
12653         (ui_file_data, ui_file_delete, ui_file_rewind)
12654         (struct ui_file): New.
12655         (ui_file_up): New.
12656         (class null_file): New.
12657         (null_stream): Declare.
12658         (ui_file_write_for_put, ui_file_put): Delete.
12659         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
12660         Delete.
12661         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
12662         (gdb_fopen, tee_file_new): Delete.
12663         (struct string_file): New.
12664         (struct stdio_file): New.
12665         (stdio_file_up): New.
12666         (struct stderr_file): New.
12667         (class tee_file): New.
12668         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
12669         of a 'ui_file *'.  Adjust.
12670         * ui-out.h (class ui_out) <field_stream>: Likewise.
12671         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
12672         (null_stream): Delete.
12673         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
12674         Adjust.
12675         * utils.h (struct ui_file): Delete forward declaration..
12676         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
12677         (error_stream): Take a 'string_file &' instead of a
12678         'ui_file *'.
12679         * varobj.c (varobj_value_get_print_value): Use string_file.
12680         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
12681         * gdbarch.c: Regenerate.
12682
12683 2017-02-02  Pedro Alves  <palves@redhat.com>
12684
12685         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
12686         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
12687         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
12688         Adjust to call gdb_print_insn instead of
12689         gdb_disassembler::print_insn.
12690         (dump_insns, do_mixed_source_and_assembly_deprecated)
12691         (do_mixed_source_and_assembly, do_assembly_only): Add back a
12692         'gdbarch' parameter.  Remove gdb_disassembler parameter.
12693         (gdb_disassembly): Don't allocate a gdb_disassembler here.
12694         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
12695         declaration.
12696         (gdb_pretty_print_insn): Re-add declaration.
12697         * record-btrace.c (btrace_insn_history): Don't allocate a
12698         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
12699
12700 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
12701
12702         * disasm.h (gdb_disassembly): Remove file_string parameter.
12703         * disasm.c (gdb_disassembly): Likewise.
12704         * cli/cli-cmds.c (print_disassembly): Adapt.
12705         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
12706         * stack.c (do_gdb_disassembly): Likewise.
12707
12708 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12709
12710         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
12711         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
12712         targets.  And if the implicit value is longer than needed, extract
12713         the first bytes instead of the "least significant" ones.
12714
12715 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
12716
12717         * btrace.c (btrace_enable): Do not call btrace_add_pc for
12718         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
12719         (btrace_fetch): Assert can_access_registers_ptid.
12720         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
12721         validate_registers_access.
12722
12723 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
12724
12725         * gdbthread.h (can_access_registers_ptid): New.
12726         * thread.c (can_access_registers_ptid): New.
12727
12728 2017-02-01  Pedro Alves  <palves@redhat.com>
12729
12730         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
12731
12732 2017-01-31  Pedro Alves  <palves@redhat.com>
12733
12734         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
12735         Fix typos.
12736
12737 2017-01-31  Pedro Alves  <palves@redhat.com>
12738
12739         * stack.c (print_frame_args): Remove local mem_fileopen stream,
12740         not used.
12741
12742 2017-01-31  Pedro Alves  <palves@redhat.com>
12743
12744         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
12745
12746 2017-01-31  Pedro Alves  <palves@redhat.com>
12747
12748         * common/scoped_restore.h
12749         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
12750         change the value's parameter type to T2.
12751         (make_scoped_restore): Likewise.
12752
12753 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12754             Richard Henderson  <rth@redhat.com>
12755
12756         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
12757         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
12758         GS_BASE for older kernels.
12759         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
12760         GS_BASE for older kernels.
12761         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
12762         and GS_BASE to the offset table.
12763         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
12764         system register group.
12765         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
12766         for older kernels.
12767         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
12768         amd64 ABI.
12769         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
12770         AMD64_GSBASE_REGNUM.
12771         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
12772         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
12773         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
12774         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
12775         i386/64bit-segments.xml in those rules.
12776         * features/i386/64bit-segments.xml: New file.
12777         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
12778         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
12779         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
12780         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
12781         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
12782         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
12783         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
12784         * features/i386/amd64-avx-linux.c: Regenerated.
12785         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
12786         * features/i386/amd64-avx-mpx.c: Regenerated.
12787         * features/i386/amd64-avx512-linux.c: Regenerated.
12788         * features/i386/amd64-linux.c: Regenerated.
12789         * features/i386/amd64-mpx-linux.c: Regenerated.
12790         * features/i386/i386-avx-mpx-linux.c: Regenerated.
12791         * features/i386/i386-avx-mpx.c: Regenerated.
12792         * features/i386/x32-avx-linux.c: Regenerated.
12793         * features/i386/x32-avx512-linux.c: Regenerated.
12794         * regformats/i386/amd64-avx-linux.dat: Regenerated.
12795         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
12796         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
12797         * regformats/i386/amd64-linux.dat: Regenerated.
12798         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
12799         * regformats/i386/x32-avx-linux.dat: Regenerated.
12800         * regformats/i386/x32-avx512-linux.dat: Regenerated.
12801         * regformats/i386/x32-linux.dat: Regenerated.
12802
12803 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12804
12805         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
12806         Set to AMD64_NUM_REGS.
12807
12808 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12809
12810         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
12811         that checks validity of a register number.
12812
12813 2017-01-27  Kees Cook  <keescook@google.com>
12814
12815         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
12816         fetch_fpregs if target has fpa registers.
12817         (arm_linux_store_inferior_registers): Call store_fpregs if target
12818         has fpa registers.
12819
12820 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12821
12822         * cris-tdep.c (cris_gdbarch_init): Remove check for
12823         info.byte_order and force it to BFD_ENDIAN_LITTLE.
12824
12825 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
12826
12827         * corelow.c (get_core_register_section): Check for regset
12828         existence before checking for REGSET_VARIABLE_SIZE.
12829
12830 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12831             Pedro Alves  <palves@redhat.com>
12832
12833         PR gdb/20939
12834         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
12835         call memory_error, save memaddr instead.
12836         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
12837         negative, cal memory_error.
12838         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
12839
12840 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12841
12842         * disasm-selftests.c (memory_error_test): New function.
12843         (_initialize_disasm_selftests): Register memory_error_test.
12844
12845 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12846
12847         * Makefile.in (SFILES): Add disasm-selftests.c and
12848         selftest-arch.c.
12849         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
12850         * disasm-selftests.c: New file.
12851         * selftest-arch.c: New file.
12852         * selftest-arch.h: New file.
12853
12854 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12855
12856         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
12857         to bfd_arch_mep.  Don't return 0 if section is not
12858         found.  Call print_insn_mep.
12859
12860 2017-01-26  Pedro Alves  <palves@redhat.com>
12861             Yao Qi  <yao.qi@linaro.org>
12862
12863         * arm-tdep.c: Include "disasm.h".
12864         (gdb_print_insn_arm): Update code to get gdbarch.
12865         * disasm.c (dis_asm_read_memory): Change it to
12866         gdb_disassembler::dis_asm_read_memory.
12867         (dis_asm_memory_error): Likewise.
12868         (dis_asm_print_address): Likewise.
12869         (gdb_pretty_print_insn): Change it to
12870         gdb_disassembler::pretty_print_insn.
12871         (dump_insns): Add one argument gdb_disassemlber.  All
12872         callers updated.
12873         (do_mixed_source_and_assembly_deprecated): Likewise.
12874         (do_mixed_source_and_assembly): Likewise.
12875         (do_assembly_only): Likewise.
12876         (gdb_disassembler::gdb_disassembler): New.
12877         (gdb_disassembler::print_insn): New.
12878         * disasm.h (class gdb_disassembler): New.
12879         (gdb_pretty_print_insn): Remove declaration.
12880         (gdb_disassemble_info): Likewise.
12881         * guile/scm-disasm.c (class gdbscm_disassembler): New.
12882         (gdbscm_disasm_read_memory_worker): Update.
12883         (gdbscm_disasm_read_memory): Update.
12884         (gdbscm_disasm_memory_error): Remove.
12885         (gdbscm_disasm_print_address): Remove.
12886         (gdbscm_disassembler::gdbscm_disassembler): New.
12887         (gdbscm_print_insn_from_port): Update.
12888         * mips-tdep.c: Include disasm.h.
12889         (gdb_print_insn_mips): Update code to get gdbarch.
12890         * record-btrace.c (btrace_insn_history): Update.
12891         * spu-tdep.c: Include disasm.h.
12892         (struct spu_dis_asm_data): Remove.
12893         (struct spu_dis_asm_info): New.
12894         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
12895         SPU id.
12896         (gdb_print_insn_spu): Cast disassemble_info to
12897         spu_dis_asm_info.
12898
12899 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12900
12901         * disasm.c (do_ui_file_delete): Delete.
12902         (gdb_insn_length): Move code creating stream to ...
12903         * utils.c (null_stream): ... here.  New function.
12904         * utils.h (null_stream): Declare.
12905
12906 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
12907
12908         * python/py-inferior.c (find_thread_object): Return directly
12909         from the loop.  Remove "found" variable.
12910
12911 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
12912
12913         GDB 7.12.1 released.
12914
12915 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
12916
12917         * python/py-function.c (fnpy_call): Reorder declarations to have
12918         the gdbpy_enter object declared first.
12919         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
12920
12921 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
12922
12923         PR python/21068
12924         * python/python-internal.h (PyMem_RawMalloc): Define for
12925         Python < 3.4.
12926         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
12927         PyMem_RawMalloc instead of PyMem_Malloc.
12928
12929 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
12930             Luis Machado  <lgustavo@codesourcery.com>
12931
12932         * NEWS (New commands): Mention flash-erase.
12933         (New MI commands): Mention target-flash-erase.
12934         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
12935         command.
12936         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
12937         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
12938         * target.c (flash_erase_command): New function.
12939         (initialize_targets): Add new flash-erase command.
12940         * target.h (flash_erase_command): New declaration.
12941
12942 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
12943
12944         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
12945         HAVE_SYS_PROCFS_H is defined.
12946
12947 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12948
12949         * remote.c (struct cached_reg): Change data into a pointer.
12950         * (stop_reply_dtr): Free data pointers before deleting vector.
12951         (process_stop_reply): Likewise.
12952         (remote_parse_stop_reply): Allocate space for data
12953
12954 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12955
12956         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
12957         MAX_REGISTER_SIZE.
12958         (amd64_pseudo_register_read_value): Likewise.
12959         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
12960         (store_register_using_P): Likewise.
12961         * regcache.c (regcache_xfer_part): Likewise.
12962
12963 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
12964
12965         Split real and pseudo registers.
12966         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
12967         (sparc32_pseudo_regnum): New enum.
12968         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
12969         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
12970         (SPARC32_CP0_REGISTERS): New macro.
12971         (sparc32_pseudo_register_name): New function.
12972         (sparc32_register_name): Use sparc32_pseudo_register_name.
12973         (sparc32_pseudo_register_type): New function.
12974         (sparc32_register_type): Use sparc32_pseudo_register_type.
12975         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12976         pseudo register numbers.
12977         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12978         (SPARC64_CP0_REGISTERS): New macro.
12979         (sparc64_pseudo_register_name): New function.
12980         (sparc64_register_name): Use sparc64_pseudo_register_name.
12981         (sparc64_pseudo_register_type): New function.
12982         (sparc64_register_type): Use sparc64_pseudo_register_type.
12983         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12984         pseudo register numbers.
12985         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12986         sparc64_store_arguments): Handle pseudo register numbers.
12987
12988 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12989
12990         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12991         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12992         output.
12993         (getpkt_or_notif_sane_1): Likewise.
12994
12995 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12996
12997         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12998         of CC.  Pass "-x c++-header" instead of "-x c".
12999
13000 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13001
13002         * remote.c (remote_can_async_p): Update comment.
13003
13004 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13005
13006         * linux-nat.c (linux_nat_can_async_p): Update comment.
13007
13008 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13009
13010         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13011
13012 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
13013
13014         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13015
13016 2017-01-10  Tom Tromey  <tom@tromey.com>
13017
13018         * python/py-type.c (typy_legacy_template_argument): Update.
13019         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13020         ~demangle_parse_info): Declare new members.
13021         (cp_demangled_name_to_comp): Return unique_ptr.
13022         (cp_demangled_name_parse_free)
13023         (make_cleanup_cp_demangled_name_parse_free)
13024         (cp_new_demangle_parse_info): Remove.
13025         * cp-support.c (do_demangled_name_parse_free_cleanup)
13026         (make_cleanup_cp_demangled_name_parse_free): Remove.
13027         (inspect_type, cp_canonicalize_string_full)
13028         (cp_canonicalize_string): Update.
13029         (mangled_name_to_comp): Change return type.
13030         (cp_class_name_from_physname, method_name_from_physname)
13031         (cp_func_name, cp_remove_params): Update.
13032         * cp-name-parser.y (demangle_parse_info): New constructor, from
13033         cp_new_demangle_parse_info.
13034         (~demangle_parse_info): New destructor, from
13035         cp_demangled_name_parse_free.
13036         (cp_merge_demangle_parse_infos): Update.
13037         (cp_demangled_name_to_comp): Change return type.
13038
13039 2017-01-10  Tom Tromey  <tom@tromey.com>
13040
13041         * top.c (prevent_dont_repeat): Change return type.
13042         * python/python.c (execute_gdb_command): Use std::string.
13043         Update.
13044         * guile/guile.c (gdbscm_execute_gdb_command): Update.
13045         * command.h (prevent_dont_repeat): Change return type.
13046         * breakpoint.c (bpstat_do_actions_1): Update.
13047
13048 2017-01-10  Tom Tromey  <tom@tromey.com>
13049
13050         * value.h (scoped_value_mark::~scoped_value_mark): Call
13051         free_to_mark.
13052         (scoped_value_mark::free_to_mark): New method.
13053         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13054         scoped_value_mark.
13055
13056 2017-01-10  Tom Tromey  <tom@tromey.com>
13057
13058         * python/py-value.c (valpy_dereference, valpy_referenced_value)
13059         (valpy_reference_value, valpy_const_value, valpy_get_address)
13060         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13061         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13062         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13063         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13064         scoped_value_mark.
13065         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13066         * value.h (scoped_value_mark): New class.
13067
13068 2017-01-10  Tom Tromey  <tom@tromey.com>
13069
13070         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13071         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13072         * psymtab.c (discard_psymtabs_upto): Remove.
13073         (make_cleanup_discard_psymtabs): Remove.
13074         (struct psymtab_state): Remove.
13075
13076 2017-01-10  Tom Tromey  <tom@tromey.com>
13077
13078         * record-full.c (record_full_save_cleanups): Remove.
13079         (record_full_save): Use gdb::unlinker.
13080         * gcore.c (do_bfd_delete_cleanup): Remove.
13081         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
13082         cleanups.
13083         * dwarf2read.c (unlink_if_set): Remove.
13084         (write_psymtabs_to_index): Use gdb::unlinker.
13085         * common/gdb_unlinker.h: New file.
13086
13087 2017-01-10  Tom Tromey  <tom@tromey.com>
13088
13089         * windows-tdep.c (windows_xfer_shared_library): Update.
13090         * windows-nat.c (windows_make_so): Update.
13091         * utils.h (make_cleanup_bfd_unref): Remove.
13092         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13093         * symfile.h (symfile_bfd_open)
13094         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13095         * symfile.c (read_symbols, symbol_file_add)
13096         (separate_debug_file_exists): Update.
13097         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13098         (generic_load, reread_symbols): Update.
13099         * symfile-mem.c (symbol_file_add_from_memory): Update.
13100         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13101         (spu_symbol_file_add_from_memory): Update.
13102         * solist.h (struct target_so_ops) <bfd_open>: Return
13103         gdb_bfd_ref_ptr.
13104         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13105         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13106         gdb_bfd_ref_ptr.
13107         (solib_map_sections, reload_shared_libraries_1): Update.
13108         * solib-svr4.c (enable_break): Update.
13109         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13110         * solib-frv.c (enable_break2): Update.
13111         * solib-dsbt.c (enable_break): Update.
13112         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13113         gdb_bfd_ref_ptr.
13114         (darwin_solib_get_all_image_info_addr_at_init): Update.
13115         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13116         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13117         * record-full.c (record_full_save): Update.
13118         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13119         * procfs.c (insert_dbx_link_bpt_in_file): Update.
13120         * minidebug.c (find_separate_debug_file_in_section): Return
13121         gdb_bfd_ref_ptr.
13122         * machoread.c (macho_add_oso_symfile): Change abfd to
13123         gdb_bfd_ref_ptr.
13124         (macho_symfile_read_all_oso): Update.
13125         (macho_check_dsym): Return gdb_bfd_ref_ptr.
13126         (macho_symfile_read): Update.
13127         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13128         (jit_bfd_try_read_symtab): Update.
13129         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13130         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13131         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13132         gdb_bfd_ref_ptr.
13133         (gdb_bfd_ref_policy): New struct.
13134         (gdb_bfd_ref_ptr): New typedef.
13135         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13136         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13137         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13138         gdb_bfd_ref_ptr.
13139         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13140         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13141         (gcore_command): Update.
13142         * exec.c (exec_file_attach): Update.
13143         * elfread.c (elf_symfile_read): Update.
13144         * dwarf2read.c (dwarf2_get_dwz_file): Update.
13145         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13146         (open_and_init_dwo_file): Update.
13147         (open_dwp_file): Return gdb_bfd_ref_ptr.
13148         (open_and_init_dwp_file): Update.
13149         * corelow.c (core_open): Update.
13150         * compile/compile-object-load.c (compile_object_load): Update.
13151         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13152         * coffread.c (coff_symfile_read): Update.
13153         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13154         gdb_bfd_ref_ptr.  Rename.
13155         (dump_bfd_file, restore_command): Update.
13156         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13157         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13158         (find_separate_debug_file_by_buildid): Update.
13159
13160 2017-01-10  Tom Tromey  <tom@tromey.com>
13161
13162         * common/gdb_ref_ptr.h: New file.
13163         * python/py-ref.h (struct gdbpy_ref_policy): New.
13164         (gdbpy_ref): Now a typedef.
13165
13166 2017-01-10  Tom Tromey  <tom@tromey.com>
13167
13168         * utils.h (make_cleanup_htab_delete): Don't declare.
13169         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13170         Remove.
13171         * linespec.c (decode_compound_collector): Add constructor,
13172         destructor.
13173         (lookup_prefix_sym): Remove cleanup.
13174         (symtab_collector): Add constructor, destructor.
13175         (collect_symtabs_from_filename): Remove cleanup.
13176         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13177         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13178         Use htab_up.
13179         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13180         * dwarf2read.c (dw2_expand_symtabs_matching)
13181         (dw2_map_symbol_filenames, dwarf_decode_macros)
13182         (write_psymtabs_to_index): Use htab_up.
13183         * dwarf2loc.c (func_verify_no_selftailcall)
13184         (call_site_find_chain_1, func_verify_no_selftailcall)
13185         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13186         std::vector, gdb::unique_xmalloc_ptr.
13187         (call_sitep): Remove typedef.
13188         (dwarf2_locexpr_baton_eval): Remove unused variable.
13189
13190 2017-01-10  Tom Tromey  <tom@tromey.com>
13191
13192         * python/python-internal.h (make_cleanup_py_decref)
13193         (make_cleanup_py_xdecref): Don't declare.
13194         * python/py-utils.c (py_decref, make_cleanup_py_decref)
13195         (py_xdecref, make_cleanup_py_xdecref): Remove.
13196
13197 2017-01-10  Tom Tromey  <tom@tromey.com>
13198
13199         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13200         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13201
13202 2017-01-10  Tom Tromey  <tom@tromey.com>
13203
13204         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13205
13206 2017-01-10  Tom Tromey  <tom@tromey.com>
13207
13208         * python/py-utils.c (unicode_to_encoded_string)
13209         (python_string_to_target_string)
13210         (python_string_to_target_python_string)
13211         (python_string_to_host_string, gdbpy_obj_to_string)
13212         (get_addr_from_python): Use gdbpy_ref.
13213
13214 2017-01-10  Tom Tromey  <tom@tromey.com>
13215
13216         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13217         gdbpy_ref.
13218
13219 2017-01-10  Tom Tromey  <tom@tromey.com>
13220
13221         * python/python.c (eval_python_command, gdbpy_decode_line)
13222         (gdbpy_run_events, gdbpy_start_type_printers)
13223         (gdbpy_apply_type_printers): Use gdbpy_ref.
13224
13225 2017-01-10  Tom Tromey  <tom@tromey.com>
13226
13227         * python/py-param.c (get_doc_string, compute_enum_values): Use
13228         gdbpy_ref.
13229
13230 2017-01-10  Tom Tromey  <tom@tromey.com>
13231
13232         * python/py-inferior.c (find_thread_object, build_inferior_list):
13233         Use gdbpy_ref.
13234
13235 2017-01-10  Tom Tromey  <tom@tromey.com>
13236
13237         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13238
13239 2017-01-10  Tom Tromey  <tom@tromey.com>
13240
13241         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13242         gdbpy_ref.
13243
13244 2017-01-10  Tom Tromey  <tom@tromey.com>
13245
13246         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
13247         extra incref.
13248         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13249         Use gdbpy_ref.
13250
13251 2017-01-10  Tom Tromey  <tom@tromey.com>
13252
13253         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13254         gdbpy_ref.
13255
13256 2017-01-10  Tom Tromey  <tom@tromey.com>
13257
13258         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
13259         decref results of PyArg_ParseTupleAndKeywords.
13260
13261 2017-01-10  Tom Tromey  <tom@tromey.com>
13262
13263         * python/python.c (python_run_simple_file): Use
13264         unique_xmalloc_ptr, gdbpy_ref.
13265
13266 2017-01-10  Tom Tromey  <tom@tromey.com>
13267
13268         * python/py-prettyprint.c (print_stack_unless_memory_error)
13269         (print_string_repr, print_children): Use gdbpy_ref.
13270         (dummy_python_frame): New class.
13271         (dummy_python_frame::dummy_python_frame): Rename from
13272         push_dummy_python_frame.
13273         (py_restore_tstate): Remove.
13274
13275 2017-01-10  Tom Tromey  <tom@tromey.com>
13276
13277         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13278
13279 2017-01-10  Tom Tromey  <tom@tromey.com>
13280
13281         * python/python.c (ensure_python_env, restore_python_env):
13282         Remove.
13283         * python/python-internal.h (ensure_python_env): Don't declare.
13284         * varobj.h (varobj_ensure_python_env): Don't declare.
13285         * varobj.c (varobj_ensure_python_env): Remove.
13286
13287 2017-01-10  Tom Tromey  <tom@tromey.com>
13288
13289         * varobj.c (varobj_value_get_print_value): Use
13290         gdbpy_enter_varobj.
13291
13292 2017-01-10  Tom Tromey  <tom@tromey.com>
13293
13294         * python/py-prettyprint.c (print_string_repr, print_children):
13295         Update.
13296         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13297         of "encoding".
13298         * varobj.c (varobj_value_get_print_value): Update.
13299         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13300
13301 2017-01-10  Tom Tromey  <tom@tromey.com>
13302
13303         * varobj.c (varobj_get_display_hint)
13304         (dynamic_varobj_has_child_method, install_new_value_visualizer)
13305         (varobj_set_visualizer, free_variable): Use
13306         gdbpy_enter_varobj.
13307
13308 2017-01-10  Tom Tromey  <tom@tromey.com>
13309
13310         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13311         (do_finish_initialization): New function.  Use gdbpy_ref.
13312         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
13313         do_finish_initialization.
13314
13315 2017-01-10  Tom Tromey  <tom@tromey.com>
13316
13317         * python/py-param.c (get_set_value, get_show_value): Use
13318         gdbpy_enter, gdbpy_ref.
13319
13320 2017-01-10  Tom Tromey  <tom@tromey.com>
13321
13322         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
13323
13324 2017-01-10  Tom Tromey  <tom@tromey.com>
13325
13326         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
13327
13328 2017-01-10  Tom Tromey  <tom@tromey.com>
13329
13330         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
13331         Use gdbpy_enter_varobj.
13332
13333 2017-01-10  Tom Tromey  <tom@tromey.com>
13334
13335         * varobj.c (gdbpy_enter_varobj): New constructor.
13336         * python/python-internal.h (gdbpy_enter_varobj): New class.
13337         * python/py-varobj.c (py_varobj_get_iterator): Use
13338         gdbpy_enter_varobj.
13339
13340 2017-01-10  Tom Tromey  <tom@tromey.com>
13341
13342         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13343         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13344         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13345         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13346         unique_xmalloc_ptr.
13347         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13348
13349 2017-01-10  Tom Tromey  <tom@tromey.com>
13350
13351         * python/py-xmethods.c (invoke_match_method): Use
13352         gdbpy_ref.
13353
13354 2017-01-10  Tom Tromey  <tom@tromey.com>
13355
13356         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13357         gdbpy_enter, gdbpy_ref.
13358
13359 2017-01-10  Tom Tromey  <tom@tromey.com>
13360
13361         * python/python.c (python_interactive_command): Use gdbpy_enter.
13362
13363 2017-01-10  Tom Tromey  <tom@tromey.com>
13364
13365         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13366         gdbpy_ref.
13367
13368 2017-01-10  Tom Tromey  <tom@tromey.com>
13369
13370         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13371         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13372
13373 2017-01-10  Tom Tromey  <tom@tromey.com>
13374
13375         * utils.h (htab_deleter): New struct.
13376         (htab_up): New typedef.
13377         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13378         gdbpy_enter, gdbpy_ref, htab_up.
13379
13380 2017-01-10  Tom Tromey  <tom@tromey.com>
13381
13382         * python/py-unwind.c (pending_frame_invalidate): Remove.
13383         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13384
13385 2017-01-10  Tom Tromey  <tom@tromey.com>
13386
13387         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13388         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13389
13390 2017-01-10  Tom Tromey  <tom@tromey.com>
13391
13392         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13393
13394 2017-01-10  Tom Tromey  <tom@tromey.com>
13395
13396         * python/python.c (gdbpy_eval_from_control_command)
13397         (gdbpy_source_script, gdbpy_run_events)
13398         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13399         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13400         gdbpy_enter.
13401
13402 2017-01-10  Tom Tromey  <tom@tromey.com>
13403
13404         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13405
13406 2017-01-10  Tom Tromey  <tom@tromey.com>
13407
13408         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
13409
13410 2017-01-10  Tom Tromey  <tom@tromey.com>
13411
13412         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
13413         (python_on_inferior_call_pre, python_on_inferior_call_post)
13414         (python_on_memory_change, python_on_register_change)
13415         (python_inferior_exit, python_new_objfile, add_thread_object)
13416         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
13417
13418 2017-01-10  Tom Tromey  <tom@tromey.com>
13419
13420         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13421         (bpfinishpy_handle_exit): Use gdbpy_enter.
13422
13423 2017-01-10  Tom Tromey  <tom@tromey.com>
13424
13425         * python/py-cmd.c (cmdpy_destroyer)
13426         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13427         gdbpy_enter.
13428
13429 2017-01-10  Tom Tromey  <tom@tromey.com>
13430
13431         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13432         gdbpy_enter.
13433         (gdbpy_breakpoint_has_cond): Likewise.
13434
13435 2017-01-10  Tom Tromey  <tom@tromey.com>
13436
13437         * python/python.c (gdbpy_enter): New constructor.
13438         (~gdbpy_enter): New destructor.
13439         (restore_python_env, ensure_python_env): Rewrite.
13440         * python/python-internal.h (gdbpy_enter): New class.
13441
13442 2017-01-10  Tom Tromey  <tom@tromey.com>
13443
13444         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
13445
13446 2017-01-10  Tom Tromey  <tom@tromey.com>
13447
13448         * python/py-value.c (value_has_field, get_field_flag)
13449         (get_field_type, valpy_getitem, convert_value_from_python): Use
13450         gdbpy_ref.
13451
13452 2017-01-10  Tom Tromey  <tom@tromey.com>
13453
13454         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
13455         gdbpy_ref.
13456
13457 2017-01-10  Tom Tromey  <tom@tromey.com>
13458
13459         * python/py-prettyprint.c (search_pp_list)
13460         (find_pretty_printer_from_objfiles)
13461         (find_pretty_printer_from_progspace)
13462         (find_pretty_printer_from_gdb, find_pretty_printer)
13463         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
13464         gdbpy_ref.
13465
13466 2017-01-10  Tom Tromey  <tom@tromey.com>
13467
13468         * python/py-param.c (call_doc_function): Use gdbpy_ref.
13469
13470 2017-01-10  Tom Tromey  <tom@tromey.com>
13471
13472         * python/py-linetable.c (build_line_table_tuple_from_pcs)
13473         (ltpy_get_all_source_lines): Use gdbpy_ref.
13474
13475 2017-01-10  Tom Tromey  <tom@tromey.com>
13476
13477         * python/py-framefilter.c (extract_sym, extract_value)
13478         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
13479         gdbpy_ref.
13480
13481 2017-01-10  Tom Tromey  <tom@tromey.com>
13482
13483         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
13484
13485 2017-01-10  Tom Tromey  <tom@tromey.com>
13486
13487         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
13488
13489 2017-01-10  Tom Tromey  <tom@tromey.com>
13490
13491         * python/py-function.c (convert_values_to_python, fnpy_init): Use
13492         gdbpy_ref.
13493
13494 2017-01-10  Tom Tromey  <tom@tromey.com>
13495
13496         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
13497
13498 2017-01-10  Tom Tromey  <tom@tromey.com>
13499
13500         * python/py-type.c (convert_field, make_fielditem, typy_fields)
13501         (typy_range): Use gdbpy_ref.
13502
13503 2017-01-10  Tom Tromey  <tom@tromey.com>
13504
13505         * python/py-threadevent.c (create_thread_event_object): Use
13506         gdbpy_ref.
13507         * python/py-stopevent.c (create_stop_event_object): Simplify.
13508         (emit_stop_event): Use gdbpy_ref.
13509         * python/py-signalevent.c (create_signal_event_object): Use
13510         gdbpy_ref.
13511         * python/py-newobjfileevent.c (create_new_objfile_event_object)
13512         (emit_new_objfile_event, create_clear_objfiles_event_object)
13513         (emit_clear_objfiles_event): Use gdbpy_ref.
13514         * python/py-infevents.c (create_inferior_call_event_object)
13515         (create_register_changed_event_object)
13516         (create_memory_changed_event_object, emit_inferior_call_event)
13517         (emit_memory_changed_event, emit_register_changed_event): Use
13518         gdbpy_ref.
13519         * python/py-exitedevent.c (create_exited_event_object)
13520         (emit_exited_event): Use gdbpy_ref.
13521         * python/py-event.h (evpy_emit_event): Remove
13522         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
13523         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
13524         * python/py-continueevent.c (emit_continue_event): Use
13525         gdbpy_ref.
13526         * python/py-breakpoint.c (gdbpy_breakpoint_created)
13527         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
13528         gdbpy_ref.
13529         * python/py-bpevent.c (create_breakpoint_event_object): Use
13530         gdbpy_ref.
13531
13532 2017-01-10  Tom Tromey  <tom@tromey.com>
13533
13534         * python/py-ref.h: New file.
13535
13536 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
13537
13538         * cli-out.c (cli_ui_out::do_redirect): Change return type to
13539         void.
13540         * cli-out.h (cli_ui_out::do_redirect): Likewise.
13541         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
13542         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
13543         * ui-out.c (ui_out::redirect): Likewise.
13544         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
13545         * cli/cli-logging.c (set_logging_redirect): Update call site of
13546         ui_out::redirect.
13547         (handle_redirections): Likewise.
13548         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
13549         * top.c (execute_command_to_string): Likewise.
13550         * utils.c (do_ui_out_redirect_pop): Likewise.
13551
13552 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
13553
13554         * stack.c (_initialize_stack): Update "frame" command help message.
13555
13556 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
13557
13558         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
13559
13560 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13561
13562         * x86-linux-nat.h: Include gdb_proc_service.h.
13563
13564 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13565
13566         * ser-base.h: Include serial.h.
13567
13568 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13569
13570         * ppc-linux-tdep.h: Include ppc-tdep.h.
13571
13572 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13573
13574         * nat/amd64-linux-siginfo.h: Include signal.h.
13575
13576 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13577
13578         * nat/aarch64-linux-hw-point.h: Include break-common.h.
13579
13580 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13581
13582         * mi/mi-parse.h: Include mi-cmds.h.
13583
13584 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13585
13586         * inf-loop.c: Don't include "target.h".
13587         * inf-loop.h: Include it here.
13588
13589 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13590
13591         * dfp.h: Include "dboulest.h" and "expression.h".
13592
13593 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13594
13595         * ax-gdb.h: Include "ax.h".
13596
13597 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13598
13599         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
13600         with nat/gdb_ptrace.h.
13601
13602 2017-01-05  Yao Qi  <yao.qi@linaro.org>
13603
13604         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
13605         new line.
13606         (mips64_fbsd_sigframe_init): Likewise.
13607
13608 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13609
13610         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
13611         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
13612
13613 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13614
13615         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
13616         * NEWS: Mention new FreeBSD/mips native configuration.
13617         * config/mips/fbsd.mh: New file.
13618         * configure.host: Add mips*-*-freebsd*.
13619         * mips-fbsd-nat.c: New file.
13620
13621 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13622
13623         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
13624         (ALLDEPFILES): Add mips-fbsd-tdep.c.
13625         * NEWS: Mention new FreeBSD/mips target.
13626         * configure.tgt: Add mips*-*-freebsd*.
13627         * mips-fbsd-tdep.c: New file.
13628         * mips-fbsd-tdep.h: New file.
13629
13630 2017-01-04  Yao Qi  <yao.qi@linaro.org>
13631
13632         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
13633         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
13634
13635 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
13636
13637         Update copyright year range in all GDB files.
13638
13639 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
13640
13641         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
13642
13643 For older changes see ChangeLog-2016.
13644 \f
13645 Local Variables:
13646 mode: change-log
13647 left-margin: 8
13648 fill-column: 74
13649 version-control: never
13650 coding: utf-8
13651 End: