1 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3 * doublest.c (floatformat_precision): New routine.
4 (floatformat_to_string): Likewise.
5 * doublest.c (floatformat_to_string): Add prototype.
7 * printcmd.c (print_scalar_formatted): Only call print_floating
8 on floating-point types.
9 * valprint.c: Do not include "floatformat.h".
10 (generic_val_print_decfloat): Remove.
11 (generic_val_print): Call generic_val_print_float for both
12 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
13 (print_floating): Use floatformat_to_string. Handle decimal float.
14 (print_decimal_floating): Remove, merge into floatformat_to_string.
15 * value.h (print_decimal_floating): Remove.
17 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
19 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
21 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
23 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
25 * memattr.h: Don't include vec.h.
26 (struct mem_attrib): Initialize fields.
27 <unknown>: New static method.
28 (struct mem_region): Add constructors, operator<, initialize
30 * memattr.c: Include algorithm.
31 (default_mem_attrib, unknown_mem_attrib): Remove.
32 (user_mem_region_list): New global.
33 (target_mem_region_list, mem_region_list): Change type to
34 std::vector<mem_region>.
35 (mem_use_target): Now a function.
36 (target_mem_regions_valid): Change type to bool.
37 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
38 (require_user_regions): Adjust.
39 (require_target_regions): Adjust.
40 (create_mem_region): Adjust.
41 (lookup_mem_region): Adjust.
42 (invalidate_target_mem_regions): Adjust.
43 (mem_clear): Rename to...
44 (user_mem_clear): ... this, and adjust.
45 (mem_command): Adjust.
46 (info_mem_command): Adjust.
47 (mem_enable, enable_mem_command, mem_disable,
48 disable_mem_command): Adjust.
50 (delete_mem_command): Adjust.
51 * memory-map.h (parse_memory_map): Return an std::vector.
52 * memory-map.c (parse_memory_map): Likewise.
53 (struct memory_map_parsing_data): Add constructor.
54 <memory_map>: Point to std::vector.
55 (memory_map_start_memory): Adjust.
56 (memory_map_end_memory): Adjust.
57 (memory_map_end_property): Adjust.
58 (clear_result): Remove.
59 * remote.c (remote_memory_map): Return an std::vector.
60 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
62 (target_debug_print_mem_region_vector): New.
63 * target-delegates.c: Regenerate.
64 * target.h (mem_region_vector): New typedef.
65 (to_memory_map): Return mem_region_vector.
66 (target_memory_map): Return an std::vector.
67 * target.c (target_memory_map): Return an std::vector.
68 (flash_erase_command): Adjust.
70 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
72 * memory-map.c (struct memory_map_parsing_data) <property_name>:
73 Change type to std::string.
74 (memory_map_start_property): Adjust.
75 (memory_map_end_property): Adjust.
77 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
79 * infrun.h: Include common/byte-vector.h.
80 (struct displaced_step_closure): New struct.
81 (struct buf_displaced_step_closure): New struct.
82 * infrun.c (displaced_step_closure::~displaced_step_closure):
83 Provide default implementation.
84 (displaced_step_clear): Deallocate step closure with delete.
85 * aarch64-tdep.c (displaced_step_closure): Rename to ...
86 (aarch64_displaced_step_closure): ... this, extend
87 displaced_step_closure.
88 (aarch64_displaced_step_data) <dsc>: Change type to
89 aarch64_displaced_step_closure.
90 (aarch64_displaced_step_copy_insn): Adjust to type change, use
92 (aarch64_displaced_step_fixup): Add cast for displaced step
94 * amd64-tdep.c (displaced_step_closure): Rename to ...
95 (amd64_displaced_step_closure): ... this, extend
96 displaced_step_closure.
97 <insn_buf>: Change type to std::vector<gdb_byte>.
99 (fixup_riprel): Change type of DSC parameter, adjust to type
101 (fixup_displaced_copy): Change type of DSC parameter.
102 (amd64_displaced_step_copy_insn): Instantiate
103 amd64_displaced_step_closure.
104 (amd64_displaced_step_fixup): Add cast for closure type, adjust
105 to type change of insn_buf.
106 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
108 (arm_linux_copy_svc): Likewise.
109 (cleanup_kernel_helper_return): Likewise.
110 (arm_catch_kernel_helper_return): Likewise.
111 (arm_linux_displaced_step_copy_insn): Instantiate
112 arm_displaced_step_closure.
113 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
114 (displaced_read_reg): Change type of parameter DSC.
115 (branch_write_pc): Likewise.
116 (load_write_pc): Likewise.
117 (alu_write_pc): Likewise.
118 (displaced_write_reg): Likewise.
119 (arm_copy_unmodified): Likewise.
120 (thumb_copy_unmodified_32bit): Likewise.
121 (thumb_copy_unmodified_16bit): Likewise.
122 (cleanup_preload): Likewise.
123 (install_preload): Likewise.
124 (arm_copy_preload): Likewise.
125 (thumb2_copy_preload): Likewise.
126 (install_preload_reg): Likewise.
127 (arm_copy_preload_reg): Likewise.
128 (cleanup_copro_load_store): Likewise.
129 (install_copro_load_store): Likewise.
130 (arm_copy_copro_load_store) Likewise.
131 (thumb2_copy_copro_load_store): Likewise.
132 (cleanup_branch): Likewise.
133 (install_b_bl_blx): Likewise.
134 (arm_copy_b_bl_blx): Likewise.
135 (thumb2_copy_b_bl_blx): Likewise.
136 (thumb_copy_b): Likewise.
137 (install_bx_blx_reg): Likewise.
138 (arm_copy_bx_blx_reg): Likewise.
139 (thumb_copy_bx_blx_reg): Likewise.
140 (cleanup_alu_imm): Likewise.
141 (arm_copy_alu_imm): Likewise.
142 (thumb2_copy_alu_imm): Likewise.
143 (cleanup_alu_reg): Likewise.
144 (install_alu_reg): Likewise.
145 (arm_copy_alu_reg): Likewise.
146 (thumb_copy_alu_reg): Likewise.
147 (cleanup_alu_shifted_reg): Likewise.
148 (install_alu_shifted_reg): Likewise.
149 (arm_copy_alu_shifted_reg): Likewise.
150 (cleanup_load): Likewise.
151 (cleanup_store): Likewise.
152 (arm_copy_extra_ld_st): Likewise.
153 (install_load_store): Likewise.
154 (thumb2_copy_load_literal): Likewise.
155 (thumb2_copy_load_reg_imm): Likewise.
156 (arm_copy_ldr_str_ldrb_strb): Likewise.
157 (cleanup_block_load_all): Likewise.
158 (cleanup_block_store_pc): Likewise.
159 (cleanup_block_load_pc): Likewise.
160 (arm_copy_block_xfer): Likewise.
161 (thumb2_copy_block_xfer): Likewise.
162 (cleanup_svc): Likewise.
163 (install_svc): Likewise.
164 (arm_copy_svc): Likewise.
165 (thumb_copy_svc): Likewise.
166 (arm_copy_undef): Likewise.
167 (thumb_32bit_copy_undef): Likewise.
168 (arm_copy_unpred): Likewise.
169 (arm_decode_misc_memhint_neon): Likewise.
170 (arm_decode_unconditional): Likewise.
171 (arm_decode_miscellaneous): Likewise.
172 (arm_decode_dp_misc): Likewise.
173 (arm_decode_ld_st_word_ubyte): Likewise.
174 (arm_decode_media): Likewise.
175 (arm_decode_b_bl_ldmstm): Likewise.
176 (arm_decode_ext_reg_ld_st): Likewise.
177 (thumb2_decode_dp_shift_reg): Likewise.
178 (thumb2_decode_ext_reg_ld_st): Likewise.
179 (arm_decode_svc_copro): Likewise.
180 (thumb2_decode_svc_copro): Likewise.
181 (install_pc_relative): Likewise.
182 (thumb_copy_pc_relative_16bit): Likewise.
183 (thumb_decode_pc_relative_16bit): Likewise.
184 (thumb_copy_pc_relative_32bit): Likewise.
185 (thumb_copy_16bit_ldr_literal): Likewise.
186 (thumb_copy_cbnz_cbz): Likewise.
187 (thumb2_copy_table_branch): Likewise.
188 (cleanup_pop_pc_16bit_all): Likewise.
189 (thumb_copy_pop_pc_16bit): Likewise.
190 (thumb_process_displaced_16bit_insn): Likewise.
191 (decode_thumb_32bit_ld_mem_hints): Likewise.
192 (thumb_process_displaced_32bit_insn): Likewise.
193 (thumb_process_displaced_insn): Likewise.
194 (arm_process_displaced_insn): Likewise.
195 (arm_displaced_init_closure): Likewise.
196 (arm_displaced_step_fixup): Add cast for closure.
197 * arm-tdep.h: Include infrun.h.
198 (displaced_step_closure): Rename to ...
199 (arm_displaced_step_closure): ... this, extend
200 displaced_step_closure.
201 <u::svc::copy_svc_os>: Change type of parameter DSC.
203 (arm_process_displaced_insn): Likewise.
204 (arm_displaced_init_closure): Likewise.
205 (displaced_read_reg): Likewise.
206 (displaced_write_reg): Likewise.
207 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
209 * i386-tdep.h: Include infrun.h.
210 (i386_displaced_step_closure): New typedef.
211 * i386-tdep.c (i386_displaced_step_copy_insn): Use
212 i386_displaced_step_closure.
213 (i386_displaced_step_fixup): Adjust.
214 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
215 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
217 (ppc_displaced_step_fixup): Adjust.
218 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
219 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
221 (s390_displaced_step_fixup): Adjust.
223 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
225 * interps.h (interp_resume, interp_suspend, interp_set_temp):
228 2017-10-20 Tom Tromey <tom@tromey.com>
230 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
232 (gdb_bfd_record_inclusion): Update.
233 (bfdp): Remove typedef.
235 2017-10-20 Tom Tromey <tom@tromey.com>
237 * gdb_bfd.c (gdb_bfd_ref): Use new.
238 (struct gdb_bfd_data): Add constructor, destructor, and member
240 (gdb_bfd_unref): Use delete.
242 2017-10-20 Tom Tromey <tom@tromey.com>
244 * exec.c (exec_file_attach): Use new_bfd_ref.
245 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
246 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
247 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
249 * gdb_bfd.h (new_bfd_ref): New function.
251 2017-10-20 Pedro Alves <palves@redhat.com>
253 * main.c (captured_command_loop): Add attribute noinline.
255 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
257 * interps.c (struct interp_factory): Add constructor.
258 (interp_factory_p): Remove typedef.
259 (DEF_VEC_P(interp_factory_p)): Remove.
260 (interpreter_factories): Change type to std::vector.
261 (interp_factory_register): Adjust.
262 (interp_lookup): Adjust.
263 (interpreter_completer): Adjust.
265 2017-10-19 Tom Tromey <tom@tromey.com>
267 * break-catch-syscall.c (catch_syscall_completer): Use
268 std::string, gdb::unique_xmalloc_ptr.
270 2017-10-19 Tom Tromey <tom@tromey.com>
272 * infcall.c (call_function_by_hand_dummy): Use std::string.
274 2017-10-19 Tom Tromey <tom@tromey.com>
276 * mi/mi-main.c (mi_cmd_execute): Update.
277 * top.h (prepare_execute_command): Return scoped_value_mark.
278 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
279 Add move constructor.
280 * top.c (prepare_execute_command): Return scoped_value_mark.
281 (execute_command): Update.
283 2017-10-19 Pedro Alves <palves@redhat.com>
285 * xml-support.c (xml_fetch_content_from_file): Check fread's
288 2017-10-19 Pedro Alves <palves@redhat.com>
290 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
292 (handle_error_fd): New function.
293 (ser_base_async): Add/delete an event loop file handler for
296 2017-10-19 Pedro Alves <palves@redhat.com>
298 * xml-support.c (xml_fetch_content_from_file): Don't read in
299 chunks. Instead use fseek to determine the file's size, and read
302 2017-11-18 Keith Seitz <keiths@redhat.com>
304 * c-exp.y (oper): Canonicalize conversion operators of user-defined
306 Add whitespace to front of type name.
308 2017-10-18 Keith Seitz <keiths@redhat.com>
310 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
313 2017-10-18 Yao Qi <yao.qi@linaro.org>
315 * features/tic6x-c62x-linux.c: Remove.
317 2017-10-17 Tom Tromey <tom@tromey.com>
319 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
320 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
321 (do_mixed_source_and_assembly): Likewise.
323 2017-10-17 Tom Tromey <tom@tromey.com>
325 * regcache.c (regcache::xfer_part): Remove assertion.
327 2017-10-17 Pedro Alves <palves@redhat.com>
329 * xml-support.c (xml_fetch_content_from_file): Call
330 unique_ptr::release() instead unique_ptr::get() when passing
333 2017-10-17 Yao Qi <yao.qi@linaro.org>
335 * regcache.c (regcache::xfer_part): Remove parameters read and
336 write, add parameter is_raw. All callers are updated.
338 2017-10-16 Keith Seitz <keiths@redhat.com>
340 * c-typeprint.c (enum access_specifier): Moved here from
342 (output_access_specifier): New function.
343 (c_type_print_base): Consider typedefs when assessing
344 whether access labels are needed.
345 Use output_access_specifier as needed.
346 Output access specifier for typedefs, if needed.
347 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
348 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
350 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
353 2017-10-16 Tom Tromey <tom@tromey.com>
355 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
356 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
357 * target.c (target_fileio_read_stralloc): Update.
358 * sparc64-tdep.c (adi_is_addr_mapped): Update.
359 * target.h (target_fileio_read_stralloc): Return
362 2017-10-16 Tom Tromey <tom@tromey.com>
364 * xml-syscall.c (xml_init_syscalls_info): Update.
365 * xml-support.c (xinclude_start_include): Update.
366 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
367 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
368 (xml_fetch_content_from_file): Likewise.
369 * osdata.c (get_osdata): Update.
370 * target.h (target_read_stralloc, target_get_osdata): Return
372 * solib-aix.c (solib_aix_get_library_list): Update.
373 * solib-target.c (solib_target_current_sos): Update.
374 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
375 * xml-tdesc.c (fetch_available_features_from_target): Update.
376 (target_fetch_description_xml): Update.
377 (file_read_description_xml): Update.
378 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
379 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
380 (remote_pid_to_exec_file): Update.
381 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
382 (target_get_osdata): Likewise.
384 2017-10-16 Tom Tromey <tom@tromey.com>
386 * remote.c (remote_register_number_and_offset): Use std::vector.
387 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
388 (putpkt_binary): Use gdb::def_vector.
389 (compare_sections_command): Use gdb::byte_vector.
391 2017-10-16 Tom Tromey <tom@tromey.com>
393 * ppc-linux-nat.c (hwdebug_insert_point): Use
394 gdb::unique_xmalloc_ptr, XDUP.
396 2017-10-16 Tom Tromey <tom@tromey.com>
398 * probe.c (parse_probes): Use std::string.
399 (info_probes_for_ops, enable_probes_command)
400 (disable_probes_command): Remove cleanups.
402 2017-10-16 Tom Tromey <tom@tromey.com>
404 * buildsym.c (block_compar): Remove.
405 (end_symtab_get_static_block): Use std::vector.
407 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
409 * memrange.h (struct mem_range): Define operator< and operator==.
410 (mem_range_s): Remove.
411 (DEF_VEC_O (mem_range_s)): Remove.
412 (normalize_mem_ranges): Change parameter type to std::vector.
413 * memrange.c (compare_mem_ranges): Remove.
414 (normalize_mem_ranges): Change parameter type to std::vector,
415 adjust to vector change.
416 * exec.c (section_table_available_memory): Return vector, remove
418 (section_table_read_available_memory): Adjust to std::vector
420 * remote.c (remote_read_bytes): Adjust to std::vector
422 * tracepoint.h (traceframe_available_memory): Change parameter
424 * tracepoint.c (traceframe_available_memory): Change parameter
425 type to std::vector, adjust.
426 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
428 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
429 unittests/memrange-selftests.c.
430 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
431 * gdb/unittests/memrange-selftests.c: New file.
433 2017-10-16 Pedro Alves <palves@redhat.com>
435 * elfread.c (probe_key_free): Rename range-for variable.
436 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
437 (find_probe_by_pc, collect_probes): Rename range-for variable.
439 2017-10-16 Yao Qi <yao.qi@linaro.org>
441 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
442 * features/tic6x-c62x.c: Remove.
443 * features/tic6x-c64x-linux.c: Remove.
444 * features/tic6x-c64x.c: Remove.
445 * features/tic6x-c64xp-linux.c: Remove.
446 * features/tic6x-c64xp.c: Remove.
447 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
448 initialize_tdesc_tic6x_*_linux functions.
449 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
450 initialize_tdesc_tic6x_* functions.
452 2017-10-16 Yao Qi <yao.qi@linaro.org>
454 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
456 * regformats/tic6x-c62x.dat: Remove.
457 * regformats/tic6x-c64x.dat: Remove.
458 * regformats/tic6x-c64xp.dat: Remove.
460 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
462 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
463 (the !HAVE_LIBEXPAT version).
465 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
467 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
470 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
472 * target.h: Include tracepoint.h.
473 (enum trace_find_type): Move to tracepoint.h.
474 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
475 * tracepoint.h: Don't include target.h
476 (enum trace_find_type): Move from target.h.
477 (parse_traceframe_info): Return a unique ptr.
478 * tracepoint.c (current_traceframe_info): Change type to unique
480 (free_traceframe_info): Remove.
481 (clear_traceframe_info): Don't manually free
482 current_traceframe_info.
483 (free_result): Remove.
484 (parse_traceframe_info): Return a unique ptr.
485 (get_traceframe_info): Adjust to unique ptr.
486 * ctf.c (ctf_traceframe_info): Return a unique ptr.
487 * remote.c (remote_traceframe_info): Return a unique ptr.
488 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
490 * target-debug.h (target_debug_print_traceframe_info_up): New
492 * target-delegates.c: Regenerate.
494 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
496 * memrange.h (struct mem_range): Add constructors.
497 * tracepoint.h (struct traceframe_info) <memory>: Change type to
498 std::vector<mem_range>.
499 * tracepoint.c (free_traceframe_info): Don't manually free
501 (traceframe_info_start_memory): Adjust to vector change.
502 (traceframe_available_memory): Likewise.
503 * tracefile-tfile.c (build_traceframe_info): Likewise.
504 * ctf.c (ctf_traceframe_info): Likewise.
506 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
508 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
510 * tracepoint.c (free_traceframe_info): Deallocate with delete.
511 (traceframe_info_start_tvar): Adjust to vector change.
512 (parse_traceframe_info): Allocate with new.
513 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
515 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
517 tfile_traceframe_info): Allocate with new.
518 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
521 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
523 * tracepoint.c (traceframe_info): Rename to...
524 (current_traceframe_info): ...this.
525 (clear_traceframe_info): Adjust.
526 (get_traceframe_info): Adjust.
528 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
530 * nat/linux-osdata.c: Include algorithm.
531 (compare_processes): Remove.
532 (struct pid_pgid_entry): New struct.
533 (linux_xfer_osdata_processgroups): Use std::vector instead of
536 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
538 * objfiles.h: Don't include symfile.h.
539 (struct partial_symbol): Remove forward-declaration.
540 (struct objfile) <global_psymbols, static_psymbols>: Change type
541 to std::vector<partial_symbol *>.
542 * objfiles.c (objfile::objfile): Don't memset those fields.
543 (objfile::~objfile): Don't free those fields.
544 * psympriv.h (struct psymbol_allocation_list): Remove
546 (add_psymbol_to_list): Change psymbol_allocation_list parameter
548 (start_psymtab_common): Change parameters to std::vector.
549 * psymtab.c: Include algorithm.
550 (require_partial_symbols): Call shrink_to_fit.
551 (find_pc_sect_psymbol): Adjust to vector change.
552 (match_partial_symbol): Likewise.
553 (lookup_partial_symbol): Likewise.
554 (psym_relocate): Likewise.
555 (dump_psymtab): Likewise.
556 (recursively_search_psymtabs): Likewise.
557 (compare_psymbols): Remove.
558 (sort_pst_symbols): Adjust to vector change.
559 (start_psymtab_common): Likewise.
560 (end_psymtab_common): Likewise.
561 (psymbol_bcache_full): De-constify return value.
562 (add_psymbol_to_bcache): Likewise.
563 (extend_psymbol_list): Remove.
564 (append_psymbol_to_list): Adjust to vector change.
565 (add_psymbol_to_list): Likewise.
566 (init_psymbol_list): Likewise.
567 (maintenance_info_psymtabs): Likewise.
568 (maintenance_check_psymtabs): Likewise.
569 * symfile.h (struct psymbol_allocation_list): Remove.
570 * symfile.c (reread_symbols): Adjust to vector change.
571 * dbxread.c (start_psymtab): Change type of parameters.
572 (dbx_symfile_read): Adjust to vector change.
573 (read_dbx_symtab): Likewise.
574 (start_psymtab): Change type of parameters.
575 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
576 (create_partial_symtab): Likewise.
577 (add_partial_symbol): Likewise.
578 (write_one_signatured_type): Likewise.
579 (recursively_write_psymbols): Likewise.
580 * mdebugread.c (parse_partial_symbols): Likewise.
581 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
582 (scan_xcoff_symtab): Adjust to vector change.
583 (xcoff_initial_scan): Likewise.
585 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
587 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
589 2017-10-13 Yao Qi <yao.qi@linaro.org>
591 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
592 Remove s390x-*-expedite, add s390x-expedite.
594 2017-10-13 Yao Qi <yao.qi@linaro.org>
596 * features/s390-gs-linux64.c: Regenerated.
597 * features/s390x-gs-linux64.c: Regenerated.
599 2017-10-13 Tom Tromey <tom@tromey.com>
601 * compile/compile-object-run.c (do_module_cleanup): Use delete.
602 * solib.c (update_solib_list, reload_shared_libraries_1): Use
604 * symfile.c (symbol_file_add_with_addrs): Use new.
605 (symbol_file_add_separate): Update comment.
606 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
607 * jit.c (jit_object_close_impl): Use new.
608 (jit_unregister_code): Use delete.
609 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
610 (~objfile): Rename from free_objfile.
611 (free_objfile_separate_debug, do_free_objfile_cleanup)
612 (free_all_objfiles, objfile_purge_solibs): Use delete.
613 * objfiles.h (struct objfile): Add constructor and destructor.
614 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
615 (allocate_objfile, free_objfile): Don't declare.
616 (struct objstats): Add initializers.
618 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
620 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
621 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
622 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
623 * gdbarch.h: Regenerate.
624 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
626 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
627 (i386_displaced_step_fixup): Adjust comment.
628 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
630 2017-10-12 Tom Tromey <tom@tromey.com>
632 * prologue-value.h (pv_area::store_would_trash): Return bool.
633 (pv_area::find_reg): Likewise.
634 * prologue-value.c (pv_area::store_would_trash): Return bool.
635 (pv_area::find_reg): Likewise.
637 2017-10-12 Tom Tromey <tom@tromey.com>
639 * s390-linux-tdep.c (s390_store, s390_load)
640 (s390_check_for_saved, s390_analyze_prologue): Update.
641 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
642 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
643 * prologue-value.h (class pv_area): Move from prologue-value.c.
644 Change names of members. Add constructor, destructor, member
646 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
647 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
648 (pv_area_fetch, pv_area_scan): Don't declare.
649 * prologue-value.c (struct pv_area::area_entry): Now member of
651 (struct pv_area): Move to prologue-value.h.
652 (pv_area::pv_area): Rename from make_pv_area.
653 (pv_area::~pv_area): Rename from free_pv_area.
654 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
655 (clear_entries, find_entry, overlaps, store_would_trash, store)
656 (fetch, find_reg, scan): Now member of pv_area.
657 Remove "area" argument. Update.
658 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
660 * mn10300-tdep.c (push_reg, check_for_saved)
661 (mn10300_analyze_prologue): Update.
662 * mep-tdep.c (is_arg_spill, check_for_saved)
663 (mep_analyze_prologue): Update.
664 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
665 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
666 (m32c_is_struct_return, m32c_analyze_prologue): Update.
667 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
669 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
670 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
672 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
674 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
675 * linux-nat.c (linux_nat_delete_thread): New variable.
676 (lwp_free): Invoke linux_nat_delete_thread if set.
677 (linux_nat_set_delete_thread): New function.
678 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
679 thread delete callback.
680 * arm-linux-nat.c (arm_linux_delete_thread): New function.
681 (_initialize_arm_linux_nat): Assign thread delete callback.
682 * s390-linux-nat.c (s390_delete_thread): New function.
683 (_initialize_s390_nat): Assign thread delete callback.
684 * x86-linux-nat.c (x86_linux_add_target): Likewise.
685 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
687 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
689 * nat/x86-linux.c (x86_linux_delete_thread): New function.
690 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
692 2017-10-09 Tom Tromey <tom@tromey.com>
694 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
696 * tui/tui-layout.c (enum tui_status): Use std::string.
698 2017-10-11 Tom Tromey <tom@tromey.com>
700 * gdbthread.h (thread_command): Constify.
701 * inferior.h (detach_command): Constify.
702 * top.h (set_history, show_history): Constify.
703 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
704 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
705 * bsd-kvm.c (bsd_kvm_cmd): Constify.
706 * printcmd.c (set_command): Constify.
707 (non_const_set_command): New function.
708 * dcache.c (set_dcache_command, show_dcache_command): Constify.
709 * breakpoint.c (enable_command, disable_command, delete_command)
710 (catch_command, tcatch_command, set_breakpoint_cmd)
711 (show_breakpoint_cmd): Constify.
712 * macrocmd.c (macro_command): Constify.
713 * infcmd.c (unset_command, kill_command, detach_command)
714 (info_proc_cmd): Constify.
715 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
716 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
717 (info_auto_load_cmd): Constify.
718 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
719 (unset_tdesc_cmd): Constify.
720 * ada-lang.c (set_ada_command, show_ada_command)
721 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
722 * guile/guile.c (set_guile_command, show_guile_command)
723 (info_guile_command): Constify.
724 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
726 * skip.c (skip_command): Constify.
727 * compile/compile.c (_initialize_compile): Constify.
728 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
729 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
730 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
731 (maint_btrace_pt_show_cmd): Constify.
732 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
734 * python/python.c (user_show_python, user_set_python): Constify.
735 * mips-tdep.c (set_mips_command, show_mips_command)
736 (set_mipsfpu_command): Constify.
737 * record-btrace.c (cmd_record_btrace_start)
738 (cmd_set_record_btrace, cmd_show_record_btrace)
739 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
740 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
741 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
743 * symfile.c (overlay_command): Constify.
744 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
745 * cli/cli-logging.c (set_logging_command, show_logging_command):
747 * cli/cli-dump.c (dump_command, append_command)
748 (srec_dump_command, ihex_dump_command, verilog_dump_command)
749 (tekhex_dump_command, binary_dump_command)
750 (binary_append_command): Constify.
751 * cli/cli-decode.c (struct cmd_list_element): Change type of
753 * cli/cli-cmds.c (info_command, show_command, set_debug)
754 (show_debug): Constify.
755 (show_command): Add non-const overload.
756 * top.c (set_history, show_history): Constify.
757 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
758 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
759 * target.c (target_command): Constify.
760 * sparc64-tdep.c (info_adi_command): Constify.
761 * record-full.c (cmd_record_full_start): Constify.
762 (set_record_full_command): Constify. Fix typo.
763 (show_record_full_command): Constify.
764 * thread.c (thread_command, thread_apply_command): Constify.
765 * memattr.c (dummy_cmd): Constify.
766 * value.c (function_command): Constify.
767 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
768 * probe.c (info_probes_command): Constify.
769 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
770 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
771 (show_thread_cmd, set_thread_default_cmd)
772 (show_thread_default_cmd): Constify.
773 (check_empty): Constify.
774 * tracepoint.c (tfind_command): Constify.
775 * cp-support.c (maint_cplus_command): Constify.
776 * windows-tdep.c (info_w32_command): Constify.
777 * record.c (cmd_record_start, set_record_command)
778 (show_record_command, info_record_command, cmd_record_goto):
780 * ravenscar-thread.c (set_ravenscar_command)
781 (show_ravenscar_command): Constify.
782 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
784 (add_internal_problem_command): Remove casts.
785 * arc-tdep.c (maintenance_print_arc_command): Constify.
786 * valprint.c (set_print, show_print, set_print_raw)
787 (show_print_raw): Constify.
788 * maint.c (maintenance_command, maintenance_info_command)
789 (maintenance_print_command, maintenance_set_cmd)
790 (maintenance_show_cmd, set_per_command_cmd)
791 (show_per_command_cmd, maintenance_check_command): Constify.
792 * language.c (set_check, show_check): Constify.
793 * typeprint.c (show_print_type, set_print_type): Constify.
794 * go32-nat.c (go32_info_dos_command): Constify.
796 2017-10-11 Tom Tromey <tom@tromey.com>
798 * breakpoint.c (prepare_re_set_context): Remove.
799 (breakpoint_re_set_one): Update. Don't use cleanups.
800 (breakpoint_re_set): Use scoped_restore, std::string, and
801 scoped_restore_current_language.
803 2017-10-11 Tom Tromey <tom@tromey.com>
805 * breakpoint.c (commands_command_1): Use std::string.
806 (cleanup_executing_breakpoints): Remove.
807 (bpstat_do_actions_1): Use scoped_restore.
808 (bpstat_check_watchpoint): Use std::string.
809 (decode_static_tracepoint_spec): Likewise.
810 (break_range_command): Likewise.
811 (watch_command_1): Likewise.
812 (compare_breakpoints): Change argument types.
813 (clear_command): Use std::vector.
814 (cleanup_executing_breakpoints): Remove.
815 (update_global_location_list): Use unique_xmalloc_ptr.
816 (strace_command): Remove unused declaration.
818 2017-10-11 John Baldwin <jhb@FreeBSD.org>
820 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
821 * NEWS: Mention new FreeBSD/arm native configuration.
822 * configure.host: Add arm*-*-freebsd*.
823 * configure.nat: Likewise.
824 * arm-fbsd-nat.c: New file.
826 2017-10-11 John Baldwin <jhb@FreeBSD.org>
828 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
829 (ALLDEPFILES): Add arm-fbsd-tdep.c.
830 * NEWS: Mention new FreeBSD/arm target.
831 * configure.tgt: Add arm*-*-freebsd*.
832 * arm-fbsd-tdep.c: New file.
833 * arm-fbsd-tdep.h: New file.
835 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
837 * linux-tdep.c (linux_make_corefile_notes): Remove call to
838 `gdbarch_elfcore_write_linux_prpsinfo'.
839 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
841 (elf_internal_linux_prpsinfo): Remove declaration.
842 * gdbarch.h: Regenerate.
843 * gdbarch.c: Regenerate.
845 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
847 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
848 `set_gdbarch_elfcore_write_linux_prpsinfo'.
850 2017-10-11 Pedro Alves <palves@redhat.com>
852 * breakpoint.c (reattach_breakpoints): Delete.
853 * breakpoint.h (reattach_breakpoints): Delete.
855 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
857 * symfile.c (registered_sym_fns): Make struct, not typedef.
858 (DEF_VEC_O (registered_sym_fns)): Remove.
859 (symtab_fns): Change type to std::vector.
860 (add_symtab_fns): Adjust.
861 (find_sym_fns): Adjust.
863 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
865 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
866 * arc-tdep.h (arc_arch_is_em): New function.
867 (arc_arch_is_hs): Likewise.
869 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
871 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
872 parentheses in the declaration.
873 (macro_lookup_inclusion): Likewise.
874 (macro_lookup_definition): Likewise.
875 * p-lang.h (pascal_builtin_types): Likewise.
876 * tui/tui-data.c (tui_win_list): Likewise.
877 * tui/tui-data.h (tui_win_list): Likewise.
878 * utils.h (make_cleanup_free_section_addr_info): Likewise.
880 2017-10-11 Mark Rages <markrages@gmail.com>
882 * target-memory.c (block_boundaries): Fix for block address not
883 aligned on block size.
885 2017-10-10 Pedro Alves <palves@redhat.com>
886 Tom Tromey <tom@tromey.com>
888 * breakpoint.c (struct captured_breakpoint_query_args)
889 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
890 (print_breakpoint): New.
891 * breakpoint.h (print_breakpoint): Declare.
892 * common/common-exceptions.h (enum return_reason): Remove
893 references to catch_exceptions.
894 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
896 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
897 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
899 * gdbthread.h (thread_select): Declare.
900 * mi/mi-cmd-break.c: Don't include gdb.h.
901 (breakpoint_notify): Use print_breakpoint.
902 * mi/mi-cmd-catch.c: Don't include gdb.h.
903 * mi/mi-interp.c: Don't include gdb.h.
904 (mi_print_breakpoint_for_event): New.
905 (mi_breakpoint_created, mi_breakpoint_modified): Use
906 mi_print_breakpoint_for_event.
907 * mi/mi-main.c: Don't include gdb.h.
908 (mi_cmd_thread_select): Parse the global thread ID here. Use
909 thread_select instead of gdb_thread_select.
910 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
911 of using gdb_list_thread_ids.
912 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
914 (remote_fileio_request): Use TRY/CATCH instead of
916 * symfile-mem.c (struct symbol_file_add_from_memory_args)
917 (symbol_file_add_from_memory_wrapper): Delete.
918 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
919 * thread.c: Don't include gdb.h.
920 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
921 (thread_alive): Use thread_select.
922 (do_captured_thread_select): Delete, parts salvaged as ...
923 (thread_select): ... this new function.
924 (gdb_thread_select): Delete.
926 2017-10-10 Pedro Alves <palves@redhat.com>
927 Tom Tromey <tom@tromey.com>
929 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
931 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
932 No longer macros. Instead ...
933 (enum wp_check_result): They're now values of this new
935 (watchpoint_check): Change return type to wp_check_result and
936 parameter type to bpstat.
937 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
938 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
939 catch_errors. Reverse logic of watchpoint_check call.
940 (breakpoint_re_set_one): Now returns void and takes a breakpoint
941 pointer as parameter.
942 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
943 * common/common-exceptions.c (throw_exception_sjlj): Update
944 comments to avoid mentioning catch_errors.
945 * exceptions.c (catch_errors): Delete.
946 * exceptions.h: Update comments to avoid mentioning catch_errors.
947 (catch_errors_ftype, catch_errors): Delete.
948 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
949 (hook_stop_stub): Delete.
950 (restore_selected_frame): Change return type to void, and
951 parameter type to const frame_id &.
952 (restore_infcall_control_state): Use TRY/CATCH instead of
954 * main.c (captured_command_loop): Return void and remove
955 parameter. Remove references to catch_errors.
956 (captured_main): Use TRY/CATCH instead of catch_errors.
957 * objc-lang.c (objc_submethod_helper_data)
958 (find_objc_msgcall_submethod_helper): Delete.
959 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
961 * record-full.c (record_full_message): Return void.
962 (record_full_message_args, record_full_message_wrapper): Delete.
963 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
964 instead of catch_errors.
965 * solib-aix.c (solib_aix_open_symbol_file_object): Change
966 parameter type to int.
967 * solib-darwin.c (open_symbol_file_object): Ditto.
968 * solib-dsbt.c (open_symbol_file_object): Ditto.
969 * solib-frv.c (open_symbol_file_object): Ditto.
970 * solib-svr4.c (open_symbol_file_object): Ditto.
971 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
972 * solib.c (update_solib_list): Use TRY/CATCH instead of
974 * solist.h (struct target_so_ops) <open_symbol_file_object>:
976 * symmisc.c (struct print_symbol_args): Remove.
977 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
978 (print_symbol): Change type.
979 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
980 and remove parameters.
982 (get_windows_debug_event): Adjust.
984 2017-10-09 Tom Tromey <tom@tromey.com>
986 * mi/mi-main.c (free_splay_tree): Remove.
987 (list_available_thread_groups): Use splay_tree_up.
988 * common/gdb_splay_tree.h: New file.
990 2017-10-09 Tom Tromey <tom@tromey.com>
992 * mi/mi-main.c (do_nothing): Remove.
993 (list_available_thread_groups): Update.
995 2017-10-09 Pedro Alves <palves@redhat.com>
997 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
998 reading registers when switching context.
1000 2017-10-09 John Baldwin <jhb@FreeBSD.org>
1002 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1003 (fbsd_convert_siginfo): Likewise.
1004 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1006 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
1008 * configure.ac (try_guile_versions): Remove guile-2.2.
1009 * configure: Regenerate.
1011 2017-10-09 Tom Tromey <tom@tromey.com>
1013 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1014 (COMPILE.pre): Use $(CXX).
1016 2017-10-09 Pedro Alves <palves@redhat.com>
1018 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1020 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1021 * cp-support.h (cp_remove_params): Now returns a
1022 gdb::unique_xmalloc_ptr.
1023 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1024 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1025 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1026 returning a gdb::unique_xmalloc_ptr.
1027 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1028 * stack.c (find_frame_funname): Adjust to cp_remove_params
1029 returning a gdb::unique_xmalloc_ptr.
1031 2017-10-08 Tom Tromey <tom@tromey.com>
1033 * dwarf2read.c (dwarf2_get_dwz_file): Use
1034 gdb::unique_xmalloc_ptr.
1035 (find_slot_in_mapped_hash): Likewise.
1036 (dwarf2_physname): Likewise.
1037 (create_dwo_unit_in_dwp_v1): Use std::string.
1038 (create_dwo_unit_in_dwp_v2): Likewise.
1039 (lookup_dwo_cutu): Likewise.
1040 (inherit_abstract_dies): Use std::vector.
1041 (read_array_type): Likewise.
1042 (dwarf_decode_macros): Remove unused declaration.
1043 (unsigned_int_compar): Remove.
1044 (dwarf2_build_psymtabs_hard): Use scoped_restore.
1045 (psymtabs_addrmap_cleanup): Remove.
1047 2017-10-08 Tom Tromey <tom@tromey.com>
1049 * frame-unwind.c (frame_unwind_try_unwinder): Update.
1050 * frame.h (frame_cleanup_after_sniffer): Declare.
1051 (frame_prepare_for_sniffer): Return void.
1052 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
1054 (frame_prepare_for_sniffer): Return void.
1056 2017-10-08 Tom Tromey <tom@tromey.com>
1058 * utils.h (make_cleanup_value_free): Remove.
1059 * utils.c (do_value_free, struct cleanup): Remove.
1060 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1062 * value.h (struct value_deleter): New.
1063 (gdb_value_up): New typedef.
1065 2017-10-08 Tom Tromey <tom@tromey.com>
1067 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1068 (make_cleanup_free_search_symbols): Remove.
1069 (search_symbols): Return std::vector.
1070 (symbol_search::compare_search_syms): Now member of
1071 symbol_search. Change arguments.
1072 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
1073 (symtab_symbol_info, rbreak_command): Update.
1074 * symtab.h (struct symbol_search) <next>: Remove.
1076 (symbol_search::operator<): New function.
1077 (symbol_search::operator==): New function.
1078 (search_symbols): Remove std::vector.
1079 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1080 (symbol_search::compare_search_syms): Declare.
1082 2017-10-06 Yao Qi <yao.qi@linaro.org>
1084 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1085 arch/aarch64-insn.o.
1087 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1089 2017-10-06 Yao Qi <yao.qi@linaro.org>
1091 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1092 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1093 arch/arm-linux.o respectively.
1094 * configure.tgt: Likewise.
1096 2017-10-06 Yao Qi <yao.qi@linaro.org>
1098 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1099 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1101 2017-10-06 Pedro Alves <palves@redhat.com>
1103 * windows-nat.c: Include <algorithm>.
1105 2017-10-06 Yao Qi <yao.qi@linaro.org>
1107 * configure.tgt (i386_tobjs): New variable.
1108 (amd64_tobjs): New variable.
1109 Set $cpu_obs and $os_obs.
1111 2017-10-06 Yao Qi <yao.qi@linaro.org>
1113 * Makefile.in (CONFIG_SRC_SUBDIR): New.
1114 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1115 (clean): Remove object files and dependency files.
1116 (distclean): Remove the directory.
1117 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1118 * configure: Re-generated.
1119 * configure.tgt: Replace amd64.o with arch/amd64.o.
1121 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
1124 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1127 2017-10-05 Pedro Alves <palves@redhat.com>
1129 * linux-nat.c (linux_child_follow_fork): When following the parent
1130 and detaching the child, consult the parent thread's architecture
1131 instead of the child's.
1133 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1135 * ax.h: Do not include "doublest.h".
1136 (union agent_val): Remove.
1138 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1140 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1141 (decimal_to_string): Return std::string object.
1142 (decimal_from_string): Accept std::string object. Return bool.
1143 (decimal_from_integral, decimal_from_doublest): Remove.
1144 (decimal_from_longest): Add prototype.
1145 (decimal_from_ulongest): Likewise.
1146 (decimal_to_longest): Likewise.
1147 (decimal_from_doublest): Likewise.
1148 * dfp.c: Do not include "gdbtypes.h" or "value.h".
1149 (MAX_DECIMAL_STRING): Move here.
1150 (decimal_to_string): Return std::string object.
1151 (decimal_from_string): Accept std::string object. Return bool.
1152 (decimal_from_integral): Remove, replace by ...
1153 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1154 (decimal_to_longest): New function.
1155 (decimal_from_floating): Remove, replace by ...
1156 (decimal_from_doublest): ... this new function.
1157 (decimal_to_doublest): Update to new decimal_to_string interface.
1159 * value.c (unpack_long): Use decimal_to_longest.
1160 * valops.c (value_cast): Use decimal_from_doublest instead of
1161 decimal_from_floating. Use decimal_from_[u]longest isntead of
1162 decimal_from_integral.
1163 * valarith.c (value_args_as_decimal): Likewise.
1164 * valprint.c (print_decimal_floating): Update to new
1165 decimal_to_string interface.
1166 * printcmd.c (printf_decfloat): Likewise.
1167 * c-exp.y (parse_number): Update to new decimal_from_string interface.
1169 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1171 * doublest.h: Do not include "floatformat.h". Remove stale comments.
1172 * gdbtypes.c: Include "floatformat.h".
1173 * value.c: Likewise.
1174 * m68k-tdep.c: Likewise.
1176 * findvar.c: Do not include "floatformat.h".
1177 * amd64-darwin-tdep.c: Likewise.
1178 * arm-linux-tdep.c: Likewise.
1179 * i386-darwin-tdep.c: Likewise.
1180 * i387-tdep.c: Likewise.
1181 * m68k-linux-tdep.c: Likewise.
1182 * mep-tdep.c: Likewise.
1183 * mips-tdep.c: Likewise.
1184 * nios2-tdep.c: Likewise.
1185 * s390-linux-tdep.c: Likewise.
1186 * sparc-obsd-tdep.c: Likewise.
1187 * sparc-tdep.c: Likewise.
1188 * sparc64-tdep.c: Likewise.
1189 * spu-tdep.c: Likewise.
1190 * tic6x-tdep.c: Likewise.
1191 * tilegx-tdep.c: Likewise.
1192 * vax-tdep.c: Likewise.
1193 * xstormy16-tdep.c: Likewise.
1194 * xtensa-tdep.c: Likewise.
1196 * top.c: Do not include "doublest.h".
1197 * aarch64-tdep.c: Likewise.
1198 * alpha-tdep.c: Likewise.
1199 * arm-linux-tdep.c: Likewise.
1200 * m68k-linux-tdep.c: Likewise.
1201 * tilegx-tdep.c: Likewise.
1202 * xstormy16-tdep.c: Likewise.
1204 2017-10-05 John Baldwin <jhb@FreeBSD.org>
1206 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
1207 (mipsn32_fbsd_sigframe): Define.
1208 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
1209 for FreeBSD/mipsn32.
1211 2017-10-05 John Baldwin <jhb@FreeBSD.org>
1213 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
1216 2017-10-05 Tristan Gingold <tgingold@free.fr>
1218 * MAINTAINERS (Misc): Update my email address.
1220 2017-10-04 Pedro Alves <palves@redhat.com>
1222 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
1223 it instead of target_gdbarch.
1224 (get_remote_state, get_remote_packet_size): Adjust
1225 get_remote_arch_state calls, passing down target_gdbarch
1227 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1228 'gdbarch' and use it instead of target_gdbarch.
1229 (get_memory_packet_size): Adjust get_remote_arch_state calls,
1230 passing down target_gdbarch explicitly.
1231 (struct stop_reply) <arch>: New field.
1232 (remote_parse_stop_reply): Use the stopped thread's architecture,
1233 not the current inferior's. Save the architecture in the
1235 (process_stop_reply): Use the stop reply's architecture.
1236 (process_g_packet, remote_fetch_registers)
1237 (remote_prepare_to_store, store_registers_using_G)
1238 (remote_store_registers): Adjust get_remote_arch_state calls,
1239 using the regcache's architecture.
1240 (remote_get_trace_status): Adjust get_remote_arch_state calls,
1241 passing down target_gdbarch explicitly.
1242 * spu-multiarch.c (spu_thread_architecture): Defer to the target
1243 beneath instead of calling target_gdbarch.
1244 * target.c (default_thread_architecture): Use the specified
1245 inferior's architecture, instead of the current inferior's
1246 architecture (via target_gdbarch).
1248 2017-10-04 Pedro Alves <palves@redhat.com>
1250 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1252 (regcache_print): Handle !target_has_registers here instead.
1254 2017-10-04 Pedro Alves <palves@redhat.com>
1256 * frame.c (create_test_frame): Delete.
1257 * frame.h (create_test_frame): Delete.
1258 * gdbarch-selftests.c: Include gdbthread.h and target.h.
1259 (class regcache_test): Delete.
1260 (test_target_has_registers, test_target_has_stack)
1261 (test_target_has_memory, test_target_prepare_to_store)
1262 (test_target_store_registers): New functions.
1263 (test_target_ops): New class.
1264 (register_to_value_test): Error out if there's already a
1265 process_stratum (or higher) target pushed. Create a fuller mock
1266 environment, with mock target_ops, inferior, address space, thread
1268 * progspace.c (struct address_space): Move to ...
1269 * progspace.h (struct address_space): ... here.
1270 * regcache.h (regcache::~regcache, regcache::raw_write)
1271 [GDB_SELF_TEST]: No longer virtual.
1273 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
1275 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1277 2017-10-04 Pedro Alves <palves@redhat.com>
1279 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1280 out of 'between TRY and CATCH'.
1282 2017-10-04 Pedro Alves <palves@redhat.com>
1284 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1285 * common/common-exceptions.h (TRY): Open an outermost scope.
1286 Expand intro comment.
1288 (END_CATCH): Close the outermost scope.
1289 * completer.c (complete_line_internal): Add missing END_CATCH.
1291 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1293 * NEWS (Changes since GDB 8.0): Add entry about new
1294 'set-cwd-on-gdbserver' feature.
1295 (New remote packets): Add entry for QSetWorkingDir.
1296 * common/common-inferior.h (set_inferior_cwd): New prototype.
1297 * infcmd.c (set_inferior_cwd): Remove "static".
1298 (show_cwd_command): Expand text to include remote debugging.
1299 * remote.c: Add PACKET_QSetWorkingDir.
1300 (remote_protocol_features) <QSetWorkingDir>: New entry for
1301 PACKET_QSetWorkingDir.
1302 (extended_remote_set_inferior_cwd): New function.
1303 (extended_remote_create_inferior): Call
1304 "extended_remote_set_inferior_cwd".
1305 (_initialize_remote): Call "add_packet_config_cmd" for
1308 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1310 * NEWS (New commands): Mention "set/show cwd".
1311 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
1312 "cd" command's help text.
1313 * common/common-inferior.h (get_inferior_cwd): New prototype.
1314 * infcmd.c (inferior_cwd_scratch): New global variable.
1315 (set_inferior_cwd): New function.
1316 (get_inferior_cwd): Likewise.
1317 (set_cwd_command): Likewise.
1318 (show_cwd_command): Likewise.
1319 (_initialize_infcmd): Add "set/show cwd" commands.
1320 * inferior.h (class inferior) <cwd>: New field.
1321 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
1322 (fork_inferior): Change inferior's cwd before its execution.
1323 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
1326 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1328 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
1329 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
1330 (COMMON_OBS): Add gdb_tilde_expand.o.
1331 * common/gdb_tilde_expand.c: New file.
1332 * common/gdb_tilde_expand.h: Likewise.
1334 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
1336 * gdbarch.sh (objfile): Remove duplicate declaration.
1337 * gdbarch.h: Regenerate.
1339 2017-10-03 Tom Tromey <tom@tromey.com>
1341 * utils.c (internal_vproblem): Use string_vprintf.
1343 2017-10-03 Tom Tromey <tom@tromey.com>
1345 * printcmd.c (info_symbol_command): Use std::string.
1347 2017-10-03 Tom Tromey <tom@tromey.com>
1349 * top.c (gdb_safe_append_history): Use std::string.
1351 2017-10-03 Tom Tromey <tom@tromey.com>
1353 * event-top.c (stdin_event_handler): Update.
1354 * main.c (captured_main_1): Update.
1355 * top.h (make_delete_ui_cleanup): Remove.
1356 (struct ui): Add constructor and destructor.
1357 (new_ui, delete_ui): Remove.
1358 * top.c (make_delete_ui_cleanup): Remove.
1359 (new_ui_command): Use std::unique_ptr.
1360 (delete_ui_cleanup): Remove.
1361 (ui::ui): Rename from new_ui. Update.
1363 (ui::~ui): Rename from delete_ui. Update.
1365 2017-10-03 Tom Tromey <tom@tromey.com>
1367 * symfile.c (load_progress): Use gdb::byte_vector.
1369 2017-10-03 Tom Tromey <tom@tromey.com>
1371 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
1373 * printcmd.c (x_command): Remove unused declaration.
1374 * symfile.c (symbol_file_command): Remove unused declaration.
1376 2017-10-03 Tom Tromey <tom@tromey.com>
1378 * utils.c (internal_vproblem): Use std::string.
1379 (defaulted_query): Likewise.
1381 2017-10-03 Tom Tromey <tom@tromey.com>
1383 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
1384 * top.c (execute_command_to_string): Update.
1385 * utils.c (make_cleanup_restore_page_info): Remove.
1386 (do_restore_page_info_cleanup): Remove.
1387 (set_batch_flag_and_restore_page_info):
1389 (make_cleanup_restore_page_info): Remove.
1390 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1391 (~set_batch_flag_and_restore_page_info): New
1392 (make_cleanup_restore_uinteger): Remove.
1393 (make_cleanup_restore_integer): Remove.
1394 (struct restore_integer_closure): Remove.
1395 (restore_integer): Remove.
1396 * utils.h (struct set_batch_flag_and_restore_page_info): New
1398 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1399 (make_cleanup_restore_page_info): Remove.
1400 (make_cleanup_restore_uinteger) Remove.
1401 (make_cleanup_restore_integer) Remove.
1403 2017-10-03 Tom Tromey <tom@tromey.com>
1405 * record-full.h (record_full_gdb_operation_disable_set): Return
1406 scoped_restore_tmpl<int>.
1407 * infrun.c (adjust_pc_after_break): Update.
1408 (handle_signal_stop): Update.
1409 * record-full.c (record_full_gdb_operation_disable_set): Return
1410 scoped_restore_tmpl<int>.
1411 (record_full_wait_1, record_full_insert_breakpoint)
1412 (record_full_remove_breakpoint, record_full_save)
1413 (record_full_goto_insn): Update.
1415 2017-10-02 Tom Tromey <tom@tromey.com>
1418 * rust-lang.c (rust_val_print_str): New function.
1419 (val_print_struct): Call it.
1420 (rust_subscript): Preserve name of slice type.
1422 2017-10-02 Tom Tromey <tom@tromey.com>
1424 * rust-lang.c (rust_subscript): Handle slices in
1425 EVAL_AVOID_SIDE_EFFECTS case.
1427 2017-10-02 Tom Tromey <tom@tromey.com>
1429 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
1431 2017-10-02 Tom Tromey <tom@tromey.com>
1433 * rust-lang.h (rust_slice_type): Add "extern".
1435 2017-10-02 Tom Tromey <tom@tromey.com>
1436 Pedro Alves <palves@redhat.com>
1438 * ada-lang.h (ada_exc_info::operator<): Make const.
1439 (ada_exc_info::operator==): Make const.
1440 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
1443 2017-09-29 Tom Tromey <tom@tromey.com>
1445 * target.c (read_whatever_is_readable): Change type of "result".
1447 (free_memory_read_result_vector): Remove.
1448 (read_memory_robust): Change return type. Update.
1449 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
1450 bin2hex, std::string.
1451 * target.h (memory_read_result_s): Remove typedef.
1452 (free_memory_read_result_vector): Remove.
1453 (read_memory_robust): Return std::vector.
1455 2017-09-29 Tom Tromey <tom@tromey.com>
1457 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
1459 2017-09-29 Tom Tromey <tom@tromey.com>
1461 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
1462 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
1463 operator< and operator==.
1464 (ada_exceptions_list): Return a std::vector.
1465 * ada-lang.c (ada_exc_info::operator<): Rename from
1466 compare_ada_exception_info.
1467 (ada_exc_info::operator==): New.
1468 (sort_remove_dups_ada_exceptions_list): Change type of
1470 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
1471 (ada_add_global_exceptions): Likewise.
1472 (ada_exceptions_list_1): Return a std::vector.
1473 (ada_exceptions_list): Likewise.
1475 2017-09-29 Tom Tromey <tom@tromey.com>
1477 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
1479 (print_one_inferior): Update.
1480 (free_vector_of_ints): Remove.
1481 (list_available_thread_groups): Change "ids" to std::set.
1482 (mi_cmd_list_thread_groups): Update.
1483 (struct collect_cores_data) <core>: Now a std::set.
1484 (collect_cores): Update.
1486 (print_one_inferior): Update.
1488 2017-09-29 Tom Tromey <tom@tromey.com>
1490 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
1491 (mi_execute_async_cli_command): Likewise.
1492 (mi_cmd_trace_frame_collected): Use field_fmt.
1494 2017-09-29 Tom Tromey <tom@tromey.com>
1496 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
1499 2017-09-29 Tom Tromey <tom@tromey.com>
1501 * mi/mi-parse.c (mi_parse): Remove unused declaration.
1503 2017-09-29 Tom Tromey <tom@tromey.com>
1505 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
1507 2017-09-29 Tom Tromey <tom@tromey.com>
1509 * varobj.h (varobj_gen_name): Return std::string.
1510 * varobj.c (varobj_gen_name): Return std::string.
1511 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
1512 (mi_cmd_var_delete): Don't copy "name".
1514 2017-09-29 Tom Tromey <tom@tromey.com>
1516 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
1517 (mi_cmd_break_insert_1): Update.
1519 2017-09-29 Tom Tromey <tom@tromey.com>
1521 * target.h (make_scoped_defer_target_commit_resume): Update.
1522 * target.c (make_scoped_defer_target_commit_resume): Rename from
1523 make_cleanup_defer_target_commit_resume. Return a
1525 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
1527 2017-09-29 Tom Tromey <tom@tromey.com>
1529 * main.c (captured_main_1): Remove unused declaration.
1530 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
1532 2017-09-29 Tom Tromey <tom@tromey.com>
1534 * symtab.c (search_symbols): Remove unused outer cleanup.
1535 (make_source_files_completion_list): Remove unused declaration.
1537 2017-09-29 Tom Tromey <tom@tromey.com>
1539 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
1541 2017-09-29 Tom Tromey <tom@tromey.com>
1543 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
1546 2017-09-29 Tom Tromey <tom@tromey.com>
1548 * complaints.c (vcomplaint): Use std::string.
1550 2017-09-29 Tom Tromey <tom@tromey.com>
1552 * tracepoint.c (trace_variable_command): Use std::string.
1553 (encode_actions_1): Remove unused declarations.
1554 (create_tsv_from_upload): Use std::string.
1556 2017-09-29 Tom Tromey <tom@tromey.com>
1558 * cp-support.c (gdb_demangle): Use std::string.
1560 2017-09-29 Tom Tromey <tom@tromey.com>
1562 * stack.c (parse_frame_specification): Use std::string
1563 (info_frame_command): Use gdb::unique_xmalloc_ptr.
1565 2017-09-29 Tom Tromey <tom@tromey.com>
1567 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
1569 2017-09-29 Tom Tromey <tom@tromey.com>
1571 * utils.c (vfprintf_maybe_filtered): Use std::string.
1572 (vfprintf_unfiltered): Likewise.
1574 2017-09-29 Tom Tromey <tom@tromey.com>
1576 * event-top.c (top_level_prompt): Return std::string.
1577 (display_gdb_prompt): Update.
1579 2017-09-29 Tom Tromey <tom@tromey.com>
1581 * unittests/common-utils-selftests.c (format): New function.
1582 (string_vprintf_tests): New function.
1583 (_initialize_common_utils_selftests): Register new tests.
1584 * common/common-utils.c (string_vprintf): New function.
1585 * common/common-utils.h (string_vprintf): Declare.
1587 2017-09-29 Pedro Alves <palves@redhat.com>
1589 * common/rsp-low.c (unpack_varlen_hex): Constify.
1590 * common/rsp-low.h (unpack_varlen_hex): Constify.
1591 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
1593 * remote.c (remote_set_permissions, read_ptid)
1594 (remote_current_thread, remote_get_threads_with_qthreadinfo)
1595 (remote_static_tracepoint_marker_at)
1596 (remote_static_tracepoint_markers_by_strid)
1597 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
1598 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
1599 (parse_tracepoint_definition, parse_tsv_definition)
1600 (parse_static_tracepoint_marker_definition): Constify.
1601 * tracepoint.h (parse_static_tracepoint_marker_definition)
1602 (parse_trace_status, parse_tracepoint_status)
1603 (parse_tracepoint_definition, parse_tsv_definition): Constify.
1605 2017-09-29 Pedro Alves <palves@redhat.com>
1607 * remote.c (target_buf, target_buf_size): Delete.
1608 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
1609 Use the connection's packet buffer instead.
1610 All callers adjusted.
1611 (_initialize_remote): Remove references to target_buf and
1614 2017-09-28 Pedro Alves <palves@redhat.com>
1616 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1617 unittests/common-utils-selftests.c.
1618 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
1619 (COMMON_OBS): Remove utils-selftests.o.
1620 * utils-selftests.c: Move to ...
1621 * unittests/common-utils-selftests.c: ... here and rename self
1622 test to "string_printf".
1624 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
1626 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
1627 having NULL cus or tus.
1629 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1631 * arm-tdep.c: (convert_from_extended): Remove.
1632 (convert_to_extended): Likewise.
1633 (arm_extract_return_value): Use convert_typed_floating.
1634 (arm_store_return_value): Likewise.
1636 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1637 * sh-tdep.c: Do not include "floatformat.h".
1638 (sh_littlebyte_bigword_type): New function.
1639 (sh_register_convert_to_virtual): Use convert_typed_floating.
1640 (sh_register_convert_to_raw): Likewise.
1641 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1642 (sh64_littlebyte_bigword_type): New function.
1643 (sh64_extract_return_value): Use convert_typed_floating.
1644 (sh64_register_convert_to_virtual): Likewise.
1645 (sh64_register_convert_to_raw): Likewise.
1647 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1649 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
1650 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
1652 * gdbtypes.h (union type_specific): Make field floatformat hold
1653 just a single struct floatformat, not an array.
1654 (floatformat_from_type): Move here.
1655 * gdbtypes.c (floatformat_from_type): Move here. Update to
1656 changed TYPE_FLOATFORMAT definition.
1657 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
1658 (recursive_dump_type): Likewise.
1659 (init_float_type): Install correct floatformat for byte order.
1660 (arch_float_type): Likewise.
1662 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1664 * gdbtypes.c (init_type): Change incoming argument from
1665 length-in-bytes to length-in-bits. Assert length is a
1666 multiple of TARGET_CHAR_BITS.
1667 (arch_type, arch_flags_type): Likewise.
1668 (init_integer_type): Update call to init_type.
1669 (init_character_type): Likewise.
1670 (init_boolean_type): Likewise.
1671 (init_float_type): Likewise.
1672 (init_decfloat_type): Likewise.
1673 (init_complex_type): Likewise.
1674 (init_pointer_type): Likewise.
1675 (objfile_type): Likewise.
1676 (arch_integer_type): Update call to arch_type.
1677 (arch_character_type): Likewise.
1678 (arch_boolean_type): Likewise.
1679 (arch_float_type): Likewise.
1680 (arch_decfloat_type): Likewise.
1681 (arch_complex_type): Likewise.
1682 (arch_pointer_type): Likewise.
1683 (gdbtypes_post_init): Likewise.
1685 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
1686 (read_base_type): Likewise.
1687 * mdebugread.c (basic_type): Likewise.
1688 * stabsread.c (dbx_init_float_type): Likewise.
1689 (rs6000_builtin_type): Likewise.
1690 (read_range_type): Likewise. Also, fix call to init_integer_type
1691 with erroneous length argument.
1693 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
1694 * d-lang.c (build_d_types): Likewise.
1695 * f-lang.c (build_fortran_types): Likewise.
1696 * go-lang.c (build_go_types): Likewise.
1697 * opencl-lang.c (build_opencl_types): Likewise.
1698 * jit.c (finalize_symtab): Likewise.
1699 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
1700 (build_std_type_info_type): Likewise.
1701 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
1702 update call to arch_flags_type.
1704 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
1706 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
1707 * windows-tdep.c (windows_get_tlb_type): Likewise.
1709 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
1710 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1711 * m32c-tdep.c (make_types): Likewise.
1712 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
1713 (rl78_psw_type): Update call to arch_flags_type.
1714 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
1715 * rx-tdep.c (rx_psw_type): Likewise.
1716 (rx_fpsw_type): Likewise.
1717 * sparc-tdep.c (sparc_psr_type): Likewise.
1718 (sparc_fsr_type): Likewise.
1719 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
1720 (sparc64_ccr_type): Likewise.
1721 (sparc64_fsr_type): Likewise.
1722 (sparc64_fprs_type): Likewise.
1724 2017-09-27 Tom Tromey <tom@tromey.com>
1726 * findcmd.c (find_command): Constify.
1728 2017-09-27 Tom Tromey <tom@tromey.com>
1730 * ada-tasks.c (task_command_1, task_command): Constify.
1732 2017-09-27 Tom Tromey <tom@tromey.com>
1734 * symtab.c (maintenance_print_symbol_cache)
1735 (maintenance_flush_symbol_cache)
1736 (maintenance_print_symbol_cache_statistics): Constify.
1738 2017-09-27 Tom Tromey <tom@tromey.com>
1740 * inferior.c (detach_inferior_command, kill_inferior_command)
1741 (inferior_command): Constify.
1743 2017-09-27 Tom Tromey <tom@tromey.com>
1745 * regcache.c (regcache_print, maintenance_print_registers)
1746 (maintenance_print_raw_registers)
1747 (maintenance_print_cooked_registers)
1748 (maintenance_print_register_groups)
1749 (maintenance_print_remote_registers): Constify.
1751 2017-09-27 Tom Tromey <tom@tromey.com>
1753 * printcmd.c (map_display_numbers, undisplay_command)
1754 (enable_disable_display_command, enable_display_command)
1755 (disable_display_command): Constify.
1757 2017-09-27 Tom Tromey <tom@tromey.com>
1759 * breakpoint.h (delete_command): Don't declare.
1760 * breakpoint.c (delete_command, enable_once_command)
1761 (enable_count_command, enable_delete_command, breakpoint_1)
1762 (maintenance_info_breakpoints, stopin_command, stopat_command)
1763 (delete_command, delete_trace_command, save_breakpoints)
1764 (save_breakpoints_command, save_tracepoints_command): Constify.
1766 2017-09-27 Tom Tromey <tom@tromey.com>
1768 * macrocmd.c (macro_expand_command, macro_expand_once_command)
1769 (skip_ws, extract_identifier, macro_define_command)
1770 (macro_undef_command, macro_list_command): Constify.
1772 2017-09-27 Tom Tromey <tom@tromey.com>
1774 * infcmd.c (environment_info, set_environment_command)
1775 (unset_environment_command, path_info, info_proc_cmd_1)
1776 (info_proc_cmd_mappings, info_proc_cmd_stat)
1777 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
1778 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
1780 2017-09-27 Tom Tromey <tom@tromey.com>
1782 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
1785 2017-09-27 Tom Tromey <tom@tromey.com>
1787 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
1789 2017-09-27 Tom Tromey <tom@tromey.com>
1791 * demangle.c (demangle_command): Constify.
1793 2017-09-27 Tom Tromey <tom@tromey.com>
1795 * progspace.c (maintenance_info_program_spaces_command):
1798 2017-09-27 Tom Tromey <tom@tromey.com>
1800 * compile/compile.c (check_raw_argument, compile_file_command)
1801 (compile_code_command, compile_print_command): Constify.
1803 2017-09-27 Tom Tromey <tom@tromey.com>
1805 * reggroups.c (maintenance_print_reggroups): Constify.
1807 2017-09-27 Tom Tromey <tom@tromey.com>
1809 * dwarf2read.c (save_gdb_index_command): Constify.
1811 2017-09-27 Tom Tromey <tom@tromey.com>
1813 * stap-probe.c (info_probes_stap_command): Constify.
1815 2017-09-27 Tom Tromey <tom@tromey.com>
1817 * fork-child.c (unset_exec_wrapper_command): Constify.
1819 2017-09-27 Tom Tromey <tom@tromey.com>
1821 * btrace.c (get_uint, get_context_size, no_chunk)
1822 (maint_btrace_packet_history_cmd)
1823 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
1824 (maint_info_btrace_cmd): Constify.
1826 2017-09-27 Tom Tromey <tom@tromey.com>
1828 * reverse.c (delete_bookmark_command): Constify.
1830 2017-09-27 Tom Tromey <tom@tromey.com>
1832 * remote.c (set_memory_packet_size)
1833 (set_memory_write_packet_size, show_memory_write_packet_size)
1834 (set_memory_read_packet_size, show_memory_read_packet_size)
1835 (compare_sections_command, packet_command, remote_put_command)
1836 (remote_get_command, remote_delete_command): Constify.
1838 2017-09-27 Tom Tromey <tom@tromey.com>
1840 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
1841 (set_mipsfpu_double_command, set_mipsfpu_none_command)
1842 (set_mipsfpu_auto_command): Constify.
1844 2017-09-27 Tom Tromey <tom@tromey.com>
1846 * cli/cli-cmds.h (cd_command): Constify.
1847 * cli/cli-cmds.c (cd_command): Constify.
1849 2017-09-27 Tom Tromey <tom@tromey.com>
1851 * thread.c (thread_name_command, thread_find_command): Constify.
1853 2017-09-27 Tom Tromey <tom@tromey.com>
1855 * probe.c (enable_probes_command, disable_probes_command):
1858 2017-09-27 Tom Tromey <tom@tromey.com>
1860 * symfile.c (symbol_file_command): Constify.
1861 * gdbcore.h (deprecated_file_changed_hook): Constify.
1862 * exec.c (deprecated_file_changed_hook, exec_file_command)
1863 (file_command): Constify.
1864 * defs.h (symbol_file_command): Constify.
1866 2017-09-27 Tom Tromey <tom@tromey.com>
1868 * remote-fileio.c (set_system_call_allowed)
1869 (show_system_call_allowed): Constify.
1871 2017-09-27 Tom Tromey <tom@tromey.com>
1873 * tracepoint.c (delete_trace_variable_command)
1874 (tfind_end_command, tfind_start_command, tfind_pc_command)
1875 (tfind_tracepoint_command, tfind_line_command)
1876 (tfind_range_command, tfind_outside_command): Constify.
1878 2017-09-27 Tom Tromey <tom@tromey.com>
1880 * ax-gdb.c (maint_agent_printf_command, agent_command)
1881 (agent_eval_command): Constify.
1883 2017-09-27 Tom Tromey <tom@tromey.com>
1885 * tracepoint.c (info_scope_command): Constify.
1886 * python/python.c (gdbpy_decode_line): Constify.
1887 * python/py-breakpoint.c (bppy_init): Constify.
1888 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1889 * location.h: (new_linespec_location)
1890 (string_to_event_location_basic, string_to_event_location):
1892 * location.c (new_linespec_location)
1893 (string_to_event_location_basic, string_to_event_location):
1895 * linespec.h (decode_line_with_current_source)
1896 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1897 * linespec.c (linespec_lex_to_end)
1898 (decode_line_with_current_source)
1899 (decode_line_with_last_displayed): Constify.
1900 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1902 * cli/cli-cmds.c (edit_command, list_command): Constify.
1903 * breakpoint.h (until_break_command, watch_command_wrapper)
1904 (awatch_command_wrapper, rwatch_command_wrapper)
1905 (init_ada_exception_breakpoint): Constify.
1906 * breakpoint.c (break_command_1, dprintf_command)
1907 (break_range_command, watch_command_wrapper)
1908 (rwatch_command_wrapper, awatch_command_wrapper)
1909 (until_break_command, init_ada_exception_breakpoint)
1910 (strace_marker_create_sals_from_location, trace_command)
1911 (ftrace_command, strace_command, struct tracepoint): Constify.
1912 * ax-gdb.c (agent_command_1): Constify.
1913 * ada-lang.c (ada_exception_sal): Constify.
1915 2017-09-27 Tom Tromey <tom@tromey.com>
1917 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1918 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1919 (get_context_size, no_chunk, get_insn_history_modifiers)
1920 (cmd_record_insn_history, get_call_history_modifiers)
1921 (cmd_record_call_history): Constify.
1923 2017-09-27 Tom Tromey <tom@tromey.com>
1925 * source.c (show_substitute_path_command)
1926 (unset_substitute_path_command, set_substitute_path_command):
1929 2017-09-27 Tom Tromey <tom@tromey.com>
1931 * typeprint.c (maintenance_print_type): Constify.
1932 * maint.c (maintenance_dump_me, maintenance_demangle)
1933 (maintenance_time_display, maintenance_info_sections)
1934 (maintenance_print_statistics, maintenance_deprecate)
1935 (maintenance_undeprecate): Constify.
1936 (maintenance_do_deprecate): Constify. Use std::string.
1937 (maintenance_selftest): Constify.
1938 * gdbtypes.h (maintenance_print_type): Constify.
1940 2017-09-27 Tom Tromey <tom@tromey.com>
1942 * hppa-tdep.c (unwind_command): Constify.
1944 2017-09-27 Tom Tromey <tom@tromey.com>
1946 * target-descriptions.c (unset_tdesc_filename_cmd)
1947 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1950 2017-09-27 Tom Tromey <tom@tromey.com>
1952 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1954 2017-09-27 Tom Tromey <tom@tromey.com>
1956 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1958 2017-09-27 Tom Tromey <tom@tromey.com>
1960 * tui/tui-regs.c (tui_reg_command): Constify.
1962 2017-09-27 Tom Tromey <tom@tromey.com>
1964 * skip.c (skip_file_command, skip_function_command)
1965 (skip_enable_command, skip_disable_command, skip_delete_command):
1968 2017-09-27 Tom Tromey <tom@tromey.com>
1970 * record-btrace.c (cmd_record_btrace_bts_start)
1971 (cmd_record_btrace_pt_start): Constify.
1973 2017-09-27 Tom Tromey <tom@tromey.com>
1975 * symmisc.c (maintenance_print_symbols)
1976 (maintenance_print_msymbols, maintenance_print_objfiles)
1977 (maintenance_info_symtabs, maintenance_check_symtabs)
1978 (maintenance_expand_symtabs, maintenance_info_line_tables):
1981 2017-09-27 Tom Tromey <tom@tromey.com>
1983 * top.c (new_ui_command): Constify.
1985 2017-09-27 Tom Tromey <tom@tromey.com>
1987 * symfile.c (add_symbol_file_command)
1988 (remove_symbol_file_command, list_overlays_command)
1989 (map_overlay_command, unmap_overlay_command)
1990 (overlay_auto_command, overlay_manual_command)
1991 (overlay_off_command, overlay_load_command): Constify.
1993 2017-09-27 Tom Tromey <tom@tromey.com>
1995 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1996 (info_spu_mailbox_command, info_spu_dma_command)
1997 (info_spu_proxydma_command): Constify.
1999 2017-09-27 Tom Tromey <tom@tromey.com>
2001 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2003 2017-09-27 Tom Tromey <tom@tromey.com>
2005 * cli/cli-script.c (user_defined_command): Constify.
2007 2017-09-27 Tom Tromey <tom@tromey.com>
2009 * cli/cli-dump.c (dump_memory_command, dump_value_command)
2010 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2011 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2012 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2013 (dump_binary_value, append_binary_memory, append_binary_value):
2015 (struct dump_context) <func>: Constify.
2016 (add_dump_command): Update.
2018 2017-09-27 Tom Tromey <tom@tromey.com>
2020 * cli/cli-cmds.c (show_version, show_configuration)
2021 (source_command, show_user): Constify.
2023 2017-09-27 Tom Tromey <tom@tromey.com>
2025 * target.c (maintenance_print_target_stack): Constify.
2027 2017-09-27 Tom Tromey <tom@tromey.com>
2029 * interps.c (interpreter_exec_cmd): Constify.
2031 2017-09-27 Tom Tromey <tom@tromey.com>
2033 * record-full.c (cmd_record_full_restore): Constify.
2035 2017-09-27 Tom Tromey <tom@tromey.com>
2037 * memattr.c (enable_mem_command, disable_mem_command)
2038 (delete_mem_command): Constify.
2040 2017-09-27 Tom Tromey <tom@tromey.com>
2042 * value.c (show_convenience): Constify.
2044 2017-09-27 Tom Tromey <tom@tromey.com>
2046 * gdbcore.h (core_file_command): Update.
2047 * corefile.c (core_file_command): Constify.
2049 2017-09-27 Tom Tromey <tom@tromey.com>
2051 * user-regs.c (maintenance_print_user_registers): Constify.
2053 2017-09-27 Tom Tromey <tom@tromey.com>
2055 * cp-namespace.c (maintenance_cplus_namespace): Constify.
2057 2017-09-27 Tom Tromey <tom@tromey.com>
2059 * cp-support.c (first_component_command): Constify.
2061 2017-09-27 Tom Tromey <tom@tromey.com>
2063 * psymtab.c (maintenance_print_psymbols)
2064 (maintenance_info_psymtabs, maintenance_check_psymtabs):
2067 2017-09-27 Tom Tromey <tom@tromey.com>
2069 * windows-tdep.c (display_tib): Constify.
2071 2017-09-27 Tom Tromey <tom@tromey.com>
2073 * linux-fork.c (delete_checkpoint_command)
2074 (detach_checkpoint_command): Constify.
2076 2017-09-27 Tom Tromey <tom@tromey.com>
2078 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2080 2017-09-27 Tom Tromey <tom@tromey.com>
2082 * arc-tdep.c (dump_arc_instruction_command): Constify.
2084 2017-09-27 Tom Tromey <tom@tromey.com>
2086 * valprint.c (set_radix, show_radix): Constify.
2088 2017-09-27 Tom Tromey <tom@tromey.com>
2090 * dtrace-probe.c (info_probes_dtrace_command): Constify.
2092 2017-09-27 Tom Tromey <tom@tromey.com>
2094 * command.h (not_just_help_class_command): Update.
2095 * cli/cli-decode.h (not_just_help_class_command): Update.
2096 * cli/cli-decode.c (not_just_help_class_command): Constify.
2098 2017-09-27 Tom Tromey <tom@tromey.com>
2100 * gdb_bfd.c (maintenance_info_bfds): Constify.
2102 2017-09-27 Tom Tromey <tom@tromey.com>
2104 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2106 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
2107 (do_const_cfunc): New function.
2108 (cmd_cfunc_eq): New overload.
2109 (cli_user_command_p): Check do_const_cfunc.
2110 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2112 * command.h (add_cmd): Add const overload and no-function
2114 (set_cmd_cfunc): Add const overload.
2115 (cmd_const_cfunc_ftype): Declare.
2116 (cmd_cfunc_eq): Add const overload.
2117 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2118 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2121 2017-09-27 Tom Tromey <tom@tromey.com>
2123 * macroexp.c (get_next_token_for_substitution): New function.
2124 (substitute_args): Call it. Check for __VA_OPT__.
2126 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
2127 Pedro Alves <palves@redhat.com>
2129 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2130 producer_is_icc_lt_14.
2131 (producer_is_icc_lt_14): New function.
2132 (check_producer): Add code for checking version of ICC.
2133 (producer_is_icc): Move to producer.c.
2134 (read_structure_type): Restrict ICC workaround to ICC<14.
2135 * producer.c: Include selftest.h.
2136 (producer_is_icc, producer_parsing_tests, _initialize_producer):
2138 * producer.h (producer_is_icc): New declaration.
2140 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
2142 * Makefile.in (SFILES): Add producer.c.
2143 (COMMON_OBS): Add producer.o
2144 * amd64-tdep.c (producer.h): Add new include.
2145 * dwarf2read.c (producer.h): Add new include.
2146 * producer.c: New file.
2147 * producer.h: New file.
2148 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2150 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2153 2017-09-26 Matthias Klose <doko@ubuntu.com>
2155 * configure.ac: Search ncursesw before ncurses.
2156 Check ncursesw/ncurses.h before ncurses/ncurses.h.
2157 * gdb_curses.h: Include <ncursesw/ncurses.h>
2158 * config.in, configure: Regenerate.
2160 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2163 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2165 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2166 Remove i386sol2 support.
2167 * configure.nat <i386sol2>: Remove.
2168 <sol2-64>: Fold into ...
2170 Move common settings to default section.
2172 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2173 x86_64-*-solaris2.1[0-9]*>: Rename to ...
2174 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2175 <i[34567]86-*-solaris*>: Remove.
2176 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2178 * configure.ac: Remove wctype in libw check.
2179 (_MSE_INT_H): Don't define on Solaris 7-9.
2180 <solaris*>: Remove libthread_db.so.1 check.
2181 * configure: Regenerate.
2182 * config.in: Regenerate.
2184 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2185 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2186 (gdb_ps_size_t): Remove.
2187 Use base types in users.
2188 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2190 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2192 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2195 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2196 (adi_is_addr_mapped): Likewise.
2197 (PSR_ICC): Don't redefine.
2198 (PSR_IMPL): Likewise.
2200 2017-09-25 Tom Tromey <tom@tromey.com>
2202 * regcache.c (regcache::dump): Use string_printf.
2204 2017-09-25 Tom Tromey <tom@tromey.com>
2206 * regcache.c (class regcache_invalidator): New.
2207 (struct register_to_invalidate): Remove.
2208 (make_cleanup_regcache_invalidate): Remove.
2209 (regcache::raw_write): Use regcache_invalidator.
2211 2017-09-25 Tom Tromey <tom@tromey.com>
2213 * spu-tdep.c (spu2ppu_sniffer): Update.
2214 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
2215 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
2217 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
2218 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
2219 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
2220 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
2221 (frame_pop): Update.
2223 2017-09-25 Tom Tromey <tom@tromey.com>
2225 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2226 * regcache.h (regcache_xfree): Don't declare.
2227 * regcache.c (regcache_xfree): Remove.
2228 (do_regcache_xfree): Use delete.
2229 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2230 * linux-fork.c (free_fork): Use delete.
2231 (fork_save_infrun_state): Likewise.
2232 * jit.c (jit_dealloc_cache): Use delete.
2233 * infrun.c (discard_infcall_suspend_state): Use delete.
2235 2017-09-25 Tom Tromey <tom@tromey.com>
2237 * regcache.h (regcache_xmalloc): Don't declare.
2238 (regcache_raw_set_cached_value): Update comment.
2239 * regcache.c (regcache_xmalloc): Remove.
2240 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2241 * jit.c (jit_frame_sniffer): Use new.
2242 * frame.c (frame_save_as_regcache): Use new.
2244 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2246 * NEWS: Advertise support for guarded-storage registers on IBM z.
2248 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2250 * s390-linux-nat.c (have_regset_gs): New static variable.
2251 (s390_linux_fetch_inferior_registers): Handle guarded-storage
2252 control block and guarded-storage broadcast control regsets.
2253 (s390_read_description): Detect whether the target has
2254 guarded-storage support, return appropriate tdesc.
2255 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2256 (features/s390x-gs-linux64.c): Likewise.
2257 (struct gdbarch_tdep) <have_gs>: New field.
2258 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2259 (s390_gsbc_regset): New variables.
2260 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2261 and s390_gsbc_regset, if applicable.
2262 (s390_core_read_description): Check whether core file was from a
2263 target with guarded-storage support; include appropriate regsets.
2264 (s390_gdbarch_init): Add registers for guarded-storage support.
2265 (_initialize_s390_tdep): Initialize new target descriptions that
2266 include registers for guarded-storage support.
2267 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2268 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2269 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2270 (S390_NUM_REGS): Adjust macro definition.
2271 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2272 (tdesc_s390x_gs_linux64): New declarations.
2274 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2276 * features/s390-gs-linux64.xml: New file.
2277 * features/s390-gs.xml: New file.
2278 * features/s390-gsbc.xml: New file.
2279 * features/s390x-gs-linux64.xml: New file.
2280 * features/Makefile (WHICH): Add s390-gs-linux64 and
2282 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2283 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2284 * features/s390-gs-linux64.c: New generated file.
2285 * features/s390x-gs-linux64.c: New file.
2286 * regformats/s390-gs-linux64.dat: New file.
2287 * regformats/s390x-gs-linux64.dat: New file.
2289 2017-09-23 Tom Tromey <tom@tromey.com>
2291 * defs.h (make_cleanup_override_quit_handler): Don't declare.
2293 2017-09-22 Tom Tromey <tom@tromey.com>
2295 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
2296 type to scoped_restore_tmpl.
2297 <scoped_input_handler>: Initialize m_quit_handler directly.
2299 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
2301 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2302 (cd_command): Likewise. Free "current_directory" before
2304 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2305 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2306 * top.c (gdb_dirbuf): Remove global declaration.
2307 * top.h (gdb_dirbuf): Likewise.
2309 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
2311 * gnulib/aclocal.m4: Regenerate.
2312 * gnulib/config.in: Regenerate.
2313 * gnulib/configure: Regenerate.
2314 * gnulib/import/Makefile.am: Regenerate.
2315 * gnulib/import/Makefile.in: Regenerate.
2316 * gnulib/import/assure.h: New file.
2317 * gnulib/import/at-func.c: Likewise
2318 * gnulib/import/chdir-long.c: New file.
2319 * gnulib/import/chdir-long.h: New file.
2320 * gnulib/import/cloexec.c: New file.
2321 * gnulib/import/cloexec.h: New file.
2322 * gnulib/import/close.c: New file.
2323 * gnulib/import/closedir.c: New file.
2324 * gnulib/import/dirent-private.h: New file.
2325 * gnulib/import/dup-safer.c: New file.
2326 * gnulib/import/dup.c: New file.
2327 * gnulib/import/dup2.c: New file.
2328 * gnulib/import/error.c: New file.
2329 * gnulib/import/error.h: New file.
2330 * gnulib/import/exitfail.c: New file.
2331 * gnulib/import/exitfail.h: New file.
2332 * gnulib/import/fchdir.c: New file.
2333 * gnulib/import/fcntl.c: New file.
2334 * gnulib/import/fcntl.in.h: New file.
2335 * gnulib/import/fd-hook.c: New file.
2336 * gnulib/import/fd-hook.h: New file.
2337 * gnulib/import/fd-safer.c: New file.
2338 * gnulib/import/fdopendir.c: New file.
2339 * gnulib/import/filename.h: New file.
2340 * gnulib/import/filenamecat-lgpl.c: New file.
2341 * gnulib/import/filenamecat.h: New file.
2342 * gnulib/import/fstat.c: New file.
2343 * gnulib/import/fstatat.c: New file.
2344 * gnulib/import/getcwd-lgpl.c: New file.
2345 * gnulib/import/getcwd.c: New file.
2346 * gnulib/import/getdtablesize.c: New file.
2347 * gnulib/import/getlogin_r.c: New file.
2348 * gnulib/import/getprogname.c: New file.
2349 * gnulib/import/getprogname.h: New file.
2350 * gnulib/import/gettext.h: New file.
2351 * gnulib/import/glob-libc.h: New file.
2352 * gnulib/import/glob.c: New file.
2353 * gnulib/import/glob.in.h: New file.
2354 * gnulib/import/intprops.h: New file.
2355 * gnulib/import/m4/chdir-long.m4: New file.
2356 * gnulib/import/m4/close.m4: New file.
2357 * gnulib/import/m4/closedir.m4: New file.
2358 * gnulib/import/m4/d-ino.m4: New file.
2359 * gnulib/import/m4/d-type.m4: New file.
2360 * gnulib/import/m4/dup.m4: New file.
2361 * gnulib/import/m4/dup2.m4: New file.
2362 * gnulib/import/m4/error.m4: New file.
2363 * gnulib/import/m4/fchdir.m4: New file.
2364 * gnulib/import/m4/fcntl.m4: New file.
2365 * gnulib/import/m4/fcntl_h.m4: New file.
2366 * gnulib/import/m4/fdopendir.m4: New file.
2367 * gnulib/import/m4/filenamecat.m4: New file.
2368 * gnulib/import/m4/fstat.m4: New file.
2369 * gnulib/import/m4/fstatat.m4: New file.
2370 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
2371 * gnulib/import/m4/getcwd-path-max.m4: New file.
2372 * gnulib/import/m4/getcwd.m4: New file.
2373 * gnulib/import/m4/getdtablesize.m4: New file.
2374 * gnulib/import/m4/getlogin_r.m4: New file.
2375 * gnulib/import/m4/getprogname.m4: New file.
2376 * gnulib/import/m4/glob.m4: New file.
2377 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2378 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2379 * gnulib/import/m4/mempcpy.m4: New file.
2380 * gnulib/import/m4/memrchr.m4: New file.
2381 * gnulib/import/m4/mode_t.m4: New file.
2382 * gnulib/import/m4/msvc-inval.m4: New file.
2383 * gnulib/import/m4/msvc-nothrow.m4: New file.
2384 * gnulib/import/m4/open.m4: New file.
2385 * gnulib/import/m4/openat.m4: New file.
2386 * gnulib/import/m4/opendir.m4: New file.
2387 * gnulib/import/m4/readdir.m4: New file.
2388 * gnulib/import/m4/realloc.m4: New file.
2389 * gnulib/import/m4/rewinddir.m4: New file.
2390 * gnulib/import/m4/save-cwd.m4: New file.
2391 * gnulib/import/m4/strdup.m4: New file.
2392 * gnulib/import/m4/strerror.m4: New file.
2393 * gnulib/import/m4/unistd-safer.m4: New file.
2394 * gnulib/import/mempcpy.c: New file.
2395 * gnulib/import/memrchr.c: New file.
2396 * gnulib/import/msvc-inval.c: New file.
2397 * gnulib/import/msvc-inval.h: New file.
2398 * gnulib/import/msvc-nothrow.c: New file.
2399 * gnulib/import/msvc-nothrow.h: New file.
2400 * gnulib/import/open.c: New file.
2401 * gnulib/import/openat-die.c: New file.
2402 * gnulib/import/openat-priv.h: New file.
2403 * gnulib/import/openat-proc.c: New file.
2404 * gnulib/import/openat.c: New file.
2405 * gnulib/import/openat.h: New file.
2406 * gnulib/import/opendir.c: New file.
2407 * gnulib/import/pipe-safer.c: New file.
2408 * gnulib/import/readdir.c: New file.
2409 * gnulib/import/realloc.c: New file.
2410 * gnulib/import/rewinddir.c: New file.
2411 * gnulib/import/save-cwd.c: New file.
2412 * gnulib/import/save-cwd.h: New file.
2413 * gnulib/import/strdup.c: New file.
2414 * gnulib/import/strerror-override.c: New file.
2415 * gnulib/import/strerror-override.h: New file.
2416 * gnulib/import/strerror.c: New file.
2417 * gnulib/import/unistd--.h: New file.
2418 * gnulib/import/unistd-safer.h: New file.
2419 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
2420 "getcwd" and "glob".
2421 * ser-tcp.c: Undefine "close" before redefining it.
2423 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
2425 * guile/scm-value.c (gdbscm_value_address): Initialize address,
2428 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2430 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
2431 <sol2,sparc>: Likewise.
2432 <sol2-64,i386>: Likewise.
2434 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
2435 -Wdeprecated-declarations on *-*-solaris*.
2436 * configure: Regenerate.
2438 * procfs.c: Include "nat/inferior.h".
2439 (procfs_info_proc): Fix typo.
2441 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2443 * remote.c (vector): Include.
2444 (struct private_thread_info): Add field, thread_handle.
2445 (free_private_thread_info): Deallocate storage associated with
2447 (get_private_info_thread): Initialize `thread_handle' field.
2448 (struct thread_item): Add field, thread_handle.
2449 (clear_threads_listing_context): Deallocate storage associated
2451 (start_thread): Add support for "handle" attribute.
2452 (thread_attributes): Add "handle".
2453 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
2455 (remote_update_thread_list): Update thread_handle.
2456 (remote_thread_handle_to_thread_info): New function.
2457 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
2459 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2461 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
2463 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
2464 * python/python-internal.h (thread_object_type): Declare.
2466 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2468 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
2469 (target_thread_handle_to_thread_info): Declare.
2470 * target.c (target_thread_handle_to_thread_info): New function.
2471 * target-delegates.c: Regenerate.
2472 * gdbthread.h (find_thread_by_handle): Declare.
2473 * thread.c (find_thread_by_handle): New function.
2474 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
2476 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
2478 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
2480 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
2482 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
2484 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
2486 2017-09-21 Yao Qi <yao.qi@linaro.org>
2488 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
2491 2017-09-20 Tom Tromey <tom@tromey.com>
2493 * breakpoint.c (struct counted_command_line): Remove.
2494 (breakpoint_commands): Update.
2495 (alloc_counted_command_line, incref_counted_command_line)
2496 (decref_counted_command_line, do_cleanup_counted_command_line)
2497 (make_cleanup_decref_counted_command_line): Remove.
2498 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
2499 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
2500 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
2501 (save_breakpoints): Update.
2502 * breakpoint.h (counted_command_line): Now a typedef to
2504 (struct breakpoint) <commands>: Now a counted_command_line.
2505 (struct bpstats) <command>: Likewise.
2507 2017-09-20 Tom Tromey <tom@tromey.com>
2509 * breakpoint.c (struct commands_info, do_map_commands_command):
2511 (commands_command_1): Update.
2512 (iterate_over_related_breakpoints): Take a function_view.
2513 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
2514 (delete_command): Update.
2515 (map_breakpoint_numbers): Take a function_view.
2516 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
2517 (disable_command): Update.
2518 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
2519 (enable_command): Update.
2520 (struct disp_data, do_enable_breakpoint_disp)
2521 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
2522 (do_map_enable_delete_breakpoint): Remove.
2523 (enable_once_command, enable_count_command, enable_delete_command)
2524 (delete_trace_variable_command): Update.
2526 2017-09-20 Tom Tromey <tom@tromey.com>
2528 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
2529 (bpstat_clear): Use delete.
2530 (bpstats): New constructors.
2531 (bpstat_copy, bpstat_stop_status): Use new.
2532 (dprintf_after_condition_true): Update.
2533 * breakpoint.h (bpstats::bpstats): Add constructors.
2534 (bpstats::~bpstats): Add destructor.
2536 2017-09-20 Pedro Alves <palves@redhat.com>
2538 * eval.c (make_params): Delete, refactored as ...
2539 (class fake_method): ... this new type's ctor.
2540 (fake_method::~fake_method): New.
2541 (evaluate_subexp_standard): Use 'fake_method'.
2543 2017-09-20 Tom Tromey <tom@tromey.com>
2545 * windows-nat.c (get_windows_debug_event, windows_wait)
2546 (do_initial_windows_stuff, windows_attach): Update.
2547 * utils.c (vwarning, internal_vproblem): Update.
2548 (ui_unregister_input_event_handler_cleanup)
2549 (prepare_to_handle_input): Remove.
2550 (class scoped_input_handler): New.
2551 (defaulted_query, prompt_for_continue): Update.
2552 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
2554 * top.c (undo_terminal_modifications_before_exit): Update.
2555 * target/target.h (target_terminal_init, target_terminal_inferior)
2556 (target_terminal_ours): Don't declare.
2557 (class target_terminal): New.
2558 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
2559 (target_terminal_ours_for_output)
2560 (make_cleanup_restore_target_terminal): Don't declare.
2561 (target_terminal_info): Remove.
2562 * target.c (enum terminal_state, terminal_state): Remove.
2563 (target_terminal::terminal_state): Define.
2564 (target_terminal::init): Rename from target_terminal_init.
2565 (target_terminal::inferior): Rename from
2566 target_terminal_inferior.
2567 (target_terminal::ours): Rename from target_terminal_ours.
2568 (target_terminal::ours_for_output): Rename from
2569 target_terminal_ours_for_output.
2570 (target_terminal::info): New method.
2571 (cleanup_restore_target_terminal)
2572 (make_cleanup_restore_target_terminal): Remove.
2573 * solib.c (handle_solib_event): Update.
2574 * remote.c (remote_serial_quit_handler): Update.
2575 (remote_terminal_inferior, remote_wait_as): Update.
2576 * record-full.c (record_full_wait_1): Update.
2577 * nto-procfs.c (procfs_create_inferior): Update.
2578 * nat/fork-inferior.c (startup_inferior): Update.
2579 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
2580 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
2581 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
2582 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
2583 (mi_breakpoint_created, mi_breakpoint_deleted)
2584 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
2585 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2586 (mi_user_selected_context_changed, report_initial_inferior):
2588 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
2589 (linux_nat_terminal_inferior): Update.
2590 * infrun.c (follow_fork_inferior)
2591 (handle_vfork_child_exec_or_exit, do_target_resume)
2592 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
2593 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
2595 * inflow.c (child_terminal_init, info_terminal_command): Update.
2596 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
2597 (attach_command): Update.
2598 * infcall.c (call_thread_fsm_should_stop): Update.
2599 * gnu-nat.c (gnu_attach): Update.
2600 * extension.c (struct active_ext_lang_state)
2601 (restore_active_ext_lang): Update.
2602 * exceptions.c (print_flush): Update.
2603 * event-top.c (async_enable_stdin, default_quit_handler): Update.
2604 (struct quit_handler_cleanup_data, restore_quit_handler)
2605 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
2607 * cp-support.c (gdb_demangle): Update.
2608 * breakpoint.c (update_inserted_breakpoint_locations)
2609 (insert_breakpoint_locations, handle_jit_event)
2610 (disable_breakpoints_in_unloaded_shlib): Update.
2611 * annotate.c (annotate_breakpoints_invalid)
2612 (annotate_frames_invalid): Update.
2614 2017-09-20 Tom Tromey <tom@tromey.com>
2616 * main.c (catch_command_errors): Rename from
2617 catch_command_errors_const.
2618 (captured_main_1): Update.
2620 2017-09-20 Pedro Alves <palves@redhat.com>
2622 * cli/cli-cmds.c (list_command): Use print_sal_location.
2623 (print_sal_location): New function.
2624 (ambiguous_line_spec): Use print_sal_location.
2625 * linespec.c (symbol_to_sal): Record the symbol in the sal.
2626 * symtab.c (find_function_start_sal): Likewise.
2627 * symtab.h (symtab_and_line::symbol): New field.
2629 2017-09-20 Pedro Alves <palves@redhat.com>
2631 * linespec.c (minsym_found): Handle non-text minsyms.
2632 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
2634 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2636 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
2639 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2641 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
2642 vmovups instead vmovaps.
2643 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
2645 2017-09-19 John Baldwin <jhb@FreeBSD.org>
2647 * NEWS (Changes since GDB 8.0): Add starti.
2648 * infcmd.c (enum run_break): New.
2649 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
2651 (run_command): Use enum run_how.
2652 (start_command): Likewise.
2653 (starti_command): New function.
2654 (RUN_ARGS_HELP): New macro.
2655 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
2656 commands. Add starti command.
2658 2017-09-19 Yao Qi <yao.qi@linaro.org>
2660 * Makefile.in (monitor.o): Remove the rule.
2662 2017-09-19 Yao Qi <yao.qi@linaro.org>
2664 * annotate.h (struct annotate_arg_emitter): Use
2665 DISABLE_COPY_AND_ASSIGN.
2666 * common/refcounted-object.h (refcounted_object): Likewise.
2667 * completer.h (struct completion_result): Likewise.
2668 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
2669 * filename-seen-cache.h (filename_seen_cache): Likewise.
2670 * gdbcore.h (thread_section_name): Likewise.
2671 * gdb_regex.h (compiled_regex): Likewise.
2672 * gdbthread.h (scoped_restore_current_thread): Likewise.
2673 * inferior.h (scoped_restore_current_inferior): Likewise.
2674 * jit.c (jit_reader): Likewise.
2675 * linespec.h (struct linespec_result): Likewise.
2676 * mi/mi-parse.h (struct mi_parse): Likewise.
2677 * nat/fork-inferior.c (execv_argv): Likewise.
2678 * progspace.h (scoped_restore_current_program_space): Likewise.
2679 * python/python-internal.h (class gdbpy_enter): Likewise.
2680 * regcache.h (regcache): Likewise.
2681 * target-descriptions.c (struct tdesc_reg): Likewise.
2682 (struct tdesc_type): Likewise.
2683 (struct tdesc_feature): Likewise.
2684 * ui-out.h (ui_out_emit_type): Likewise.
2686 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
2688 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
2689 label abort_expression.
2691 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2693 * common/buffer.c (buffer_xml_printf): Adjust.
2694 * common/xml-utils.c (xml_escape_text): Change return type to
2695 std::string, update code accordingly.
2696 * common/xml-utils.h (xml_escape_text): Change return type to
2698 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
2699 * windows-tdep.c (windows_xfer_shared_library): Adjust.
2700 * unittests/xml-utils-selftests.c (test_xml_escape_text):
2703 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2705 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
2706 (SUBDIR_UNITTESTS_OBS): Add new object file.
2707 * unittests/xml-utils-selftests.c: New file.
2709 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2711 * common/selftest.h (selftest): New struct/interface.
2712 (register_test): Add name parameter, add new overload.
2713 (run_tests): Add filter parameter.
2714 (for_each_selftest_ftype): New typedef.
2715 (for_each_selftest): New declaration.
2716 * common/selftest.c (tests): Change type to
2717 map<string, unique_ptr<selftest>>.
2718 (simple_selftest): New struct.
2719 (register_test): New function.
2720 (register_test): Add name parameter and use it.
2721 (run_tests): Add filter parameter and use it. Add prints.
2722 Adjust to vector -> map change.
2723 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
2724 registering selftests.
2725 * arm-tdep.c (_initialize_arm_tdep): Likewise.
2726 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
2727 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
2728 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
2729 * findvar.c (_initialize_findvar): Likewise.
2730 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
2731 * maint.c (maintenance_selftest): Update call to run_tests.
2732 (maintenance_info_selftests): New function.
2733 (_initialize_maint_cmds): Register "maintenance info selftests"
2734 command. Update "maintenance selftest" doc.
2735 * regcache.c (_initialize_regcache): Add names when registering
2737 * rust-exp.y (_initialize_rust_exp): Likewise.
2738 * selftest-arch.c (gdbarch_selftest): New struct.
2739 (gdbarch_tests): Remove.
2740 (register_test_foreach_arch): Add name parameter. Call
2742 (tests_with_arch): Remove, move most content to
2743 gdbarch_selftest::operator().
2744 (_initialize_selftests_foreach_arch): Remove.
2745 * selftest-arch.h (register_test_foreach_arch): Add name
2747 (run_tests_with_arch): New declaration.
2748 * utils-selftests.c (_initialize_utils_selftests): Add names
2749 when registering selftests.
2750 * utils.c (_initialize_utils): Likewise.
2751 * unittests/array-view-selftests.c
2752 (_initialize_array_view_selftests): Likewise.
2753 * unittests/environ-selftests.c (_initialize_environ_selftests):
2755 * unittests/function-view-selftests.c
2756 (_initialize_function_view_selftests): Likewise.
2757 * unittests/offset-type-selftests.c
2758 (_initialize_offset_type_selftests): Likewise.
2759 * unittests/optional-selftests.c
2760 (_initialize_optional_selftests): Likewise.
2761 * unittests/scoped_restore-selftests.c
2762 (_initialize_scoped_restore_selftests): Likewise.
2763 * NEWS: Document "maintenance selftest" and "maint info
2766 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2768 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
2771 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2773 * mi/mi-main.c (mi_load_progress): Make uiout variable
2776 2017-09-15 Pedro Alves <palves@redhat.com>
2778 * compile/compile-c-types.c (convert_enum, convert_int)
2779 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
2781 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2783 * dwarf2read.c (copy_string): Remove.
2784 (parse_macro_definition): Replace copy_string with savestring.
2786 2017-09-15 Yao Qi <yao.qi@linaro.org>
2788 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
2790 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
2792 (i[34567]86-*-linux*): Likewise.
2794 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2796 * dwarf2expr.h (dwarf_stack_value): Add constructor.
2797 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
2798 <stack>: Change type to std::vector.
2799 <stack_len, stack_allocated>: Remove.
2800 <grow_stack>: Remove.
2801 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2802 (dwarf_expr_context::~dwarf_expr_context): Remove.
2803 (dwarf_expr_context::grow_stack): Remove.
2804 (dwarf_expr_context::push): Adjust.
2805 (dwarf_expr_context::pop): Adjust.
2806 (dwarf_expr_context::fetch): Adjust.
2807 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
2808 (dwarf_expr_context::stack_empty_p): Adjust.
2809 (dwarf_expr_context::execute_stack_op): Adjust.
2811 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2813 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
2814 return type to bool.
2815 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
2817 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2819 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
2820 Change type to bool.
2821 (dwarf_stack_value) <in_stack_memory>: Likewise.
2822 (dwarf_expr_context) <push_address>: Change parameter type to
2824 <fetch_in_stack_memory>: Change return type to bool.
2825 <push>: Change parameter type to bool.
2826 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
2828 (dwarf_expr_context::push_address): Likewise.
2829 (dwarf_expr_context::fetch_in_stack_memory): Change return type
2831 (dwarf_expr_context::execute_stack_op): Adjust.
2832 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
2834 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2836 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
2837 (struct dwarf_expr_context) <n_pieces>: Remove.
2838 <pieces>: Change type to std::vector.
2839 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2840 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
2842 (dwarf_expr_context::add_piece): Adjust.
2843 * dwarf2loc.c (struct piece_closure): Initialize fields.
2845 <pieces>: Change type to std::vector.
2846 (allocate_piece_closure): Adjust, change parameter to
2847 std::vector rvalue and std::move it to piece_closure.
2848 (rw_pieced_value): Adjust.
2849 (check_pieced_synthetic_pointer): Adjust.
2850 (indirect_synthetic_pointer): Adjust.
2851 (coerce_pieced_ref): Adjust.
2852 (free_pieced_value_closure): Adjust. Use delete to free
2854 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
2855 to allocate_piece_closure.
2856 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2858 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2860 * probe.h (probe_ops_cp): Remove typedef.
2861 (DEF_VEC_P (probe_ops_cp)): Remove.
2862 (all_probe_ops): Change type to std::vector.
2863 * probe.c (info_probes_for_ops): Adjust to vector change.
2864 (probe_linespec_to_ops): Likewise.
2865 (all_probe_ops): Change type to std::vector.
2866 (_initialize_probe): Adjust to vector change.
2867 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2868 * elfread.c (elf_get_probes): Likewise.
2869 * stap-probe.c (_initialize_stap_probe): Likewise.
2871 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2873 * probe.h (struct bound_probe): Define constructors.
2874 * probe.c (bound_probe_s): Remove typedef.
2875 (DEF_VEC_O (bound_probe_s)): Remove VEC.
2876 (collect_probes): Change return type to std::vector, remove
2878 (compare_probes): Return bool, change parameter type. Change
2879 semantic to "less than".
2880 (gen_ui_out_table_header_info): Change parameter to std::vector
2882 (exists_probe_with_pops): Likewise.
2883 (info_probes_for_ops): Update to std::vector change.
2884 (enable_probes_command): Likewise.
2885 (disable_probes_command): Likewise.
2887 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2889 * probe.h (struct probe_ops) <get_probes>: Change parameter from
2891 * probe.c (parse_probes_in_pspace): Update.
2892 (find_probes_in_objfile): Update.
2893 (find_probe_by_pc): Update.
2894 (collect_probes): Update.
2895 (probe_any_get_probes): Update.
2896 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2897 return type to reference to std::vector.
2898 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2899 std::vector and update.
2900 (dtrace_process_dof): Likewise.
2901 (dtrace_get_probes): Likewise.
2902 * elfread.c (elf_get_probes): Change return type to std::vector,
2903 store an std::vector in bfd_data.
2904 (probe_key_free): Update to std::vector.
2905 * stap-probe.c (handle_stap_probe): Change parameter to
2906 std::vector and update.
2907 (stap_get_probes): Likewise.
2908 * symfile-debug.c (debug_sym_get_probes): Change return type to
2909 std::vector and update.
2911 2017-09-11 Tom Tromey <tom@tromey.com>
2913 * breakpoint.c (program_breakpoint_here_p): Update.
2914 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2915 from make_show_memory_breakpoints_cleanup. Return a
2916 scoped_restore_tmpl<int>.
2917 (restore_show_memory_breakpoints): Remove.
2918 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2919 * mem-break.c (memory_validate_breakpoint): Update.
2920 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2921 (ia64_memory_remove_breakpoint): Update.
2922 (ia64_breakpoint_from_pc): Update.
2923 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2924 from make_show_memory_breakpoints_cleanup.
2926 2017-09-11 Tom Tromey <tom@tromey.com>
2928 * d-namespace.c (d_lookup_symbol): Use std::string.
2929 (find_symbol_in_baseclass): Likewise.
2931 2017-09-11 Tom Tromey <tom@tromey.com>
2933 * ctf.c (ctf_start): Use std::string.
2935 2017-09-11 Tom Tromey <tom@tromey.com>
2937 * ada-lang.c (is_known_support_routine): Update.
2938 (ada_unhandled_exception_name_addr_from_raise): Update.
2939 * guile/scm-frame.c (gdbscm_frame_name): Update.
2940 * python/py-frame.c (frapy_name): Update.
2941 (frapy_function): Update.
2942 * stack.h (find_frame_funname): Update.
2943 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2944 (print_frame): Update.
2946 2017-09-11 Tom Tromey <tom@tromey.com>
2948 * findcmd.c (put_bits): Take a gdb::byte_vector.
2949 (parse_find_args): Return gdb::byte_vector. "args" now const.
2950 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
2952 (find_command): Update.
2954 2017-09-11 Tom Tromey <tom@tromey.com>
2956 * cli/cli-script.c (class scoped_restore_hook_in): New.
2957 (clear_hook_in_cleanup): Remove.
2958 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2959 scoped_restore_hook_in.
2961 2017-09-11 Tom Tromey <tom@tromey.com>
2963 * cli/cli-script.c (restore_interp): Remove.
2964 (read_command_lines): Use scoped_restore_interp.
2965 * interps.c (scoped_restore_interp::set_temp): Rename from
2967 * interps.h (class scoped_restore_interp): New.
2968 (interp_set_temp): Remove.
2970 2017-09-11 Tom Tromey <tom@tromey.com>
2972 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2973 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2974 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2976 (mi_cmd_break_insert_1): Update.
2977 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2980 2017-09-11 Tom Tromey <tom@tromey.com>
2982 * demangle.c (demangle_command): Update.
2983 * breakpoint.c (disable_command): Update.
2984 (enable_command): Update.
2985 (find_location_by_number): Make "number" const. Use
2987 * cli/cli-utils.c (extract_arg): Return std::string.
2988 * probe.c (parse_probe_linespec): Update. Change types.
2989 (collect_probes): Take string arguments.
2990 (parse_probe_linespec): Likewise.
2991 (info_probes_for_ops): Update.
2992 (enable_probes_command): Update.
2993 (disable_probes_command): Update.
2994 * break-catch-sig.c (catch_signal_split_args): Update.
2995 * mi/mi-parse.c (mi_parse): Update.
2997 2017-09-11 Tom Tromey <tom@tromey.com>
2999 * language.h (language_enum): Make argument const.
3000 * language.c (language_enum): Make argument const.
3002 2017-09-11 Tom Tromey <tom@tromey.com>
3004 * common/common-utils.h (skip_to_space): Remove macro, redeclare
3006 (skip_to_space): Rename from skip_to_space_const.
3007 * common/common-utils.c (skip_to_space): New function.
3008 (skip_to_space): Rename from skip_to_space_const.
3009 * cli/cli-utils.h (get_number): Rename from get_number_const.
3010 (extract_arg): Rename from extract_arg_const.
3011 * cli/cli-utils.c (get_number): Rename from get_number_const.
3012 (extract_arg): Rename from extract_arg_const.
3013 (number_or_range_parser::get_number): Use ::get_number.
3014 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3015 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3016 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3017 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3018 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3019 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3020 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3021 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3023 2017-09-11 Tom Tromey <tom@tromey.com>
3025 * python/python.c (do_start_initialization): Use
3026 py-event-types.def to initialize types.
3027 Define all object type structures.
3028 * python/python-internal.h: Don't declare event initialization
3030 * python/py-threadevent.c (thread_event_object_type): Don't
3032 * python/py-stopevent.c (stop_event_object_type): Don't define.
3033 * python/py-signalevent.c (signal_event_object_type): Don't
3035 * python/py-newobjfileevent.c (new_objfile_event_object_type)
3036 (clear_objfiles_event_object_type): Don't declare or define.
3037 * python/py-infevents.c (inferior_call_pre_event_object_type)
3038 (inferior_call_post_event_object_type)
3039 (register_changed_event_object_type)
3040 (memory_changed_event_object_type): Don't declare or define.
3041 * python/py-inferior.c (new_thread_event_object_type)
3042 (new_inferior_event_object_type)
3043 (inferior_deleted_event_object_type): Don't declare or define.
3044 * python/py-exitedevent.c (exited_event_object_type): Don't
3046 * python/py-evts.c (gdbpy_initialize_py_events): Use
3048 * python/py-events.h (thread_event_object_type): Don't declare.
3049 (events_object): Use py-all-events.def.
3050 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
3052 * python/py-event-types.def: New file.
3053 * python/py-continueevent.c (create_continue_event_object): Don't
3055 * python/py-bpevent.c (breakpoint_event_object_type): Don't
3057 * python/py-all-events.def: New file.
3059 2017-09-11 Tom Tromey <tom@tromey.com>
3061 * python/py-threadevent.c (create_thread_event_object): Return
3063 * python/py-stopevent.h (create_stop_event_object)
3064 (create_breakpoint_event_object, create_signal_event_object):
3066 * python/py-stopevent.c (create_stop_event_object): Return
3068 (emit_stop_event): Update.
3069 * python/py-signalevent.c (create_signal_event_object): Return
3071 * python/py-infevents.c (create_inferior_call_event_object):
3073 * python/py-event.h (create_event_object)
3074 (create_thread_event_object): Update.
3075 * python/py-event.c (create_event_object): Return gdbpy_ref.
3076 * python/py-continueevent.c: Return gdbpy_ref.
3077 * python/py-bpevent.c (create_breakpoint_event_object): Return
3080 2017-09-11 Tom Tromey <tom@tromey.com>
3084 * python/python.c (do_start_initialization): Initialize new event
3086 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3087 (gdbpy_initialize_inferior_deleted_event)
3088 (gdbpy_initialize_new_thread_event): Declare.
3089 * python/py-threadevent.c (create_thread_event_object): Add option
3091 * python/py-inferior.c (new_thread_event_object_type)
3092 (new_inferior_event_object_type)
3093 (inferior_deleted_event_object_type): Declare.
3094 (python_new_inferior, python_inferior_deleted): New functions.
3095 (add_thread_object): Emit new_thread event.
3096 (gdbpy_initialize_inferior): Attach new functions to corresponding
3098 (new_thread, new_inferior, inferior_deleted): Define new event
3100 * python/py-evts.c (gdbpy_initialize_py_events): Add new
3102 * python/py-events.h (events_object) <new_inferior,
3103 inferior_deleted, new_thread>: New fields.
3104 * python/py-event.h (create_thread_event_breakpoint): Add optional
3107 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
3109 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3110 check current_ui instead.
3111 (internal_vproblem): Likewise.
3113 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
3115 * thread.c (print_thread_info_1): Remove unnecessary calls to
3116 uiout->is_mi_like_p.
3118 2017-09-09 Tom Tromey <tom@tromey.com>
3120 * namespace.h (add_using_directive): Update.
3121 * namespace.c (add_using_directive): Change type of excludes to
3123 * dwarf2read.c (read_import_statement): Use std::vector.
3124 (read_namespace): Update.
3125 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3127 2017-09-09 Tom Tromey <tom@tromey.com>
3129 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3131 2017-09-09 Tom Tromey <tom@tromey.com>
3133 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3135 2017-09-09 Tom Tromey <tom@tromey.com>
3137 * stack.c (func_command): Use gdb::def_vector.
3139 2017-09-09 Tom Tromey <tom@tromey.com>
3141 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3142 ui_out_emit_list, ui_out_emit_tuple.
3143 (mi_cmd_var_update): Likewise.
3145 2017-09-09 Tom Tromey <tom@tromey.com>
3147 * mi/mi-interp.c (mi_user_selected_context_changed): Use
3148 ui_out_redirect_pop.
3149 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3150 ui_out_redirect_pop.
3151 * utils.c (do_ui_out_redirect_pop)
3152 (make_cleanup_ui_out_redirect_pop): Remove.
3153 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3154 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3155 * ui-out.h (ui_out_redirect_pop): New class.
3157 2017-09-09 Tom Tromey <tom@tromey.com>
3159 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3160 (list_available_thread_groups, mi_cmd_list_thread_groups)
3161 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3162 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3165 2017-09-09 Tom Tromey <tom@tromey.com>
3167 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3170 2017-09-09 Tom Tromey <tom@tromey.com>
3172 * target.c (flash_erase_command): Use ui_out_emit_tuple.
3173 * stack.c (print_frame): Use ui_out_emit_tuple.
3174 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3175 (info_spu_mailbox_command, info_spu_dma_command)
3176 (info_spu_proxydma_command): Likewise.
3177 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3178 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3179 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3181 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3183 2017-09-09 Tom Tromey <tom@tromey.com>
3185 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3186 (class ui_out_emit_table): Update comment.
3187 * ui-out.c (do_cleanup_table_end)
3188 (make_cleanup_ui_out_table_begin_end): Remove.
3189 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3190 (info_spu_dma_cmdlist): Likewise.
3191 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3192 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3195 2017-09-09 Tom Tromey <tom@tromey.com>
3197 * thread.c (print_thread_info_1): Use ui_out_emit_table,
3198 ui_out_emit_list, gdb::optional.
3200 2017-09-09 John Baldwin <jhb@FreeBSD.org>
3202 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
3204 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
3206 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
3208 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
3209 * ada-exp.y: Remove _initialize_ada_exp prototype.
3210 * ada-lang.c: Remove _initialize_ada_language prototype.
3211 * ada-tasks.c: Remove _initialize_tasks prototype.
3212 * addrmap.c: Remove _initialize_addrmap prototype.
3213 * agent.c: Remove _initialize_agent prototype.
3214 * aix-thread.c: Remove _initialize_aix_thread prototype.
3215 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
3216 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
3217 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
3219 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
3220 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
3221 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3222 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3224 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3226 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3227 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3228 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3229 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3231 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3232 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3233 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3234 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3235 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3236 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3237 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3239 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3241 * annotate.c: Remove _initialize_annotate prototype.
3242 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3243 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3244 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3245 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3246 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3247 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3248 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3249 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3251 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3252 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3253 * auto-load.c: Remove _initialize_auto_load prototype.
3254 * auxv.c: Remove _initialize_auxv prototype.
3255 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3256 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3257 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3258 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3259 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3260 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3262 * break-catch-throw.c: Remove _initialize_break_catch_throw
3264 * breakpoint.c: Remove _initialize_breakpoint prototype.
3265 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3266 * btrace.c: Remove _initialize_btrace prototype.
3267 * charset.c: Remove _initialize_charset prototype.
3268 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3269 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3270 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3271 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3272 * cli/cli-script.c: Remove _initialize_cli_script prototype.
3273 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3274 * coffread.c: Remove _initialize_coffread prototype.
3275 * compile/compile.c: Remove _initialize_compile prototype.
3276 * complaints.c: Remove _initialize_complaints prototype.
3277 * completer.c: Remove _initialize_completer prototype.
3278 * copying.awk: Remove _initialize_copying prototype.
3279 * copying.c: Regenerate.
3280 * core-regset.c: Remove _initialize_core_regset prototype.
3281 * corefile.c: Remove _initialize_core prototype.
3282 * corelow.c: Remove _initialize_corelow prototype.
3283 * cp-abi.c: Remove _initialize_cp_abi prototype.
3284 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3285 * cp-support.c: Remove _initialize_cp_support prototype.
3286 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3287 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3288 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3289 * ctf.c: Remove _initialize_ctf prototype.
3290 * d-lang.c: Remove _initialize_d_language prototype.
3291 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
3293 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
3294 * dbxread.c: Remove _initialize_dbxread prototype.
3295 * dcache.c: Remove _initialize_dcache prototype.
3296 * demangle.c: Remove _initialize_demangler prototype.
3297 * disasm-selftests.c: Remove _initialize_disasm_selftests
3299 * disasm.c: Remove _initialize_disasm prototype.
3300 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3301 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3302 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3304 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3305 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3306 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3307 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3308 * elfread.c: Remove _initialize_elfread prototype.
3309 * exec.c: Remove _initialize_exec prototype.
3310 * extension.c: Remove _initialize_extension prototype.
3311 * f-lang.c: Remove _initialize_f_language prototype.
3312 * f-valprint.c: Remove _initialize_f_valprint prototype.
3313 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
3314 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
3315 * filesystem.c: Remove _initialize_filesystem prototype.
3316 * findcmd.c: Remove _initialize_mem_search prototype.
3317 * fork-child.c: Remove _initialize_fork_child prototype.
3318 * frame-base.c: Remove _initialize_frame_base prototype.
3319 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
3320 * frame.c: Remove _initialize_frame prototype.
3321 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
3322 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
3323 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
3324 * gcore.c: Remove _initialize_gcore prototype.
3325 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
3326 * gdbarch.c: Regenerate.
3327 * gdbarch.sh: Remove _initialize_gdbarch prototype.
3328 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
3329 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
3330 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
3331 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
3332 * go-lang.c: Remove _initialize_go_language prototype.
3333 * go32-nat.c: Remove _initialize_go32_nat prototype.
3334 * guile/guile.c: Remove _initialize_guile prototype.
3335 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
3336 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
3337 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
3338 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
3339 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
3340 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
3341 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
3342 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
3343 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
3344 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
3346 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
3348 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
3349 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
3350 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
3351 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
3352 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
3353 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
3354 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
3355 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
3356 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
3357 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
3358 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
3359 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
3360 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
3361 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3362 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
3363 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
3365 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
3367 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
3368 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
3369 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
3370 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
3371 * infcall.c: Remove _initialize_infcall prototype.
3372 * infcmd.c: Remove _initialize_infcmd prototype.
3373 * inferior.c: Remove _initialize_inferiors prototype.
3374 * inflow.c: Remove _initialize_inflow prototype.
3375 * infrun.c: Remove _initialize_infrun prototype.
3376 * interps.c: Remove _initialize_interpreter prototype.
3377 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
3378 * jit.c: Remove _initialize_jit prototype.
3379 * language.c: Remove _initialize_language prototype.
3380 * linux-fork.c: Remove _initialize_linux_fork prototype.
3381 * linux-nat.c: Remove _initialize_linux_nat prototype.
3382 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
3383 * linux-thread-db.c: Remove _initialize_thread_db prototype.
3384 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
3385 * m2-lang.c: Remove _initialize_m2_language prototype.
3386 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
3387 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
3388 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
3389 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
3390 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
3391 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3392 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3393 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
3394 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
3395 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
3396 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3397 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3398 * machoread.c: Remove _initialize_machoread prototype.
3399 * macrocmd.c: Remove _initialize_macrocmd prototype.
3400 * macroscope.c: Remove _initialize_macroscope prototype.
3401 * maint.c: Remove _initialize_maint_cmds prototype.
3402 * mdebugread.c: Remove _initialize_mdebugread prototype.
3403 * memattr.c: Remove _initialize_mem prototype.
3404 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
3405 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
3406 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
3407 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
3408 * mi/mi-main.c: Remove _initialize_mi_main prototype.
3409 * microblaze-linux-tdep.c: Remove
3410 _initialize_microblaze_linux_tdep prototype.
3411 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
3412 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
3413 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
3414 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
3415 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
3416 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
3417 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
3418 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
3419 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
3420 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
3421 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
3423 * mipsread.c: Remove _initialize_mipsread prototype.
3424 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
3426 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
3427 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
3428 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
3429 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
3430 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
3431 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
3433 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
3434 * nto-procfs.c: Remove _initialize_procfs prototype.
3435 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
3436 * objc-lang.c: Remove _initialize_objc_language prototype.
3437 * objfiles.c: Remove _initialize_objfiles prototype.
3438 * observer.c: Remove observer_test_first_notification_function,
3439 observer_test_second_notification_function,
3440 observer_test_third_notification_function, and
3441 _initialize_observer prototypes.
3442 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
3443 * osabi.c: Remove _initialize_gdb_osabi prototype.
3444 * osdata.c: Remove _initialize_osdata prototype.
3445 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
3446 * parse.c: Remove _initialize_parse prototype.
3447 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
3448 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
3449 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
3450 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
3451 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
3452 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
3453 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
3454 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
3455 * printcmd.c: Remove _initialize_printcmd prototype.
3456 * probe.c: Remove _initialize_probe prototype.
3457 * proc-api.c: Remove _initialize_proc_api prototype.
3458 * proc-events.c: Remove _initialize_proc_events prototype.
3459 * proc-service.c: Remove _initialize_proc_service prototype.
3460 * procfs.c: Remove _initialize_procfs prototype.
3461 * psymtab.c: Remove _initialize_psymtab prototype.
3462 * python/python.c: Remove _initialize_python prototype.
3463 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
3464 * record-btrace.c: Remove _initialize_record_btrace prototype.
3465 * record-full.c: Remove _initialize_record_full prototype.
3466 * record.c: Remove _initialize_record prototype.
3467 * regcache.c: Remove _initialize_regcache prototype.
3468 * reggroups.c: Remove _initialize_reggroup prototype.
3469 * remote-notif.c: Remove _initialize_notif prototype.
3470 * remote-sim.c: Remove _initialize_remote_sim prototype.
3471 * remote.c: Remove _initialize_remote prototype.
3472 * reverse.c: Remove _initialize_reverse prototype.
3473 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
3474 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
3475 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
3477 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
3478 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
3479 * rust-exp.y: Remove _initialize_rust_exp prototype.
3480 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
3481 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
3482 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
3483 * score-tdep.c: Remove _initialize_score_tdep prototype.
3484 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
3486 * ser-go32.c: Remove _initialize_ser_dos prototype.
3487 * ser-mingw.c: Remove _initialize_ser_windows prototype.
3488 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
3489 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
3490 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
3491 * serial.c: Remove _initialize_serial prototype.
3492 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
3493 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
3494 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
3495 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
3496 * skip.c: Remove _initialize_step_skip prototype.
3497 * sol-thread.c: Remove _initialize_sol_thread prototype.
3498 * solib-aix.c: Remove _initialize_solib_aix prototype.
3499 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
3500 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
3501 * solib-frv.c: Remove _initialize_frv_solib prototype.
3502 * solib-spu.c: Remove _initialize_spu_solib prototype.
3503 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
3504 * solib-target.c: Remove _initialize_solib_target prototype.
3505 * solib.c: Remove _initialize_solib prototype.
3506 * source.c: Remove _initialize_source prototype.
3507 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
3508 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
3510 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
3511 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
3512 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
3513 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
3515 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
3516 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
3517 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
3518 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
3520 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
3522 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
3524 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
3526 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
3527 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
3529 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
3531 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
3533 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
3535 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
3537 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
3538 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
3539 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
3540 * stabsread.c: Remove _initialize_stabsread prototype.
3541 * stack.c: Remove _initialize_stack prototype.
3542 * stap-probe.c: Remove _initialize_stap_probe prototype.
3543 * std-regs.c: Remove _initialize_frame_reg prototype.
3544 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
3545 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
3546 * symfile.c: Remove _initialize_symfile prototype.
3547 * symmisc.c: Remove _initialize_symmisc prototype.
3548 * symtab.c: Remove _initialize_symtab prototype.
3549 * target-dcache.c: Remove _initialize_target_dcache prototype.
3550 * target-descriptions.c: Remove _initialize_target_descriptions
3552 * thread.c: Remove _initialize_thread prototype.
3553 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
3555 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
3556 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
3557 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
3559 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
3560 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
3561 * tracefile.c: Remove _initialize_tracefile prototype.
3562 * tracepoint.c: Remove _initialize_tracepoint prototype.
3563 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
3564 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
3565 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
3566 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
3567 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
3568 * tui/tui-win.c: Remove _initialize_tui_win prototype.
3569 * tui/tui.c: Remove _initialize_tui prototype.
3570 * typeprint.c: Remove _initialize_typeprint prototype.
3571 * user-regs.c: Remove _initialize_user_regs prototype.
3572 * utils.c: Remove _initialize_utils prototype.
3573 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
3574 * valarith.c: Remove _initialize_valarith prototype.
3575 * valops.c: Remove _initialize_valops prototype.
3576 * valprint.c: Remove _initialize_valprint prototype.
3577 * value.c: Remove _initialize_values prototype.
3578 * varobj.c: Remove _initialize_varobj prototype.
3579 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
3580 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
3581 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
3582 * windows-nat.c: Remove _initialize_windows_nat,
3583 _initialize_check_for_gdb_ini, and _initialize_loadable
3585 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
3586 * xcoffread.c: Remove _initialize_xcoffread prototype.
3587 * xml-support.c: Remove _initialize_xml_support prototype.
3588 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
3589 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
3591 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
3593 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
3595 2017-09-08 Keith Seitz <keiths@redhat.com>
3597 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
3600 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
3602 * f-valprint.c (f_val_print): Remove check for one byte
3603 sized integers. Remove printing of character type.
3605 2017-09-08 Frank Penczek <frank.penczek@intel.com>
3606 Christoph Weinmann <christoph.t.weinmann@intel.com>
3607 Bernhard Heckel <bernhard.heckel@intel.com>
3609 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
3610 to maintain proper indentation when printing pointers/refs.
3612 2017-09-07 Joel Brobecker <brobecker@adacore.com>
3616 2017-09-07 Joel Brobecker <brobecker@adacore.com>
3618 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
3620 2017-09-05 Tom Tromey <tom@tromey.com>
3622 * parse.c (funcall_chain): Now a std::vector.
3623 (start_arglist, end_arglist): Simplify.
3624 (free_funcalls): Remove.
3625 (parse_exp_in_context_1): Remove cleanup.
3627 2017-09-05 Tom Tromey <tom@tromey.com>
3629 * go-exp.y (go_parse): Don't create a cleanup.
3631 2017-09-05 Tom Tromey <tom@tromey.com>
3633 * d-exp.y (PrimaryExpression): Use std::string.
3634 (d_parse): Don't create a cleanup.
3636 2017-09-05 Tom Tromey <tom@tromey.com>
3638 * utils.c (do_clear_parser_state): Remove.
3639 (make_cleanup_clear_parser_state): Remove.
3640 * p-exp.y (pascal_parse): Use scoped_restore.
3641 * m2-exp.y (m2_parse): Use scoped_restore.
3642 * f-exp.y (f_parse): Use scoped_restore.
3643 * d-exp.y (d_parse): Use scoped_restore.
3644 * c-exp.y (c_parse): Use scoped_restore.
3645 * ada-exp.y (ada_parse): Use scoped_restore.
3646 * utils.h (make_cleanup_clear_parser_state): Remove.
3648 2017-09-06 Keith Seitz <keiths@redhat.com>
3650 * dwarf2read.c (dw2_linkage_name_attr): New function.
3651 (dw2_linkage_name): New function.
3652 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
3653 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
3654 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
3656 2017-09-06 Kamil Rytarowski <n54@gmx.com>
3658 * config/djgpp/djconfig.sh: Correct shell portability issue.
3660 2017-09-06 Kamil Rytarowski <n54@gmx.com>
3662 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
3664 2017-09-06 John Baldwin <jhb@FreeBSD.org>
3666 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
3667 * NEWS: Mention new FreeBSD/mips native configuration.
3668 * configure.host: Add aarch64*-*-freebsd*.
3669 * configure.nat: Likewise.
3670 * aarch64-fbsd-nat.c: New file.
3672 2017-09-06 John Baldwin <jhb@FreeBSD.org>
3674 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
3675 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
3676 * NEWS: Mention new FreeBSD/aarch64 target.
3677 * configure.tgt: Add aarch64*-*-freebsd*.
3678 * aarch64-fbsd-tdep.c: New file.
3679 * aarch64-fbsd-tdep.h: New file.
3681 2017-09-06 Kamil Rytarowski <n54@gmx.com>
3683 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
3685 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3687 * parse.c (find_minsym_type_and_address): Don't relocate addresses
3690 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3692 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
3695 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3697 * infrun.c (follow_exec): Call add_thread after
3698 target_find_description.
3700 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3702 * infrun.c (handle_inferior_event_1): When exec'ing, read
3703 stop_pc after follow_exec.
3705 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3707 * remote.c (process_g_packet): Update error message.
3709 2017-09-05 Yao Qi <yao.qi@linaro.org>
3711 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
3714 2017-09-05 Pedro Alves <palves@redhat.com>
3716 * eval.c (eval_call, evaluate_funcall): New functions, factored
3718 (evaluate_subexp_standard): ... this.
3720 2017-09-05 Yao Qi <yao.qi@linaro.org>
3722 * amd64-tdep.c (amd64_target_description): Create target
3724 (_initialize_amd64_tdep): Don't call functions
3725 initialize_tdesc_amd64_*. Add self tests.
3726 * arch/amd64.c (amd64_create_target_description): Add parameter
3727 is_linux. Call set_tdesc_osabi if is_linux is true.
3728 * arch/amd64.h (amd64_create_target_description): Update the
3730 * arch/i386.c (i386_create_target_description): Add parameter
3731 is_linux. Call set_tdesc_osabi if is_linux is true.
3732 * arch/i386.h (i386_create_target_description): Update
3734 * configure.tgt: Add i386.o to gdb_target_obs.
3735 * features/Makefile (XMLTOC): Remove i386/*.xml.
3736 * features/i386/amd64-avx-avx512.c: Remove.
3737 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
3738 * features/i386/amd64-avx-mpx.c: Remove.
3739 * features/i386/amd64-avx.c: Remove.
3740 * features/i386/amd64-mpx.c: Remove.
3741 * features/i386/amd64.c: Remove.
3742 * features/i386/i386-avx-avx512.c: Remove.
3743 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
3744 * features/i386/i386-avx-mpx.c: Remove.
3745 * features/i386/i386-avx.c: Remove.
3746 * features/i386/i386-mmx.c: Remove.
3747 * features/i386/i386-mpx.c: Remove.
3748 * features/i386/i386.c: Remove.
3749 * i386-tdep.c: Don't include features/i386/i386*.c., include
3750 target-descriptions.h and arch/i386.h.
3751 (i386_target_description): Create target descriptions.
3752 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
3753 functions. Do self tests.
3755 2017-09-05 Yao Qi <yao.qi@linaro.org>
3757 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
3758 * features/i386/amd64-avx-avx512-linux.c: Removed.
3759 * features/i386/amd64-avx-linux.c: Removed.
3760 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
3761 * features/i386/amd64-avx-mpx-linux.c: Removed.
3762 * features/i386/amd64-linux.c: Removed.
3763 * features/i386/amd64-mpx-linux.c: Removed.
3764 * features/i386/x32-avx-avx512-linux.c: Removed.
3765 * features/i386/x32-avx-linux.c: Removed.
3766 * features/i386/x32-linux.c: Removed.
3768 2017-09-05 Yao Qi <yao.qi@linaro.org>
3770 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
3772 (amd64_linux_read_description): Call
3773 amd64_create_target_description.
3774 * arch/amd64.c: New file.
3775 * arch/amd64.h: New file.
3776 * configure.tgt (x86_64-*-linux*): Append amd64.o.
3777 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
3779 2017-09-05 Yao Qi <yao.qi@linaro.org>
3781 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
3782 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
3783 (amd64_linux_read_description): Create target descriptions.
3784 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
3785 functions. Add unit tests.
3786 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
3788 * features/i386/64bit-avx.c: Generated.
3789 * features/i386/64bit-avx512.c: Generated.
3790 * features/i386/64bit-core.c: Generated.
3791 * features/i386/64bit-linux.c: Generated.
3792 * features/i386/64bit-mpx.c: Generated.
3793 * features/i386/64bit-pkeys.c: Generated.
3794 * features/i386/64bit-segments.c: Generated.
3795 * features/i386/64bit-sse.c: Generated.
3796 * features/i386/x32-core.c: Generated.
3797 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
3798 c files for amd64-linux and x32-linux.
3800 2017-09-05 Yao Qi <yao.qi@linaro.org>
3802 * amd64-linux-tdep.c (amd64_linux_read_description): New
3804 (amd64_linux_core_read_description): Call
3805 amd64_linux_read_description.
3806 (amd64_linux_init_abi): Likewise.
3807 (amd64_x32_linux_init_abi): Likewise.
3808 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
3809 * x86-linux-nat.c (x86_linux_read_description): Call
3810 amd64_linux_read_description.
3812 2017-09-05 Yao Qi <yao.qi@linaro.org>
3814 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
3817 2017-09-05 Yao Qi <yao.qi@linaro.org>
3819 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
3820 * features/i386/i386-avx-avx512-linux.c: Remove.
3821 * features/i386/i386-avx-linux.c: Remove.
3822 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
3823 * features/i386/i386-avx-mpx-linux.c: Remove.
3824 * features/i386/i386-linux.c: Remove.
3825 * features/i386/i386-mmx-linux.c: Remove.
3826 * features/i386/i386-mpx-linux.c: Remove.
3828 2017-09-05 Yao Qi <yao.qi@linaro.org>
3830 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
3831 (SFILES): Add arch/i386.c.
3832 (HFILES_NO_SRCDIR): Add arch/i386.h.
3833 * arch/i386.c: New file.
3834 * arch/i386.h: New file.
3835 * arch/tdesc.h (allocate_target_description): Declare.
3836 (set_tdesc_architecture): Declare.
3837 (set_tdesc_osabi): Declare.
3838 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
3839 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
3840 include arch/i386.h.
3841 (i386_linux_read_description): Remove code and call
3842 i386_create_target_description.
3843 (set_tdesc_architecture): New function.
3844 (set_tdesc_osabi): New function.
3845 * target-descriptions.h (allocate_target_description): Remove.
3847 2017-09-05 Yao Qi <yao.qi@linaro.org>
3849 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
3850 * target-descriptions.c (tdesc_create_feature): Likewise, and
3852 * features/i386/32bit-avx.c: Re-generated.
3853 * features/i386/32bit-avx512.c: Re-generated.
3854 * features/i386/32bit-core.c: Re-generated.
3855 * features/i386/32bit-linux.c: Re-generated.
3856 * features/i386/32bit-mpx.c: Re-generated.
3857 * features/i386/32bit-pkeys.c: Re-generated.
3858 * features/i386/32bit-sse.c: Re-generated.
3860 2017-09-05 Yao Qi <yao.qi@linaro.org>
3862 * regformats/regdef.h (struct reg): Override operator == and !=.
3864 2017-09-05 Yao Qi <yao.qi@linaro.org>
3866 * arch/tdesc.h: New file.
3867 * regformats/regdat.sh: Generate code using tdesc_create_reg.
3868 * target-descriptions.c: Update comments.
3869 * target-descriptions.h: Include "arch/tdesc.h". Remove the
3871 * features/i386/32bit-avx.c: Re-generated.
3872 * features/i386/32bit-avx512.c: Re-generated.
3873 * features/i386/32bit-core.c: Re-generated.
3874 * features/i386/32bit-linux.c: Re-generated.
3875 * features/i386/32bit-mpx.c: Re-generated.
3876 * features/i386/32bit-pkeys.c: Re-generated.
3877 * features/i386/32bit-sse.c: Re-generated.
3879 2017-09-05 Yao Qi <yao.qi@linaro.org>
3881 * regformats/regdat.sh: Update generated code.
3883 2017-09-05 Yao Qi <yao.qi@linaro.org>
3885 * regformats/regdat.sh: Adjust code order.
3887 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3889 * expprint.c (dump_subexp_body_standard): Use constant format
3890 string in fprintf_filtered call.
3892 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3894 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3896 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3898 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3900 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3902 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3904 * bsd-kvm.o: Define _KMEMUSER.
3905 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3906 * configure: Regenerate.
3908 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3910 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3911 * i386-fbsd-nat.c: Likewise.
3913 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3915 * unittests/array-view-selftests.c: Add include of <array>.
3917 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3919 * spu-tdep.c (flush_ea_cache): Add missing argument to
3920 call_function_by_hand.
3922 2017-09-04 Pedro Alves <palves@redhat.com>
3924 * NEWS (Safer support for debugging with no debug info): New.
3926 2017-09-04 Pedro Alves <palves@redhat.com>
3928 * c-exp.y (function_method, function_method_void): Add current
3929 instance flags to TYPE_INSTANCE.
3930 * dwarf2read.c (check_modifier): New.
3931 (compute_delayed_physnames): Assert that only C++ adds delayed
3932 physnames. Mark fn_fields as const/volatile depending on
3934 * eval.c (make_params): New type_instance_flags parameter. Use
3935 it as the new type's instance flags.
3936 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3937 flags element and pass it to make_params.
3938 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3939 instance flags element.
3940 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3941 * gdbtypes.h: Include "enum-flags.h".
3942 (type_instance_flags): New enum-flags type.
3943 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3944 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3945 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3946 (follow_type_instance_flags): New function.
3947 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3948 * parser-defs.h (follow_type_instance_flags): Declare.
3949 * valops.c (value_struct_elt_for_reference): const/volatile must
3952 2017-09-04 Pedro Alves <palves@redhat.com>
3954 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3955 function/method scopes; lookup the nested name as a function local
3958 2017-09-04 Pedro Alves <palves@redhat.com>
3960 (%type <voidval>): Add function_method.
3961 * c-exp.y (exp): New production for calls with no arguments.
3962 (function_method, function_method_void_or_typelist): New
3964 (exp): New production for "method()::static_var".
3965 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3966 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3967 Handle OP_FUNC_STATIC_VAR.
3968 * parse.c (operator_length_standard):
3969 Handle OP_FUNC_STATIC_VAR.
3971 2017-09-04 Pedro Alves <palves@redhat.com>
3973 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3975 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3977 * parse.c (operator_length_standard, operator_check_standard):
3979 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3981 2017-09-04 Pedro Alves <palves@redhat.com>
3983 * ax-gdb.c: Include "typeprint.h".
3984 (gen_expr_for_cast): New function.
3985 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3986 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3988 * dwarf2read.c (new_symbol_full): Fallback to int instead of
3989 nodebug_data_symbol.
3990 * eval.c: Include "typeprint.h".
3991 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3992 Error out if symbol has unknown type.
3993 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3994 evaluate_subexp_for_cast.
3995 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3997 (evaluate_subexp_for_cast): New function.
3998 * gdbtypes.c (init_nodebug_var_type): New function.
3999 (objfile_type): Use it to initialize types of variables with no
4001 * typeprint.c (error_unknown_type): New.
4002 * typeprint.h (error_unknown_type): New declaration.
4003 * compile/compile-c-types.c (convert_type_basic): Handle
4004 TYPE_CODE_ERROR; warn and fallback to int for variables with
4007 2017-09-04 Pedro Alves <palves@redhat.com>
4009 * eval.c (evaluate_var_value): New function, factored out from ...
4010 (evaluate_subexp_standard): ... here.
4012 2017-09-04 Pedro Alves <palves@redhat.com>
4014 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4015 Remove useless assignments to 'op'.
4017 2017-09-04 Pedro Alves <palves@redhat.com>
4019 * eval.c (eval_skip_value): New function.
4020 (evaluate_subexp_standard): Use it.
4022 2017-09-04 Pedro Alves <palves@redhat.com>
4024 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4025 function name from symbol/minsym and pass it to
4026 error_call_unknown_return_type.
4028 2017-09-04 Pedro Alves <palves@redhat.com>
4030 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4031 * ax-gdb.c (gen_msym_var_ref): New function.
4032 (gen_expr): Handle OP_VAR_MSYM_VALUE.
4033 * eval.c (evaluate_var_msym_value): New function.
4034 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4035 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4036 to call_function_by_hand.
4037 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4038 Handle OP_VAR_MSYM_VALUE.
4039 (union exp_element) <msymbol>: New field.
4040 * minsyms.h (struct type): Forward declare.
4041 (find_minsym_type_and_address): Declare.
4042 * parse.c (write_exp_elt_msym): New function.
4043 (write_exp_msymbol): Delete, refactored as ...
4044 (find_minsym_type_and_address): ... this new function.
4045 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4046 (operator_length_standard, operator_check_standard): Handle
4048 * std-operator.def (OP_VAR_MSYM_VALUE): New.
4050 2017-09-04 Pedro Alves <palves@redhat.com>
4052 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4053 TYPE_GNU_IFUNC specially here. Throw error if return type is
4055 * ada-typeprint.c (print_func_type): Handle functions with unknown
4057 * c-typeprint.c (c_type_print_base): Handle functions and methods
4058 with unknown return type.
4059 * compile/compile-c-symbols.c (convert_symbol_bmsym)
4060 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4061 * compile/compile-c-types.c: Include "objfiles.h".
4062 (convert_func): For functions with unknown return type, warn and
4064 * compile/compile-object-run.c (compile_object_run): Adjust call
4065 to call_function_by_hand_dummy.
4066 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4067 call_function_by_hand.
4068 * eval.c (evaluate_subexp_standard): Adjust calls to
4069 call_function_by_hand. Handle functions and methods with unknown
4070 return type. Pass expect_type to call_function_by_hand.
4071 * f-typeprint.c (f_type_print_base): Handle functions with unknown
4073 * gcore.c (call_target_sbrk): Adjust call to
4074 call_function_by_hand.
4075 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4076 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
4077 an integer address type instead of nodebug.
4078 * guile/scm-value.c (gdbscm_value_call): Adjust call to
4079 call_function_by_hand.
4080 * infcall.c (error_call_unknown_return_type): New function.
4081 (call_function_by_hand): New "default_return_type" parameter.
4083 (call_function_by_hand_dummy): New "default_return_type"
4084 parameter. Use it instead of defaulting to int. If there's no
4085 default and the return type is unknown, throw an error. If
4086 there's a default return type, and the called function has no
4087 debug info, then assume the function is prototyped.
4088 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4089 New "default_return_type" parameter.
4090 (error_call_unknown_return_type): New declaration.
4091 * linux-fork.c (call_lseek): Cast return type of lseek.
4092 (inferior_call_waitpid, checkpoint_command): Adjust calls to
4093 call_function_by_hand.
4094 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4095 calls to call_function_by_hand.
4096 * m2-typeprint.c (m2_procedure): Handle functions with unknown
4098 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4099 (value_nsstring, print_object_command): Adjust calls to
4100 call_function_by_hand.
4101 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4102 functions with unknown return type.
4103 (pascal_type_print_func_varspec_suffix): New function.
4104 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4105 TYPE_CODE_METHOD>: Use it.
4106 * python/py-value.c (valpy_call): Adjust call to
4107 call_function_by_hand.
4108 * rust-lang.c (rust_evaluate_funcall): Adjust call to
4109 call_function_by_hand.
4110 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4111 call_function_by_hand.
4112 * valops.c (value_allocate_space_in_inferior): Adjust call to
4113 call_function_by_hand.
4114 * typeprint.c (type_print_unknown_return_type): New function.
4115 * typeprint.h (type_print_unknown_return_type): New declaration.
4117 2017-09-04 Pedro Alves <palves@redhat.com>
4119 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4120 types with more than one parameter as prototyped.
4122 2017-09-04 Pedro Alves <palves@redhat.com>
4124 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4125 (disassemble_command): Use gdb_disassembly_flags instead of bare
4127 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4128 (dump_insns, do_mixed_source_and_assembly_deprecated)
4129 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4130 Use gdb_disassembly_flags instead of bare int.
4131 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4132 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4133 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4134 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
4135 (enum gdb_disassembly_flag): ... values of this new enumeration.
4136 (gdb_disassembly_flags): Define.
4138 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4139 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4140 gdb_disassembly_flags instead of bare int.
4141 * record-btrace.c (btrace_insn_history)
4142 (record_btrace_insn_history, record_btrace_insn_history_range)
4143 (record_btrace_insn_history_from): Use gdb_disassembly_flags
4144 instead of bare int.
4145 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4146 Use gdb_disassembly_flags instead of bare int.
4147 * target-debug.h (target_debug_print_gdb_disassembly_flags):
4149 * target-delegates.c: Regenerate.
4150 * target.c (target_insn_history, target_insn_history_from)
4151 (target_insn_history_range): Use gdb_disassembly_flags instead of
4153 * target.h: Include "disasm.h".
4154 (struct target_ops) <to_insn_history, to_insn_history_from,
4155 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4157 (target_insn_history, target_insn_history_from)
4158 (target_insn_history_range): Use gdb_disassembly_flags instead of
4161 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4163 * cli/cli-script.c (build_command_line): For if/while commands,
4164 check whether args is empty.
4166 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4168 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4169 (enum command_control_type): Likewise.
4170 (struct command_line): Likewise.
4171 (free_command_lines): Likewise.
4172 (struct command_lines_deleter): Likewise.
4173 (command_line_up): Likewise.
4174 (read_command_lines): Likewise.
4175 (read_command_lines_1): Likewise.
4176 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4177 (enum command_control_type): Likewise.
4178 (struct command_line): Likewise.
4179 (free_command_lines): Likewise.
4180 (struct command_lines_deleter): Likewise.
4181 (command_line_up): Likewise.
4182 (read_command_lines): Likewise.
4183 (read_command_lines_1): Likewise.
4184 * breakpoint.h: Include cli/cli-script.h.
4185 * extension-priv.h: Likewise.
4186 * gdbcmd.h: Likewise.
4188 2017-09-04 Pedro Alves <palves@redhat.com>
4190 * ada-lang.c (is_known_support_routine): Move sal declaration to
4191 where it is initialized.
4192 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4193 (parse_breakpoint_sals, decode_static_tracepoint_spec)
4194 (clear_command, update_static_tracepoint): Remove init_sal
4195 references. Move declarations closer to initializations.
4196 * cli/cli-cmds.c (list_command): Move sal declarations closer to
4198 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
4199 references. Move sal declarations closer to initializations.
4200 * frame.c (find_frame_sal): Return a symtab_and_line via function
4201 return instead of output parameter. Remove init_sal references.
4202 * frame.h (find_frame_sal): Return a symtab_and_line via function
4203 return instead of output parameter.
4204 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
4205 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
4207 (gdbscm_find_pc_line): Remove init_sal reference.
4208 * infcall.c (call_function_by_hand_dummy): Remove init_sal
4209 references. Move declarations closer to initializations.
4210 * infcmd.c (set_step_frame): Update. Move declarations closer to
4212 (finish_backward): Remove init_sal references. Move declarations
4213 closer to initializations.
4214 * infrun.c (process_event_stop_test, handle_step_into_function)
4215 (insert_hp_step_resume_breakpoint_at_frame)
4216 (insert_step_resume_breakpoint_at_caller): Likewise.
4217 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
4218 (symbol_to_sal): Likewise.
4219 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
4220 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
4221 to its initialization.
4222 * reverse.c (save_bookmark_command): Use new/delete. Remove
4223 init_sal references. Move declarations closer to initializations.
4224 * source.c (get_current_source_symtab_and_line): Remove brace
4226 (set_current_source_symtab_and_line): Now takes the sal by const
4227 reference. Remove brace initialization.
4228 (line_info): Remove init_sal reference.
4229 * source.h (set_current_source_symtab_and_line): Now takes a
4230 symtab_and_line via const reference.
4231 * stack.c (set_current_sal_from_frame): Adjust.
4232 (print_frame_info): Adjust.
4233 (get_last_displayed_sal): Return the sal via function return
4234 instead of via output parameter. Simplify.
4235 (frame_info): Adjust.
4236 * stack.h (get_last_displayed_sal): Return the sal via function
4237 return instead of via output parameter.
4238 * symtab.c (init_sal): Delete.
4239 (find_pc_sect_line): Remove init_sal references. Move
4240 declarations closer to initializations.
4241 (find_function_start_sal): Remove init_sal references. Move
4242 declarations closer to initializations.
4243 * symtab.h (struct symtab_and_line): In-class initialize all
4245 * tracepoint.c (set_traceframe_context)
4246 (print_one_static_tracepoint_marker): Remove init_sal references.
4247 Move declarations closer to initializations.
4248 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4249 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
4250 declarations closer to initializations.
4251 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4252 init_sal references. Adjust.
4254 2017-09-04 Pedro Alves <palves@redhat.com>
4256 * ax-gdb.c (agent_command_1): Use range-for.
4257 * break-catch-throw.c (re_set_exception_catchpoint): Update.
4258 * breakpoint.c: Include "common/array-view.h".
4259 (init_breakpoint_sal, create_breakpoint_sal): Change sals
4260 parameter from struct symtabs_and_lines to
4261 array_view<symtab_and_line>. Adjust. Use range-for. Update.
4262 (breakpoint_sals_to_pc): Change sals parameter from struct
4263 symtabs_and_lines to std::vector reference.
4264 (check_fast_tracepoint_sals): Change sals parameter from struct
4265 symtabs_and_lines to std::array_view. Use range-for.
4266 (decode_static_tracepoint_spec): Return a std::vector instead of
4267 symtabs_and_lines. Update.
4268 (create_breakpoint): Update.
4269 (break_range_command, until_break_command, clear_command): Update.
4270 (base_breakpoint_decode_location, bkpt_decode_location)
4271 (bkpt_probe_create_sals_from_location)
4272 (bkpt_probe_decode_location, tracepoint_decode_location)
4273 (tracepoint_probe_decode_location)
4274 (strace_marker_create_sals_from_location): Return a std::vector
4275 instead of symtabs_and_lines.
4276 (strace_marker_create_breakpoints_sal): Update.
4277 (strace_marker_decode_location): Return a std::vector instead of
4278 symtabs_and_lines. Update.
4279 (update_breakpoint_locations): Change struct symtabs_and_lines
4280 parameters to gdb::array_view. Adjust.
4281 (location_to_sals): Return a std::vector instead of
4282 symtabs_and_lines. Update.
4283 (breakpoint_re_set_default): Use std::vector instead of struct
4285 (decode_location_default): Return a std::vector instead of
4286 symtabs_and_lines. Update.
4287 * breakpoint.h: Include "common/array-view.h".
4288 (struct breakpoint_ops) <decode_location>: Now returns a
4289 std::vector instead of returning a symtabs_and_lines via output
4291 (update_breakpoint_locations): Change sals parameters to use
4293 * cli/cli-cmds.c (edit_command, list_command): Update to use
4294 std::vector and gdb::array_view.
4295 (ambiguous_line_spec): Adjust to use gdb::array_view and
4297 (compare_symtabs): Rename to ...
4298 (cmp_symtabs): ... this. Change parameters to symtab_and_line
4299 const reference and adjust.
4300 (filter_sals): Rewrite using std::vector and standard algorithms.
4301 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4302 (jump_command): Update to use std::vector.
4303 * linespec.c (struct linespec_state) <canonical_names>: Update
4305 (add_sal_to_sals_basic): Delete.
4306 (add_sal_to_sals, filter_results, convert_results_to_lsals)
4307 (decode_line_2, create_sals_line_offset)
4308 (convert_address_location_to_sals, convert_linespec_to_sals)
4309 (convert_explicit_location_to_sals, parse_linespec)
4310 (event_location_to_sals, decode_line_full, decode_line_1)
4311 (decode_line_with_current_source)
4312 (decode_line_with_last_displayed, decode_objc)
4313 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
4314 (linespec_result::~linespec_result): Adjust to use std::vector
4315 instead of symtabs_and_lines.
4316 * linespec.h (linespec_sals::sals): Now a std::vector.
4317 (struct linespec_result): Use std::vector, bool, and in-class
4319 (decode_line_1, decode_line_with_current_source)
4320 (decode_line_with_last_displayed): Return std::vector.
4321 * macrocmd.c (info_macros_command): Use std::vector.
4322 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
4323 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
4325 * probe.h (parse_probes): Return a std::vector.
4326 * python/python.c (gdbpy_decode_line): Use std::vector and
4328 * source.c (select_source_symtab, line_info): Use std::vector.
4329 * stack.c (func_command): Use std::vector.
4330 * symtab.h (struct symtabs_and_lines): Delete.
4331 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
4333 2017-09-04 Pedro Alves <palves@redhat.com>
4335 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4336 unittests/array-view-selftests.c.
4337 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
4338 * common/array-view.h: New file.
4339 * unittests/array-view-selftests.c: New file.
4341 2017-09-04 Pedro Alves <palves@redhat.com>
4343 * cli/cli-cmds.c (edit_command): Pass message to
4344 ambiguous_line_spec.
4345 (list_command): Pass message to ambiguous_line_spec. Say
4346 "first"/"last" instead of "start" and "end" to be consistent with
4348 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
4349 them to print formatted message.
4351 2017-09-04 Pedro Alves <palves@redhat.com>
4353 * btrace.c (ftrace_add_pt): Pass btrace_insn to
4354 ftrace_update_insns by reference instead of pointer.
4356 2017-09-04 Yao Qi <yao.qi@linaro.org>
4358 * i386-go32-tdep.c: Include x86-xstate.h.
4359 (i386_go32_init_abi): Call i386_target_description.
4360 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
4361 if xcr0 is X86_XSTATE_X87_MASK.
4362 * i386-tdep.h (tdesc_i386): Remove the declaration.
4363 (tdesc_i386_mmx): Likewise.
4365 2017-09-04 Yao Qi <yao.qi@linaro.org>
4367 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
4368 X86_XSTATE_SSE_MASK instead of 0.
4370 2017-09-04 Yao Qi <yao.qi@linaro.org>
4372 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
4373 i386_target_description.
4374 * i386-fbsd-nat.c (i386fbsd_read_description): Call
4375 i386_target_description.
4376 * i386-tdep.c (i386_gdbarch_init): Likewise.
4378 2017-09-04 Yao Qi <yao.qi@linaro.org>
4380 * amd64-darwin-tdep.c: Include "x86-xstate.h".
4381 (x86_darwin_init_abi_64): Call amd64_target_description.
4382 * amd64-dicos-tdep.c: Likewise.
4383 * amd64-fbsd-nat.c: Likewise.
4384 * amd64-fbsd-tdep.c: Likewise.
4385 * amd64-nbsd-tdep.c: Likewise.
4386 * amd64-obsd-tdep.c: Likewise.
4387 * amd64-sol2-tdep.c: Likewise.
4388 * amd64-windows-tdep.c: Likewise.
4389 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
4391 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4393 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
4394 (btrace_function) <insn>: Change type to use std::vector.
4395 * btrace.c (ftrace_debug, ftrace_call_num_insn,
4396 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
4397 ftrace_update_insns, ftrace_compute_global_level_offset,
4398 btrace_stitch_bts, btrace_clear, btrace_insn_get,
4399 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
4400 change to std::vector.
4401 (ftrace_update_insns): Adjust to change to std::vector, change
4402 type of INSN parameter.
4403 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
4404 * record-btrace.c (btrace_call_history_insn_range,
4405 btrace_compute_src_line_range,
4406 record_btrace_frame_prev_register): Adjust to change to
4408 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
4409 to change to std::vector.
4411 2017-09-03 Tom Tromey <tom@tromey.com>
4413 * corefile.c (reopen_exec_file): Use std::string.
4415 2017-09-03 Tom Tromey <tom@tromey.com>
4417 * compile/compile.c (compile_register_name_mangled): Return
4419 * compile/compile-loc2c.c (pushf_register_address): Update.
4420 (pushf_register): Update.
4421 * compile/compile-c-types.c (convert_array): Update.
4422 * compile/compile-c-symbols.c (generate_vla_size): Update.
4423 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
4424 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
4425 (convert_one_symbol): Update.
4426 (generate_c_for_for_one_variable): Update.
4427 * compile/compile-c-support.c (c_get_range_decl_name): Return a
4429 (generate_register_struct): Update.
4430 * compile/compile-internal.h (c_get_range_decl_name): Return a
4432 (compile_register_name_mangled): Return std::string.
4434 2017-09-03 Tom Tromey <tom@tromey.com>
4436 * utils.c (perror_string): Return a std::string.
4437 (throw_perror_with_name, perror_warning_with_name): Update.
4439 2017-09-03 Tom Tromey <tom@tromey.com>
4441 * demangle.c (demangle_command): Use std::string,
4444 2017-09-03 Tom Tromey <tom@tromey.com>
4446 * cli/cli-setshow.c (do_set_command): Use std::string.
4448 2017-09-03 Tom Tromey <tom@tromey.com>
4450 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
4452 2017-09-03 Tom Tromey <tom@tromey.com>
4454 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
4456 2017-09-03 Tom Tromey <tom@tromey.com>
4458 * mi/mi-cmd-env.c (env_execute_cli_command): Use
4459 gdb::unique_xmalloc_ptr.
4461 2017-09-03 Tom Tromey <tom@tromey.com>
4463 * thread.c (print_thread_info_1): Use string_printf.
4464 (thread_apply_command, thread_apply_all_command): Use
4467 2017-09-03 Tom Tromey <tom@tromey.com>
4469 * valprint.c (val_print_string): Update.
4470 * gdbcore.h (memory_error_message): Return std::string.
4471 * corefile.c (memory_error_message): Return std::string.
4472 (memory_error): Update.
4473 * breakpoint.c (insert_bp_location): Update.
4475 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4477 * target/waitstatus.h (target_waitstatus_to_string): Change
4478 return type to std::string.
4479 * target/waitstatus.c (target_waitstatus_to_string): Return
4481 * target.h (target_waitstatus_to_string): Remove declaration.
4482 * infrun.c (resume, clear_proceed_status_thread,
4483 print_target_wait_results, do_target_wait, save_waitstatus,
4484 stop_all_threads): Adjust.
4485 * record-btrace.c (record_btrace_wait): Adjust.
4487 (target_debug_print_struct_target_waitstatus_p): Adjust.
4489 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4492 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
4495 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4497 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
4498 for setting/unsetting environment variables on the remote target.
4499 (New remote packets): Add entries for QEnvironmentHexEncoded,
4500 QEnvironmentUnset and QEnvironmentReset.
4501 * common/environ.c (gdb_environ::operator=): Extend method to
4502 handle m_user_set_env_list and m_user_unset_env_list.
4503 (gdb_environ::clear): Likewise.
4504 (match_var_in_string): Change type of first parameter from 'char
4505 *' to 'const char *'.
4506 (gdb_environ::set): Extend method to handle
4507 m_user_set_env_list and m_user_unset_env_list.
4508 (gdb_environ::unset): Likewise.
4509 (gdb_environ::clear_user_set_env): New method.
4510 (gdb_environ::user_set_envp): Likewise.
4511 (gdb_environ::user_unset_envp): Likewise.
4512 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
4513 m_user_unset_env_list on move constructor/assignment.
4514 (unset): Add new default parameter 'update_unset_list = true'.
4515 (clear_user_set_env): New method.
4516 (user_set_envp): Likewise.
4517 (user_unset_envp): Likewise.
4518 (m_user_set_env_list): New std::set.
4519 (m_user_unset_env_list): Likewise.
4520 * common/rsp-low.c (hex2str): New function.
4521 (bin2hex): New overload for bin2hex function.
4522 * common/rsp-low.c (hex2str): New prototype.
4523 (str2hex): New overload prototype.
4524 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
4525 QEnvironmentUnset and QEnvironmentReset.
4526 (remote_protocol_features): Add QEnvironmentHexEncoded,
4527 QEnvironmentUnset and QEnvironmentReset packets.
4528 (send_environment_packet): New function.
4529 (extended_remote_environment_support): Likewise.
4530 (extended_remote_create_inferior): Call
4531 extended_remote_environment_support.
4532 (_initialize_remote): Add QEnvironmentHexEncoded,
4533 QEnvironmentUnset and QEnvironmentReset packet configs.
4534 * unittests/environ-selftests.c (gdb_selftest_env_var):
4536 (test_vector_initialization): New function.
4537 (test_init_from_host_environ): Likewise.
4538 (test_reinit_from_host_environ): Likewise.
4539 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
4541 (test_unset_set_empty_vector): Likewise.
4542 (test_vector_clear): Likewise.
4543 (test_std_move): Likewise.
4544 (test_move_constructor):
4545 (test_self_move): Likewise.
4546 (test_set_unset_reset): Likewise.
4547 (run_tests): Rewrite in terms of the functions above.
4549 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
4551 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
4552 (adi_available): Use a temp variable of type CORE_ADDR as argument
4553 3 when calling target_auxv_search.
4554 (adi_normalize_address): Use masks and xor operators to calculate
4556 (adi_read_versions, adi_write_versions, adi_print_versions)
4557 (do_examine, do_assign): Use paddress.
4559 2017-08-29 John Baldwin <jhb@FreeBSD.org>
4561 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
4562 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
4563 out of loop and add supply of FIR.
4564 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
4567 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
4570 * cli/cli-script.c (define_command): Don't convert command name
4573 2017-08-25 Joel Brobecker <brobecker@adacore.com>
4575 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
4576 Update all callers accordingly. Remove all code blocks handling
4577 the case where DISPP is not NULL.
4579 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4582 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
4583 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4584 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
4586 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4588 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
4589 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
4590 (read_comp_units_from_section): New parameter abbrev_section, use
4591 read_and_check_comp_unit_head, allocate signatured_type if needed.
4592 (create_all_comp_units): Update read_comp_units_from_section caller.
4594 2017-08-23 Pedro Alves <palves@redhat.com>
4597 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
4598 to null_ptid and switch to thread without reading the registers
4599 after adding the inferior.
4601 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
4603 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
4605 * compile/compile.c (compile_gcc, show_compile_gcc): New.
4606 (compile_to_object): Implement compile_gcc.
4607 (_initialize_compile): Install "set compile-gcc". Initialize
4610 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
4612 * compile/compile.c (compile_to_object): Conditionally call
4613 set_verbose. Conditionally call compile or compile_v0.
4615 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
4617 * sparc64-tdep.h: (adi_normalize_address): New export.
4618 * sparc-nat.h: (open_adi_tag_fd): New export.
4619 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
4620 * sparc64-linux-tdep.c:
4621 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
4622 (sparc64_linux_handle_segmentation_fault): New function.
4623 (sparc64_linux_init_abi): Register
4624 sparc64_linux_handle_segmentation_fault
4625 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
4626 (sparc64_addr_bits_remove): New function.
4627 (sparc64_init_abi): Register sparc64_addr_bits_remove.
4628 (MAX_PROC_NAME_SIZE): New macro.
4629 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
4630 (sparc64adilist): New variable.
4631 (adi_proc_list): New variable.
4632 (find_adi_info): New function.
4633 (add_adi_info): New function.
4634 (get_adi_info_proc): New function.
4635 (get_adi_info): New function.
4636 (info_adi_command): New function.
4637 (read_maps_entry): New function.
4638 (adi_available): New function.
4639 (adi_normalize_address): New function.
4640 (adi_align_address): New function.
4641 (adi_convert_byte_count): New function.
4642 (adi_tag_fd): New function.
4643 (adi_is_addr_mapped): New function.
4644 (adi_read_versions): New function.
4645 (adi_write_versions): New function.
4646 (adi_print_versions): New function.
4647 (do_examine): New function.
4648 (do_assign): New function.
4649 (adi_examine_command): New function.
4650 (adi_assign_command): New function.
4651 (_initialize_sparc64_adi_tdep): New function.
4653 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
4655 * breakpoint.c (breakpoints_info): Rename to ...
4656 (info_breakpoints_command): ... this.
4657 (watchpoints_info): Rename to ...
4658 (info_watchpoints_command): ... this.
4659 (tracepoints_info): Rename to ...
4660 (info_tracepoints_command): ... this.
4661 (_initialize_breakpoint): Adjust.
4662 * dcache.c (dcache_info): Rename to ...
4663 (info_display_command): ... this.
4664 (_initialize_dcache): Adjust.
4665 * frame.h (args_info): Rename to ...
4666 (info_args_command): ... this.
4667 (locals_info): Rename to ...
4668 (info_locals_command): ... this.
4669 * infcmd.c (nofp_registers_info): Rename to ...
4670 (info_registers_command): ... this.
4671 (float_info): Rename to ...
4672 (info_float_command): ... this.
4673 (program_info): Rename to ...
4674 (info_program_command): ... this.
4675 (all_registers_info): Rename to ...
4676 (info_all_registers_command): ... this.
4677 (vector_info): Rename to ...
4678 (info_vector_command): ... this.
4679 (float_info): Rename to ...
4680 (info_float_command): ... this.
4681 (_initialize_infcmd): Adjust.
4682 * inferior.h (term_info): Rename to ...
4683 (info_terminal_command): ... this.
4684 * inflow.c (term_info): Rename to ...
4685 (info_terminal_command): ... this.
4686 (_initialize_inflow): Adjust.
4687 * infrun.c (signals_info): Rename to ...
4688 (info_signals_command): ... this.
4689 (_initialize_infrun): Adjust.
4690 * objc-lang.c (classes_info): Rename to ...
4691 (info_classes_command): ... this.
4692 (selectors_info): Rename to ...
4693 (info_selectors_command): ... this.
4694 (_initialize_objc_language): Adjust.
4695 * printcmd.c (sym_info): Rename to ...
4696 (info_symbol_command): ... this.
4697 (address_info): Rename to ...
4698 (info_address_command): ... this.
4699 (display_info): Rename to ...
4700 (info_display_command): ... this.
4701 (_initialize_printcmd): Adjust.
4702 * reverse.c (bookmarks_info): Rename to ...
4703 (info_breakpoints_command): ... this.
4704 (_initialize_reverse): Adjust.
4705 * ser-go32.c (dos_info): Rename to ...
4706 (info_serial_command): ... this.
4707 (_initialize_ser_dos): Adjust.
4708 * skip.c (skip_info): Rename to ...
4709 (info_skip_command): ... this.
4710 (_initialize_step_skip): Adjust.
4711 * source.c (line_info): Rename to ...
4712 (info_line_command): ... this.
4713 (source_info): Rename to ...
4714 (info_source_command)
4715 * stack.c (frame_info): Rename to ...
4716 (info_frame_command): ... this.
4717 (locals_info): Rename to ...
4718 (info_locals_command): ... this.
4719 (args_info): Rename to ...
4720 (info_args_command): ... this.
4721 (_initialize_stack): Adjust.
4722 * symtab.c (sources_info): Rename to ...
4723 (info_sources_command): ... this.
4724 (variables_info): Rename to ...
4725 (info_variables_command): ... this.
4726 (functions_info): Rename to ...
4727 (info_functions_command): ... this.
4728 (types_info): Rename to ...
4729 (info_types_command): ... this.
4730 (_initialize_symtab): Adjust.
4731 * target.c (target_info): Rename to ...
4732 (info_target_command): ... this.
4733 (initialize_targets): Adjust.
4734 * tracepoint.c (tvariables_info): Rename to ...
4735 (info_tvariables_command): ... this.
4736 (scope_info): Rename to ...
4737 (info_scope_command): ... this.
4738 (trace_dump_actions): Adjust.
4739 (_initialize_tracepoint): Adjust.
4741 2017-08-22 Tom Tromey <tom@tromey.com>
4743 * breakpoint.h (install_breakpoint): Update.
4744 * breakpoint.c (add_solib_catchpoint): Update.
4745 (install_breakpoint): Change argument to a std::unique_ptr.
4746 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
4747 (create_breakpoint_sal, create_breakpoint): Update.
4748 (watch_command_1, catch_exec_command_1)
4749 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
4750 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
4751 Return the breakpoint.
4752 (set_raw_breakpoint_without_location, set_raw_breakpoint)
4753 (new_single_step_breakpoint): Update.
4754 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
4756 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4758 * break-catch-sig.c (create_signal_catchpoint): Use
4760 * ada-lang.c (create_ada_exception_catchpoint): Use
4763 2017-08-22 Tom Tromey <tom@tromey.com>
4765 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
4767 2017-08-22 Tom Tromey <tom@tromey.com>
4769 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
4770 (lookup_partial_symbol): Update.
4772 2017-08-22 Tom Tromey <tom@tromey.com>
4774 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
4775 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
4776 (find_and_open_source, symtab_to_fullname): Update.
4777 * psymtab.c (psymtab_to_fullname): Update.
4779 2017-08-22 Tom Tromey <tom@tromey.com>
4781 * exec.c (exec_file_attach): Update.
4782 * linux-thread-db.c (try_thread_db_load): Update.
4783 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
4784 * utils.c (gdb_realpath): Change return type.
4785 (gdb_realpath_keepfile): Update.
4786 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
4787 (_initialize_utils): Register the new self test.
4788 * source.c (openp): Update.
4789 (find_and_open_source): Update.
4790 * nto-tdep.c (nto_find_and_open_solib): Update.
4791 * main.c (set_gdb_data_directory): Update.
4792 (captured_main_1): Update.
4793 * dwarf2read.c (dwarf2_get_dwz_file): Update
4794 (dw2_map_symbol_filenames): Update.
4795 * auto-load.c (auto_load_safe_path_vec_update): Update.
4796 (filename_is_in_auto_load_safe_path_vec): Change type of
4798 (auto_load_objfile_script): Update.
4799 (file_is_auto_load_safe): Update. Use std::string.
4800 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
4802 2017-08-22 Tom Tromey <tom@tromey.com>
4804 * utils.c (gdb_realpath_keepfile): Return a
4805 gdb::unique_xmalloc_ptr.
4806 * exec.c (exec_file_attach): Update.
4807 * utils.h (gdb_realpath_keepfile): Return a
4808 gdb::unique_xmalloc_ptr.
4810 2017-08-22 Tom Tromey <tom@tromey.com>
4812 * compile/compile.c (compile_file_command): Use
4813 gdb::unique_xmalloc_ptr, std::string.
4814 * utils.c (gdb_abspath): Change return type.
4815 * source.c (openp): Update.
4816 * objfiles.c (allocate_objfile): Update.
4817 * main.c (set_gdb_data_directory): Update.
4818 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
4820 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
4822 * cli-cmds.c (list_commands): List actual code around more than
4825 2017-08-21 John Baldwin <jhb@FreeBSD.org>
4827 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
4829 2017-08-21 Pedro Alves <palves@redhat.com>
4832 * c-exp.y (variable production): Handle function aliases.
4833 * minsyms.c (msymbol_is_text): New function.
4834 * minsyms.h (msymbol_is_text): Declare.
4835 * symtab.c (find_function_alias_target): New function.
4836 * symtab.h (find_function_alias_target): Declare.
4838 2017-08-21 Pedro Alves <palves@redhat.com>
4840 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
4842 * typeprint.c (whatis_exp): If handling "whatis", and expression
4843 is OP_TYPE, strip one typedef level. Otherwise don't strip
4845 * valops.c (value_cast): Save "to" type before resolving
4846 stubs/typedefs. Use that type as resulting value's type.
4848 2017-08-18 Tom Tromey <tom@tromey.com>
4849 Pedro Alves <palves@redhat.com>
4851 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
4852 * sol-thread.c (sol_thread_resume, sol_thread_wait)
4853 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4854 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4855 * proc-service.c (ps_xfer_memory): Use scoped_restore.
4856 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4857 (linux_get_siginfo_data): Add "thread" argument. Use
4859 * linux-nat.c (linux_child_follow_fork)
4860 (check_stopped_by_watchpoint): Use scoped_restore.
4861 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4862 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4863 (restore_inferior_ptid, save_inferior_ptid): Remove.
4864 * btrace.c (btrace_fetch): Use scoped_restore.
4865 * bsd-uthread.c (bsd_uthread_fetch_registers)
4866 (bsd_uthread_store_registers): Use scoped_restore.
4867 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4869 * aix-thread.c (aix_thread_resume, aix_thread_wait)
4870 (aix_thread_xfer_partial): Use scoped_restore.
4871 * inferior.h (save_inferior_ptid): Remove.
4873 2017-08-18 Yao Qi <yao.qi@linaro.org>
4876 * arm-tdep.c (gdb_print_insn_arm): Mark
4877 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4879 2017-08-18 Yao Qi <yao.qi@linaro.org>
4881 * NEWS: Mention GDBserver's new option "--selftest".
4882 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4883 * selftest.c: Move it to common/selftest.c.
4884 * selftest.h: Move it to common/selftest.h.
4885 * selftest-arch.c (reset): New function.
4886 (tests_with_arch): Call reset.
4888 2017-08-18 Yao Qi <yao.qi@linaro.org>
4890 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
4891 instead of exception_fprintf and printf_filtered.
4893 2017-08-18 Yao Qi <yao.qi@linaro.org>
4895 * selftest.c (register_self_test): Rename it to
4896 selftests::register_test.
4897 (run_self_tests): selftest::run_tests.
4898 * selftest.h: Update declarations.
4899 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4900 selftests::register_test_foreach_arch.
4901 * selftest-arch.h: Update declaration.
4902 * aarch64-tdep.c: Update.
4903 * arm-tdep.c: Likewise.
4904 * disasm-selftests.c: Likewise.
4905 * dwarf2loc.c: Likewise.
4906 * dwarf2-frame.c: Likewise.
4907 * findvar.c: Likewise.
4908 * gdbarch-selftests.c: Likewise.
4909 * maint.c (maintenance_selftest): Likewise.
4910 * regcache.c: Likewise.
4911 * rust-exp.y: Likewise.
4912 * selftest-arch.c: Likewise.
4913 * unittests/environ-selftests.c: Likewise.
4914 * unittests/function-view-selftests.c: Likewise.
4915 * unittests/offset-type-selftests.c: Likewise.
4916 * unittests/optional-selftests.c: Likewise.
4917 * unittests/scoped_restore-selftests.c: Likewise.
4918 * utils-selftests.c: Likewise.
4920 2017-08-17 Pedro Alves <palves@redhat.com>
4922 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4925 2017-08-17 Pedro Alves <palves@redhat.com>
4927 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4929 (reset_die_in_process): Delete, replaced by ...
4930 (process_die_scope): ... this new class. Make it responsible for
4931 freeing cu->line_header too.
4932 (process_die): Use process_die_scope.
4933 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4934 cu->line_header_die_owner. Don't release the line header if it's
4936 (setup_type_unit_groups): Make the CU/DIE own the line header.
4937 Don't release the line header here.
4939 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
4941 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4943 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
4945 * NEWS: Mention new shortcuts for nexti and stepi in TUI
4948 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
4950 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4953 2017-08-15 Stafford Horne <shorne@gmail.com>
4955 * MAINTAINERS (Write After Approval): Add Stafford Horne.
4957 2017-08-15 Stafford Horne <shorne@gmail.com>
4959 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4961 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
4964 * infcmd.c (unset_environment_command): Use the 'clear' method on
4965 the environment instead of resetting it.
4967 2017-08-15 John Baldwin <jhb@FreeBSD.org>
4969 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4972 2017-08-14 Tom Tromey <tom@tromey.com>
4974 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4975 (print_binary_chars): Likewise.
4976 (BITS_IN_BYTES): Remove.
4978 2017-08-14 Tom Tromey <tom@tromey.com>
4981 * valprint.c (LOW_ZERO): Change value to 034.
4982 (print_octal_chars): Add static_asserts for octal constants.
4983 * printcmd.c (print_scalar_formatted): Add 'd' case.
4985 2017-08-11 Tom Tromey <tom@tromey.com>
4987 * symfile.c (add_symbol_file_command): Use std::vector.
4989 2017-08-14 Tom Tromey <tom@tromey.com>
4991 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4992 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4994 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4996 2017-08-11 Pedro Alves <palves@redhat.com>
4998 * infrun.c (process_event_stop_test): Adjust
4999 function_name_is_marked_for_skip call.
5000 * skip.c: Include <list>.
5001 (skiplist_entry): Make it a class with private fields, and
5003 (skiplist_entry_chain): Delete.
5004 (skiplist_entries): New.
5005 (skiplist_entry_count): Delete.
5006 (highest_skiplist_entry_num): New.
5007 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5008 (add_skiplist_entry): Delete.
5009 (skiplist_entry::skiplist_entry): New.
5010 (skiplist_entry::add_entry): New.
5011 (skip_file_command, skip_function): Adjust.
5012 (compile_skip_regexp): Delete.
5013 (skip_command): Don't compile regexp here. Adjust to use
5014 skiplist_entry::add_entry.
5015 (skip_info): Adjust to use range-for and getters.
5016 (skip_enable_command, skip_disable_command): Adjust to use
5017 range-for and setters.
5018 (skip_delete_command): Adjust to use std::list.
5019 (add_skiplist_entry): Delete.
5020 (skip_file_p): Delete, refactored as ...
5021 (skiplist_entry::do_skip_file_p): ... this new method.
5022 (skip_gfile_p): Delete, refactored as ...
5023 (skiplist_entry::do_gskip_file_p): ... this new method.
5024 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5025 (skiplist_entry::skip_function_p): ... this new method.
5026 (function_name_is_marked_for_skip): Now returns bool, and takes
5027 the function sal by const reference. Adjust to use range-for and
5028 skiplist_entry methods.
5029 (_initialize_step_skip): Remove references to
5030 skiplist_entry_chain, skiplist_entry_count.
5031 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5032 takes the function sal by const reference.
5034 2017-08-11 Yao Qi <yao.qi@linaro.org>
5036 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5037 (dwarf2_frame_cache): Remove reset_cache_cleanup.
5038 (dwarf2_frame_cache):
5039 * frame-unwind.c (frame_unwind_try_unwinder): Catch
5040 RETURN_MASK_ALL and set *this_case to NULL.
5041 * frame-unwind.h: Update comments.
5043 2017-08-11 Yao Qi <yao.qi@linaro.org>
5045 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5046 (dwarf2_frame_state_copy_regs): Remove.
5047 (dwarf2_frame_state_free_regs): Remove.
5048 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5049 (dwarf2_restore_rule): Call method .alloc_regs instead of
5050 dwarf2_frame_state_alloc_regs.
5051 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
5052 constructor. Call std::move.
5053 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5054 (dwarf2_frame_cache): Likewise.
5056 [GDB_SELF_TEST]: Include selftest.h and
5058 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5059 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5060 execute_cfa_program_test.
5062 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5063 copy ctor, assignment operator, move assignment.
5064 <alloc_regs>: New method.
5066 (struct dwarf2_frame_state): Delete dtor.
5067 (dwarf2_frame_state_alloc_regs): Remove declaration.
5068 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5069 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5071 2017-08-11 Yao Qi <yao.qi@linaro.org>
5073 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5074 (dwarf2_frame_state::dwarf2_frame_state): New.
5075 (dwarf2_frame_state::~dwarf2_frame_state): New.
5076 (dwarf2_fetch_cfa_info): Update.
5077 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
5078 rather than a pointer. Update code.
5079 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5081 <data_align, code_align, retaddr_column>: Change them to const.
5082 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5085 2017-08-11 Yao Qi <yao.qi@linaro.org>
5087 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5088 <loc.exp>: New field.
5089 * dwarf2-frame.c (execute_cfa_program): Update.
5090 (dwarf2_frame_prev_register): Update.
5092 2017-08-10 Pedro Alves <palves@redhat.com>
5094 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5096 2017-08-09 John Baldwin <jhb@FreeBSD.org>
5098 * fbsd-nat.c (struct fbsd_fork_info): Remove.
5099 (fbsd_pending_children): Use std::list.
5100 (fbsd_remember_child): Likewise.
5101 (fbsd_is_child_pending): Likewise.
5102 (fbsd_pending_vfork_done): Use std::forward_list.
5103 (fbsd_add_vfork_done): Likewise.
5104 (fbsd_is_vfork_done_pending): Likewise.
5105 (fbsd_next_vfork_done): Likewise.
5107 2017-08-09 John Baldwin <jhb@FreeBSD.org>
5109 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5110 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5111 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5113 (fbsd_xfer_partial): Use gdb::byte_vector.
5114 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
5116 2017-08-09 John Baldwin <jhb@FreeBSD.org>
5118 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5120 (fbsd_find_memory_regions): Fix `mapfile' initialization.
5122 2017-08-09 Tom Tromey <tom@tromey.com>
5124 * skip.c (skiplist_entry): New constructor.
5125 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5126 (skiplist_entry::file_is_glob): Now bool.
5127 (skiplist_entry::file, skiplist_entry::function): Now
5129 (make_skip_entry): Return a unique_ptr. Use new.
5130 (free_skiplist_entry, free_skiplist_entry_cleanup)
5131 (make_free_skiplist_entry_cleanup): Remove.
5132 (skip_command, skip_disable_command, add_skiplist_entry)
5133 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5134 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5135 (function_name_is_marked_for_skip): Update.
5136 (skip_delete_command): Update. Use delete.
5138 2017-08-09 Jiong Wang <jiong.wang@arm.com>
5140 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5141 (aarch64_linux_core_read_description): New function.
5142 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5144 2017-08-09 Pedro Alves <palves@redhat.com>
5146 * cp-name-parser.y (cp_comp_to_string): Return a
5147 gdb::unique_xmalloc_ptr<char>.
5148 * cp-support.c (replace_typedefs_qualified_name)
5149 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5150 (cp_canonicalize_string_full): Use op= instead of explicit
5152 (cp_class_name_from_physname, method_name_from_physname)
5153 (cp_func_name, cp_remove_params): Adjust to use
5154 gdb::unique_xmalloc_ptr<char>.
5155 * cp-support.h (cp_comp_to_string): Return a
5156 gdb::unique_xmalloc_ptr<char>.
5157 * python/py-type.c (typy_lookup_type): Adjust to use
5158 gdb::unique_xmalloc_ptr<char>.
5160 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
5162 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5164 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
5165 Yao Qi <yao.qi@linaro.org>
5167 * cp-support.c (cp_canonicalize_string_full): Use
5168 gdb::unique_xmalloc_ptr<char>.
5169 (cp_canonicalize_string): Likewise.
5171 2017-08-09 Yao Qi <yao.qi@linaro.org>
5173 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5174 * regformats/i386/amd64-avx-avx512.dat: Remove.
5175 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5176 * regformats/i386/amd64-avx-mpx.dat:Remove.
5177 * regformats/i386/amd64-avx.dat: Remove.
5178 * regformats/i386/amd64-mpx.dat: Remove.
5179 * regformats/i386/i386-avx-avx512.dat: Remove.
5180 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5181 * regformats/i386/i386-avx-mpx.dat: Remove.
5182 * regformats/i386/i386-mmx.dat: Remove.
5183 * regformats/i386/i386-mpx.dat: Remove.
5185 2017-08-09 Yao Qi <yao.qi@linaro.org>
5187 * amd64-tdep.h (tdesc_x32): Remove the declaration.
5188 * amd64-tdep.c: Don't include features/i386/x32*.c.
5189 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5191 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5192 and i386/x32-avx-avx512.
5193 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5195 * features/i386/x32-avx-avx512.c: Removed.
5196 * features/i386/x32-avx-avx512.xml: Removed.
5197 * features/i386/x32-avx.c: Removed.
5198 * features/i386/x32-avx.xml: Removed.
5199 * features/i386/x32.c: Removed.
5200 * features/i386/x32.xml: Removed.
5201 * regformats/i386/x32-avx-avx512.dat: Removed.
5202 * regformats/i386/x32-avx.dat: Removed.
5203 * regformats/i386/x32.dat: Removed.
5205 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5207 PR breakpoints/21886
5208 * mem-break.c (default_memory_insert_breakpoint): Use
5209 `->placed_address' rather than `->reqstd_address' for the
5210 breakpoint location.
5212 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5214 * arch-utils.c (default_print_insn): Remove arch/mach/endian
5217 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5219 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
5220 a union of `tdep_info', `tdesc_data' and `id'.
5221 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5222 rather than `info.tdep_info'.
5223 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5224 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5225 * i386-tdep.c (i386_gdbarch_init): Likewise.
5226 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5227 * mips-tdep.c (mips_gdbarch_init): Likewise.
5228 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5229 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5230 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5232 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5234 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5235 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5237 * spu-tdep.c (spu_gdbarch_init): Likewise.
5238 * gdbarch.h: Regenerate.
5240 2017-08-07 Leszek Swirski <leszeks@google.com>
5243 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5245 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
5247 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5248 (gdbsim_open): Rename gdb_argv args object to argv.
5250 2017-08-05 Tom Tromey <tom@tromey.com>
5252 * compile/compile-object-load.c (compile_object_load): Use
5253 gdb::unique_xmalloc_ptr.
5254 * cli/cli-dump.c (scan_filename): Rename from
5255 scan_filename_with_cleanup. Change return type.
5256 (scan_expression): Rename from scan_expression_with_cleanup.
5258 (dump_memory_to_file, dump_value_to_file, restore_command):
5259 Use gdb::unique_xmalloc_ptr. Update.
5260 * cli/cli-cmds.c (find_and_open_script): Use
5261 gdb::unique_xmalloc_ptr.
5262 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5263 * symmisc.c (maintenance_print_symbols)
5264 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5265 * symfile.c (symfile_bfd_open, generic_load)
5266 (add_symbol_file_command, remove_symbol_file_command): Use
5267 gdb::unique_xmalloc_ptr.
5268 * source.c (openp): Use gdb::unique_xmalloc_ptr.
5269 * psymtab.c (maintenance_print_psymbols): Use
5270 gdb::unique_xmalloc_ptr.
5271 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5272 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5273 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5274 (reload_shared_libraries_1): Likewise.
5276 2017-08-05 Tom Tromey <tom@tromey.com>
5278 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5279 (rust_op_vector, rust_set_vector): New typedefs.
5280 (current_parser): New global.
5281 (work_obstack): Change to pointer type. Update all users.
5282 (rust_ast, pstate): Remove globals.
5283 (struct rust_parser): New.
5284 (%union) <params, field_inits>: Change type.
5285 (start, tuple_expr, unit_expr, struct_expr_list, literal)
5286 (field_expr, expr_list, maybe_expr_list, type_list): Update.
5287 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5288 (convert_params_to_types, convert_params_to_expression): Change
5290 (ast_string): Change type of "fields".
5291 (rust_parse): Make a rust_parser. Remove cleanups.
5292 (rust_lex_tests): Make and install an auto_obstack.
5294 2017-08-04 Yao Qi <yao.qi@linaro.org>
5296 * configure.srv (ipa_x32_linux_regobj): New.
5297 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
5298 instead of X86_TDESC_AVX512.
5299 (initialize_low_tracepoint): Call
5300 init_registers_x32_avx_avx512_linux.
5302 2017-08-04 Yao Qi <yao.qi@linaro.org>
5304 * utils.h (gdb_argv): Add namespace std for nullptr_t.
5306 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
5308 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
5310 2017-08-03 Tom Tromey <tom@tromey.com>
5312 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
5314 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
5316 2017-08-03 Tom Tromey <tom@tromey.com>
5318 * python/py-param.c (compute_enum_values): Use gdb_argv.
5320 2017-08-03 Tom Tromey <tom@tromey.com>
5322 * utils.h (struct gdb_argv_deleter): New.
5323 (gdb_argv): New class.
5324 * utils.c (gdb_argv::reset): New method.
5325 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
5326 * tracefile.c (tsave_command): Use gdb_argv.
5327 * top.c (new_ui_command): Use gdb_argv.
5328 * symmisc.c (maintenance_print_symbols)
5329 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
5330 * symfile.c (symbol_file_command, generic_load)
5331 (remove_symbol_file_command): Use gdb_argv.
5332 * stack.c (backtrace_command): Use gdb_argv.
5333 * source.c (add_path, show_substitute_path_command)
5334 (unset_substitute_path_command, set_substitute_path_command):
5336 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
5337 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
5338 * remote.c (extended_remote_run, remote_put_command)
5339 (remote_get_command, remote_delete_command): Use gdb_argv.
5340 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
5341 (gdbsim_open): Use gdb_argv.
5342 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
5343 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
5344 * procfs.c (procfs_info_proc): Use gdb_argv.
5345 * interps.c (interpreter_exec_cmd): Use gdb_argv.
5346 * infrun.c (handle_command): Use gdb_argv.
5347 * inferior.c (add_inferior_command, clone_inferior_command):
5349 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
5350 * exec.c (exec_file_command): Use gdb_argv.
5351 * cli/cli-cmds.c (alias_command): Use gdb_argv.
5352 * compile/compile.c (build_argc_argv): Use gdb_argv.
5354 2017-08-03 Tom Tromey <tom@tromey.com>
5356 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
5358 2017-08-03 Tom Tromey <tom@tromey.com>
5360 * python/python.c (compute_python_string): Return std::string.
5361 (gdbpy_eval_from_control_command): Update.
5362 (do_start_initialization): Use std::string.
5363 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
5365 * python/py-breakpoint.c (local_setattro): Use string_printf, not
5368 2017-08-03 Tom Tromey <tom@tromey.com>
5370 * top.h (do_restore_instream_cleanup): Remove.
5371 * top.c (do_restore_instream_cleanup): Remove.
5372 (read_command_file): Use scoped_restore.
5373 * cli/cli-script.c (execute_user_command): Use scoped_restore.
5375 2017-08-03 Tom Tromey <tom@tromey.com>
5377 * cli/cli-script.c (execute_user_command)
5378 (execute_control_command): Use scoped_restore.
5380 2017-08-03 Tom Tromey <tom@tromey.com>
5382 * cli/cli-script.c (do_restore_user_call_depth): Remove.
5383 (execute_user_command): Remove user_call_depth; use
5384 user_args_stack's size instead.
5386 2017-08-03 Tom Tromey <tom@tromey.com>
5388 * top.h (in_user_command): Remove.
5389 * top.c (in_user_command): Remove.
5390 * cli/cli-script.c (do_restore_user_call_depth)
5391 (execute_user_command): Update.
5393 2017-08-03 Tom Tromey <tom@tromey.com>
5395 * valops.c (search_struct_method): Use gdb::byte_vector.
5396 * valarith.c (value_concat): Use std::vector.
5397 * target.c (memory_xfer_partial): Use gdb::byte_vector.
5398 (simple_search_memory): Likewise.
5399 * printcmd.c (find_string_backward): Use gdb::byte_vector.
5400 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
5401 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
5402 * elfread.c (elf_rel_plt_read): Use std::string.
5403 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
5404 * cli/cli-dump.c (restore_section_callback): Use
5407 2017-08-03 Tom Tromey <tom@tromey.com>
5409 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
5411 2017-08-03 Tom Tromey <tom@tromey.com>
5413 * tui/tui-regs.c (tui_restore_gdbout): Remove.
5414 (tui_register_format): Use scoped_restore.
5416 2017-08-03 Tom Tromey <tom@tromey.com>
5418 * reverse.c (exec_direction_default): Remove.
5419 (exec_reverse_once): Use scoped_restore.
5420 * remote.c (restore_remote_timeout): Remove.
5421 (remote_flash_erase, remote_flash_write, remote_flash_done)
5422 (readchar, remote_serial_write): Use scoped_restore.
5423 * cli/cli-script.c (struct source_cleanup_lines_args)
5424 (source_cleanup_lines): Remove.
5425 (script_from_file): Use scoped_restore.
5426 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
5427 (source_command): Use scoped_restore.
5429 2017-08-03 Tom Tromey <tom@tromey.com>
5431 * utils.h (make_cleanup_free_so): Remove.
5432 * utils.c (do_free_so, make_cleanup_free_so): Remove.
5433 * solist.h (struct so_deleter): New.
5434 (so_list_up): New typedef.
5435 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
5437 2017-08-03 Tom Tromey <tom@tromey.com>
5439 * utils.h (make_cleanup_restore_current_language): Remove.
5440 * utils.c (do_restore_current_language)
5441 (make_cleanup_restore_current_language): Remove.
5442 * parse.c (parse_exp_in_context_1)
5443 (parse_expression_with_language): Use
5444 scoped_restore_current_language.
5445 * mi/mi-main.c (mi_cmd_execute): Use
5446 scoped_restore_current_language.
5447 * language.h (scoped_restore_current_language): New class.
5449 2017-08-03 Tom Tromey <tom@tromey.com>
5451 * compile/compile.c (cleanup_unlink_file): Remove.
5452 (compile_to_object): Use gdb::unlinker.
5453 (eval_compile_command): Likewise.
5455 2017-08-03 Tom Tromey <tom@tromey.com>
5457 * utils.h (make_cleanup_fclose): Remove.
5458 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
5460 2017-08-03 Tom Tromey <tom@tromey.com>
5462 * top.c (open_terminal_stream): Return gdb_file_up.
5463 (new_ui_command): Update.
5465 2017-08-03 Tom Tromey <tom@tromey.com>
5467 * source.c (print_source_lines_base, forward_search_command)
5468 (reverse_search_command): Use gdb_file_up.
5470 2017-08-03 Tom Tromey <tom@tromey.com>
5472 * fbsd-nat.c (fbsd_find_memory_regions): Update.
5474 2017-08-03 Tom Tromey <tom@tromey.com>
5476 * cli/cli-cmds.c (find_and_open_script): Change return type.
5477 Remove "streamp" and "full_path" parameters.
5478 (source_script_with_search): Update.
5479 * auto-load.c (source_script_file): Update.
5480 * cli/cli-cmds.h (find_and_open_script): Change type.
5481 (open_script): New struct.
5483 2017-08-03 Tom Tromey <tom@tromey.com>
5485 * xml-support.c (xml_fetch_content_from_file): Update.
5486 * ui-file.c (stdio_file::open): Update.
5487 * tracefile-tfile.c (tfile_start): Update.
5488 * remote.c (remote_file_put, remote_file_get): Update.
5489 * nat/linux-procfs.c (linux_proc_get_int)
5490 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
5491 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
5492 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
5493 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
5494 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
5495 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
5496 * linux-nat.c (linux_proc_pending_signals): Update.
5497 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
5498 (file_closer): Remove.
5499 * compile/compile.c (compile_to_object): Update.
5500 * common/filestuff.h (struct gdb_file_deleter): New.
5501 (gdb_file_up): New typedef.
5502 (gdb_fopen_cloexec): Change return type.
5503 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
5504 * cli/cli-dump.c (fopen_with_cleanup): Remove.
5505 (dump_binary_file, restore_binary_file): Update.
5506 * auto-load.c (auto_load_objfile_script_1): Update.
5508 2017-08-03 Tom Tromey <tom@tromey.com>
5510 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
5511 (info_static_tracepoint_markers_command): Likewise.
5512 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
5513 * skip.c (skip_info): Use ui_out_emit_table.
5514 * progspace.c (print_program_space): Use ui_out_emit_table.
5515 * osdata.c (info_osdata): Use ui_out_emit_table.
5516 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
5518 * linux-thread-db.c (info_auto_load_libthread_db): Use
5520 * inferior.c (print_inferior): Use ui_out_emit_table.
5521 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
5522 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
5523 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
5524 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
5525 * ui-out.h (class ui_out_emit_table): New.
5527 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
5529 * mips-tdep.c (mips_fpu_type_str): New function.
5530 (mips_dump_tdep): Call it.
5532 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
5534 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
5537 2017-07-31 Xavier Roirand <roirand@adacore.com>
5539 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
5541 2017-07-27 Xavier Roirand <roirand@adacore.com>
5543 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
5545 2017-07-26 Yao Qi <yao.qi@linaro.org>
5547 * cli/cli-cmds.c (maintenancechecklist): New variable.
5548 * gdbcmd.h (maintenancechecklist): Declare it.
5549 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
5550 Call i386_linux_read_description with different masks.
5551 * maint.c (maintenance_check_command): New function.
5552 (_initialize_maint_cmds): Call add_prefix_cmd.
5553 * target-descriptions.c (tdesc_reg): override operator != and ==.
5554 (tdesc_type): Likewise.
5555 (tdesc_feature): Likewise.
5556 (target_desc): Likewise.
5557 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
5558 (maintenance_check_xml_descriptions): New function.
5559 (_initialize_target_descriptions) Add command "xml-descriptions".
5560 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
5562 2017-07-26 Yao Qi <yao.qi@linaro.org>
5564 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
5565 Include features/i386/32bit-*.c.
5566 (i386_linux_read_description): Generate target description if it
5568 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
5570 * features/i386/32bit-linux.c: Re-generated.
5571 * features/i386/32bit-sse.c: Likewise.
5572 * target-descriptions.c (print_c_feature::visit): Print code to
5573 set register number if needed.
5574 (print_c_feature) <m_next_regnum>: New field.
5576 2017-07-26 Yao Qi <yao.qi@linaro.org>
5578 * features/Makefile (CFILES): Rename with TDESC_CFILES.
5579 (FEATURE_XMLFILES): New.
5580 (FEATURE_CFILES): New.
5582 (clean-cfiles): Remove generated c files.
5583 * features/i386/32bit-avx.c: Generated.
5584 * features/i386/32bit-avx512.c: Generated.
5585 * features/i386/32bit-core.c: Generated.
5586 * features/i386/32bit-linux.c: Generated.
5587 * features/i386/32bit-mpx.c: Generated.
5588 * features/i386/32bit-pkeys.c: Generated.
5589 * features/i386/32bit-sse.c: Generated.
5590 * target-descriptions.c: Include algorithm.
5591 (tdesc_element_visitor): Add method visit_end.
5592 (print_c_tdesc): Implement visit_end.
5593 (print_c_tdesc:: m_filename_after_features): Move it to
5595 (print_c_feature): New class.
5596 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
5597 name starts with "i386/32bit-".
5599 2017-07-26 Yao Qi <yao.qi@linaro.org>
5601 * target-descriptions.c (tdesc_element_visitor): New class.
5602 (tdesc_element): New class.
5603 (tdesc_reg): Inherit from tdesc_element.
5604 (tdesc_reg::accept): New function.
5605 (tdesc_type): Inherit from tdesc_element.
5606 (tdesc_type::accept): New function.
5607 (tdesc_feature): Inherit from tdesc_element.
5608 (tdesc_feature::accept): New function.
5609 (target_desc): Inherit from tdesc_element.
5610 (target_desc::target_desc): New.
5611 (target_desc::~target_desc): New.
5612 (target_desc::accept): New.
5613 (allocate_target_description): Use new.
5614 (free_target_description): Use delete.
5615 (print_c_tdesc): New class.
5616 (maint_print_c_tdesc_cmd): Adjust.
5618 * features/aarch64.c: Re-generated.
5619 * features/arc-arcompact.c: Re-generated.
5620 * features/arc-v2.c: Re-generated.
5621 * features/arm/arm-with-iwmmxt.c: Re-generated.
5622 * features/arm/arm-with-m.c: Re-generated.
5623 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
5624 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
5625 * features/arm/arm-with-neon.c: Re-generated.
5626 * features/arm/arm-with-vfpv2.c: Re-generated.
5627 * features/arm/arm-with-vfpv3.c: Re-generated.
5628 * features/i386/amd64-avx-avx512.c: Re-generated.
5629 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5630 * features/i386/amd64-avx.c: Re-generated.
5631 * features/i386/amd64-avx-linux.c: Re-generated.
5632 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
5633 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5634 * features/i386/amd64-avx-mpx.c: Re-generated.
5635 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
5636 * features/i386/amd64.c: Re-generated.
5637 * features/i386/amd64-linux.c: Re-generated.
5638 * features/i386/amd64-mpx.c: Re-generated.
5639 * features/i386/amd64-mpx-linux.c: Re-generated.
5640 * features/i386/i386-avx-avx512.c: Re-generated.
5641 * features/i386/i386-avx-avx512-linux.c: Re-generated.
5642 * features/i386/i386-avx.c: Re-generated.
5643 * features/i386/i386-avx-linux.c: Re-generated.
5644 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
5645 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
5646 * features/i386/i386-avx-mpx.c: Re-generated.
5647 * features/i386/i386-avx-mpx-linux.c: Re-generated.
5648 * features/i386/i386.c: Re-generated.
5649 * features/i386/i386-linux.c: Re-generated.
5650 * features/i386/i386-mmx.c: Re-generated.
5651 * features/i386/i386-mmx-linux.c: Re-generated.
5652 * features/i386/i386-mpx.c: Re-generated.
5653 * features/i386/i386-mpx-linux.c: Re-generated.
5654 * features/i386/x32-avx-avx512.c: Re-generated.
5655 * features/i386/x32-avx-avx512-linux.c: Re-generated.
5656 * features/i386/x32-avx.c: Re-generated.
5657 * features/i386/x32-avx-linux.c: Re-generated.
5658 * features/i386/x32.c: Re-generated.
5659 * features/i386/x32-linux.c: Re-generated.
5660 * features/microblaze.c: Re-generated.
5661 * features/microblaze-with-stack-protect.c: Re-generated.
5662 * features/mips64-dsp-linux.c: Re-generated.
5663 * features/mips64-linux.c: Re-generated.
5664 * features/mips-dsp-linux.c: Re-generated.
5665 * features/mips-linux.c: Re-generated.
5666 * features/nds32.c: Re-generated.
5667 * features/nios2.c: Re-generated.
5668 * features/nios2-linux.c: Re-generated.
5669 * features/rs6000/powerpc-32.c: Re-generated.
5670 * features/rs6000/powerpc-32l.c: Re-generated.
5671 * features/rs6000/powerpc-403.c: Re-generated.
5672 * features/rs6000/powerpc-403gc.c : Re-generated.
5673 * features/rs6000/powerpc-405.c: Re-generated.
5674 * features/rs6000/powerpc-505.c: Re-generated.
5675 * features/rs6000/powerpc-601.c: Re-generated.
5676 * features/rs6000/powerpc-602.c: Re-generated.
5677 * features/rs6000/powerpc-603.c: Re-generated.
5678 * features/rs6000/powerpc-604.c: Re-generated.
5679 * features/rs6000/powerpc-64.c: Re-generated.
5680 * features/rs6000/powerpc-64l.c: Re-generated.
5681 * features/rs6000/powerpc-7400.c: Re-generated.
5682 * features/rs6000/powerpc-750.c: Re-generated.
5683 * features/rs6000/powerpc-860.c: Re-generated.
5684 * features/rs6000/powerpc-altivec32.c: Re-generated.
5685 * features/rs6000/powerpc-altivec32l.c: Re-generated.
5686 * features/rs6000/powerpc-altivec64.c: Re-generated.
5687 * features/rs6000/powerpc-altivec64l.c: Re-generated.
5688 * features/rs6000/powerpc-cell32l.c: Re-generated.
5689 * features/rs6000/powerpc-cell64l.c: Re-generated.
5690 * features/rs6000/powerpc-e500.c: Re-generated.
5691 * features/rs6000/powerpc-e500l.c: Re-generated.
5692 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
5693 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
5694 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
5695 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
5696 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
5697 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
5698 * features/rs6000/powerpc-vsx32.c: Re-generated.
5699 * features/rs6000/powerpc-vsx32l.c: Re-generated.
5700 * features/rs6000/powerpc-vsx64.c: Re-generated.
5701 * features/rs6000/powerpc-vsx64l.c: Re-generated.
5702 * features/rs6000/rs6000.c: Re-generated.
5703 * features/s390-linux32.c: Re-generated.
5704 * features/s390-linux32v1.c: Re-generated.
5705 * features/s390-linux32v2.c: Re-generated.
5706 * features/s390-linux64.c: Re-generated.
5707 * features/s390-linux64v1.c: Re-generated.
5708 * features/s390-linux64v2.c: Re-generated.
5709 * features/s390-te-linux64.c: Re-generated.
5710 * features/s390-tevx-linux64.c: Re-generated.
5711 * features/s390-vx-linux64.c: Re-generated.
5712 * features/s390x-linux64.c: Re-generated.
5713 * features/s390x-linux64v1.c: Re-generated.
5714 * features/s390x-linux64v2.c: Re-generated.
5715 * features/s390x-te-linux64.c: Re-generated.
5716 * features/s390x-tevx-linux64.c: Re-generated.
5717 * features/s390x-vx-linux64.c: Re-generated.
5718 * features/sparc/sparc32-solaris.c: Re-generated.
5719 * features/sparc/sparc64-solaris.c: Re-generated.
5720 * features/tic6x-c62x.c: Re-generated.
5721 * features/tic6x-c62x-linux.c: Re-generated.
5722 * features/tic6x-c64x.c: Re-generated.
5723 * features/tic6x-c64x-linux.c: Re-generated.
5724 * features/tic6x-c64xp.c: Re-generated.
5725 * features/tic6x-c64xp-linux.c: Re-generated.
5727 2017-07-26 Yao Qi <yao.qi@linaro.org>
5729 * i386-linux-tdep.c (i386_linux_read_description): New function.
5730 (i386_linux_core_read_description): Call
5731 i386_linux_read_description.
5732 * i386-linux-tdep.h (i386_linux_read_description): Declare.
5733 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
5734 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
5735 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
5736 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
5737 * x86-linux-nat.c (x86_linux_read_description): Call
5738 i386_linux_read_description.
5740 2017-07-26 Yao Qi <yao.qi@linaro.org>
5743 * features/Makefile (%.c: %.xml): Pass the xml file name to
5744 command "maint print c-tdesc".
5745 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
5748 2017-07-26 Yao Qi <yao.qi@linaro.org>
5750 * target-descriptions.c (target_desc): Add ctor and dtor. Do
5751 in-class initialization.
5752 (tdesc_create_feature): Call new instead of XCNEW.
5753 (free_target_description): Ue delete.
5755 2017-07-25 John Baldwin <jhb@FreeBSD.org>
5757 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
5759 2017-07-25 Yao Qi <yao.qi@linaro.org>
5761 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
5763 (amd64_x32_init_abi): Likewise.
5764 * amd64-tdep.h (amd64_init_abi): Update declaration.
5765 (amd64_x32_init_abi): Likewise.
5767 2017-07-25 Yao Qi <yao.qi@linaro.org>
5770 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
5771 condition for FPSCR.
5772 (arm_linux_store_inferior_registers): Likewise.
5774 2017-07-22 Tom Tromey <tom@tromey.com>
5776 * break-catch-syscall.c (struct catch_syscall_inferior_data)
5777 <syscalls_counts>: Now a std::vector.
5778 (get_catch_syscall_inferior_data): Use "new".
5779 (catch_syscall_inferior_data_cleanup): Use "delete".
5780 (insert_catch_syscall, remove_catch_syscall)
5781 (clear_syscall_counts): Update.
5783 2017-07-22 Tom Tromey <tom@tromey.com>
5785 * break-catch-syscall.c (syscall_catchpoint)
5786 <syscalls_to_be_caught>: Now a std::vector<int>
5787 (~syscall_catchpoint): Remove.
5788 (insert_catch_syscall, remove_catch_syscall)
5789 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
5790 (print_mention_catch_syscall, print_recreate_catch_syscall):
5792 (create_syscall_event_catchpoint): Change type of "filter"
5794 (catch_syscall_split_args): Return a std::vector.
5795 (catch_syscall_command_1, catching_syscall_number_1): Update.
5797 2017-07-22 Tom Tromey <tom@tromey.com>
5799 * break-catch-throw.c (struct exception_catchpoint)
5800 <exception_rx>: Now a std::string.
5801 (~exception_catchpoint): Remove.
5802 (print_one_detail_exception_catchpoint): Update.
5803 (handle_gnu_v3_exceptions): Change type of except_rx.
5804 (extract_exception_regexp): Return a std::string.
5805 (catch_exception_command_1): Update.
5807 2017-07-22 Tom Tromey <tom@tromey.com>
5809 * break-catch-sig.c (gdb_signal_type): Remove typedef.
5810 (struct signal_catchpoint) <signals_to_be_caught>: Now a
5812 <catch_all>: Now a bool.
5813 (~signal_catchpoint): Remove.
5814 (signal_catchpoint_insert_location)
5815 (signal_catchpoint_remove_location)
5816 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
5817 (signal_catchpoint_print_mention)
5818 (signal_catchpoint_print_recreate)
5819 (signal_catchpoint_explains_signal): Update.
5820 (create_signal_catchpoint): Change type of "filter" and
5822 (catch_signal_split_args): Return a std::vector. Change type of
5824 (catch_signal_command): Update.
5826 2017-07-20 Pedro Alves <palves@redhat.com>
5828 * ada-lang.c (ada_language_defn): Make extern.
5829 (_initialize_ada_language): Remove add_language call.
5830 * c-lang.c (c_language_defn, cplus_language_defn)
5831 (asm_language_defn, minimal_language_defn): Make extern.
5832 (_initialize_c_language): Delete.
5833 * completer.c (compare_cstrings): Delete, moved to utils.h.
5834 * d-lang.c (d_language_defn): Make extern.
5835 (_initialize_d_language): Remove add_language calls.
5836 * defs.h (enum language): Add comment.
5837 * f-lang.c (f_language_defn): Make extern.
5838 (_initialize_f_language): Remove add_language call.
5839 * go-lang.c (go_language_defn): Make extern.
5840 (_initialize_go_language): Remove add_language call.
5841 * language.c: Include <algorithm>.
5842 (languages): Redefine as const array.
5843 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
5844 (set_language_command): Handle "local". Use for-range loop.
5845 (set_language): Remove loop.
5846 (language_enum): Rewrite.
5847 (language_def, language_str): Remove loops.
5848 (add_language): Delete.
5849 (add_set_language_command): New, based on add_languages.
5850 (skip_language_trampoline): Adjust.
5851 (local_language_defn): Delete.
5852 (language_gdbarch_post_init): Adjust.
5853 (_initialize_language): Remove add_language calls. Call
5854 add_set_language_command.
5855 * language.h (add_language): Delete.
5856 (auto_language_defn)
5857 (unknown_language_defn, minimal_language_defn, ada_language_defn)
5858 (asm_language_defn, c_language_defn, cplus_language_defn)
5859 (d_language_defn, f_language_defn, go_language_defn)
5860 (m2_language_defn, objc_language_defn, opencl_language_defn)
5861 (pascal_language_defn, rust_language_defn): Declare.
5862 * m2-lang.c (m2_language_defn): Make extern.
5863 (_initialize_m2_language): Remove add_language call.
5864 * objc-lang.c (objc_language_defn): Make extern.
5865 (_initialize_objc_language): Remove add_language call.
5866 * opencl-lang.c (opencl_language_defn): Make extern.
5867 (_initialize_opencl_language): Remove add_language call.
5868 * p-lang.c (pascal_language_defn): Make extern.
5869 (_initialize_pascal_language): Delete.
5870 * rust-lang.c (rust_language_defn): Make extern.
5871 (_initialize_rust_language): Delete.
5872 * utils.h (compare_cstrings): New static inline function.
5874 2017-07-20 Pedro Alves <palves@redhat.com>
5876 * ada-lang.c (ada_to_fixed_type_1): Adjust.
5877 (get_var_value): Constify parameters.
5878 (get_int_var_value): Change prototype.
5879 (to_fixed_range_type): Adjust.
5880 * ada-lang.h (get_int_var_value): Change prototype.
5882 2017-07-20 Pedro Alves <palves@redhat.com>
5884 * dwarf2read.c (dw2_lookup_symbol): Use
5885 SYMBOL_MATCHES_SEARCH_NAME.
5886 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5888 2017-07-20 Pedro Alves <palves@redhat.com>
5890 * block.c (block_iter_name_step, block_iter_name_first)
5891 (block_iter_name_next): Delete.
5892 (block_lookup_symbol_primary): Adjust to use
5893 dict_iter_match_first/dict_iter_match_next.
5894 * block.h (block_iter_name_first, block_iter_name_next): Delete
5896 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5897 dict_iter_match_first/dict_iter_match_next.
5899 2017-07-20 Pedro Alves <palves@redhat.com>
5901 * cp-support.c (cp_find_first_component_aux): Add missing case for
5904 2017-07-18 David Blaikie <dblaikie@gmail.com>
5906 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5907 of dwo_cu's dwo_file.
5909 2017-07-18 Yao Qi <yao.qi@linaro.org>
5911 * remote.c (store_registers_using_G): Remove one line comment.
5913 2017-07-18 Yao Qi <yao.qi@linaro.org>
5915 * regcache.c (regcache_cpy): Simplify it.
5916 (regcache::cpy_no_passthrough): Remove it.
5917 * regcache.h (cpy_no_passthrough): Remove it.
5918 (regcache_dup, regcache_cpy): Update comments.
5920 2017-07-18 Pedro Alves <palves@redhat.com>
5922 * remote-sim.c (sim_command_completer): Adjust to work with a
5923 completion_tracker instead of a VEC.
5925 2017-07-17 Pedro Alves <palves@redhat.com>
5927 * completer.c (complete_source_filenames): New function.
5928 (complete_address_and_linespec_locations): New function.
5929 (location_completer): Use complete_address_and_linespec_locations.
5930 (completion_tracker::build_completion_result): Honor the tracker's
5931 request to suppress append.
5932 * completer.h (completion_tracker::suppress_append_ws)
5933 (completion_tracker::set_suppress_append_ws): New methods.
5934 (completion_tracker::m_suppress_append_ws): New field.
5935 (complete_source_filenames): New declaration.
5936 * linespec.c (linespec_complete_what): New.
5937 (struct ls_parser) <complete_what, completion_word,
5938 completion_quote_char, completion_quote_end, completion_tracker>:
5940 (string_find_incomplete_keyword_at_end): New.
5941 (linespec_lexer_lex_string): Record quote char. If in completion
5943 (linespec_lexer_consume_token): Advance the completion word point.
5944 (linespec_lexer_peek_token): Save/restore completion info.
5945 (save_stream_and_consume_token): New.
5946 (set_completion_after_number): New.
5947 (linespec_parse_basic): Set what to complete next depending on
5948 token. Handle function and label completions specially.
5949 (parse_linespec): Disable objc shortcut in completion mode. Set
5950 what to complete next depending on token type. Skip keyword if in
5952 (complete_linespec_component, linespec_complete): New.
5953 * linespec.h (linespec_complete): Declare.
5955 2017-07-17 Pedro Alves <palves@redhat.com>
5957 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5958 Handle 'operator<' / 'operator<<'.
5960 2017-07-17 Pedro Alves <palves@redhat.com>
5962 * completer.c (collect_explicit_location_matches): Handle
5964 (convert_explicit_location_to_linespec): New, factored out from
5966 (convert_explicit_location_to_sals): ... this.
5967 (complete_label): New.
5968 (linespec_complete_label, find_label_symbols_in_block): New.
5969 (find_label_symbols): Add completion_mode parameter and adjust to
5970 call find_label_symbols_in_block.
5971 * linespec.h (linespec_complete_label): Declare.
5973 2017-07-17 Pedro Alves <palves@redhat.com>
5975 * ada-lang.c (ada_collect_symbol_completion_matches): Add
5976 complete_symbol_mode parameter.
5977 * cli/cli-cmds.c (complete_command): Get the completion result out
5978 of the handle_brkchars tracker if used a custom word point.
5979 * completer.c: Include "linespec.h".
5980 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5981 (advance_to_expression_complete_word_point): New.
5982 (completion_tracker::completes_to_completion_word): New.
5983 (complete_files_symbols): Pass down
5984 complete_symbol_mode::EXPRESSION.
5985 (explicit_options, probe_options): New.
5986 (collect_explicit_location_matches): Complete on the
5987 explictit_loc->foo instead of word. Use
5988 linespec_complete_function. Handle MATCH_LINE. Handle offering
5989 keyword and options completions.
5990 (backup_text_ptr): Delete.
5991 (skip_keyword): New.
5992 (complete_explicit_location): Remove 'word' parameter. Add
5993 language, quoted_arg_start and quoted_arg_end parameters.
5994 Rewrite, parsing left to right.
5995 (location_completer): Rewrite.
5996 (location_completer_handle_brkchars): New function.
5997 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5998 (enum complete_line_internal_reason): Adjust comments.
5999 (completion_tracker::discard_completions): New.
6000 (completer_handle_brkchars_func_for_completer): Handle
6002 (gdb_custom_word_point_brkchars)
6003 (gdb_org_rl_basic_quote_characters): New.
6004 (gdb_completion_word_break_characters_throw)
6005 (completion_find_completion_word): Handle trackers that use a
6007 (completion_tracker::advance_custom_word_point_by): New.
6008 (completion_tracker::build_completion_result): Don't rely on
6009 readline appending the quote char.
6010 (gdb_rl_attempted_completion_function_throw): Handle trackers that
6011 use a custom word point.
6012 (gdb_rl_attempted_completion_function): Restore
6013 rl_basic_quote_characters.
6014 * completer.h (class completion_tracker): Extend intro comment.
6015 (completion_tracker::set_quote_char)
6016 (completion_tracker::quote_char)
6017 (completion_tracker::set_use_custom_word_point)
6018 (completion_tracker::use_custom_word_point)
6019 (completion_tracker::custom_word_point)
6020 (completion_tracker::set_custom_word_point)
6021 (completion_tracker::advance_custom_word_point_by)
6022 (completion_tracker::completes_to_completion_word)
6023 (completion_tracker::discard_completions): New methods.
6024 (completion_tracker::m_quote_char)
6025 (completion_tracker::m_use_custom_word_point)
6026 (completion_tracker::m_custom_word_point): New fields.
6027 (advance_to_expression_complete_word_point): Declare.
6028 * f-lang.c (f_collect_symbol_completion_matches): Add
6029 complete_symbol_mode parameter.
6030 * language.h (struct language_defn)
6031 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6033 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
6034 (linespec_complete_function): New function.
6035 (linespec_lexer_lex_keyword): Adjust.
6036 * linespec.h (linespec_keywords, linespec_complete_function): New
6038 * location.c (find_end_quote): New function.
6039 (explicit_location_lex_one): Add explicit_completion_info
6040 parameter. Save quoting info. Don't throw if being called for
6041 completion. Don't handle Ada operators here.
6042 (is_cp_operator, skip_op_false_positives, first_of)
6043 (explicit_location_lex_one_function): New function.
6044 (string_to_explicit_location): Replace 'dont_throw' parameter with
6045 an explicit_completion_info pointer parameter. Handle it. Don't
6046 use explicit_location_lex_one to lex function names. Use
6047 explicit_location_lex_one_function instead.
6048 * location.h (struct explicit_completion_info): New.
6049 (string_to_explicit_location): Replace 'dont_throw' parameter with
6050 an explicit_completion_info pointer parameter.
6051 * symtab.c (default_collect_symbol_completion_matches_break_on):
6052 Add complete_symbol_mode parameter. Handle LINESPEC mode.
6053 (default_collect_symbol_completion_matches)
6054 (collect_symbol_completion_matches): Add complete_symbol_mode
6056 (collect_symbol_completion_matches_type): Pass down
6057 complete_symbol_mode::EXPRESSION.
6058 (collect_file_symbol_completion_matches): Add complete_symbol_mode
6059 parameter. Handle LINESPEC mode.
6060 * symtab.h (complete_symbol_mode): New.
6061 (default_collect_symbol_completion_matches_break_on)
6062 (default_collect_symbol_completion_matches)
6063 (collect_symbol_completion_matches)
6064 (collect_file_symbol_completion_matches): Add complete_symbol_mode
6067 2017-07-17 Pedro Alves <palves@redhat.com>
6069 * utils.c (enum class strncmp_iw_mode): New.
6070 (strcmp_iw): Rename to ...
6071 (strncmp_iw_with_mode): ... this. Add string2_len and mode
6072 parameters. Handle them.
6074 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6075 * utils.h (strncmp_iw): Declare.
6076 (strcmp_iw): Move describing comments here.
6078 2017-07-17 Pedro Alves <palves@redhat.com>
6080 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6082 * c-typeprint.c (is_type_conversion_operator): Use
6084 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6085 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6087 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6088 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6089 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6090 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6092 * location.c: Include "cp-support.h".
6093 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6095 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6098 2017-07-17 Pedro Alves <palves@redhat.com>
6100 * cli/cli-cmds.c (complete_command): Use a completion tracker
6101 along with completion_find_completion_word for handle_brkchars
6103 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6104 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6105 (struct gdb_rl_completion_word_info): New.
6106 (gdb_rl_find_completion_word): New.
6107 (completion_find_completion_word): New.
6108 * completer.h (completion_find_completion_word): Declare.
6110 2017-07-17 Pedro Alves <palves@redhat.com>
6112 * ada-lang.c (symbol_completion_match): Adjust comments.
6113 (symbol_completion_add): Replace vector parameter with
6114 completion_tracker parameter. Use it.
6115 (ada_make_symbol_completion_list): Rename to...
6116 (ada_collect_symbol_completion_matches): ... this. Add
6117 completion_tracker parameter and use it.
6118 (ada_language_defn): Adjust.
6119 * break-catch-syscall.c (catch_syscall_completer): Adjust
6120 prototype and work with completion_tracker instead of VEC.
6121 * breakpoint.c (condition_completer): Adjust prototype and work
6122 with completion_tracker instead of VEC.
6123 * c-lang.c (c_language_defn, cplus_language_defn)
6124 (asm_language_defn, minimal_language_defn): Adjust to renames.
6125 * cli/cli-cmds.c (complete_command): Rework using
6126 completion_tracker. Catch exceptions when completing.
6127 * cli/cli-decode.c (integer_unlimited_completer)
6128 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6129 with completion_tracker instead of VEC.
6130 * command.h (struct completion_tracker): Forward declare.
6131 (completer_ftype, completer_handle_brkchars_ftype): Change
6133 (complete_on_cmdlist, complete_on_enum): Adjust.
6134 * completer.c: Include <algorithm>.
6135 (struct gdb_completer_state): New.
6136 (current_completion): New global.
6137 (readline_line_completion_function): Delete.
6138 (noop_completer, filename_completer)
6139 (filename_completer_handle_brkchars, complete_files_symbols)
6140 (linespec_location_completer): Adjust to work with a
6141 completion_tracker instead of a VEC.
6142 (string_or_empty): New.
6143 (collect_explicit_location_matches): Adjust to work with a
6144 completion_tracker instead of a VEC.
6145 (explicit_location_completer): Rename to ...
6146 (complete_explicit_location): ... this and adjust to work with a
6147 completion_tracker instead of a VEC.
6148 (location_completer): Adjust to work with a completion_tracker
6150 (add_struct_fields): Adjust to work with a completion_list instead
6152 (expression_completer): Rename to ...
6153 (complete_expression): ... this and adjust to work with a
6154 completion_tracker instead of a VEC. Use complete_files_symbols.
6155 (expression_completer): Reimplement on top of complete_expression.
6156 (symbol_completer): Adjust to work with a completion_tracker
6158 (enum complete_line_internal_reason): Add describing comments.
6159 (complete_line_internal_normal_command): Adjust to work with a
6160 completion_tracker instead of a VEC.
6161 (complete_line_internal): Rename to ...
6162 (complete_line_internal_1): ... this and adjust to work with a
6163 completion_tracker instead of a VEC. Assert TEXT is NULL in the
6164 handle_brkchars phase.
6165 (new_completion_tracker): Delete.
6166 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6167 complete_line_internal_1.
6168 (free_completion_tracker): Delete.
6169 (INITIAL_COMPLETION_HTAB_SIZE): New.
6170 (completion_tracker::completion_tracker)
6171 (completion_tracker::~completion_tracker): New.
6172 (maybe_add_completion): Delete.
6173 (completion_tracker::maybe_add_completion)
6174 (completion_tracker::add_completion)
6175 (completion_tracker::add_completions): New.
6176 (throw_max_completions_reached_error): Delete.
6177 (complete_line): Adjust to work with a completion_tracker instead
6178 of a VEC. Don't create a completion_tracker_t or check for max
6180 (command_completer, command_completer_handle_brkchars)
6181 (signal_completer, reg_or_group_completer_1)
6182 (reg_or_group_completer, default_completer_handle_brkchars):
6183 Adjust to work with a completion_tracker.
6184 (gdb_completion_word_break_characters_throw): New.
6185 (gdb_completion_word_break_characters): Reimplement.
6186 (line_completion_function): Delete.
6187 (completion_tracker::recompute_lowest_common_denominator)
6188 (expand_preserving_ws)
6189 (completion_tracker::build_completion_result)
6190 (completion_result::completion_result)
6191 (completion_result::completion_result)
6192 (completion_result::~completion_result)
6193 (completion_result::completion_result)
6194 (completion_result::release_match_list, compare_cstrings)
6195 (completion_result::sort_match_list)
6196 (completion_result::reset_match_list)
6197 (gdb_rl_attempted_completion_function_throw)
6198 (gdb_rl_attempted_completion_function): New.
6199 * completer.h (completion_list, struct completion_result)
6200 (class completion_tracker): New.
6201 (complete_line): Add completion_tracker parameter.
6202 (readline_line_completion_function): Delete.
6203 (gdb_rl_attempted_completion_function): New.
6204 (noop_completer, filename_completer, expression_completer)
6205 (location_completer, symbol_completer, command_completer)
6206 (signal_completer, reg_or_group_completer): Update prototypes.
6207 (completion_tracker_t, new_completion_tracker)
6208 (make_cleanup_free_completion_tracker): Delete.
6209 (enum maybe_add_completion_enum): Delete.
6210 (maybe_add_completion): Delete.
6211 (throw_max_completions_reached_error): Delete.
6212 * corefile.c (complete_set_gnutarget): Adjust to work with a
6213 completion_tracker instead of a VEC.
6214 * cp-abi.c (cp_abi_completer): Adjust to work with a
6215 completion_tracker instead of a VEC.
6216 * d-lang.c (d_language_defn): Adjust.
6217 * disasm.c (disassembler_options_completer): Adjust to work with a
6218 completion_tracker instead of a VEC.
6219 * f-lang.c (f_make_symbol_completion_list): Rename to ...
6220 (f_collect_symbol_completion_matches): ... this. Adjust to work
6221 with a completion_tracker instead of a VEC.
6222 (f_language_defn): Adjust.
6223 * go-lang.c (go_language_defn): Adjust.
6224 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6225 Adjust to work with a completion_tracker instead of a VEC.
6226 * infrun.c (handle_completer): Likewise.
6227 * interps.c (interpreter_completer): Likewise.
6228 * interps.h (interpreter_completer): Likewise.
6229 * language.c (unknown_language_defn, auto_language_defn)
6230 (local_language_defn): Adjust.
6231 * language.h (language_defn::la_make_symbol_completion_list):
6233 (language_defn::la_collect_symbol_completion_matches): ... this
6234 and adjust to work with a completion_tracker instead of a VEC.
6235 * m2-lang.c (m2_language_defn): Adjust.
6236 * objc-lang.c (objc_language_defn): Adjust.
6237 * opencl-lang.c (opencl_language_defn): Adjust.
6238 * p-lang.c (pascal_language_defn): Adjust.
6239 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6240 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6241 with a completion_tracker.
6242 * rust-lang.c (rust_language_defn): Adjust.
6243 * symtab.c (free_completion_list, do_free_completion_list)
6244 (return_val, completion_tracker): Delete.
6245 (completion_list_add_name, completion_list_add_symbol)
6246 (completion_list_add_msymbol, completion_list_objc_symbol)
6247 (completion_list_add_fields, add_symtab_completions): Add
6248 completion_tracker parameter and use it.
6249 (default_make_symbol_completion_list_break_on_1): Rename to...
6250 (default_collect_symbol_completion_matches_break_on): ... this.
6251 Add completion_tracker parameter and use it instead of allocating
6252 a completion tracker here.
6253 (default_make_symbol_completion_list_break_on): Delete old
6255 (default_make_symbol_completion_list): Delete.
6256 (default_collect_symbol_completion_matches): New.
6257 (make_symbol_completion_list): Delete.
6258 (collect_symbol_completion_matches): New.
6259 (make_symbol_completion_type): Rename to ...
6260 (collect_symbol_completion_matches_type): ... this. Add
6261 completion_tracker parameter and use it instead of VEC.
6262 (make_file_symbol_completion_list_1): Rename to...
6263 (collect_file_symbol_completion_matches): ... this. Add
6264 completion_tracker parameter and use it instead of VEC.
6265 (make_file_symbol_completion_list): Delete.
6266 (add_filename_to_list): Use completion_list instead of a VEC.
6267 (add_partial_filename_data::list): Now a completion_list.
6268 (make_source_files_completion_list): Work with a completion_list
6270 * symtab.h: Include "completer.h".
6271 (default_make_symbol_completion_list_break_on)
6272 (default_make_symbol_completion_list, make_symbol_completion_list)
6273 (make_symbol_completion_type, make_file_symbol_completion_list)
6274 (make_source_files_completion_list): Delete.
6275 (default_collect_symbol_completion_matches_break_on)
6276 (default_collect_symbol_completion_matches)
6277 (collect_symbol_completion_matches)
6278 (collect_symbol_completion_matches_type)
6279 (collect_file_symbol_completion_matches)
6280 (make_source_files_completion_list): New.
6281 * top.c (init_main): Don't install a rl_completion_entry_function
6282 hook. Install a rl_attempted_completion_function hook instead.
6283 * tui/tui-layout.c (layout_completer): Adjust to work with a
6285 * tui/tui-regs.c (tui_reggroup_completer):
6286 * tui/tui-win.c (window_name_completer, focus_completer)
6287 (winheight_completer): Adjust to work with a completion_tracker.
6288 * value.c: Include "completer.h".
6289 (complete_internalvar): Adjust to work with a completion_tracker.
6290 * value.h (complete_internalvar): Likewise.
6292 2017-07-17 Pedro Alves <palves@redhat.com>
6294 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
6296 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
6297 comments to completer_ftype's declaration.
6298 <completer_handle_brkchars>: Change type to
6299 completer_handle_brkchars_ftype.
6300 * command.h (completer_ftype): Add describing comment and give
6301 names to parameters.
6302 (completer_ftype_void): Rename to ...
6303 (completer_handle_brkchars_ftype) ... this. Add describing comment.
6304 (set_cmd_completer_handle_brkchars): Adjust.
6305 * completer.c (filename_completer_handle_brkchars): New function.
6306 (complete_line_internal_normal_command): New function, factored
6308 (complete_line_internal): ... here.
6309 (command_completer_handle_brkchars)
6310 (default_completer_handle_brkchars)
6311 (completer_handle_brkchars_func_for_completer): New functions.
6312 * completer.h (set_gdb_completion_word_break_characters): Delete
6314 (completer_handle_brkchars_func_for_completer): New declaration.
6315 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6316 completer_handle_brkchars_func_for_completer.
6318 2017-07-17 Pedro Alves <palves@redhat.com>
6320 * completer.c (symbol_completer): New function, based on
6321 make_symbol_completion_list_fn.
6322 * completer.h (symbol_completer): New declaration.
6323 * guile/scm-cmd.c (cmdscm_completers): Adjust.
6324 * python/py-cmd.c (completers): Adjust.
6325 * symtab.c (make_symbol_completion_list_fn): Delete.
6326 * symtab.h (make_symbol_completion_list_fn): Delete.
6327 * cli/cli-decode.c (add_cmd): Adjust.
6329 2017-07-17 Pedro Alves <palves@redhat.com>
6331 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
6332 * dwarf2read.c: Include "filename-seen-cache.h".
6333 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
6334 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
6335 * filename-seen-cache.c: New file.
6336 * filename-seen-cache.h: New file.
6337 * symtab.c: Include "filename-seen-cache.h".
6338 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
6339 (create_filename_seen_cache, clear_filename_seen_cache)
6340 (delete_filename_seen_cache, filename_seen): Delete, parts moved
6341 to filename-seen-cache.h/filename-seen-cache.c.
6342 (output_source_filename, sources_info)
6343 (maybe_add_partial_symtab_filename)
6344 (make_source_files_completion_list): Adjust to use
6345 filename_seen_cache.
6347 2017-07-17 Pedro Alves <palves@redhat.com>
6349 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
6351 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
6352 dwarf2_debug_sections*)): New.
6353 (dwarf2_per_objfile::dwarf2_per_objfile(const
6354 dwarf2_per_objfile&)): Declare as deleted.
6355 (dwarf2_per_objfile::operator=): Declare as deleted.
6356 (dwarf2_per_objfile::dwarf2_per_objfile)
6357 (dwarf2_per_objfile::~dwarf2_per_objfile)
6358 (dwarf2_per_objfile::free_cached_comp_units): New.
6359 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
6360 ctor. Call dwarf2_per_objfile's ctor manually.
6361 (dwarf2_locate_sections): Deleted/refactored as ...
6362 (dwarf2_per_objfile::locate_sections): ... this new method.
6363 (free_cached_comp_units): Defer to
6364 dwarf2_per_objfile::free_cached_comp_units.
6365 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
6367 2017-07-14 Tom Tromey <tom@tromey.com>
6370 * rust-exp.y (convert_ast_to_expression): Add "want_type"
6372 <UNOP_SIZEOF>: Split into separate case.
6373 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
6375 2017-07-14 Tom Tromey <tom@tromey.com>
6378 * symtab.c (symbol_matches_domain): Add language_rust to special
6380 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
6381 treat LOC_TYPEDEF symbols as variables.
6383 2017-07-14 Pedro Alves <palves@redhat.com>
6385 * symtab.c (make_file_symbol_completion_list_1): Iterate over
6386 symtabs matching all symtabs with SRCFILE as file name instead of
6387 only considering the first hit, with lookup_symtab.
6389 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6391 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
6392 operator_name parameters.
6393 (gen_expr): Update function call.
6395 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6397 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
6399 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
6401 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
6402 parameter, use agent_expr::gdbarch instead, update function
6404 (locexpr_tracepoint_var_ref): Likewise.
6405 (loclist_tracepoint_var_ref): Likewise.
6406 * ax-gdb.c (gen_trace_static_fields): Likewise.
6407 (gen_traced_pop): Likewise.
6408 (gen_frame_args_address): Likewise.
6409 (gen_frame_locals_address): Likewise.
6410 (gen_var_ref): Likewise.
6411 (gen_struct_ref_recursive): Likewise.
6412 (gen_static_field): Likewise.
6413 (gen_maybe_namespace_elt): Likewise.
6414 (gen_expr): Likewise.
6415 (gen_trace_for_var): Likewise.
6416 (gen_trace_for_expr): Likewise.
6417 (gen_trace_for_return_address): Likewise.
6419 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6421 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
6423 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
6425 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6427 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
6428 from ax, update calls.
6429 (gen_usual_arithmetic): Likewise.
6430 (gen_integral_promotions): Likewise.
6431 (gen_bitfield_ref): Likewise.
6432 (gen_primitive_field): Likewise.
6433 (gen_struct_ref_recursive): Likewise.
6434 (gen_struct_ref): Likewise.
6435 (gen_maybe_namespace_elt): Likewise.
6436 (gen_struct_elt_for_reference): Likewise.
6437 (gen_namespace_elt): Likewise.
6438 (gen_aggregate_elt_ref): Likewise.
6439 (gen_expr): Get gdbarch from ax, update calls.
6440 (gen_expr_binop_rest): Likewise.
6442 2017-07-13 Pedro Alves <palves@redhat.com>
6444 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
6446 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
6447 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
6448 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
6449 tdesc_amd64_linux as default tdesc. Get final tdesc from the
6451 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
6452 Get final tdesc from the tdep.
6453 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
6455 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6456 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6457 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
6458 Use it as default tdesc.
6459 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
6460 down to amd_init_abi. No longer handle fallback tdesc here.
6461 * amd64-tdep.h (tdesc_x32): Declare.
6462 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
6464 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
6467 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6469 * s390-linux-tdep.c (s390_process_record): Add support for
6470 instructions new in arch12.
6472 2017-07-11 John Baldwin <jhb@FreeBSD.org>
6474 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
6475 PT_GETFSBASE and PT_GETGSBASE.
6476 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
6479 2017-07-11 John Baldwin <jhb@FreeBSD.org>
6481 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
6482 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
6483 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
6485 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
6486 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
6487 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
6488 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
6489 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
6490 * features/i386/amd64.xml: Add 64bit-segments.xml.
6491 * features/i386/amd64-avx-avx512.c: Regenerated.
6492 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
6493 * features/i386/amd64-avx-mpx.c: Regenerated.
6494 * features/i386/amd64-avx.c: Regenerated.
6495 * features/i386/amd64-mpx.c: Regenerated.
6496 * features/i386/amd64.c: Regenerated.
6497 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
6498 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6499 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
6500 * regformats/i386/amd64-avx.dat: Regenerated.
6501 * regformats/i386/amd64-mpx.dat: Regenerated.
6502 * regformats/i386/amd64.dat: Regenerated.
6504 2017-07-10 Yao Qi <yao.qi@linaro.org>
6506 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6507 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6509 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
6511 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
6513 * gnulib/aclocal.m4: Regenerate.
6514 * gnulib/config.in: Regenerate.
6515 * gnulib/configure: Regenerate.
6516 * gnulib/import/Makefile.am: Regenerate.
6517 * gnulib/import/Makefile.in: Regenerate.
6518 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6519 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6520 * gnulib/import/m4/environ.m4: New file.
6521 * gnulib/import/m4/setenv.m4: New file.
6522 * gnulib/import/setenv.c: New file.
6523 * gnulib/import/unsetenv.c: New file.
6525 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
6527 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
6528 address when op is DW_OP_addr.
6530 2017-07-09 Tom Tromey <tom@tromey.com>
6532 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
6533 check and apply to outer type.
6535 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6537 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
6538 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
6539 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
6540 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
6542 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6544 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
6546 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6548 * corelow.c (get_core_siginfo): Remove.
6549 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
6550 instead of get_core_siginfo.
6551 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
6552 * gdbarch.h: Re-generate.
6553 * gdbarch.c: Re-generate.
6554 * linux-tdep.c (linux_core_xfer_siginfo): New.
6555 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
6557 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6559 * corelow.c (thread_section_name): Move to ...
6560 * gdbcore.h (thread_section_name): ... here.
6562 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6564 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
6565 (struct siginfo32): New.
6566 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
6567 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
6568 via ptrace(PT_LWPINFO).
6570 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6572 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
6573 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
6574 (fbsd_get_siginfo_type): New.
6575 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
6576 (_initialize_fbsd_tdep): New.
6578 2017-07-06 David Blaikie <dblaikie@gmail.com>
6580 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
6581 a singular dwo_unit*) to support multiple CUs in the same way that
6582 multiple TUs are supported.
6583 (create_cus_hash_table): Replace create_dwo_cu with a function for
6584 parsing multiple CUs from a DWO file.
6585 (open_and_init_dwo_file): Use create_cus_hash_table rather than
6587 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
6588 htab_find, rather than comparing the signature to a singleton CU in
6591 2017-07-06 Pedro Alves <palves@redhat.com>
6593 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
6595 2017-07-04 Pedro Alves <palves@redhat.com>
6597 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
6598 * gdbtypes.h (TYPE_STATIC): Delete.
6599 (struct fn_field) <is_public, is_abstract, is_static, is_final,
6600 is_synchronized, is_native>: Delete.
6602 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
6603 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
6604 (TYPE_FN_FIELD_ABSTRACT): Delete.
6606 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
6608 * buffer.h (buffer_finish): Fix spelling mistakes.
6610 2017-07-01 Eli Zaretskii <eliz@gnu.org>
6612 * .dir-locals.el: Automatically switch to C-style comments in
6613 versions of Emacs that support the feature.
6615 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
6616 Pedro Alves <palves@redhat.com>
6619 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
6620 (process_next_line): New variable 'inline_cmd'.
6621 Adjust 'if' clauses for "python", "compile" and "guile" to use
6622 'command_name_equals' and check for '!inline_cmd'.
6624 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
6627 * cli/cli-script.c (command_name_equals_not_inline): New function.
6628 (process_next_line): Adjust 'if' clauses for "python", "compile"
6629 and "guile" to use command_name_equals_not_inline.
6631 2017-06-29 Pedro Alves <palves@redhat.com>
6633 * completer.c (expression_completer): Call
6634 linespec_location_completer instead of location_completer.
6636 2017-06-29 Pedro Alves <palves@redhat.com>
6638 * completer.c (expression_completer): Remove code that recomputes
6641 2017-06-29 Yao Qi <yao.qi@linaro.org>
6643 * regformats/regdat.sh: Generate code with
6644 "ifndef IN_PROCESS_AGENT".
6646 2017-06-28 Pedro Alves <palves@redhat.com>
6648 * command.h: Include "common/scoped_restore.h".
6650 2017-06-28 Yao Qi <yao.qi@linaro.org>
6652 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
6653 instead of obstack_grow.
6655 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
6658 * symfile.c (reread_symbols): Call objfiles_changed just before
6661 2017-06-27 Pedro Alves <palves@redhat.com>
6663 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
6664 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
6665 (completion_list_add_symbol, completion_list_add_msymbol):
6666 ... these new functions.
6667 (add_symtab_completions)
6668 (default_make_symbol_completion_list_break_on_1): Adjust.
6670 2017-06-27 Pedro Alves <palves@redhat.com>
6672 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
6673 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
6674 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
6676 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
6677 'storage_obstack' field an auto_obstack. In-class initialize all
6678 non-bitfield fields. Make minsyms_read bool.
6679 * symfile.c (read_symbols): Adjust.
6681 2017-06-27 Alan Hayward <alan.hayward@arm.com>
6683 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
6684 (gdbsim_store_register): Likewise.
6686 2017-06-27 Pedro Alves <palves@redhat.com>
6688 * c-exp.y (name_obstack): Now an auto_obstack.
6689 (yylex): Use auto_obstack::clear.
6690 (c_parse): Use auto_obstack::clear instead of reinitializing and
6691 freeing the obstack.
6692 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
6693 * d-exp.y (name_obstack): Now an auto_obstack.
6694 (yylex): Use auto_obstack::clear.
6695 (d_parse): Use auto_obstack::clear instead of reinitializing and
6696 freeing the obstack.
6697 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
6699 * dwarf2read.c (create_addrmap_from_index)
6700 (dwarf2_build_psymtabs_hard)
6701 (update_enumeration_type_from_children): Likewise.
6702 * gdb_obstack.h (auto_obstack): New type.
6703 * go-exp.y (name_obstack): Now an auto_obstack.
6704 (build_packaged_name): Use auto_obstack::clear.
6705 (go_parse): Use auto_obstack::clear instead of reinitializing and
6706 freeing the obstack.
6707 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
6709 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
6710 * rust-exp.y (work_obstack): Now an auto_obstack.
6711 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
6712 reinitializing and freeing the obstack.
6713 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
6714 (host_char_to_target): Use auto_obstack.
6715 * utils.h (make_cleanup_obstack_free): Delete declaration.
6716 * valprint.c (generic_emit_char, generic_printstr): Use
6719 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
6721 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
6723 (darwin_init_thread_list): Don't update dummy thread.
6724 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
6726 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
6728 * record-full.c (netorder16): Remove.
6730 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
6732 * common/diagnostics.h: Define macros for GCC.
6733 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
6734 * common/vec.h: Include diagnostics.h.
6735 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
6736 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
6739 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
6741 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
6743 * ada-lex.l: Ignore deprecated register warnings.
6745 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
6747 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
6748 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
6750 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
6752 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
6755 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
6757 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
6759 2017-06-23 Alan Hayward <alan.hayward@arm.com>
6761 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
6762 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
6763 (xtensa_register_read_masked): Likewise.
6765 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
6767 * common/environ.c (gdb_environ::unset): Update comment.
6769 2017-06-22 Alan Hayward <alan.hayward@arm.com>
6771 * python/py-unwind.c (pyuw_sniffer): Allocate space for
6774 2017-06-22 Alan Hayward <alan.hayward@arm.com>
6776 * record-full.c (record_full_exec_insn): Use byte_vector.
6778 2017-06-22 Yao Qi <yao.qi@linaro.org>
6780 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
6781 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6783 2017-06-22 Alan Hayward <alan.hayward@arm.com>
6785 * remote.c (cached_reg): Move from here...
6786 * regcache.h (cached_reg): ...to here.
6787 * python/py-unwind.c (struct reg_info): Remove.
6788 (cached_frame_info): Use cached_reg_t.
6789 (pyuw_prev_register): Likewise.
6790 (pyuw_sniffer): Use cached_reg_t and allocate registers.
6791 (pyuw_dealloc_cache): Free all registers.
6793 2017-06-22 Pedro Alves <palves@redhat.com>
6794 Simon Marchi <simon.marchi@ericsson.com>
6796 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
6798 * common/diagnostics.h: New file.
6800 2017-06-22 Pedro Alves <palves@redhat.com>
6802 * common/agent.h: Add include guards.
6804 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
6806 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
6807 talk about addressable units instead of bytes.
6809 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6811 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
6812 of '::const_iterator'.
6814 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6816 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6817 'unittests/environ-selftests.c'.
6818 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
6819 * charset.c (find_charset_names): Declare object 'iconv_env'.
6820 Update code to use 'iconv_env' object. Remove call to
6822 * common/environ.c: Include <utility>.
6823 (make_environ): Delete function.
6824 (free_environ): Delete function.
6825 (gdb_environ::clear): New function.
6826 (gdb_environ::operator=): New function.
6827 (gdb_environ::get): Likewise.
6828 (environ_vector): Delete function.
6829 (set_in_environ): Delete function.
6830 (gdb_environ::set): New function.
6831 (unset_in_environ): Delete function.
6832 (gdb_environ::unset): New function.
6833 (gdb_environ::envp): Likewise.
6834 * common/environ.h: Include <vector>.
6835 (struct gdb_environ): Delete; transform into...
6836 (class gdb_environ): ... this class.
6837 (free_environ): Delete prototype.
6838 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
6839 environ_vector): Likewise.
6840 * infcmd.c (run_command_1): Update code to call
6841 'envp' from 'gdb_environ' class.
6842 (environment_info): Update code to call methods from 'gdb_environ'
6844 (unset_environment_command): Likewise.
6845 (path_info): Likewise.
6846 (path_command): Likewise.
6847 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
6848 (inferior::inferior): Initialize 'environment' using the host's
6850 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
6851 Include "environ.h".
6852 (class inferior) <environment>: Change type from 'struct
6853 gdb_environ' to 'gdb_environ'.
6854 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6855 methods from 'gdb_environ' class.
6856 * solib.c (solib_find_1): Likewise
6857 * unittests/environ-selftests.c: New file.
6859 2017-06-20 Yao Qi <yao.qi@linaro.org>
6861 * features/i386/i386-linux.xml: Exchange the order of including
6862 32bit-linux.xml and 32bit-sse.xml.
6863 * features/i386/i386-linux.c: Regenerated.
6865 2017-06-20 Yao Qi <yao.qi@linaro.org>
6867 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6868 Delete copy ctor and assignment operator.
6869 (tdesc_type): Likewise.
6870 (tdesc_feature): Likewise.
6871 (tdesc_free_reg): Remove.
6872 (tdesc_create_reg): Use new.
6873 (tdesc_free_type): Remove.
6874 (tdesc_create_vector): Use new.
6875 (tdesc_create_union): Likewise.
6876 (tdesc_create_flags): Likewise.
6877 (tdesc_create_enum): Likewise.
6878 (tdesc_free_feature): Delete.
6879 (free_target_description): Use delete.
6881 2017-06-19 John Baldwin <jhb@FreeBSD.org>
6883 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6886 2017-06-19 Pedro Alves <palves@redhat.com>
6888 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6889 after gdb::unlinker.
6891 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
6893 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6894 gdb_environ to access an environment variable.
6896 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
6898 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6901 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6903 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6905 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6907 * configure: Re-generate.
6908 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6910 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6912 * configure: Re-generate.
6913 * warning.m4: Pass -Werror to compiler when checking for
6914 supported warning flags.
6916 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6918 * Makefile.in (COMPILE.pre): Add "-x c++".
6920 2017-06-16 Alan Hayward <alan.hayward@arm.com>
6921 Pedro Alves <palves@redhat.com>
6922 Yao Qi <yao.qi@linaro.org>
6924 * defs.h (RequireLongest): New.
6925 (extract_integer): Declare function template.
6926 (extract_signed_integer): Remove the declaration, but define it
6928 (extract_unsigned_integer): Likewise.
6929 (store_integer): Declare function template.
6930 (store_signed_integer): Remove the declaration, but define it
6932 (store_unsigned_integer): Likewise.
6933 * findvar.c (extract_integer): New function template.
6934 (extract_signed_integer): Remove.
6935 (extract_unsigned_integer): Remove.
6936 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6938 (store_integer): New function template.
6939 (store_signed_integer): Remove.
6940 (store_unsigned_integer): Remove.
6941 (store_integer): Explicit instantiations.
6942 * regcache.c (regcache_raw_read_signed): Update.
6943 (regcache::raw_read): New function.
6944 (regcache::raw_read_signed): Remove.
6945 (regcache::raw_read_unsigned): Remove.
6946 (regcache_raw_read_unsigned): Update.
6947 (regcache_raw_write_unsigned): Update.
6948 (regcache::raw_write_signed): Remove.
6949 (regcache::raw_write): New function.
6950 (regcache_cooked_read_signed): Update.
6951 (regcache::raw_write_unsigned): Remove.
6952 (regcache::cooked_read_signed): Remove.
6953 (regcache_cooked_read_unsigned): Update.
6954 (regcache::cooked_read_unsigned): Remove.
6955 (regcache_cooked_write_signed): Update.
6956 (regcache_cooked_write_unsigned): Update.
6957 * regcache.h (regcache) <raw_read_signed>: Remove.
6958 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6959 <raw_read, raw_write>: New.
6960 <cooked_read_signed, cooked_write_signed>: Remove.
6961 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6962 <cooked_read, cooked_write>: New.
6963 * sh64-tdep.c (sh64_pseudo_register_read): Update.
6964 (sh64_pseudo_register_write): Update.
6966 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
6968 * arc-tdep.c (arc_disassembler_options): New variable.
6969 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6970 of default_print_insn.
6971 (arc_delayed_print_insn): Set info->section when needed,
6972 use default_print_insn to retrieve a disassembler.
6974 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
6977 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6978 to mention $SHELL and startup-with-shell.
6980 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
6982 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6984 2017-06-14 Yao Qi <yao.qi@linaro.org>
6986 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6987 default_print_insn instead of print_insn_aarch64.
6988 * arm-tdep.c (gdb_print_insn_arm): Call
6989 default_print_insn instead of print_insn_big_arm
6990 and print_insn_little_arm.
6991 * i386-tdep.c (i386_print_insn): Call default_print_insn
6992 instead of print_insn_i386.
6993 * ia64-tdep.c (ia64_print_insn): Call
6994 default_print_insn instead of print_insn_ia64.
6995 * mips-tdep.c (gdb_print_insn_mips): Call
6996 default_print_insn instead of print_insn_big_mips
6997 and print_insn_little_mips.
6998 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6999 instead of print_insn_spu.
7001 2017-06-14 Pedro Alves <palves@redhat.com>
7003 * ada-lang.c: Include "common/byte-vector.h".
7004 (ada_value_primitive_packed_val): Use gdb::byte_vector.
7005 * charset.c (wchar_iterator::iterate): Resize the vector instead
7007 * common/byte-vector.h: Include "common/def-vector.h".
7008 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7009 * cli/cli-dump.c: Include "common/byte-vector.h".
7010 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7011 * common/byte-vector.h: New file.
7012 * common/def-vector.h: New file.
7013 * common/default-init-alloc.h: New file.
7014 * dwarf2loc.c: Include "common/byte-vector.h".
7015 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7016 instead of reserving it.
7017 * dwarf2read.c: Include "common/byte-vector.h".
7018 (data_buf::m_vec): Now a gdb::byte_vector.
7019 * gdb_regex.c: Include "common/def-vector.h".
7020 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7021 * mi/mi-main.c: Include "common/byte-vector.h".
7022 (mi_cmd_data_read_memory): Use gdb::byte_vector.
7023 * printcmd.c: Include "common/byte-vector.h".
7024 (print_scalar_formatted): Use gdb::byte_vector.
7025 * valprint.c: Include "common/byte-vector.h".
7026 (maybe_negate_by_bytes, print_decimal_chars): Use
7029 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7031 * darwin-nat.c: Include "nat/fork-inferior.h".
7033 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7035 * configure.nat: Factor out Darwin bits that are not
7036 architecture-specific. Add fork-inferior.o.
7038 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7040 * configure.nat: Factor out AIX bits that are not
7041 architecture-specific. Add fork-inferior.o.
7043 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7045 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
7046 (read_pieced_value, write_pieced_value): ...here. Reduce to
7047 wrappers that just call rw_pieced_value.
7049 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7051 * dwarf2loc.c (write_pieced_value): When writing the data for a
7052 memory piece, use write_memory_with_notification instead of
7055 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7057 * valops.c (read_value_memory): Change embedded_offset to
7058 represent a bit offset instead of a byte offset.
7059 * value.h (read_value_memory): Adjust comment.
7061 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7063 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7064 dest_offset_bits and source_offset_bits.
7065 (write_pieced_value): Likewise.
7067 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7069 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7070 given by DW_OP_bit_piece.
7071 (write_pieced_value): Likewise.
7073 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7075 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7076 some other preparations to the places where sufficient information
7078 (write_pieced_value): Likewise.
7080 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7082 * dwarf2loc.c (bits_to_bytes): New function.
7083 (read_pieced_value): Fix offset calculations for register pieces
7084 on big-endian targets.
7085 (write_pieced_value): Likewise.
7087 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7089 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7090 (write_pieced_value): Likewise.
7092 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7094 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7095 transfer the source value's least significant bits, instead of its
7096 lowest-addressed ones. Rename type_len to max_offset.
7097 (read_pieced_value): Mirror above changes to write_pieced_value as
7100 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7102 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7103 truncate full bytes from dest_offset_bits before using it as an
7104 offset into the buffer.
7106 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7108 * dwarf2loc.c (write_pieced_value): Include transfer size in
7111 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7113 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7114 calculation of this_size.
7116 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7118 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7119 when targeting a bit-field.
7120 (write_pieced_value): Likewise.
7122 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7124 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7125 (allocate_piece_closure): Drop addr_size parameter.
7126 (dwarf2_evaluate_loc_desc_full): Adjust call to
7127 allocate_piece_closure.
7129 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7132 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7133 the LSB end, independent of endianness.
7135 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7137 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7140 2017-06-13 Yao Qi <yao.qi@linaro.org>
7142 * mips-linux-nat.c: Move include features/mips*-linux.c to
7144 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7145 to mips-linux-tdep.c.
7146 * mips-linux-tdep.c: Include features/mips*-linux.c
7147 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7149 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7150 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7151 (tdesc_mips64_dsp_linux): Declare.
7153 2017-06-12 Tom Tromey <tom@tromey.com>
7155 * valprint.h (val_print_type_code_int): Remove.
7156 * valprint.c (generic_val_print_int): Always call
7157 val_print_scalar_formatted.
7158 (val_print_type_code_int): Remove.
7159 * printcmd.c (print_scalar_formatted): Handle options->format==0.
7160 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7161 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7162 * ada-valprint.c (ada_val_print_num): Use
7163 val_print_scalar_formatted.
7165 2017-06-12 Tom Tromey <tom@tromey.com>
7167 * printcmd.c (print_scalar_formatted): Unify the two switches.
7168 Don't convert scalars to LONGEST.
7170 2017-06-12 Tom Tromey <tom@tromey.com>
7173 * valprint.h (print_decimal_chars): Update.
7174 * valprint.c (maybe_negate_by_bytes): New function.
7175 (print_decimal_chars): Add "is_signed" argument.
7176 * printcmd.c (print_scalar_formatted): Update.
7178 2017-06-12 Tom Tromey <tom@tromey.com>
7181 * valprint.h (print_binary_chars, print_hex_chars): Update.
7182 * valprint.c (val_print_type_code_int): Update.
7183 (print_binary_chars): Add "zero_pad" argument.
7184 (emit_octal_digit): New function.
7185 (print_octal_chars): Don't zero-pad.
7186 (print_decimal_chars): Likewise.
7187 (print_hex_chars): Add "zero_pad" argument.
7188 * sh64-tdep.c (sh64_do_fp_register): Update.
7189 * regcache.c (regcache::dump): Update.
7190 * printcmd.c (print_scalar_formatted): Update.
7191 * infcmd.c (default_print_one_register_info): Update.
7193 2017-06-12 Pedro Alves <palves@redhat.com>
7194 Alan Hayward <alan.hayward@arm.com>
7196 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7197 (mips_eabi_push_dummy_call): Rename local 'regsize' to
7198 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
7199 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
7200 Assert that abi_regsize bytes fit in 'ref_valbuf'.
7202 2017-06-12 Pedro Alves <palves@redhat.com>
7204 * dwarf2read.c (mapped_symtab::data): Now a vector of
7205 symtab_index_entry instead of vector of
7206 std::unique_ptr<symtab_index_entry>. All users adjusted to check
7207 whether an element's name is NULL instead of checking whether the
7208 element itself is NULL.
7209 (find_slot): Change return type. Adjust.
7210 (hash_expand, , add_index_entry, uniquify_cu_indices)
7211 (write_hash_table): Adjust.
7213 2017-06-12 Pedro Alves <palves@redhat.com>
7215 * dwarf2read.c (recursively_count_psymbols): New function.
7216 (write_psymtabs_to_index): Call it to compute number of psyms and
7217 pass estimate size of psyms_seen to unordered_set's ctor.
7219 2017-06-12 Pedro Alves <palves@redhat.com>
7221 * dwarf2read.c (write_hash_table): Check if key already exists
7224 2017-06-12 Pedro Alves <palves@redhat.com>
7226 * dwarf2read.c (data_buf::append_space): Rename to...
7227 (data_buf::grow): ... this, and make private. Adjust all callers.
7228 (data_buf::append_uint): New method.
7229 (add_address_entry, write_one_signatured_type)
7230 (write_psymtabs_to_index): Use it.
7232 2017-06-12 Pedro Alves <palves@redhat.com>
7234 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7235 (file_write (FILE *, const std::vector<Elem>&)): Delete.
7236 (data_buf::file_write): Call ::fwrite directly.
7238 2017-06-12 Pedro Alves <palves@redhat.com>
7240 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7243 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7245 Code cleanup: C++ify .gdb_index producer.
7246 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7247 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7248 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7249 (create_strtab, add_string): Remove.
7250 (file_write, data_buf): New.
7251 (struct symtab_index_entry): Use std::vector for cu_indices.
7252 (struct mapped_symtab): Use std::vector for data.
7253 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7254 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7256 (find_slot): Change return type. Update it to the new data structures.
7257 (hash_expand, add_index_entry): Update it to the new data structures.
7258 (offset_type_compare): Remove.
7259 (uniquify_cu_indices): Update it to the new data structures.
7260 (c_str_view, c_str_view_hasher, vector_hasher): New.
7261 (add_indices_to_cpool): Remove.
7262 (write_hash_table): Update it to the new data structures.
7263 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7264 (eq_psymtab_cu_index): Remove.
7265 (psym_index_map): New typedef.
7266 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7267 reference and std::unordered_map for cu_index_htab.
7268 (add_address_entry, add_address_entry_worker, write_address_map)
7269 (write_psymbols): Update it to the new data structures.
7270 (write_obstack): Remove.
7271 (struct signatured_type_index_data): Change types_list to a data_buf
7272 reference and psyms_seen to a std::unordered_set reference.
7273 (write_one_signatured_type, recursively_write_psymbols)
7274 (write_psymtabs_to_index): Update it to the new data structures.
7276 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
7278 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7279 separate-debug-file commands.
7280 * symfile.h (separate_debug_file_debug): New global.
7281 * symfile.c (separate_debug_file_debug): New global.
7282 (separate_debug_file_exists, find_separate_debug_file): Add
7284 (_initialize_symfile): Add "set debug separate-debug-file"
7286 * build-id.c (build_id_to_debug_bfd,
7287 find_separate_debug_file_by_buildid): Add debug output.
7289 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
7291 * gdbarch.sh (displaced_step_free_closure): Remove.
7292 * gdbarch.h, gdbarch.c: Re-generate.
7293 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
7294 displaced_step_free_closure.
7295 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
7296 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
7297 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7298 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7299 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7300 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7301 * arch-utils.h (simple_displaced_step_free_closure): Remove.
7302 * arch-utils.c (simple_displaced_step_free_closure): Remove.
7303 * infrun.c (displaced_step_clear): Call xfree instead of
7304 gdbarch_displaced_step_free_closure.
7306 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
7308 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
7311 2017-06-08 Alan Hayward <alan.hayward@arm.com>
7313 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
7314 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
7315 (mn10300_push_dummy_call): Likewise.
7317 2017-06-08 Alan Hayward <alan.hayward@arm.com>
7319 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
7321 2017-06-08 Alan Hayward <alan.hayward@arm.com>
7323 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
7325 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7327 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
7328 able to start inferiors using a shell.
7329 (New remote packets): Announce new packet "QStartupWithShell".
7330 * remote.c: Add PACKET_QStartupWithShell.
7331 (extended_remote_create_inferior): Handle new
7332 PACKET_QStartupWithShell.
7333 (remote_protocol_features) <QStartupWithShell>: New entry for
7334 PACKET_QStartupWithShell.
7335 (_initialize_remote): Call "add_packet_config_cmd" for
7338 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7339 Pedro Alves <palves@redhat.com>
7341 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
7342 and "nat/fork-inferior.h".
7343 * common/common-inferior.h: New file, with contents from
7345 * commom/common-utils.c: Include "common-utils.h".
7346 (stringify_argv): New function.
7347 * common/common-utils.h (stringify_argv): New prototype.
7348 * configure.nat: Add "fork-inferior.o" as a dependency for
7349 "*linux*", "fbsd*" and "nbsd*" hosts.
7350 * corefile.c (get_exec_file): Update comment.
7351 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
7352 instead of "startup_inferior".
7353 (darwin_create_inferior): Call "add_thread_silent" after
7355 * fork-child.c: Cleanup unnecessary includes.
7356 (SHELL_FILE): Move to "common/common-fork-child.c".
7357 (environ): Likewise.
7358 (exec_wrapper): Initialize.
7359 (get_exec_wrapper): New function.
7360 (breakup_args): Move to "common/common-fork-child.c"; rename to
7361 "breakup_args_for_exec".
7362 (escape_bang_in_quoted_argument): Move to
7363 "common/common-fork-child.c".
7364 (saved_ui): New variable.
7365 (prefork_hook): New function.
7366 (postfork_hook): Likewise.
7367 (postfork_child_hook): Likewise.
7368 (gdb_startup_inferior): Likewise.
7369 (fork_inferior): Move to "common/common-fork-child.c". Update
7370 function to support gdbserver.
7371 (startup_inferior): Likewise.
7372 * gdbcore.h (get_exec_file): Remove declaration.
7373 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
7374 instead of "startup_inferior". Call "add_thread_silent" after
7376 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
7377 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
7378 instead of "startup_inferior". Call "add_thread_silent" after
7380 * inferior.h: Include "common-inferior.h".
7381 (trace_start_error): Move to "common/common-utils.h".
7382 (trace_start_error_with_name): Likewise.
7383 (fork_inferior): Move prototype to "nat/fork-inferior.h".
7384 (startup_inferior): Likewise.
7385 (gdb_startup_inferior): New prototype.
7386 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
7387 * nat/fork-inferior.h: New file.
7388 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
7389 instead of "startup_inferior". Call "add_thread_silent" after
7391 * target.h (target_terminal_init): Move prototype to
7393 (target_terminal_inferior): Likewise.
7394 (target_terminal_ours): Likewise.
7395 * target/target.h (target_terminal_init): New prototype, moved
7397 (target_terminal_inferior): Likewise.
7398 (target_terminal_ours): Likewise.
7399 * utils.c (gdb_flush_out_err): New function.
7401 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7403 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
7404 * common/common-gdbthread.h: New file, with parts from
7406 * gdbthread.h: Include "common-gdbthread.h".
7407 (switch_to_thread): Moved to "common/common-gdbthread.h".
7409 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7411 * Makefile.in (SFILES): Add "common/job-control.c".
7412 (HFILES_NO_SRCDIR): Add "common/job-control.h".
7413 (COMMON_OBS): Add "job-control.o".
7414 * common/job-control.c: New file, with contents from
7416 * common/job-control.h: New file, with contents from "terminal.h".
7417 * fork-child.c: Include "job-control.h".
7418 * inflow.c: Include "job-control.h".
7419 (gdb_setpgid): Move to "common/common-inflow.c".
7420 (_initialize_inflow): Move setting of "job_control" to
7421 "handle_job_control".
7422 * terminal.h (job_control): Moved to "common/common-terminal.h".
7423 (gdb_setpgid): Likewise.
7424 * top.c: Include "job_control.h".
7425 * utils.c: Likewise.
7426 (job_control): Moved to "job-control.c".
7428 2017-06-07 Pedro Alves <palves@redhat.com>
7430 * Makefile.in (SFILES): Add gdb_regex.c.
7431 (COMMON_OBS): Add gdb_regex.o.
7432 * ada-lang.c (ada_add_standard_exceptions)
7433 (ada_add_exceptions_from_frame, name_matches_regex)
7434 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
7435 parameter type to compiled_regex. Adjust.
7436 (ada_exceptions_list): Use compiled_regex.
7437 * break-catch-throw.c (exception_catchpoint::pattern): Now a
7438 std::unique_ptr<compiled_regex>.
7439 (exception_catchpoint::~exception_catchpoint): Remove regfree
7441 (check_status_exception_catchpoint): Adjust to use compiled_regex.
7442 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
7443 * breakpoint.c (solib_catchpoint::compiled): Now a
7444 std::unique_ptr<compiled_regex>.
7445 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
7446 (check_status_catch_solib): Adjust to use compiled_regex.
7447 (add_solib_catchpoint): Adjust to use compiled_regex.
7448 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
7449 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
7450 compiled_regex reference. Adjust to use it.
7451 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
7452 declaration. Include "gdb_regex.h".
7453 (apropos_cmd): Change regex parameter to compiled_regex reference.
7454 * gdb_regex.c: New file.
7455 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
7457 (class compiled_regex): New.
7458 * linux-tdep.c: Include "common/gdb_optional.h".
7459 (struct mapping_regexes): New, factored out from
7460 mapping_is_anonymous_p, and adjusted to use compiled_regex.
7461 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
7462 gdb::optional and remove cleanups. Adjust to compiled_regex.
7463 * probe.c: Include "common/gdb_optional.h".
7464 (collect_probes): Use compiled_regex and gdb::optional and remove
7466 * skip.c: Include "common/gdb_optional.h".
7467 (skiplist_entry::compiled_function_regexp): Now a
7468 gdb::optional<compiled_regex>.
7469 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
7470 (free_skiplist_entry): Remove regfree call.
7471 (compile_skip_regexp, skip_rfunction_p): Adjust to use
7472 compiled_regex and gdb::optional.
7473 * symtab.c: Include "common/gdb_optional.h".
7474 (search_symbols): Use compiled_regex and gdb::optional.
7475 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
7476 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
7479 2017-06-07 Alan Hayward <alan.hayward@arm.com>
7481 * regcache.c (regcache::save): Avoid buffer use.
7482 (regcache::dump): Likewise.
7484 2017-06-07 Alan Hayward <alan.hayward@arm.com>
7486 * sh-tdep.c (sh_pseudo_register_read): Remove
7488 (sh_pseudo_register_write): Likewise.
7489 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
7490 (sh64_pseudo_register_write): Likewise
7492 2017-06-07 Alan Hayward <alan.hayward@arm.com>
7494 * aarch64-tdep.c (aarch64_store_return_value): Use
7496 (aarch64_pseudo_read_value): Likewise.
7497 (aarch64_pseudo_write): Likewise.
7499 2017-06-06 Yao Qi <yao.qi@linaro.org>
7501 * regformats/regdef.h (set_register_cache): Remove the
7504 2017-06-06 Alan Hayward <alan.hayward@arm.com>
7506 * frame.c (frame_unwind_register_signed): Use
7507 frame_unwind_register_value.
7509 2017-06-06 Pedro Alves <palves@redhat.com>
7511 PR breakpoints/21553
7512 * breakpoint.c (create_breakpoints_sal_default)
7513 (init_breakpoint_sal, create_breakpoint_sal): Use
7514 gdb::unique_xmalloc_ptr for string parameters.
7515 (create_breakpoint): Constify 'extra_string' and 'cond_string'
7516 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
7517 (base_breakpoint_create_breakpoints_sal)
7518 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
7519 (strace_marker_create_breakpoints_sal)
7520 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
7522 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
7523 gdb::unique_xmalloc_ptr for string parameters.
7524 (create_breakpoint): Constify 'extra_string' and 'cond_string'
7527 2017-06-06 Alan Hayward <alan.hayward@arm.com>
7529 * alpha-tdep.c (alpha_register_to_value): Use
7530 get_frame_register_value.
7531 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
7533 2017-06-06 Alan Hayward <alan.hayward@arm.com>
7535 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
7536 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
7537 (ia64_value_to_register): Likewise.
7538 (ia64_extract_return_value): Likewise.
7539 (ia64_store_return_value): Likewise.
7540 (ia64_push_dummy_call): Likewise.
7542 2017-06-04 Joel Brobecker <brobecker@adacore.com>
7546 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
7548 * x86-linux-nat.c (struct arch_lwp_info): Remove.
7550 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
7552 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
7554 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
7556 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
7558 * event-loop.c (poll_timers): Unallocate timer using delete
7561 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
7563 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
7564 (struct breakpoint) <~breakpoint>: New.
7565 (struct watchpoint): Inherit from breakpoint.
7568 (struct tracepoint): Inherit from breakpoint.
7570 * breakpoint.c (longjmp_breakpoint_ops): Remove.
7571 (struct longjmp_breakpoint): Inherit from breakpoint.
7572 <~longjmp_breakpoint>: New.
7574 (new_breakpoint_from_type): Remove casts.
7575 (watchpoint_in_thread_scope): Remove reference to base field.
7576 (watchpoint_del_at_next_stop): Likewise.
7577 (update_watchpoint): Likewise.
7578 (watchpoint_check): Likewise.
7579 (bpstat_check_watchpoint): Likewise.
7580 (set_longjmp_breakpoint): Likewise.
7581 (struct fork_catchpoint): Inherit from breakpoint.
7583 (struct solib_catchpoint): Inherit from breakpoint.
7584 <~solib_catchpoint>: New.
7586 (dtor_catch_solib): Change to ...
7587 (solib_catchpoint::~solib_catchpoint): ... this.
7588 (breakpoint_hit_catch_solib): Remove reference to base field.
7589 (add_solib_catchpoint): Likewise.
7590 (create_fork_vfork_event_catchpoint): Likewise.
7591 (struct exec_catchpoint): Inherit from breakpoint.
7592 <~exec_catchpoint>: New.
7594 (dtor_catch_exec): Change to ...
7595 (exec_catchpoint::~exec_catchpoint): ... this.
7596 (dtor_watchpoint): Change to ...
7597 (watchpoint::~watchpoint): ... this.
7598 (watch_command_1): Remove reference to base field.
7599 (catch_exec_command_1): Likewise.
7600 (base_breakpoint_dtor): Change to ...
7601 (breakpoint::~breakpoint): ... this.
7602 (base_breakpoint_ops): Remove dtor field value.
7603 (longjmp_bkpt_dtor): Change to ...
7604 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
7605 (strace_marker_create_breakpoints_sal): Remove reference to base
7607 (delete_breakpoint): Don't manually call breakpoint destructor.
7608 (create_tracepoint_from_upload): Remove reference to base field.
7609 (trace_pass_set_count): Likewise.
7610 (initialize_breakpoint_ops): Don't initialize
7611 momentary_breakpoint_ops, don't set dtors.
7612 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
7613 <~ada_catchpoint>: New.
7615 (create_excep_cond_exprs): Remove reference to base field.
7616 (dtor_exception): Change to ...
7617 (ada_catchpoint::~ada_catchpoint): ... this.
7618 (dtor_catch_exception): Remove.
7619 (dtor_catch_exception_unhandled): Remove.
7620 (dtor_catch_assert): Remove.
7621 (create_ada_exception_catchpoint): Remove reference to base
7623 (initialize_ada_catchpoint_ops): Don't set dtors.
7624 * break-catch-sig.c (struct signal_catchpoint): Inherit from
7626 <~signal_catchpoint>: New.
7628 (signal_catchpoint_dtor): Change to ...
7629 (signal_catchpoint::~signal_catchpoint): ... this.
7630 (create_signal_catchpoint): Remove reference to base field.
7631 (initialize_signal_catchpoint_ops): Don't set dtor.
7632 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
7634 <~syscall_catchpoint>: New.
7636 (dtor_catch_syscall): Change to ...
7637 (syscall_catchpoint::~syscall_catchpoint): ... this.
7638 (create_syscall_event_catchpoint): Remove reference to base
7640 (initialize_syscall_catchpoint_ops): Don't set dtor.
7641 * break-catch-throw.c (struct exception_catchpoint): Inherit
7643 <~exception_catchpoint>: New.
7645 (dtor_exception_catchpoint): Change to ...
7646 (exception_catchpoint::~exception_catchpoint): ... this.
7647 (handle_gnu_v3_exceptions): Remove reference to base field.
7648 (initialize_throw_catchpoint_ops): Don't set dtor.
7649 * ctf.c (ctf_get_traceframe_address): Remove reference to base
7651 * remote.c (remote_get_tracepoint_status): Likewise.
7652 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
7653 * tracefile.c (tracefile_fetch_registers): Likewise.
7654 * tracepoint.c (actions_command): Likewise.
7655 (validate_actionline): Likewise.
7656 (tfind_1): Likewise.
7657 (get_traceframe_location): Likewise.
7658 (find_matching_tracepoint_location): Likewise.
7659 (parse_tracepoint_status): Likewise.
7660 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
7662 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
7664 * breakpoint.c (struct longjmp_breakpoint): New struct.
7665 (is_tracepoint_type): Change return type to bool.
7666 (is_longjmp_type): New function.
7667 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
7668 (set_raw_breakpoint_without_location): Use
7669 new_breakpoint_from_type.
7670 (set_raw_breakpoint): Likewise.
7672 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
7674 * breakpoint.c (new_breakpoint_from_type): New function.
7675 (create_breakpoint_sal): Use new_breakpoint_from_type and
7677 (create_breakpoint): Likewise.
7679 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
7681 * memattr.c (mem_info_command): Rename to ...
7682 (info_mem_command): ... this.
7683 (mem_enable_command): Rename to ...
7684 (enable_mem_command): ... this.
7685 (mem_disable_command): Rename to ...
7686 (disable_mem_command): ... this.
7687 (mem_delete_command): Rename to ...
7688 (delete_mem_command): ... this.
7689 (_initialize_mem): Adjust function names.
7691 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
7693 * btrace.c (handle_pt_insn_events): New.
7694 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
7695 STATUS. Split into this and ...
7696 (handle_pt_insn_event_flags): ... this.
7698 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
7700 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
7701 and struct pt_insn.resynced.
7702 * configure: Regenerated.
7703 * config.in: Regenerated.
7705 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7707 * btrace.c (ftrace_find_call_by_number): New function.
7708 (ftrace_new_function): Store objects, not pointers.
7709 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
7710 ftrace_new_gap, ftrace_update_function,
7711 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
7712 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
7713 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
7714 btrace_ends_with_single_insn, btrace_call_get): Account for
7715 btrace_thread_info::functions now storing objects.
7716 * btrace.h (struct btrace_thread_info): Add constructor.
7717 (struct btrace_thread_info) <functions>: Make std::vector.
7718 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
7719 Initialize with default values.
7720 * record-btrace.c (record_btrace_frame_sniffer): Account for
7721 btrace_thread_info::functions now storing objects.
7723 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7725 * btrace.c: Remove typedef bfun_s.
7726 (ftrace_new_gap): Directly add gaps to the list of gaps.
7727 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
7728 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
7729 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
7732 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7734 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
7735 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
7736 with btrace_thread_info::next_segment and
7737 btrace_thread_info::prev_segment.
7738 * btrace.h: Remove struct btrace_func_link.
7739 (struct btrace_function): Replace pair of function segment pointers
7740 with pair of indices.
7741 * python/py-record-btrace.c (btpy_call_prev_sibling,
7742 btpy_call_next_sibling): Replace references to
7743 btrace_thread_info::segment with btrace_thread_info::next_segment and
7744 btrace_thread_info::prev_segment.
7745 * record-btrace.c (record_btrace_frame_this_id): Use
7746 btrace_find_call_by_number.
7748 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7750 * btrace.c (ftrace_new_function, ftrace_fixup_level,
7751 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
7752 btrace_insn_next, btrace_insn_prev): Remove references to
7753 btrace_thread_info::flow.
7754 * btrace.h (struct btrace_function): Remove FLOW.
7756 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7758 * btrace.c (ftrace_find_call_by_number): New function.
7759 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
7760 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
7761 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
7762 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
7764 * btrace.h (struct btrace_function): Turn UP into an index.
7765 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
7767 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
7768 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
7769 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
7771 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7773 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7774 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7775 ftrace_update_function, ftrace_compute_global_level_offset,
7776 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
7777 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
7778 btrace_insn_end, btrace_is_empty): Remove references to
7779 btrace_thread_info::begin and btrace_thread_info::end.
7780 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
7781 (struct btrace_thread_info) <functions>: Adjust comment.
7782 * record-btrace.c (record_btrace_start_replaying): Remove reference to
7783 btrace_thread_info::begin.
7785 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7787 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7788 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7789 ftrace_update_function): Remove arguments that implicitly were always
7791 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
7792 Don't pass BTINFO->END.
7794 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7796 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
7797 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
7798 btrace_find_insn_by_number): Replace function segment pointer with
7800 (btrace_insn_cmp): Simplify.
7801 * btrace.h: (struct btrace_insn_iterator) Rename index to
7802 insn_index. Replace function segment pointer with index into function
7804 * record-btrace.c (record_btrace_call_history): Replace function
7805 segment pointer use with index.
7806 (record_btrace_frame_sniffer): Retrieve function call segment through
7808 (record_btrace_set_replay): Remove defunc't safety check.
7810 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7812 * btrace.c (btrace_ends_with_single_insn): New function.
7813 (btrace_call_get, btrace_call_number, btrace_call_begin,
7814 btrace_call_end, btrace_call_next, btrace_call_prev,
7815 btrace_find_call_by_number): Use index into call segment vector
7817 (btrace_call_cmp): Simplify.
7818 * btrace.h (struct btrace_call_iterator): Replace function call segment
7819 pointer with index into vector.
7820 * record-btrace.c (record_btrace_call_history): Use index instead of
7823 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7825 * btrace.c (btrace_insn_begin, btrace_insn_end,
7826 btrace_find_insn_by_number): Add btinfo to iterator.
7827 * btrace.h (struct btrace_insn_iterator): Add btinfo.
7829 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7831 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
7832 and save pointers directly.
7833 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
7834 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
7835 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
7836 changed signature of functions.
7837 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
7838 (btrace_fetch): Remove code that adds btrace_function pointers to
7839 vector of btrace_functions.
7840 (btrace_clear): Simplify freeing vector of btrace_functions.
7842 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7844 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
7845 Replace VEC_* with std::vector functions.
7846 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
7847 (struct btrace_thread_info)<functions>: Change type to std::vector.
7849 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
7851 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
7852 "Removed targets and native configurations" up. Merge duplicate
7853 "New commands" sub-sections. Add "New options" sub-sections.
7855 2017-05-26 Alan Hayward <alan.hayward@arm.com>
7857 * defs.h (copy_integer_to_size): New declaration.
7858 * findvar.c (copy_integer_to_size): New function.
7859 (do_cint_test): New selftest function.
7860 (copy_integer_to_size_test): Likewise.
7861 (_initialize_findvar): Likewise.
7862 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7863 (mips_fbsd_collect_reg): Use raw_collect_integer.
7864 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7865 (mips64_fill_gregset): Use raw_collect_integer
7866 (mips64_fill_fpregset): Use raw_supply_integer.
7867 * regcache.c (regcache::raw_supply_integer): New function.
7868 (regcache::raw_collect_integer): Likewise.
7869 * regcache.h: (regcache::raw_supply_integer): New declaration.
7870 (regcache::raw_collect_integer): Likewise.
7872 2017-05-24 Yao Qi <yao.qi@linaro.org>
7874 * Makefile.in (SFILES): Add gdbarch-selftests.c.
7875 (COMMON_OBS): Add gdbarch-selftests.o.
7876 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7877 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7878 * gdbarch-selftests.c: New file.
7879 * regcache.h (regcache) <~regcache>: Mark it virtual if
7881 <raw_write>: Likewise.
7883 2017-05-24 Yao Qi <yao.qi@linaro.org>
7885 * regcache.c (current_regcache): Change it to
7886 regcache::current_regcache.
7887 (regcache_observer_target_changed): Update.
7888 (regcache_thread_ptid_changed): Make it a regcache static
7890 (regcache_thread_ptid_changed): Update.
7891 (class regcache_access): New.
7892 (current_regcache_test): Update.
7893 (_initialize_regcache): Update.
7894 * regcache.h: Include forward_list.
7895 (regcache): Declare regcache_thread_ptid_changed and declare
7896 registers_changed_ptid as friend.
7898 2017-05-24 Yao Qi <yao.qi@linaro.org>
7900 * i387-tdep.c (i387_register_to_value): Use register_size
7901 instead of TYPE_LENGTH.
7902 * m68k-tdep.c (m68k_register_to_value): Likewise.
7904 2017-05-24 Yao Qi <yao.qi@linaro.org>
7906 * i387-tdep.c (i387_convert_register_p): Return false if type
7907 code isn't TYPE_CODE_FLT.
7909 2017-05-24 Yao Qi <yao.qi@linaro.org>
7911 * alpha-tdep.c (alpha_convert_register_p): Return true if type
7913 (alpha_register_to_value): Remove type length check.
7914 (alpha_value_to_register): Likewise.
7916 2017-05-24 Yao Qi <yao.qi@linaro.org>
7918 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7921 2017-05-24 Yao Qi <yao.qi@linaro.org>
7923 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7924 TYPE_CODE_FLT or not.
7926 2017-05-24 Yao Qi <yao.qi@linaro.org>
7928 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7929 * avr-tdep.c (avr_gdbarch_init): Likewise.
7930 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7931 * cris-tdep.c (cris_gdbarch_init): Likewise.
7932 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7933 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7934 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7935 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7936 * mep-tdep.c (mep_gdbarch_init): Likewise.
7937 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7938 * mips-tdep.c (mips_gdbarch_init): Likewise.
7939 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7940 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7941 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7942 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7943 * v850-tdep.c (v850_gdbarch_init): Likewise.
7945 2017-05-24 Yao Qi <yao.qi@linaro.org>
7947 * selftest-arch.c (tests_with_arch): Call registers_changed
7948 and reinit_frame_cache.
7949 * selftest.c (run_self_tests): Likewise.
7951 2017-05-24 Yao Qi <yao.qi@linaro.org>
7953 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7954 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7956 2017-05-24 Yao Qi <yao.qi@linaro.org>
7958 * rl78-tdep.c (rl78_gdbarch_init): Don't call
7959 set_gdbarch_print_insn.
7961 2017-05-24 Yao Qi <yao.qi@linaro.org>
7963 * h8300-tdep.c (h8300_gdbarch_init): Don't call
7964 set_gdbarch_print_insn.
7966 2017-05-24 Yao Qi <yao.qi@linaro.org>
7968 * alpha-tdep.c (alpha_gdbarch_init): Don't call
7969 set_gdbarch_print_insn.
7970 * arc-tdep.c (arc_gdbarch_init): Likewise.
7971 * arch-utils.c: include dis-asm.h.
7972 (default_print_insn): New function.
7973 * arch-utils.h (default_print_insn): Declare.
7974 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7975 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7976 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7977 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7978 * frv-tdep.c (frv_gdbarch_init): Likewise.
7979 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7980 * gdbarch.sh (print_insn): Use default_print_insn.
7981 * gdbarch.c: Regenerated.
7982 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7983 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7984 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7985 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7986 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7987 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7988 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7989 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7990 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7991 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7992 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7993 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7994 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7995 * mt-tdep.c (mt_gdbarch_init): Likewise.
7996 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7997 * nios2-tdep.c (nios2_print_insn): Remove.
7998 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7999 * rx-tdep.c (rx_gdbarch_init): Likewise.
8000 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8001 * score-tdep.c (score_print_insn): Remove.
8002 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8003 * sh-tdep.c (sh_gdbarch_init): Likewise.
8004 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8005 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8006 * tic6x-tdep.c (tic6x_print_insn): Remove.
8007 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8008 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8009 * v850-tdep.c (v850_gdbarch_init): Likewise.
8010 * vax-tdep.c (vax_gdbarch_init): Likewise.
8011 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8012 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8014 2017-05-23 John Baldwin <jhb@FreeBSD.org>
8016 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8017 (MIPS_FP0_REGNUM): Remove.
8018 (MIPS_FSR_REGNUM): Remove.
8019 (mips_fbsd_supply_fpregs): Use mips_regnum.
8020 (mips_fbsd_supply_gregs): Likewise.
8021 (mips_fbsd_collect_fpregs): Likewise.
8022 (mips_fbsd_collect_gregs): Likewise.
8024 2017-05-23 John Baldwin <jhb@FreeBSD.org>
8026 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8027 (getpfpregs_supplies): New function.
8028 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8030 (mips_fbsd_store_inferior_registers): Likewise.
8032 2017-05-22 Pedro Alves <palves@redhat.com>
8034 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8037 2017-05-22 Alan Hayward <alan.hayward@arm.com>
8039 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8040 (store_register): Likewise.
8041 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8042 (get_decimal_float_return_value): Likewise.
8043 (do_ppc_sysv_return_value): Likewise.
8044 (ppc64_sysv_abi_push_integer): Likewise.
8045 (ppc64_sysv_abi_push_freg): Likewise.
8046 (ppc64_sysv_abi_return_value_base): Likewise.
8047 (ppc64_sysv_abi_return_value): Likewise.
8048 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8049 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8050 * rs6000-nat.c: Likewise.
8051 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8052 (rs6000_value_to_register): Likewise.
8053 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8055 2017-05-21 Tom Tromey <tom@tromey.com>
8058 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8059 arrays as "[T]", not "[T; ]".
8061 2017-05-19 Tom Tromey <tom@tromey.com>
8064 * rust-lang.c (exp_descriptor_rust): New function.
8065 (rust_language_defn): Use it.
8066 * p-lang.c (pascal_language_defn): Update.
8067 * opencl-lang.c (opencl_language_defn): Update.
8068 * objc-lang.c (objc_language_defn): Update.
8069 * m2-lang.c (m2_language_defn): Update.
8070 * language.h (struct language_defn)
8071 <la_watch_location_expression>: New member.
8072 * language.c (unknown_language_defn, auto_language_defn)
8073 (local_language_defn): Update.
8074 * go-lang.c (go_language_defn): Update.
8075 * f-lang.c (f_language_defn): Update.
8076 * d-lang.c (d_language_defn): Update.
8077 * c-lang.h (c_watch_location_expression): Declare.
8078 * c-lang.c (c_watch_location_expression): New function.
8079 (c_language_defn, cplus_language_defn, asm_language_defn)
8080 (minimal_language_defn): Use it.
8081 * breakpoint.c (watch_command_1): Call
8082 la_watch_location_expression.
8083 * ada-lang.c (ada_language_defn): Update.
8085 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8088 * gdb_curses.h (NOMACROS): Define.
8089 (NCURSES_NOMACROS): Define.
8091 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8094 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8096 * tui/tui-wingeneral.c (box_win): Likewise.
8097 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8098 (tui_show_source_line): Likewise.
8099 (tui_show_exec_info_content): Likewise.
8101 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8103 * sparc-tdep.c (sparc_structure_return_p)
8104 (sparc_arg_on_registers_p): New functions.
8105 (sparc32_store_arguments): Use them.
8106 * sparc64-tdep.c (sparc64_16_byte_align_p)
8107 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8108 Handle TYPE_CODE_ARRAY.
8110 2017-05-17 Yao Qi <yao.qi@linaro.org>
8112 * cli/cli-decode.c (add_alias_cmd): New function.
8113 * command.h (add_alias_cmd): Declare.
8114 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8115 instead call add_alias_cmd.
8117 2017-05-17 Pedro Alves <palves@redhat.com>
8119 * Makefile.in (nat_extra_makefile_frag): Rename to ...
8120 (nat_makefile_frag): ... this. All references updated.
8121 * configure.ac: Likewise.
8122 * configure.nat: Likewise. Enhance comments.
8123 * configure: Regenerate.
8125 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8127 * procfs.c (procfs_create_inferior): Change prototype to match
8130 2017-05-13 Eli Zaretskii <eliz@gnu.org>
8132 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8133 C++ compiler warning.
8135 2017-05-12 Tom Tromey <tom@tromey.com>
8138 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8139 recurse, just call value_struct_elt directly.
8141 2017-05-12 Tom Tromey <tom@tromey.com>
8143 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8144 OP_RUST_ARRAY>: Fix.
8146 2017-05-12 Tom Tromey <tom@tromey.com>
8148 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8150 2017-05-09 Yao Qi <yao.qi@linaro.org>
8152 * regcache.c: Include <forward_list>.
8153 (struct regcache_list): Remove.
8154 (current_regcache): Update.
8155 (get_thread_arch_aspace_regcache): Update for std::forward_list.
8156 (regcache_thread_ptid_changed): Likewise.
8157 (registers_changed_ptid): Likewise.
8158 (current_regcache_size): Likewise.
8160 2017-05-09 Yao Qi <yao.qi@linaro.org>
8162 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8163 (current_regcache_size): New function.
8164 (current_regcache_test): New function.
8165 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8167 2017-05-08 Alan Hayward <alan.hayward@arm.com>
8169 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8170 (print_gp_register_row): Use get_frame_register_value.
8172 2017-05-08 Alan Hayward <alan.hayward@arm.com>
8174 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8175 (mips_supply_fpregset): Likewise.
8176 (mips64_supply_gregset): Likewise.
8178 2017-05-08 Alan Hayward <alan.hayward@arm.com>
8180 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
8181 regcache->raw_supply_zeroed.
8183 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
8185 * configure.nat: Rearrange 'case' statements to match
8188 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
8190 * Makefile.in: Remove "@host_makefile_frag@". Add variables
8191 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8192 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
8193 "@nat_extra_makefile_frag@".
8194 (Makefile): Remove dependency on "@frags@".
8195 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8196 (data-directory/Makefile): Likewise.
8197 * config/aarch64/linux.mh: Deleted; moved contents to
8198 "gdb/configure.nat".
8199 * config/alpha/alpha-linux.mh: Likewise.
8200 * config/alpha/nbsd.mh: Likewise.
8201 * config/arm/linux.mh: Likewise.
8202 * config/arm/nbsdelf.mh: Likewise.
8203 * config/i386/cygwin.mh: Likewise.
8204 * config/i386/cygwin64.mh: Likewise.
8205 * config/i386/darwin.mh: Likewise.
8206 * config/i386/fbsd.mh: Likewise.
8207 * config/i386/fbsd64.mh: Likewise.
8208 * config/i386/go32.mh: Likewise.
8209 * config/i386/i386gnu.mh: Likewise.
8210 * config/i386/i386sol2.mh: Likewise.
8211 * config/i386/linux.mh: Likewise.
8212 * config/i386/linux64.mh: Likewise.
8213 * config/i386/mingw.mh: Likewise.
8214 * config/i386/mingw64.mh: Likewise.
8215 * config/i386/nbsd64.mh: Likewise.
8216 * config/i386/nbsdelf.mh: Likewise.
8217 * config/i386/nto.mh: Likewise.
8218 * config/i386/obsd.mh: Likewise.
8219 * config/i386/obsd64.mh: Likewise.
8220 * config/i386/sol2-64.mh: Likewise.
8221 * config/ia64/linux.mh: Likewise.
8222 * config/m32r/linux.mh: Likewise.
8223 * config/m68k/linux.mh: Likewise.
8224 * config/m68k/nbsdelf.mh: Likewise.
8225 * config/m68k/obsd.mh: Likewise.
8226 * config/m88k/obsd.mh: Likewise.
8227 * config/mips/fbsd.mh: Likewise.
8228 * config/mips/linux.mh: Likewise.
8229 * config/mips/nbsd.mh: Likewise.
8230 * config/mips/obsd64.mh: Likewise.
8231 * config/pa/linux.mh: Likewise.
8232 * config/pa/nbsd.mh: Likewise.
8233 * config/pa/obsd.mh: Likewise.
8234 * config/powerpc/aix.mh: Likewise.
8235 * config/powerpc/fbsd.mh: Likewise.
8236 * config/powerpc/linux.mh: Likewise.
8237 * config/powerpc/nbsd.mh: Likewise.
8238 * config/powerpc/obsd.mh: Likewise.
8239 * config/powerpc/ppc64-linux.mh: Likewise.
8240 * config/powerpc/spu-linux.mh: Likewise.
8241 * config/s390/linux.mh: Likewise.
8242 * config/sh/nbsd.mh: Likewise.
8243 * config/sparc/fbsd.mh: Likewise.
8244 * config/sparc/linux.mh: Likewise.
8245 * config/sparc/linux64.mh: Likewise.
8246 * config/sparc/nbsd64.mh: Likewise.
8247 * config/sparc/nbsdelf.mh: Likewise.
8248 * config/sparc/obsd64.mh: Likewise.
8249 * config/sparc/sol2.mh: Likewise.
8250 * config/tilegx/linux.mh: Likewise.
8251 * config/vax/nbsdelf.mh: Likewise.
8252 * config/vax/obsd.mh: Likewise.
8253 * config/xtensa/linux.mh: Likewise.
8254 * config/i386/i386gnu.mn: New file, with excerpts from
8255 "config/i386/i386gnu.mh".
8256 * configure: Regenerate.
8257 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8258 *.mh files under "gdb/config".
8259 * configure.nat: New file, with contents from the
8260 "gdb/config/*/*.mh" files.
8262 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
8264 * btrace.c (btrace_clear): Free insn vector.
8266 2017-05-05 Pedro Alves <palves@redhat.com>
8268 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8269 * configure: Regenerate.
8271 2017-05-04 Pedro Alves <palves@redhat.com>
8273 * Makefile.in (SFILES): Add progspace-and-thread.c.
8274 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8275 (COMMON_OBS): Add progspace-and-thread.o.
8276 * breakpoint.c: Include "progspace-and-thread.h".
8277 (update_inserted_breakpoint_locations)
8278 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8279 Use scoped_restore_current_pspace_and_thread.
8280 (create_std_terminate_master_breakpoint): Use
8281 scoped_restore_current_program_space.
8282 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8283 (print_breakpoint_location): Use
8284 scoped_restore_current_program_space.
8285 (bp_loc_is_permanent): Use
8286 scoped_restore_current_pspace_and_thread.
8287 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8288 (download_tracepoint_locations): Use
8289 scoped_restore_current_pspace_and_thread.
8290 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
8291 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
8292 (enum step_over_calls_kind): Moved from inferior.h.
8293 (class scoped_restore_current_thread): New class.
8294 * gdbthread.h (make_cleanup_restore_current_thread): Delete
8296 (scoped_restore_current_thread): New class.
8297 * infcmd.c: Include "common/gdb_optional.h".
8298 (continue_1, proceed_after_attach): Use
8299 scoped_restore_current_thread.
8300 (notice_new_inferior): Use scoped_restore_current_thread.
8301 * inferior.c: Include "progspace-and-thread.h".
8302 (restore_inferior, save_current_inferior): Delete.
8303 (add_inferior_command, clone_inferior_command): Use
8304 scoped_restore_current_pspace_and_thread.
8305 * inferior.h (scoped_restore_current_inferior): New class.
8306 * infrun.c: Include "progspace-and-thread.h" and
8307 "common/gdb_optional.h".
8308 (follow_fork_inferior): Use
8309 scoped_restore_current_pspace_and_thread.
8310 (scoped_restore_exited_inferior): New class.
8311 (handle_vfork_child_exec_or_exit): Use
8312 scoped_restore_exited_inferior,
8313 scoped_restore_current_pspace_and_thread,
8314 scoped_restore_current_thread and scoped_restore.
8315 (fetch_inferior_event): Use scoped_restore_current_thread.
8316 * linespec.c (decode_line_full, decode_line_1): Use
8317 scoped_restore_current_program_space.
8318 * mi/mi-main.c: Include "progspace-and-thread.h".
8319 (exec_continue): Use scoped_restore_current_thread.
8320 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
8321 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
8322 * proc-service.c (ps_pglobal_lookup): Use
8323 scoped_restore_current_program_space.
8324 * progspace-and-thread.c: New file.
8325 * progspace-and-thread.h: New file.
8326 * progspace.c (release_program_space, clone_program_space): Use
8327 scoped_restore_current_program_space.
8328 (restore_program_space, save_current_program_space)
8329 (save_current_space_and_thread): Delete.
8330 (switch_to_program_space_and_thread): Moved to
8331 progspace-and-thread.c.
8332 * progspace.h (save_current_program_space)
8333 (save_current_space_and_thread): Delete declarations.
8334 (scoped_restore_current_program_space): New class.
8335 * remote.c (remote_btrace_maybe_reopen): Use
8336 scoped_restore_current_thread.
8337 * symtab.c: Include "progspace-and-thread.h".
8338 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
8339 * thread.c (print_thread_info_1): Use
8340 scoped_restore_current_thread.
8341 (struct current_thread_cleanup): Delete.
8342 (do_restore_current_thread_cleanup)
8343 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
8344 (scoped_restore_current_thread::~scoped_restore_current_thread):
8346 (make_cleanup_restore_current_thread): Rename/convert to ...
8347 (scoped_restore_current_thread::scoped_restore_current_thread):
8349 (thread_apply_all_command): Use scoped_restore_current_thread.
8350 (thread_apply_command): Use scoped_restore_current_thread.
8351 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
8352 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
8354 2017-05-04 Pedro Alves <palves@redhat.com>
8356 * thread.c (make_cleanup_restore_current_thread): Move
8357 find_thread_ptid call before the is_stopped call. Assert that the
8358 thread is found. Replace is_stopped call by checking the thread's
8359 state directly. Remove unnecessary NULL-thread check.
8361 2017-05-04 Pedro Alves <palves@redhat.com>
8363 * corelow.c (thread_section_name): New class.
8364 (get_core_register_section, get_core_siginfo): Use it.
8366 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
8368 * corelow.c (sniff_core_bfd): Remove extra semicolon.
8369 (get_core_register_section): Remove xfree of NULL pointer.
8371 2017-05-03 Alan Hayward <alan.hayward@arm.com>
8373 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
8374 * regcache.c (regcache::raw_supply_zeroed): New function.
8375 * regcache.h (regcache::raw_supply_zeroed): New declaration.
8377 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
8379 * gdbarch.sh: Remove commented out definition of
8381 * gdbarch.h: Re-generate.
8383 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
8385 * configure: Regenerate.
8387 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
8389 * solib-target.c (solib_target_relocate_section_addresses):
8390 Remove num_section_bases, num_bases, segment_bases variables.
8392 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8394 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
8396 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8398 * solib-target.c: Include <vector>
8399 (struct lm_info_target) <~lm_info_target>: Remove.
8400 <segment_bases, section_bases>: Change type to
8401 std::vector<CORE_ADDR>.
8402 (library_list_start_segment, library_list_start_section,
8403 library_list_end_library,
8404 solib_target_relocate_section_addresses): Adjust.
8406 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8408 * gdbarch.sh (software_single_step): Change return type to
8409 std::vector<CORE_ADDR>.
8410 * gdbarch.c, gdbarch.h: Re-generate.
8411 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
8413 (arm_deal_with_atomic_sequence_raw): Adjust.
8414 (thumb_get_next_pcs_raw): Adjust.
8415 (arm_get_next_pcs_raw): Adjust.
8416 (arm_get_next_pcs): Adjust.
8417 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
8418 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
8419 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
8420 (alpha_software_single_step): Adjust.
8421 * alpha-tdep.h (alpha_software_single_step): Adjust.
8422 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
8423 * arm-tdep.c (arm_software_single_step): Adjust.
8424 (arm_breakpoint_kind_from_current_state): Adjust.
8425 * arm-tdep.h (arm_software_single_step): Adjust.
8426 * breakpoint.c (insert_single_step_breakpoint): Adjust.
8427 * cris-tdep.c (cris_software_single_step): Adjust.
8428 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
8429 (micromips_deal_with_atomic_sequence): Adjust.
8430 (deal_with_atomic_sequence): Adjust.
8431 (mips_software_single_step): Adjust.
8432 * mips-tdep.h (mips_software_single_step): Adjust.
8433 * moxie-tdep.c (moxie_software_single_step): Adjust.
8434 * nios2-tdep.c (nios2_software_single_step): Adjust.
8435 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
8436 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
8437 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
8438 * s390-linux-tdep.c (s390_software_single_step): Adjust.
8439 * sparc-tdep.c (sparc_software_single_step): Adjust.
8440 * spu-tdep.c (spu_software_single_step): Adjust.
8441 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
8443 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8445 * gdbarch.sh: Use semi-colon as field separator instead of colon.
8446 * gdbarch.h: Re-generate.
8448 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8450 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
8451 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
8452 * python/py-instruction.c, python/py-instruction.h: New file.
8453 * python/py-record.c: Add py-instruction.h include.
8454 (gdbpy_initialize_record): Make gdb.Instruction a super class of
8455 gdb.RecordInstruction.
8456 * python/python-internal.h: Add gdbpy_initialize_instruction
8458 * python/python.c (do_start_initialization): Add
8459 gdbpy_initialize_instruction.
8461 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8463 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
8465 (btrace_func_from_recpy_func): New function.
8466 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
8467 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
8468 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
8469 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
8470 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
8471 Also, use new helper functions.
8472 (btpy_list_item): Use new helper functions.
8473 (recpy_bt_function_call_history): Use new type name.
8474 (btpy_call_getset): Remove.
8475 (gdbpy_initialize_btrace): Remove code to initialize
8476 gdb.BtraceFunctionCall.
8477 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
8478 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
8479 recpy_bt_func_prev, recpy_bt_func_next): New export.
8480 * python/py-record.c (recpy_func_type): New static object.
8481 (recpy_func_new, recpy_func_level, recpy_func_symbol,
8482 recpy_func_instructions, recpy_func_up, recpy_func_prev,
8483 recpy_func_next): New function.
8484 (recpy_element_hash, recpy_element_richcompare): Updated comment.
8485 (recpy_func_getset): New static object.
8486 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
8487 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
8489 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8491 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
8492 (btpy_object, btpy_insn_type, btpy_new): Remove.
8493 (btpy_list_object): Use gdb.RecordInstruction type instead of
8494 gdb.BtraceInstruction type.
8495 (btrace_insn_from_recpy_insn): New function.
8496 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
8498 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
8499 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
8500 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
8501 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
8502 instead of btpy_object.
8503 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8504 btpy_insn_data, btpy_insn_decode): Rename to ...
8505 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
8506 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
8507 recpy_bt_insn_decode): This. Also, use new helper functions.
8508 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
8510 (btpy_insn_getset): Remove.
8511 (gdbpy_initialize_btrace): Remove code to initialize
8512 gdb.BtraceInstruction. Use recpy_element_object.
8513 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
8514 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
8515 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
8516 * python/py-record.c (recpy_insn_type): New static object.
8517 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
8518 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
8519 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
8521 (recpy_insn_getset): New static object.
8522 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
8523 * python/py-record.h (recpy_element_object): New typedef.
8524 (recpy_insn_type, recpy_insn_new): New export.
8526 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8528 * py-record-btrace.c (btpy_insn_new): Removed.
8529 (btpy_insn_or_gap_new): New function.
8530 (btpy_insn_error): Removed.
8531 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8532 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
8533 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
8534 btpy_insn_or_gap_new instead of btpy_insn_new.
8535 (btpy_insn_getset): Remove btpy_insn_error.
8536 * py-record.c (recpy_gap_type): New static object.
8537 (recpy_gap_object): New typedef.
8538 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
8539 recpy_gap_reason_string): New function.
8540 (recpy_gap_getset): New static object.
8541 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
8542 * py-record.h (recpy_gap_new): New export.
8544 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8546 * python/py-record.c (recpy_ptid): Remove.
8547 (recpy_record_getset): Remove recpy_ptid.
8549 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8551 * btrace.c (btrace_fetch): Set inferior_ptid.
8552 * python/py-record-btrace.c: Add "py-record.h" include.
8553 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
8554 recpy_bt_end, recpy_bt_instruction_history,
8555 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
8556 in gdb.Record object instead of current ptid.
8557 * python/py-record.c: Include new "py-record.h" file.
8558 (recpy_record_object): Moved to py-record.h.
8559 * python/py-record.h: New file.
8561 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8563 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
8564 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
8567 2017-05-01 Joel Brobecker <brobecker@adacore.com>
8569 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
8570 the past maintainers section.
8572 2017-04-28 Yao Qi <yao.qi@linaro.org>
8574 * infcmd.c (get_return_value): Use regcache ctor, and remove
8577 2017-04-28 Yao Qi <yao.qi@linaro.org>
8578 Pedro Alves <palves@redhat.com>
8580 * regcache.c (regcache::regcache): New tag dispatch ctor.
8581 (do_cooked_read): Moved above.
8582 (regcache_dup): Use the tag dispatch ctor..
8583 * regcache.h (regcache): Declare ctor, delete copy ctor and
8584 assignment operator, remove friend regcache_dup.
8586 2017-04-28 Yao Qi <yao.qi@linaro.org>
8588 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
8589 call method save instead of regcache_cpy.
8590 * regcache.h (struct regcache): Make regcache_dup a friend.
8592 2017-04-28 Yao Qi <yao.qi@linaro.org>
8594 * regcache.c (struct regcache): Move to regcache.h
8595 (regcache::arch): New method.
8596 (regcache_get_ptid): Update.
8597 (get_regcache_arch): Call arch method.
8598 (get_regcache_aspace): Call method aspace.
8599 (register_buffer): Change it to method.
8600 (regcache_save): Change it to regcache::save.
8601 (regcache_restore): Likewise.
8602 (regcache_cpy_no_passthrough): Remove the declaration.
8603 (regcache_cpy): Call methods restore and cpy_no_passthrough.
8604 (regcache_cpy_no_passthrough): Change it to method
8606 (regcache_register_status): Change it to method
8607 get_register_status.
8608 (regcache_invalidate): Change it to method invalidate.
8609 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
8610 (regcache_raw_update): Change it to method raw_update.
8611 (regcache_raw_read): Likewise.
8612 (regcache_raw_read_signed): Likewise.
8613 (regcache_raw_read_unsigned): Likewise.
8614 (regcache_raw_write_signed): Likewise.
8615 (regcache_raw_write_unsigned): Likewise.
8616 (regcache_cooked_read): Likewise.
8617 (regcache_cooked_read_value): Likewise.
8618 (regcache_cooked_read_signed): Likewise.
8619 (regcache_cooked_read_unsigned): Likewise.
8620 (regcache_cooked_write_signed): Likewise.
8621 (regcache_cooked_write_unsigned): Likewise.
8622 (regcache_raw_set_cached_value): Likewise.
8623 (regcache_raw_write): Likewise.
8624 (regcache_cooked_write): Likewise.
8625 (regcache_xfer_part): Likewise.
8626 (regcache_raw_read_part): Likewise.
8627 (regcache_raw_write_part): Likewise.
8628 (regcache_cooked_read_part): Likewise.
8629 (regcache_cooked_write_part): Likewise.
8630 (regcache_raw_supply): Likewise.
8631 (regcache_raw_collect): Likewise.
8632 (regcache_transfer_regset): Likewise.
8633 (regcache_supply_regset): Likewise.
8634 (regcache_collect_regset): Likewise.
8635 (regcache_debug_print_register): Likewise.
8636 (enum regcache_dump_what): Move it to regcache.h.
8637 (regcache_dump): Change it to method dump.
8638 * regcache.h (enum regcache_dump_what): New.
8639 (class regcache): New.
8640 * target.c (target_fetch_registers): Call method
8641 debug_print_register.
8642 (target_store_registers): Likewise.
8644 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8646 * windows-nat.c (struct lm_info_windows): Initialize field.
8647 (windows_make_so): Allocate lm_info_windows with new.
8648 (windows_free_so): Free lm_info_windows with delete.
8650 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8652 * solib-darwin.c (struct lm_info_darwin): Initialize field.
8653 (darwin_current_sos): Allocate lm_info_darwin with new, remove
8655 (darwin_free_so): Free lm_info_darwin with delete.
8657 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8659 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
8660 <l_addr_p>: Change type to bool.
8661 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
8662 (svr4_free_so): Free lm_info_svr4 with delete.
8663 (svr4_copy_library_list): Replace memcpy with call to copy
8665 (library_list_start_library, svr4_default_sos): Allocate
8666 lm_info_svr4 with new.
8668 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8670 * solib-target.c (struct lm_info_target): Add destructor,
8672 <name>: Change type to std::string.
8673 (library_list_start_library): Allocate lm_info_target with new.
8674 (solib_target_free_library_list): Free lm_info_target with
8676 (solib_target_current_sos): Adapt to std::string.
8677 (solib_target_free_so): Free lm_info_target with delete.
8679 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8681 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
8683 (frv_current_sos): Allocate lm_info_frv with new.
8684 (frv_relocate_main_executable): Free lm_info_frv with delete,
8686 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
8688 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8690 * solib-frv.c (struct lm_info_frv): Fix indentation.
8692 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8694 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
8696 (dsbt_current_sos): Allocate lm_info_dsbt with new.
8697 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
8698 and allocate with new.
8699 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
8701 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8703 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
8704 <filename, member_name>: Change type to std::string.
8705 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
8706 (library_list_start_library): Allocate lm_info_aix with new.
8707 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
8708 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
8709 with copy constructor.
8711 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8713 * solist.h (struct lm_info): Remove.
8714 (struct lm_info_base): New class.
8715 (struct so_list) <lm_info>: Change type to lm_info_base *.
8716 * nto-tdep.c (struct lm_info): Remove.
8718 * solib-aix.c (struct lm_info): Rename to ...
8719 (struct lm_info_aix): ... this. Extend lm_info_base.
8720 (lm_info_p): Rename to ...
8721 (lm_info_aix_p): ... this, and adjust.
8722 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
8723 solib_aix_parse_libraries, library_list_start_library,
8724 solib_aix_free_library_list, solib_aix_parse_libraries,
8725 solib_aix_get_library_list,
8726 solib_aix_relocate_section_addresses, solib_aix_free_so,
8727 solib_aix_get_section_offsets,
8728 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
8730 (struct solib_aix_inferior_data) <library_list>: Adjust.
8731 * solib-darwin.c (struct lm_info): Rename to ...
8732 (struct lm_info_darwin): ... this. Extend lm_info_base.
8733 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
8734 * solib-dsbt.c (struct lm_info): Rename to ...
8735 (struct lm_info_dsbt): ... this. Extend lm_info_base.
8736 (struct dsbt_info) <main_executable_lm_info): Adjust.
8737 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
8738 dsbt_relocate_section_addresses): Adjust.
8739 * solib-frv.c (struct lm_info): Rename to ...
8740 (struct lm_info_frv): ... this. Extend lm_info_base.
8741 (main_executable_lm_info): Adjust.
8742 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
8743 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
8744 find_canonical_descriptor_in_load_object,
8745 frv_fdpic_find_canonical_descriptor): Adjust.
8746 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
8748 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
8749 svr4_clear_so, svr4_copy_library_list,
8750 library_list_start_library, svr4_default_sos, svr4_read_so_list,
8751 svr4_current_sos, svr4_fetch_objfile_link_map,
8752 solist_update_incremental): Adjust.
8753 * solib-svr4.h (struct lm_info_svr4): Move here from
8755 * solib-target.c (struct lm_info): Rename to ...
8756 (struct lm_info_target): ... this. Extend lm_info_base.
8757 (lm_info_p): Rename to ...
8758 (lm_info_target_p): ... this.
8759 (solib_target_parse_libraries, library_list_start_segment,
8760 library_list_start_section, library_list_start_library,
8761 library_list_end_library, solib_target_free_library_list,
8762 solib_target_current_sos, solib_target_free_so,
8763 solib_target_relocate_section_addresses): Adjust.
8764 * windows-nat.c (struct lm_info): Rename to ...
8765 (struct lm_info_windows): ... this. Extend lm_info_base.
8766 (windows_make_so, handle_load_dll, handle_unload_dll,
8767 windows_xfer_shared_libraries): Adjust.
8769 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8771 * solib-darwin.c (struct darwin_so_list): Remove.
8772 (darwin_current_sos): Allocate an so_list object instead of a
8773 darwin_so_list, separately allocate an lm_info object.
8774 (darwin_free_so): Free lm_info.
8776 2017-04-28 John Baldwin <jhb@FreeBSD.org>
8778 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
8779 with fprintf_filtered.
8781 2017-04-28 Yao Qi <yao.qi@linaro.org>
8783 * regcache.c (regcache::regcache): New function.
8784 (regcache::~regcache): New function.
8785 (regcache_xmalloc_1): Remove.
8786 (regcache_xmalloc): Call new regcache.
8787 (regcache_xfree): Call delete regcache.
8788 (get_thread_arch_aspace_regcache): Call new regcache.
8790 2017-04-28 Yao Qi <yao.qi@linaro.org>
8792 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
8793 lwp instead of ptid_get_lwp.
8795 2017-04-28 Yao Qi <yao.qi@linaro.org>
8797 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
8798 lwp_info instead of getting from inferior_ptid.
8800 2017-04-27 Keith Seitz <keiths@redhat.com>
8802 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
8803 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
8804 (CV_CONVERSION_BADNESS): Define.
8805 (rank_one_type): Remove overly restrictive rvalue reference
8807 Add cv-qualifier checks and subranks for type equality.
8808 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
8809 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
8810 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
8812 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
8814 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
8815 count when creating the object.
8817 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
8818 Ulrich Weigand <uweigand@de.ibm.com>
8820 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
8821 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
8823 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
8824 (process_xcoff_symbol): Likewise.
8825 (scan_xcoff_symtab): Likewise.
8827 2017-04-26 Alan Hayward <alan.hayward@arm.com>
8829 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
8830 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
8831 (ia64_access_reg): Use get_frame_register_unsigned.
8832 (ia64_access_rse_reg): Likewise.
8833 (ia64_libunwind_frame_prev_register): Likewise.
8835 2017-04-26 Jiong Wang <jiong.wang@arm.com>
8837 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
8838 * gdbarch.c: Regenerated.
8839 * gdbarch.h: Regenerated.
8840 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
8841 visibility external.
8842 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
8843 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
8844 (enum cfa_how_kind): Move to ...
8845 (struct dwarf2_frame_state_reg_info): Likewise.
8846 (struct dwarf2_frame_state): Likewise.
8847 * dwarf2-frame.h: ... here.
8848 (dwarf2_frame_state_alloc_regs): New declaration.
8849 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
8850 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
8852 2017-04-26 Alan Hayward <alan.hayward@arm.com>
8854 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8855 regcache_raw_read_unsigned.
8856 (xtensa_pseudo_register_write): Likewise.
8858 2017-04-26 Alan Hayward <alan.hayward@arm.com>
8860 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8861 (nds32_pseudo_register_write): Likewise.
8863 2017-04-25 Yao Qi <yao.qi@linaro.org>
8865 * regcache.c (struct regcache) <readonly_p>: Change its type
8867 (regcache_xmalloc_1): Update parameter type and callers update.
8869 2017-04-25 Yao Qi <yao.qi@linaro.org>
8871 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8872 set_gdbarch_wchar_bit.
8873 * arm-tdep.c (arm_gdbarch_init): Likewise.
8875 2017-04-25 Pedro Alves <palves@redhat.com>
8877 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8878 (BothAreRelocatable, memcopy, memmove): Don't define.
8879 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8882 2017-04-25 Pedro Alves <palves@redhat.com>
8884 * common/common-defs.h: Include "common/poison.h".
8885 * common/function-view.h: (Not, Or, Requires): Move to traits.h
8887 * common/poison.h: New file.
8888 * common/traits.h: Include <type_traits>.
8889 (Not, Or, Requires): New, moved from common/function-view.h.
8891 2017-04-25 Pedro Alves <palves@redhat.com>
8893 * breakpoint.h (struct breakpoint): In-class initialize all
8894 fields. Make boolean fields "bool".
8895 * breakpoint.c (init_raw_breakpoint_without_location): Remove
8896 memset call and initializations no longer necessary.
8898 2017-04-25 Pedro Alves <palves@redhat.com>
8900 * btrace.c (pt_btrace_insn_flags): Change parameter type to
8902 (pt_btrace_insn): New function.
8903 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8905 2017-04-25 Pedro Alves <palves@redhat.com>
8907 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
8908 "base" field and inherit from "bp_location" instead. Add
8910 (allocate_location_exception): Use new non-default ctor.
8911 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8912 (init_bp_location): Convert to ...
8913 (bp_location::bp_location): ... this new ctor, and remove memset
8915 (base_breakpoint_allocate_location): Use the new non-default ctor.
8916 * breakpoint.h (bp_location): Now a class. Declare default and
8917 non-default ctors. In-class initialize all members.
8918 (init_bp_location): Remove declaration.
8920 2017-04-25 Pedro Alves <palves@redhat.com>
8922 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8923 assignment operator.
8925 2017-04-24 Yao Qi <yao.qi@linaro.org>
8927 * doublest.c (convert_doublest_to_floatformat): Call
8928 floatformat_totalsize_bytes.
8930 2017-04-22 Tom Tromey <tom@tromey.com>
8932 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8934 * stack.c (print_frame): Use ui_out_emit_list.
8935 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8937 * mi/mi-main.c (print_one_inferior)
8938 (mi_cmd_data_list_register_names)
8939 (mi_cmd_data_list_register_values, mi_cmd_list_features)
8940 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8942 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8943 (mi_output_solib_attribs): Use ui_out_emit_list,
8945 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8946 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8947 (mi_cmd_stack_list_args, list_args_or_locals): Use
8949 * disasm.c (do_assembly_only): Use ui_out_emit_list.
8950 * breakpoint.c (print_solib_event, output_thread_groups): Use
8953 2017-04-22 Tom Tromey <tom@tromey.com>
8955 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8956 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8957 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8959 2017-04-22 Tom Tromey <tom@tromey.com>
8961 * tracepoint.c (tvariables_info_1)
8962 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8964 2017-04-22 Tom Tromey <tom@tromey.com>
8966 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8967 annotate_arg_emitter.
8968 * breakpoint.c (print_mention_watchpoint)
8969 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8970 * annotate.h (struct annotate_arg_emitter): New.
8972 2017-04-22 Tom Tromey <tom@tromey.com>
8974 * record-btrace.c (record_btrace_insn_history)
8975 (record_btrace_insn_history_range, record_btrace_call_history)
8976 (record_btrace_call_history_range): Use ui_out_emit_tuple.
8977 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8979 * stack.c (print_frame_info): Use ui_out_emit_tuple.
8980 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8981 * skip.c (skip_info): Use ui_out_emit_tuple.
8982 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8983 * progspace.c (print_program_space): Use ui_out_emit_tuple.
8984 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8985 * osdata.c (info_osdata): Use ui_out_emit_tuple.
8986 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8988 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8989 (output_register, mi_cmd_data_read_memory)
8990 (mi_cmd_data_read_memory_bytes, mi_load_progress)
8991 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8992 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8993 Use ui_out_emit_tuple.
8994 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8996 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8997 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8998 * linux-thread-db.c (info_auto_load_libthread_db): Use
9000 * inferior.c (print_inferior): Use ui_out_emit_tuple.
9001 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9002 * disasm.c (do_mixed_source_and_assembly_deprecated)
9003 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9004 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9005 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9006 * breakpoint.c (print_one_breakpoint_location)
9007 (print_one_breakpoint): Use ui_out_emit_tuple.
9008 * auto-load.c (print_script, info_auto_load_cmd): Use
9010 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9012 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
9014 * thread.c (print_thread_info_1): Remove dead code.
9016 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9018 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9020 * arm-tdep.c (selftests::arm_record_test): Likewise.
9022 2017-04-21 Yao Qi <yao.qi@linaro.org>
9024 * regcache.c (regcache_restore): Remove argument 2. Replace
9025 argument 3 with regcache. Get register status from
9026 src->register_status and get register contents from
9027 register_buffer (src, regnum).
9028 (regcache_cpy): Update.
9030 2017-04-19 Pedro Alves <palves@redhat.com>
9032 * gdbthread.h (thread): Add missing closing parenthesis in
9035 2017-04-19 Pedro Alves <palves@redhat.com>
9037 * common/refcounted-object.h: New file.
9038 * gdbthread.h: Include "common/refcounted-object.h".
9039 (thread_info): Inherit from refcounted_object and add comments.
9040 (thread_info::incref, thread_info::decref)
9041 (thread_info::m_refcount): Delete.
9042 (thread_info::deletable): Use the refcounted_object::refcount()
9044 * inferior.c (current_inferior_): Add comment.
9045 (set_current_inferior): Increment/decrement refcounts.
9046 (prune_inferiors, remove_inferior_command): Skip inferiors marked
9047 not-deletable instead of comparing with the current inferior.
9048 (initialize_inferiors): Increment the initial inferior's refcount.
9049 * inferior.h (struct inferior): Forward declare.
9050 Include "common/refcounted-object.h".
9051 (current_inferior, set_current_inferior): Move declaration to
9052 before struct inferior's definition, and fix comment.
9053 (inferior): Inherit from refcounted_object. Add comments.
9054 * thread.c (switch_to_thread_no_regs): Reference the thread's
9055 inferior pointer directly instead of doing a ptid lookup.
9056 (switch_to_no_thread): New function.
9057 (switch_to_thread(thread_info *)): New function, factored out
9059 (switch_to_thread(ptid_t)): ... this.
9060 (restore_current_thread): Delete.
9061 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9062 fields, and add 'inf' field.
9063 (do_restore_current_thread_cleanup): Check whether old->inf is
9064 alive instead of looking up an inferior by ptid. Use
9065 switch_to_thread and switch_to_no_thread.
9066 (restore_current_thread_cleanup_dtor): Use old->inf directly
9067 instead of lookup up an inferior by id. Decref the inferior.
9068 Don't restore 'removable'.
9069 (make_cleanup_restore_current_thread): Same the inferior pointer
9070 in old, instead of the inferior number. Incref the inferior.
9071 Don't save/clear 'removable'.
9073 2017-04-19 Pedro Alves <palves@redhat.com>
9075 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9076 unittests/scoped_restore-selftests.c.
9077 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9078 * common/scoped_restore.h (scoped_restore_base): Make "class".
9079 (scoped_restore_base::release): New public method.
9080 (scoped_restore_base::scoped_restore_base): New protected ctor.
9081 (scoped_restore_base::m_saved_var): New protected field.
9082 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9083 scoped_restore_base base class instead of m_saved_var directly.
9084 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9085 (scoped_restore_tmpl::scoped_restore_tmpl(const
9086 scoped_restore_tmpl<T>&)): Likewise.
9087 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9089 (scoped_restore_tmpl::saved_var): New method.
9090 (scoped_restore_tmpl::m_saved_var): Delete.
9091 * inferior.h (inferior::detaching): Now a bool.
9092 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9094 * unittests/scoped_restore-selftests.c: New file.
9096 2017-04-19 Pedro Alves <palves@redhat.com>
9098 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9099 Re-sort in alphabetic order.
9101 2017-04-18 Pedro Alves <palves@redhat.com>
9103 * xml-support.c (obstack_xml_printf): Delete.
9104 * xml-support.h (obstack_xml_printf): Delete.
9106 2017-04-18 Pedro Alves <palves@redhat.com>
9108 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9109 vdebug, verror, body_text, start_element, end_element, name,
9110 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9111 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9112 is_xinclude>: Make private and add m_ prefix.
9113 (gdb_xml_parser::body_text): New method, based on ...
9114 (gdb_xml_body_text): ... this. Adjust.
9115 (gdb_xml_parser::vdebug): New method, based on ...
9116 (gdb_xml_debug): ... this. Adjust.
9117 (gdb_xml_parser::verror): New method, based on ...
9118 (gdb_xml_error): ... this. Adjust.
9119 (gdb_xml_parser::start_element): New method, based on ...
9120 (gdb_xml_start_element): ... this. Adjust.
9121 (gdb_xml_start_element_wrapper): Defer to
9122 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9123 (gdb_xml_parser::end_element): New method, based on ...
9124 (gdb_xml_end_element_wrapper): ... this. Adjust.
9125 (gdb_xml_parser::~gdb_xml_parser): Adjust.
9126 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9127 (gdb_xml_parser::use_dtd): New method, based on ...
9128 (gdb_xml_use_dtd): ... this. Adjust.
9129 (gdb_xml_parser::parse): New method, based on ...
9130 (gdb_xml_parse): ... this. Adjust.
9131 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9132 (xinclude_start_include): Adjust to call the parser's name method.
9133 (xml_xinclude_default, xml_xinclude_start_doctype)
9134 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9136 (xml_process_xincludes): Adjust to call parser methods.
9137 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9140 2017-04-18 Pedro Alves <palves@redhat.com>
9142 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9143 gdb::optional<std::string>.
9144 * xml-support.c: Include <string>.
9145 (scope_level::scope_level(scope_level &&))
9146 (scope_level::~scope_level): Delete.
9147 (scope_level::body): Now a std::string.
9148 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9149 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9151 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9152 (xinclude_parsing_data::output): Now a std::string reference.
9153 (xinclude_start_include): Adjust.
9154 (xml_xinclude_default): Adjust.
9155 (xml_process_xincludes): Add 'output' parameter, and return bool.
9156 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9158 * xml-tdesc.c: Include <unordered_map> and <string>.
9159 (tdesc_xml_cache): Delete.
9160 (tdesc_xml_cache_s): Delete.
9161 (xml_cache): Now an std::unordered_map.
9162 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9163 (target_fetch_description_xml): Change return type to
9164 gdb::optional<std::string>, and adjust.
9165 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9166 (target_fetch_description_xml): Change return type to
9167 gdb::optional<std::string>.
9169 2017-04-18 Pedro Alves <palves@redhat.com>
9171 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9172 unittests/optional-selftests.c.
9173 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9174 * unittests/optional-selftests.c: New file.
9175 * unittests/optional/assignment/1.cc: New file.
9176 * unittests/optional/assignment/2.cc: New file.
9177 * unittests/optional/assignment/3.cc: New file.
9178 * unittests/optional/assignment/4.cc: New file.
9179 * unittests/optional/assignment/5.cc: New file.
9180 * unittests/optional/assignment/6.cc: New file.
9181 * unittests/optional/assignment/7.cc: New file.
9182 * unittests/optional/cons/copy.cc: New file.
9183 * unittests/optional/cons/default.cc: New file.
9184 * unittests/optional/cons/move.cc: New file.
9185 * unittests/optional/cons/value.cc: New file.
9186 * unittests/optional/in_place.cc: New file.
9187 * unittests/optional/observers/1.cc: New file.
9188 * unittests/optional/observers/2.cc: New file.
9190 2017-04-18 Pedro Alves <palves@redhat.com>
9192 * common/gdb_optional.h: Include common/traits.h.
9193 (in_place_t): New type.
9194 (in_place): New constexpr variable.
9195 (optional::optional): Remove member initialization of
9197 (optional::optional(in_place_t...)): New constructor.
9198 (optional::~optional): Use reset.
9199 (optional::optional(const optional&)): New.
9200 (optional::optional(const optional&&)): New.
9201 (optional::optional(T &)): New.
9202 (optional::optional(T &&)): New.
9203 (operator::operator=(const optional &)): New.
9204 (operator::operator=(optional &&)): New.
9205 (operator::operator= (const T &))
9206 (operator::operator= (T &&))
9207 (operator::emplace (Args &&... args)): Return a T&. Use reset.
9208 (operator::reset): New.
9209 (operator::m_instantiated):: Add in-class initializer.
9210 * common/traits.h: Include <type_traits>.
9211 (struct And): New types.
9213 2017-04-18 Pedro Alves <palves@redhat.com>
9215 * xml-support.c: Include <vector>.
9216 (scope_level::scope_level(const gdb_xml_element *))
9217 (scope_level::scope_level(scope_level&&)): New.
9218 (scope_level::~scope_level): New.
9219 (scope_level_s): Delete.
9220 (gdb_xml_parser::scopes): Now a std::vector.
9221 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9223 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9225 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9226 of the scopes member. Use std::vector::emplace_back.
9228 2017-04-18 Pedro Alves <palves@redhat.com>
9230 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
9232 (gdb_xml_end_element): Change type of first parameter.
9233 (gdb_xml_cleanup): Rename to ...
9234 (gdb_xml_parser::~gdb_xml_parser): ... this.
9235 (gdb_xml_create_parser_and_cleanup): Delete with ...
9236 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9238 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9239 using gdb_xml_create_parser_and_cleanup.
9240 (xinclude_parsing_data): Add ctor/dtor.
9241 (xml_xinclude_cleanup): Delete.
9242 (xml_process_xincludes): Create a local xinclude_parsing_data
9243 instead of heap-allocating one. Create a local gdb_xml_parser
9244 instead of heap-allocating one with
9245 gdb_xml_create_parser_and_cleanup.
9247 2017-04-18 John Baldwin <jhb@FreeBSD.org>
9250 * fbsd-nat.c (resume_one_thread_cb): Remove.
9251 (resume_all_threads_cb): Remove.
9252 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9253 iterate_over_threads.
9255 2017-04-17 Joel Brobecker <brobecker@adacore.com>
9257 * NEWS: Create a new section for the next release branch.
9258 Rename the section of the current branch, now that it has
9261 2017-04-17 Joel Brobecker <brobecker@adacore.com>
9263 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9264 * version.in: Bump version to 8.0.50.DATE-git.
9266 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
9269 * windows-nat.c (windows_create_inferior): Declare 'allargs'
9270 independently of the host, and fix build breakage on Cygwin.
9272 2017-04-13 Pedro Alves <palves@redhat.com>
9274 * inferior.c (free_inferior): Convert to ...
9275 (inferior::~inferior): ... this dtor.
9276 (inferior::inferior): New ctor, factored out from ...
9277 (add_inferior_silent): ... here. Allocate the inferior with a new
9279 (delete_inferior): Call delete instead of free_inferior.
9280 * inferior.h (gdb_environ, continuation): Forward declare.
9281 (inferior): Now a class. Add in-class initialization to all
9282 members. Make boolean fields bool, except 'detaching'.
9283 (inferior::inferior): New explicit ctor.
9284 (inferior::~inferior): New.
9286 2017-04-13 Pedro Alves <palves@redhat.com>
9288 * inferior.c (init_inferior_list): Delete.
9289 * inferior.h (init_inferior_list): Delete.
9291 2017-04-13 Pedro Alves <palves@redhat.com>
9294 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
9295 (top level): Call it twice, with different thread sets.
9297 2017-04-13 Pedro Alves <palves@redhat.com>
9299 * thread.c: Include <algorithm>.
9300 (thread_array_cleanup): Delete.
9301 (scoped_inc_dec_ref): New class.
9302 (live_threads_count): New function.
9303 (set_thread_refcount): Delete.
9304 (tp_array_compar_ascending): Now a bool.
9305 (tp_array_compar): Convert to a std::sort comparison function.
9306 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9307 and live_threads_count.
9309 2017-04-13 Pedro Alves <palves@redhat.com>
9311 * infrun.c (follow_fork_inferior): Also switch the current
9314 2017-04-13 Pedro Alves <palves@redhat.com>
9316 * breakpoint.c (watch_command_1): Save watchpoint-frame info
9317 before calling create_internal_breakpoint.
9319 2017-04-13 Pedro Alves <palves@redhat.com>
9321 * fork-child.c (execv_argv): New class.
9322 (breakup_args): Refactored as ...
9323 (execv_argv::init_for_no_shell): .. this method of execv_argv.
9324 Copy arguments to storage and replace separators with NULL
9325 terminators in place.
9326 (escape_bang_in_quoted_argument): Adjust to return bool.
9327 (execv_argv::execv_argv): New ctor.
9328 (execv_argv::init_for_shell): New method, factored out from
9329 fork_inferior. Don't strdup strings into the vector.
9330 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
9331 Remove free_vector_argv call.
9333 2017-04-13 Yao Qi <yao.qi@linaro.org>
9335 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
9338 2017-04-13 Yao Qi <yao.qi@linaro.org>
9340 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
9341 * rx-tdep.c (rx_gdbarch_init): Likewise.
9343 2017-04-13 Pedro Alves <palves@redhat.com>
9345 * breakpoint.h (struct breakpoint): Reindent.
9347 2017-04-13 Pedro Alves <palves@redhat.com>
9349 * breakpoint.c (bp_location): Rename to ...
9350 (bp_locations): ... this. All references updated.
9351 (bp_location_count): Rename to ...
9352 (bp_locations_count): ... this. All references updated.
9353 (bp_location_placed_address_before_address_max): Rename to ...
9354 (bp_locations_placed_address_before_address_max): ... this. All
9356 (bp_location_shadow_len_after_address_max): Rename to ...
9357 (bp_locations_shadow_len_after_address_max): ... this. All
9359 (bp_location_compare_addrs): Rename to ...
9360 (bp_locations_compare_addrs): ... this. All references updated.
9361 (bp_location_compare):Rename to ...
9362 (bp_locations_compare): ... this. All references updated.
9363 (bp_location_target_extensions_update): Rename to ...
9364 (bp_locations_target_extensions_update): ... this. All references
9367 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
9369 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
9370 * common/common.m4: Check headers 'termios.h', 'termio.h' and
9372 * common/gdb_termios.h: New file, with parts of "terminal.h".
9373 * inflow.c: Include "gdb_termios.h".
9374 * ser-unix.c: Include "gdb_termios.h".
9375 * terminal.h: Move terminal-related defines to
9376 "common/gdb_termios.h".
9378 2017-04-12 Tom Tromey <tom@tromey.com>
9380 * probe.c (parse_probes): Update.
9381 * location.h (delete_event_location): Don't declare.
9382 (event_location_deleter::operator()): Update.
9383 * location.c (event_location_deleter::operator()): Rename from
9384 delete_event_location.
9385 * linespec.h (linespec_result) <location>: Change type to
9387 * linespec.c (canonicalize_linespec, event_location_to_sals)
9388 (decode_objc): Update.
9389 (linespec_result): Don't call delete_event_location.
9390 * breakpoint.c (create_breakpoints_sal)
9391 (bkpt_probe_create_sals_from_location)
9392 (strace_marker_create_sals_from_location): Update.
9394 2017-04-12 Tom Tromey <tom@tromey.com>
9396 * linespec.h (struct linespec_result): Add constructor and
9398 (init_linespec_result, destroy_linespec_result)
9399 (make_cleanup_destroy_linespec_result): Don't declare.
9400 * linespec.c (init_linespec_result): Remove.
9401 (linespec_result::~linespec_result): Rename from
9402 destroy_linespec_result. Update.
9403 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
9405 * breakpoint.c (create_breakpoint, break_range_command)
9406 (decode_location_default): Update.
9407 * ax-gdb.c (agent_command_1): Update.
9409 2017-04-12 Tom Tromey <tom@tromey.com>
9411 * remote.c (remote_download_tracepoint): Update.
9412 * python/py-breakpoint.c (bppy_get_location): Update.
9413 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
9414 (gdbscm_breakpoint_location): Update.
9415 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
9416 * breakpoint.h (struct breakpoint) <location, location_range_end>:
9417 Change type to event_location_up.
9418 * breakpoint.c (create_overlay_event_breakpoint)
9419 (create_longjmp_master_breakpoint)
9420 (create_std_terminate_master_breakpoint)
9421 (create_exception_master_breakpoint)
9422 (breakpoint_event_location_empty_p, print_breakpoint_location)
9423 (print_one_breakpoint_location, create_thread_event_breakpoint)
9424 (init_breakpoint_sal, create_breakpoint)
9425 (print_recreate_ranged_breakpoint, break_range_command)
9426 (init_ada_exception_breakpoint, say_where): Update.
9427 (base_breakpoint_dtor): Don't call delete_event_location.
9428 (bkpt_print_recreate, tracepoint_print_recreate)
9429 (dprintf_print_recreate, update_static_tracepoint)
9430 (breakpoint_re_set_default): Update.
9432 2017-04-12 Tom Tromey <tom@tromey.com>
9434 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
9435 type of "to_do". Update.
9436 (compute_stack_depth): Use std::vector.
9438 2017-04-12 Tom Tromey <tom@tromey.com>
9440 * printcmd.c (find_instruction_backward): Use std::vector.
9442 2017-04-12 Tom Tromey <tom@tromey.com>
9444 * symfile.c (objfilep): Remove typedef.
9445 (reread_symbols): Use a std::vector.
9447 2017-04-12 Tom Tromey <tom@tromey.com>
9449 * mi/mi-main.c (exec_direction_forward): Remove.
9450 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
9451 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
9453 * guile/guile.c (guile_repl_command, guile_command)
9454 (gdbscm_execute_gdb_command): Use scoped_restore.
9455 * go-exp.y (go_parse): Use scoped_restore.
9456 * d-exp.y (d_parse): Use scoped_restore.
9457 * cli/cli-decode.c (cmd_func): Use scoped_restore.
9458 * c-exp.y (c_parse): Use scoped_restore.
9460 2017-04-12 Tom Tromey <tom@tromey.com>
9462 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
9463 (mi_parse): Update return type.
9464 (mi_parse_free): Remove.
9465 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
9466 (mi_parse::~mi_parse): Rename from mi_parse_free.
9467 (mi_parse_cleanup): Remove.
9468 (mi_parse): Return a unique_ptr. Use new.
9469 * mi/mi-main.c (mi_execute_command): Update.
9471 2017-04-12 Tom Tromey <tom@tromey.com>
9473 * location.c (explicit_location_lex_one): Return a
9475 (string_to_explicit_location): Update. Remove cleanups.
9477 2017-04-12 Tom Tromey <tom@tromey.com>
9479 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
9480 (compare_value_and_voffset): Change type. Update.
9481 (compute_vtable_size): Change type of "offset_vec".
9482 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
9483 (gnuv3_get_typeid): Remove extraneous declaration.
9485 2017-04-12 Tom Tromey <tom@tromey.com>
9487 * charset.h (wchar_iterator): Fix comment.
9489 2017-04-12 Tom Tromey <tom@tromey.com>
9491 * charset.c (iconv_wrapper): New class.
9492 (cleanup_iconv): Remove.
9493 (convert_between_encodings): Use it.
9495 2017-04-12 Tom Tromey <tom@tromey.com>
9497 * symfile.h (increment_reading_symtab): Update type.
9498 * symfile.c (decrement_reading_symtab): Remove.
9499 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
9500 * psymtab.c (psymtab_to_symtab): Update.
9501 * dwarf2read.c (dw2_instantiate_symtab): Update.
9503 2017-04-12 Tom Tromey <tom@tromey.com>
9505 * jit.c (struct jit_reader): Declare separately. Add constructor
9506 and destructor. Change type of "handle".
9507 (loaded_jit_reader): Define separately.
9508 (jit_reader_load): Update. New "new".
9509 (jit_reader_unload_command): Use "delete".
9510 * gdb-dlfcn.h (struct dlclose_deleter): New.
9511 (gdb_dlhandle_up): New typedef.
9512 (gdb_dlopen, gdb_dlsym): Update types.
9513 (gdb_dlclose): Remove.
9514 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
9515 (gdb_dlsym): Change type of "handle".
9516 (make_cleanup_dlclose): Remove.
9517 (dlclose_deleter::operator()): Rename from gdb_dlclose.
9518 * compile/compile-c-support.c (load_libcc): Update.
9520 2017-04-12 Tom Tromey <tom@tromey.com>
9522 * symtab.h (find_pcs_for_symtab_line): Change return type.
9523 * symtab.c (find_pcs_for_symtab_line): Change return type.
9524 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
9525 type of "vec". Update.
9526 (ltpy_get_pcs_for_line): Update.
9527 * linespec.c (decode_digits_ordinary): Update.
9529 2017-04-12 Tom Tromey <tom@tromey.com>
9531 * tracepoint.c (actions_command): Update.
9532 * python/python.c (python_command, python_interactive_command):
9534 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9535 * guile/guile.c (guile_command): Update.
9536 * defs.h (read_command_lines, read_command_lines_1): Return
9538 (command_lines_deleter): New struct.
9539 (command_line_up): New typedef.
9540 * compile/compile.c (compile_code_command)
9541 (compile_print_command): Update.
9542 * cli/cli-script.h (get_command_line, copy_command_lines): Return
9544 (make_cleanup_free_command_lines): Remove.
9545 * cli/cli-script.c (get_command_line, read_command_lines_1)
9546 (copy_command_lines): Return command_line_up.
9547 (while_command, if_command, read_command_lines, define_command)
9548 (document_command): Update.
9549 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
9551 * breakpoint.h (breakpoint_set_commands): Change type of
9553 * breakpoint.c (breakpoint_set_commands): Change type of
9555 (do_map_commands_command, update_dprintf_command_list)
9556 (create_tracepoint_from_upload): Update.
9558 2017-04-12 Tom Tromey <tom@tromey.com>
9560 * tracepoint.c (scope_info): Update.
9561 * spu-tdep.c (spu_catch_start): Update.
9562 * python/python.c (gdbpy_decode_line): Update.
9563 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
9564 * python/py-breakpoint.c (bppy_init): Update.
9565 * probe.c (parse_probes): Update.
9566 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
9567 * location.h (event_location_deleter): New struct.
9568 (event_location_up): New typedef.
9569 (new_linespec_location, new_address_location, new_probe_location)
9570 (new_explicit_location, copy_event_location)
9571 (string_to_event_location, string_to_event_location_basic)
9572 (string_to_explicit_location): Update return type.
9573 (make_cleanup_delete_event_location): Remove.
9574 * location.c (new_linespec_location, new_address_location)
9575 (new_probe_location, new_explicit_location, copy_event_location):
9576 Return event_location_up.
9577 (delete_event_location_cleanup)
9578 (make_cleanup_delete_event_location): Remove.
9579 (string_to_explicit_location, string_to_event_location_basic)
9580 (string_to_event_location): Return event_location_up.
9581 * linespec.c (canonicalize_linespec, event_location_to_sals)
9582 (decode_line_with_current_source)
9583 (decode_line_with_last_displayed, decode_objc): Update.
9584 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
9585 * completer.c (location_completer): Update.
9586 * cli/cli-cmds.c (edit_command, list_command): Update.
9587 * breakpoint.c (create_overlay_event_breakpoint)
9588 (create_longjmp_master_breakpoint)
9589 (create_std_terminate_master_breakpoint)
9590 (create_exception_master_breakpoint)
9591 (create_thread_event_breakpoint): Update.
9592 (init_breakpoint_sal): Update. Remove some dead code.
9593 (create_breakpoint_sal): Change type of "location". Update.
9594 (create_breakpoints_sal, create_breakpoint, break_command_1)
9595 (dprintf_command, break_range_command, until_break_command)
9596 (init_ada_exception_breakpoint)
9597 (strace_marker_create_sals_from_location)
9598 (update_static_tracepoint, trace_command, ftrace_command)
9599 (strace_command, create_tracepoint_from_upload): Update.
9600 * break-catch-throw.c (re_set_exception_catchpoint): Update.
9601 * ax-gdb.c (agent_command_1): Update.
9603 2017-04-12 Pedro Alves <palves@redhat.com>
9605 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
9606 * configure.tgt: Handle i[34567]86-*-go32* and
9607 i[34567]86-*-msdosdjgpp*.
9608 * i386-tdep.c (i386_svr4_reg_to_regnum):
9610 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
9612 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
9613 * i386-go32-tdep.c: New file.
9614 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
9617 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
9619 * aix-thread.c (pd_status2str): Change return type to const char *.
9621 2017-04-12 Pedro Alves <palves@redhat.com>
9623 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
9624 calls to set_gdbarch_gnu_triplet_regexp.
9626 2017-04-12 Pedro Alves <palves@redhat.com>
9629 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
9631 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
9632 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
9633 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
9634 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
9635 * gdbarch.h, gdbarch.c: Regenerate.
9636 * aarch64-tdep.c (aarch64_gdbarch_init): Override
9637 gdbarch_wchar_bit and gdbarch_wchar_signed.
9638 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
9639 * arm-tdep.c (arm_gdbarch_init): Likewise.
9640 * avr-tdep.c (avr_gdbarch_init): Likewise.
9641 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
9642 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
9643 * i386-tdep.c (i386_go32_init_abi): Likewise.
9644 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9645 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9646 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9647 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9648 * sh-tdep.c (sh_gdbarch_init): Likewise.
9649 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9650 * sparc64-tdep.c (sparc64_init_abi): Likewise.
9651 * windows-tdep.c (windows_init_abi): Likewise.
9652 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9654 2017-04-12 Pedro Alves <palves@redhat.com>
9657 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
9658 cplus_primitive_type_char32_t>: New enum values.
9659 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
9660 and cplus_primitive_type_char32_t.
9661 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
9662 32, use the archtecture's built-in type for char16_t and char32_t,
9663 respectively. Otherwise, fallback to init_integer_type as before,
9664 but make the type unsigned, and issue a complaint.
9665 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
9667 2017-04-12 Alan Hayward <alan.hayward@arm.com>
9669 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
9670 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
9672 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
9674 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
9677 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
9679 * common/common-utils.c (free_vector_argv): New function.
9680 * common/common-utils.h: Include <vector>.
9681 (free_vector_argv): New prototype.
9682 * darwin-nat.c (darwin_create_inferior): Rewrite function
9683 prototype in order to constify "exec_file" and accept a
9684 "std::string" for "allargs".
9685 * fork-child.c: Include <vector>.
9686 (breakup_args): Rewrite function, using C++.
9687 (fork_inferior): Rewrite function header, constify "exec_file_arg"
9688 and accept "std::string" for "allargs". Update the code to
9689 calculate "argv" based on "allargs". Update calls to "exec_fun"
9691 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
9692 order to constify "exec_file" and accept a "std::string" for
9694 * go32-nat.c (go32_create_inferior): Likewise.
9695 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
9696 * infcmd.c (run_command_1): Constify "exec_file". Use
9697 "std::string" for inferior arguments.
9698 * inferior.h (fork_inferior): Update prototype.
9699 * linux-nat.c (linux_nat_create_inferior): Rewrite function
9700 prototype in order to constify "exec_file" and accept a
9701 "std::string" for "allargs".
9702 * nto-procfs.c (procfs_create_inferior): Likewise.
9703 * procfs.c (procfs_create_inferior): Likewise.
9704 * remote-sim.c (gdbsim_create_inferior): Likewise.
9705 * remote.c (extended_remote_run): Update code to accept
9706 "std::string" as argument.
9707 (extended_remote_create_inferior): Rewrite function prototype in
9708 order to constify "exec_file" and accept a "std::string" for
9710 * rs6000-nat.c (super_create_inferior): Likewise.
9711 (rs6000_create_inferior): Likewise.
9712 * target.h (struct target_ops) <to_create_inferior>: Likewise.
9713 * windows-nat.c (windows_create_inferior): Likewise.
9715 2017-04-11 Pedro Alves <palves@redhat.com>
9717 * thread.c: Fix whitespace throughout.
9719 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
9721 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
9723 2017-04-11 Alan Hayward <alan.hayward@arm.com>
9725 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
9727 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
9730 * osdata.c (info_osdata): Check if 'type' is an empty string
9733 2017-04-10 Pedro Alves <palves@redhat.com>
9735 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
9736 (ptid_to_global_thread_id, in_thread_list)
9737 (do_captured_list_thread_ids, set_resumed, set_running)
9738 (set_executing, set_stop_requested, finish_thread_state)
9739 (validate_registers_access, can_access_registers_ptid)
9740 (print_thread_info_1, switch_to_thread)
9741 (do_restore_current_thread_cleanup)
9742 (make_cleanup_restore_current_thread, thread_command)
9743 (thread_name_command): Use operator== instead of ptid_equal.
9745 2017-04-10 Pedro Alves <palves@redhat.com>
9747 * thread.c (struct current_thread_cleanup) <next>: Delete field.
9748 (current_thread_cleanup_chain): Delete.
9749 (restore_current_thread_cleanup_dtor)
9750 (make_cleanup_restore_current_thread): Remove references to
9751 current_thread_cleanup_chain.
9753 2017-04-10 Alan Hayward <alan.hayward@arm.com>
9755 * msp430-tdep.c (msp430_pseudo_register_read): Never return
9758 2017-04-10 Yao Qi <yao.qi@linaro.org>
9761 * gdbthread.h (thread_info::deletable): New method.
9762 (thread_info::incref): New method.
9763 (thread_info::decref): New method.
9764 (thread_info::refcount): Move it to private.
9765 * infrun.c (save_stop_context): Call inc_refcount.
9766 (release_stop_context_cleanup): Likewise.
9767 * thread.c (set_thread_exited): New function.
9768 (init_thread_list): Delete "tp" only it is deletable, otherwise
9769 call set_thread_exited.
9770 (delete_thread_1): Call set_thread_exited.
9771 (current_thread_cleanup) <inferior_pid>: Remove.
9772 <thread>: New field.
9773 (restore_current_thread_ptid_changed): Removed.
9774 (do_restore_current_thread_cleanup): Adjust.
9775 (restore_current_thread_cleanup_dtor): Don't call
9777 (set_thread_refcount): Use dec_refcount.
9778 (make_cleanup_restore_current_thread): Adjust.
9779 (thread_apply_all_command): Call inc_refcount.
9780 (_initialize_thread): Don't call
9781 observer_attach_thread_ptid_changed.
9783 2017-04-10 Yao Qi <yao.qi@linaro.org>
9785 * thread.c (delete_thread_1): Hoist code on marking thread as
9788 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9790 * windows-nat.c (windows_detach): Initialize ptid with
9793 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
9795 * unittests/ptid-selftests.c: Fix erroneous assert messages.
9797 2017-04-07 Alan Hayward <alan.hayward@arm.com>
9799 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
9800 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
9801 (bfin_pseudo_register_write): Likewise
9803 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
9805 * common/ptid.h (struct ptid): Change to...
9806 (class ptid_t): ... this.
9807 <ptid_t>: New constructors.
9808 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
9809 matches>: New methods.
9810 <make_null, make_minus_one>: New static methods.
9817 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
9818 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
9819 as references, move comment to class ptid_t.
9820 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
9821 ptid_t static methods.
9822 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
9823 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
9824 Take ptid arguments as references, implement using ptid_t methods.
9825 * unittests/ptid-selftests.c: New file.
9826 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9827 unittests/ptid-selftests.c.
9828 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
9830 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
9832 * python/python.c (python_run_simple_file): Cast mode literal to
9833 non-const char pointer as expected by PyFile_FromString.
9835 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
9837 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
9838 minus_one_ptid and null_ptid.
9840 2017-04-05 Pedro Alves <palves@redhat.com>
9842 * warning.m4 (build_warnings): Remove -Wno-write-strings.
9843 * configure: Regenerate.
9845 2017-04-05 Pedro Alves <palves@redhat.com>
9847 * ada-exp.y (yyerror): Constify.
9848 * ada-lang.c (bound_name, get_selections)
9849 (ada_variant_discrim_type)
9850 (ada_variant_discrim_name, ada_value_struct_elt)
9851 (ada_lookup_struct_elt_type, is_unchecked_variant)
9852 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
9853 (catch_ada_exception_command_split)
9854 (catch_ada_assert_command_split, catch_assert_command)
9855 (ada_op_name): Constify.
9856 * ada-lang.h (ada_yyerror, get_selections)
9857 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9858 * arc-tdep.c (arc_print_frame_cache): Constify.
9859 * arm-tdep.c (arm_skip_stub): Constify.
9860 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9861 (gen_aggregate_elt_ref): Constify.
9862 * bcache.c (print_bcache_statistics): Constify.
9863 * bcache.h (print_bcache_statistics): Constify.
9864 * break-catch-throw.c (catch_exception_command_1):
9865 * breakpoint.c (struct ep_type_description::description):
9867 (add_solib_catchpoint): Constify.
9868 (catch_fork_command_1): Add cast.
9869 (add_catch_command): Constify.
9870 * breakpoint.h (add_catch_command, add_solib_catchpoint):
9872 * bsd-uthread.c (bsd_uthread_state): Constify.
9873 * buildsym.c (patch_subfile_names): Constify.
9874 * buildsym.h (next_symbol_text_func, patch_subfile_names):
9876 * c-exp.y (yyerror): Constify.
9877 (token::oper): Constify.
9878 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9879 * c-varobj.c (cplus_describe_child): Constify.
9880 * charset.c (find_charset_names): Add cast.
9881 (find_charset_names): Constify array and add const_cast.
9882 * cli/cli-cmds.c (complete_command, cd_command): Constify.
9883 (edit_command): Constify.
9884 * cli/cli-decode.c (lookup_cmd): Constify.
9885 * cli/cli-dump.c (dump_memory_command, dump_value_command):
9887 (struct dump_context): Constify.
9888 (add_dump_command, restore_command): Constify.
9889 * cli/cli-script.c (get_command_line): Constify.
9890 * cli/cli-script.h (get_command_line): Constify.
9891 * cli/cli-utils.c (check_for_argument): Constify.
9892 * cli/cli-utils.h (check_for_argument): Constify.
9893 * coff-pe-read.c (struct read_pe_section_data): Constify.
9894 * command.h (lookup_cmd): Constify.
9895 * common/print-utils.c (decimal2str): Constify.
9896 * completer.c (gdb_print_filename): Constify.
9897 * corefile.c (set_gnutarget): Constify.
9898 * cp-name-parser.y (yyerror): Constify.
9899 * cp-valprint.c (cp_print_class_member): Constify.
9900 * cris-tdep.c (cris_register_name, crisv32_register_name):
9902 * d-exp.y (yyerror): Constify.
9903 (struct token::oper): Constify.
9904 * d-lang.h (d_yyerror): Constify.
9905 * dbxread.c (struct header_file_location::name): Constify.
9906 (add_old_header_file, add_new_header_file, last_function_name)
9907 (dbx_next_symbol_text, add_bincl_to_list)
9908 (find_corresponding_bincl_psymtab, set_namestring)
9909 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9910 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9911 * defs.h (command_line_input, print_address_symbolic)
9912 (deprecated_readline_begin_hook): Constify.
9913 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9915 * event-top.c (handle_line_of_input): Constify and add cast.
9916 * exceptions.c (catch_errors): Constify.
9917 * exceptions.h (catch_errors): Constify.
9918 * expprint.c (print_subexp_standard, op_string, op_name)
9919 (op_name_standard, dump_raw_expression, dump_raw_expression):
9920 * expression.h (op_name, op_string, dump_raw_expression):
9922 * f-exp.y (yyerror): Constify.
9923 (struct token::oper): Constify.
9924 (struct f77_boolean_val::name): Constify.
9925 * f-lang.c (f_word_break_characters): Constify.
9926 * f-lang.h (f_yyerror): Constify.
9927 * fork-child.c (fork_inferior): Add cast.
9928 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9929 (new_variant): Constify.
9930 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9931 * gdbarch.c: Regenerate.
9932 * gdbcore.h (set_gnutarget): Constify.
9933 * go-exp.y (yyerror): Constify.
9934 (token::oper): Constify.
9935 * go-lang.h (go_yyerror): Constify.
9936 * go32-nat.c (go32_sysinfo): Constify.
9937 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9938 * guile/scm-cmd.c (cmdscm_function): Constify.
9939 * guile/scm-param.c (pascm_param_value): Constify.
9940 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9941 (h8300sx_register_name): Constify.
9942 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9944 * ia64-tdep.c (ia64_register_names): Constify.
9945 * infcmd.c (construct_inferior_arguments): Constify.
9946 (path_command, attach_post_wait): Constify.
9947 * language.c (show_range_command, show_case_command)
9948 (unk_lang_error): Constify.
9949 * language.h (language_defn::la_error)
9950 (language_defn::la_name_of_this): Constify.
9951 * linespec.c (decode_line_2): Constify.
9952 * linux-thread-db.c (thread_db_err_str): Constify.
9953 * lm32-tdep.c (lm32_register_name): Constify.
9954 * m2-exp.y (yyerror): Constify.
9955 * m2-lang.h (m2_yyerror): Constify.
9956 * m32r-tdep.c (m32r_register_names): Constify and make static.
9957 * m68hc11-tdep.c (m68hc11_register_names): Constify.
9958 * m88k-tdep.c (m88k_register_name): Constify.
9959 * macroexp.c (appendmem): Constify.
9960 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9961 (upgrade_type, parse_external, parse_partial_symbols)
9962 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9963 (new_symbol): Constify.
9964 * memattr.c (mem_info_command): Constify.
9965 * mep-tdep.c (register_name_from_keyword): Constify.
9966 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9968 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9969 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9970 * mi/mi-main.c (captured_mi_execute_command): Constify and add
9972 (mi_execute_async_cli_command): Constify.
9973 * mips-tdep.c (mips_register_name): Constify.
9974 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9975 (am33_register_name, am33_2_register_name)
9976 * moxie-tdep.c (moxie_register_names): Constify.
9977 * nat/linux-osdata.c (osdata_type): Constify fields.
9978 * nto-tdep.c (nto_parse_redirection): Constify.
9979 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9980 (lookup_child_selector): Constify.
9981 (objc_methcall::name): Constify.
9982 * objc-lang.h (lookup_objc_class, lookup_child_selector)
9983 (lookup_struct_typedef): Constify.
9984 * objfiles.c (pc_in_section): Constify.
9985 * objfiles.h (pc_in_section): Constify.
9986 * p-exp.y (struct token::oper): Constify.
9987 (yyerror): Constify.
9988 * p-lang.h (pascal_yyerror): Constify.
9989 * parser-defs.h (op_name_standard): Constify.
9990 (op_print::string): Constify.
9991 (exp_descriptor::op_name): Constify.
9992 * printcmd.c (print_address_symbolic): Constify.
9993 * psymtab.c (print_partial_symbols): Constify.
9994 * python/py-breakpoint.c (stop_func): Constify.
9995 (bppy_get_expression): Constify.
9996 * python/py-cmd.c (cmdpy_completer::name): Constify.
9997 (cmdpy_function): Constify.
9998 * python/py-event.c (evpy_add_attribute)
9999 (gdbpy_initialize_event_generic): Constify.
10000 * python/py-event.h (evpy_add_attribute)
10001 (gdbpy_initialize_event_generic): Constify.
10002 * python/py-evts.c (add_new_registry): Constify.
10003 * python/py-finishbreakpoint.c (outofscope_func): Constify.
10004 * python/py-framefilter.c (get_py_iter_from_func): Constify.
10005 * python/py-inferior.c (get_buffer): Add cast.
10006 * python/py-param.c (parm_constant::name): Constify.
10007 * python/py-unwind.c (fprint_frame_id): Constify.
10008 * python/python.c (gdbpy_parameter_value): Constify.
10009 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10010 * remote.c (memory_packet_config::name): Constify.
10011 (show_packet_config_cmd, remote_write_bytes)
10012 (remote_buffer_add_string):
10013 * reverse.c (exec_reverse_once): Constify.
10014 * rs6000-tdep.c (variant::name, variant::description): Constify.
10015 * rust-exp.y (rustyyerror): Constify.
10016 * rust-lang.c (rust_op_name): Constify.
10017 * rust-lang.h (rustyyerror): Constify.
10018 * serial.h (serial_ops::name): Constify.
10019 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10020 (sh_sh3e_register_name, sh_sh2e_register_name)
10021 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10022 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10023 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10024 (sh_sh4al_dsp_register_name): Constify.
10025 * sh64-tdep.c (sh64_register_name): Constify.
10026 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10027 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10028 * stabsread.c (patch_block_stabs, read_type_number)
10029 (ref_map::stabs, ref_add, process_reference)
10030 (symbol_reference_defined, define_symbol, define_symbol)
10031 (error_type, read_type, read_member_functions, read_cpp_abbrev)
10032 (read_one_struct_field, read_struct_fields, read_baseclasses)
10033 (read_tilde_fields, read_struct_type, read_array_type)
10034 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10035 (read_huge_number, read_range_type, read_args, common_block_start)
10036 (find_name_end): Constify.
10037 * stabsread.h (common_block_start, define_symbol)
10038 (process_one_symbol, symbol_reference_defined, ref_add):
10039 * symfile.c (get_section_index, add_symbol_file_command):
10040 * symfile.h (get_section_index): Constify.
10041 * target-descriptions.c (tdesc_type::name): Constify.
10042 (tdesc_free_type): Add cast.
10043 * target.c (find_default_run_target):
10044 (add_deprecated_target_alias, find_default_run_target)
10045 (target_announce_detach): Constify.
10046 (do_option): Constify.
10047 * target.h (add_deprecated_target_alias): Constify.
10048 * thread.c (print_thread_info_1): Constify.
10049 * top.c (deprecated_readline_begin_hook, command_line_input):
10051 (init_main): Add casts.
10052 * top.h (handle_line_of_input): Constify.
10053 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10054 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10055 (tfind_command): Rename to ...
10056 (tfind_command_1): ... this and constify.
10057 (tfind_command): New function.
10058 (tfind_end_command, tfind_start_command): Adjust.
10059 (encode_source_string): Constify.
10060 * tracepoint.h (encode_source_string): Constify.
10061 * tui/tui-data.c (tui_partial_win_by_name): Constify.
10062 * tui/tui-data.h (tui_partial_win_by_name): Constify.
10063 * tui/tui-source.c (tui_set_source_content_nil): Constify.
10064 * tui/tui-source.h (tui_set_source_content_nil): Constify.
10065 * tui/tui-win.c (parse_scrolling_args): Constify.
10066 * tui/tui-windata.c (tui_erase_data_content): Constify.
10067 * tui/tui-windata.h (tui_erase_data_content): Constify.
10068 * tui/tui-winsource.c (tui_erase_source_content): Constify.
10069 * tui/tui.c (tui_enable): Add cast.
10070 * utils.c (defaulted_query): Constify.
10071 (init_page_info): Add cast.
10072 (puts_debug, subset_compare): Constify.
10073 * utils.h (subset_compare): Constify.
10074 * varobj.c (varobj_format_string): Constify.
10075 * varobj.h (varobj_format_string): Constify.
10076 * vax-tdep.c (vax_register_name): Constify.
10077 * windows-nat.c (windows_detach): Constify.
10078 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10079 * xml-support.c (gdb_xml_end_element): Constify.
10080 * xml-tdesc.c (tdesc_start_reg): Constify.
10081 * xstormy16-tdep.c (xstormy16_register_name): Constify.
10082 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10083 * xtensa-tdep.h (xtensa_register_t::name): Constify.
10085 2017-04-05 Pedro Alves <palves@redhat.com>
10087 * proc-api.c (struct trans): Constify.
10088 (procfs_note): Constify.
10089 * proc-events.c (struct trans, syscall_table):
10090 * proc-flags.c (struct trans): Constify.
10091 * proc-utils.h (procfs_note): Constify.
10092 * proc-why.c (struct trans): Constify.
10093 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10094 (procfs_detach): Constify.
10095 * sol-thread.c (struct string_map): Constify.
10096 (td_err_string, td_state_string): Constify.
10098 2017-04-05 Pedro Alves <palves@redhat.com>
10100 * proc-api.c (procfs_filename): Don't initialize
10102 (prepare_to_trace): Assume procfs_filename is non-NULL.
10103 (_initialize_proc_api): Give procfs_filename a default value here.
10105 2017-04-05 Pedro Alves <palves@redhat.com>
10107 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10108 'cond_string' parameter.
10109 (extract_exception_regexp): Constify 'string' parameter.
10110 (catch_exception_command_1): Constify.
10111 * breakpoint.c (init_catchpoint)
10112 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10114 (ep_parse_optional_if_clause, catch_fork_command_1)
10115 (catch_exec_command_1): Constify.
10116 * breakpoint.h (init_catchpoint): Constify 'cond_string'
10118 (ep_parse_optional_if_clause): Constify.
10119 * cli/cli-utils.c (remove_trailing_whitespace)
10120 (check_for_argument): Constify.
10121 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10122 non-const overload.
10123 (check_for_argument): Likewise.
10125 2017-04-05 Pedro Alves <palves@redhat.com>
10127 * event-top.c (command_line_handler): Add cast to execute_command
10129 * record-btrace.c (cmd_record_btrace_bts_start)
10130 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10131 (cmd_record_btrace_start): Add cast to execute_command call.
10132 * record-full.c (record_full_goto_insn):
10133 * record.c (record_start, record_stop): Add cast to
10134 execute_command_to_string calls.
10135 (cmd_record_start): Add cast to execute_command calls.
10137 2017-04-05 Pedro Alves <palves@redhat.com>
10139 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10140 static inline function.
10141 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10142 array and use gdb_PyArg_ParseTupleAndKeywords.
10143 * python/py-cmd.c (cmdpy_init): Likewise.
10144 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10145 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10146 (infpy_search_memory): Likewise.
10147 * python/py-objfile.c (objfpy_add_separate_debug_file)
10148 (gdbpy_lookup_objfile): Likewise.
10149 * python/py-symbol.c (gdbpy_lookup_symbol)
10150 (gdbpy_lookup_global_symbol): Likewise.
10151 * python/py-type.c (gdbpy_lookup_type): Likewise.
10152 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10153 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10156 2017-04-05 Pedro Alves <palves@redhat.com>
10158 * python/python-internal.h (gdb_PyGetSetDef): New type.
10159 * python/py-block.c (block_object_getset)
10160 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10161 * python/py-event.c (event_object_getset)
10162 (finish_breakpoint_object_getset): Likewise.
10163 * python/py-inferior.c (inferior_object_getset): Likewise.
10164 * python/py-infthread.c (thread_object_getset): Likewise.
10165 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10166 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10167 * python/py-objfile.c (objfile_getset): Likewise.
10168 * python/py-progspace.c (pspace_getset): Likewise.
10169 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10171 * python/py-record.c (recpy_record_getset): Likewise.
10172 * python/py-symbol.c (symbol_object_getset): Likewise.
10173 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10175 * python/py-type.c (type_object_getset, field_object_getset):
10177 * python/py-value.c (value_object_getset): Likewise.
10179 2017-04-05 Pedro Alves <palves@redhat.com>
10181 * python/python-internal.h (gdb_PyObject_CallMethod)
10182 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10184 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10185 (PySys_GetObject, PySys_SetPath): New macros.
10187 2017-04-05 Pedro Alves <palves@redhat.com>
10189 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10190 info_osdata_command.
10191 * osdata.c (info_osdata_command): Rename to ...
10192 (info_osdata): ... this. Constify 'type' parameter, and remove
10193 the 'from_tty' parameter. Accept NULL TYPE.
10194 (info_osdata_command): New function.
10195 * osdata.h (info_osdata_command): Remove declaration.
10196 (info_osdata): New declaration.
10198 2017-04-05 Pedro Alves <palves@redhat.com>
10200 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
10201 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
10202 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
10204 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
10205 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
10206 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
10208 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
10209 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
10210 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
10211 (mi_cmd_file_list_exec_source_files)
10212 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
10213 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10214 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
10216 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
10217 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
10218 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
10219 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
10220 (mi_cmd_stack_info_frame): Constify 'command' parameter.
10221 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10222 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10223 'command' parameter.
10224 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10225 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10226 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10227 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10228 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10229 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10230 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10231 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10232 (mi_cmd_var_set_update_range): Constify 'command' parameter.
10233 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10234 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10236 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10237 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10238 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10239 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10240 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10241 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10242 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10243 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10244 (mi_cmd_data_list_changed_registers)
10245 (mi_cmd_data_write_register_values)
10246 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10247 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10248 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10249 (mi_cmd_list_features, mi_cmd_list_target_features)
10250 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10251 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10252 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10253 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10254 (mi_cmd_trace_frame_collected): Constify 'command'
10256 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10257 'command' parameter.
10259 2017-04-05 Pedro Alves <palves@redhat.com>
10261 * ada-lang.c (ada_completer_word_break_characters): Now a const
10263 (ada_get_gdb_completer_word_break_characters): Constify.
10264 * completer.c (gdb_completer_command_word_break_characters)
10265 (gdb_completer_file_name_break_characters)
10266 (gdb_completer_quote_characters): Now const arrays.
10267 (get_gdb_completer_quote_characters): Constify.
10268 (set_rl_completer_word_break_characters): New function.
10269 (set_gdb_completion_word_break_characters)
10270 (complete_line_internal): Use it.
10271 * completer.h (get_gdb_completer_quote_characters): Constify.
10272 (set_rl_completer_word_break_characters): Declare.
10273 * f-lang.c (f_word_break_characters): Constify.
10274 * language.c (default_word_break_characters): Constify.
10275 * language.h (language_defn::la_word_break_characters): Constify.
10276 (default_word_break_characters): Constify.
10277 * top.c (init_main): Use set_rl_completer_word_break_characters.
10279 2017-04-05 Pedro Alves <palves@redhat.com>
10281 * aix-thread.c (aix_thread_pid_to_str)
10282 (aix_thread_extra_thread_info): Constify.
10283 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10284 * bsd-uthread.c (bsd_uthread_extra_thread_info)
10285 (bsd_uthread_pid_to_str): Constify.
10286 * corelow.c (core_pid_to_str): Constify.
10287 * darwin-nat.c (darwin_pid_to_str): Constify.
10288 * fbsd-nat.c (fbsd_pid_to_str): Constify.
10289 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
10291 * gnu-nat.c (gnu_pid_to_str): Constify.
10292 * go32-nat.c (go32_pid_to_str): Constify.
10293 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
10294 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
10295 * inferior.c (inferior_pid_to_str): Constify.
10296 * linux-nat.c (linux_nat_pid_to_str): Constify.
10297 * linux-tdep.c (linux_core_pid_to_str): Constify.
10298 * linux-thread-db.c (thread_db_pid_to_str)
10299 (thread_db_extra_thread_info): Constify.
10300 * nto-tdep.c (nto_extra_thread_info): Constify.
10301 * nto-tdep.h (nto_extra_thread_info): Constify.
10302 * obsd-nat.c (obsd_pid_to_str): Constify.
10303 * procfs.c (procfs_pid_to_str): Constify.
10304 * ravenscar-thread.c (ravenscar_extra_thread_info)
10305 (ravenscar_pid_to_str): Constify.
10306 * remote-sim.c (gdbsim_pid_to_str): Constify.
10307 * remote.c (remote_threads_extra_info, remote_pid_to_str):
10309 * sol-thread.c (solaris_pid_to_str): Constify.
10310 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
10311 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
10312 * target.c (default_pid_to_str, target_pid_to_str)
10313 (normal_pid_to_str, default_pid_to_str): Constify.
10314 * target.h (target_ops::to_pid_to_str)
10315 (target_ops::to_extra_thread_info): Constify.
10316 (target_pid_to_str, normal_pid_to_str): Constify.
10317 * windows-nat.c (windows_pid_to_str): Constify.
10318 * gdbarch.sh (core_pid_to_str): Constify.
10319 * target-delegates.c: Regenerate.
10320 * gdbarch.h, gdbarch.c: Regenerate.
10322 2017-04-05 Pedro Alves <palves@redhat.com>
10324 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
10325 the memory of the temporary warning_pre_print override.
10326 * utils.c (warning_pre_print): Constify.
10327 * utils.h (warning_pre_print): Constify.
10329 2017-04-05 Pedro Alves <palves@redhat.com>
10331 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
10332 (shell_command): New function.
10333 (make_command): Use std::string.
10334 (init_cli_cmds): Register shell_command instead of shell_escape.
10336 2017-04-05 Pedro Alves <palves@redhat.com>
10338 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
10339 * tracepoint.c (default_collect): Don't initialize.
10341 2017-04-05 Pedro Alves <palves@redhat.com>
10343 * macroexp.c (macro_buffer::shared): Now a bool.
10344 (init_buffer): Update.
10345 (init_shared_buffer): Constify 'addr' parameter.
10346 (substitute_args, expand, macro_expand, macro_expand_next): Remove
10349 2017-04-05 Pedro Alves <palves@redhat.com>
10351 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
10352 * disasm.c (set_disassembler_options): Constify local.
10353 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
10355 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
10358 * tracefile.c (tsave_command): Fix argument parsing for '-r'
10361 2017-04-05 Yao Qi <yao.qi@linaro.org>
10363 * frame.c (frame_unwind_register_unsigned): Call
10364 frame_unwind_register_value.
10366 2017-04-05 Yao Qi <yao.qi@linaro.org>
10368 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
10369 Use gdb_test_multiple, and don't match anchor.
10371 2017-04-05 Pedro Alves <palves@redhat.com>
10373 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
10374 (Write After Approval): Remove Simon Marchi.
10376 2017-04-05 Pedro Alves <palves@redhat.com>
10378 * common/gdb_optional.h (optional::optional): Make constexpr and
10379 initialize m_dummy.
10381 2017-04-04 John Baldwin <jhb@FreeBSD.org>
10383 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10384 (amd64fbsd_jmp_buf_reg_offset): Remove.
10385 (amd64fbsd_supply_uthread): Remove function.
10386 (amd64fbsd_collect_uthread): Remove function.
10387 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
10388 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
10389 (x86_64-*-freebsd*): Remove bsd-uthread.o.
10390 (fbsd-nat.c): Update comment.
10391 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10392 (i386fbsd_jmp_buf_reg_offset): Remove.
10393 (i386fbsd_supply_uthread): Remove function.
10394 (i386fbsd_collect_uthread): Remove function.
10395 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
10397 2017-04-04 John Baldwin <jhb@FreeBSD.org>
10399 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
10400 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
10401 * NEWS: Mention that support for FreeBSD/alpha was removed.
10402 * alpha-fbsd-tdep.c: Delete file.
10403 * config/alpha/fbsd.mh: Delete file.
10404 * configure.host: Delete alpha*-*-freebsd* and
10405 alpha*-*-kfreebsd*-gnu.
10406 * configure.tgt: Delete alpha*-*-freebsd* and
10407 alpha*-*-kfreebsd*-gnu.
10409 2017-04-04 John Baldwin <jhb@FreeBSD.org>
10411 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
10412 amd64bsd_store_inferior_registers): Use ptid from regcache.
10414 2017-04-04 Pedro Alves <palves@redhat.com>
10416 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
10417 data fields, make them private and add "m_" prefixes.
10418 (lnp_state_machine::lnp_state_machine): New ctor.
10419 (record_line, check_line_address, handle_set_discriminator)
10420 (handle_set_address, handle_advance_pc, handle_special_opcode)
10421 (handle_advance_line, handle_set_file, handle_negate_stmt)
10422 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
10423 (end_sequence, advance_line): New methods.
10424 (m_gdbarch, m_record_lines_p): New fields.
10425 (lnp_reader_state): Delete.
10426 (dwarf_record_line): Rename to ...
10427 (lnp_state_machine::record_line): ... adjust.
10428 (init_lnp_state_machine): Delete.
10429 (lnp_state_machine::lnp_state_machine): New.
10430 (check_line_address): Rename to ...
10431 (lnp_state_machine::check_line_address): This.
10432 (dwarf_decode_lines_1): Remove reference to "reader_state".
10433 Adjust lnp_state_machine having a non-default ctor. Use bool.
10434 State machine internal state manipulation moved to
10435 lnp_state_machine methods.
10437 2017-04-04 Pedro Alves <palves@redhat.com>
10439 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10440 unittests/offset-type-selftests.c.
10441 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
10442 * common/offset-type.h: New file.
10443 * common/preprocessor.h: New file.
10444 * common/traits.h: New file.
10445 * common/valid-expr.h: New file.
10446 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
10447 sect_offset and cu_offset strong typedefs throughout.
10448 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
10449 typedefs throughout.
10450 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
10451 sect_offset and cu_offset strong typedefs throughout.
10452 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
10453 typedefs throughout.
10454 * gdbtypes.h: Include "common/offset-type.h".
10455 (cu_offset): Now an offset type (strong typedef) instead of a
10457 (sect_offset): Likewise.
10458 (union call_site_parameter_u): Rename "param_offset" field to
10460 * unittests/offset-type-selftests.c: New file.
10462 2017-04-04 Pedro Alves <palves@redhat.com>
10464 * common/underlying.h: New file.
10465 * dwarf2read.c: Include "common/gdb_optional.h" and
10466 "common/underlying.h".
10467 (dir_index, file_name_index): New types.
10468 (file_entry): Use them.
10469 (file_entry::include): Use to_underlying.
10470 (line_header::add_file_name): Use dir_index.
10471 (read_formatted_entries): Use gdb::optional. Read form before
10472 writting to file_entry.
10473 (dwarf_decode_line_header): Use dir_index.
10474 (lnp_state_machine::current_file): Use to_underlying.
10475 (lnp_state_machine::file): Change type to file_name_index.
10476 (dwarf_record_line): Use to_underlying.
10477 (init_lnp_state_machine): Use file_name_index.
10478 (dwarf_decode_lines_1): Use dir_index and file_name_index.
10480 2017-04-04 Pedro Alves <palves@redhat.com>
10482 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
10483 operator bool, has_value and get methods.
10485 2017-04-04 Pedro Alves <palves@redhat.com>
10487 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
10489 (line_header): Initialize all data fields. Change type of
10490 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
10491 Change type of include_dirs to std::vector<const char *>. Remove
10492 num_include_dirs, include_dirs_size. Change type of file_names to
10493 std::vector<file_entry>. Remove num_file_names, file_names_size.
10494 (line_header::line_header): New.
10495 (line_header::add_include_dir, line_header::add_file_name): New
10497 (line_header::include_dir_at): Remove NULL check.
10498 (line_header::file_name_at): Add const overload.
10499 (line_header_up): New unique_ptr typedef.
10500 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
10501 std::vector. Remove free_line_header call.
10502 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
10503 free_line_header call.
10504 (free_cu_line_header): Delete.
10505 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
10506 (setup_type_unit_groups): Use line_header_up instead of cleanups.
10507 Adjust to use std::vector.
10508 (free_line_header): Delete.
10509 (free_line_header_voidp): Use delete.
10510 (add_include_dir): Replace with ...
10511 (line_header::add_include_dir): ... this method. Use std::vector.
10512 (add_file_name): Replace with ...
10513 (line_header::add_file_name): ... this method. Use std::vector.
10514 (add_include_dir_stub): Delete.
10515 (read_formatted_entries): Remove memset.
10516 (dwarf_decode_line_header): Return a line_header_up instead of a
10517 raw pointer. Remove cleanup handling. Pass lambdas to
10518 read_formatted_entries. Adjust to use line_header methods.
10519 (dwarf_decode_lines_1): Adjust to use line_header methods.
10520 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
10523 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
10525 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
10526 instead of struct ptid.
10528 2017-05-04 Alan Hayward <alan.hayward@arm.com>
10530 * frame.c (get_frame_register_bytes): Unwind using value.
10531 (put_frame_register_bytes): Likewise.
10533 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
10535 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
10538 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
10540 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
10542 2017-03-29 Yao Qi <yao.qi@linaro.org>
10544 * gdbthread.h (struct thread_info): Declare constructor and
10545 destructor. Add some in-class member initializers.
10546 * thread.c (free_thread): Remove.
10547 (init_thread_list): Call delete instead of free_thread.
10548 (new_thread): Call thread_info constructor.
10549 (thread_info::thread_info): New function.
10550 (thread_info::~thread_info): New function.
10551 (delete_thread_1): Call delete instead of free_thread.
10552 (make_cleanup_restore_current_thread): Move tp and frame to
10555 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10557 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
10558 (arc_skip_prologue): Likewise.
10559 (arc_make_frame_cache): Likewise.
10560 (arc_pv_get_operand): New function.
10561 (arc_is_in_prologue): Likewise.
10562 (arc_analyze_prologue): Likewise.
10563 (arc_print_frame_cache): Likewise.
10564 (MAX_PROLOGUE_LENGTH): New constant.
10566 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10568 * configure.tgt: Add arc-insn.o.
10569 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
10570 (dump_arc_instruction_command): New function.
10571 (arc_fprintf_disasm): Likewise.
10572 (arc_disassemble_info): Likewise.
10573 (arc_insn_get_operand_value): Likewise.
10574 (arc_insn_get_operand_value_signed): Likewise.
10575 (arc_insn_get_memory_base_reg): Likewise.
10576 (arc_insn_get_memory_offset): Likewise.
10577 (arc_insn_get_branch_target): Likewise.
10578 (arc_insn_dump): Likewise.
10579 (arc_insn_get_linear_next_pc): Likewise.
10580 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
10581 (arc_disassemble_info): Likewise.
10582 (arc_insn_get_branch_target): Likewise.
10583 (arc_insn_get_linear_next_pc): Likewise.
10584 * NEWS: Mention new "maint print arc arc-instruction".
10586 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10588 * arc-tdep (maintenance_print_arc_list): New variable.
10589 (maintenance_print_arc_command): New function.
10591 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10593 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
10594 Add "limm" and "reserved".
10595 (arc_cannot_fetch_register, arc_cannot_store_register): Add
10596 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
10597 * arc-tdep.h (arc_regnum): Likewise.
10599 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10601 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10602 for THREADPTR register.
10603 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
10605 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
10606 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
10607 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
10609 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10611 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
10612 registers above gdbarch_num_regs (gdbarch) as privileged in
10615 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10617 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10618 for a single specified register or for all registers in
10619 a0_base..a0_base + C0_NREGS range.
10620 (supply_gregset_reg): Call regcache_raw_supply for a single
10621 specified register or for all registers in a0_base..a0_base +
10624 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10626 * arch/xtensa.h (C0_NREGS): Add definition.
10627 * xtensa-tdep.c (C0_NREGS): Remove definition.
10629 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10631 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
10632 Drop xtensa_default_isa initialization.
10633 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
10635 2017-03-27 Pedro Alves <palves@redhat.com>
10637 * dwarf2read.c (file_entry) <dir_index>: Add comment.
10638 (file_entry::include_dir): New method.
10639 (line_header::include_dir_at, line_header::file_name_at): New
10641 (setup_type_unit_groups, setup_type_unit_groups)
10642 (psymtab_include_file_name): Simplify using the new methods.
10643 (lnp_state_machine) <the_line_header>: New field.
10644 <file>: Add comment.
10645 (lnp_state_machine::current_file): New method.
10646 (dwarf_record_line): Simplify using the new methods.
10647 (init_lnp_state_machine): Initialize the "the_line_header" field.
10648 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
10649 Simplify using the new methods.
10651 2017-03-27 Pedro Alves <palves@redhat.com>
10653 * cp-name-parser.y (make_empty): Delete.
10654 (demangler_special, nested_name, ptr_operator, array_indicator)
10655 (direct_declarator, declarator_1): Use fill_comp instead of
10658 2017-03-27 Pedro Alves <palves@redhat.com>
10660 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
10661 to ATTRIBUTE_PRINTF.
10662 * solib-target.c (library_list_start_list): Print "string" not
10664 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
10665 gdb_xml_error call.
10667 2017-03-27 Pedro Alves <palves@redhat.com>
10669 * dwarf2read.c (struct file_and_directory): New.
10670 (dwarf2_get_dwz_file): Adjust to use std::string.
10671 (dw2_get_file_names_reader): Adjust to use file_and_directory.
10672 (find_file_and_directory): Adjust to return a file_and_directory
10674 (read_file_scope): Adjust to use file_and_directory. Remove
10675 make_cleanup/do_cleanups calls.
10676 (open_and_init_dwp_file): Adjust to use std::string. Remove
10677 make_cleanup/do_cleanups calls.
10678 * python/python.c (do_start_initialization): Adjust to ldirname
10679 returning a std::string.
10680 * utils.c (ldirname): Now returns a std::string.
10681 * utils.h (ldirname): Change return type to std::string.
10682 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
10683 returning a std::string.
10684 * xml-tdesc.c (file_read_description_xml): Likewise.
10686 2017-03-24 Alan Hayward <alan.hayward@arm.com>
10688 * regcache.c (regcache_debug_print_register): New function.
10689 * regcache.h (regcache_debug_print_register): New declaration.
10690 * target.c (debug_print_register): Remove.
10691 (target_fetch_registers): Call regcache_debug_print_register.
10692 (target_store_registers): Likewise.
10694 2017-03-24 Pádraig Brady <pbrady@fb.com>
10696 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
10697 reference beyond the 'lh->include_dirs' array before accessing to
10699 (psymtab_include_file_name): Likewise.
10700 (dwarf_decode_lines_1): Likewise.
10701 (dwarf_decode_lines): Likewise.
10702 (file_file_name): Likewise.
10704 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
10706 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
10708 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10709 ps_lsetfpregs): Likewise.
10710 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
10711 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10712 ps_lsetfpregs): Likewise.
10713 * target.c (target_fetch_registers, target_store_registers):
10716 2017-03-23 Alan Hayward <alan.hayward@arm.com>
10718 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
10720 2017-03-23 Yao Qi <yao.qi@linaro.org>
10722 * aarch64-tdep.c (aarch64_process_record_test): Declare.
10723 (_initialize_aarch64_tdep): Register it.
10724 (aarch64_record_load_store): Handle PRFM instruction.
10725 (aarch64_process_record_test): New function.
10727 2017-03-23 Yao Qi <yao.qi@linaro.org>
10729 * aarch64-tdep.c (aarch64_record_load_store): Fix code
10732 2017-03-23 Yao Qi <yao.qi@linaro.org>
10734 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
10736 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10738 python/python.c (do_start_initialization): Fix memory leak.
10740 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10742 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
10743 using get_ptrace_pid.
10744 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
10746 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
10747 inferior_ptid instead of pid.
10749 2017-03-22 Yao Qi <yao.qi@linaro.org>
10751 * aarch64-tdep.c: Wrap locally used classes in anonymous
10753 * arm-tdep.c: Likewise.
10754 * linespec.c: Likewise.
10755 * ui-out.c: Likewise.
10757 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
10760 * python/lib/gdb/printer/bound_registers.py: Import sys.
10762 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
10764 * windows-nat.c (do_windows_fetch_inferior_registers): Add
10765 windows_thread_info parameter and use it instead of
10767 (windows_fetch_inferior_registers): Don't set current_thread,
10768 pass the thread to do_windows_fetch_inferior_registers. Use
10769 ptid from regcache instead of inferior_ptid.
10770 (do_windows_store_inferior_registers): Add windows_thread_info
10771 parameter and use it instead of current_thread.
10772 (windows_store_inferior_registers): Don't set current_thread,
10773 pass the thread to do_windows_store_inferior_registers. Use
10774 ptid from regcache instead of inferior_ptid.
10776 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
10778 * ser-mingw.c (ser_windows_raw): Remove reference to
10779 struct serial::current_timeout.
10781 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
10784 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
10785 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
10786 (sparc64_fsr_type): Fix %fsr decoding.
10788 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
10790 * python/py-record-btrace.c (btpy_insn_data): Change return type
10793 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
10795 * spu-linux-nat.c (spu_fetch_inferior_registers,
10796 spu_store_inferior_registers): Use ptid from regcache, set and
10797 restore inferior_ptid.
10798 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
10801 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
10803 * i386-linux-nat.c (fetch_register, store_register,
10804 i386_linux_fetch_inferior_registers,
10805 i386_linux_store_inferior_registers): Use ptid from regcache.
10806 * ia64-linux-nat.c (ia64_linux_fetch_register,
10807 ia64_linux_store_register): Likewise.
10808 * inf-ptrace.c (inf_ptrace_fetch_register,
10809 inf_ptrace_store_register): Likewise.
10810 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
10811 m32r_linux_store_inferior_registers): Likewise.
10812 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
10813 m68kbsd_store_inferior_registers): Likewise.
10814 * m68k-linux-nat.c (fetch_register, store_register,
10815 m68k_linux_fetch_inferior_registers,
10816 m68k_linux_store_inferior_registers): Likewise.
10817 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
10818 m88kbsd_store_inferior_registers): Likewise.
10819 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
10820 mips_fbsd_store_inferior_registers): Likewise.
10821 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
10822 mips64_linux_regsets_store_registers): Likewise.
10823 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
10824 mipsnbsd_store_inferior_registers): Likewise.
10825 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
10826 mips64obsd_store_inferior_registers): Likewise.
10827 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
10829 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
10830 ppcfbsd_store_inferior_registers): Likewise.
10831 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
10832 ppc_linux_store_inferior_registers): Likewise.
10833 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
10834 ppcnbsd_store_inferior_registers): Likewise.
10835 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
10836 ppcobsd_store_registers): Likewise.
10837 * procfs.c (procfs_fetch_registers, procfs_store_registers):
10839 * ravenscar-thread.c (ravenscar_fetch_registers,
10840 ravenscar_store_registers, ravenscar_prepare_to_store):
10842 * record-btrace.c (record_btrace_fetch_registers,
10843 record_btrace_store_registers, record_btrace_prepare_to_store):
10845 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
10846 Lookup inferior using ptid from regcache, instead of
10848 * remote.c (remote_fetch_registers, remote_store_registers): Use
10849 ptid from regcache.
10850 * rs6000-nat.c (fetch_register, store_register): Likewise.
10851 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
10852 s390_linux_store_inferior_registers): Likewise.
10853 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10854 shnbsd_store_inferior_registers): Likewise.
10855 * sol-thread.c (sol_thread_fetch_registers,
10856 sol_thread_store_registers): Likewise.
10857 * sparc-nat.c (sparc_fetch_inferior_registers,
10858 sparc_store_inferior_registers): Likewise.
10859 * tilegx-linux-nat.c (fetch_inferior_registers,
10860 store_inferior_registers): Likewise.
10861 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10862 vaxbsd_store_inferior_registers): Likewise.
10863 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10864 store_xtregs): Likewise.
10866 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10869 * NEWS: Mention support for rvalue references in GDB and python.
10870 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10871 supports both lvalue and rvalue references.
10873 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10876 * gdbtypes.c (rank_one_type): Implement overloading
10877 resolution rules regarding rvalue references.
10879 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10882 * aarch64-tdep.c (aarch64_type_align)
10883 (aarch64_extract_return_value, aarch64_store_return_value): Change
10884 lvalue reference type checks to general reference type checks.
10885 * amd64-tdep.c (amd64_classify): Likewise.
10886 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10888 * arm-tdep.c (arm_type_align, arm_extract_return_value)
10889 (arm_store_return_value): Likewise.
10890 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10891 * c-typeprint.c (c_print_type): Likewise.
10892 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10893 (cplus_number_of_children, cplus_describe_child): Likewise.
10894 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10895 * completer.c (expression_completer): Likewise.
10896 * cp-support.c (make_symbol_overload_list_adl_namespace):
10898 * darwin-nat-info.c (info_mach_region_command): Likewise.
10899 * dwarf2loc.c (entry_data_value_coerce_ref)
10900 (value_of_dwarf_reg_entry): Likewise.
10901 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10902 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10904 * findvar.c (extract_typed_address, store_typed_address):
10906 * gdbtypes.c (rank_one_type): Likewise.
10907 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10908 * infcall.c (value_arg_coerce): Likewise.
10909 * language.c (pointer_type): Likewise.
10910 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10912 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10913 * mn10300-tdep.c (mn10300_type_align): Likewise.
10914 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10915 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10916 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10918 * printcmd.c (print_formatted, x_command): Likewise.
10919 * python/py-type.c (typy_get_composite, typy_template_argument):
10921 * python/py-value.c (valpy_referenced_value)
10922 (valpy_get_dynamic_type, value_has_field): Likewise.
10923 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10924 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10925 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10926 * spu-tdep.c (spu_scalar_value_p): Likewise.
10927 * symtab.c (lookup_symbol_aux): Likewise.
10928 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10929 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10931 * valops.c (value_cast_pointers, value_cast)
10932 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10933 (value_struct_elt, value_struct_elt_bitpos)
10934 (value_find_oload_method_list, find_overload_match)
10935 (value_rtti_indirect_type): Likewise.
10936 * valprint.c (val_print_scalar_type_p, generic_val_print):
10938 * value.c (value_actual_type, value_as_address, unpack_long)
10939 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10940 (coerce_ref): Likewise.
10941 * varobj.c (varobj_get_value_type): Likewise.
10943 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10946 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10947 table of constants.
10948 * python/lib/gdb/command/explore.py: Support exploring values
10949 of rvalue reference types.
10950 * python/lib/gdb/types.py: Implement get_basic_type() for
10951 rvalue reference types.
10952 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10954 * python/py-value.c (valpy_getitem): Add an rvalue reference
10956 (valpy_reference_value): Add new parameter "refcode".
10957 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10958 New wrappers for valpy_reference_value().
10959 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10960 (gdbpy_invoke_xmethod): Likewise.
10962 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10965 * dwarf2read.c (process_die, read_type_die_1): Handle the
10966 DW_TAG_rvalue_reference_type DIE.
10967 (read_tag_reference_type): Add new parameter "refcode".
10969 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10972 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10973 (c_type_print_modifier, c_type_print_varspec_suffix)
10974 (c_type_print_base): Support printing rvalue reference types.
10975 * c-valprint.c (c_val_print, c_value_print): Support printing
10976 rvalue reference values.
10978 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10981 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10983 * cp-support.c (replace_typedefs): Handle
10984 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10985 * python/py-type.c (typy_lookup_type): Likewise.
10987 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10990 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10991 * parse.c (insert_type): Change assert statement.
10992 (follow_types): Handle rvalue reference types.
10993 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10996 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10999 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11000 value_ref() interface.
11001 * c-valprint.c (c_value_print): Likewise.
11002 * infcall.c (value_arg_coerce): Likewise.
11003 * python/py-value.c (valpy_reference_value): Likewise.
11004 * valops.c (value_cast, value_reinterpret_cast)
11005 (value_dynamic_cast, typecmp): Likewise.
11006 (value_ref): Parameterize by kind of return value reference type.
11007 * value.h (value_ref): Add new parameter "refcode".
11009 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11012 * dwarf2read.c (read_tag_reference_type): Use
11013 lookup_lvalue_reference_type() instead of lookup_reference_type().
11014 * eval.c (evaluate_subexp_standard): Likewise.
11015 * f-exp.y: Likewise.
11016 * gdbtypes.c (make_reference_type, lookup_reference_type):
11017 Generalize with rvalue reference types.
11018 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11019 convenience wrappers for lookup_reference_type().
11020 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11021 reference kind parameter.
11022 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11023 wrappers for lookup_reference_type().
11024 * guile/scm-type.c (gdbscm_type_reference): Use
11025 lookup_lvalue_reference_type() instead of lookup_reference_type().
11026 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11027 * parse.c (follow_types): Likewise.
11028 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11029 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11031 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11032 (gdbpy_invoke_xmethod): Likewise.
11033 * stabsread.c: Provide extra argument to make_reference_type()
11035 * valops.c (value_ref, value_rtti_indirect_type): Use
11036 lookup_lvalue_reference_type() instead of lookup_reference_type().
11038 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11041 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11042 (TYPE_IS_REFERENCE): New macro.
11043 (struct type): Add rvalue_reference_type field.
11044 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11046 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
11048 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11049 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11050 New function definition.
11051 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11052 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11053 New function declaration.
11054 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11055 * mi/mi-interp.h: New file.
11056 * solib.c (info_sharedlibrary_command): Replace for loop with
11058 * solib.h (update_solib_list): New function declaration.
11059 (so_list_head): Move macro.
11060 * solist.h (ALL_SO_LIBS): New macro.
11062 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
11064 * infcmd.c (post_create_inferior): Remove unused argument in
11066 * remote.c (remote_start_remote): Likewise.
11067 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11068 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11069 (enable_break): Likewise.
11070 * solib.c (update_solib_list): Remove unused target argument
11071 and its documentation.
11072 (solib_add): Remove unused target argument. Remove unused
11073 argument in call to update_solib_list.
11074 (info_sharedlibrary_command): Remove unused argument in call
11075 to update_solib_list.
11076 (sharedlibrary_command): Remove unused argument in call to
11078 (handle_solib_event): Likewise.
11079 (reload_shared_libraries): Likewise.
11080 * solib.h (solib_add): Remove unused target argument.
11082 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
11084 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11085 (s390_displaced_step_fixup): Cover relative branches with the
11086 default fixup handling. This fixes lack of support for some
11087 relative branch instructions.
11089 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11091 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11092 ptid from regcache.
11094 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11096 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11097 i386_darwin_store_inferior_registers): Use ptid from regcache.
11099 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11101 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11102 i386bsd_store_inferior_registers): Use ptid from regcache.
11104 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11106 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11107 hppaobsd_store_registers): Use ptid from regcache.
11109 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11111 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11112 hppanbsd_store_registers): Use ptid from regcache.
11114 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11116 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11117 from regcache. Use get_ptrace_pid.
11119 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11121 * corelow.c (get_core_register_section): Use ptid from regcache,
11124 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11126 * bsd-uthread.c (bsd_uthread_fetch_registers,
11127 bsd_uthread_store_registers): Use ptid from regcache, set and
11128 restore inferior_ptid.
11130 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11132 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11133 fetch_fp_regs, store_register, store_regs, store_fp_register,
11134 store_fp_regs): Use ptid from regcache.
11136 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11138 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11139 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11140 store_vfp_regs): Use ptid from regcache.
11142 2017-03-17 Pedro Alves <palves@redhat.com>
11145 * ser-base.c (ser_base_wait_for): Add comment.
11146 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11148 * ser-unix.c (hardwire_raw): Remove reference to
11149 scb->current_timeout.
11150 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11151 (hardwire_ops): Install ser_base_readchar instead of
11153 * serial.h (struct serial) <current_timeout, timeout_remaining>:
11156 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
11159 * python/lib/gdb/printer/bound_registers.py: Add support for
11162 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
11164 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11165 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11166 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11167 byte_offset to subobj_byte_offset. Fix the handling of
11168 DWARF_VALUE_STACK on big-endian targets when coming via an
11170 (dwarf2_evaluate_loc_desc): Adjust call to
11171 dwarf2_evaluate_loc_desc_full.
11172 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11173 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11175 2017-03-16 Yao Qi <yao.qi@linaro.org>
11177 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11178 and REVSH instructions.
11180 2017-03-16 Yao Qi <yao.qi@linaro.org>
11182 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11183 (arm_record_test): Declare.
11184 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11185 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11186 align with the manual.
11187 (thumb_record_misc): Adjust the code order to align with the
11189 (thumb2_record_decode_insn_handler): Fix instruction matching.
11190 (instruction_reader_thumb): New class.
11191 (arm_record_test): New function.
11193 2017-03-16 Yao Qi <yao.qi@linaro.org>
11195 * arm-tdep.c (abstract_memory_reader): New class.
11196 (instruction_reader): New class.
11197 (extract_arm_insn): Add argument 'reader'. Callers updated.
11198 (decode_insn): Likewise.
11200 2017-03-16 Doug Evans <dje@google.com>
11202 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
11203 member. Change type of TYPE member to SCM. All uses updated.
11204 (lsscm_make_lazy_string_smob): Add assert.
11205 (lsscm_make_lazy_string): Flag bad length values.
11206 (lsscm_elt_type): New function.
11207 (gdbscm_lazy_string_to_value): Rewrite to use
11208 lsscm_safe_lazy_string_to_value.
11209 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
11210 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
11211 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
11213 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11214 * guile/scm-type.c (tyscm_scm_to_type): New function.
11216 2017-03-15 Doug Evans <dje@google.com>
11218 PR python/17728, python/18439, python/18779
11219 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
11220 member. Change type of TYPE member to PyObject *. All uses updated.
11221 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11222 (gdbpy_create_lazy_string_object): Flag bad length values.
11223 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11224 Handle typedefs in incoming type.
11225 (stpy_lazy_string_elt_type): New function.
11226 (gdbpy_extract_lazy_string): Call it.
11227 * python/py-value.c (valpy_lazy_string): Flag bad length values.
11228 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
11229 typedefs in incoming type.
11231 2017-03-16 Doug Evans <dje@google.com>
11233 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11234 * guile/scm-type.c (tyscm_scm_to_type): New function.
11236 2017-03-16 Jiong Wang <jiong.wang@arm.com>
11238 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11239 "ULONGEST" for "skip".
11241 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
11244 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11245 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11246 (inf_ptrace_peek_poke): ...here. New function. Now also loop
11247 over ptrace peek/poke until end of buffer or error.
11249 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
11251 * parse.c (length_of_subexp): Make static.
11252 * parser-defs.h (length_of_subexp): Remove.
11254 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
11256 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11259 2017-03-14 Pedro Alves <palves@redhat.com>
11261 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11262 (main): Use std::unique_ptr. Remove calls to
11263 cp_demangled_name_parse_free.
11265 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11267 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11268 alphabsd_store_inferior_registers): Use regcache->ptid instead
11271 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11273 * aix-thread.c (aix_thread_fetch_registers,
11274 aix_thread_store_registers): Use regcache->ptid instead of
11277 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11279 * aarch64-linux-nat.c (fetch_gregs_from_thread,
11280 store_gregs_to_thread, fetch_fpregs_from_thread,
11281 store_fpregs_to_thread): Use regcache->ptid instead of
11284 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11286 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11287 amd64_linux_fetch_inferior_registers): Use regcache->ptid
11288 instead of inferior_ptid.
11290 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11292 * target.c (target_fetch_registers, target_store_registers): Add
11295 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11297 * regcache.h (regcache_get_ptid): New function.
11298 * regcache.c (regcache_get_ptid): New function.
11300 2017-03-13 Mark Wielaard <mark@klomp.org>
11302 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11304 2017-03-10 Keith Seitz <keiths@redhat.com>
11307 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11309 2017-03-08 Pedro Alves <palves@redhat.com>
11312 * infrun.c (start_step_over, do_target_resume, resume)
11313 (restart_threads): Assert we're not resuming a thread that is
11314 meant to be stopped.
11315 (infrun_thread_stop_requested_callback): Delete.
11316 (infrun_thread_stop_requested): If the thread is internally
11317 stopped, queue a pending stop event and clear the thread's
11318 inline-frame state.
11319 (handle_stop_requested): New function.
11320 (handle_syscall_event, handle_inferior_event_1): Use
11321 handle_stop_requested.
11322 (handle_stop_requested): New function.
11323 (handle_signal_stop): Set the thread's stop_signal here instead of
11325 (finish_step_over): Clear step over info unconditionally.
11326 (handle_signal_stop): If the user had interrupted the event
11327 thread, consider the stop a random signal.
11328 (handle_signal_stop) <signal arrived while stepping over
11329 breakpoint>: Don't restart threads here.
11330 (stop_waiting): Don't clear step-over info here.
11332 2017-03-08 Pedro Alves <palves@redhat.com>
11335 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
11336 goes to argument 2, not 1.
11338 2017-03-08 Pedro Alves <palves@redhat.com>
11341 * top.c (gdb_readline_wrapper): Avoid passing NULL to
11342 display_gdb_prompt.
11343 (command_line_input): Add comment.
11345 2017-03-08 Pedro Alves <palves@redhat.com>
11348 * tui/tui-file.c (tui_file::write): New.
11349 * tui/tui-file.h (tui_file): Override "write".
11350 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
11351 factored out from ...
11352 (tui_puts): ... here.
11353 (tui_putc): Use them.
11354 (tui_write): New function.
11355 * tui/tui-io.h (tui_write): Declare.
11357 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
11359 * Makefile.in (SFILES): Replace "environ.c" with
11360 "common/environ.c".
11361 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
11362 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
11364 * common/environ.c: ... here.
11365 * environ.h: Moved to...
11366 * common/environ.h: ... here.
11368 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
11370 * gdbarch.sh (pstring_ptr): New static function.
11371 (gdbarch_disassembler_options): Use it.
11372 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
11373 not valid_disassembler_option->name.
11374 * gdbarch.c: Regenerate.
11376 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
11378 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
11380 2017-03-07 Pedro Alves <palves@redhat.com>
11382 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
11384 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
11386 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
11387 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
11388 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
11389 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
11391 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
11393 * xtensa-linux-nat.c (fetch_gregs): Remove const.
11395 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
11397 * remote.c (remote_add_target_side_commands): Use range-based
11400 2017-03-03 Yao Qi <yao.qi@linaro.org>
11403 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
11405 * valprint.c (common_val_print): Likewise.
11407 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
11409 * NEWS: Mention new set/show disassembler-options commands.
11410 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
11411 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
11412 (prospective_options): New static variable.
11413 (gdb_disassembler::gdb_disassembler): Initialize
11414 m_di.disassembler_options.
11415 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
11416 (get_disassembler_options): New function.
11417 (set_disassembler_options): Likewise.
11418 (set_disassembler_options_sfunc): Likewise.
11419 (show_disassembler_options_sfunc): Likewise.
11420 (disassembler_options_completer): Likewise.
11421 (_initialize_disasm): Likewise.
11422 * disasm.h (get_disassembler_options): New prototype.
11423 (set_disassembler_options): Likewise.
11424 * gdbarch.sh (gdbarch_disassembler_options): New variable.
11425 (gdbarch_verify_disassembler_options): Likewise.
11426 * gdbarch.c: Regenerate.
11427 * gdbarch.h: Likewise.
11428 * arm-tdep.c (num_disassembly_options): Delete.
11429 (set_disassembly_style): Likewise.
11430 (arm_disassembler_options): New static variable.
11431 (set_disassembly_style_sfunc): Convert short style name into long
11432 option name. Call set_disassembler_options.
11433 (show_disassembly_style_sfunc): New function.
11434 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
11435 set_gdbarch_verify_disassembler_options.
11436 (_initialize_arm_tdep): Delete regnames variable and update callers.
11437 (arm_disassembler_options): Initialize.
11438 (disasm_options): New variable.
11439 (num_disassembly_options): Rename from this...
11440 (num_disassembly_styles): ...to this. Compute by scanning through
11442 (valid_disassembly_styles): Initialize using disasm_options.
11443 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
11444 set_arm_regname_option.
11445 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
11446 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
11447 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
11448 set_gdbarch_verify_disassembler_options.
11449 * s390-tdep.c (s390_disassembler_options): New static variable.
11450 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
11451 set_gdbarch_verify_disassembler_options.
11453 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
11455 * remote.c (remote_add_target_side_condition): Remove "struct"
11456 keyword from range-based for loop.
11458 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
11460 * remote.c (remote_add_target_side_condition): Use range-based
11461 for loop. Update comment.
11463 2017-02-27 Yao Qi <yao.qi@linaro.org>
11465 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
11467 2017-02-26 Alan Hayward <alan.hayward@arm.com>
11469 * regcache.c (regcache_raw_update): New function.
11470 (regcache_raw_read): Move code to regcache_raw_update.
11471 * regcache.h (regcache_raw_update): New declaration.
11472 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
11474 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
11476 * dwarf2read.c (create_debug_type_hash_table): Initialize
11477 header.signature and header.type_offset_in_tu.
11479 2017-02-24 Pedro Alves <palves@redhat.com>
11481 * symtab.c (make_file_symbol_completion_list_1): Use
11482 add_symtab_completions.
11484 2017-02-24 Alan Hayward <alan.hayward@arm.com>
11486 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
11488 2017-02-24 Alan Hayward <alan.hayward@arm.com>
11490 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
11491 I386_MAX_REGISTER_SIZE.
11492 (i386_pseudo_register_write): Likewise.
11493 (i386_process_record): Likewise.
11494 * i387-tdep.c (i387_supply_xsave): Likewise.
11495 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
11496 (store_register): Likewise.
11498 2017-02-23 Pedro Alves <palves@redhat.com>
11500 * ada-lang.c: Include "common/function-view.h".
11501 (ada_iterate_over_symbols): Adjust to use function_view as
11503 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
11504 (ada_make_symbol_completion_list): Use a lambda.
11505 (ada_exc_search_name_matches): Delete.
11506 (name_matches_regex): New.
11507 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
11508 * compile/compile-c-support.c: Include "common/function-view.h".
11509 (print_one_macro): Change prototype to accept a ui_file pointer.
11510 (write_macro_definitions): Use a lambda.
11511 * dwarf2read.c: Include "common/function-view.h".
11512 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
11513 (dw2_expand_symtabs_matching): Adjust to use function_view as
11515 * language.h: Include "common/function-view.h".
11516 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
11517 function_view as callback type.
11518 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
11519 * linespec.c: Include "common/function-view.h".
11520 (collect_info::add_symbol): New method.
11521 (struct symbol_and_data_callback, iterate_inline_only, struct
11522 symbol_matcher_data, iterate_name_matcher): Delete.
11523 (iterate_over_all_matching_symtabs): Adjust to use function_view
11524 as callback type and lambdas.
11525 (iterate_over_file_blocks): Adjust to use function_view as
11527 (decode_compound_collector): Now a class with private fields.
11528 (decode_compound_collector::release_symbols): New method.
11529 (collect_one_symbol): Rename to...
11530 (decode_compound_collector::operator()): ... this and adjust.
11531 (lookup_prefix_sym): decode_compound_collector construction bits
11532 move to decode_compound_collector ctor. Pass the
11533 decode_compound_collector object directly as callback. Remove
11534 cleanups and use decode_compound_collector::release_symbols
11536 (symtab_collector): Now a class with private fields.
11537 (symtab_collector::release_symtabs): New method.
11538 (add_symtabs_to_list): Rename to...
11539 (symtab_collector::operator()): ... this and adjust.
11540 (collect_symtabs_from_filename): symtab_collector construction
11541 bits move to symtab_collector ctor. Pass the symtab_collector
11542 object directly as callback. Remove cleanups and use
11543 symtab_collector::release_symtabs instead.
11544 (collect_symbols): Delete.
11545 (add_matching_symbols_to_info): Use lambdas.
11546 * macrocmd.c (print_macro_callback): Delete.
11547 (info_macro_command): Use a lambda.
11548 (info_macros_command): Pass print_macro_definition as callable
11550 (print_one_macro): Remove 'ignore' parameter.
11551 (macro_list_command): Adjust.
11552 * macrotab.c (macro_for_each_data::fn): Now a function_view.
11553 (macro_for_each_data::user_data): Delete field.
11554 (foreach_macro): Adjust to call the function_view.
11555 (macro_for_each): Adjust to use function_view as callback type.
11556 (foreach_macro_in_scope): Adjust to call the function_view.
11557 (macro_for_each_in_scope): Adjust to use function_view as callback
11559 * macrotab.h: Include "common/function-view.h".
11560 (macro_callback_fn): Declare a prototype instead of a pointer.
11561 Remove "user_data" parameter.
11562 (macro_for_each, macro_for_each_in_scope): Adjust to use
11563 function_view as callback type.
11564 * psymtab.c (partial_map_expand_apply)
11565 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
11566 Adjust to use function_view as callback type and to return bool.
11567 (psym_expand_symtabs_matching): Adjust to use function_view as
11569 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
11570 to use function_view as callback type and to return bool.
11571 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
11573 * symfile.c (expand_symtabs_matching): Adjust to use function_view
11575 * symfile.h: Include "common/function-view.h".
11576 (expand_symtabs_file_matcher_ftype)
11577 (expand_symtabs_symbol_matcher_ftype)
11578 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
11580 (quick_symbol_functions::map_symtabs_matching_filename)
11581 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
11582 function_view as callback type and return bool.
11583 (expand_symtabs_matching): Adjust to use function_view as callback
11585 (maintenance_expand_name_matcher)
11586 (maintenance_expand_file_matcher): Delete.
11587 (maintenance_expand_symtabs): Use lambdas.
11588 * symtab.c (iterate_over_some_symtabs): Adjust to use
11589 function_view as callback types and return bool.
11590 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
11592 (lookup_symtab_callback): Delete.
11593 (lookup_symtab): Use a lambda.
11594 (iterate_over_symbols): Adjust to use function_view as callback
11596 (struct search_symbols_data, search_symbols_file_matches)
11597 (search_symbols_name_matches): Delete.
11598 (search_symbols): Use a pair of lambdas.
11599 (struct add_name_data, add_macro_name, symbol_completion_matcher)
11600 (symtab_expansion_callback): Delete.
11601 (default_make_symbol_completion_list_break_on_1): Use lambdas.
11602 * symtab.h: Include "common/function-view.h".
11603 (iterate_over_some_symtabs): Adjust to use function_view as
11604 callback type and return bool.
11605 (iterate_over_symtabs): Adjust to use function_view as callback
11607 (symbol_found_callback_ftype): Remove 'data' parameter and return
11609 (iterate_over_symbols): Adjust to use function_view as callback
11612 2017-02-23 Pedro Alves <palves@redhat.com>
11614 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
11615 (%.o) <unittests/%.c>: New pattern.
11616 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
11617 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
11618 * common/function-view.h: New file.
11619 * unittests/function-view-selftests.c: New file.
11620 * configure: Regenerate.
11622 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
11624 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
11626 * go32-nat.c (go32_thread_alive): Likewise.
11628 2017-02-23 Yao Qi <yao.qi@linaro.org>
11630 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
11633 2017-02-23 Yao Qi <yao.qi@linaro.org>
11635 * varobj.c (varobj_clear_saved_item): Use delete instead of
11637 (update_dynamic_varobj_children): Likewise.
11639 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11641 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
11643 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
11645 * common/enum-flags.h (enum_flags::enum_flags): Initialize
11646 m_enum_value to 0 in default constructor.
11648 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11650 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
11651 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
11652 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
11653 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
11654 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
11655 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
11656 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
11657 IS_STORE_CONDITIONAL_INSN.
11659 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11661 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
11663 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11665 * NEWS (Changes since GDB 7.12): Add DWARF-5.
11667 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11669 * dwarf2read.c (skip_one_die, read_attribute_value)
11670 (dwarf2_const_value_attr, dump_die_shallow)
11671 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
11672 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
11674 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11676 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
11677 (dwarf_parse_macro_header): Accept DWARF version 5.
11678 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
11680 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11682 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
11684 * common/common-exceptions.h (enum errors): Likewise.
11685 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
11686 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
11687 (dwarf_expr_context::execute_stack_op): Likewise.
11688 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
11690 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
11691 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
11692 (show_entry_values_debug, call_site_to_target_addr)
11693 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
11694 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
11695 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
11696 (value_of_dwarf_block_entry, indirect_pieced_value)
11697 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
11698 (disassemble_dwarf_expression): Likewise.
11699 * dwarf2read.c (process_die, inherit_abstract_dies)
11700 (read_call_site_scope): Likewise.
11701 * gdbtypes.h (struct func_type, struct call_site_parameter)
11702 (struct call_site): Likewise.
11703 * stack.c (read_frame_arg): Likewise.
11704 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
11706 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11708 * defs.h (read_unsigned_leb128): New declaration.
11709 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
11710 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
11711 (dwarf2_find_location_expression): Call also
11712 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
11713 * dwarf2loc.h (dwarf2_version): New declaration.
11714 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
11716 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
11718 (struct dwop_section_names): Add loclists_dwo.
11719 (dwop_section_names): Add .debug_loclists.dwo.
11720 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
11721 (struct dwarf2_per_cu_data): Add dwarf_version.
11722 (struct dwo_sections): Add loclists.
11723 (struct attr_abbrev): Add implicit_const.
11724 (read_indirect_line_string): New declaration.
11725 (read_unsigned_leb128): Delete declaration.
11726 (rcuh_kind): New definition.
11727 (read_and_check_comp_unit_head): Change parameter
11728 is_debug_types_section to section_kind.
11729 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
11730 (read_comp_unit_head): Change parameter abfd to section, add parameter
11731 section_kind. Handle DWARF-5.
11732 (error_check_comp_unit_head): Accept also DWARF version 5.
11733 (read_and_check_comp_unit_head): Change parameter
11734 is_debug_types_section to section_kind.
11735 (read_and_check_type_unit_head): Delete function.
11736 (read_abbrev_offset): Handle DWARF-5.
11737 (create_debug_type_hash_table): Add parameter section_kind. Process
11738 only DW_UT_type. Use signature and type_offset_in_tu from struct
11740 (create_debug_types_hash_table): Update create_debug_type_hash_table
11742 (create_all_type_units): Call create_debug_type_hash_table.
11743 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
11744 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
11746 (skip_one_die): Handle DW_FORM_implicit_const.
11747 (dwarf2_rnglists_process): New function.
11748 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
11749 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
11750 (read_attribute_value): Handle DW_FORM_implicit_const,
11752 (read_attribute): Handle DW_FORM_implicit_const.
11753 (read_indirect_string_at_offset_from): New function from
11754 read_indirect_string_at_offset.
11755 (read_indirect_string_at_offset): Call
11756 read_indirect_string_at_offset_from.
11757 (read_indirect_line_string_at_offset): New function.
11758 (read_indirect_string): New function comment.
11759 (read_indirect_line_string): New function.
11760 (read_unsigned_leb128): Make it global.
11761 (dwarf2_string_attr): Handle DWARF-5.
11762 (add_include_dir_stub, read_formatted_entries): New functions.
11763 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
11765 (per_cu_header_read_in): Update read_comp_unit_head caller.
11766 (dwarf2_version): New function.
11767 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
11769 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
11772 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11774 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
11776 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11778 * dwarf2read.c (dwarf2_ranges_process): New function from
11779 dwarf2_ranges_read.
11780 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
11781 dwarf2_ranges_process.
11783 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11785 * dwarf2read.c (create_debug_type_hash_table): New function from
11786 create_debug_types_hash_table.
11787 (create_debug_types_hash_table): Call create_debug_type_hash_table.
11788 (create_all_type_units, open_and_init_dwo_file): Update
11789 create_debug_types_hash_table callers.
11791 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
11794 * fork-child.c (trace_start_error): Fix thinko. va_end should
11795 refer to 'ap', not 'args'.
11797 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
11798 Pedro Alves <palves@redhat.com>
11801 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
11803 * fork-child.c (trace_start_error): New function.
11804 (trace_start_error_with_name): Likewise.
11805 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
11806 * inf-ptrace.c (inf_ptrace_me): Likewise.
11807 * inferior.h (trace_start_error): New prototype.
11808 (trace_start_error_with_name): Likewise.
11810 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
11813 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
11814 NULL before using it.
11815 * symmisc.c (maintenance_print_symbols): Likewise.
11816 (maintenance_print_msymbols): Likewise.
11818 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11820 * NEWS: Add record Python bindings entry.
11822 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11824 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
11826 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
11827 * python/py-record-btrace.c, python/py-record-btrace.h,
11828 python/py-record-full.c, python/py-record-full.h: New file.
11829 * python/py-record.c: Add include for py-record-btrace.h and
11831 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
11832 recpy_instruction_history, recpy_function_call_history, recpy_begin,
11833 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
11834 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
11836 (gdbpy_initialize_btrace): New export.
11837 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
11839 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11841 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
11842 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
11843 * python/py-record.c: New file.
11844 * python/python-internal.h (gdbpy_start_recording,
11845 gdbpy_current_recording, gdpy_stop_recording,
11846 gdbpy_initialize_record): New export.
11847 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
11848 (python_GdbMethods): Add gdbpy_start_recording,
11849 gdbpy_current_recording and gdbpy_stop_recording.
11851 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11853 * record-btrace.c (record_btrace_record_method): New function.
11854 (init_record_btrace_ops): Initialize to_record_method.
11855 * record-full.c (record_full_record_method): New function.
11856 (init_record_full_ops, init_record_full_core_ops): Add
11857 record_full_record_method.
11858 * record.h (enum record_method): New enum.
11859 * target-debug.h (target_debug_print_enum_record_method: New define.
11860 * target-delegates.c: Regenerate.
11861 * target.c (target_record_method): New function.
11862 * target.h: Include record.h.
11863 (struct target_ops) <to_record_method>: New field.
11864 (target_record_method): New export.
11866 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11868 * record.h (record_start, record_stop): New export.
11869 * record.c (record_start, record_stop): New function.
11871 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11873 * btrace.c (btrace_fetch): Copy function call segments pointer
11875 (btrace_clear): Clear the vector.
11876 (btrace_find_insn_by_number): Use binary search to find the correct
11877 function call segment.
11878 * btrace.h (brace_fun_p): New typedef.
11879 (struct btrace_thread_info) <functions>: New field.
11881 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11883 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11884 * btrace.c (btrace_decode_error): ... here. New function.
11885 * btrace.h (btrace_decode_error): New export.
11887 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11889 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11890 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11891 btrace_find_insn_by_number): Remove special case for gaps.
11892 * btrace.h (btrace_insn_get_error): New export.
11893 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11894 * record-btrace.c (btrace_insn_history): Print number for gaps.
11895 (record_btrace_info, record_btrace_goto): Handle gaps.
11897 2017-02-14 Tom Tromey <tom@tromey.com>
11900 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11902 * python/py-evts.c (gdbpy_initialize_py_events): Add
11903 before_prompt registry.
11904 * python/py-events.h (events_object) <before_prompt>: New field.
11906 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
11908 * btrace.c (ftrace_new_switch): Preserve up link and flags.
11910 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
11912 * symfile (_initialize_symfile): Add usage text to the load command's
11915 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
11917 * utils.c (defaulted_query): Don't query on secondary UIs.
11919 2017-02-10 Tom Tromey <tom@tromey.com>
11921 * rust-lang.c (rust_get_disr_info): Remove unused variable.
11923 2017-02-10 Tom Tromey <tom@tromey.com>
11925 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11927 * python/py-type.c (typy_legacy_template_argument): Remove
11928 unnecessary "cleanup" local.
11930 2017-02-10 Tom Tromey <tom@tromey.com>
11932 * python/python.c (do_start_initialization): New function, from
11933 _initialize_python.
11934 (_initialize_python): Call do_start_initialization.
11935 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11938 2017-02-10 Tom Tromey <tom@tromey.com>
11940 * python/py-prettyprint.c (pretty_print_one_value): Use
11943 2017-02-10 Tom Tromey <tom@tromey.com>
11945 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11946 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11948 * python/py-type.c (field_new): Use gdbpy_ref.
11949 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11951 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11952 (py_free_pspace): Likewise.
11953 (pspace_to_pspace_object): Likewise.
11954 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11955 (py_free_objfile): Likewise.
11956 (objfile_to_objfile_object): Likewise.
11957 * python/py-inferior.c (delete_thread_object): Use
11959 (infpy_read_memory): Likewise.
11960 (py_free_inferior): Likewise.
11961 * python/py-evtregistry.c (create_eventregistry_object): Use
11963 * python/py-event.c (create_event_object): Use gdbpy_ref.
11965 2017-02-10 Tom Tromey <tom@tromey.com>
11967 * python/py-ref.h (gdbpy_ref_policy): Now a template.
11968 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11970 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11971 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11972 python/py-exitedevent.c, python/py-finishbreakpoint.c,
11973 python/py-framefilter.c, python/py-function.c,
11974 python/py-inferior.c, python/py-infevents.c,
11975 python/py-linetable.c, python/py-newobjfileevent.c,
11976 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11977 python/py-signalevent.c, python/py-stopevent.c,
11978 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11979 python/py-unwind.c, python/py-utils.c, python/py-value.c,
11980 python/py-varobj.c, python/py-xmethods.c, python/python.c,
11981 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11983 2017-02-10 Tom Tromey <tom@tromey.com>
11985 * ui-out.h (ui_out_emit_type): New class.
11986 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11987 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11988 and ui_out_emit_tuple.
11989 (enumerate_locals): Likewise.
11990 (py_mi_print_variables, py_print_locals, py_print_args): Use
11992 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11994 * common/gdb_optional.h: New file.
11996 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
11998 * MAINTAINERS (Write After Approval): Update my e-mail address.
12000 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
12003 * breakpoint.c (_initialize_breakpoint): Update the help description
12004 of the 'commands' command to indicate that it takes a list argument.
12006 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
12008 * interps.c (current_interp_set_logging): Remove "return".
12010 2017-02-09 Gary Benson <gbenson@redhat.com>
12012 * symtab.c (add_symtab_completions): Prevent NULL pointer
12015 2017-02-08 Pedro Alves <palves@redhat.com>
12017 * interps.c (interp::interp): Remove reference to quiet_p.
12018 (interp_set): Make static. Remove dead "Switching to" output
12020 (interp_quiet_p, interp_set_quiet): Delete.
12021 (interpreter_exec_cmd): Don't set the interpreter quiet.
12022 * interps.h (interp_quiet_p): Make static.
12023 (class interp) <quiet_p>: Remove field
12025 2017-02-08 Jerome Guitton <guitton@adacore.com>
12027 * cli/cli-decode.c (find_command_name_length): Make it extern.
12028 * cli/cli-decode.h (find_command_name_length): Declare.
12029 * cli/cli-script.c (command_name_equals, line_first_arg):
12031 (process_next_line): Use cli-decode to parse command names.
12032 (build_command_line): Make args a constant pointer.
12034 2017-02-08 Jerome Guitton <guitton@adacore.com>
12036 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12037 Remove case-insensitive search.
12039 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
12041 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12042 at the end of the line. Avoids an ARI warning.
12044 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
12046 * NEWS: Mention support for record/replay of Intel 64 rdrand and
12047 rdseed instructions.
12048 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12050 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
12053 Provide and use sparc32 and sparc64 target description XML files.
12054 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12055 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12056 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12057 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12058 * features/sparc/sparc32-solaris.xml: New file.
12059 * features/sparc/sparc64-solaris.xml: New file.
12060 * features/sparc/sparc32-solaris.c: Generated.
12061 * features/sparc/sparc64-solaris.c: Generated.
12062 * sparc-tdep.h: Account for differences in target descriptions.
12063 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12064 (sparc32_register_type): Use target provided registers.
12065 (validate_tdesc_registers): New function.
12066 (sparc32_gdbarch_init): Use tdesc_has_registers.
12067 Set pseudoregister functions.
12068 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12069 (sparc64_register_type): Use target provided registers.
12070 (sparc64_init_abi): Set pseudoregister functions.
12072 2017-02-03 Tom Tromey <tom@tromey.com>
12075 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12076 with a single member.
12078 2017-02-03 Pedro Alves <palves@redhat.com>
12080 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12081 (cli_interp_base::~cli_interp_base): New.
12082 (cli_interp): New struct.
12083 (as_cli_interp): Cast the interp itself to cli_interp.
12084 (cli_interpreter_pre_command_loop): Rename to ...
12085 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
12087 (cli_interpreter_init): Rename to ...
12088 (cli_interp::init): ... this. Remove 'self' parameter. Use
12089 boolean. Make extern.
12090 (cli_interpreter_resume): Rename to ...
12091 (cli_interp::resume): ... this. Remove 'data' parameter. Make
12093 (cli_interpreter_suspend): Rename to ...
12094 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
12096 (cli_interpreter_exec): Rename to ...
12097 (cli_interp::exec): ... this. Remove 'data' parameter. Make
12099 (cli_interpreter_supports_command_editing): Rename to ...
12100 (cli_interp_base::supports_command_editing): ... this. Remove
12101 'interp' parameter. Make extern.
12102 (cli_ui_out): Rename to ...
12103 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
12105 (cli_set_logging): Rename to ...
12106 (cli_interp_base::set_logging): ... this. Remove 'interp'
12107 parameter. Make extern.
12108 (cli_interp_procs): Delete.
12109 (cli_interp_factory): Adjust to use "new".
12110 * cli/cli-interp.h: Include "interps.h".
12111 (struct cli_interp_base): New struct.
12112 * interps.c (struct interp): Delete. Fields moved to interps.h.
12113 (interp_new): Delete.
12114 (interp::interp, interp::~interp): New.
12115 (interp_set): Use bool, and return void. Assume the interpreter
12116 has suspend, init and resume methods, and that the all return
12118 (set_top_level_interpreter): interp_set returns void.
12119 (interp_ui_out): Adapt.
12120 (current_interp_set_logging): Adapt.
12121 (interp_data): Delete.
12122 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12123 (interp_exec): Adapt.
12124 (top_level_interpreter_data): Delete.
12125 * interps.h (interp_init_ftype, interp_resume_ftype)
12126 (interp_suspend_ftype, interp_exec_ftype)
12127 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12128 (class interp): New.
12129 (interp_new): Delete.
12130 (interp_set): Now returns void. Use bool.
12131 (interp_data, top_level_interpreter_data): Delete.
12132 * mi/mi-common.h: Include interps.h.
12133 (class mi_interp): Inherit from interp. Define a ctor. Declare
12134 init, resume, suspect, exec, interp_ui_out, set_logging and
12135 pre_command_loop methods.
12136 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12137 (mi_interpreter_init): Rename to ...
12138 (mi_interp::init): ... this. Remove the 'interp' parameter, use
12139 bool, return void and make extern. Adjust.
12140 (mi_interpreter_resume): ... Rename to ...
12141 (mi_interp::resume): ... this. Remove the 'data' parameter,
12142 return void and make extern. Adjust.
12143 (mi_interpreter_suspend): ... Rename to ...
12144 (mi_interp::suspend): ... this. Remove the 'data' parameter,
12145 return void and make extern. Adjust.
12146 (mi_interpreter_exec): ... Rename to ...
12147 (mi_interp::exec): ... this. Remove the 'data' parameter and make
12149 (mi_interpreter_pre_command_loop): ... Rename to ...
12150 (mi_interp::pre_command_loop): ... this. Remove the 'self'
12151 parameter and make extern.
12152 (mi_on_normal_stop_1): Adjust.
12153 (mi_ui_out): Rename to ...
12154 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
12155 parameter and make extern. Adjust.
12156 (mi_set_logging): Rename to ...
12157 (mi_interp::set_logging): ... this. Remove the 'interp'
12158 parameter and make extern. Adjust.
12159 (mi_interp_procs): Delete.
12160 (mi_interp_factory): Adjust to use 'new'.
12161 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12162 (mi_print_exception, mi_execute_command, mi_load_progress):
12164 * tui/tui-interp.c (tui_interp): New class.
12165 (as_tui_interp): Return a tui_interp pointer.
12166 (tui_on_normal_stop, tui_on_signal_received)
12167 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12168 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12169 to use interp::interp_ui_out.
12170 (tui_init): Rename to ...
12171 (tui_interp::init): ... this. Remove the 'self' parameter, use
12172 bool, return void and make extern. Adjust.
12173 (tui_resume): Rename to ...
12174 (tui_interp::resume): ... this. Remove the 'data' parameter,
12175 return void and make extern. Adjust.
12176 (tui_suspend): Rename to ...
12177 (tui_interp::suspend): ... this. Remove the 'data' parameter,
12178 return void and make extern. Adjust.
12179 (tui_ui_out): Rename to ...
12180 (tui_interp::interp_ui_out): ... this. Remove the 'self'
12181 parameter, and make extern. Adjust.
12182 (tui_exec): Rename to ...
12183 (tui_interp::exec): ... this. Remove the 'data' parameter and
12185 (tui_interp_procs): Delete.
12186 (tui_interp_factory): Use "new".
12188 2017-02-02 Tom Tromey <tom@tromey.com>
12190 * rust-exp.y (ends_raw_string, space_then_number)
12191 (rust_identifier_start_p): Return bool.
12192 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12193 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12194 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12195 (rust_chartype_p): Return bool.
12196 (val_print_struct, rust_print_struct_def, rust_print_type):
12198 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
12201 2017-02-02 Tom Tromey <tom@tromey.com>
12203 * rust-lang.c: Reindent.
12205 2017-02-02 Tom Tromey <tom@tromey.com>
12207 * rust-lang.h (rust_crate_for_block): Update.
12208 * rust-lang.c (rust_crate_for_block): Return std::string.
12209 (rust_get_disr_info): Use std:;string, not
12210 gdb::unique_xmalloc_ptr.
12211 * rust-exp.y (crate_name): Update.
12213 2017-02-02 Pedro Alves <palves@redhat.com>
12215 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
12216 field out of gdb_disassembler_test and make it static.
12218 2017-02-02 Pedro Alves <palves@redhat.com>
12220 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
12221 mi1_interp and mi_interp fields.
12223 2017-02-02 Pedro Alves <palves@redhat.com>
12225 * cli/cli-interp.c (struct saved_output_files, saved_output):
12226 Moved from cli/cli-logging.c.
12227 (cli_set_logging): New function.
12228 (cli_interp_procs): Install cli_set_logging.
12229 * cli/cli-interp.h (make_logging_output, cli_set_logging):
12231 * cli/cli-logging.c (struct saved_output_files, saved_output):
12232 Moved to cli/cli-interp.c.
12233 (pop_output_files): Don't save outputs here.
12234 (make_logging_output): New function.
12235 (handle_redirections): Don't build tee nor save previous outputs
12237 * interps.c (current_interp_set_logging): Change prototype.
12238 Assume there's always a set_logging_proc method installed.
12239 * interps.h (interp_set_logging_ftype): Change prototype.
12240 (current_interp_set_logging): Change prototype and adjust comment.
12241 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
12242 use make_logging_output.
12243 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
12244 2017-02-02 Pedro Alves <palves@redhat.com>
12246 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12248 (set_logging_overwrite): ... here.
12249 (logging_no_redirect_file): Delete.
12250 (set_logging_redirect): Don't handle redirection on the fly.
12251 Instead warn that "logging off" / "logging on" is necessary.
12252 (pop_output_files): Delete references to logging_no_redirect_file.
12253 (show_logging_command): Always speak in terms of what will happen
12254 once logging is reenabled.
12256 2017-02-02 Pedro Alves <palves@redhat.com>
12258 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12260 2017-02-02 Pedro Alves <palves@redhat.com>
12262 * disasm.c (gdb_pretty_print_insn): Rename to ...
12263 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12264 Remove gdbarch parameter. Adapt to clear the object's buffers
12265 instead of allocating new buffers, and to print using the object's
12266 gdb_disassembler instead of calling gdb_print_insn.
12267 (dump_insns): Use gdb_pretty_print_disassembler.
12268 * disasm.h (gdb_pretty_print_insn): Delete declaration.
12269 (gdb_pretty_print_disassembler): New class.
12270 * record-btrace.c (btrace_insn_history): Use
12271 gdb_pretty_print_disassembler.
12273 2017-02-02 Pedro Alves <palves@redhat.com>
12275 * ada-lang.c (type_as_string): Use string_file.
12276 * ada-valprint.c (ada_print_floating): Use string_file.
12277 * ada-varobj.c (ada_varobj_scalar_image)
12278 (ada_varobj_get_value_image): Use string_file.
12279 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12280 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12281 * breakpoint.c (update_inserted_breakpoint_locations)
12282 (insert_breakpoint_locations, reattach_breakpoints)
12283 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12284 (print_it_watchpoint): Use string_file.
12285 (save_breakpoints): Use stdio_file.
12286 * c-exp.y (oper): Use string_file.
12287 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12289 (pop_output_files): Use delete.
12290 (handle_redirections): Use stdio_file and tee_file.
12291 * cli/cli-setshow.c (do_show_command): Use string_file.
12292 * compile/compile-c-support.c (c_compute_program): Use
12294 * compile/compile-c-symbols.c (generate_vla_size): Take a
12295 'string_file &' instead of a 'ui_file *'.
12296 (generate_c_for_for_one_variable): Take a 'string_file &' instead
12297 of a 'ui_file *'. Use string_file.
12298 (generate_c_for_variable_locations): Take a 'string_file &'
12299 instead of a 'ui_file *'.
12300 * compile/compile-internal.h (generate_c_for_for_one_variable):
12301 Take a 'string_file &' instead of a 'ui_file *'.
12302 * compile/compile-loc2c.c (push, pushf, unary, binary)
12303 (print_label, pushf_register_address, pushf_register)
12304 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12305 'ui_file *'. Adjust.
12306 * compile/compile.c (compile_to_object): Use string_file.
12307 * compile/compile.h (compile_dwarf_expr_to_c)
12308 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
12310 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
12311 (replace_typedefs_qualified_name): Use string_file and
12313 * disasm.c (gdb_pretty_print_insn): Use string_file.
12314 (gdb_disassembly): Adjust reference the null_stream global.
12315 (do_ui_file_delete): Delete.
12316 (gdb_insn_length): Use null_stream.
12317 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
12318 * dwarf2loc.c (dwarf2_compile_property_to_c)
12319 (locexpr_generate_c_location, loclist_generate_c_location): Take a
12320 'string_file &' instead of a 'ui_file *'.
12321 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
12322 * dwarf2read.c (do_ui_file_peek_last): Delete.
12323 (dwarf2_compute_name): Use string_file.
12324 * event-top.c (gdb_setup_readline): Use stdio_file.
12325 * gdbarch.sh (verify_gdbarch): Use string_file.
12326 * gdbtypes.c (safe_parse_type): Use null_stream.
12327 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
12329 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
12330 'string_file *' instead of a 'ui_file *'.
12331 (gdbscm_arch_disassemble): Use string_file.
12332 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
12333 * guile/scm-ports.c (class ioscm_file_port): Now a class that
12334 inherits from ui_file.
12335 (ioscm_file_port_delete, ioscm_file_port_rewind)
12336 (ioscm_file_port_put): Delete.
12337 (ioscm_file_port_write): Rename to ...
12338 (ioscm_file_port::write): ... this. Remove file_port_magic
12340 (ioscm_file_port_new): Delete.
12341 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
12343 * guile/scm-type.c (tyscm_type_name): Use string_file.
12344 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
12346 * infcmd.c (print_return_value_1): Use string_file.
12347 * infrun.c (print_target_wait_results): Use string_file.
12348 * language.c (add_language): Use string_file.
12349 * location.c (explicit_to_string_internal): Use string_file.
12350 * main.c (captured_main_1): Use null_file.
12351 * maint.c (maintenance_print_architecture): Use stdio_file.
12352 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
12353 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
12354 event_channel>: Change type to mi_console_file pointer.
12355 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
12356 (mi_console_file_delete): Delete.
12357 (struct mi_console_file): Delete.
12358 (mi_console_file_magic): Delete.
12359 (mi_console_file_new): Delete.
12360 (mi_console_file::mi_console_file): New.
12361 (mi_console_file_delete): Delete.
12362 (mi_console_file_fputs): Delete.
12363 (mi_console_file::write): New.
12364 (mi_console_raw_packet): Delete.
12365 (mi_console_file::flush): New.
12366 (mi_console_file_flush): Delete.
12367 (mi_console_set_raw): Rename to ...
12368 (mi_console_file::set_raw): ... this.
12369 * mi/mi-console.h (class mi_console_file): New class.
12370 (mi_console_file_new, mi_console_set_raw): Delete.
12371 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
12372 (mi_set_logging): Use delete and tee_file. Adjust.
12373 * mi/mi-main.c (output_register): Use string_file.
12374 (mi_cmd_data_evaluate_expression): Use string_file.
12375 (mi_cmd_data_read_memory): Use string_file.
12376 (mi_cmd_execute, print_variable_or_computed): Use string_file.
12377 * mi/mi-out.c (mi_ui_out::main_stream): New.
12378 (mi_ui_out::rewind): Use main_stream and
12380 (mi_ui_out::put): Use main_stream and string_file.
12381 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12382 Allocate a 'string_file' instead.
12383 (mi_out_new): Don't allocate a mem_fileopen stream here.
12384 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12385 (mi_ui_out::main_stream): Declare method.
12386 * printcmd.c (eval_command): Use string_file.
12387 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
12388 * python/py-arch.c (archpy_disassemble): Use string_file.
12389 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
12390 * python/py-frame.c (frapy_str): Use string_file.
12391 * python/py-framefilter.c (py_print_type, py_print_single_arg):
12393 * python/py-type.c (typy_str): Use string_file.
12394 * python/py-unwind.c (unwind_infopy_str): Use string_file.
12395 * python/py-value.c (valpy_str): Use string_file.
12396 * record-btrace.c (btrace_insn_history): Use string_file.
12397 * regcache.c (regcache_print): Use stdio_file.
12398 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
12399 * remote.c (escape_buffer): Use string_file.
12400 * rust-lang.c (rust_get_disr_info): Use string_file.
12401 * serial.c (serial_open_ops_1): Use stdio_file.
12402 (do_serial_close): Use delete.
12403 * stack.c (print_frame_arg): Use string_file.
12404 (print_frame_args): Remove local mem_fileopen stream, not used.
12405 (print_frame): Use string_file.
12406 * symmisc.c (maintenance_print_symbols): Use stdio_file.
12407 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
12408 Take a 'string_file *' instead of a 'ui_file *'.
12409 * top.c (new_ui): Use stdio_file and stderr_file.
12410 (free_ui): Use delete.
12411 (execute_command_to_string): Use string_file.
12412 (quit_confirm): Use string_file.
12413 * tracepoint.c (collection_list::append_exp): Use string_file.
12414 * tui/tui-disasm.c (tui_disassemble): Use string_file.
12415 * tui/tui-file.c: Don't include "ui-file.h".
12416 (enum streamtype, struct tui_stream): Delete.
12417 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
12418 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
12419 (tui_file::tui_file): New method.
12420 (tui_file_fputs): Delete.
12421 (tui_file_get_strbuf): Delete.
12422 (tui_file::puts): New method.
12423 (tui_file_adjust_strbuf): Delete.
12424 (tui_file_flush): Delete.
12425 (tui_file::flush): New method.
12426 * tui/tui-file.h: Tweak intro comment.
12428 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
12429 (tui_file_adjust_strbuf): Delete declarations.
12430 (class tui_file): New class.
12431 * tui/tui-io.c (tui_initialize_io): Use tui_file.
12432 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
12433 (tui_register_format): Use string_stream.
12434 * tui/tui-stack.c (tui_make_status_line): Use string_file.
12435 (tui_get_function_from_frame): Use string_file.
12436 * typeprint.c (type_to_string): Use string_file.
12437 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
12438 (null_stream): New global.
12439 (ui_file_delete): Delete.
12440 (ui_file::ui_file): New.
12441 (null_file_isatty): Delete.
12442 (ui_file::~ui_file): New.
12443 (null_file_rewind): Delete.
12444 (ui_file::printf): New.
12445 (null_file_put): Delete.
12446 (null_file_flush): Delete.
12447 (ui_file::putstr): New.
12448 (null_file_write): Delete.
12449 (ui_file::putstrn): New.
12450 (null_file_read): Delete.
12451 (ui_file::putc): New.
12452 (null_file_fputs): Delete.
12453 (null_file_write_async_safe): Delete.
12454 (ui_file::vprintf): New.
12455 (null_file_delete): Delete.
12456 (null_file::write): New.
12457 (null_file_fseek): Delete.
12458 (null_file::puts): New.
12459 (ui_file_data): Delete.
12460 (null_file::write_async_safe): New.
12461 (gdb_flush, ui_file_isatty): Adjust.
12462 (ui_file_put, ui_file_rewind): Delete.
12463 (ui_file_write): Adjust.
12464 (ui_file_write_for_put): Delete.
12465 (ui_file_write_async_safe, ui_file_read): Adjust.
12466 (ui_file_fseek): Delete.
12467 (fputs_unfiltered): Adjust.
12468 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
12469 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
12470 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
12471 (set_ui_file_data): Delete.
12472 (string_file::~string_file, string_file::write)
12473 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
12474 (do_ui_file_as_string, ui_file_as_string): Delete.
12475 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
12476 (struct mem_file): Delete.
12477 (mem_file_new): Delete.
12478 (stdio_file::stdio_file): New.
12479 (mem_file_delete): Delete.
12480 (stdio_file::stdio_file): New.
12481 (mem_fileopen): Delete.
12482 (stdio_file::~stdio_file): New.
12483 (mem_file_rewind): Delete.
12484 (stdio_file::set_stream): New.
12485 (mem_file_put): Delete.
12486 (stdio_file::open): New.
12487 (mem_file_write): Delete.
12488 (stdio_file_magic, struct stdio_file): Delete.
12489 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
12490 (stdio_file::flush): New.
12491 (stdio_file_read): Rename to ...
12492 (stdio_file::read): ... this. Adjust.
12493 (stdio_file_write): Rename to ...
12494 (stdio_file::write): ... this. Adjust.
12495 (stdio_file_write_async_safe): Rename to ...
12496 (stdio_file::write_async_safe) ... this. Adjust.
12497 (stdio_file_fputs): Rename to ...
12498 (stdio_file::puts) ... this. Adjust.
12499 (stdio_file_isatty): Delete.
12500 (stdio_file_fseek): Delete.
12501 (stdio_file::isatty): New.
12502 (stderr_file_write): Rename to ...
12503 (stderr_file::write) ... this. Adjust.
12504 (stderr_file_fputs): Rename to ...
12505 (stderr_file::puts) ... this. Adjust.
12506 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
12507 (stderr_file::stderr_file): New.
12508 (tee_file_magic): Delete.
12509 (struct tee_file): Delete.
12510 (tee_file::tee_file): New.
12511 (tee_file_new): Delete.
12512 (tee_file::~tee_file): New.
12513 (tee_file_delete): Delete.
12514 (tee_file_flush): Rename to ...
12515 (tee_file::flush): ... this. Adjust.
12516 (tee_file_write): Rename to ...
12517 (tee_file::write): ... this. Adjust.
12518 (tee_file::write_async_safe): New.
12519 (tee_file_fputs): Rename to ...
12520 (tee_file::puts): ... this. Adjust.
12521 (tee_file_isatty): Rename to ...
12522 (tee_file::isatty): ... this. Adjust.
12523 * ui-file.h (struct obstack, struct ui_file): Don't
12525 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
12526 (ui_file_write_ftype)
12527 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
12528 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
12529 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
12530 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
12531 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
12532 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
12533 (set_ui_file_fseek): Delete.
12534 (ui_file_data, ui_file_delete, ui_file_rewind)
12535 (struct ui_file): New.
12537 (class null_file): New.
12538 (null_stream): Declare.
12539 (ui_file_write_for_put, ui_file_put): Delete.
12540 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
12542 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
12543 (gdb_fopen, tee_file_new): Delete.
12544 (struct string_file): New.
12545 (struct stdio_file): New.
12546 (stdio_file_up): New.
12547 (struct stderr_file): New.
12548 (class tee_file): New.
12549 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
12550 of a 'ui_file *'. Adjust.
12551 * ui-out.h (class ui_out) <field_stream>: Likewise.
12552 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
12553 (null_stream): Delete.
12554 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
12556 * utils.h (struct ui_file): Delete forward declaration..
12557 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
12558 (error_stream): Take a 'string_file &' instead of a
12560 * varobj.c (varobj_value_get_print_value): Use string_file.
12561 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
12562 * gdbarch.c: Regenerate.
12564 2017-02-02 Pedro Alves <palves@redhat.com>
12566 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
12567 (gdb_pretty_print_insn): ... this. Now a free function. Add back
12568 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
12569 Adjust to call gdb_print_insn instead of
12570 gdb_disassembler::print_insn.
12571 (dump_insns, do_mixed_source_and_assembly_deprecated)
12572 (do_mixed_source_and_assembly, do_assembly_only): Add back a
12573 'gdbarch' parameter. Remove gdb_disassembler parameter.
12574 (gdb_disassembly): Don't allocate a gdb_disassembler here.
12575 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
12577 (gdb_pretty_print_insn): Re-add declaration.
12578 * record-btrace.c (btrace_insn_history): Don't allocate a
12579 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
12581 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
12583 * disasm.h (gdb_disassembly): Remove file_string parameter.
12584 * disasm.c (gdb_disassembly): Likewise.
12585 * cli/cli-cmds.c (print_disassembly): Adapt.
12586 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
12587 * stack.c (do_gdb_disassembly): Likewise.
12589 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
12591 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
12592 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
12593 targets. And if the implicit value is longer than needed, extract
12594 the first bytes instead of the "least significant" ones.
12596 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
12598 * btrace.c (btrace_enable): Do not call btrace_add_pc for
12599 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
12600 (btrace_fetch): Assert can_access_registers_ptid.
12601 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
12602 validate_registers_access.
12604 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
12606 * gdbthread.h (can_access_registers_ptid): New.
12607 * thread.c (can_access_registers_ptid): New.
12609 2017-02-01 Pedro Alves <palves@redhat.com>
12611 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
12613 2017-01-31 Pedro Alves <palves@redhat.com>
12615 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
12618 2017-01-31 Pedro Alves <palves@redhat.com>
12620 * stack.c (print_frame_args): Remove local mem_fileopen stream,
12623 2017-01-31 Pedro Alves <palves@redhat.com>
12625 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
12627 2017-01-31 Pedro Alves <palves@redhat.com>
12629 * common/scoped_restore.h
12630 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
12631 change the value's parameter type to T2.
12632 (make_scoped_restore): Likewise.
12634 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
12635 Richard Henderson <rth@redhat.com>
12637 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
12638 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
12639 GS_BASE for older kernels.
12640 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
12641 GS_BASE for older kernels.
12642 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
12643 and GS_BASE to the offset table.
12644 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
12645 system register group.
12646 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
12648 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
12650 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
12651 AMD64_GSBASE_REGNUM.
12652 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
12653 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
12654 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
12655 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
12656 i386/64bit-segments.xml in those rules.
12657 * features/i386/64bit-segments.xml: New file.
12658 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
12659 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
12660 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
12661 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
12662 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
12663 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
12664 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
12665 * features/i386/amd64-avx-linux.c: Regenerated.
12666 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
12667 * features/i386/amd64-avx-mpx.c: Regenerated.
12668 * features/i386/amd64-avx512-linux.c: Regenerated.
12669 * features/i386/amd64-linux.c: Regenerated.
12670 * features/i386/amd64-mpx-linux.c: Regenerated.
12671 * features/i386/i386-avx-mpx-linux.c: Regenerated.
12672 * features/i386/i386-avx-mpx.c: Regenerated.
12673 * features/i386/x32-avx-linux.c: Regenerated.
12674 * features/i386/x32-avx512-linux.c: Regenerated.
12675 * regformats/i386/amd64-avx-linux.dat: Regenerated.
12676 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
12677 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
12678 * regformats/i386/amd64-linux.dat: Regenerated.
12679 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
12680 * regformats/i386/x32-avx-linux.dat: Regenerated.
12681 * regformats/i386/x32-avx512-linux.dat: Regenerated.
12682 * regformats/i386/x32-linux.dat: Regenerated.
12684 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
12686 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
12687 Set to AMD64_NUM_REGS.
12689 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
12691 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
12692 that checks validity of a register number.
12694 2017-01-27 Kees Cook <keescook@google.com>
12696 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
12697 fetch_fpregs if target has fpa registers.
12698 (arm_linux_store_inferior_registers): Call store_fpregs if target
12701 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
12703 * cris-tdep.c (cris_gdbarch_init): Remove check for
12704 info.byte_order and force it to BFD_ENDIAN_LITTLE.
12706 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
12708 * corelow.c (get_core_register_section): Check for regset
12709 existence before checking for REGSET_VARIABLE_SIZE.
12711 2017-01-26 Yao Qi <yao.qi@linaro.org>
12712 Pedro Alves <palves@redhat.com>
12715 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
12716 call memory_error, save memaddr instead.
12717 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
12718 negative, cal memory_error.
12719 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
12721 2017-01-26 Yao Qi <yao.qi@linaro.org>
12723 * disasm-selftests.c (memory_error_test): New function.
12724 (_initialize_disasm_selftests): Register memory_error_test.
12726 2017-01-26 Yao Qi <yao.qi@linaro.org>
12728 * Makefile.in (SFILES): Add disasm-selftests.c and
12730 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
12731 * disasm-selftests.c: New file.
12732 * selftest-arch.c: New file.
12733 * selftest-arch.h: New file.
12735 2017-01-26 Yao Qi <yao.qi@linaro.org>
12737 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
12738 to bfd_arch_mep. Don't return 0 if section is not
12739 found. Call print_insn_mep.
12741 2017-01-26 Pedro Alves <palves@redhat.com>
12742 Yao Qi <yao.qi@linaro.org>
12744 * arm-tdep.c: Include "disasm.h".
12745 (gdb_print_insn_arm): Update code to get gdbarch.
12746 * disasm.c (dis_asm_read_memory): Change it to
12747 gdb_disassembler::dis_asm_read_memory.
12748 (dis_asm_memory_error): Likewise.
12749 (dis_asm_print_address): Likewise.
12750 (gdb_pretty_print_insn): Change it to
12751 gdb_disassembler::pretty_print_insn.
12752 (dump_insns): Add one argument gdb_disassemlber. All
12754 (do_mixed_source_and_assembly_deprecated): Likewise.
12755 (do_mixed_source_and_assembly): Likewise.
12756 (do_assembly_only): Likewise.
12757 (gdb_disassembler::gdb_disassembler): New.
12758 (gdb_disassembler::print_insn): New.
12759 * disasm.h (class gdb_disassembler): New.
12760 (gdb_pretty_print_insn): Remove declaration.
12761 (gdb_disassemble_info): Likewise.
12762 * guile/scm-disasm.c (class gdbscm_disassembler): New.
12763 (gdbscm_disasm_read_memory_worker): Update.
12764 (gdbscm_disasm_read_memory): Update.
12765 (gdbscm_disasm_memory_error): Remove.
12766 (gdbscm_disasm_print_address): Remove.
12767 (gdbscm_disassembler::gdbscm_disassembler): New.
12768 (gdbscm_print_insn_from_port): Update.
12769 * mips-tdep.c: Include disasm.h.
12770 (gdb_print_insn_mips): Update code to get gdbarch.
12771 * record-btrace.c (btrace_insn_history): Update.
12772 * spu-tdep.c: Include disasm.h.
12773 (struct spu_dis_asm_data): Remove.
12774 (struct spu_dis_asm_info): New.
12775 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
12777 (gdb_print_insn_spu): Cast disassemble_info to
12780 2017-01-26 Yao Qi <yao.qi@linaro.org>
12782 * disasm.c (do_ui_file_delete): Delete.
12783 (gdb_insn_length): Move code creating stream to ...
12784 * utils.c (null_stream): ... here. New function.
12785 * utils.h (null_stream): Declare.
12787 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
12789 * python/py-inferior.c (find_thread_object): Return directly
12790 from the loop. Remove "found" variable.
12792 2017-01-21 Joel Brobecker <brobecker@adacore.com>
12794 GDB 7.12.1 released.
12796 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
12798 * python/py-function.c (fnpy_call): Reorder declarations to have
12799 the gdbpy_enter object declared first.
12800 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
12802 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
12805 * python/python-internal.h (PyMem_RawMalloc): Define for
12807 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
12808 PyMem_RawMalloc instead of PyMem_Malloc.
12810 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
12811 Luis Machado <lgustavo@codesourcery.com>
12813 * NEWS (New commands): Mention flash-erase.
12814 (New MI commands): Mention target-flash-erase.
12815 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
12817 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
12818 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
12819 * target.c (flash_erase_command): New function.
12820 (initialize_targets): Add new flash-erase command.
12821 * target.h (flash_erase_command): New declaration.
12823 2017-01-20 Joel Brobecker <brobecker@adacore.com>
12825 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
12826 HAVE_SYS_PROCFS_H is defined.
12828 2017-01-18 Alan Hayward <alan.hayward@arm.com>
12830 * remote.c (struct cached_reg): Change data into a pointer.
12831 * (stop_reply_dtr): Free data pointers before deleting vector.
12832 (process_stop_reply): Likewise.
12833 (remote_parse_stop_reply): Allocate space for data
12835 2017-01-18 Alan Hayward <alan.hayward@arm.com>
12837 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
12839 (amd64_pseudo_register_read_value): Likewise.
12840 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
12841 (store_register_using_P): Likewise.
12842 * regcache.c (regcache_xfer_part): Likewise.
12844 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
12846 Split real and pseudo registers.
12847 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
12848 (sparc32_pseudo_regnum): New enum.
12849 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
12850 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
12851 (SPARC32_CP0_REGISTERS): New macro.
12852 (sparc32_pseudo_register_name): New function.
12853 (sparc32_register_name): Use sparc32_pseudo_register_name.
12854 (sparc32_pseudo_register_type): New function.
12855 (sparc32_register_type): Use sparc32_pseudo_register_type.
12856 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12857 pseudo register numbers.
12858 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12859 (SPARC64_CP0_REGISTERS): New macro.
12860 (sparc64_pseudo_register_name): New function.
12861 (sparc64_register_name): Use sparc64_pseudo_register_name.
12862 (sparc64_pseudo_register_type): New function.
12863 (sparc64_register_type): Use sparc64_pseudo_register_type.
12864 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12865 pseudo register numbers.
12866 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12867 sparc64_store_arguments): Handle pseudo register numbers.
12869 2017-01-13 Yao Qi <yao.qi@linaro.org>
12871 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12872 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12874 (getpkt_or_notif_sane_1): Likewise.
12876 2017-01-13 Yao Qi <yao.qi@linaro.org>
12878 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12879 of CC. Pass "-x c++-header" instead of "-x c".
12881 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12883 * remote.c (remote_can_async_p): Update comment.
12885 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12887 * linux-nat.c (linux_nat_can_async_p): Update comment.
12889 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12891 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12893 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
12895 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12897 2017-01-10 Tom Tromey <tom@tromey.com>
12899 * python/py-type.c (typy_legacy_template_argument): Update.
12900 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12901 ~demangle_parse_info): Declare new members.
12902 (cp_demangled_name_to_comp): Return unique_ptr.
12903 (cp_demangled_name_parse_free)
12904 (make_cleanup_cp_demangled_name_parse_free)
12905 (cp_new_demangle_parse_info): Remove.
12906 * cp-support.c (do_demangled_name_parse_free_cleanup)
12907 (make_cleanup_cp_demangled_name_parse_free): Remove.
12908 (inspect_type, cp_canonicalize_string_full)
12909 (cp_canonicalize_string): Update.
12910 (mangled_name_to_comp): Change return type.
12911 (cp_class_name_from_physname, method_name_from_physname)
12912 (cp_func_name, cp_remove_params): Update.
12913 * cp-name-parser.y (demangle_parse_info): New constructor, from
12914 cp_new_demangle_parse_info.
12915 (~demangle_parse_info): New destructor, from
12916 cp_demangled_name_parse_free.
12917 (cp_merge_demangle_parse_infos): Update.
12918 (cp_demangled_name_to_comp): Change return type.
12920 2017-01-10 Tom Tromey <tom@tromey.com>
12922 * top.c (prevent_dont_repeat): Change return type.
12923 * python/python.c (execute_gdb_command): Use std::string.
12925 * guile/guile.c (gdbscm_execute_gdb_command): Update.
12926 * command.h (prevent_dont_repeat): Change return type.
12927 * breakpoint.c (bpstat_do_actions_1): Update.
12929 2017-01-10 Tom Tromey <tom@tromey.com>
12931 * value.h (scoped_value_mark::~scoped_value_mark): Call
12933 (scoped_value_mark::free_to_mark): New method.
12934 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12937 2017-01-10 Tom Tromey <tom@tromey.com>
12939 * python/py-value.c (valpy_dereference, valpy_referenced_value)
12940 (valpy_reference_value, valpy_const_value, valpy_get_address)
12941 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12942 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12943 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12944 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12946 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12947 * value.h (scoped_value_mark): New class.
12949 2017-01-10 Tom Tromey <tom@tromey.com>
12951 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12952 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12953 * psymtab.c (discard_psymtabs_upto): Remove.
12954 (make_cleanup_discard_psymtabs): Remove.
12955 (struct psymtab_state): Remove.
12957 2017-01-10 Tom Tromey <tom@tromey.com>
12959 * record-full.c (record_full_save_cleanups): Remove.
12960 (record_full_save): Use gdb::unlinker.
12961 * gcore.c (do_bfd_delete_cleanup): Remove.
12962 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
12964 * dwarf2read.c (unlink_if_set): Remove.
12965 (write_psymtabs_to_index): Use gdb::unlinker.
12966 * common/gdb_unlinker.h: New file.
12968 2017-01-10 Tom Tromey <tom@tromey.com>
12970 * windows-tdep.c (windows_xfer_shared_library): Update.
12971 * windows-nat.c (windows_make_so): Update.
12972 * utils.h (make_cleanup_bfd_unref): Remove.
12973 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12974 * symfile.h (symfile_bfd_open)
12975 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12976 * symfile.c (read_symbols, symbol_file_add)
12977 (separate_debug_file_exists): Update.
12978 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12979 (generic_load, reread_symbols): Update.
12980 * symfile-mem.c (symbol_file_add_from_memory): Update.
12981 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12982 (spu_symbol_file_add_from_memory): Update.
12983 * solist.h (struct target_so_ops) <bfd_open>: Return
12985 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12986 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12988 (solib_map_sections, reload_shared_libraries_1): Update.
12989 * solib-svr4.c (enable_break): Update.
12990 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12991 * solib-frv.c (enable_break2): Update.
12992 * solib-dsbt.c (enable_break): Update.
12993 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12995 (darwin_solib_get_all_image_info_addr_at_init): Update.
12996 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12997 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12998 * record-full.c (record_full_save): Update.
12999 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13000 * procfs.c (insert_dbx_link_bpt_in_file): Update.
13001 * minidebug.c (find_separate_debug_file_in_section): Return
13003 * machoread.c (macho_add_oso_symfile): Change abfd to
13005 (macho_symfile_read_all_oso): Update.
13006 (macho_check_dsym): Return gdb_bfd_ref_ptr.
13007 (macho_symfile_read): Update.
13008 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13009 (jit_bfd_try_read_symtab): Update.
13010 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13011 (gdb_bfd_openw, gdb_bfd_openr_iovec)
13012 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13014 (gdb_bfd_ref_policy): New struct.
13015 (gdb_bfd_ref_ptr): New typedef.
13016 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13017 (gdb_bfd_openw, gdb_bfd_openr_iovec)
13018 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13020 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13021 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13022 (gcore_command): Update.
13023 * exec.c (exec_file_attach): Update.
13024 * elfread.c (elf_symfile_read): Update.
13025 * dwarf2read.c (dwarf2_get_dwz_file): Update.
13026 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13027 (open_and_init_dwo_file): Update.
13028 (open_dwp_file): Return gdb_bfd_ref_ptr.
13029 (open_and_init_dwp_file): Update.
13030 * corelow.c (core_open): Update.
13031 * compile/compile-object-load.c (compile_object_load): Update.
13032 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13033 * coffread.c (coff_symfile_read): Update.
13034 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13035 gdb_bfd_ref_ptr. Rename.
13036 (dump_bfd_file, restore_command): Update.
13037 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13038 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13039 (find_separate_debug_file_by_buildid): Update.
13041 2017-01-10 Tom Tromey <tom@tromey.com>
13043 * common/gdb_ref_ptr.h: New file.
13044 * python/py-ref.h (struct gdbpy_ref_policy): New.
13045 (gdbpy_ref): Now a typedef.
13047 2017-01-10 Tom Tromey <tom@tromey.com>
13049 * utils.h (make_cleanup_htab_delete): Don't declare.
13050 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13052 * linespec.c (decode_compound_collector): Add constructor,
13054 (lookup_prefix_sym): Remove cleanup.
13055 (symtab_collector): Add constructor, destructor.
13056 (collect_symtabs_from_filename): Remove cleanup.
13057 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13058 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13060 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13061 * dwarf2read.c (dw2_expand_symtabs_matching)
13062 (dw2_map_symbol_filenames, dwarf_decode_macros)
13063 (write_psymtabs_to_index): Use htab_up.
13064 * dwarf2loc.c (func_verify_no_selftailcall)
13065 (call_site_find_chain_1, func_verify_no_selftailcall)
13066 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13067 std::vector, gdb::unique_xmalloc_ptr.
13068 (call_sitep): Remove typedef.
13069 (dwarf2_locexpr_baton_eval): Remove unused variable.
13071 2017-01-10 Tom Tromey <tom@tromey.com>
13073 * python/python-internal.h (make_cleanup_py_decref)
13074 (make_cleanup_py_xdecref): Don't declare.
13075 * python/py-utils.c (py_decref, make_cleanup_py_decref)
13076 (py_xdecref, make_cleanup_py_xdecref): Remove.
13078 2017-01-10 Tom Tromey <tom@tromey.com>
13080 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13081 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13083 2017-01-10 Tom Tromey <tom@tromey.com>
13085 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13087 2017-01-10 Tom Tromey <tom@tromey.com>
13089 * python/py-utils.c (unicode_to_encoded_string)
13090 (python_string_to_target_string)
13091 (python_string_to_target_python_string)
13092 (python_string_to_host_string, gdbpy_obj_to_string)
13093 (get_addr_from_python): Use gdbpy_ref.
13095 2017-01-10 Tom Tromey <tom@tromey.com>
13097 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13100 2017-01-10 Tom Tromey <tom@tromey.com>
13102 * python/python.c (eval_python_command, gdbpy_decode_line)
13103 (gdbpy_run_events, gdbpy_start_type_printers)
13104 (gdbpy_apply_type_printers): Use gdbpy_ref.
13106 2017-01-10 Tom Tromey <tom@tromey.com>
13108 * python/py-param.c (get_doc_string, compute_enum_values): Use
13111 2017-01-10 Tom Tromey <tom@tromey.com>
13113 * python/py-inferior.c (find_thread_object, build_inferior_list):
13116 2017-01-10 Tom Tromey <tom@tromey.com>
13118 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13120 2017-01-10 Tom Tromey <tom@tromey.com>
13122 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13125 2017-01-10 Tom Tromey <tom@tromey.com>
13127 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
13129 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13132 2017-01-10 Tom Tromey <tom@tromey.com>
13134 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13137 2017-01-10 Tom Tromey <tom@tromey.com>
13139 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
13140 decref results of PyArg_ParseTupleAndKeywords.
13142 2017-01-10 Tom Tromey <tom@tromey.com>
13144 * python/python.c (python_run_simple_file): Use
13145 unique_xmalloc_ptr, gdbpy_ref.
13147 2017-01-10 Tom Tromey <tom@tromey.com>
13149 * python/py-prettyprint.c (print_stack_unless_memory_error)
13150 (print_string_repr, print_children): Use gdbpy_ref.
13151 (dummy_python_frame): New class.
13152 (dummy_python_frame::dummy_python_frame): Rename from
13153 push_dummy_python_frame.
13154 (py_restore_tstate): Remove.
13156 2017-01-10 Tom Tromey <tom@tromey.com>
13158 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13160 2017-01-10 Tom Tromey <tom@tromey.com>
13162 * python/python.c (ensure_python_env, restore_python_env):
13164 * python/python-internal.h (ensure_python_env): Don't declare.
13165 * varobj.h (varobj_ensure_python_env): Don't declare.
13166 * varobj.c (varobj_ensure_python_env): Remove.
13168 2017-01-10 Tom Tromey <tom@tromey.com>
13170 * varobj.c (varobj_value_get_print_value): Use
13171 gdbpy_enter_varobj.
13173 2017-01-10 Tom Tromey <tom@tromey.com>
13175 * python/py-prettyprint.c (print_string_repr, print_children):
13177 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13179 * varobj.c (varobj_value_get_print_value): Update.
13180 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13182 2017-01-10 Tom Tromey <tom@tromey.com>
13184 * varobj.c (varobj_get_display_hint)
13185 (dynamic_varobj_has_child_method, install_new_value_visualizer)
13186 (varobj_set_visualizer, free_variable): Use
13187 gdbpy_enter_varobj.
13189 2017-01-10 Tom Tromey <tom@tromey.com>
13191 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13192 (do_finish_initialization): New function. Use gdbpy_ref.
13193 (gdbpy_finish_initialization): Use gdbpy_enter. Call
13194 do_finish_initialization.
13196 2017-01-10 Tom Tromey <tom@tromey.com>
13198 * python/py-param.c (get_set_value, get_show_value): Use
13199 gdbpy_enter, gdbpy_ref.
13201 2017-01-10 Tom Tromey <tom@tromey.com>
13203 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
13205 2017-01-10 Tom Tromey <tom@tromey.com>
13207 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
13209 2017-01-10 Tom Tromey <tom@tromey.com>
13211 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
13212 Use gdbpy_enter_varobj.
13214 2017-01-10 Tom Tromey <tom@tromey.com>
13216 * varobj.c (gdbpy_enter_varobj): New constructor.
13217 * python/python-internal.h (gdbpy_enter_varobj): New class.
13218 * python/py-varobj.c (py_varobj_get_iterator): Use
13219 gdbpy_enter_varobj.
13221 2017-01-10 Tom Tromey <tom@tromey.com>
13223 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13224 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13225 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13226 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13227 unique_xmalloc_ptr.
13228 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13230 2017-01-10 Tom Tromey <tom@tromey.com>
13232 * python/py-xmethods.c (invoke_match_method): Use
13235 2017-01-10 Tom Tromey <tom@tromey.com>
13237 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13238 gdbpy_enter, gdbpy_ref.
13240 2017-01-10 Tom Tromey <tom@tromey.com>
13242 * python/python.c (python_interactive_command): Use gdbpy_enter.
13244 2017-01-10 Tom Tromey <tom@tromey.com>
13246 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13249 2017-01-10 Tom Tromey <tom@tromey.com>
13251 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13252 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13254 2017-01-10 Tom Tromey <tom@tromey.com>
13256 * utils.h (htab_deleter): New struct.
13257 (htab_up): New typedef.
13258 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13259 gdbpy_enter, gdbpy_ref, htab_up.
13261 2017-01-10 Tom Tromey <tom@tromey.com>
13263 * python/py-unwind.c (pending_frame_invalidate): Remove.
13264 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13266 2017-01-10 Tom Tromey <tom@tromey.com>
13268 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13269 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13271 2017-01-10 Tom Tromey <tom@tromey.com>
13273 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13275 2017-01-10 Tom Tromey <tom@tromey.com>
13277 * python/python.c (gdbpy_eval_from_control_command)
13278 (gdbpy_source_script, gdbpy_run_events)
13279 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13280 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13283 2017-01-10 Tom Tromey <tom@tromey.com>
13285 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13287 2017-01-10 Tom Tromey <tom@tromey.com>
13289 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
13291 2017-01-10 Tom Tromey <tom@tromey.com>
13293 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
13294 (python_on_inferior_call_pre, python_on_inferior_call_post)
13295 (python_on_memory_change, python_on_register_change)
13296 (python_inferior_exit, python_new_objfile, add_thread_object)
13297 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
13299 2017-01-10 Tom Tromey <tom@tromey.com>
13301 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13302 (bpfinishpy_handle_exit): Use gdbpy_enter.
13304 2017-01-10 Tom Tromey <tom@tromey.com>
13306 * python/py-cmd.c (cmdpy_destroyer)
13307 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13310 2017-01-10 Tom Tromey <tom@tromey.com>
13312 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13314 (gdbpy_breakpoint_has_cond): Likewise.
13316 2017-01-10 Tom Tromey <tom@tromey.com>
13318 * python/python.c (gdbpy_enter): New constructor.
13319 (~gdbpy_enter): New destructor.
13320 (restore_python_env, ensure_python_env): Rewrite.
13321 * python/python-internal.h (gdbpy_enter): New class.
13323 2017-01-10 Tom Tromey <tom@tromey.com>
13325 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
13327 2017-01-10 Tom Tromey <tom@tromey.com>
13329 * python/py-value.c (value_has_field, get_field_flag)
13330 (get_field_type, valpy_getitem, convert_value_from_python): Use
13333 2017-01-10 Tom Tromey <tom@tromey.com>
13335 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
13338 2017-01-10 Tom Tromey <tom@tromey.com>
13340 * python/py-prettyprint.c (search_pp_list)
13341 (find_pretty_printer_from_objfiles)
13342 (find_pretty_printer_from_progspace)
13343 (find_pretty_printer_from_gdb, find_pretty_printer)
13344 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
13347 2017-01-10 Tom Tromey <tom@tromey.com>
13349 * python/py-param.c (call_doc_function): Use gdbpy_ref.
13351 2017-01-10 Tom Tromey <tom@tromey.com>
13353 * python/py-linetable.c (build_line_table_tuple_from_pcs)
13354 (ltpy_get_all_source_lines): Use gdbpy_ref.
13356 2017-01-10 Tom Tromey <tom@tromey.com>
13358 * python/py-framefilter.c (extract_sym, extract_value)
13359 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
13362 2017-01-10 Tom Tromey <tom@tromey.com>
13364 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
13366 2017-01-10 Tom Tromey <tom@tromey.com>
13368 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
13370 2017-01-10 Tom Tromey <tom@tromey.com>
13372 * python/py-function.c (convert_values_to_python, fnpy_init): Use
13375 2017-01-10 Tom Tromey <tom@tromey.com>
13377 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
13379 2017-01-10 Tom Tromey <tom@tromey.com>
13381 * python/py-type.c (convert_field, make_fielditem, typy_fields)
13382 (typy_range): Use gdbpy_ref.
13384 2017-01-10 Tom Tromey <tom@tromey.com>
13386 * python/py-threadevent.c (create_thread_event_object): Use
13388 * python/py-stopevent.c (create_stop_event_object): Simplify.
13389 (emit_stop_event): Use gdbpy_ref.
13390 * python/py-signalevent.c (create_signal_event_object): Use
13392 * python/py-newobjfileevent.c (create_new_objfile_event_object)
13393 (emit_new_objfile_event, create_clear_objfiles_event_object)
13394 (emit_clear_objfiles_event): Use gdbpy_ref.
13395 * python/py-infevents.c (create_inferior_call_event_object)
13396 (create_register_changed_event_object)
13397 (create_memory_changed_event_object, emit_inferior_call_event)
13398 (emit_memory_changed_event, emit_register_changed_event): Use
13400 * python/py-exitedevent.c (create_exited_event_object)
13401 (emit_exited_event): Use gdbpy_ref.
13402 * python/py-event.h (evpy_emit_event): Remove
13403 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
13404 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
13405 * python/py-continueevent.c (emit_continue_event): Use
13407 * python/py-breakpoint.c (gdbpy_breakpoint_created)
13408 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
13410 * python/py-bpevent.c (create_breakpoint_event_object): Use
13413 2017-01-10 Tom Tromey <tom@tromey.com>
13415 * python/py-ref.h: New file.
13417 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
13419 * cli-out.c (cli_ui_out::do_redirect): Change return type to
13421 * cli-out.h (cli_ui_out::do_redirect): Likewise.
13422 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
13423 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
13424 * ui-out.c (ui_out::redirect): Likewise.
13425 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
13426 * cli/cli-logging.c (set_logging_redirect): Update call site of
13428 (handle_redirections): Likewise.
13429 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
13430 * top.c (execute_command_to_string): Likewise.
13431 * utils.c (do_ui_out_redirect_pop): Likewise.
13433 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
13435 * stack.c (_initialize_stack): Update "frame" command help message.
13437 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
13439 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
13441 2017-01-06 Yao Qi <yao.qi@linaro.org>
13443 * x86-linux-nat.h: Include gdb_proc_service.h.
13445 2017-01-06 Yao Qi <yao.qi@linaro.org>
13447 * ser-base.h: Include serial.h.
13449 2017-01-06 Yao Qi <yao.qi@linaro.org>
13451 * ppc-linux-tdep.h: Include ppc-tdep.h.
13453 2017-01-06 Yao Qi <yao.qi@linaro.org>
13455 * nat/amd64-linux-siginfo.h: Include signal.h.
13457 2017-01-06 Yao Qi <yao.qi@linaro.org>
13459 * nat/aarch64-linux-hw-point.h: Include break-common.h.
13461 2017-01-06 Yao Qi <yao.qi@linaro.org>
13463 * mi/mi-parse.h: Include mi-cmds.h.
13465 2017-01-06 Yao Qi <yao.qi@linaro.org>
13467 * inf-loop.c: Don't include "target.h".
13468 * inf-loop.h: Include it here.
13470 2017-01-06 Yao Qi <yao.qi@linaro.org>
13472 * dfp.h: Include "dboulest.h" and "expression.h".
13474 2017-01-06 Yao Qi <yao.qi@linaro.org>
13476 * ax-gdb.h: Include "ax.h".
13478 2017-01-06 Yao Qi <yao.qi@linaro.org>
13480 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
13481 with nat/gdb_ptrace.h.
13483 2017-01-05 Yao Qi <yao.qi@linaro.org>
13485 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
13487 (mips64_fbsd_sigframe_init): Likewise.
13489 2017-01-04 John Baldwin <jhb@FreeBSD.org>
13491 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
13492 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
13494 2017-01-04 John Baldwin <jhb@FreeBSD.org>
13496 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
13497 * NEWS: Mention new FreeBSD/mips native configuration.
13498 * config/mips/fbsd.mh: New file.
13499 * configure.host: Add mips*-*-freebsd*.
13500 * mips-fbsd-nat.c: New file.
13502 2017-01-04 John Baldwin <jhb@FreeBSD.org>
13504 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
13505 (ALLDEPFILES): Add mips-fbsd-tdep.c.
13506 * NEWS: Mention new FreeBSD/mips target.
13507 * configure.tgt: Add mips*-*-freebsd*.
13508 * mips-fbsd-tdep.c: New file.
13509 * mips-fbsd-tdep.h: New file.
13511 2017-01-04 Yao Qi <yao.qi@linaro.org>
13513 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
13514 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
13516 2017-01-01 Joel Brobecker <brobecker@adacore.com>
13518 Update copyright year range in all GDB files.
13520 2017-01-01 Joel Brobecker <brobecker@adacore.com>
13522 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
13524 For older changes see ChangeLog-2016.
13530 version-control: never