Use std::string in memory_map_parsing_data
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2
3 * memory-map.c (struct memory_map_parsing_data) <property_name>:
4 Change type to std::string.
5 (memory_map_start_property): Adjust.
6 (memory_map_end_property): Adjust.
7
8 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
9
10 * infrun.h: Include common/byte-vector.h.
11 (struct displaced_step_closure): New struct.
12 (struct buf_displaced_step_closure): New struct.
13 * infrun.c (displaced_step_closure::~displaced_step_closure):
14 Provide default implementation.
15 (displaced_step_clear): Deallocate step closure with delete.
16 * aarch64-tdep.c (displaced_step_closure): Rename to ...
17 (aarch64_displaced_step_closure): ... this, extend
18 displaced_step_closure.
19 (aarch64_displaced_step_data) <dsc>: Change type to
20 aarch64_displaced_step_closure.
21 (aarch64_displaced_step_copy_insn): Adjust to type change, use
22 unique_ptr.
23 (aarch64_displaced_step_fixup): Add cast for displaced step
24 closure.
25 * amd64-tdep.c (displaced_step_closure): Rename to ...
26 (amd64_displaced_step_closure): ... this, extend
27 displaced_step_closure.
28 <insn_buf>: Change type to std::vector<gdb_byte>.
29 <max_len>: Remove.
30 (fixup_riprel): Change type of DSC parameter, adjust to type
31 change of insn_buf.
32 (fixup_displaced_copy): Change type of DSC parameter.
33 (amd64_displaced_step_copy_insn): Instantiate
34 amd64_displaced_step_closure.
35 (amd64_displaced_step_fixup): Add cast for closure type, adjust
36 to type change of insn_buf.
37 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
38 parameter DSC.
39 (arm_linux_copy_svc): Likewise.
40 (cleanup_kernel_helper_return): Likewise.
41 (arm_catch_kernel_helper_return): Likewise.
42 (arm_linux_displaced_step_copy_insn): Instantiate
43 arm_displaced_step_closure.
44 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
45 (displaced_read_reg): Change type of parameter DSC.
46 (branch_write_pc): Likewise.
47 (load_write_pc): Likewise.
48 (alu_write_pc): Likewise.
49 (displaced_write_reg): Likewise.
50 (arm_copy_unmodified): Likewise.
51 (thumb_copy_unmodified_32bit): Likewise.
52 (thumb_copy_unmodified_16bit): Likewise.
53 (cleanup_preload): Likewise.
54 (install_preload): Likewise.
55 (arm_copy_preload): Likewise.
56 (thumb2_copy_preload): Likewise.
57 (install_preload_reg): Likewise.
58 (arm_copy_preload_reg): Likewise.
59 (cleanup_copro_load_store): Likewise.
60 (install_copro_load_store): Likewise.
61 (arm_copy_copro_load_store) Likewise.
62 (thumb2_copy_copro_load_store): Likewise.
63 (cleanup_branch): Likewise.
64 (install_b_bl_blx): Likewise.
65 (arm_copy_b_bl_blx): Likewise.
66 (thumb2_copy_b_bl_blx): Likewise.
67 (thumb_copy_b): Likewise.
68 (install_bx_blx_reg): Likewise.
69 (arm_copy_bx_blx_reg): Likewise.
70 (thumb_copy_bx_blx_reg): Likewise.
71 (cleanup_alu_imm): Likewise.
72 (arm_copy_alu_imm): Likewise.
73 (thumb2_copy_alu_imm): Likewise.
74 (cleanup_alu_reg): Likewise.
75 (install_alu_reg): Likewise.
76 (arm_copy_alu_reg): Likewise.
77 (thumb_copy_alu_reg): Likewise.
78 (cleanup_alu_shifted_reg): Likewise.
79 (install_alu_shifted_reg): Likewise.
80 (arm_copy_alu_shifted_reg): Likewise.
81 (cleanup_load): Likewise.
82 (cleanup_store): Likewise.
83 (arm_copy_extra_ld_st): Likewise.
84 (install_load_store): Likewise.
85 (thumb2_copy_load_literal): Likewise.
86 (thumb2_copy_load_reg_imm): Likewise.
87 (arm_copy_ldr_str_ldrb_strb): Likewise.
88 (cleanup_block_load_all): Likewise.
89 (cleanup_block_store_pc): Likewise.
90 (cleanup_block_load_pc): Likewise.
91 (arm_copy_block_xfer): Likewise.
92 (thumb2_copy_block_xfer): Likewise.
93 (cleanup_svc): Likewise.
94 (install_svc): Likewise.
95 (arm_copy_svc): Likewise.
96 (thumb_copy_svc): Likewise.
97 (arm_copy_undef): Likewise.
98 (thumb_32bit_copy_undef): Likewise.
99 (arm_copy_unpred): Likewise.
100 (arm_decode_misc_memhint_neon): Likewise.
101 (arm_decode_unconditional): Likewise.
102 (arm_decode_miscellaneous): Likewise.
103 (arm_decode_dp_misc): Likewise.
104 (arm_decode_ld_st_word_ubyte): Likewise.
105 (arm_decode_media): Likewise.
106 (arm_decode_b_bl_ldmstm): Likewise.
107 (arm_decode_ext_reg_ld_st): Likewise.
108 (thumb2_decode_dp_shift_reg): Likewise.
109 (thumb2_decode_ext_reg_ld_st): Likewise.
110 (arm_decode_svc_copro): Likewise.
111 (thumb2_decode_svc_copro): Likewise.
112 (install_pc_relative): Likewise.
113 (thumb_copy_pc_relative_16bit): Likewise.
114 (thumb_decode_pc_relative_16bit): Likewise.
115 (thumb_copy_pc_relative_32bit): Likewise.
116 (thumb_copy_16bit_ldr_literal): Likewise.
117 (thumb_copy_cbnz_cbz): Likewise.
118 (thumb2_copy_table_branch): Likewise.
119 (cleanup_pop_pc_16bit_all): Likewise.
120 (thumb_copy_pop_pc_16bit): Likewise.
121 (thumb_process_displaced_16bit_insn): Likewise.
122 (decode_thumb_32bit_ld_mem_hints): Likewise.
123 (thumb_process_displaced_32bit_insn): Likewise.
124 (thumb_process_displaced_insn): Likewise.
125 (arm_process_displaced_insn): Likewise.
126 (arm_displaced_init_closure): Likewise.
127 (arm_displaced_step_fixup): Add cast for closure.
128 * arm-tdep.h: Include infrun.h.
129 (displaced_step_closure): Rename to ...
130 (arm_displaced_step_closure): ... this, extend
131 displaced_step_closure.
132 <u::svc::copy_svc_os>: Change type of parameter DSC.
133 <cleanup>: Likewise.
134 (arm_process_displaced_insn): Likewise.
135 (arm_displaced_init_closure): Likewise.
136 (displaced_read_reg): Likewise.
137 (displaced_write_reg): Likewise.
138 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
139 Adjust.
140 * i386-tdep.h: Include infrun.h.
141 (i386_displaced_step_closure): New typedef.
142 * i386-tdep.c (i386_displaced_step_copy_insn): Use
143 i386_displaced_step_closure.
144 (i386_displaced_step_fixup): Adjust.
145 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
146 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
147 and unique_ptr.
148 (ppc_displaced_step_fixup): Adjust.
149 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
150 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
151 and unique_ptr.
152 (s390_displaced_step_fixup): Adjust.
153
154 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
155
156 * interps.h (interp_resume, interp_suspend, interp_set_temp):
157 Remove declarations.
158
159 2017-10-20 Tom Tromey <tom@tromey.com>
160
161 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
162 std::vector.
163 (gdb_bfd_record_inclusion): Update.
164 (bfdp): Remove typedef.
165
166 2017-10-20 Tom Tromey <tom@tromey.com>
167
168 * gdb_bfd.c (gdb_bfd_ref): Use new.
169 (struct gdb_bfd_data): Add constructor, destructor, and member
170 initializers.
171 (gdb_bfd_unref): Use delete.
172
173 2017-10-20 Tom Tromey <tom@tromey.com>
174
175 * exec.c (exec_file_attach): Use new_bfd_ref.
176 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
177 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
178 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
179 new_bfd_ref.
180 * gdb_bfd.h (new_bfd_ref): New function.
181
182 2017-10-20 Pedro Alves <palves@redhat.com>
183
184 * main.c (captured_command_loop): Add attribute noinline.
185
186 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
187
188 * interps.c (struct interp_factory): Add constructor.
189 (interp_factory_p): Remove typedef.
190 (DEF_VEC_P(interp_factory_p)): Remove.
191 (interpreter_factories): Change type to std::vector.
192 (interp_factory_register): Adjust.
193 (interp_lookup): Adjust.
194 (interpreter_completer): Adjust.
195
196 2017-10-19 Tom Tromey <tom@tromey.com>
197
198 * break-catch-syscall.c (catch_syscall_completer): Use
199 std::string, gdb::unique_xmalloc_ptr.
200
201 2017-10-19 Tom Tromey <tom@tromey.com>
202
203 * infcall.c (call_function_by_hand_dummy): Use std::string.
204
205 2017-10-19 Tom Tromey <tom@tromey.com>
206
207 * mi/mi-main.c (mi_cmd_execute): Update.
208 * top.h (prepare_execute_command): Return scoped_value_mark.
209 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
210 Add move constructor.
211 * top.c (prepare_execute_command): Return scoped_value_mark.
212 (execute_command): Update.
213
214 2017-10-19 Pedro Alves <palves@redhat.com>
215
216 * xml-support.c (xml_fetch_content_from_file): Check fread's
217 return.
218
219 2017-10-19 Pedro Alves <palves@redhat.com>
220
221 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
222 async.
223 (handle_error_fd): New function.
224 (ser_base_async): Add/delete an event loop file handler for
225 error_fd.
226
227 2017-10-19 Pedro Alves <palves@redhat.com>
228
229 * xml-support.c (xml_fetch_content_from_file): Don't read in
230 chunks. Instead use fseek to determine the file's size, and read
231 it in one go.
232
233 2017-11-18 Keith Seitz <keiths@redhat.com>
234
235 * c-exp.y (oper): Canonicalize conversion operators of user-defined
236 types.
237 Add whitespace to front of type name.
238
239 2017-10-18 Keith Seitz <keiths@redhat.com>
240
241 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
242 DW_AT_accessibility.
243
244 2017-10-18 Yao Qi <yao.qi@linaro.org>
245
246 * features/tic6x-c62x-linux.c: Remove.
247
248 2017-10-17 Tom Tromey <tom@tromey.com>
249
250 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
251 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
252 (do_mixed_source_and_assembly): Likewise.
253
254 2017-10-17 Tom Tromey <tom@tromey.com>
255
256 * regcache.c (regcache::xfer_part): Remove assertion.
257
258 2017-10-17 Pedro Alves <palves@redhat.com>
259
260 * xml-support.c (xml_fetch_content_from_file): Call
261 unique_ptr::release() instead unique_ptr::get() when passing
262 through xrealloc.
263
264 2017-10-17 Yao Qi <yao.qi@linaro.org>
265
266 * regcache.c (regcache::xfer_part): Remove parameters read and
267 write, add parameter is_raw. All callers are updated.
268
269 2017-10-16 Keith Seitz <keiths@redhat.com>
270
271 * c-typeprint.c (enum access_specifier): Moved here from
272 c_type_print_base.
273 (output_access_specifier): New function.
274 (c_type_print_base): Consider typedefs when assessing
275 whether access labels are needed.
276 Use output_access_specifier as needed.
277 Output access specifier for typedefs, if needed.
278 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
279 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
280 fields.
281 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
282 accessor macros.
283
284 2017-10-16 Tom Tromey <tom@tromey.com>
285
286 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
287 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
288 * target.c (target_fileio_read_stralloc): Update.
289 * sparc64-tdep.c (adi_is_addr_mapped): Update.
290 * target.h (target_fileio_read_stralloc): Return
291 unique_xmalloc_ptr.
292
293 2017-10-16 Tom Tromey <tom@tromey.com>
294
295 * xml-syscall.c (xml_init_syscalls_info): Update.
296 * xml-support.c (xinclude_start_include): Update.
297 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
298 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
299 (xml_fetch_content_from_file): Likewise.
300 * osdata.c (get_osdata): Update.
301 * target.h (target_read_stralloc, target_get_osdata): Return
302 unique_xmalloc_ptr.
303 * solib-aix.c (solib_aix_get_library_list): Update.
304 * solib-target.c (solib_target_current_sos): Update.
305 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
306 * xml-tdesc.c (fetch_available_features_from_target): Update.
307 (target_fetch_description_xml): Update.
308 (file_read_description_xml): Update.
309 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
310 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
311 (remote_pid_to_exec_file): Update.
312 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
313 (target_get_osdata): Likewise.
314
315 2017-10-16 Tom Tromey <tom@tromey.com>
316
317 * remote.c (remote_register_number_and_offset): Use std::vector.
318 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
319 (putpkt_binary): Use gdb::def_vector.
320 (compare_sections_command): Use gdb::byte_vector.
321
322 2017-10-16 Tom Tromey <tom@tromey.com>
323
324 * ppc-linux-nat.c (hwdebug_insert_point): Use
325 gdb::unique_xmalloc_ptr, XDUP.
326
327 2017-10-16 Tom Tromey <tom@tromey.com>
328
329 * probe.c (parse_probes): Use std::string.
330 (info_probes_for_ops, enable_probes_command)
331 (disable_probes_command): Remove cleanups.
332
333 2017-10-16 Tom Tromey <tom@tromey.com>
334
335 * buildsym.c (block_compar): Remove.
336 (end_symtab_get_static_block): Use std::vector.
337
338 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
339
340 * memrange.h (struct mem_range): Define operator< and operator==.
341 (mem_range_s): Remove.
342 (DEF_VEC_O (mem_range_s)): Remove.
343 (normalize_mem_ranges): Change parameter type to std::vector.
344 * memrange.c (compare_mem_ranges): Remove.
345 (normalize_mem_ranges): Change parameter type to std::vector,
346 adjust to vector change.
347 * exec.c (section_table_available_memory): Return vector, remove
348 parameter.
349 (section_table_read_available_memory): Adjust to std::vector
350 change.
351 * remote.c (remote_read_bytes): Adjust to std::vector
352 change.
353 * tracepoint.h (traceframe_available_memory): Change parameter
354 type to std::vector.
355 * tracepoint.c (traceframe_available_memory): Change parameter
356 type to std::vector, adjust.
357 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
358 std::vector change.
359 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
360 unittests/memrange-selftests.c.
361 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
362 * gdb/unittests/memrange-selftests.c: New file.
363
364 2017-10-16 Pedro Alves <palves@redhat.com>
365
366 * elfread.c (probe_key_free): Rename range-for variable.
367 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
368 (find_probe_by_pc, collect_probes): Rename range-for variable.
369
370 2017-10-16 Yao Qi <yao.qi@linaro.org>
371
372 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
373 * features/tic6x-c62x.c: Remove.
374 * features/tic6x-c64x-linux.c: Remove.
375 * features/tic6x-c64x.c: Remove.
376 * features/tic6x-c64xp-linux.c: Remove.
377 * features/tic6x-c64xp.c: Remove.
378 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
379 initialize_tdesc_tic6x_*_linux functions.
380 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
381 initialize_tdesc_tic6x_* functions.
382
383 2017-10-16 Yao Qi <yao.qi@linaro.org>
384
385 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
386 tic6x-c62x.
387 * regformats/tic6x-c62x.dat: Remove.
388 * regformats/tic6x-c64x.dat: Remove.
389 * regformats/tic6x-c64xp.dat: Remove.
390
391 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
392
393 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
394 (the !HAVE_LIBEXPAT version).
395
396 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
397
398 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
399 const.
400
401 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
402
403 * target.h: Include tracepoint.h.
404 (enum trace_find_type): Move to tracepoint.h.
405 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
406 * tracepoint.h: Don't include target.h
407 (enum trace_find_type): Move from target.h.
408 (parse_traceframe_info): Return a unique ptr.
409 * tracepoint.c (current_traceframe_info): Change type to unique
410 ptr.
411 (free_traceframe_info): Remove.
412 (clear_traceframe_info): Don't manually free
413 current_traceframe_info.
414 (free_result): Remove.
415 (parse_traceframe_info): Return a unique ptr.
416 (get_traceframe_info): Adjust to unique ptr.
417 * ctf.c (ctf_traceframe_info): Return a unique ptr.
418 * remote.c (remote_traceframe_info): Return a unique ptr.
419 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
420 ptr.
421 * target-debug.h (target_debug_print_traceframe_info_up): New
422 macro.
423 * target-delegates.c: Regenerate.
424
425 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
426
427 * memrange.h (struct mem_range): Add constructors.
428 * tracepoint.h (struct traceframe_info) <memory>: Change type to
429 std::vector<mem_range>.
430 * tracepoint.c (free_traceframe_info): Don't manually free
431 vector.
432 (traceframe_info_start_memory): Adjust to vector change.
433 (traceframe_available_memory): Likewise.
434 * tracefile-tfile.c (build_traceframe_info): Likewise.
435 * ctf.c (ctf_traceframe_info): Likewise.
436
437 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
438
439 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
440 std::vector<int>.
441 * tracepoint.c (free_traceframe_info): Deallocate with delete.
442 (traceframe_info_start_tvar): Adjust to vector change.
443 (parse_traceframe_info): Allocate with new.
444 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
445 vector change.
446 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
447 change.
448 tfile_traceframe_info): Allocate with new.
449 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
450 change.
451
452 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
453
454 * tracepoint.c (traceframe_info): Rename to...
455 (current_traceframe_info): ...this.
456 (clear_traceframe_info): Adjust.
457 (get_traceframe_info): Adjust.
458
459 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
460
461 * nat/linux-osdata.c: Include algorithm.
462 (compare_processes): Remove.
463 (struct pid_pgid_entry): New struct.
464 (linux_xfer_osdata_processgroups): Use std::vector instead of
465 XNEWVEC.
466
467 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
468
469 * objfiles.h: Don't include symfile.h.
470 (struct partial_symbol): Remove forward-declaration.
471 (struct objfile) <global_psymbols, static_psymbols>: Change type
472 to std::vector<partial_symbol *>.
473 * objfiles.c (objfile::objfile): Don't memset those fields.
474 (objfile::~objfile): Don't free those fields.
475 * psympriv.h (struct psymbol_allocation_list): Remove
476 forward-declaration.
477 (add_psymbol_to_list): Change psymbol_allocation_list parameter
478 to std::vector.
479 (start_psymtab_common): Change parameters to std::vector.
480 * psymtab.c: Include algorithm.
481 (require_partial_symbols): Call shrink_to_fit.
482 (find_pc_sect_psymbol): Adjust to vector change.
483 (match_partial_symbol): Likewise.
484 (lookup_partial_symbol): Likewise.
485 (psym_relocate): Likewise.
486 (dump_psymtab): Likewise.
487 (recursively_search_psymtabs): Likewise.
488 (compare_psymbols): Remove.
489 (sort_pst_symbols): Adjust to vector change.
490 (start_psymtab_common): Likewise.
491 (end_psymtab_common): Likewise.
492 (psymbol_bcache_full): De-constify return value.
493 (add_psymbol_to_bcache): Likewise.
494 (extend_psymbol_list): Remove.
495 (append_psymbol_to_list): Adjust to vector change.
496 (add_psymbol_to_list): Likewise.
497 (init_psymbol_list): Likewise.
498 (maintenance_info_psymtabs): Likewise.
499 (maintenance_check_psymtabs): Likewise.
500 * symfile.h (struct psymbol_allocation_list): Remove.
501 * symfile.c (reread_symbols): Adjust to vector change.
502 * dbxread.c (start_psymtab): Change type of parameters.
503 (dbx_symfile_read): Adjust to vector change.
504 (read_dbx_symtab): Likewise.
505 (start_psymtab): Change type of parameters.
506 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
507 (create_partial_symtab): Likewise.
508 (add_partial_symbol): Likewise.
509 (write_one_signatured_type): Likewise.
510 (recursively_write_psymbols): Likewise.
511 * mdebugread.c (parse_partial_symbols): Likewise.
512 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
513 (scan_xcoff_symtab): Adjust to vector change.
514 (xcoff_initial_scan): Likewise.
515
516 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
517
518 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
519
520 2017-10-13 Yao Qi <yao.qi@linaro.org>
521
522 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
523 Remove s390x-*-expedite, add s390x-expedite.
524
525 2017-10-13 Yao Qi <yao.qi@linaro.org>
526
527 * features/s390-gs-linux64.c: Regenerated.
528 * features/s390x-gs-linux64.c: Regenerated.
529
530 2017-10-13 Tom Tromey <tom@tromey.com>
531
532 * compile/compile-object-run.c (do_module_cleanup): Use delete.
533 * solib.c (update_solib_list, reload_shared_libraries_1): Use
534 delete.
535 * symfile.c (symbol_file_add_with_addrs): Use new.
536 (symbol_file_add_separate): Update comment.
537 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
538 * jit.c (jit_object_close_impl): Use new.
539 (jit_unregister_code): Use delete.
540 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
541 (~objfile): Rename from free_objfile.
542 (free_objfile_separate_debug, do_free_objfile_cleanup)
543 (free_all_objfiles, objfile_purge_solibs): Use delete.
544 * objfiles.h (struct objfile): Add constructor and destructor.
545 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
546 (allocate_objfile, free_objfile): Don't declare.
547 (struct objstats): Add initializers.
548
549 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
550
551 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
552 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
553 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
554 * gdbarch.h: Regenerate.
555 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
556 Adjust comment.
557 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
558 (i386_displaced_step_fixup): Adjust comment.
559 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
560
561 2017-10-12 Tom Tromey <tom@tromey.com>
562
563 * prologue-value.h (pv_area::store_would_trash): Return bool.
564 (pv_area::find_reg): Likewise.
565 * prologue-value.c (pv_area::store_would_trash): Return bool.
566 (pv_area::find_reg): Likewise.
567
568 2017-10-12 Tom Tromey <tom@tromey.com>
569
570 * s390-linux-tdep.c (s390_store, s390_load)
571 (s390_check_for_saved, s390_analyze_prologue): Update.
572 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
573 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
574 * prologue-value.h (class pv_area): Move from prologue-value.c.
575 Change names of members. Add constructor, destructor, member
576 functions.
577 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
578 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
579 (pv_area_fetch, pv_area_scan): Don't declare.
580 * prologue-value.c (struct pv_area::area_entry): Now member of
581 pv_area.
582 (struct pv_area): Move to prologue-value.h.
583 (pv_area::pv_area): Rename from make_pv_area.
584 (pv_area::~pv_area): Rename from free_pv_area.
585 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
586 (clear_entries, find_entry, overlaps, store_would_trash, store)
587 (fetch, find_reg, scan): Now member of pv_area.
588 Remove "area" argument. Update.
589 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
590 Update.
591 * mn10300-tdep.c (push_reg, check_for_saved)
592 (mn10300_analyze_prologue): Update.
593 * mep-tdep.c (is_arg_spill, check_for_saved)
594 (mep_analyze_prologue): Update.
595 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
596 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
597 (m32c_is_struct_return, m32c_analyze_prologue): Update.
598 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
599 Update.
600 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
601 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
602
603 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
604
605 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
606 * linux-nat.c (linux_nat_delete_thread): New variable.
607 (lwp_free): Invoke linux_nat_delete_thread if set.
608 (linux_nat_set_delete_thread): New function.
609 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
610 thread delete callback.
611 * arm-linux-nat.c (arm_linux_delete_thread): New function.
612 (_initialize_arm_linux_nat): Assign thread delete callback.
613 * s390-linux-nat.c (s390_delete_thread): New function.
614 (_initialize_s390_nat): Assign thread delete callback.
615 * x86-linux-nat.c (x86_linux_add_target): Likewise.
616 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
617 function.
618 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
619 declaration.
620 * nat/x86-linux.c (x86_linux_delete_thread): New function.
621 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
622
623 2017-10-09 Tom Tromey <tom@tromey.com>
624
625 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
626 std::string.
627 * tui/tui-layout.c (enum tui_status): Use std::string.
628
629 2017-10-11 Tom Tromey <tom@tromey.com>
630
631 * gdbthread.h (thread_command): Constify.
632 * inferior.h (detach_command): Constify.
633 * top.h (set_history, show_history): Constify.
634 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
635 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
636 * bsd-kvm.c (bsd_kvm_cmd): Constify.
637 * printcmd.c (set_command): Constify.
638 (non_const_set_command): New function.
639 * dcache.c (set_dcache_command, show_dcache_command): Constify.
640 * breakpoint.c (enable_command, disable_command, delete_command)
641 (catch_command, tcatch_command, set_breakpoint_cmd)
642 (show_breakpoint_cmd): Constify.
643 * macrocmd.c (macro_command): Constify.
644 * infcmd.c (unset_command, kill_command, detach_command)
645 (info_proc_cmd): Constify.
646 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
647 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
648 (info_auto_load_cmd): Constify.
649 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
650 (unset_tdesc_cmd): Constify.
651 * ada-lang.c (set_ada_command, show_ada_command)
652 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
653 * guile/guile.c (set_guile_command, show_guile_command)
654 (info_guile_command): Constify.
655 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
656 Constify.
657 * skip.c (skip_command): Constify.
658 * compile/compile.c (_initialize_compile): Constify.
659 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
660 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
661 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
662 (maint_btrace_pt_show_cmd): Constify.
663 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
664 Constify.
665 * python/python.c (user_show_python, user_set_python): Constify.
666 * mips-tdep.c (set_mips_command, show_mips_command)
667 (set_mipsfpu_command): Constify.
668 * record-btrace.c (cmd_record_btrace_start)
669 (cmd_set_record_btrace, cmd_show_record_btrace)
670 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
671 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
672 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
673 Constify.
674 * symfile.c (overlay_command): Constify.
675 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
676 * cli/cli-logging.c (set_logging_command, show_logging_command):
677 Constify.
678 * cli/cli-dump.c (dump_command, append_command)
679 (srec_dump_command, ihex_dump_command, verilog_dump_command)
680 (tekhex_dump_command, binary_dump_command)
681 (binary_append_command): Constify.
682 * cli/cli-decode.c (struct cmd_list_element): Change type of
683 "fun".
684 * cli/cli-cmds.c (info_command, show_command, set_debug)
685 (show_debug): Constify.
686 (show_command): Add non-const overload.
687 * top.c (set_history, show_history): Constify.
688 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
689 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
690 * target.c (target_command): Constify.
691 * sparc64-tdep.c (info_adi_command): Constify.
692 * record-full.c (cmd_record_full_start): Constify.
693 (set_record_full_command): Constify. Fix typo.
694 (show_record_full_command): Constify.
695 * thread.c (thread_command, thread_apply_command): Constify.
696 * memattr.c (dummy_cmd): Constify.
697 * value.c (function_command): Constify.
698 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
699 * probe.c (info_probes_command): Constify.
700 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
701 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
702 (show_thread_cmd, set_thread_default_cmd)
703 (show_thread_default_cmd): Constify.
704 (check_empty): Constify.
705 * tracepoint.c (tfind_command): Constify.
706 * cp-support.c (maint_cplus_command): Constify.
707 * windows-tdep.c (info_w32_command): Constify.
708 * record.c (cmd_record_start, set_record_command)
709 (show_record_command, info_record_command, cmd_record_goto):
710 Constify.
711 * ravenscar-thread.c (set_ravenscar_command)
712 (show_ravenscar_command): Constify.
713 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
714 Constify.
715 (add_internal_problem_command): Remove casts.
716 * arc-tdep.c (maintenance_print_arc_command): Constify.
717 * valprint.c (set_print, show_print, set_print_raw)
718 (show_print_raw): Constify.
719 * maint.c (maintenance_command, maintenance_info_command)
720 (maintenance_print_command, maintenance_set_cmd)
721 (maintenance_show_cmd, set_per_command_cmd)
722 (show_per_command_cmd, maintenance_check_command): Constify.
723 * language.c (set_check, show_check): Constify.
724 * typeprint.c (show_print_type, set_print_type): Constify.
725 * go32-nat.c (go32_info_dos_command): Constify.
726
727 2017-10-11 Tom Tromey <tom@tromey.com>
728
729 * breakpoint.c (prepare_re_set_context): Remove.
730 (breakpoint_re_set_one): Update. Don't use cleanups.
731 (breakpoint_re_set): Use scoped_restore, std::string, and
732 scoped_restore_current_language.
733
734 2017-10-11 Tom Tromey <tom@tromey.com>
735
736 * breakpoint.c (commands_command_1): Use std::string.
737 (cleanup_executing_breakpoints): Remove.
738 (bpstat_do_actions_1): Use scoped_restore.
739 (bpstat_check_watchpoint): Use std::string.
740 (decode_static_tracepoint_spec): Likewise.
741 (break_range_command): Likewise.
742 (watch_command_1): Likewise.
743 (compare_breakpoints): Change argument types.
744 (clear_command): Use std::vector.
745 (cleanup_executing_breakpoints): Remove.
746 (update_global_location_list): Use unique_xmalloc_ptr.
747 (strace_command): Remove unused declaration.
748
749 2017-10-11 John Baldwin <jhb@FreeBSD.org>
750
751 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
752 * NEWS: Mention new FreeBSD/arm native configuration.
753 * configure.host: Add arm*-*-freebsd*.
754 * configure.nat: Likewise.
755 * arm-fbsd-nat.c: New file.
756
757 2017-10-11 John Baldwin <jhb@FreeBSD.org>
758
759 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
760 (ALLDEPFILES): Add arm-fbsd-tdep.c.
761 * NEWS: Mention new FreeBSD/arm target.
762 * configure.tgt: Add arm*-*-freebsd*.
763 * arm-fbsd-tdep.c: New file.
764 * arm-fbsd-tdep.h: New file.
765
766 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
767
768 * linux-tdep.c (linux_make_corefile_notes): Remove call to
769 `gdbarch_elfcore_write_linux_prpsinfo'.
770 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
771 method.
772 (elf_internal_linux_prpsinfo): Remove declaration.
773 * gdbarch.h: Regenerate.
774 * gdbarch.c: Regenerate.
775
776 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
777
778 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
779 `set_gdbarch_elfcore_write_linux_prpsinfo'.
780
781 2017-10-11 Pedro Alves <palves@redhat.com>
782
783 * breakpoint.c (reattach_breakpoints): Delete.
784 * breakpoint.h (reattach_breakpoints): Delete.
785
786 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
787
788 * symfile.c (registered_sym_fns): Make struct, not typedef.
789 (DEF_VEC_O (registered_sym_fns)): Remove.
790 (symtab_fns): Change type to std::vector.
791 (add_symtab_fns): Adjust.
792 (find_sym_fns): Adjust.
793
794 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
795
796 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
797 * arc-tdep.h (arc_arch_is_em): New function.
798 (arc_arch_is_hs): Likewise.
799
800 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
801
802 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
803 parentheses in the declaration.
804 (macro_lookup_inclusion): Likewise.
805 (macro_lookup_definition): Likewise.
806 * p-lang.h (pascal_builtin_types): Likewise.
807 * tui/tui-data.c (tui_win_list): Likewise.
808 * tui/tui-data.h (tui_win_list): Likewise.
809 * utils.h (make_cleanup_free_section_addr_info): Likewise.
810
811 2017-10-11 Mark Rages <markrages@gmail.com>
812
813 * target-memory.c (block_boundaries): Fix for block address not
814 aligned on block size.
815
816 2017-10-10 Pedro Alves <palves@redhat.com>
817 Tom Tromey <tom@tromey.com>
818
819 * breakpoint.c (struct captured_breakpoint_query_args)
820 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
821 (print_breakpoint): New.
822 * breakpoint.h (print_breakpoint): Declare.
823 * common/common-exceptions.h (enum return_reason): Remove
824 references to catch_exceptions.
825 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
826 Delete.
827 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
828 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
829 * gdb.h: Delete.
830 * gdbthread.h (thread_select): Declare.
831 * mi/mi-cmd-break.c: Don't include gdb.h.
832 (breakpoint_notify): Use print_breakpoint.
833 * mi/mi-cmd-catch.c: Don't include gdb.h.
834 * mi/mi-interp.c: Don't include gdb.h.
835 (mi_print_breakpoint_for_event): New.
836 (mi_breakpoint_created, mi_breakpoint_modified): Use
837 mi_print_breakpoint_for_event.
838 * mi/mi-main.c: Don't include gdb.h.
839 (mi_cmd_thread_select): Parse the global thread ID here. Use
840 thread_select instead of gdb_thread_select.
841 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
842 of using gdb_list_thread_ids.
843 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
844 FILEIO_ENOSYS here.
845 (remote_fileio_request): Use TRY/CATCH instead of
846 catch_exceptions.
847 * symfile-mem.c (struct symbol_file_add_from_memory_args)
848 (symbol_file_add_from_memory_wrapper): Delete.
849 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
850 * thread.c: Don't include gdb.h.
851 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
852 (thread_alive): Use thread_select.
853 (do_captured_thread_select): Delete, parts salvaged as ...
854 (thread_select): ... this new function.
855 (gdb_thread_select): Delete.
856
857 2017-10-10 Pedro Alves <palves@redhat.com>
858 Tom Tromey <tom@tromey.com>
859
860 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
861 and reverse logic.
862 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
863 No longer macros. Instead ...
864 (enum wp_check_result): They're now values of this new
865 enumeration.
866 (watchpoint_check): Change return type to wp_check_result and
867 parameter type to bpstat.
868 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
869 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
870 catch_errors. Reverse logic of watchpoint_check call.
871 (breakpoint_re_set_one): Now returns void and takes a breakpoint
872 pointer as parameter.
873 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
874 * common/common-exceptions.c (throw_exception_sjlj): Update
875 comments to avoid mentioning catch_errors.
876 * exceptions.c (catch_errors): Delete.
877 * exceptions.h: Update comments to avoid mentioning catch_errors.
878 (catch_errors_ftype, catch_errors): Delete.
879 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
880 (hook_stop_stub): Delete.
881 (restore_selected_frame): Change return type to void, and
882 parameter type to const frame_id &.
883 (restore_infcall_control_state): Use TRY/CATCH instead of
884 catch_errors.
885 * main.c (captured_command_loop): Return void and remove
886 parameter. Remove references to catch_errors.
887 (captured_main): Use TRY/CATCH instead of catch_errors.
888 * objc-lang.c (objc_submethod_helper_data)
889 (find_objc_msgcall_submethod_helper): Delete.
890 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
891 catch_errors.
892 * record-full.c (record_full_message): Return void.
893 (record_full_message_args, record_full_message_wrapper): Delete.
894 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
895 instead of catch_errors.
896 * solib-aix.c (solib_aix_open_symbol_file_object): Change
897 parameter type to int.
898 * solib-darwin.c (open_symbol_file_object): Ditto.
899 * solib-dsbt.c (open_symbol_file_object): Ditto.
900 * solib-frv.c (open_symbol_file_object): Ditto.
901 * solib-svr4.c (open_symbol_file_object): Ditto.
902 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
903 * solib.c (update_solib_list): Use TRY/CATCH instead of
904 catch_errors.
905 * solist.h (struct target_so_ops) <open_symbol_file_object>:
906 Change type.
907 * symmisc.c (struct print_symbol_args): Remove.
908 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
909 (print_symbol): Change type.
910 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
911 and remove parameters.
912 (catch_errors): New.
913 (get_windows_debug_event): Adjust.
914
915 2017-10-09 Tom Tromey <tom@tromey.com>
916
917 * mi/mi-main.c (free_splay_tree): Remove.
918 (list_available_thread_groups): Use splay_tree_up.
919 * common/gdb_splay_tree.h: New file.
920
921 2017-10-09 Tom Tromey <tom@tromey.com>
922
923 * mi/mi-main.c (do_nothing): Remove.
924 (list_available_thread_groups): Update.
925
926 2017-10-09 Pedro Alves <palves@redhat.com>
927
928 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
929 reading registers when switching context.
930
931 2017-10-09 John Baldwin <jhb@FreeBSD.org>
932
933 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
934 (fbsd_convert_siginfo): Likewise.
935 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
936
937 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
938
939 * configure.ac (try_guile_versions): Remove guile-2.2.
940 * configure: Regenerate.
941
942 2017-10-09 Tom Tromey <tom@tromey.com>
943
944 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
945 (COMPILE.pre): Use $(CXX).
946
947 2017-10-09 Pedro Alves <palves@redhat.com>
948
949 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
950 Use bool.
951 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
952 * cp-support.h (cp_remove_params): Now returns a
953 gdb::unique_xmalloc_ptr.
954 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
955 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
956 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
957 returning a gdb::unique_xmalloc_ptr.
958 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
959 * stack.c (find_frame_funname): Adjust to cp_remove_params
960 returning a gdb::unique_xmalloc_ptr.
961
962 2017-10-08 Tom Tromey <tom@tromey.com>
963
964 * dwarf2read.c (dwarf2_get_dwz_file): Use
965 gdb::unique_xmalloc_ptr.
966 (find_slot_in_mapped_hash): Likewise.
967 (dwarf2_physname): Likewise.
968 (create_dwo_unit_in_dwp_v1): Use std::string.
969 (create_dwo_unit_in_dwp_v2): Likewise.
970 (lookup_dwo_cutu): Likewise.
971 (inherit_abstract_dies): Use std::vector.
972 (read_array_type): Likewise.
973 (dwarf_decode_macros): Remove unused declaration.
974 (unsigned_int_compar): Remove.
975 (dwarf2_build_psymtabs_hard): Use scoped_restore.
976 (psymtabs_addrmap_cleanup): Remove.
977
978 2017-10-08 Tom Tromey <tom@tromey.com>
979
980 * frame-unwind.c (frame_unwind_try_unwinder): Update.
981 * frame.h (frame_cleanup_after_sniffer): Declare.
982 (frame_prepare_for_sniffer): Return void.
983 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
984 type of argument.
985 (frame_prepare_for_sniffer): Return void.
986
987 2017-10-08 Tom Tromey <tom@tromey.com>
988
989 * utils.h (make_cleanup_value_free): Remove.
990 * utils.c (do_value_free, struct cleanup): Remove.
991 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
992 Use gdb_value_up.
993 * value.h (struct value_deleter): New.
994 (gdb_value_up): New typedef.
995
996 2017-10-08 Tom Tromey <tom@tromey.com>
997
998 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
999 (make_cleanup_free_search_symbols): Remove.
1000 (search_symbols): Return std::vector.
1001 (symbol_search::compare_search_syms): Now member of
1002 symbol_search. Change arguments.
1003 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
1004 (symtab_symbol_info, rbreak_command): Update.
1005 * symtab.h (struct symbol_search) <next>: Remove.
1006 Add constructors.
1007 (symbol_search::operator<): New function.
1008 (symbol_search::operator==): New function.
1009 (search_symbols): Remove std::vector.
1010 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1011 (symbol_search::compare_search_syms): Declare.
1012
1013 2017-10-06 Yao Qi <yao.qi@linaro.org>
1014
1015 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1016 arch/aarch64-insn.o.
1017 Remove one rule.
1018 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1019
1020 2017-10-06 Yao Qi <yao.qi@linaro.org>
1021
1022 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1023 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1024 arch/arm-linux.o respectively.
1025 * configure.tgt: Likewise.
1026
1027 2017-10-06 Yao Qi <yao.qi@linaro.org>
1028
1029 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1030 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1031
1032 2017-10-06 Pedro Alves <palves@redhat.com>
1033
1034 * windows-nat.c: Include <algorithm>.
1035
1036 2017-10-06 Yao Qi <yao.qi@linaro.org>
1037
1038 * configure.tgt (i386_tobjs): New variable.
1039 (amd64_tobjs): New variable.
1040 Set $cpu_obs and $os_obs.
1041
1042 2017-10-06 Yao Qi <yao.qi@linaro.org>
1043
1044 * Makefile.in (CONFIG_SRC_SUBDIR): New.
1045 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1046 (clean): Remove object files and dependency files.
1047 (distclean): Remove the directory.
1048 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1049 * configure: Re-generated.
1050 * configure.tgt: Replace amd64.o with arch/amd64.o.
1051
1052 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
1053
1054 PR build/22188
1055 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1056 and SETEND.
1057
1058 2017-10-05 Pedro Alves <palves@redhat.com>
1059
1060 * linux-nat.c (linux_child_follow_fork): When following the parent
1061 and detaching the child, consult the parent thread's architecture
1062 instead of the child's.
1063
1064 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1065
1066 * ax.h: Do not include "doublest.h".
1067 (union agent_val): Remove.
1068
1069 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1070
1071 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1072 (decimal_to_string): Return std::string object.
1073 (decimal_from_string): Accept std::string object. Return bool.
1074 (decimal_from_integral, decimal_from_doublest): Remove.
1075 (decimal_from_longest): Add prototype.
1076 (decimal_from_ulongest): Likewise.
1077 (decimal_to_longest): Likewise.
1078 (decimal_from_doublest): Likewise.
1079 * dfp.c: Do not include "gdbtypes.h" or "value.h".
1080 (MAX_DECIMAL_STRING): Move here.
1081 (decimal_to_string): Return std::string object.
1082 (decimal_from_string): Accept std::string object. Return bool.
1083 (decimal_from_integral): Remove, replace by ...
1084 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1085 (decimal_to_longest): New function.
1086 (decimal_from_floating): Remove, replace by ...
1087 (decimal_from_doublest): ... this new function.
1088 (decimal_to_doublest): Update to new decimal_to_string interface.
1089
1090 * value.c (unpack_long): Use decimal_to_longest.
1091 * valops.c (value_cast): Use decimal_from_doublest instead of
1092 decimal_from_floating. Use decimal_from_[u]longest isntead of
1093 decimal_from_integral.
1094 * valarith.c (value_args_as_decimal): Likewise.
1095 * valprint.c (print_decimal_floating): Update to new
1096 decimal_to_string interface.
1097 * printcmd.c (printf_decfloat): Likewise.
1098 * c-exp.y (parse_number): Update to new decimal_from_string interface.
1099
1100 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1101
1102 * doublest.h: Do not include "floatformat.h". Remove stale comments.
1103 * gdbtypes.c: Include "floatformat.h".
1104 * value.c: Likewise.
1105 * m68k-tdep.c: Likewise.
1106
1107 * findvar.c: Do not include "floatformat.h".
1108 * amd64-darwin-tdep.c: Likewise.
1109 * arm-linux-tdep.c: Likewise.
1110 * i386-darwin-tdep.c: Likewise.
1111 * i387-tdep.c: Likewise.
1112 * m68k-linux-tdep.c: Likewise.
1113 * mep-tdep.c: Likewise.
1114 * mips-tdep.c: Likewise.
1115 * nios2-tdep.c: Likewise.
1116 * s390-linux-tdep.c: Likewise.
1117 * sparc-obsd-tdep.c: Likewise.
1118 * sparc-tdep.c: Likewise.
1119 * sparc64-tdep.c: Likewise.
1120 * spu-tdep.c: Likewise.
1121 * tic6x-tdep.c: Likewise.
1122 * tilegx-tdep.c: Likewise.
1123 * vax-tdep.c: Likewise.
1124 * xstormy16-tdep.c: Likewise.
1125 * xtensa-tdep.c: Likewise.
1126
1127 * top.c: Do not include "doublest.h".
1128 * aarch64-tdep.c: Likewise.
1129 * alpha-tdep.c: Likewise.
1130 * arm-linux-tdep.c: Likewise.
1131 * m68k-linux-tdep.c: Likewise.
1132 * tilegx-tdep.c: Likewise.
1133 * xstormy16-tdep.c: Likewise.
1134
1135 2017-10-05 John Baldwin <jhb@FreeBSD.org>
1136
1137 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
1138 (mipsn32_fbsd_sigframe): Define.
1139 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
1140 for FreeBSD/mipsn32.
1141
1142 2017-10-05 John Baldwin <jhb@FreeBSD.org>
1143
1144 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
1145 AT_HWCAP.
1146
1147 2017-10-05 Tristan Gingold <tgingold@free.fr>
1148
1149 * MAINTAINERS (Misc): Update my email address.
1150
1151 2017-10-04 Pedro Alves <palves@redhat.com>
1152
1153 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
1154 it instead of target_gdbarch.
1155 (get_remote_state, get_remote_packet_size): Adjust
1156 get_remote_arch_state calls, passing down target_gdbarch
1157 explicitly.
1158 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1159 'gdbarch' and use it instead of target_gdbarch.
1160 (get_memory_packet_size): Adjust get_remote_arch_state calls,
1161 passing down target_gdbarch explicitly.
1162 (struct stop_reply) <arch>: New field.
1163 (remote_parse_stop_reply): Use the stopped thread's architecture,
1164 not the current inferior's. Save the architecture in the
1165 stop_reply.
1166 (process_stop_reply): Use the stop reply's architecture.
1167 (process_g_packet, remote_fetch_registers)
1168 (remote_prepare_to_store, store_registers_using_G)
1169 (remote_store_registers): Adjust get_remote_arch_state calls,
1170 using the regcache's architecture.
1171 (remote_get_trace_status): Adjust get_remote_arch_state calls,
1172 passing down target_gdbarch explicitly.
1173 * spu-multiarch.c (spu_thread_architecture): Defer to the target
1174 beneath instead of calling target_gdbarch.
1175 * target.c (default_thread_architecture): Use the specified
1176 inferior's architecture, instead of the current inferior's
1177 architecture (via target_gdbarch).
1178
1179 2017-10-04 Pedro Alves <palves@redhat.com>
1180
1181 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1182 case.
1183 (regcache_print): Handle !target_has_registers here instead.
1184
1185 2017-10-04 Pedro Alves <palves@redhat.com>
1186
1187 * frame.c (create_test_frame): Delete.
1188 * frame.h (create_test_frame): Delete.
1189 * gdbarch-selftests.c: Include gdbthread.h and target.h.
1190 (class regcache_test): Delete.
1191 (test_target_has_registers, test_target_has_stack)
1192 (test_target_has_memory, test_target_prepare_to_store)
1193 (test_target_store_registers): New functions.
1194 (test_target_ops): New class.
1195 (register_to_value_test): Error out if there's already a
1196 process_stratum (or higher) target pushed. Create a fuller mock
1197 environment, with mock target_ops, inferior, address space, thread
1198 and inferior_ptid.
1199 * progspace.c (struct address_space): Move to ...
1200 * progspace.h (struct address_space): ... here.
1201 * regcache.h (regcache::~regcache, regcache::raw_write)
1202 [GDB_SELF_TEST]: No longer virtual.
1203
1204 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
1205
1206 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1207
1208 2017-10-04 Pedro Alves <palves@redhat.com>
1209
1210 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1211 out of 'between TRY and CATCH'.
1212
1213 2017-10-04 Pedro Alves <palves@redhat.com>
1214
1215 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1216 * common/common-exceptions.h (TRY): Open an outermost scope.
1217 Expand intro comment.
1218 (CATCH): Reindent.
1219 (END_CATCH): Close the outermost scope.
1220 * completer.c (complete_line_internal): Add missing END_CATCH.
1221
1222 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1223
1224 * NEWS (Changes since GDB 8.0): Add entry about new
1225 'set-cwd-on-gdbserver' feature.
1226 (New remote packets): Add entry for QSetWorkingDir.
1227 * common/common-inferior.h (set_inferior_cwd): New prototype.
1228 * infcmd.c (set_inferior_cwd): Remove "static".
1229 (show_cwd_command): Expand text to include remote debugging.
1230 * remote.c: Add PACKET_QSetWorkingDir.
1231 (remote_protocol_features) <QSetWorkingDir>: New entry for
1232 PACKET_QSetWorkingDir.
1233 (extended_remote_set_inferior_cwd): New function.
1234 (extended_remote_create_inferior): Call
1235 "extended_remote_set_inferior_cwd".
1236 (_initialize_remote): Call "add_packet_config_cmd" for
1237 QSetWorkingDir.
1238
1239 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1240
1241 * NEWS (New commands): Mention "set/show cwd".
1242 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
1243 "cd" command's help text.
1244 * common/common-inferior.h (get_inferior_cwd): New prototype.
1245 * infcmd.c (inferior_cwd_scratch): New global variable.
1246 (set_inferior_cwd): New function.
1247 (get_inferior_cwd): Likewise.
1248 (set_cwd_command): Likewise.
1249 (show_cwd_command): Likewise.
1250 (_initialize_infcmd): Add "set/show cwd" commands.
1251 * inferior.h (class inferior) <cwd>: New field.
1252 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
1253 (fork_inferior): Change inferior's cwd before its execution.
1254 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
1255 to CreateProcess.
1256
1257 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1258
1259 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
1260 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
1261 (COMMON_OBS): Add gdb_tilde_expand.o.
1262 * common/gdb_tilde_expand.c: New file.
1263 * common/gdb_tilde_expand.h: Likewise.
1264
1265 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
1266
1267 * gdbarch.sh (objfile): Remove duplicate declaration.
1268 * gdbarch.h: Regenerate.
1269
1270 2017-10-03 Tom Tromey <tom@tromey.com>
1271
1272 * utils.c (internal_vproblem): Use string_vprintf.
1273
1274 2017-10-03 Tom Tromey <tom@tromey.com>
1275
1276 * printcmd.c (info_symbol_command): Use std::string.
1277
1278 2017-10-03 Tom Tromey <tom@tromey.com>
1279
1280 * top.c (gdb_safe_append_history): Use std::string.
1281
1282 2017-10-03 Tom Tromey <tom@tromey.com>
1283
1284 * event-top.c (stdin_event_handler): Update.
1285 * main.c (captured_main_1): Update.
1286 * top.h (make_delete_ui_cleanup): Remove.
1287 (struct ui): Add constructor and destructor.
1288 (new_ui, delete_ui): Remove.
1289 * top.c (make_delete_ui_cleanup): Remove.
1290 (new_ui_command): Use std::unique_ptr.
1291 (delete_ui_cleanup): Remove.
1292 (ui::ui): Rename from new_ui. Update.
1293 (free_ui): Remove.
1294 (ui::~ui): Rename from delete_ui. Update.
1295
1296 2017-10-03 Tom Tromey <tom@tromey.com>
1297
1298 * symfile.c (load_progress): Use gdb::byte_vector.
1299
1300 2017-10-03 Tom Tromey <tom@tromey.com>
1301
1302 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
1303 declaration.
1304 * printcmd.c (x_command): Remove unused declaration.
1305 * symfile.c (symbol_file_command): Remove unused declaration.
1306
1307 2017-10-03 Tom Tromey <tom@tromey.com>
1308
1309 * utils.c (internal_vproblem): Use std::string.
1310 (defaulted_query): Likewise.
1311
1312 2017-10-03 Tom Tromey <tom@tromey.com>
1313
1314 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
1315 * top.c (execute_command_to_string): Update.
1316 * utils.c (make_cleanup_restore_page_info): Remove.
1317 (do_restore_page_info_cleanup): Remove.
1318 (set_batch_flag_and_restore_page_info):
1319 New.
1320 (make_cleanup_restore_page_info): Remove.
1321 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1322 (~set_batch_flag_and_restore_page_info): New
1323 (make_cleanup_restore_uinteger): Remove.
1324 (make_cleanup_restore_integer): Remove.
1325 (struct restore_integer_closure): Remove.
1326 (restore_integer): Remove.
1327 * utils.h (struct set_batch_flag_and_restore_page_info): New
1328 class.
1329 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1330 (make_cleanup_restore_page_info): Remove.
1331 (make_cleanup_restore_uinteger) Remove.
1332 (make_cleanup_restore_integer) Remove.
1333
1334 2017-10-03 Tom Tromey <tom@tromey.com>
1335
1336 * record-full.h (record_full_gdb_operation_disable_set): Return
1337 scoped_restore_tmpl<int>.
1338 * infrun.c (adjust_pc_after_break): Update.
1339 (handle_signal_stop): Update.
1340 * record-full.c (record_full_gdb_operation_disable_set): Return
1341 scoped_restore_tmpl<int>.
1342 (record_full_wait_1, record_full_insert_breakpoint)
1343 (record_full_remove_breakpoint, record_full_save)
1344 (record_full_goto_insn): Update.
1345
1346 2017-10-02 Tom Tromey <tom@tromey.com>
1347
1348 PR rust/22236:
1349 * rust-lang.c (rust_val_print_str): New function.
1350 (val_print_struct): Call it.
1351 (rust_subscript): Preserve name of slice type.
1352
1353 2017-10-02 Tom Tromey <tom@tromey.com>
1354
1355 * rust-lang.c (rust_subscript): Handle slices in
1356 EVAL_AVOID_SIDE_EFFECTS case.
1357
1358 2017-10-02 Tom Tromey <tom@tromey.com>
1359
1360 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
1361
1362 2017-10-02 Tom Tromey <tom@tromey.com>
1363
1364 * rust-lang.h (rust_slice_type): Add "extern".
1365
1366 2017-10-02 Tom Tromey <tom@tromey.com>
1367 Pedro Alves <palves@redhat.com>
1368
1369 * ada-lang.h (ada_exc_info::operator<): Make const.
1370 (ada_exc_info::operator==): Make const.
1371 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
1372 Make const.
1373
1374 2017-09-29 Tom Tromey <tom@tromey.com>
1375
1376 * target.c (read_whatever_is_readable): Change type of "result".
1377 Update.
1378 (free_memory_read_result_vector): Remove.
1379 (read_memory_robust): Change return type. Update.
1380 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
1381 bin2hex, std::string.
1382 * target.h (memory_read_result_s): Remove typedef.
1383 (free_memory_read_result_vector): Remove.
1384 (read_memory_robust): Return std::vector.
1385
1386 2017-09-29 Tom Tromey <tom@tromey.com>
1387
1388 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
1389
1390 2017-09-29 Tom Tromey <tom@tromey.com>
1391
1392 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
1393 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
1394 operator< and operator==.
1395 (ada_exceptions_list): Return a std::vector.
1396 * ada-lang.c (ada_exc_info::operator<): Rename from
1397 compare_ada_exception_info.
1398 (ada_exc_info::operator==): New.
1399 (sort_remove_dups_ada_exceptions_list): Change type of
1400 "exceptions".
1401 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
1402 (ada_add_global_exceptions): Likewise.
1403 (ada_exceptions_list_1): Return a std::vector.
1404 (ada_exceptions_list): Likewise.
1405
1406 2017-09-29 Tom Tromey <tom@tromey.com>
1407
1408 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
1409 'std::set *'.
1410 (print_one_inferior): Update.
1411 (free_vector_of_ints): Remove.
1412 (list_available_thread_groups): Change "ids" to std::set.
1413 (mi_cmd_list_thread_groups): Update.
1414 (struct collect_cores_data) <core>: Now a std::set.
1415 (collect_cores): Update.
1416 (unique): Remove.
1417 (print_one_inferior): Update.
1418
1419 2017-09-29 Tom Tromey <tom@tromey.com>
1420
1421 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
1422 (mi_execute_async_cli_command): Likewise.
1423 (mi_cmd_trace_frame_collected): Use field_fmt.
1424
1425 2017-09-29 Tom Tromey <tom@tromey.com>
1426
1427 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
1428 gdb::byte_vector.
1429
1430 2017-09-29 Tom Tromey <tom@tromey.com>
1431
1432 * mi/mi-parse.c (mi_parse): Remove unused declaration.
1433
1434 2017-09-29 Tom Tromey <tom@tromey.com>
1435
1436 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
1437
1438 2017-09-29 Tom Tromey <tom@tromey.com>
1439
1440 * varobj.h (varobj_gen_name): Return std::string.
1441 * varobj.c (varobj_gen_name): Return std::string.
1442 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
1443 (mi_cmd_var_delete): Don't copy "name".
1444
1445 2017-09-29 Tom Tromey <tom@tromey.com>
1446
1447 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
1448 (mi_cmd_break_insert_1): Update.
1449
1450 2017-09-29 Tom Tromey <tom@tromey.com>
1451
1452 * target.h (make_scoped_defer_target_commit_resume): Update.
1453 * target.c (make_scoped_defer_target_commit_resume): Rename from
1454 make_cleanup_defer_target_commit_resume. Return a
1455 scoped_restore.
1456 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
1457
1458 2017-09-29 Tom Tromey <tom@tromey.com>
1459
1460 * main.c (captured_main_1): Remove unused declaration.
1461 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
1462
1463 2017-09-29 Tom Tromey <tom@tromey.com>
1464
1465 * symtab.c (search_symbols): Remove unused outer cleanup.
1466 (make_source_files_completion_list): Remove unused declaration.
1467
1468 2017-09-29 Tom Tromey <tom@tromey.com>
1469
1470 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
1471
1472 2017-09-29 Tom Tromey <tom@tromey.com>
1473
1474 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
1475 gdb::byte_vector.
1476
1477 2017-09-29 Tom Tromey <tom@tromey.com>
1478
1479 * complaints.c (vcomplaint): Use std::string.
1480
1481 2017-09-29 Tom Tromey <tom@tromey.com>
1482
1483 * tracepoint.c (trace_variable_command): Use std::string.
1484 (encode_actions_1): Remove unused declarations.
1485 (create_tsv_from_upload): Use std::string.
1486
1487 2017-09-29 Tom Tromey <tom@tromey.com>
1488
1489 * cp-support.c (gdb_demangle): Use std::string.
1490
1491 2017-09-29 Tom Tromey <tom@tromey.com>
1492
1493 * stack.c (parse_frame_specification): Use std::string
1494 (info_frame_command): Use gdb::unique_xmalloc_ptr.
1495
1496 2017-09-29 Tom Tromey <tom@tromey.com>
1497
1498 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
1499
1500 2017-09-29 Tom Tromey <tom@tromey.com>
1501
1502 * utils.c (vfprintf_maybe_filtered): Use std::string.
1503 (vfprintf_unfiltered): Likewise.
1504
1505 2017-09-29 Tom Tromey <tom@tromey.com>
1506
1507 * event-top.c (top_level_prompt): Return std::string.
1508 (display_gdb_prompt): Update.
1509
1510 2017-09-29 Tom Tromey <tom@tromey.com>
1511
1512 * unittests/common-utils-selftests.c (format): New function.
1513 (string_vprintf_tests): New function.
1514 (_initialize_common_utils_selftests): Register new tests.
1515 * common/common-utils.c (string_vprintf): New function.
1516 * common/common-utils.h (string_vprintf): Declare.
1517
1518 2017-09-29 Pedro Alves <palves@redhat.com>
1519
1520 * common/rsp-low.c (unpack_varlen_hex): Constify.
1521 * common/rsp-low.h (unpack_varlen_hex): Constify.
1522 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
1523 Constify.
1524 * remote.c (remote_set_permissions, read_ptid)
1525 (remote_current_thread, remote_get_threads_with_qthreadinfo)
1526 (remote_static_tracepoint_marker_at)
1527 (remote_static_tracepoint_markers_by_strid)
1528 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
1529 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
1530 (parse_tracepoint_definition, parse_tsv_definition)
1531 (parse_static_tracepoint_marker_definition): Constify.
1532 * tracepoint.h (parse_static_tracepoint_marker_definition)
1533 (parse_trace_status, parse_tracepoint_status)
1534 (parse_tracepoint_definition, parse_tsv_definition): Constify.
1535
1536 2017-09-29 Pedro Alves <palves@redhat.com>
1537
1538 * remote.c (target_buf, target_buf_size): Delete.
1539 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
1540 Use the connection's packet buffer instead.
1541 All callers adjusted.
1542 (_initialize_remote): Remove references to target_buf and
1543 target_buf_size.
1544
1545 2017-09-28 Pedro Alves <palves@redhat.com>
1546
1547 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1548 unittests/common-utils-selftests.c.
1549 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
1550 (COMMON_OBS): Remove utils-selftests.o.
1551 * utils-selftests.c: Move to ...
1552 * unittests/common-utils-selftests.c: ... here and rename self
1553 test to "string_printf".
1554
1555 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
1556
1557 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
1558 having NULL cus or tus.
1559
1560 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1561
1562 * arm-tdep.c: (convert_from_extended): Remove.
1563 (convert_to_extended): Likewise.
1564 (arm_extract_return_value): Use convert_typed_floating.
1565 (arm_store_return_value): Likewise.
1566
1567 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1568 * sh-tdep.c: Do not include "floatformat.h".
1569 (sh_littlebyte_bigword_type): New function.
1570 (sh_register_convert_to_virtual): Use convert_typed_floating.
1571 (sh_register_convert_to_raw): Likewise.
1572 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1573 (sh64_littlebyte_bigword_type): New function.
1574 (sh64_extract_return_value): Use convert_typed_floating.
1575 (sh64_register_convert_to_virtual): Likewise.
1576 (sh64_register_convert_to_raw): Likewise.
1577
1578 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1579
1580 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
1581 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
1582
1583 * gdbtypes.h (union type_specific): Make field floatformat hold
1584 just a single struct floatformat, not an array.
1585 (floatformat_from_type): Move here.
1586 * gdbtypes.c (floatformat_from_type): Move here. Update to
1587 changed TYPE_FLOATFORMAT definition.
1588 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
1589 (recursive_dump_type): Likewise.
1590 (init_float_type): Install correct floatformat for byte order.
1591 (arch_float_type): Likewise.
1592
1593 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1594
1595 * gdbtypes.c (init_type): Change incoming argument from
1596 length-in-bytes to length-in-bits. Assert length is a
1597 multiple of TARGET_CHAR_BITS.
1598 (arch_type, arch_flags_type): Likewise.
1599 (init_integer_type): Update call to init_type.
1600 (init_character_type): Likewise.
1601 (init_boolean_type): Likewise.
1602 (init_float_type): Likewise.
1603 (init_decfloat_type): Likewise.
1604 (init_complex_type): Likewise.
1605 (init_pointer_type): Likewise.
1606 (objfile_type): Likewise.
1607 (arch_integer_type): Update call to arch_type.
1608 (arch_character_type): Likewise.
1609 (arch_boolean_type): Likewise.
1610 (arch_float_type): Likewise.
1611 (arch_decfloat_type): Likewise.
1612 (arch_complex_type): Likewise.
1613 (arch_pointer_type): Likewise.
1614 (gdbtypes_post_init): Likewise.
1615
1616 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
1617 (read_base_type): Likewise.
1618 * mdebugread.c (basic_type): Likewise.
1619 * stabsread.c (dbx_init_float_type): Likewise.
1620 (rs6000_builtin_type): Likewise.
1621 (read_range_type): Likewise. Also, fix call to init_integer_type
1622 with erroneous length argument.
1623
1624 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
1625 * d-lang.c (build_d_types): Likewise.
1626 * f-lang.c (build_fortran_types): Likewise.
1627 * go-lang.c (build_go_types): Likewise.
1628 * opencl-lang.c (build_opencl_types): Likewise.
1629 * jit.c (finalize_symtab): Likewise.
1630 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
1631 (build_std_type_info_type): Likewise.
1632 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
1633 update call to arch_flags_type.
1634
1635 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
1636 arch_type.
1637 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
1638 * windows-tdep.c (windows_get_tlb_type): Likewise.
1639
1640 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
1641 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1642 * m32c-tdep.c (make_types): Likewise.
1643 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
1644 (rl78_psw_type): Update call to arch_flags_type.
1645 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
1646 * rx-tdep.c (rx_psw_type): Likewise.
1647 (rx_fpsw_type): Likewise.
1648 * sparc-tdep.c (sparc_psr_type): Likewise.
1649 (sparc_fsr_type): Likewise.
1650 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
1651 (sparc64_ccr_type): Likewise.
1652 (sparc64_fsr_type): Likewise.
1653 (sparc64_fprs_type): Likewise.
1654
1655 2017-09-27 Tom Tromey <tom@tromey.com>
1656
1657 * findcmd.c (find_command): Constify.
1658
1659 2017-09-27 Tom Tromey <tom@tromey.com>
1660
1661 * ada-tasks.c (task_command_1, task_command): Constify.
1662
1663 2017-09-27 Tom Tromey <tom@tromey.com>
1664
1665 * symtab.c (maintenance_print_symbol_cache)
1666 (maintenance_flush_symbol_cache)
1667 (maintenance_print_symbol_cache_statistics): Constify.
1668
1669 2017-09-27 Tom Tromey <tom@tromey.com>
1670
1671 * inferior.c (detach_inferior_command, kill_inferior_command)
1672 (inferior_command): Constify.
1673
1674 2017-09-27 Tom Tromey <tom@tromey.com>
1675
1676 * regcache.c (regcache_print, maintenance_print_registers)
1677 (maintenance_print_raw_registers)
1678 (maintenance_print_cooked_registers)
1679 (maintenance_print_register_groups)
1680 (maintenance_print_remote_registers): Constify.
1681
1682 2017-09-27 Tom Tromey <tom@tromey.com>
1683
1684 * printcmd.c (map_display_numbers, undisplay_command)
1685 (enable_disable_display_command, enable_display_command)
1686 (disable_display_command): Constify.
1687
1688 2017-09-27 Tom Tromey <tom@tromey.com>
1689
1690 * breakpoint.h (delete_command): Don't declare.
1691 * breakpoint.c (delete_command, enable_once_command)
1692 (enable_count_command, enable_delete_command, breakpoint_1)
1693 (maintenance_info_breakpoints, stopin_command, stopat_command)
1694 (delete_command, delete_trace_command, save_breakpoints)
1695 (save_breakpoints_command, save_tracepoints_command): Constify.
1696
1697 2017-09-27 Tom Tromey <tom@tromey.com>
1698
1699 * macrocmd.c (macro_expand_command, macro_expand_once_command)
1700 (skip_ws, extract_identifier, macro_define_command)
1701 (macro_undef_command, macro_list_command): Constify.
1702
1703 2017-09-27 Tom Tromey <tom@tromey.com>
1704
1705 * infcmd.c (environment_info, set_environment_command)
1706 (unset_environment_command, path_info, info_proc_cmd_1)
1707 (info_proc_cmd_mappings, info_proc_cmd_stat)
1708 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
1709 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
1710
1711 2017-09-27 Tom Tromey <tom@tromey.com>
1712
1713 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
1714 Constify.
1715
1716 2017-09-27 Tom Tromey <tom@tromey.com>
1717
1718 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
1719
1720 2017-09-27 Tom Tromey <tom@tromey.com>
1721
1722 * demangle.c (demangle_command): Constify.
1723
1724 2017-09-27 Tom Tromey <tom@tromey.com>
1725
1726 * progspace.c (maintenance_info_program_spaces_command):
1727 Constify.
1728
1729 2017-09-27 Tom Tromey <tom@tromey.com>
1730
1731 * compile/compile.c (check_raw_argument, compile_file_command)
1732 (compile_code_command, compile_print_command): Constify.
1733
1734 2017-09-27 Tom Tromey <tom@tromey.com>
1735
1736 * reggroups.c (maintenance_print_reggroups): Constify.
1737
1738 2017-09-27 Tom Tromey <tom@tromey.com>
1739
1740 * dwarf2read.c (save_gdb_index_command): Constify.
1741
1742 2017-09-27 Tom Tromey <tom@tromey.com>
1743
1744 * stap-probe.c (info_probes_stap_command): Constify.
1745
1746 2017-09-27 Tom Tromey <tom@tromey.com>
1747
1748 * fork-child.c (unset_exec_wrapper_command): Constify.
1749
1750 2017-09-27 Tom Tromey <tom@tromey.com>
1751
1752 * btrace.c (get_uint, get_context_size, no_chunk)
1753 (maint_btrace_packet_history_cmd)
1754 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
1755 (maint_info_btrace_cmd): Constify.
1756
1757 2017-09-27 Tom Tromey <tom@tromey.com>
1758
1759 * reverse.c (delete_bookmark_command): Constify.
1760
1761 2017-09-27 Tom Tromey <tom@tromey.com>
1762
1763 * remote.c (set_memory_packet_size)
1764 (set_memory_write_packet_size, show_memory_write_packet_size)
1765 (set_memory_read_packet_size, show_memory_read_packet_size)
1766 (compare_sections_command, packet_command, remote_put_command)
1767 (remote_get_command, remote_delete_command): Constify.
1768
1769 2017-09-27 Tom Tromey <tom@tromey.com>
1770
1771 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
1772 (set_mipsfpu_double_command, set_mipsfpu_none_command)
1773 (set_mipsfpu_auto_command): Constify.
1774
1775 2017-09-27 Tom Tromey <tom@tromey.com>
1776
1777 * cli/cli-cmds.h (cd_command): Constify.
1778 * cli/cli-cmds.c (cd_command): Constify.
1779
1780 2017-09-27 Tom Tromey <tom@tromey.com>
1781
1782 * thread.c (thread_name_command, thread_find_command): Constify.
1783
1784 2017-09-27 Tom Tromey <tom@tromey.com>
1785
1786 * probe.c (enable_probes_command, disable_probes_command):
1787 Constify.
1788
1789 2017-09-27 Tom Tromey <tom@tromey.com>
1790
1791 * symfile.c (symbol_file_command): Constify.
1792 * gdbcore.h (deprecated_file_changed_hook): Constify.
1793 * exec.c (deprecated_file_changed_hook, exec_file_command)
1794 (file_command): Constify.
1795 * defs.h (symbol_file_command): Constify.
1796
1797 2017-09-27 Tom Tromey <tom@tromey.com>
1798
1799 * remote-fileio.c (set_system_call_allowed)
1800 (show_system_call_allowed): Constify.
1801
1802 2017-09-27 Tom Tromey <tom@tromey.com>
1803
1804 * tracepoint.c (delete_trace_variable_command)
1805 (tfind_end_command, tfind_start_command, tfind_pc_command)
1806 (tfind_tracepoint_command, tfind_line_command)
1807 (tfind_range_command, tfind_outside_command): Constify.
1808
1809 2017-09-27 Tom Tromey <tom@tromey.com>
1810
1811 * ax-gdb.c (maint_agent_printf_command, agent_command)
1812 (agent_eval_command): Constify.
1813
1814 2017-09-27 Tom Tromey <tom@tromey.com>
1815
1816 * tracepoint.c (info_scope_command): Constify.
1817 * python/python.c (gdbpy_decode_line): Constify.
1818 * python/py-breakpoint.c (bppy_init): Constify.
1819 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1820 * location.h: (new_linespec_location)
1821 (string_to_event_location_basic, string_to_event_location):
1822 Constify.
1823 * location.c (new_linespec_location)
1824 (string_to_event_location_basic, string_to_event_location):
1825 Constify.
1826 * linespec.h (decode_line_with_current_source)
1827 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1828 * linespec.c (linespec_lex_to_end)
1829 (decode_line_with_current_source)
1830 (decode_line_with_last_displayed): Constify.
1831 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1832 Constify.
1833 * cli/cli-cmds.c (edit_command, list_command): Constify.
1834 * breakpoint.h (until_break_command, watch_command_wrapper)
1835 (awatch_command_wrapper, rwatch_command_wrapper)
1836 (init_ada_exception_breakpoint): Constify.
1837 * breakpoint.c (break_command_1, dprintf_command)
1838 (break_range_command, watch_command_wrapper)
1839 (rwatch_command_wrapper, awatch_command_wrapper)
1840 (until_break_command, init_ada_exception_breakpoint)
1841 (strace_marker_create_sals_from_location, trace_command)
1842 (ftrace_command, strace_command, struct tracepoint): Constify.
1843 * ax-gdb.c (agent_command_1): Constify.
1844 * ada-lang.c (ada_exception_sal): Constify.
1845
1846 2017-09-27 Tom Tromey <tom@tromey.com>
1847
1848 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1849 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1850 (get_context_size, no_chunk, get_insn_history_modifiers)
1851 (cmd_record_insn_history, get_call_history_modifiers)
1852 (cmd_record_call_history): Constify.
1853
1854 2017-09-27 Tom Tromey <tom@tromey.com>
1855
1856 * source.c (show_substitute_path_command)
1857 (unset_substitute_path_command, set_substitute_path_command):
1858 Constify.
1859
1860 2017-09-27 Tom Tromey <tom@tromey.com>
1861
1862 * typeprint.c (maintenance_print_type): Constify.
1863 * maint.c (maintenance_dump_me, maintenance_demangle)
1864 (maintenance_time_display, maintenance_info_sections)
1865 (maintenance_print_statistics, maintenance_deprecate)
1866 (maintenance_undeprecate): Constify.
1867 (maintenance_do_deprecate): Constify. Use std::string.
1868 (maintenance_selftest): Constify.
1869 * gdbtypes.h (maintenance_print_type): Constify.
1870
1871 2017-09-27 Tom Tromey <tom@tromey.com>
1872
1873 * hppa-tdep.c (unwind_command): Constify.
1874
1875 2017-09-27 Tom Tromey <tom@tromey.com>
1876
1877 * target-descriptions.c (unset_tdesc_filename_cmd)
1878 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1879 Constify.
1880
1881 2017-09-27 Tom Tromey <tom@tromey.com>
1882
1883 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1884
1885 2017-09-27 Tom Tromey <tom@tromey.com>
1886
1887 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1888
1889 2017-09-27 Tom Tromey <tom@tromey.com>
1890
1891 * tui/tui-regs.c (tui_reg_command): Constify.
1892
1893 2017-09-27 Tom Tromey <tom@tromey.com>
1894
1895 * skip.c (skip_file_command, skip_function_command)
1896 (skip_enable_command, skip_disable_command, skip_delete_command):
1897 Constify.
1898
1899 2017-09-27 Tom Tromey <tom@tromey.com>
1900
1901 * record-btrace.c (cmd_record_btrace_bts_start)
1902 (cmd_record_btrace_pt_start): Constify.
1903
1904 2017-09-27 Tom Tromey <tom@tromey.com>
1905
1906 * symmisc.c (maintenance_print_symbols)
1907 (maintenance_print_msymbols, maintenance_print_objfiles)
1908 (maintenance_info_symtabs, maintenance_check_symtabs)
1909 (maintenance_expand_symtabs, maintenance_info_line_tables):
1910 Constify.
1911
1912 2017-09-27 Tom Tromey <tom@tromey.com>
1913
1914 * top.c (new_ui_command): Constify.
1915
1916 2017-09-27 Tom Tromey <tom@tromey.com>
1917
1918 * symfile.c (add_symbol_file_command)
1919 (remove_symbol_file_command, list_overlays_command)
1920 (map_overlay_command, unmap_overlay_command)
1921 (overlay_auto_command, overlay_manual_command)
1922 (overlay_off_command, overlay_load_command): Constify.
1923
1924 2017-09-27 Tom Tromey <tom@tromey.com>
1925
1926 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1927 (info_spu_mailbox_command, info_spu_dma_command)
1928 (info_spu_proxydma_command): Constify.
1929
1930 2017-09-27 Tom Tromey <tom@tromey.com>
1931
1932 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1933
1934 2017-09-27 Tom Tromey <tom@tromey.com>
1935
1936 * cli/cli-script.c (user_defined_command): Constify.
1937
1938 2017-09-27 Tom Tromey <tom@tromey.com>
1939
1940 * cli/cli-dump.c (dump_memory_command, dump_value_command)
1941 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1942 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1943 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1944 (dump_binary_value, append_binary_memory, append_binary_value):
1945 Constify.
1946 (struct dump_context) <func>: Constify.
1947 (add_dump_command): Update.
1948
1949 2017-09-27 Tom Tromey <tom@tromey.com>
1950
1951 * cli/cli-cmds.c (show_version, show_configuration)
1952 (source_command, show_user): Constify.
1953
1954 2017-09-27 Tom Tromey <tom@tromey.com>
1955
1956 * target.c (maintenance_print_target_stack): Constify.
1957
1958 2017-09-27 Tom Tromey <tom@tromey.com>
1959
1960 * interps.c (interpreter_exec_cmd): Constify.
1961
1962 2017-09-27 Tom Tromey <tom@tromey.com>
1963
1964 * record-full.c (cmd_record_full_restore): Constify.
1965
1966 2017-09-27 Tom Tromey <tom@tromey.com>
1967
1968 * memattr.c (enable_mem_command, disable_mem_command)
1969 (delete_mem_command): Constify.
1970
1971 2017-09-27 Tom Tromey <tom@tromey.com>
1972
1973 * value.c (show_convenience): Constify.
1974
1975 2017-09-27 Tom Tromey <tom@tromey.com>
1976
1977 * gdbcore.h (core_file_command): Update.
1978 * corefile.c (core_file_command): Constify.
1979
1980 2017-09-27 Tom Tromey <tom@tromey.com>
1981
1982 * user-regs.c (maintenance_print_user_registers): Constify.
1983
1984 2017-09-27 Tom Tromey <tom@tromey.com>
1985
1986 * cp-namespace.c (maintenance_cplus_namespace): Constify.
1987
1988 2017-09-27 Tom Tromey <tom@tromey.com>
1989
1990 * cp-support.c (first_component_command): Constify.
1991
1992 2017-09-27 Tom Tromey <tom@tromey.com>
1993
1994 * psymtab.c (maintenance_print_psymbols)
1995 (maintenance_info_psymtabs, maintenance_check_psymtabs):
1996 Constify.
1997
1998 2017-09-27 Tom Tromey <tom@tromey.com>
1999
2000 * windows-tdep.c (display_tib): Constify.
2001
2002 2017-09-27 Tom Tromey <tom@tromey.com>
2003
2004 * linux-fork.c (delete_checkpoint_command)
2005 (detach_checkpoint_command): Constify.
2006
2007 2017-09-27 Tom Tromey <tom@tromey.com>
2008
2009 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2010
2011 2017-09-27 Tom Tromey <tom@tromey.com>
2012
2013 * arc-tdep.c (dump_arc_instruction_command): Constify.
2014
2015 2017-09-27 Tom Tromey <tom@tromey.com>
2016
2017 * valprint.c (set_radix, show_radix): Constify.
2018
2019 2017-09-27 Tom Tromey <tom@tromey.com>
2020
2021 * dtrace-probe.c (info_probes_dtrace_command): Constify.
2022
2023 2017-09-27 Tom Tromey <tom@tromey.com>
2024
2025 * command.h (not_just_help_class_command): Update.
2026 * cli/cli-decode.h (not_just_help_class_command): Update.
2027 * cli/cli-decode.c (not_just_help_class_command): Constify.
2028
2029 2017-09-27 Tom Tromey <tom@tromey.com>
2030
2031 * gdb_bfd.c (maintenance_info_bfds): Constify.
2032
2033 2017-09-27 Tom Tromey <tom@tromey.com>
2034
2035 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2036 overloads.
2037 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
2038 (do_const_cfunc): New function.
2039 (cmd_cfunc_eq): New overload.
2040 (cli_user_command_p): Check do_const_cfunc.
2041 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2042 const_cfunc.
2043 * command.h (add_cmd): Add const overload and no-function
2044 overload.
2045 (set_cmd_cfunc): Add const overload.
2046 (cmd_const_cfunc_ftype): Declare.
2047 (cmd_cfunc_eq): Add const overload.
2048 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2049 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2050 overload.
2051
2052 2017-09-27 Tom Tromey <tom@tromey.com>
2053
2054 * macroexp.c (get_next_token_for_substitution): New function.
2055 (substitute_args): Call it. Check for __VA_OPT__.
2056
2057 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
2058 Pedro Alves <palves@redhat.com>
2059
2060 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2061 producer_is_icc_lt_14.
2062 (producer_is_icc_lt_14): New function.
2063 (check_producer): Add code for checking version of ICC.
2064 (producer_is_icc): Move to producer.c.
2065 (read_structure_type): Restrict ICC workaround to ICC<14.
2066 * producer.c: Include selftest.h.
2067 (producer_is_icc, producer_parsing_tests, _initialize_producer):
2068 New functions.
2069 * producer.h (producer_is_icc): New declaration.
2070
2071 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
2072
2073 * Makefile.in (SFILES): Add producer.c.
2074 (COMMON_OBS): Add producer.o
2075 * amd64-tdep.c (producer.h): Add new include.
2076 * dwarf2read.c (producer.h): Add new include.
2077 * producer.c: New file.
2078 * producer.h: New file.
2079 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2080 producer.c.
2081 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2082 producer.h.
2083
2084 2017-09-26 Matthias Klose <doko@ubuntu.com>
2085
2086 * configure.ac: Search ncursesw before ncurses.
2087 Check ncursesw/ncurses.h before ncurses/ncurses.h.
2088 * gdb_curses.h: Include <ncursesw/ncurses.h>
2089 * config.in, configure: Regenerate.
2090
2091 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2092
2093 PR gdb/22185
2094 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2095 obsolete.
2096 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2097 Remove i386sol2 support.
2098 * configure.nat <i386sol2>: Remove.
2099 <sol2-64>: Fold into ...
2100 <sol2>: ... this.
2101 Move common settings to default section.
2102 Add sol-thread.o.
2103 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2104 x86_64-*-solaris2.1[0-9]*>: Rename to ...
2105 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2106 <i[34567]86-*-solaris*>: Remove.
2107 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2108
2109 * configure.ac: Remove wctype in libw check.
2110 (_MSE_INT_H): Don't define on Solaris 7-9.
2111 <solaris*>: Remove libthread_db.so.1 check.
2112 * configure: Regenerate.
2113 * config.in: Regenerate.
2114
2115 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2116 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2117 (gdb_ps_size_t): Remove.
2118 Use base types in users.
2119 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2120
2121 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2122
2123 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2124
2125 PR build/22206
2126 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2127 (adi_is_addr_mapped): Likewise.
2128 (PSR_ICC): Don't redefine.
2129 (PSR_IMPL): Likewise.
2130
2131 2017-09-25 Tom Tromey <tom@tromey.com>
2132
2133 * regcache.c (regcache::dump): Use string_printf.
2134
2135 2017-09-25 Tom Tromey <tom@tromey.com>
2136
2137 * regcache.c (class regcache_invalidator): New.
2138 (struct register_to_invalidate): Remove.
2139 (make_cleanup_regcache_invalidate): Remove.
2140 (regcache::raw_write): Use regcache_invalidator.
2141
2142 2017-09-25 Tom Tromey <tom@tromey.com>
2143
2144 * spu-tdep.c (spu2ppu_sniffer): Update.
2145 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
2146 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
2147 Remove.
2148 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
2149 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
2150 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
2151 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
2152 (frame_pop): Update.
2153
2154 2017-09-25 Tom Tromey <tom@tromey.com>
2155
2156 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2157 * regcache.h (regcache_xfree): Don't declare.
2158 * regcache.c (regcache_xfree): Remove.
2159 (do_regcache_xfree): Use delete.
2160 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2161 * linux-fork.c (free_fork): Use delete.
2162 (fork_save_infrun_state): Likewise.
2163 * jit.c (jit_dealloc_cache): Use delete.
2164 * infrun.c (discard_infcall_suspend_state): Use delete.
2165
2166 2017-09-25 Tom Tromey <tom@tromey.com>
2167
2168 * regcache.h (regcache_xmalloc): Don't declare.
2169 (regcache_raw_set_cached_value): Update comment.
2170 * regcache.c (regcache_xmalloc): Remove.
2171 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2172 * jit.c (jit_frame_sniffer): Use new.
2173 * frame.c (frame_save_as_regcache): Use new.
2174
2175 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2176
2177 * NEWS: Advertise support for guarded-storage registers on IBM z.
2178
2179 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2180
2181 * s390-linux-nat.c (have_regset_gs): New static variable.
2182 (s390_linux_fetch_inferior_registers): Handle guarded-storage
2183 control block and guarded-storage broadcast control regsets.
2184 (s390_read_description): Detect whether the target has
2185 guarded-storage support, return appropriate tdesc.
2186 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2187 (features/s390x-gs-linux64.c): Likewise.
2188 (struct gdbarch_tdep) <have_gs>: New field.
2189 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2190 (s390_gsbc_regset): New variables.
2191 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2192 and s390_gsbc_regset, if applicable.
2193 (s390_core_read_description): Check whether core file was from a
2194 target with guarded-storage support; include appropriate regsets.
2195 (s390_gdbarch_init): Add registers for guarded-storage support.
2196 (_initialize_s390_tdep): Initialize new target descriptions that
2197 include registers for guarded-storage support.
2198 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2199 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2200 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2201 (S390_NUM_REGS): Adjust macro definition.
2202 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2203 (tdesc_s390x_gs_linux64): New declarations.
2204
2205 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2206
2207 * features/s390-gs-linux64.xml: New file.
2208 * features/s390-gs.xml: New file.
2209 * features/s390-gsbc.xml: New file.
2210 * features/s390x-gs-linux64.xml: New file.
2211 * features/Makefile (WHICH): Add s390-gs-linux64 and
2212 s390x-gs-linux64.
2213 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2214 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2215 * features/s390-gs-linux64.c: New generated file.
2216 * features/s390x-gs-linux64.c: New file.
2217 * regformats/s390-gs-linux64.dat: New file.
2218 * regformats/s390x-gs-linux64.dat: New file.
2219
2220 2017-09-23 Tom Tromey <tom@tromey.com>
2221
2222 * defs.h (make_cleanup_override_quit_handler): Don't declare.
2223
2224 2017-09-22 Tom Tromey <tom@tromey.com>
2225
2226 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
2227 type to scoped_restore_tmpl.
2228 <scoped_input_handler>: Initialize m_quit_handler directly.
2229
2230 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
2231
2232 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2233 (cd_command): Likewise. Free "current_directory" before
2234 assigning to it.
2235 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2236 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2237 * top.c (gdb_dirbuf): Remove global declaration.
2238 * top.h (gdb_dirbuf): Likewise.
2239
2240 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
2241
2242 * gnulib/aclocal.m4: Regenerate.
2243 * gnulib/config.in: Regenerate.
2244 * gnulib/configure: Regenerate.
2245 * gnulib/import/Makefile.am: Regenerate.
2246 * gnulib/import/Makefile.in: Regenerate.
2247 * gnulib/import/assure.h: New file.
2248 * gnulib/import/at-func.c: Likewise
2249 * gnulib/import/chdir-long.c: New file.
2250 * gnulib/import/chdir-long.h: New file.
2251 * gnulib/import/cloexec.c: New file.
2252 * gnulib/import/cloexec.h: New file.
2253 * gnulib/import/close.c: New file.
2254 * gnulib/import/closedir.c: New file.
2255 * gnulib/import/dirent-private.h: New file.
2256 * gnulib/import/dup-safer.c: New file.
2257 * gnulib/import/dup.c: New file.
2258 * gnulib/import/dup2.c: New file.
2259 * gnulib/import/error.c: New file.
2260 * gnulib/import/error.h: New file.
2261 * gnulib/import/exitfail.c: New file.
2262 * gnulib/import/exitfail.h: New file.
2263 * gnulib/import/fchdir.c: New file.
2264 * gnulib/import/fcntl.c: New file.
2265 * gnulib/import/fcntl.in.h: New file.
2266 * gnulib/import/fd-hook.c: New file.
2267 * gnulib/import/fd-hook.h: New file.
2268 * gnulib/import/fd-safer.c: New file.
2269 * gnulib/import/fdopendir.c: New file.
2270 * gnulib/import/filename.h: New file.
2271 * gnulib/import/filenamecat-lgpl.c: New file.
2272 * gnulib/import/filenamecat.h: New file.
2273 * gnulib/import/fstat.c: New file.
2274 * gnulib/import/fstatat.c: New file.
2275 * gnulib/import/getcwd-lgpl.c: New file.
2276 * gnulib/import/getcwd.c: New file.
2277 * gnulib/import/getdtablesize.c: New file.
2278 * gnulib/import/getlogin_r.c: New file.
2279 * gnulib/import/getprogname.c: New file.
2280 * gnulib/import/getprogname.h: New file.
2281 * gnulib/import/gettext.h: New file.
2282 * gnulib/import/glob-libc.h: New file.
2283 * gnulib/import/glob.c: New file.
2284 * gnulib/import/glob.in.h: New file.
2285 * gnulib/import/intprops.h: New file.
2286 * gnulib/import/m4/chdir-long.m4: New file.
2287 * gnulib/import/m4/close.m4: New file.
2288 * gnulib/import/m4/closedir.m4: New file.
2289 * gnulib/import/m4/d-ino.m4: New file.
2290 * gnulib/import/m4/d-type.m4: New file.
2291 * gnulib/import/m4/dup.m4: New file.
2292 * gnulib/import/m4/dup2.m4: New file.
2293 * gnulib/import/m4/error.m4: New file.
2294 * gnulib/import/m4/fchdir.m4: New file.
2295 * gnulib/import/m4/fcntl.m4: New file.
2296 * gnulib/import/m4/fcntl_h.m4: New file.
2297 * gnulib/import/m4/fdopendir.m4: New file.
2298 * gnulib/import/m4/filenamecat.m4: New file.
2299 * gnulib/import/m4/fstat.m4: New file.
2300 * gnulib/import/m4/fstatat.m4: New file.
2301 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
2302 * gnulib/import/m4/getcwd-path-max.m4: New file.
2303 * gnulib/import/m4/getcwd.m4: New file.
2304 * gnulib/import/m4/getdtablesize.m4: New file.
2305 * gnulib/import/m4/getlogin_r.m4: New file.
2306 * gnulib/import/m4/getprogname.m4: New file.
2307 * gnulib/import/m4/glob.m4: New file.
2308 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2309 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2310 * gnulib/import/m4/mempcpy.m4: New file.
2311 * gnulib/import/m4/memrchr.m4: New file.
2312 * gnulib/import/m4/mode_t.m4: New file.
2313 * gnulib/import/m4/msvc-inval.m4: New file.
2314 * gnulib/import/m4/msvc-nothrow.m4: New file.
2315 * gnulib/import/m4/open.m4: New file.
2316 * gnulib/import/m4/openat.m4: New file.
2317 * gnulib/import/m4/opendir.m4: New file.
2318 * gnulib/import/m4/readdir.m4: New file.
2319 * gnulib/import/m4/realloc.m4: New file.
2320 * gnulib/import/m4/rewinddir.m4: New file.
2321 * gnulib/import/m4/save-cwd.m4: New file.
2322 * gnulib/import/m4/strdup.m4: New file.
2323 * gnulib/import/m4/strerror.m4: New file.
2324 * gnulib/import/m4/unistd-safer.m4: New file.
2325 * gnulib/import/mempcpy.c: New file.
2326 * gnulib/import/memrchr.c: New file.
2327 * gnulib/import/msvc-inval.c: New file.
2328 * gnulib/import/msvc-inval.h: New file.
2329 * gnulib/import/msvc-nothrow.c: New file.
2330 * gnulib/import/msvc-nothrow.h: New file.
2331 * gnulib/import/open.c: New file.
2332 * gnulib/import/openat-die.c: New file.
2333 * gnulib/import/openat-priv.h: New file.
2334 * gnulib/import/openat-proc.c: New file.
2335 * gnulib/import/openat.c: New file.
2336 * gnulib/import/openat.h: New file.
2337 * gnulib/import/opendir.c: New file.
2338 * gnulib/import/pipe-safer.c: New file.
2339 * gnulib/import/readdir.c: New file.
2340 * gnulib/import/realloc.c: New file.
2341 * gnulib/import/rewinddir.c: New file.
2342 * gnulib/import/save-cwd.c: New file.
2343 * gnulib/import/save-cwd.h: New file.
2344 * gnulib/import/strdup.c: New file.
2345 * gnulib/import/strerror-override.c: New file.
2346 * gnulib/import/strerror-override.h: New file.
2347 * gnulib/import/strerror.c: New file.
2348 * gnulib/import/unistd--.h: New file.
2349 * gnulib/import/unistd-safer.h: New file.
2350 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
2351 "getcwd" and "glob".
2352 * ser-tcp.c: Undefine "close" before redefining it.
2353
2354 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
2355
2356 * guile/scm-value.c (gdbscm_value_address): Initialize address,
2357 get rid of res_val.
2358
2359 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2360
2361 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
2362 <sol2,sparc>: Likewise.
2363 <sol2-64,i386>: Likewise.
2364
2365 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
2366 -Wdeprecated-declarations on *-*-solaris*.
2367 * configure: Regenerate.
2368
2369 * procfs.c: Include "nat/inferior.h".
2370 (procfs_info_proc): Fix typo.
2371
2372 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2373
2374 * remote.c (vector): Include.
2375 (struct private_thread_info): Add field, thread_handle.
2376 (free_private_thread_info): Deallocate storage associated with
2377 thread handle.
2378 (get_private_info_thread): Initialize `thread_handle' field.
2379 (struct thread_item): Add field, thread_handle.
2380 (clear_threads_listing_context): Deallocate storage associated
2381 with thread handle.
2382 (start_thread): Add support for "handle" attribute.
2383 (thread_attributes): Add "handle".
2384 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
2385 field.
2386 (remote_update_thread_list): Update thread_handle.
2387 (remote_thread_handle_to_thread_info): New function.
2388 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
2389
2390 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2391
2392 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
2393 function.
2394 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
2395 * python/python-internal.h (thread_object_type): Declare.
2396
2397 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2398
2399 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
2400 (target_thread_handle_to_thread_info): Declare.
2401 * target.c (target_thread_handle_to_thread_info): New function.
2402 * target-delegates.c: Regenerate.
2403 * gdbthread.h (find_thread_by_handle): Declare.
2404 * thread.c (find_thread_by_handle): New function.
2405 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
2406 function.
2407 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
2408
2409 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
2410
2411 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
2412
2413 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
2414
2415 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
2416
2417 2017-09-21 Yao Qi <yao.qi@linaro.org>
2418
2419 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
2420 to gdb_target_obs.
2421
2422 2017-09-20 Tom Tromey <tom@tromey.com>
2423
2424 * breakpoint.c (struct counted_command_line): Remove.
2425 (breakpoint_commands): Update.
2426 (alloc_counted_command_line, incref_counted_command_line)
2427 (decref_counted_command_line, do_cleanup_counted_command_line)
2428 (make_cleanup_decref_counted_command_line): Remove.
2429 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
2430 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
2431 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
2432 (save_breakpoints): Update.
2433 * breakpoint.h (counted_command_line): Now a typedef to
2434 shared_ptr.
2435 (struct breakpoint) <commands>: Now a counted_command_line.
2436 (struct bpstats) <command>: Likewise.
2437
2438 2017-09-20 Tom Tromey <tom@tromey.com>
2439
2440 * breakpoint.c (struct commands_info, do_map_commands_command):
2441 Remove.
2442 (commands_command_1): Update.
2443 (iterate_over_related_breakpoints): Take a function_view.
2444 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
2445 (delete_command): Update.
2446 (map_breakpoint_numbers): Take a function_view.
2447 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
2448 (disable_command): Update.
2449 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
2450 (enable_command): Update.
2451 (struct disp_data, do_enable_breakpoint_disp)
2452 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
2453 (do_map_enable_delete_breakpoint): Remove.
2454 (enable_once_command, enable_count_command, enable_delete_command)
2455 (delete_trace_variable_command): Update.
2456
2457 2017-09-20 Tom Tromey <tom@tromey.com>
2458
2459 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
2460 (bpstat_clear): Use delete.
2461 (bpstats): New constructors.
2462 (bpstat_copy, bpstat_stop_status): Use new.
2463 (dprintf_after_condition_true): Update.
2464 * breakpoint.h (bpstats::bpstats): Add constructors.
2465 (bpstats::~bpstats): Add destructor.
2466
2467 2017-09-20 Pedro Alves <palves@redhat.com>
2468
2469 * eval.c (make_params): Delete, refactored as ...
2470 (class fake_method): ... this new type's ctor.
2471 (fake_method::~fake_method): New.
2472 (evaluate_subexp_standard): Use 'fake_method'.
2473
2474 2017-09-20 Tom Tromey <tom@tromey.com>
2475
2476 * windows-nat.c (get_windows_debug_event, windows_wait)
2477 (do_initial_windows_stuff, windows_attach): Update.
2478 * utils.c (vwarning, internal_vproblem): Update.
2479 (ui_unregister_input_event_handler_cleanup)
2480 (prepare_to_handle_input): Remove.
2481 (class scoped_input_handler): New.
2482 (defaulted_query, prompt_for_continue): Update.
2483 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
2484 Update.
2485 * top.c (undo_terminal_modifications_before_exit): Update.
2486 * target/target.h (target_terminal_init, target_terminal_inferior)
2487 (target_terminal_ours): Don't declare.
2488 (class target_terminal): New.
2489 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
2490 (target_terminal_ours_for_output)
2491 (make_cleanup_restore_target_terminal): Don't declare.
2492 (target_terminal_info): Remove.
2493 * target.c (enum terminal_state, terminal_state): Remove.
2494 (target_terminal::terminal_state): Define.
2495 (target_terminal::init): Rename from target_terminal_init.
2496 (target_terminal::inferior): Rename from
2497 target_terminal_inferior.
2498 (target_terminal::ours): Rename from target_terminal_ours.
2499 (target_terminal::ours_for_output): Rename from
2500 target_terminal_ours_for_output.
2501 (target_terminal::info): New method.
2502 (cleanup_restore_target_terminal)
2503 (make_cleanup_restore_target_terminal): Remove.
2504 * solib.c (handle_solib_event): Update.
2505 * remote.c (remote_serial_quit_handler): Update.
2506 (remote_terminal_inferior, remote_wait_as): Update.
2507 * record-full.c (record_full_wait_1): Update.
2508 * nto-procfs.c (procfs_create_inferior): Update.
2509 * nat/fork-inferior.c (startup_inferior): Update.
2510 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
2511 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
2512 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
2513 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
2514 (mi_breakpoint_created, mi_breakpoint_deleted)
2515 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
2516 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2517 (mi_user_selected_context_changed, report_initial_inferior):
2518 Update.
2519 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
2520 (linux_nat_terminal_inferior): Update.
2521 * infrun.c (follow_fork_inferior)
2522 (handle_vfork_child_exec_or_exit, do_target_resume)
2523 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
2524 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
2525 Update.
2526 * inflow.c (child_terminal_init, info_terminal_command): Update.
2527 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
2528 (attach_command): Update.
2529 * infcall.c (call_thread_fsm_should_stop): Update.
2530 * gnu-nat.c (gnu_attach): Update.
2531 * extension.c (struct active_ext_lang_state)
2532 (restore_active_ext_lang): Update.
2533 * exceptions.c (print_flush): Update.
2534 * event-top.c (async_enable_stdin, default_quit_handler): Update.
2535 (struct quit_handler_cleanup_data, restore_quit_handler)
2536 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
2537 Remove.
2538 * cp-support.c (gdb_demangle): Update.
2539 * breakpoint.c (update_inserted_breakpoint_locations)
2540 (insert_breakpoint_locations, handle_jit_event)
2541 (disable_breakpoints_in_unloaded_shlib): Update.
2542 * annotate.c (annotate_breakpoints_invalid)
2543 (annotate_frames_invalid): Update.
2544
2545 2017-09-20 Tom Tromey <tom@tromey.com>
2546
2547 * main.c (catch_command_errors): Rename from
2548 catch_command_errors_const.
2549 (captured_main_1): Update.
2550
2551 2017-09-20 Pedro Alves <palves@redhat.com>
2552
2553 * cli/cli-cmds.c (list_command): Use print_sal_location.
2554 (print_sal_location): New function.
2555 (ambiguous_line_spec): Use print_sal_location.
2556 * linespec.c (symbol_to_sal): Record the symbol in the sal.
2557 * symtab.c (find_function_start_sal): Likewise.
2558 * symtab.h (symtab_and_line::symbol): New field.
2559
2560 2017-09-20 Pedro Alves <palves@redhat.com>
2561
2562 * linespec.c (minsym_found): Handle non-text minsyms.
2563 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
2564
2565 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2566
2567 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
2568 backslash.
2569
2570 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2571
2572 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
2573 vmovups instead vmovaps.
2574 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
2575
2576 2017-09-19 John Baldwin <jhb@FreeBSD.org>
2577
2578 * NEWS (Changes since GDB 8.0): Add starti.
2579 * infcmd.c (enum run_break): New.
2580 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
2581 case.
2582 (run_command): Use enum run_how.
2583 (start_command): Likewise.
2584 (starti_command): New function.
2585 (RUN_ARGS_HELP): New macro.
2586 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
2587 commands. Add starti command.
2588
2589 2017-09-19 Yao Qi <yao.qi@linaro.org>
2590
2591 * Makefile.in (monitor.o): Remove the rule.
2592
2593 2017-09-19 Yao Qi <yao.qi@linaro.org>
2594
2595 * annotate.h (struct annotate_arg_emitter): Use
2596 DISABLE_COPY_AND_ASSIGN.
2597 * common/refcounted-object.h (refcounted_object): Likewise.
2598 * completer.h (struct completion_result): Likewise.
2599 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
2600 * filename-seen-cache.h (filename_seen_cache): Likewise.
2601 * gdbcore.h (thread_section_name): Likewise.
2602 * gdb_regex.h (compiled_regex): Likewise.
2603 * gdbthread.h (scoped_restore_current_thread): Likewise.
2604 * inferior.h (scoped_restore_current_inferior): Likewise.
2605 * jit.c (jit_reader): Likewise.
2606 * linespec.h (struct linespec_result): Likewise.
2607 * mi/mi-parse.h (struct mi_parse): Likewise.
2608 * nat/fork-inferior.c (execv_argv): Likewise.
2609 * progspace.h (scoped_restore_current_program_space): Likewise.
2610 * python/python-internal.h (class gdbpy_enter): Likewise.
2611 * regcache.h (regcache): Likewise.
2612 * target-descriptions.c (struct tdesc_reg): Likewise.
2613 (struct tdesc_type): Likewise.
2614 (struct tdesc_feature): Likewise.
2615 * ui-out.h (ui_out_emit_type): Likewise.
2616
2617 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
2618
2619 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
2620 label abort_expression.
2621
2622 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2623
2624 * common/buffer.c (buffer_xml_printf): Adjust.
2625 * common/xml-utils.c (xml_escape_text): Change return type to
2626 std::string, update code accordingly.
2627 * common/xml-utils.h (xml_escape_text): Change return type to
2628 std::string.
2629 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
2630 * windows-tdep.c (windows_xfer_shared_library): Adjust.
2631 * unittests/xml-utils-selftests.c (test_xml_escape_text):
2632 Adjust.
2633
2634 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2635
2636 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
2637 (SUBDIR_UNITTESTS_OBS): Add new object file.
2638 * unittests/xml-utils-selftests.c: New file.
2639
2640 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2641
2642 * common/selftest.h (selftest): New struct/interface.
2643 (register_test): Add name parameter, add new overload.
2644 (run_tests): Add filter parameter.
2645 (for_each_selftest_ftype): New typedef.
2646 (for_each_selftest): New declaration.
2647 * common/selftest.c (tests): Change type to
2648 map<string, unique_ptr<selftest>>.
2649 (simple_selftest): New struct.
2650 (register_test): New function.
2651 (register_test): Add name parameter and use it.
2652 (run_tests): Add filter parameter and use it. Add prints.
2653 Adjust to vector -> map change.
2654 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
2655 registering selftests.
2656 * arm-tdep.c (_initialize_arm_tdep): Likewise.
2657 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
2658 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
2659 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
2660 * findvar.c (_initialize_findvar): Likewise.
2661 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
2662 * maint.c (maintenance_selftest): Update call to run_tests.
2663 (maintenance_info_selftests): New function.
2664 (_initialize_maint_cmds): Register "maintenance info selftests"
2665 command. Update "maintenance selftest" doc.
2666 * regcache.c (_initialize_regcache): Add names when registering
2667 selftests.
2668 * rust-exp.y (_initialize_rust_exp): Likewise.
2669 * selftest-arch.c (gdbarch_selftest): New struct.
2670 (gdbarch_tests): Remove.
2671 (register_test_foreach_arch): Add name parameter. Call
2672 register_test.
2673 (tests_with_arch): Remove, move most content to
2674 gdbarch_selftest::operator().
2675 (_initialize_selftests_foreach_arch): Remove.
2676 * selftest-arch.h (register_test_foreach_arch): Add name
2677 parameter.
2678 (run_tests_with_arch): New declaration.
2679 * utils-selftests.c (_initialize_utils_selftests): Add names
2680 when registering selftests.
2681 * utils.c (_initialize_utils): Likewise.
2682 * unittests/array-view-selftests.c
2683 (_initialize_array_view_selftests): Likewise.
2684 * unittests/environ-selftests.c (_initialize_environ_selftests):
2685 Likewise.
2686 * unittests/function-view-selftests.c
2687 (_initialize_function_view_selftests): Likewise.
2688 * unittests/offset-type-selftests.c
2689 (_initialize_offset_type_selftests): Likewise.
2690 * unittests/optional-selftests.c
2691 (_initialize_optional_selftests): Likewise.
2692 * unittests/scoped_restore-selftests.c
2693 (_initialize_scoped_restore_selftests): Likewise.
2694 * NEWS: Document "maintenance selftest" and "maint info
2695 selftests".
2696
2697 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2698
2699 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
2700 scoped_restore.
2701
2702 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2703
2704 * mi/mi-main.c (mi_load_progress): Make uiout variable
2705 a unique_ptr.
2706
2707 2017-09-15 Pedro Alves <palves@redhat.com>
2708
2709 * compile/compile-c-types.c (convert_enum, convert_int)
2710 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
2711
2712 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2713
2714 * dwarf2read.c (copy_string): Remove.
2715 (parse_macro_definition): Replace copy_string with savestring.
2716
2717 2017-09-15 Yao Qi <yao.qi@linaro.org>
2718
2719 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
2720 gdb_target_obs.
2721 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
2722 Likewise.
2723 (i[34567]86-*-linux*): Likewise.
2724
2725 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2726
2727 * dwarf2expr.h (dwarf_stack_value): Add constructor.
2728 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
2729 <stack>: Change type to std::vector.
2730 <stack_len, stack_allocated>: Remove.
2731 <grow_stack>: Remove.
2732 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2733 (dwarf_expr_context::~dwarf_expr_context): Remove.
2734 (dwarf_expr_context::grow_stack): Remove.
2735 (dwarf_expr_context::push): Adjust.
2736 (dwarf_expr_context::pop): Adjust.
2737 (dwarf_expr_context::fetch): Adjust.
2738 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
2739 (dwarf_expr_context::stack_empty_p): Adjust.
2740 (dwarf_expr_context::execute_stack_op): Adjust.
2741
2742 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2743
2744 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
2745 return type to bool.
2746 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
2747
2748 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2749
2750 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
2751 Change type to bool.
2752 (dwarf_stack_value) <in_stack_memory>: Likewise.
2753 (dwarf_expr_context) <push_address>: Change parameter type to
2754 bool.
2755 <fetch_in_stack_memory>: Change return type to bool.
2756 <push>: Change parameter type to bool.
2757 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
2758 to bool.
2759 (dwarf_expr_context::push_address): Likewise.
2760 (dwarf_expr_context::fetch_in_stack_memory): Change return type
2761 to bool.
2762 (dwarf_expr_context::execute_stack_op): Adjust.
2763 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
2764
2765 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2766
2767 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
2768 (struct dwarf_expr_context) <n_pieces>: Remove.
2769 <pieces>: Change type to std::vector.
2770 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2771 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
2772 pieces.
2773 (dwarf_expr_context::add_piece): Adjust.
2774 * dwarf2loc.c (struct piece_closure): Initialize fields.
2775 <n_pieces>: Remove.
2776 <pieces>: Change type to std::vector.
2777 (allocate_piece_closure): Adjust, change parameter to
2778 std::vector rvalue and std::move it to piece_closure.
2779 (rw_pieced_value): Adjust.
2780 (check_pieced_synthetic_pointer): Adjust.
2781 (indirect_synthetic_pointer): Adjust.
2782 (coerce_pieced_ref): Adjust.
2783 (free_pieced_value_closure): Adjust. Use delete to free
2784 piece_closure.
2785 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
2786 to allocate_piece_closure.
2787 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2788
2789 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2790
2791 * probe.h (probe_ops_cp): Remove typedef.
2792 (DEF_VEC_P (probe_ops_cp)): Remove.
2793 (all_probe_ops): Change type to std::vector.
2794 * probe.c (info_probes_for_ops): Adjust to vector change.
2795 (probe_linespec_to_ops): Likewise.
2796 (all_probe_ops): Change type to std::vector.
2797 (_initialize_probe): Adjust to vector change.
2798 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2799 * elfread.c (elf_get_probes): Likewise.
2800 * stap-probe.c (_initialize_stap_probe): Likewise.
2801
2802 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2803
2804 * probe.h (struct bound_probe): Define constructors.
2805 * probe.c (bound_probe_s): Remove typedef.
2806 (DEF_VEC_O (bound_probe_s)): Remove VEC.
2807 (collect_probes): Change return type to std::vector, remove
2808 cleanup.
2809 (compare_probes): Return bool, change parameter type. Change
2810 semantic to "less than".
2811 (gen_ui_out_table_header_info): Change parameter to std::vector
2812 and update.
2813 (exists_probe_with_pops): Likewise.
2814 (info_probes_for_ops): Update to std::vector change.
2815 (enable_probes_command): Likewise.
2816 (disable_probes_command): Likewise.
2817
2818 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2819
2820 * probe.h (struct probe_ops) <get_probes>: Change parameter from
2821 vec to std::vector.
2822 * probe.c (parse_probes_in_pspace): Update.
2823 (find_probes_in_objfile): Update.
2824 (find_probe_by_pc): Update.
2825 (collect_probes): Update.
2826 (probe_any_get_probes): Update.
2827 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2828 return type to reference to std::vector.
2829 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2830 std::vector and update.
2831 (dtrace_process_dof): Likewise.
2832 (dtrace_get_probes): Likewise.
2833 * elfread.c (elf_get_probes): Change return type to std::vector,
2834 store an std::vector in bfd_data.
2835 (probe_key_free): Update to std::vector.
2836 * stap-probe.c (handle_stap_probe): Change parameter to
2837 std::vector and update.
2838 (stap_get_probes): Likewise.
2839 * symfile-debug.c (debug_sym_get_probes): Change return type to
2840 std::vector and update.
2841
2842 2017-09-11 Tom Tromey <tom@tromey.com>
2843
2844 * breakpoint.c (program_breakpoint_here_p): Update.
2845 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2846 from make_show_memory_breakpoints_cleanup. Return a
2847 scoped_restore_tmpl<int>.
2848 (restore_show_memory_breakpoints): Remove.
2849 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2850 * mem-break.c (memory_validate_breakpoint): Update.
2851 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2852 (ia64_memory_remove_breakpoint): Update.
2853 (ia64_breakpoint_from_pc): Update.
2854 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2855 from make_show_memory_breakpoints_cleanup.
2856
2857 2017-09-11 Tom Tromey <tom@tromey.com>
2858
2859 * d-namespace.c (d_lookup_symbol): Use std::string.
2860 (find_symbol_in_baseclass): Likewise.
2861
2862 2017-09-11 Tom Tromey <tom@tromey.com>
2863
2864 * ctf.c (ctf_start): Use std::string.
2865
2866 2017-09-11 Tom Tromey <tom@tromey.com>
2867
2868 * ada-lang.c (is_known_support_routine): Update.
2869 (ada_unhandled_exception_name_addr_from_raise): Update.
2870 * guile/scm-frame.c (gdbscm_frame_name): Update.
2871 * python/py-frame.c (frapy_name): Update.
2872 (frapy_function): Update.
2873 * stack.h (find_frame_funname): Update.
2874 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2875 (print_frame): Update.
2876
2877 2017-09-11 Tom Tromey <tom@tromey.com>
2878
2879 * findcmd.c (put_bits): Take a gdb::byte_vector.
2880 (parse_find_args): Return gdb::byte_vector. "args" now const.
2881 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
2882 cleanups.
2883 (find_command): Update.
2884
2885 2017-09-11 Tom Tromey <tom@tromey.com>
2886
2887 * cli/cli-script.c (class scoped_restore_hook_in): New.
2888 (clear_hook_in_cleanup): Remove.
2889 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2890 scoped_restore_hook_in.
2891
2892 2017-09-11 Tom Tromey <tom@tromey.com>
2893
2894 * cli/cli-script.c (restore_interp): Remove.
2895 (read_command_lines): Use scoped_restore_interp.
2896 * interps.c (scoped_restore_interp::set_temp): Rename from
2897 interp_set_temp.
2898 * interps.h (class scoped_restore_interp): New.
2899 (interp_set_temp): Remove.
2900
2901 2017-09-11 Tom Tromey <tom@tromey.com>
2902
2903 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2904 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2905 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2906 scoped_restore.
2907 (mi_cmd_break_insert_1): Update.
2908 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2909 scoped_restore.
2910
2911 2017-09-11 Tom Tromey <tom@tromey.com>
2912
2913 * demangle.c (demangle_command): Update.
2914 * breakpoint.c (disable_command): Update.
2915 (enable_command): Update.
2916 (find_location_by_number): Make "number" const. Use
2917 get_number_trailer.
2918 * cli/cli-utils.c (extract_arg): Return std::string.
2919 * probe.c (parse_probe_linespec): Update. Change types.
2920 (collect_probes): Take string arguments.
2921 (parse_probe_linespec): Likewise.
2922 (info_probes_for_ops): Update.
2923 (enable_probes_command): Update.
2924 (disable_probes_command): Update.
2925 * break-catch-sig.c (catch_signal_split_args): Update.
2926 * mi/mi-parse.c (mi_parse): Update.
2927
2928 2017-09-11 Tom Tromey <tom@tromey.com>
2929
2930 * language.h (language_enum): Make argument const.
2931 * language.c (language_enum): Make argument const.
2932
2933 2017-09-11 Tom Tromey <tom@tromey.com>
2934
2935 * common/common-utils.h (skip_to_space): Remove macro, redeclare
2936 as function.
2937 (skip_to_space): Rename from skip_to_space_const.
2938 * common/common-utils.c (skip_to_space): New function.
2939 (skip_to_space): Rename from skip_to_space_const.
2940 * cli/cli-utils.h (get_number): Rename from get_number_const.
2941 (extract_arg): Rename from extract_arg_const.
2942 * cli/cli-utils.c (get_number): Rename from get_number_const.
2943 (extract_arg): Rename from extract_arg_const.
2944 (number_or_range_parser::get_number): Use ::get_number.
2945 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2946 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2947 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2948 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2949 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2950 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2951 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2952 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2953
2954 2017-09-11 Tom Tromey <tom@tromey.com>
2955
2956 * python/python.c (do_start_initialization): Use
2957 py-event-types.def to initialize types.
2958 Define all object type structures.
2959 * python/python-internal.h: Don't declare event initialization
2960 functions.
2961 * python/py-threadevent.c (thread_event_object_type): Don't
2962 define.
2963 * python/py-stopevent.c (stop_event_object_type): Don't define.
2964 * python/py-signalevent.c (signal_event_object_type): Don't
2965 declare or define.
2966 * python/py-newobjfileevent.c (new_objfile_event_object_type)
2967 (clear_objfiles_event_object_type): Don't declare or define.
2968 * python/py-infevents.c (inferior_call_pre_event_object_type)
2969 (inferior_call_post_event_object_type)
2970 (register_changed_event_object_type)
2971 (memory_changed_event_object_type): Don't declare or define.
2972 * python/py-inferior.c (new_thread_event_object_type)
2973 (new_inferior_event_object_type)
2974 (inferior_deleted_event_object_type): Don't declare or define.
2975 * python/py-exitedevent.c (exited_event_object_type): Don't
2976 declare or define.
2977 * python/py-evts.c (gdbpy_initialize_py_events): Use
2978 py-all-events.def.
2979 * python/py-events.h (thread_event_object_type): Don't declare.
2980 (events_object): Use py-all-events.def.
2981 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
2982 py-event-types.def.
2983 * python/py-event-types.def: New file.
2984 * python/py-continueevent.c (create_continue_event_object): Don't
2985 declare or define.
2986 * python/py-bpevent.c (breakpoint_event_object_type): Don't
2987 declare or define.
2988 * python/py-all-events.def: New file.
2989
2990 2017-09-11 Tom Tromey <tom@tromey.com>
2991
2992 * python/py-threadevent.c (create_thread_event_object): Return
2993 gdbpy_ref.
2994 * python/py-stopevent.h (create_stop_event_object)
2995 (create_breakpoint_event_object, create_signal_event_object):
2996 Update.
2997 * python/py-stopevent.c (create_stop_event_object): Return
2998 gdbpy_ref.
2999 (emit_stop_event): Update.
3000 * python/py-signalevent.c (create_signal_event_object): Return
3001 gdbpy_ref.
3002 * python/py-infevents.c (create_inferior_call_event_object):
3003 Update.
3004 * python/py-event.h (create_event_object)
3005 (create_thread_event_object): Update.
3006 * python/py-event.c (create_event_object): Return gdbpy_ref.
3007 * python/py-continueevent.c: Return gdbpy_ref.
3008 * python/py-bpevent.c (create_breakpoint_event_object): Return
3009 gdbpy_ref.
3010
3011 2017-09-11 Tom Tromey <tom@tromey.com>
3012
3013 PR python/15622:
3014 * NEWS: Add entry.
3015 * python/python.c (do_start_initialization): Initialize new event
3016 types.
3017 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3018 (gdbpy_initialize_inferior_deleted_event)
3019 (gdbpy_initialize_new_thread_event): Declare.
3020 * python/py-threadevent.c (create_thread_event_object): Add option
3021 "thread" parameter.
3022 * python/py-inferior.c (new_thread_event_object_type)
3023 (new_inferior_event_object_type)
3024 (inferior_deleted_event_object_type): Declare.
3025 (python_new_inferior, python_inferior_deleted): New functions.
3026 (add_thread_object): Emit new_thread event.
3027 (gdbpy_initialize_inferior): Attach new functions to corresponding
3028 observers.
3029 (new_thread, new_inferior, inferior_deleted): Define new event
3030 types.
3031 * python/py-evts.c (gdbpy_initialize_py_events): Add new
3032 registries.
3033 * python/py-events.h (events_object) <new_inferior,
3034 inferior_deleted, new_thread>: New fields.
3035 * python/py-event.h (create_thread_event_breakpoint): Add optional
3036 "thread" parameter.
3037
3038 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
3039
3040 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3041 check current_ui instead.
3042 (internal_vproblem): Likewise.
3043
3044 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
3045
3046 * thread.c (print_thread_info_1): Remove unnecessary calls to
3047 uiout->is_mi_like_p.
3048
3049 2017-09-09 Tom Tromey <tom@tromey.com>
3050
3051 * namespace.h (add_using_directive): Update.
3052 * namespace.c (add_using_directive): Change type of excludes to
3053 std::vector.
3054 * dwarf2read.c (read_import_statement): Use std::vector.
3055 (read_namespace): Update.
3056 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3057
3058 2017-09-09 Tom Tromey <tom@tromey.com>
3059
3060 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3061
3062 2017-09-09 Tom Tromey <tom@tromey.com>
3063
3064 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3065
3066 2017-09-09 Tom Tromey <tom@tromey.com>
3067
3068 * stack.c (func_command): Use gdb::def_vector.
3069
3070 2017-09-09 Tom Tromey <tom@tromey.com>
3071
3072 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3073 ui_out_emit_list, ui_out_emit_tuple.
3074 (mi_cmd_var_update): Likewise.
3075
3076 2017-09-09 Tom Tromey <tom@tromey.com>
3077
3078 * mi/mi-interp.c (mi_user_selected_context_changed): Use
3079 ui_out_redirect_pop.
3080 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3081 ui_out_redirect_pop.
3082 * utils.c (do_ui_out_redirect_pop)
3083 (make_cleanup_ui_out_redirect_pop): Remove.
3084 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3085 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3086 * ui-out.h (ui_out_redirect_pop): New class.
3087
3088 2017-09-09 Tom Tromey <tom@tromey.com>
3089
3090 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3091 (list_available_thread_groups, mi_cmd_list_thread_groups)
3092 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3093 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3094 Likewise.
3095
3096 2017-09-09 Tom Tromey <tom@tromey.com>
3097
3098 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3099 ui_out_emit_tuple.
3100
3101 2017-09-09 Tom Tromey <tom@tromey.com>
3102
3103 * target.c (flash_erase_command): Use ui_out_emit_tuple.
3104 * stack.c (print_frame): Use ui_out_emit_tuple.
3105 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3106 (info_spu_mailbox_command, info_spu_dma_command)
3107 (info_spu_proxydma_command): Likewise.
3108 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3109 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3110 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3111 ui_out_emit_tuple.
3112 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3113
3114 2017-09-09 Tom Tromey <tom@tromey.com>
3115
3116 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3117 (class ui_out_emit_table): Update comment.
3118 * ui-out.c (do_cleanup_table_end)
3119 (make_cleanup_ui_out_table_begin_end): Remove.
3120 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3121 (info_spu_dma_cmdlist): Likewise.
3122 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3123 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3124 ui_out_emit_table.
3125
3126 2017-09-09 Tom Tromey <tom@tromey.com>
3127
3128 * thread.c (print_thread_info_1): Use ui_out_emit_table,
3129 ui_out_emit_list, gdb::optional.
3130
3131 2017-09-09 John Baldwin <jhb@FreeBSD.org>
3132
3133 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
3134 prototype.
3135 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
3136 prototype.
3137 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
3138 prototype.
3139 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
3140 * ada-exp.y: Remove _initialize_ada_exp prototype.
3141 * ada-lang.c: Remove _initialize_ada_language prototype.
3142 * ada-tasks.c: Remove _initialize_tasks prototype.
3143 * addrmap.c: Remove _initialize_addrmap prototype.
3144 * agent.c: Remove _initialize_agent prototype.
3145 * aix-thread.c: Remove _initialize_aix_thread prototype.
3146 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
3147 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
3148 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
3149 prototype.
3150 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
3151 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
3152 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3153 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3154 prototype.
3155 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3156 prototype.
3157 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3158 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3159 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3160 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3161 prototype.
3162 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3163 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3164 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3165 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3166 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3167 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3168 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3169 prototype.
3170 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3171 prototype.
3172 * annotate.c: Remove _initialize_annotate prototype.
3173 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3174 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3175 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3176 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3177 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3178 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3179 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3180 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3181 prototype.
3182 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3183 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3184 * auto-load.c: Remove _initialize_auto_load prototype.
3185 * auxv.c: Remove _initialize_auxv prototype.
3186 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3187 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3188 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3189 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3190 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3191 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3192 prototype.
3193 * break-catch-throw.c: Remove _initialize_break_catch_throw
3194 prototype.
3195 * breakpoint.c: Remove _initialize_breakpoint prototype.
3196 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3197 * btrace.c: Remove _initialize_btrace prototype.
3198 * charset.c: Remove _initialize_charset prototype.
3199 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3200 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3201 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3202 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3203 * cli/cli-script.c: Remove _initialize_cli_script prototype.
3204 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3205 * coffread.c: Remove _initialize_coffread prototype.
3206 * compile/compile.c: Remove _initialize_compile prototype.
3207 * complaints.c: Remove _initialize_complaints prototype.
3208 * completer.c: Remove _initialize_completer prototype.
3209 * copying.awk: Remove _initialize_copying prototype.
3210 * copying.c: Regenerate.
3211 * core-regset.c: Remove _initialize_core_regset prototype.
3212 * corefile.c: Remove _initialize_core prototype.
3213 * corelow.c: Remove _initialize_corelow prototype.
3214 * cp-abi.c: Remove _initialize_cp_abi prototype.
3215 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3216 * cp-support.c: Remove _initialize_cp_support prototype.
3217 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3218 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3219 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3220 * ctf.c: Remove _initialize_ctf prototype.
3221 * d-lang.c: Remove _initialize_d_language prototype.
3222 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
3223 prototype.
3224 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
3225 * dbxread.c: Remove _initialize_dbxread prototype.
3226 * dcache.c: Remove _initialize_dcache prototype.
3227 * demangle.c: Remove _initialize_demangler prototype.
3228 * disasm-selftests.c: Remove _initialize_disasm_selftests
3229 prototype.
3230 * disasm.c: Remove _initialize_disasm prototype.
3231 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3232 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3233 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3234 prototype.
3235 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3236 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3237 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3238 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3239 * elfread.c: Remove _initialize_elfread prototype.
3240 * exec.c: Remove _initialize_exec prototype.
3241 * extension.c: Remove _initialize_extension prototype.
3242 * f-lang.c: Remove _initialize_f_language prototype.
3243 * f-valprint.c: Remove _initialize_f_valprint prototype.
3244 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
3245 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
3246 * filesystem.c: Remove _initialize_filesystem prototype.
3247 * findcmd.c: Remove _initialize_mem_search prototype.
3248 * fork-child.c: Remove _initialize_fork_child prototype.
3249 * frame-base.c: Remove _initialize_frame_base prototype.
3250 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
3251 * frame.c: Remove _initialize_frame prototype.
3252 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
3253 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
3254 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
3255 * gcore.c: Remove _initialize_gcore prototype.
3256 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
3257 * gdbarch.c: Regenerate.
3258 * gdbarch.sh: Remove _initialize_gdbarch prototype.
3259 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
3260 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
3261 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
3262 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
3263 * go-lang.c: Remove _initialize_go_language prototype.
3264 * go32-nat.c: Remove _initialize_go32_nat prototype.
3265 * guile/guile.c: Remove _initialize_guile prototype.
3266 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
3267 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
3268 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
3269 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
3270 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
3271 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
3272 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
3273 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
3274 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
3275 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
3276 prototype.
3277 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
3278 prototype.
3279 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
3280 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
3281 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
3282 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
3283 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
3284 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
3285 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
3286 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
3287 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
3288 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
3289 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
3290 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
3291 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
3292 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3293 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
3294 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
3295 prototype.
3296 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
3297 prototype.
3298 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
3299 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
3300 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
3301 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
3302 * infcall.c: Remove _initialize_infcall prototype.
3303 * infcmd.c: Remove _initialize_infcmd prototype.
3304 * inferior.c: Remove _initialize_inferiors prototype.
3305 * inflow.c: Remove _initialize_inflow prototype.
3306 * infrun.c: Remove _initialize_infrun prototype.
3307 * interps.c: Remove _initialize_interpreter prototype.
3308 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
3309 * jit.c: Remove _initialize_jit prototype.
3310 * language.c: Remove _initialize_language prototype.
3311 * linux-fork.c: Remove _initialize_linux_fork prototype.
3312 * linux-nat.c: Remove _initialize_linux_nat prototype.
3313 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
3314 * linux-thread-db.c: Remove _initialize_thread_db prototype.
3315 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
3316 * m2-lang.c: Remove _initialize_m2_language prototype.
3317 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
3318 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
3319 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
3320 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
3321 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
3322 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3323 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3324 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
3325 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
3326 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
3327 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3328 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3329 * machoread.c: Remove _initialize_machoread prototype.
3330 * macrocmd.c: Remove _initialize_macrocmd prototype.
3331 * macroscope.c: Remove _initialize_macroscope prototype.
3332 * maint.c: Remove _initialize_maint_cmds prototype.
3333 * mdebugread.c: Remove _initialize_mdebugread prototype.
3334 * memattr.c: Remove _initialize_mem prototype.
3335 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
3336 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
3337 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
3338 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
3339 * mi/mi-main.c: Remove _initialize_mi_main prototype.
3340 * microblaze-linux-tdep.c: Remove
3341 _initialize_microblaze_linux_tdep prototype.
3342 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
3343 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
3344 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
3345 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
3346 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
3347 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
3348 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
3349 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
3350 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
3351 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
3352 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
3353 prototype.
3354 * mipsread.c: Remove _initialize_mipsread prototype.
3355 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
3356 prototype.
3357 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
3358 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
3359 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
3360 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
3361 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
3362 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
3363 prototype.
3364 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
3365 * nto-procfs.c: Remove _initialize_procfs prototype.
3366 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
3367 * objc-lang.c: Remove _initialize_objc_language prototype.
3368 * objfiles.c: Remove _initialize_objfiles prototype.
3369 * observer.c: Remove observer_test_first_notification_function,
3370 observer_test_second_notification_function,
3371 observer_test_third_notification_function, and
3372 _initialize_observer prototypes.
3373 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
3374 * osabi.c: Remove _initialize_gdb_osabi prototype.
3375 * osdata.c: Remove _initialize_osdata prototype.
3376 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
3377 * parse.c: Remove _initialize_parse prototype.
3378 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
3379 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
3380 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
3381 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
3382 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
3383 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
3384 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
3385 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
3386 * printcmd.c: Remove _initialize_printcmd prototype.
3387 * probe.c: Remove _initialize_probe prototype.
3388 * proc-api.c: Remove _initialize_proc_api prototype.
3389 * proc-events.c: Remove _initialize_proc_events prototype.
3390 * proc-service.c: Remove _initialize_proc_service prototype.
3391 * procfs.c: Remove _initialize_procfs prototype.
3392 * psymtab.c: Remove _initialize_psymtab prototype.
3393 * python/python.c: Remove _initialize_python prototype.
3394 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
3395 * record-btrace.c: Remove _initialize_record_btrace prototype.
3396 * record-full.c: Remove _initialize_record_full prototype.
3397 * record.c: Remove _initialize_record prototype.
3398 * regcache.c: Remove _initialize_regcache prototype.
3399 * reggroups.c: Remove _initialize_reggroup prototype.
3400 * remote-notif.c: Remove _initialize_notif prototype.
3401 * remote-sim.c: Remove _initialize_remote_sim prototype.
3402 * remote.c: Remove _initialize_remote prototype.
3403 * reverse.c: Remove _initialize_reverse prototype.
3404 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
3405 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
3406 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
3407 prototype.
3408 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
3409 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
3410 * rust-exp.y: Remove _initialize_rust_exp prototype.
3411 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
3412 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
3413 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
3414 * score-tdep.c: Remove _initialize_score_tdep prototype.
3415 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
3416 prototype.
3417 * ser-go32.c: Remove _initialize_ser_dos prototype.
3418 * ser-mingw.c: Remove _initialize_ser_windows prototype.
3419 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
3420 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
3421 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
3422 * serial.c: Remove _initialize_serial prototype.
3423 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
3424 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
3425 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
3426 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
3427 * skip.c: Remove _initialize_step_skip prototype.
3428 * sol-thread.c: Remove _initialize_sol_thread prototype.
3429 * solib-aix.c: Remove _initialize_solib_aix prototype.
3430 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
3431 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
3432 * solib-frv.c: Remove _initialize_frv_solib prototype.
3433 * solib-spu.c: Remove _initialize_spu_solib prototype.
3434 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
3435 * solib-target.c: Remove _initialize_solib_target prototype.
3436 * solib.c: Remove _initialize_solib prototype.
3437 * source.c: Remove _initialize_source prototype.
3438 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
3439 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
3440 prototype.
3441 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
3442 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
3443 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
3444 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
3445 prototype.
3446 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
3447 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
3448 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
3449 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
3450 prototype.
3451 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
3452 prototype.
3453 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
3454 prototype.
3455 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
3456 prototype.
3457 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
3458 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
3459 prototype.
3460 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
3461 prototype.
3462 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
3463 prototype.
3464 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
3465 prototype.
3466 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
3467 prototype.
3468 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
3469 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
3470 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
3471 * stabsread.c: Remove _initialize_stabsread prototype.
3472 * stack.c: Remove _initialize_stack prototype.
3473 * stap-probe.c: Remove _initialize_stap_probe prototype.
3474 * std-regs.c: Remove _initialize_frame_reg prototype.
3475 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
3476 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
3477 * symfile.c: Remove _initialize_symfile prototype.
3478 * symmisc.c: Remove _initialize_symmisc prototype.
3479 * symtab.c: Remove _initialize_symtab prototype.
3480 * target-dcache.c: Remove _initialize_target_dcache prototype.
3481 * target-descriptions.c: Remove _initialize_target_descriptions
3482 prototype.
3483 * thread.c: Remove _initialize_thread prototype.
3484 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
3485 prototype.
3486 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
3487 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
3488 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
3489 prototype.
3490 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
3491 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
3492 * tracefile.c: Remove _initialize_tracefile prototype.
3493 * tracepoint.c: Remove _initialize_tracepoint prototype.
3494 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
3495 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
3496 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
3497 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
3498 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
3499 * tui/tui-win.c: Remove _initialize_tui_win prototype.
3500 * tui/tui.c: Remove _initialize_tui prototype.
3501 * typeprint.c: Remove _initialize_typeprint prototype.
3502 * user-regs.c: Remove _initialize_user_regs prototype.
3503 * utils.c: Remove _initialize_utils prototype.
3504 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
3505 * valarith.c: Remove _initialize_valarith prototype.
3506 * valops.c: Remove _initialize_valops prototype.
3507 * valprint.c: Remove _initialize_valprint prototype.
3508 * value.c: Remove _initialize_values prototype.
3509 * varobj.c: Remove _initialize_varobj prototype.
3510 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
3511 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
3512 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
3513 * windows-nat.c: Remove _initialize_windows_nat,
3514 _initialize_check_for_gdb_ini, and _initialize_loadable
3515 prototypes.
3516 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
3517 * xcoffread.c: Remove _initialize_xcoffread prototype.
3518 * xml-support.c: Remove _initialize_xml_support prototype.
3519 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
3520 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
3521 prototype.
3522 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
3523 prototype.
3524 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
3525
3526 2017-09-08 Keith Seitz <keiths@redhat.com>
3527
3528 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
3529 field.
3530
3531 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
3532
3533 * f-valprint.c (f_val_print): Remove check for one byte
3534 sized integers. Remove printing of character type.
3535
3536 2017-09-08 Frank Penczek <frank.penczek@intel.com>
3537 Christoph Weinmann <christoph.t.weinmann@intel.com>
3538 Bernhard Heckel <bernhard.heckel@intel.com>
3539
3540 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
3541 to maintain proper indentation when printing pointers/refs.
3542
3543 2017-09-07 Joel Brobecker <brobecker@adacore.com>
3544
3545 GDB 8.0.1 released.
3546
3547 2017-09-07 Joel Brobecker <brobecker@adacore.com>
3548
3549 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
3550
3551 2017-09-05 Tom Tromey <tom@tromey.com>
3552
3553 * parse.c (funcall_chain): Now a std::vector.
3554 (start_arglist, end_arglist): Simplify.
3555 (free_funcalls): Remove.
3556 (parse_exp_in_context_1): Remove cleanup.
3557
3558 2017-09-05 Tom Tromey <tom@tromey.com>
3559
3560 * go-exp.y (go_parse): Don't create a cleanup.
3561
3562 2017-09-05 Tom Tromey <tom@tromey.com>
3563
3564 * d-exp.y (PrimaryExpression): Use std::string.
3565 (d_parse): Don't create a cleanup.
3566
3567 2017-09-05 Tom Tromey <tom@tromey.com>
3568
3569 * utils.c (do_clear_parser_state): Remove.
3570 (make_cleanup_clear_parser_state): Remove.
3571 * p-exp.y (pascal_parse): Use scoped_restore.
3572 * m2-exp.y (m2_parse): Use scoped_restore.
3573 * f-exp.y (f_parse): Use scoped_restore.
3574 * d-exp.y (d_parse): Use scoped_restore.
3575 * c-exp.y (c_parse): Use scoped_restore.
3576 * ada-exp.y (ada_parse): Use scoped_restore.
3577 * utils.h (make_cleanup_clear_parser_state): Remove.
3578
3579 2017-09-06 Keith Seitz <keiths@redhat.com>
3580
3581 * dwarf2read.c (dw2_linkage_name_attr): New function.
3582 (dw2_linkage_name): New function.
3583 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
3584 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
3585 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
3586
3587 2017-09-06 Kamil Rytarowski <n54@gmx.com>
3588
3589 * config/djgpp/djconfig.sh: Correct shell portability issue.
3590
3591 2017-09-06 Kamil Rytarowski <n54@gmx.com>
3592
3593 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
3594
3595 2017-09-06 John Baldwin <jhb@FreeBSD.org>
3596
3597 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
3598 * NEWS: Mention new FreeBSD/mips native configuration.
3599 * configure.host: Add aarch64*-*-freebsd*.
3600 * configure.nat: Likewise.
3601 * aarch64-fbsd-nat.c: New file.
3602
3603 2017-09-06 John Baldwin <jhb@FreeBSD.org>
3604
3605 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
3606 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
3607 * NEWS: Mention new FreeBSD/aarch64 target.
3608 * configure.tgt: Add aarch64*-*-freebsd*.
3609 * aarch64-fbsd-tdep.c: New file.
3610 * aarch64-fbsd-tdep.h: New file.
3611
3612 2017-09-06 Kamil Rytarowski <n54@gmx.com>
3613
3614 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
3615
3616 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3617
3618 * parse.c (find_minsym_type_and_address): Don't relocate addresses
3619 of TLS symbols.
3620
3621 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3622
3623 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
3624 call.
3625
3626 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3627
3628 * infrun.c (follow_exec): Call add_thread after
3629 target_find_description.
3630
3631 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3632
3633 * infrun.c (handle_inferior_event_1): When exec'ing, read
3634 stop_pc after follow_exec.
3635
3636 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3637
3638 * remote.c (process_g_packet): Update error message.
3639
3640 2017-09-05 Yao Qi <yao.qi@linaro.org>
3641
3642 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
3643 targets.
3644
3645 2017-09-05 Pedro Alves <palves@redhat.com>
3646
3647 * eval.c (eval_call, evaluate_funcall): New functions, factored
3648 out from ...
3649 (evaluate_subexp_standard): ... this.
3650
3651 2017-09-05 Yao Qi <yao.qi@linaro.org>
3652
3653 * amd64-tdep.c (amd64_target_description): Create target
3654 descriptions.
3655 (_initialize_amd64_tdep): Don't call functions
3656 initialize_tdesc_amd64_*. Add self tests.
3657 * arch/amd64.c (amd64_create_target_description): Add parameter
3658 is_linux. Call set_tdesc_osabi if is_linux is true.
3659 * arch/amd64.h (amd64_create_target_description): Update the
3660 declaration.
3661 * arch/i386.c (i386_create_target_description): Add parameter
3662 is_linux. Call set_tdesc_osabi if is_linux is true.
3663 * arch/i386.h (i386_create_target_description): Update
3664 declaration.
3665 * configure.tgt: Add i386.o to gdb_target_obs.
3666 * features/Makefile (XMLTOC): Remove i386/*.xml.
3667 * features/i386/amd64-avx-avx512.c: Remove.
3668 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
3669 * features/i386/amd64-avx-mpx.c: Remove.
3670 * features/i386/amd64-avx.c: Remove.
3671 * features/i386/amd64-mpx.c: Remove.
3672 * features/i386/amd64.c: Remove.
3673 * features/i386/i386-avx-avx512.c: Remove.
3674 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
3675 * features/i386/i386-avx-mpx.c: Remove.
3676 * features/i386/i386-avx.c: Remove.
3677 * features/i386/i386-mmx.c: Remove.
3678 * features/i386/i386-mpx.c: Remove.
3679 * features/i386/i386.c: Remove.
3680 * i386-tdep.c: Don't include features/i386/i386*.c., include
3681 target-descriptions.h and arch/i386.h.
3682 (i386_target_description): Create target descriptions.
3683 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
3684 functions. Do self tests.
3685
3686 2017-09-05 Yao Qi <yao.qi@linaro.org>
3687
3688 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
3689 * features/i386/amd64-avx-avx512-linux.c: Removed.
3690 * features/i386/amd64-avx-linux.c: Removed.
3691 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
3692 * features/i386/amd64-avx-mpx-linux.c: Removed.
3693 * features/i386/amd64-linux.c: Removed.
3694 * features/i386/amd64-mpx-linux.c: Removed.
3695 * features/i386/x32-avx-avx512-linux.c: Removed.
3696 * features/i386/x32-avx-linux.c: Removed.
3697 * features/i386/x32-linux.c: Removed.
3698
3699 2017-09-05 Yao Qi <yao.qi@linaro.org>
3700
3701 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
3702 features/i386/*.c.
3703 (amd64_linux_read_description): Call
3704 amd64_create_target_description.
3705 * arch/amd64.c: New file.
3706 * arch/amd64.h: New file.
3707 * configure.tgt (x86_64-*-linux*): Append amd64.o.
3708 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
3709
3710 2017-09-05 Yao Qi <yao.qi@linaro.org>
3711
3712 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
3713 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
3714 (amd64_linux_read_description): Create target descriptions.
3715 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
3716 functions. Add unit tests.
3717 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
3718 x32-core.xml.
3719 * features/i386/64bit-avx.c: Generated.
3720 * features/i386/64bit-avx512.c: Generated.
3721 * features/i386/64bit-core.c: Generated.
3722 * features/i386/64bit-linux.c: Generated.
3723 * features/i386/64bit-mpx.c: Generated.
3724 * features/i386/64bit-pkeys.c: Generated.
3725 * features/i386/64bit-segments.c: Generated.
3726 * features/i386/64bit-sse.c: Generated.
3727 * features/i386/x32-core.c: Generated.
3728 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
3729 c files for amd64-linux and x32-linux.
3730
3731 2017-09-05 Yao Qi <yao.qi@linaro.org>
3732
3733 * amd64-linux-tdep.c (amd64_linux_read_description): New
3734 function.
3735 (amd64_linux_core_read_description): Call
3736 amd64_linux_read_description.
3737 (amd64_linux_init_abi): Likewise.
3738 (amd64_x32_linux_init_abi): Likewise.
3739 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
3740 * x86-linux-nat.c (x86_linux_read_description): Call
3741 amd64_linux_read_description.
3742
3743 2017-09-05 Yao Qi <yao.qi@linaro.org>
3744
3745 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
3746 comments.
3747
3748 2017-09-05 Yao Qi <yao.qi@linaro.org>
3749
3750 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
3751 * features/i386/i386-avx-avx512-linux.c: Remove.
3752 * features/i386/i386-avx-linux.c: Remove.
3753 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
3754 * features/i386/i386-avx-mpx-linux.c: Remove.
3755 * features/i386/i386-linux.c: Remove.
3756 * features/i386/i386-mmx-linux.c: Remove.
3757 * features/i386/i386-mpx-linux.c: Remove.
3758
3759 2017-09-05 Yao Qi <yao.qi@linaro.org>
3760
3761 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
3762 (SFILES): Add arch/i386.c.
3763 (HFILES_NO_SRCDIR): Add arch/i386.h.
3764 * arch/i386.c: New file.
3765 * arch/i386.h: New file.
3766 * arch/tdesc.h (allocate_target_description): Declare.
3767 (set_tdesc_architecture): Declare.
3768 (set_tdesc_osabi): Declare.
3769 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
3770 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
3771 include arch/i386.h.
3772 (i386_linux_read_description): Remove code and call
3773 i386_create_target_description.
3774 (set_tdesc_architecture): New function.
3775 (set_tdesc_osabi): New function.
3776 * target-descriptions.h (allocate_target_description): Remove.
3777
3778 2017-09-05 Yao Qi <yao.qi@linaro.org>
3779
3780 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
3781 * target-descriptions.c (tdesc_create_feature): Likewise, and
3782 adjust code.
3783 * features/i386/32bit-avx.c: Re-generated.
3784 * features/i386/32bit-avx512.c: Re-generated.
3785 * features/i386/32bit-core.c: Re-generated.
3786 * features/i386/32bit-linux.c: Re-generated.
3787 * features/i386/32bit-mpx.c: Re-generated.
3788 * features/i386/32bit-pkeys.c: Re-generated.
3789 * features/i386/32bit-sse.c: Re-generated.
3790
3791 2017-09-05 Yao Qi <yao.qi@linaro.org>
3792
3793 * regformats/regdef.h (struct reg): Override operator == and !=.
3794
3795 2017-09-05 Yao Qi <yao.qi@linaro.org>
3796
3797 * arch/tdesc.h: New file.
3798 * regformats/regdat.sh: Generate code using tdesc_create_reg.
3799 * target-descriptions.c: Update comments.
3800 * target-descriptions.h: Include "arch/tdesc.h". Remove the
3801 declarations.
3802 * features/i386/32bit-avx.c: Re-generated.
3803 * features/i386/32bit-avx512.c: Re-generated.
3804 * features/i386/32bit-core.c: Re-generated.
3805 * features/i386/32bit-linux.c: Re-generated.
3806 * features/i386/32bit-mpx.c: Re-generated.
3807 * features/i386/32bit-pkeys.c: Re-generated.
3808 * features/i386/32bit-sse.c: Re-generated.
3809
3810 2017-09-05 Yao Qi <yao.qi@linaro.org>
3811
3812 * regformats/regdat.sh: Update generated code.
3813
3814 2017-09-05 Yao Qi <yao.qi@linaro.org>
3815
3816 * regformats/regdat.sh: Adjust code order.
3817
3818 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3819
3820 * expprint.c (dump_subexp_body_standard): Use constant format
3821 string in fprintf_filtered call.
3822
3823 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3824
3825 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3826 NetBSD/i386.
3827 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3828
3829 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3830
3831 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3832
3833 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3834
3835 * bsd-kvm.o: Define _KMEMUSER.
3836 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3837 * configure: Regenerate.
3838
3839 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3840
3841 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3842 * i386-fbsd-nat.c: Likewise.
3843
3844 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3845
3846 * unittests/array-view-selftests.c: Add include of <array>.
3847
3848 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3849
3850 * spu-tdep.c (flush_ea_cache): Add missing argument to
3851 call_function_by_hand.
3852
3853 2017-09-04 Pedro Alves <palves@redhat.com>
3854
3855 * NEWS (Safer support for debugging with no debug info): New.
3856
3857 2017-09-04 Pedro Alves <palves@redhat.com>
3858
3859 * c-exp.y (function_method, function_method_void): Add current
3860 instance flags to TYPE_INSTANCE.
3861 * dwarf2read.c (check_modifier): New.
3862 (compute_delayed_physnames): Assert that only C++ adds delayed
3863 physnames. Mark fn_fields as const/volatile depending on
3864 physname.
3865 * eval.c (make_params): New type_instance_flags parameter. Use
3866 it as the new type's instance flags.
3867 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3868 flags element and pass it to make_params.
3869 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3870 instance flags element.
3871 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3872 * gdbtypes.h: Include "enum-flags.h".
3873 (type_instance_flags): New enum-flags type.
3874 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3875 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3876 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3877 (follow_type_instance_flags): New function.
3878 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3879 * parser-defs.h (follow_type_instance_flags): Declare.
3880 * valops.c (value_struct_elt_for_reference): const/volatile must
3881 match too.
3882
3883 2017-09-04 Pedro Alves <palves@redhat.com>
3884
3885 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3886 function/method scopes; lookup the nested name as a function local
3887 static variable.
3888
3889 2017-09-04 Pedro Alves <palves@redhat.com>
3890
3891 (%type <voidval>): Add function_method.
3892 * c-exp.y (exp): New production for calls with no arguments.
3893 (function_method, function_method_void_or_typelist): New
3894 productions.
3895 (exp): New production for "method()::static_var".
3896 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3897 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3898 Handle OP_FUNC_STATIC_VAR.
3899 * parse.c (operator_length_standard):
3900 Handle OP_FUNC_STATIC_VAR.
3901
3902 2017-09-04 Pedro Alves <palves@redhat.com>
3903
3904 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3905 handling.
3906 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3907 Ditto.
3908 * parse.c (operator_length_standard, operator_check_standard):
3909 Ditto.
3910 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3911
3912 2017-09-04 Pedro Alves <palves@redhat.com>
3913
3914 * ax-gdb.c: Include "typeprint.h".
3915 (gen_expr_for_cast): New function.
3916 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3917 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3918 type is unknown.
3919 * dwarf2read.c (new_symbol_full): Fallback to int instead of
3920 nodebug_data_symbol.
3921 * eval.c: Include "typeprint.h".
3922 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3923 Error out if symbol has unknown type.
3924 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3925 evaluate_subexp_for_cast.
3926 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3927 OP_VAR_MSYM_VALUE.
3928 (evaluate_subexp_for_cast): New function.
3929 * gdbtypes.c (init_nodebug_var_type): New function.
3930 (objfile_type): Use it to initialize types of variables with no
3931 debug info.
3932 * typeprint.c (error_unknown_type): New.
3933 * typeprint.h (error_unknown_type): New declaration.
3934 * compile/compile-c-types.c (convert_type_basic): Handle
3935 TYPE_CODE_ERROR; warn and fallback to int for variables with
3936 unknown type.
3937
3938 2017-09-04 Pedro Alves <palves@redhat.com>
3939
3940 * eval.c (evaluate_var_value): New function, factored out from ...
3941 (evaluate_subexp_standard): ... here.
3942
3943 2017-09-04 Pedro Alves <palves@redhat.com>
3944
3945 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3946 Remove useless assignments to 'op'.
3947
3948 2017-09-04 Pedro Alves <palves@redhat.com>
3949
3950 * eval.c (eval_skip_value): New function.
3951 (evaluate_subexp_standard): Use it.
3952
3953 2017-09-04 Pedro Alves <palves@redhat.com>
3954
3955 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3956 function name from symbol/minsym and pass it to
3957 error_call_unknown_return_type.
3958
3959 2017-09-04 Pedro Alves <palves@redhat.com>
3960
3961 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3962 * ax-gdb.c (gen_msym_var_ref): New function.
3963 (gen_expr): Handle OP_VAR_MSYM_VALUE.
3964 * eval.c (evaluate_var_msym_value): New function.
3965 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3966 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3967 to call_function_by_hand.
3968 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3969 Handle OP_VAR_MSYM_VALUE.
3970 (union exp_element) <msymbol>: New field.
3971 * minsyms.h (struct type): Forward declare.
3972 (find_minsym_type_and_address): Declare.
3973 * parse.c (write_exp_elt_msym): New function.
3974 (write_exp_msymbol): Delete, refactored as ...
3975 (find_minsym_type_and_address): ... this new function.
3976 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3977 (operator_length_standard, operator_check_standard): Handle
3978 OP_VAR_MSYM_VALUE.
3979 * std-operator.def (OP_VAR_MSYM_VALUE): New.
3980
3981 2017-09-04 Pedro Alves <palves@redhat.com>
3982
3983 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3984 TYPE_GNU_IFUNC specially here. Throw error if return type is
3985 unknown.
3986 * ada-typeprint.c (print_func_type): Handle functions with unknown
3987 return type.
3988 * c-typeprint.c (c_type_print_base): Handle functions and methods
3989 with unknown return type.
3990 * compile/compile-c-symbols.c (convert_symbol_bmsym)
3991 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3992 * compile/compile-c-types.c: Include "objfiles.h".
3993 (convert_func): For functions with unknown return type, warn and
3994 default to int.
3995 * compile/compile-object-run.c (compile_object_run): Adjust call
3996 to call_function_by_hand_dummy.
3997 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3998 call_function_by_hand.
3999 * eval.c (evaluate_subexp_standard): Adjust calls to
4000 call_function_by_hand. Handle functions and methods with unknown
4001 return type. Pass expect_type to call_function_by_hand.
4002 * f-typeprint.c (f_type_print_base): Handle functions with unknown
4003 return type.
4004 * gcore.c (call_target_sbrk): Adjust call to
4005 call_function_by_hand.
4006 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4007 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
4008 an integer address type instead of nodebug.
4009 * guile/scm-value.c (gdbscm_value_call): Adjust call to
4010 call_function_by_hand.
4011 * infcall.c (error_call_unknown_return_type): New function.
4012 (call_function_by_hand): New "default_return_type" parameter.
4013 Pass it down.
4014 (call_function_by_hand_dummy): New "default_return_type"
4015 parameter. Use it instead of defaulting to int. If there's no
4016 default and the return type is unknown, throw an error. If
4017 there's a default return type, and the called function has no
4018 debug info, then assume the function is prototyped.
4019 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4020 New "default_return_type" parameter.
4021 (error_call_unknown_return_type): New declaration.
4022 * linux-fork.c (call_lseek): Cast return type of lseek.
4023 (inferior_call_waitpid, checkpoint_command): Adjust calls to
4024 call_function_by_hand.
4025 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4026 calls to call_function_by_hand.
4027 * m2-typeprint.c (m2_procedure): Handle functions with unknown
4028 return type.
4029 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4030 (value_nsstring, print_object_command): Adjust calls to
4031 call_function_by_hand.
4032 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4033 functions with unknown return type.
4034 (pascal_type_print_func_varspec_suffix): New function.
4035 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4036 TYPE_CODE_METHOD>: Use it.
4037 * python/py-value.c (valpy_call): Adjust call to
4038 call_function_by_hand.
4039 * rust-lang.c (rust_evaluate_funcall): Adjust call to
4040 call_function_by_hand.
4041 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4042 call_function_by_hand.
4043 * valops.c (value_allocate_space_in_inferior): Adjust call to
4044 call_function_by_hand.
4045 * typeprint.c (type_print_unknown_return_type): New function.
4046 * typeprint.h (type_print_unknown_return_type): New declaration.
4047
4048 2017-09-04 Pedro Alves <palves@redhat.com>
4049
4050 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4051 types with more than one parameter as prototyped.
4052
4053 2017-09-04 Pedro Alves <palves@redhat.com>
4054
4055 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4056 (disassemble_command): Use gdb_disassembly_flags instead of bare
4057 int.
4058 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4059 (dump_insns, do_mixed_source_and_assembly_deprecated)
4060 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4061 Use gdb_disassembly_flags instead of bare int.
4062 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4063 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4064 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4065 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
4066 (enum gdb_disassembly_flag): ... values of this new enumeration.
4067 (gdb_disassembly_flags): Define.
4068 (gdb_disassembly)
4069 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4070 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4071 gdb_disassembly_flags instead of bare int.
4072 * record-btrace.c (btrace_insn_history)
4073 (record_btrace_insn_history, record_btrace_insn_history_range)
4074 (record_btrace_insn_history_from): Use gdb_disassembly_flags
4075 instead of bare int.
4076 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4077 Use gdb_disassembly_flags instead of bare int.
4078 * target-debug.h (target_debug_print_gdb_disassembly_flags):
4079 Define.
4080 * target-delegates.c: Regenerate.
4081 * target.c (target_insn_history, target_insn_history_from)
4082 (target_insn_history_range): Use gdb_disassembly_flags instead of
4083 bare int.
4084 * target.h: Include "disasm.h".
4085 (struct target_ops) <to_insn_history, to_insn_history_from,
4086 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4087 int.
4088 (target_insn_history, target_insn_history_from)
4089 (target_insn_history_range): Use gdb_disassembly_flags instead of
4090 bare int.
4091
4092 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4093
4094 * cli/cli-script.c (build_command_line): For if/while commands,
4095 check whether args is empty.
4096
4097 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4098
4099 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4100 (enum command_control_type): Likewise.
4101 (struct command_line): Likewise.
4102 (free_command_lines): Likewise.
4103 (struct command_lines_deleter): Likewise.
4104 (command_line_up): Likewise.
4105 (read_command_lines): Likewise.
4106 (read_command_lines_1): Likewise.
4107 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4108 (enum command_control_type): Likewise.
4109 (struct command_line): Likewise.
4110 (free_command_lines): Likewise.
4111 (struct command_lines_deleter): Likewise.
4112 (command_line_up): Likewise.
4113 (read_command_lines): Likewise.
4114 (read_command_lines_1): Likewise.
4115 * breakpoint.h: Include cli/cli-script.h.
4116 * extension-priv.h: Likewise.
4117 * gdbcmd.h: Likewise.
4118
4119 2017-09-04 Pedro Alves <palves@redhat.com>
4120
4121 * ada-lang.c (is_known_support_routine): Move sal declaration to
4122 where it is initialized.
4123 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4124 (parse_breakpoint_sals, decode_static_tracepoint_spec)
4125 (clear_command, update_static_tracepoint): Remove init_sal
4126 references. Move declarations closer to initializations.
4127 * cli/cli-cmds.c (list_command): Move sal declarations closer to
4128 initializations.
4129 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
4130 references. Move sal declarations closer to initializations.
4131 * frame.c (find_frame_sal): Return a symtab_and_line via function
4132 return instead of output parameter. Remove init_sal references.
4133 * frame.h (find_frame_sal): Return a symtab_and_line via function
4134 return instead of output parameter.
4135 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
4136 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
4137 instead of memset.
4138 (gdbscm_find_pc_line): Remove init_sal reference.
4139 * infcall.c (call_function_by_hand_dummy): Remove init_sal
4140 references. Move declarations closer to initializations.
4141 * infcmd.c (set_step_frame): Update. Move declarations closer to
4142 initializations.
4143 (finish_backward): Remove init_sal references. Move declarations
4144 closer to initializations.
4145 * infrun.c (process_event_stop_test, handle_step_into_function)
4146 (insert_hp_step_resume_breakpoint_at_frame)
4147 (insert_step_resume_breakpoint_at_caller): Likewise.
4148 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
4149 (symbol_to_sal): Likewise.
4150 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
4151 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
4152 to its initialization.
4153 * reverse.c (save_bookmark_command): Use new/delete. Remove
4154 init_sal references. Move declarations closer to initializations.
4155 * source.c (get_current_source_symtab_and_line): Remove brace
4156 initialization.
4157 (set_current_source_symtab_and_line): Now takes the sal by const
4158 reference. Remove brace initialization.
4159 (line_info): Remove init_sal reference.
4160 * source.h (set_current_source_symtab_and_line): Now takes a
4161 symtab_and_line via const reference.
4162 * stack.c (set_current_sal_from_frame): Adjust.
4163 (print_frame_info): Adjust.
4164 (get_last_displayed_sal): Return the sal via function return
4165 instead of via output parameter. Simplify.
4166 (frame_info): Adjust.
4167 * stack.h (get_last_displayed_sal): Return the sal via function
4168 return instead of via output parameter.
4169 * symtab.c (init_sal): Delete.
4170 (find_pc_sect_line): Remove init_sal references. Move
4171 declarations closer to initializations.
4172 (find_function_start_sal): Remove init_sal references. Move
4173 declarations closer to initializations.
4174 * symtab.h (struct symtab_and_line): In-class initialize all
4175 fields.
4176 * tracepoint.c (set_traceframe_context)
4177 (print_one_static_tracepoint_marker): Remove init_sal references.
4178 Move declarations closer to initializations.
4179 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4180 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
4181 declarations closer to initializations.
4182 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4183 init_sal references. Adjust.
4184
4185 2017-09-04 Pedro Alves <palves@redhat.com>
4186
4187 * ax-gdb.c (agent_command_1): Use range-for.
4188 * break-catch-throw.c (re_set_exception_catchpoint): Update.
4189 * breakpoint.c: Include "common/array-view.h".
4190 (init_breakpoint_sal, create_breakpoint_sal): Change sals
4191 parameter from struct symtabs_and_lines to
4192 array_view<symtab_and_line>. Adjust. Use range-for. Update.
4193 (breakpoint_sals_to_pc): Change sals parameter from struct
4194 symtabs_and_lines to std::vector reference.
4195 (check_fast_tracepoint_sals): Change sals parameter from struct
4196 symtabs_and_lines to std::array_view. Use range-for.
4197 (decode_static_tracepoint_spec): Return a std::vector instead of
4198 symtabs_and_lines. Update.
4199 (create_breakpoint): Update.
4200 (break_range_command, until_break_command, clear_command): Update.
4201 (base_breakpoint_decode_location, bkpt_decode_location)
4202 (bkpt_probe_create_sals_from_location)
4203 (bkpt_probe_decode_location, tracepoint_decode_location)
4204 (tracepoint_probe_decode_location)
4205 (strace_marker_create_sals_from_location): Return a std::vector
4206 instead of symtabs_and_lines.
4207 (strace_marker_create_breakpoints_sal): Update.
4208 (strace_marker_decode_location): Return a std::vector instead of
4209 symtabs_and_lines. Update.
4210 (update_breakpoint_locations): Change struct symtabs_and_lines
4211 parameters to gdb::array_view. Adjust.
4212 (location_to_sals): Return a std::vector instead of
4213 symtabs_and_lines. Update.
4214 (breakpoint_re_set_default): Use std::vector instead of struct
4215 symtabs_and_lines.
4216 (decode_location_default): Return a std::vector instead of
4217 symtabs_and_lines. Update.
4218 * breakpoint.h: Include "common/array-view.h".
4219 (struct breakpoint_ops) <decode_location>: Now returns a
4220 std::vector instead of returning a symtabs_and_lines via output
4221 parameter.
4222 (update_breakpoint_locations): Change sals parameters to use
4223 gdb::array_view.
4224 * cli/cli-cmds.c (edit_command, list_command): Update to use
4225 std::vector and gdb::array_view.
4226 (ambiguous_line_spec): Adjust to use gdb::array_view and
4227 range-for.
4228 (compare_symtabs): Rename to ...
4229 (cmp_symtabs): ... this. Change parameters to symtab_and_line
4230 const reference and adjust.
4231 (filter_sals): Rewrite using std::vector and standard algorithms.
4232 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4233 (jump_command): Update to use std::vector.
4234 * linespec.c (struct linespec_state) <canonical_names>: Update
4235 comment.
4236 (add_sal_to_sals_basic): Delete.
4237 (add_sal_to_sals, filter_results, convert_results_to_lsals)
4238 (decode_line_2, create_sals_line_offset)
4239 (convert_address_location_to_sals, convert_linespec_to_sals)
4240 (convert_explicit_location_to_sals, parse_linespec)
4241 (event_location_to_sals, decode_line_full, decode_line_1)
4242 (decode_line_with_current_source)
4243 (decode_line_with_last_displayed, decode_objc)
4244 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
4245 (linespec_result::~linespec_result): Adjust to use std::vector
4246 instead of symtabs_and_lines.
4247 * linespec.h (linespec_sals::sals): Now a std::vector.
4248 (struct linespec_result): Use std::vector, bool, and in-class
4249 initialization.
4250 (decode_line_1, decode_line_with_current_source)
4251 (decode_line_with_last_displayed): Return std::vector.
4252 * macrocmd.c (info_macros_command): Use std::vector.
4253 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
4254 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
4255 std::vector.
4256 * probe.h (parse_probes): Return a std::vector.
4257 * python/python.c (gdbpy_decode_line): Use std::vector and
4258 gdb::array_view.
4259 * source.c (select_source_symtab, line_info): Use std::vector.
4260 * stack.c (func_command): Use std::vector.
4261 * symtab.h (struct symtabs_and_lines): Delete.
4262 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
4263
4264 2017-09-04 Pedro Alves <palves@redhat.com>
4265
4266 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4267 unittests/array-view-selftests.c.
4268 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
4269 * common/array-view.h: New file.
4270 * unittests/array-view-selftests.c: New file.
4271
4272 2017-09-04 Pedro Alves <palves@redhat.com>
4273
4274 * cli/cli-cmds.c (edit_command): Pass message to
4275 ambiguous_line_spec.
4276 (list_command): Pass message to ambiguous_line_spec. Say
4277 "first"/"last" instead of "start" and "end" to be consistent with
4278 the manual.
4279 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
4280 them to print formatted message.
4281
4282 2017-09-04 Pedro Alves <palves@redhat.com>
4283
4284 * btrace.c (ftrace_add_pt): Pass btrace_insn to
4285 ftrace_update_insns by reference instead of pointer.
4286
4287 2017-09-04 Yao Qi <yao.qi@linaro.org>
4288
4289 * i386-go32-tdep.c: Include x86-xstate.h.
4290 (i386_go32_init_abi): Call i386_target_description.
4291 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
4292 if xcr0 is X86_XSTATE_X87_MASK.
4293 * i386-tdep.h (tdesc_i386): Remove the declaration.
4294 (tdesc_i386_mmx): Likewise.
4295
4296 2017-09-04 Yao Qi <yao.qi@linaro.org>
4297
4298 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
4299 X86_XSTATE_SSE_MASK instead of 0.
4300
4301 2017-09-04 Yao Qi <yao.qi@linaro.org>
4302
4303 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
4304 i386_target_description.
4305 * i386-fbsd-nat.c (i386fbsd_read_description): Call
4306 i386_target_description.
4307 * i386-tdep.c (i386_gdbarch_init): Likewise.
4308
4309 2017-09-04 Yao Qi <yao.qi@linaro.org>
4310
4311 * amd64-darwin-tdep.c: Include "x86-xstate.h".
4312 (x86_darwin_init_abi_64): Call amd64_target_description.
4313 * amd64-dicos-tdep.c: Likewise.
4314 * amd64-fbsd-nat.c: Likewise.
4315 * amd64-fbsd-tdep.c: Likewise.
4316 * amd64-nbsd-tdep.c: Likewise.
4317 * amd64-obsd-tdep.c: Likewise.
4318 * amd64-sol2-tdep.c: Likewise.
4319 * amd64-windows-tdep.c: Likewise.
4320 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
4321
4322 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4323
4324 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
4325 (btrace_function) <insn>: Change type to use std::vector.
4326 * btrace.c (ftrace_debug, ftrace_call_num_insn,
4327 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
4328 ftrace_update_insns, ftrace_compute_global_level_offset,
4329 btrace_stitch_bts, btrace_clear, btrace_insn_get,
4330 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
4331 change to std::vector.
4332 (ftrace_update_insns): Adjust to change to std::vector, change
4333 type of INSN parameter.
4334 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
4335 * record-btrace.c (btrace_call_history_insn_range,
4336 btrace_compute_src_line_range,
4337 record_btrace_frame_prev_register): Adjust to change to
4338 std::vector.
4339 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
4340 to change to std::vector.
4341
4342 2017-09-03 Tom Tromey <tom@tromey.com>
4343
4344 * corefile.c (reopen_exec_file): Use std::string.
4345
4346 2017-09-03 Tom Tromey <tom@tromey.com>
4347
4348 * compile/compile.c (compile_register_name_mangled): Return
4349 std::string.
4350 * compile/compile-loc2c.c (pushf_register_address): Update.
4351 (pushf_register): Update.
4352 * compile/compile-c-types.c (convert_array): Update.
4353 * compile/compile-c-symbols.c (generate_vla_size): Update.
4354 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
4355 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
4356 (convert_one_symbol): Update.
4357 (generate_c_for_for_one_variable): Update.
4358 * compile/compile-c-support.c (c_get_range_decl_name): Return a
4359 std::string.
4360 (generate_register_struct): Update.
4361 * compile/compile-internal.h (c_get_range_decl_name): Return a
4362 std::string.
4363 (compile_register_name_mangled): Return std::string.
4364
4365 2017-09-03 Tom Tromey <tom@tromey.com>
4366
4367 * utils.c (perror_string): Return a std::string.
4368 (throw_perror_with_name, perror_warning_with_name): Update.
4369
4370 2017-09-03 Tom Tromey <tom@tromey.com>
4371
4372 * demangle.c (demangle_command): Use std::string,
4373 unique_xmalloc_ptr.
4374
4375 2017-09-03 Tom Tromey <tom@tromey.com>
4376
4377 * cli/cli-setshow.c (do_set_command): Use std::string.
4378
4379 2017-09-03 Tom Tromey <tom@tromey.com>
4380
4381 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
4382
4383 2017-09-03 Tom Tromey <tom@tromey.com>
4384
4385 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
4386
4387 2017-09-03 Tom Tromey <tom@tromey.com>
4388
4389 * mi/mi-cmd-env.c (env_execute_cli_command): Use
4390 gdb::unique_xmalloc_ptr.
4391
4392 2017-09-03 Tom Tromey <tom@tromey.com>
4393
4394 * thread.c (print_thread_info_1): Use string_printf.
4395 (thread_apply_command, thread_apply_all_command): Use
4396 std::string.
4397
4398 2017-09-03 Tom Tromey <tom@tromey.com>
4399
4400 * valprint.c (val_print_string): Update.
4401 * gdbcore.h (memory_error_message): Return std::string.
4402 * corefile.c (memory_error_message): Return std::string.
4403 (memory_error): Update.
4404 * breakpoint.c (insert_bp_location): Update.
4405
4406 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4407
4408 * target/waitstatus.h (target_waitstatus_to_string): Change
4409 return type to std::string.
4410 * target/waitstatus.c (target_waitstatus_to_string): Return
4411 std::string.
4412 * target.h (target_waitstatus_to_string): Remove declaration.
4413 * infrun.c (resume, clear_proceed_status_thread,
4414 print_target_wait_results, do_target_wait, save_waitstatus,
4415 stop_all_threads): Adjust.
4416 * record-btrace.c (record_btrace_wait): Adjust.
4417 * target-debug.h
4418 (target_debug_print_struct_target_waitstatus_p): Adjust.
4419
4420 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4421
4422 PR gdb/22046
4423 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
4424 detection.
4425
4426 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4427
4428 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
4429 for setting/unsetting environment variables on the remote target.
4430 (New remote packets): Add entries for QEnvironmentHexEncoded,
4431 QEnvironmentUnset and QEnvironmentReset.
4432 * common/environ.c (gdb_environ::operator=): Extend method to
4433 handle m_user_set_env_list and m_user_unset_env_list.
4434 (gdb_environ::clear): Likewise.
4435 (match_var_in_string): Change type of first parameter from 'char
4436 *' to 'const char *'.
4437 (gdb_environ::set): Extend method to handle
4438 m_user_set_env_list and m_user_unset_env_list.
4439 (gdb_environ::unset): Likewise.
4440 (gdb_environ::clear_user_set_env): New method.
4441 (gdb_environ::user_set_envp): Likewise.
4442 (gdb_environ::user_unset_envp): Likewise.
4443 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
4444 m_user_unset_env_list on move constructor/assignment.
4445 (unset): Add new default parameter 'update_unset_list = true'.
4446 (clear_user_set_env): New method.
4447 (user_set_envp): Likewise.
4448 (user_unset_envp): Likewise.
4449 (m_user_set_env_list): New std::set.
4450 (m_user_unset_env_list): Likewise.
4451 * common/rsp-low.c (hex2str): New function.
4452 (bin2hex): New overload for bin2hex function.
4453 * common/rsp-low.c (hex2str): New prototype.
4454 (str2hex): New overload prototype.
4455 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
4456 QEnvironmentUnset and QEnvironmentReset.
4457 (remote_protocol_features): Add QEnvironmentHexEncoded,
4458 QEnvironmentUnset and QEnvironmentReset packets.
4459 (send_environment_packet): New function.
4460 (extended_remote_environment_support): Likewise.
4461 (extended_remote_create_inferior): Call
4462 extended_remote_environment_support.
4463 (_initialize_remote): Add QEnvironmentHexEncoded,
4464 QEnvironmentUnset and QEnvironmentReset packet configs.
4465 * unittests/environ-selftests.c (gdb_selftest_env_var):
4466 New variable.
4467 (test_vector_initialization): New function.
4468 (test_init_from_host_environ): Likewise.
4469 (test_reinit_from_host_environ): Likewise.
4470 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
4471 Likewise.
4472 (test_unset_set_empty_vector): Likewise.
4473 (test_vector_clear): Likewise.
4474 (test_std_move): Likewise.
4475 (test_move_constructor):
4476 (test_self_move): Likewise.
4477 (test_set_unset_reset): Likewise.
4478 (run_tests): Rewrite in terms of the functions above.
4479
4480 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
4481
4482 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
4483 (adi_available): Use a temp variable of type CORE_ADDR as argument
4484 3 when calling target_auxv_search.
4485 (adi_normalize_address): Use masks and xor operators to calculate
4486 normalized address.
4487 (adi_read_versions, adi_write_versions, adi_print_versions)
4488 (do_examine, do_assign): Use paddress.
4489
4490 2017-08-29 John Baldwin <jhb@FreeBSD.org>
4491
4492 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
4493 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
4494 out of loop and add supply of FIR.
4495 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
4496 add collect of FIR.
4497
4498 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
4499
4500 PR gdb/21827
4501 * cli/cli-script.c (define_command): Don't convert command name
4502 to lower case.
4503
4504 2017-08-25 Joel Brobecker <brobecker@adacore.com>
4505
4506 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
4507 Update all callers accordingly. Remove all code blocks handling
4508 the case where DISPP is not NULL.
4509
4510 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4511
4512 PR symtab/22003
4513 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
4514 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4515 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
4516
4517 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4518
4519 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
4520 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
4521 (read_comp_units_from_section): New parameter abbrev_section, use
4522 read_and_check_comp_unit_head, allocate signatured_type if needed.
4523 (create_all_comp_units): Update read_comp_units_from_section caller.
4524
4525 2017-08-23 Pedro Alves <palves@redhat.com>
4526
4527 PR remote/21852
4528 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
4529 to null_ptid and switch to thread without reading the registers
4530 after adding the inferior.
4531
4532 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
4533
4534 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
4535 compile-gcc.
4536 * compile/compile.c (compile_gcc, show_compile_gcc): New.
4537 (compile_to_object): Implement compile_gcc.
4538 (_initialize_compile): Install "set compile-gcc". Initialize
4539 compile_gcc.
4540
4541 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
4542
4543 * compile/compile.c (compile_to_object): Conditionally call
4544 set_verbose. Conditionally call compile or compile_v0.
4545
4546 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
4547
4548 * sparc64-tdep.h: (adi_normalize_address): New export.
4549 * sparc-nat.h: (open_adi_tag_fd): New export.
4550 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
4551 * sparc64-linux-tdep.c:
4552 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
4553 (sparc64_linux_handle_segmentation_fault): New function.
4554 (sparc64_linux_init_abi): Register
4555 sparc64_linux_handle_segmentation_fault
4556 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
4557 (sparc64_addr_bits_remove): New function.
4558 (sparc64_init_abi): Register sparc64_addr_bits_remove.
4559 (MAX_PROC_NAME_SIZE): New macro.
4560 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
4561 (sparc64adilist): New variable.
4562 (adi_proc_list): New variable.
4563 (find_adi_info): New function.
4564 (add_adi_info): New function.
4565 (get_adi_info_proc): New function.
4566 (get_adi_info): New function.
4567 (info_adi_command): New function.
4568 (read_maps_entry): New function.
4569 (adi_available): New function.
4570 (adi_normalize_address): New function.
4571 (adi_align_address): New function.
4572 (adi_convert_byte_count): New function.
4573 (adi_tag_fd): New function.
4574 (adi_is_addr_mapped): New function.
4575 (adi_read_versions): New function.
4576 (adi_write_versions): New function.
4577 (adi_print_versions): New function.
4578 (do_examine): New function.
4579 (do_assign): New function.
4580 (adi_examine_command): New function.
4581 (adi_assign_command): New function.
4582 (_initialize_sparc64_adi_tdep): New function.
4583
4584 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
4585
4586 * breakpoint.c (breakpoints_info): Rename to ...
4587 (info_breakpoints_command): ... this.
4588 (watchpoints_info): Rename to ...
4589 (info_watchpoints_command): ... this.
4590 (tracepoints_info): Rename to ...
4591 (info_tracepoints_command): ... this.
4592 (_initialize_breakpoint): Adjust.
4593 * dcache.c (dcache_info): Rename to ...
4594 (info_display_command): ... this.
4595 (_initialize_dcache): Adjust.
4596 * frame.h (args_info): Rename to ...
4597 (info_args_command): ... this.
4598 (locals_info): Rename to ...
4599 (info_locals_command): ... this.
4600 * infcmd.c (nofp_registers_info): Rename to ...
4601 (info_registers_command): ... this.
4602 (float_info): Rename to ...
4603 (info_float_command): ... this.
4604 (program_info): Rename to ...
4605 (info_program_command): ... this.
4606 (all_registers_info): Rename to ...
4607 (info_all_registers_command): ... this.
4608 (vector_info): Rename to ...
4609 (info_vector_command): ... this.
4610 (float_info): Rename to ...
4611 (info_float_command): ... this.
4612 (_initialize_infcmd): Adjust.
4613 * inferior.h (term_info): Rename to ...
4614 (info_terminal_command): ... this.
4615 * inflow.c (term_info): Rename to ...
4616 (info_terminal_command): ... this.
4617 (_initialize_inflow): Adjust.
4618 * infrun.c (signals_info): Rename to ...
4619 (info_signals_command): ... this.
4620 (_initialize_infrun): Adjust.
4621 * objc-lang.c (classes_info): Rename to ...
4622 (info_classes_command): ... this.
4623 (selectors_info): Rename to ...
4624 (info_selectors_command): ... this.
4625 (_initialize_objc_language): Adjust.
4626 * printcmd.c (sym_info): Rename to ...
4627 (info_symbol_command): ... this.
4628 (address_info): Rename to ...
4629 (info_address_command): ... this.
4630 (display_info): Rename to ...
4631 (info_display_command): ... this.
4632 (_initialize_printcmd): Adjust.
4633 * reverse.c (bookmarks_info): Rename to ...
4634 (info_breakpoints_command): ... this.
4635 (_initialize_reverse): Adjust.
4636 * ser-go32.c (dos_info): Rename to ...
4637 (info_serial_command): ... this.
4638 (_initialize_ser_dos): Adjust.
4639 * skip.c (skip_info): Rename to ...
4640 (info_skip_command): ... this.
4641 (_initialize_step_skip): Adjust.
4642 * source.c (line_info): Rename to ...
4643 (info_line_command): ... this.
4644 (source_info): Rename to ...
4645 (info_source_command)
4646 * stack.c (frame_info): Rename to ...
4647 (info_frame_command): ... this.
4648 (locals_info): Rename to ...
4649 (info_locals_command): ... this.
4650 (args_info): Rename to ...
4651 (info_args_command): ... this.
4652 (_initialize_stack): Adjust.
4653 * symtab.c (sources_info): Rename to ...
4654 (info_sources_command): ... this.
4655 (variables_info): Rename to ...
4656 (info_variables_command): ... this.
4657 (functions_info): Rename to ...
4658 (info_functions_command): ... this.
4659 (types_info): Rename to ...
4660 (info_types_command): ... this.
4661 (_initialize_symtab): Adjust.
4662 * target.c (target_info): Rename to ...
4663 (info_target_command): ... this.
4664 (initialize_targets): Adjust.
4665 * tracepoint.c (tvariables_info): Rename to ...
4666 (info_tvariables_command): ... this.
4667 (scope_info): Rename to ...
4668 (info_scope_command): ... this.
4669 (trace_dump_actions): Adjust.
4670 (_initialize_tracepoint): Adjust.
4671
4672 2017-08-22 Tom Tromey <tom@tromey.com>
4673
4674 * breakpoint.h (install_breakpoint): Update.
4675 * breakpoint.c (add_solib_catchpoint): Update.
4676 (install_breakpoint): Change argument to a std::unique_ptr.
4677 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
4678 (create_breakpoint_sal, create_breakpoint): Update.
4679 (watch_command_1, catch_exec_command_1)
4680 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
4681 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
4682 Return the breakpoint.
4683 (set_raw_breakpoint_without_location, set_raw_breakpoint)
4684 (new_single_step_breakpoint): Update.
4685 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
4686 std::unique_ptr.
4687 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4688 std::unique_ptr.
4689 * break-catch-sig.c (create_signal_catchpoint): Use
4690 std::unique_ptr.
4691 * ada-lang.c (create_ada_exception_catchpoint): Use
4692 std::unique_ptr.
4693
4694 2017-08-22 Tom Tromey <tom@tromey.com>
4695
4696 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
4697
4698 2017-08-22 Tom Tromey <tom@tromey.com>
4699
4700 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
4701 (lookup_partial_symbol): Update.
4702
4703 2017-08-22 Tom Tromey <tom@tromey.com>
4704
4705 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
4706 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
4707 (find_and_open_source, symtab_to_fullname): Update.
4708 * psymtab.c (psymtab_to_fullname): Update.
4709
4710 2017-08-22 Tom Tromey <tom@tromey.com>
4711
4712 * exec.c (exec_file_attach): Update.
4713 * linux-thread-db.c (try_thread_db_load): Update.
4714 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
4715 * utils.c (gdb_realpath): Change return type.
4716 (gdb_realpath_keepfile): Update.
4717 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
4718 (_initialize_utils): Register the new self test.
4719 * source.c (openp): Update.
4720 (find_and_open_source): Update.
4721 * nto-tdep.c (nto_find_and_open_solib): Update.
4722 * main.c (set_gdb_data_directory): Update.
4723 (captured_main_1): Update.
4724 * dwarf2read.c (dwarf2_get_dwz_file): Update
4725 (dw2_map_symbol_filenames): Update.
4726 * auto-load.c (auto_load_safe_path_vec_update): Update.
4727 (filename_is_in_auto_load_safe_path_vec): Change type of
4728 "filename_realp".
4729 (auto_load_objfile_script): Update.
4730 (file_is_auto_load_safe): Update. Use std::string.
4731 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
4732
4733 2017-08-22 Tom Tromey <tom@tromey.com>
4734
4735 * utils.c (gdb_realpath_keepfile): Return a
4736 gdb::unique_xmalloc_ptr.
4737 * exec.c (exec_file_attach): Update.
4738 * utils.h (gdb_realpath_keepfile): Return a
4739 gdb::unique_xmalloc_ptr.
4740
4741 2017-08-22 Tom Tromey <tom@tromey.com>
4742
4743 * compile/compile.c (compile_file_command): Use
4744 gdb::unique_xmalloc_ptr, std::string.
4745 * utils.c (gdb_abspath): Change return type.
4746 * source.c (openp): Update.
4747 * objfiles.c (allocate_objfile): Update.
4748 * main.c (set_gdb_data_directory): Update.
4749 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
4750
4751 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
4752
4753 * cli-cmds.c (list_commands): List actual code around more than
4754 one location.
4755
4756 2017-08-21 John Baldwin <jhb@FreeBSD.org>
4757
4758 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
4759
4760 2017-08-21 Pedro Alves <palves@redhat.com>
4761
4762 PR gdb/19487
4763 * c-exp.y (variable production): Handle function aliases.
4764 * minsyms.c (msymbol_is_text): New function.
4765 * minsyms.h (msymbol_is_text): Declare.
4766 * symtab.c (find_function_alias_target): New function.
4767 * symtab.h (find_function_alias_target): Declare.
4768
4769 2017-08-21 Pedro Alves <palves@redhat.com>
4770
4771 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
4772 typedefs.
4773 * typeprint.c (whatis_exp): If handling "whatis", and expression
4774 is OP_TYPE, strip one typedef level. Otherwise don't strip
4775 typedefs here.
4776 * valops.c (value_cast): Save "to" type before resolving
4777 stubs/typedefs. Use that type as resulting value's type.
4778
4779 2017-08-18 Tom Tromey <tom@tromey.com>
4780 Pedro Alves <palves@redhat.com>
4781
4782 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
4783 * sol-thread.c (sol_thread_resume, sol_thread_wait)
4784 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4785 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4786 * proc-service.c (ps_xfer_memory): Use scoped_restore.
4787 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4788 (linux_get_siginfo_data): Add "thread" argument. Use
4789 scoped_restore.
4790 * linux-nat.c (linux_child_follow_fork)
4791 (check_stopped_by_watchpoint): Use scoped_restore.
4792 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4793 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4794 (restore_inferior_ptid, save_inferior_ptid): Remove.
4795 * btrace.c (btrace_fetch): Use scoped_restore.
4796 * bsd-uthread.c (bsd_uthread_fetch_registers)
4797 (bsd_uthread_store_registers): Use scoped_restore.
4798 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4799 scoped_restore.
4800 * aix-thread.c (aix_thread_resume, aix_thread_wait)
4801 (aix_thread_xfer_partial): Use scoped_restore.
4802 * inferior.h (save_inferior_ptid): Remove.
4803
4804 2017-08-18 Yao Qi <yao.qi@linaro.org>
4805
4806 PR tdep/21818
4807 * arm-tdep.c (gdb_print_insn_arm): Mark
4808 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4809
4810 2017-08-18 Yao Qi <yao.qi@linaro.org>
4811
4812 * NEWS: Mention GDBserver's new option "--selftest".
4813 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4814 * selftest.c: Move it to common/selftest.c.
4815 * selftest.h: Move it to common/selftest.h.
4816 * selftest-arch.c (reset): New function.
4817 (tests_with_arch): Call reset.
4818
4819 2017-08-18 Yao Qi <yao.qi@linaro.org>
4820
4821 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
4822 instead of exception_fprintf and printf_filtered.
4823
4824 2017-08-18 Yao Qi <yao.qi@linaro.org>
4825
4826 * selftest.c (register_self_test): Rename it to
4827 selftests::register_test.
4828 (run_self_tests): selftest::run_tests.
4829 * selftest.h: Update declarations.
4830 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4831 selftests::register_test_foreach_arch.
4832 * selftest-arch.h: Update declaration.
4833 * aarch64-tdep.c: Update.
4834 * arm-tdep.c: Likewise.
4835 * disasm-selftests.c: Likewise.
4836 * dwarf2loc.c: Likewise.
4837 * dwarf2-frame.c: Likewise.
4838 * findvar.c: Likewise.
4839 * gdbarch-selftests.c: Likewise.
4840 * maint.c (maintenance_selftest): Likewise.
4841 * regcache.c: Likewise.
4842 * rust-exp.y: Likewise.
4843 * selftest-arch.c: Likewise.
4844 * unittests/environ-selftests.c: Likewise.
4845 * unittests/function-view-selftests.c: Likewise.
4846 * unittests/offset-type-selftests.c: Likewise.
4847 * unittests/optional-selftests.c: Likewise.
4848 * unittests/scoped_restore-selftests.c: Likewise.
4849 * utils-selftests.c: Likewise.
4850
4851 2017-08-17 Pedro Alves <palves@redhat.com>
4852
4853 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4854 local.
4855
4856 2017-08-17 Pedro Alves <palves@redhat.com>
4857
4858 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4859 field.
4860 (reset_die_in_process): Delete, replaced by ...
4861 (process_die_scope): ... this new class. Make it responsible for
4862 freeing cu->line_header too.
4863 (process_die): Use process_die_scope.
4864 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4865 cu->line_header_die_owner. Don't release the line header if it's
4866 owned by the CU.
4867 (setup_type_unit_groups): Make the CU/DIE own the line header.
4868 Don't release the line header here.
4869
4870 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
4871
4872 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4873
4874 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
4875
4876 * NEWS: Mention new shortcuts for nexti and stepi in TUI
4877 Single-Key mode
4878
4879 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
4880
4881 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4882 mode command list.
4883
4884 2017-08-15 Stafford Horne <shorne@gmail.com>
4885
4886 * MAINTAINERS (Write After Approval): Add Stafford Horne.
4887
4888 2017-08-15 Stafford Horne <shorne@gmail.com>
4889
4890 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4891
4892 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
4893
4894 PR gdb/21954
4895 * infcmd.c (unset_environment_command): Use the 'clear' method on
4896 the environment instead of resetting it.
4897
4898 2017-08-15 John Baldwin <jhb@FreeBSD.org>
4899
4900 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4901 platforms.
4902
4903 2017-08-14 Tom Tromey <tom@tromey.com>
4904
4905 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4906 (print_binary_chars): Likewise.
4907 (BITS_IN_BYTES): Remove.
4908
4909 2017-08-14 Tom Tromey <tom@tromey.com>
4910
4911 PR gdb/21675
4912 * valprint.c (LOW_ZERO): Change value to 034.
4913 (print_octal_chars): Add static_asserts for octal constants.
4914 * printcmd.c (print_scalar_formatted): Add 'd' case.
4915
4916 2017-08-11 Tom Tromey <tom@tromey.com>
4917
4918 * symfile.c (add_symbol_file_command): Use std::vector.
4919
4920 2017-08-14 Tom Tromey <tom@tromey.com>
4921
4922 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4923 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4924 std::move.
4925 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4926
4927 2017-08-11 Pedro Alves <palves@redhat.com>
4928
4929 * infrun.c (process_event_stop_test): Adjust
4930 function_name_is_marked_for_skip call.
4931 * skip.c: Include <list>.
4932 (skiplist_entry): Make it a class with private fields, and
4933 getters/setters.
4934 (skiplist_entry_chain): Delete.
4935 (skiplist_entries): New.
4936 (skiplist_entry_count): Delete.
4937 (highest_skiplist_entry_num): New.
4938 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4939 (add_skiplist_entry): Delete.
4940 (skiplist_entry::skiplist_entry): New.
4941 (skiplist_entry::add_entry): New.
4942 (skip_file_command, skip_function): Adjust.
4943 (compile_skip_regexp): Delete.
4944 (skip_command): Don't compile regexp here. Adjust to use
4945 skiplist_entry::add_entry.
4946 (skip_info): Adjust to use range-for and getters.
4947 (skip_enable_command, skip_disable_command): Adjust to use
4948 range-for and setters.
4949 (skip_delete_command): Adjust to use std::list.
4950 (add_skiplist_entry): Delete.
4951 (skip_file_p): Delete, refactored as ...
4952 (skiplist_entry::do_skip_file_p): ... this new method.
4953 (skip_gfile_p): Delete, refactored as ...
4954 (skiplist_entry::do_gskip_file_p): ... this new method.
4955 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4956 (skiplist_entry::skip_function_p): ... this new method.
4957 (function_name_is_marked_for_skip): Now returns bool, and takes
4958 the function sal by const reference. Adjust to use range-for and
4959 skiplist_entry methods.
4960 (_initialize_step_skip): Remove references to
4961 skiplist_entry_chain, skiplist_entry_count.
4962 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4963 takes the function sal by const reference.
4964
4965 2017-08-11 Yao Qi <yao.qi@linaro.org>
4966
4967 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4968 (dwarf2_frame_cache): Remove reset_cache_cleanup.
4969 (dwarf2_frame_cache):
4970 * frame-unwind.c (frame_unwind_try_unwinder): Catch
4971 RETURN_MASK_ALL and set *this_case to NULL.
4972 * frame-unwind.h: Update comments.
4973
4974 2017-08-11 Yao Qi <yao.qi@linaro.org>
4975
4976 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4977 (dwarf2_frame_state_copy_regs): Remove.
4978 (dwarf2_frame_state_free_regs): Remove.
4979 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4980 (dwarf2_restore_rule): Call method .alloc_regs instead of
4981 dwarf2_frame_state_alloc_regs.
4982 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
4983 constructor. Call std::move.
4984 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4985 (dwarf2_frame_cache): Likewise.
4986
4987 [GDB_SELF_TEST]: Include selftest.h and
4988 selftest-arch.h.
4989 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4990 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4991 execute_cfa_program_test.
4992
4993 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4994 copy ctor, assignment operator, move assignment.
4995 <alloc_regs>: New method.
4996 <swap>: New method.
4997 (struct dwarf2_frame_state): Delete dtor.
4998 (dwarf2_frame_state_alloc_regs): Remove declaration.
4999 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5000 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5001
5002 2017-08-11 Yao Qi <yao.qi@linaro.org>
5003
5004 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5005 (dwarf2_frame_state::dwarf2_frame_state): New.
5006 (dwarf2_frame_state::~dwarf2_frame_state): New.
5007 (dwarf2_fetch_cfa_info): Update.
5008 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
5009 rather than a pointer. Update code.
5010 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5011 dtor.
5012 <data_align, code_align, retaddr_column>: Change them to const.
5013 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5014 to bool.
5015
5016 2017-08-11 Yao Qi <yao.qi@linaro.org>
5017
5018 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5019 <loc.exp>: New field.
5020 * dwarf2-frame.c (execute_cfa_program): Update.
5021 (dwarf2_frame_prev_register): Update.
5022
5023 2017-08-10 Pedro Alves <palves@redhat.com>
5024
5025 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5026
5027 2017-08-09 John Baldwin <jhb@FreeBSD.org>
5028
5029 * fbsd-nat.c (struct fbsd_fork_info): Remove.
5030 (fbsd_pending_children): Use std::list.
5031 (fbsd_remember_child): Likewise.
5032 (fbsd_is_child_pending): Likewise.
5033 (fbsd_pending_vfork_done): Use std::forward_list.
5034 (fbsd_add_vfork_done): Likewise.
5035 (fbsd_is_vfork_done_pending): Likewise.
5036 (fbsd_next_vfork_done): Likewise.
5037
5038 2017-08-09 John Baldwin <jhb@FreeBSD.org>
5039
5040 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5041 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5042 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5043 for `mapfilename'.
5044 (fbsd_xfer_partial): Use gdb::byte_vector.
5045 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
5046
5047 2017-08-09 John Baldwin <jhb@FreeBSD.org>
5048
5049 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5050 "filestuff.h".
5051 (fbsd_find_memory_regions): Fix `mapfile' initialization.
5052
5053 2017-08-09 Tom Tromey <tom@tromey.com>
5054
5055 * skip.c (skiplist_entry): New constructor.
5056 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5057 (skiplist_entry::file_is_glob): Now bool.
5058 (skiplist_entry::file, skiplist_entry::function): Now
5059 std::string.
5060 (make_skip_entry): Return a unique_ptr. Use new.
5061 (free_skiplist_entry, free_skiplist_entry_cleanup)
5062 (make_free_skiplist_entry_cleanup): Remove.
5063 (skip_command, skip_disable_command, add_skiplist_entry)
5064 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5065 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5066 (function_name_is_marked_for_skip): Update.
5067 (skip_delete_command): Update. Use delete.
5068
5069 2017-08-09 Jiong Wang <jiong.wang@arm.com>
5070
5071 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5072 (aarch64_linux_core_read_description): New function.
5073 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5074
5075 2017-08-09 Pedro Alves <palves@redhat.com>
5076
5077 * cp-name-parser.y (cp_comp_to_string): Return a
5078 gdb::unique_xmalloc_ptr<char>.
5079 * cp-support.c (replace_typedefs_qualified_name)
5080 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5081 (cp_canonicalize_string_full): Use op= instead of explicit
5082 convertion.
5083 (cp_class_name_from_physname, method_name_from_physname)
5084 (cp_func_name, cp_remove_params): Adjust to use
5085 gdb::unique_xmalloc_ptr<char>.
5086 * cp-support.h (cp_comp_to_string): Return a
5087 gdb::unique_xmalloc_ptr<char>.
5088 * python/py-type.c (typy_lookup_type): Adjust to use
5089 gdb::unique_xmalloc_ptr<char>.
5090
5091 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
5092
5093 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5094
5095 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
5096 Yao Qi <yao.qi@linaro.org>
5097
5098 * cp-support.c (cp_canonicalize_string_full): Use
5099 gdb::unique_xmalloc_ptr<char>.
5100 (cp_canonicalize_string): Likewise.
5101
5102 2017-08-09 Yao Qi <yao.qi@linaro.org>
5103
5104 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5105 * regformats/i386/amd64-avx-avx512.dat: Remove.
5106 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5107 * regformats/i386/amd64-avx-mpx.dat:Remove.
5108 * regformats/i386/amd64-avx.dat: Remove.
5109 * regformats/i386/amd64-mpx.dat: Remove.
5110 * regformats/i386/i386-avx-avx512.dat: Remove.
5111 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5112 * regformats/i386/i386-avx-mpx.dat: Remove.
5113 * regformats/i386/i386-mmx.dat: Remove.
5114 * regformats/i386/i386-mpx.dat: Remove.
5115
5116 2017-08-09 Yao Qi <yao.qi@linaro.org>
5117
5118 * amd64-tdep.h (tdesc_x32): Remove the declaration.
5119 * amd64-tdep.c: Don't include features/i386/x32*.c.
5120 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5121 functions.
5122 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5123 and i386/x32-avx-avx512.
5124 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5125 and i386/x32.xml.
5126 * features/i386/x32-avx-avx512.c: Removed.
5127 * features/i386/x32-avx-avx512.xml: Removed.
5128 * features/i386/x32-avx.c: Removed.
5129 * features/i386/x32-avx.xml: Removed.
5130 * features/i386/x32.c: Removed.
5131 * features/i386/x32.xml: Removed.
5132 * regformats/i386/x32-avx-avx512.dat: Removed.
5133 * regformats/i386/x32-avx.dat: Removed.
5134 * regformats/i386/x32.dat: Removed.
5135
5136 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5137
5138 PR breakpoints/21886
5139 * mem-break.c (default_memory_insert_breakpoint): Use
5140 `->placed_address' rather than `->reqstd_address' for the
5141 breakpoint location.
5142
5143 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5144
5145 * arch-utils.c (default_print_insn): Remove arch/mach/endian
5146 assertions.
5147
5148 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5149
5150 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
5151 a union of `tdep_info', `tdesc_data' and `id'.
5152 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5153 rather than `info.tdep_info'.
5154 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5155 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5156 * i386-tdep.c (i386_gdbarch_init): Likewise.
5157 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5158 * mips-tdep.c (mips_gdbarch_init): Likewise.
5159 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5160 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5161 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5162 `info.tdep_info'.
5163 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5164 `info.tdep_info'.
5165 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5166 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5167 `info.tdep_info'.
5168 * spu-tdep.c (spu_gdbarch_init): Likewise.
5169 * gdbarch.h: Regenerate.
5170
5171 2017-08-07 Leszek Swirski <leszeks@google.com>
5172
5173 PR symtab/20899
5174 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5175
5176 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
5177
5178 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5179 (gdbsim_open): Rename gdb_argv args object to argv.
5180
5181 2017-08-05 Tom Tromey <tom@tromey.com>
5182
5183 * compile/compile-object-load.c (compile_object_load): Use
5184 gdb::unique_xmalloc_ptr.
5185 * cli/cli-dump.c (scan_filename): Rename from
5186 scan_filename_with_cleanup. Change return type.
5187 (scan_expression): Rename from scan_expression_with_cleanup.
5188 Change return type.
5189 (dump_memory_to_file, dump_value_to_file, restore_command):
5190 Use gdb::unique_xmalloc_ptr. Update.
5191 * cli/cli-cmds.c (find_and_open_script): Use
5192 gdb::unique_xmalloc_ptr.
5193 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5194 * symmisc.c (maintenance_print_symbols)
5195 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5196 * symfile.c (symfile_bfd_open, generic_load)
5197 (add_symbol_file_command, remove_symbol_file_command): Use
5198 gdb::unique_xmalloc_ptr.
5199 * source.c (openp): Use gdb::unique_xmalloc_ptr.
5200 * psymtab.c (maintenance_print_psymbols): Use
5201 gdb::unique_xmalloc_ptr.
5202 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5203 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5204 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5205 (reload_shared_libraries_1): Likewise.
5206
5207 2017-08-05 Tom Tromey <tom@tromey.com>
5208
5209 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5210 (rust_op_vector, rust_set_vector): New typedefs.
5211 (current_parser): New global.
5212 (work_obstack): Change to pointer type. Update all users.
5213 (rust_ast, pstate): Remove globals.
5214 (struct rust_parser): New.
5215 (%union) <params, field_inits>: Change type.
5216 (start, tuple_expr, unit_expr, struct_expr_list, literal)
5217 (field_expr, expr_list, maybe_expr_list, type_list): Update.
5218 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5219 (convert_params_to_types, convert_params_to_expression): Change
5220 type of "params".
5221 (ast_string): Change type of "fields".
5222 (rust_parse): Make a rust_parser. Remove cleanups.
5223 (rust_lex_tests): Make and install an auto_obstack.
5224
5225 2017-08-04 Yao Qi <yao.qi@linaro.org>
5226
5227 * configure.srv (ipa_x32_linux_regobj): New.
5228 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
5229 instead of X86_TDESC_AVX512.
5230 (initialize_low_tracepoint): Call
5231 init_registers_x32_avx_avx512_linux.
5232
5233 2017-08-04 Yao Qi <yao.qi@linaro.org>
5234
5235 * utils.h (gdb_argv): Add namespace std for nullptr_t.
5236
5237 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
5238
5239 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
5240
5241 2017-08-03 Tom Tromey <tom@tromey.com>
5242
5243 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
5244 Remove.
5245 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
5246
5247 2017-08-03 Tom Tromey <tom@tromey.com>
5248
5249 * python/py-param.c (compute_enum_values): Use gdb_argv.
5250
5251 2017-08-03 Tom Tromey <tom@tromey.com>
5252
5253 * utils.h (struct gdb_argv_deleter): New.
5254 (gdb_argv): New class.
5255 * utils.c (gdb_argv::reset): New method.
5256 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
5257 * tracefile.c (tsave_command): Use gdb_argv.
5258 * top.c (new_ui_command): Use gdb_argv.
5259 * symmisc.c (maintenance_print_symbols)
5260 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
5261 * symfile.c (symbol_file_command, generic_load)
5262 (remove_symbol_file_command): Use gdb_argv.
5263 * stack.c (backtrace_command): Use gdb_argv.
5264 * source.c (add_path, show_substitute_path_command)
5265 (unset_substitute_path_command, set_substitute_path_command):
5266 Use gdb_argv.
5267 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
5268 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
5269 * remote.c (extended_remote_run, remote_put_command)
5270 (remote_get_command, remote_delete_command): Use gdb_argv.
5271 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
5272 (gdbsim_open): Use gdb_argv.
5273 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
5274 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
5275 * procfs.c (procfs_info_proc): Use gdb_argv.
5276 * interps.c (interpreter_exec_cmd): Use gdb_argv.
5277 * infrun.c (handle_command): Use gdb_argv.
5278 * inferior.c (add_inferior_command, clone_inferior_command):
5279 Use gdb_argv.
5280 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
5281 * exec.c (exec_file_command): Use gdb_argv.
5282 * cli/cli-cmds.c (alias_command): Use gdb_argv.
5283 * compile/compile.c (build_argc_argv): Use gdb_argv.
5284
5285 2017-08-03 Tom Tromey <tom@tromey.com>
5286
5287 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
5288
5289 2017-08-03 Tom Tromey <tom@tromey.com>
5290
5291 * python/python.c (compute_python_string): Return std::string.
5292 (gdbpy_eval_from_control_command): Update.
5293 (do_start_initialization): Use std::string.
5294 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
5295 xstrprintf.
5296 * python/py-breakpoint.c (local_setattro): Use string_printf, not
5297 xstrprintf.
5298
5299 2017-08-03 Tom Tromey <tom@tromey.com>
5300
5301 * top.h (do_restore_instream_cleanup): Remove.
5302 * top.c (do_restore_instream_cleanup): Remove.
5303 (read_command_file): Use scoped_restore.
5304 * cli/cli-script.c (execute_user_command): Use scoped_restore.
5305
5306 2017-08-03 Tom Tromey <tom@tromey.com>
5307
5308 * cli/cli-script.c (execute_user_command)
5309 (execute_control_command): Use scoped_restore.
5310
5311 2017-08-03 Tom Tromey <tom@tromey.com>
5312
5313 * cli/cli-script.c (do_restore_user_call_depth): Remove.
5314 (execute_user_command): Remove user_call_depth; use
5315 user_args_stack's size instead.
5316
5317 2017-08-03 Tom Tromey <tom@tromey.com>
5318
5319 * top.h (in_user_command): Remove.
5320 * top.c (in_user_command): Remove.
5321 * cli/cli-script.c (do_restore_user_call_depth)
5322 (execute_user_command): Update.
5323
5324 2017-08-03 Tom Tromey <tom@tromey.com>
5325
5326 * valops.c (search_struct_method): Use gdb::byte_vector.
5327 * valarith.c (value_concat): Use std::vector.
5328 * target.c (memory_xfer_partial): Use gdb::byte_vector.
5329 (simple_search_memory): Likewise.
5330 * printcmd.c (find_string_backward): Use gdb::byte_vector.
5331 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
5332 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
5333 * elfread.c (elf_rel_plt_read): Use std::string.
5334 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
5335 * cli/cli-dump.c (restore_section_callback): Use
5336 gdb::byte_vector.
5337
5338 2017-08-03 Tom Tromey <tom@tromey.com>
5339
5340 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
5341
5342 2017-08-03 Tom Tromey <tom@tromey.com>
5343
5344 * tui/tui-regs.c (tui_restore_gdbout): Remove.
5345 (tui_register_format): Use scoped_restore.
5346
5347 2017-08-03 Tom Tromey <tom@tromey.com>
5348
5349 * reverse.c (exec_direction_default): Remove.
5350 (exec_reverse_once): Use scoped_restore.
5351 * remote.c (restore_remote_timeout): Remove.
5352 (remote_flash_erase, remote_flash_write, remote_flash_done)
5353 (readchar, remote_serial_write): Use scoped_restore.
5354 * cli/cli-script.c (struct source_cleanup_lines_args)
5355 (source_cleanup_lines): Remove.
5356 (script_from_file): Use scoped_restore.
5357 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
5358 (source_command): Use scoped_restore.
5359
5360 2017-08-03 Tom Tromey <tom@tromey.com>
5361
5362 * utils.h (make_cleanup_free_so): Remove.
5363 * utils.c (do_free_so, make_cleanup_free_so): Remove.
5364 * solist.h (struct so_deleter): New.
5365 (so_list_up): New typedef.
5366 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
5367
5368 2017-08-03 Tom Tromey <tom@tromey.com>
5369
5370 * utils.h (make_cleanup_restore_current_language): Remove.
5371 * utils.c (do_restore_current_language)
5372 (make_cleanup_restore_current_language): Remove.
5373 * parse.c (parse_exp_in_context_1)
5374 (parse_expression_with_language): Use
5375 scoped_restore_current_language.
5376 * mi/mi-main.c (mi_cmd_execute): Use
5377 scoped_restore_current_language.
5378 * language.h (scoped_restore_current_language): New class.
5379
5380 2017-08-03 Tom Tromey <tom@tromey.com>
5381
5382 * compile/compile.c (cleanup_unlink_file): Remove.
5383 (compile_to_object): Use gdb::unlinker.
5384 (eval_compile_command): Likewise.
5385
5386 2017-08-03 Tom Tromey <tom@tromey.com>
5387
5388 * utils.h (make_cleanup_fclose): Remove.
5389 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
5390
5391 2017-08-03 Tom Tromey <tom@tromey.com>
5392
5393 * top.c (open_terminal_stream): Return gdb_file_up.
5394 (new_ui_command): Update.
5395
5396 2017-08-03 Tom Tromey <tom@tromey.com>
5397
5398 * source.c (print_source_lines_base, forward_search_command)
5399 (reverse_search_command): Use gdb_file_up.
5400
5401 2017-08-03 Tom Tromey <tom@tromey.com>
5402
5403 * fbsd-nat.c (fbsd_find_memory_regions): Update.
5404
5405 2017-08-03 Tom Tromey <tom@tromey.com>
5406
5407 * cli/cli-cmds.c (find_and_open_script): Change return type.
5408 Remove "streamp" and "full_path" parameters.
5409 (source_script_with_search): Update.
5410 * auto-load.c (source_script_file): Update.
5411 * cli/cli-cmds.h (find_and_open_script): Change type.
5412 (open_script): New struct.
5413
5414 2017-08-03 Tom Tromey <tom@tromey.com>
5415
5416 * xml-support.c (xml_fetch_content_from_file): Update.
5417 * ui-file.c (stdio_file::open): Update.
5418 * tracefile-tfile.c (tfile_start): Update.
5419 * remote.c (remote_file_put, remote_file_get): Update.
5420 * nat/linux-procfs.c (linux_proc_get_int)
5421 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
5422 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
5423 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
5424 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
5425 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
5426 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
5427 * linux-nat.c (linux_proc_pending_signals): Update.
5428 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
5429 (file_closer): Remove.
5430 * compile/compile.c (compile_to_object): Update.
5431 * common/filestuff.h (struct gdb_file_deleter): New.
5432 (gdb_file_up): New typedef.
5433 (gdb_fopen_cloexec): Change return type.
5434 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
5435 * cli/cli-dump.c (fopen_with_cleanup): Remove.
5436 (dump_binary_file, restore_binary_file): Update.
5437 * auto-load.c (auto_load_objfile_script_1): Update.
5438
5439 2017-08-03 Tom Tromey <tom@tromey.com>
5440
5441 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
5442 (info_static_tracepoint_markers_command): Likewise.
5443 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
5444 * skip.c (skip_info): Use ui_out_emit_table.
5445 * progspace.c (print_program_space): Use ui_out_emit_table.
5446 * osdata.c (info_osdata): Use ui_out_emit_table.
5447 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
5448 ui_out_emit_table.
5449 * linux-thread-db.c (info_auto_load_libthread_db): Use
5450 ui_out_emit_table.
5451 * inferior.c (print_inferior): Use ui_out_emit_table.
5452 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
5453 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
5454 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
5455 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
5456 * ui-out.h (class ui_out_emit_table): New.
5457
5458 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
5459
5460 * mips-tdep.c (mips_fpu_type_str): New function.
5461 (mips_dump_tdep): Call it.
5462
5463 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
5464
5465 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
5466 `->mips_fpu_type'.
5467
5468 2017-07-31 Xavier Roirand <roirand@adacore.com>
5469
5470 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
5471
5472 2017-07-27 Xavier Roirand <roirand@adacore.com>
5473
5474 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
5475
5476 2017-07-26 Yao Qi <yao.qi@linaro.org>
5477
5478 * cli/cli-cmds.c (maintenancechecklist): New variable.
5479 * gdbcmd.h (maintenancechecklist): Declare it.
5480 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
5481 Call i386_linux_read_description with different masks.
5482 * maint.c (maintenance_check_command): New function.
5483 (_initialize_maint_cmds): Call add_prefix_cmd.
5484 * target-descriptions.c (tdesc_reg): override operator != and ==.
5485 (tdesc_type): Likewise.
5486 (tdesc_feature): Likewise.
5487 (target_desc): Likewise.
5488 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
5489 (maintenance_check_xml_descriptions): New function.
5490 (_initialize_target_descriptions) Add command "xml-descriptions".
5491 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
5492
5493 2017-07-26 Yao Qi <yao.qi@linaro.org>
5494
5495 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
5496 Include features/i386/32bit-*.c.
5497 (i386_linux_read_description): Generate target description if it
5498 doesn't exist.
5499 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
5500 functions.
5501 * features/i386/32bit-linux.c: Re-generated.
5502 * features/i386/32bit-sse.c: Likewise.
5503 * target-descriptions.c (print_c_feature::visit): Print code to
5504 set register number if needed.
5505 (print_c_feature) <m_next_regnum>: New field.
5506
5507 2017-07-26 Yao Qi <yao.qi@linaro.org>
5508
5509 * features/Makefile (CFILES): Rename with TDESC_CFILES.
5510 (FEATURE_XMLFILES): New.
5511 (FEATURE_CFILES): New.
5512 New rules.
5513 (clean-cfiles): Remove generated c files.
5514 * features/i386/32bit-avx.c: Generated.
5515 * features/i386/32bit-avx512.c: Generated.
5516 * features/i386/32bit-core.c: Generated.
5517 * features/i386/32bit-linux.c: Generated.
5518 * features/i386/32bit-mpx.c: Generated.
5519 * features/i386/32bit-pkeys.c: Generated.
5520 * features/i386/32bit-sse.c: Generated.
5521 * target-descriptions.c: Include algorithm.
5522 (tdesc_element_visitor): Add method visit_end.
5523 (print_c_tdesc): Implement visit_end.
5524 (print_c_tdesc:: m_filename_after_features): Move it to
5525 protected.
5526 (print_c_feature): New class.
5527 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
5528 name starts with "i386/32bit-".
5529
5530 2017-07-26 Yao Qi <yao.qi@linaro.org>
5531
5532 * target-descriptions.c (tdesc_element_visitor): New class.
5533 (tdesc_element): New class.
5534 (tdesc_reg): Inherit from tdesc_element.
5535 (tdesc_reg::accept): New function.
5536 (tdesc_type): Inherit from tdesc_element.
5537 (tdesc_type::accept): New function.
5538 (tdesc_feature): Inherit from tdesc_element.
5539 (tdesc_feature::accept): New function.
5540 (target_desc): Inherit from tdesc_element.
5541 (target_desc::target_desc): New.
5542 (target_desc::~target_desc): New.
5543 (target_desc::accept): New.
5544 (allocate_target_description): Use new.
5545 (free_target_description): Use delete.
5546 (print_c_tdesc): New class.
5547 (maint_print_c_tdesc_cmd): Adjust.
5548
5549 * features/aarch64.c: Re-generated.
5550 * features/arc-arcompact.c: Re-generated.
5551 * features/arc-v2.c: Re-generated.
5552 * features/arm/arm-with-iwmmxt.c: Re-generated.
5553 * features/arm/arm-with-m.c: Re-generated.
5554 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
5555 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
5556 * features/arm/arm-with-neon.c: Re-generated.
5557 * features/arm/arm-with-vfpv2.c: Re-generated.
5558 * features/arm/arm-with-vfpv3.c: Re-generated.
5559 * features/i386/amd64-avx-avx512.c: Re-generated.
5560 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5561 * features/i386/amd64-avx.c: Re-generated.
5562 * features/i386/amd64-avx-linux.c: Re-generated.
5563 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
5564 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5565 * features/i386/amd64-avx-mpx.c: Re-generated.
5566 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
5567 * features/i386/amd64.c: Re-generated.
5568 * features/i386/amd64-linux.c: Re-generated.
5569 * features/i386/amd64-mpx.c: Re-generated.
5570 * features/i386/amd64-mpx-linux.c: Re-generated.
5571 * features/i386/i386-avx-avx512.c: Re-generated.
5572 * features/i386/i386-avx-avx512-linux.c: Re-generated.
5573 * features/i386/i386-avx.c: Re-generated.
5574 * features/i386/i386-avx-linux.c: Re-generated.
5575 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
5576 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
5577 * features/i386/i386-avx-mpx.c: Re-generated.
5578 * features/i386/i386-avx-mpx-linux.c: Re-generated.
5579 * features/i386/i386.c: Re-generated.
5580 * features/i386/i386-linux.c: Re-generated.
5581 * features/i386/i386-mmx.c: Re-generated.
5582 * features/i386/i386-mmx-linux.c: Re-generated.
5583 * features/i386/i386-mpx.c: Re-generated.
5584 * features/i386/i386-mpx-linux.c: Re-generated.
5585 * features/i386/x32-avx-avx512.c: Re-generated.
5586 * features/i386/x32-avx-avx512-linux.c: Re-generated.
5587 * features/i386/x32-avx.c: Re-generated.
5588 * features/i386/x32-avx-linux.c: Re-generated.
5589 * features/i386/x32.c: Re-generated.
5590 * features/i386/x32-linux.c: Re-generated.
5591 * features/microblaze.c: Re-generated.
5592 * features/microblaze-with-stack-protect.c: Re-generated.
5593 * features/mips64-dsp-linux.c: Re-generated.
5594 * features/mips64-linux.c: Re-generated.
5595 * features/mips-dsp-linux.c: Re-generated.
5596 * features/mips-linux.c: Re-generated.
5597 * features/nds32.c: Re-generated.
5598 * features/nios2.c: Re-generated.
5599 * features/nios2-linux.c: Re-generated.
5600 * features/rs6000/powerpc-32.c: Re-generated.
5601 * features/rs6000/powerpc-32l.c: Re-generated.
5602 * features/rs6000/powerpc-403.c: Re-generated.
5603 * features/rs6000/powerpc-403gc.c : Re-generated.
5604 * features/rs6000/powerpc-405.c: Re-generated.
5605 * features/rs6000/powerpc-505.c: Re-generated.
5606 * features/rs6000/powerpc-601.c: Re-generated.
5607 * features/rs6000/powerpc-602.c: Re-generated.
5608 * features/rs6000/powerpc-603.c: Re-generated.
5609 * features/rs6000/powerpc-604.c: Re-generated.
5610 * features/rs6000/powerpc-64.c: Re-generated.
5611 * features/rs6000/powerpc-64l.c: Re-generated.
5612 * features/rs6000/powerpc-7400.c: Re-generated.
5613 * features/rs6000/powerpc-750.c: Re-generated.
5614 * features/rs6000/powerpc-860.c: Re-generated.
5615 * features/rs6000/powerpc-altivec32.c: Re-generated.
5616 * features/rs6000/powerpc-altivec32l.c: Re-generated.
5617 * features/rs6000/powerpc-altivec64.c: Re-generated.
5618 * features/rs6000/powerpc-altivec64l.c: Re-generated.
5619 * features/rs6000/powerpc-cell32l.c: Re-generated.
5620 * features/rs6000/powerpc-cell64l.c: Re-generated.
5621 * features/rs6000/powerpc-e500.c: Re-generated.
5622 * features/rs6000/powerpc-e500l.c: Re-generated.
5623 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
5624 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
5625 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
5626 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
5627 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
5628 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
5629 * features/rs6000/powerpc-vsx32.c: Re-generated.
5630 * features/rs6000/powerpc-vsx32l.c: Re-generated.
5631 * features/rs6000/powerpc-vsx64.c: Re-generated.
5632 * features/rs6000/powerpc-vsx64l.c: Re-generated.
5633 * features/rs6000/rs6000.c: Re-generated.
5634 * features/s390-linux32.c: Re-generated.
5635 * features/s390-linux32v1.c: Re-generated.
5636 * features/s390-linux32v2.c: Re-generated.
5637 * features/s390-linux64.c: Re-generated.
5638 * features/s390-linux64v1.c: Re-generated.
5639 * features/s390-linux64v2.c: Re-generated.
5640 * features/s390-te-linux64.c: Re-generated.
5641 * features/s390-tevx-linux64.c: Re-generated.
5642 * features/s390-vx-linux64.c: Re-generated.
5643 * features/s390x-linux64.c: Re-generated.
5644 * features/s390x-linux64v1.c: Re-generated.
5645 * features/s390x-linux64v2.c: Re-generated.
5646 * features/s390x-te-linux64.c: Re-generated.
5647 * features/s390x-tevx-linux64.c: Re-generated.
5648 * features/s390x-vx-linux64.c: Re-generated.
5649 * features/sparc/sparc32-solaris.c: Re-generated.
5650 * features/sparc/sparc64-solaris.c: Re-generated.
5651 * features/tic6x-c62x.c: Re-generated.
5652 * features/tic6x-c62x-linux.c: Re-generated.
5653 * features/tic6x-c64x.c: Re-generated.
5654 * features/tic6x-c64x-linux.c: Re-generated.
5655 * features/tic6x-c64xp.c: Re-generated.
5656 * features/tic6x-c64xp-linux.c: Re-generated.
5657
5658 2017-07-26 Yao Qi <yao.qi@linaro.org>
5659
5660 * i386-linux-tdep.c (i386_linux_read_description): New function.
5661 (i386_linux_core_read_description): Call
5662 i386_linux_read_description.
5663 * i386-linux-tdep.h (i386_linux_read_description): Declare.
5664 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
5665 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
5666 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
5667 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
5668 * x86-linux-nat.c (x86_linux_read_description): Call
5669 i386_linux_read_description.
5670
5671 2017-07-26 Yao Qi <yao.qi@linaro.org>
5672
5673 * NEWS: Mention it.
5674 * features/Makefile (%.c: %.xml): Pass the xml file name to
5675 command "maint print c-tdesc".
5676 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
5677 name from 'arg'.
5678
5679 2017-07-26 Yao Qi <yao.qi@linaro.org>
5680
5681 * target-descriptions.c (target_desc): Add ctor and dtor. Do
5682 in-class initialization.
5683 (tdesc_create_feature): Call new instead of XCNEW.
5684 (free_target_description): Ue delete.
5685
5686 2017-07-25 John Baldwin <jhb@FreeBSD.org>
5687
5688 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
5689
5690 2017-07-25 Yao Qi <yao.qi@linaro.org>
5691
5692 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
5693 constant.
5694 (amd64_x32_init_abi): Likewise.
5695 * amd64-tdep.h (amd64_init_abi): Update declaration.
5696 (amd64_x32_init_abi): Likewise.
5697
5698 2017-07-25 Yao Qi <yao.qi@linaro.org>
5699
5700 PR tdep/21717
5701 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
5702 condition for FPSCR.
5703 (arm_linux_store_inferior_registers): Likewise.
5704
5705 2017-07-22 Tom Tromey <tom@tromey.com>
5706
5707 * break-catch-syscall.c (struct catch_syscall_inferior_data)
5708 <syscalls_counts>: Now a std::vector.
5709 (get_catch_syscall_inferior_data): Use "new".
5710 (catch_syscall_inferior_data_cleanup): Use "delete".
5711 (insert_catch_syscall, remove_catch_syscall)
5712 (clear_syscall_counts): Update.
5713
5714 2017-07-22 Tom Tromey <tom@tromey.com>
5715
5716 * break-catch-syscall.c (syscall_catchpoint)
5717 <syscalls_to_be_caught>: Now a std::vector<int>
5718 (~syscall_catchpoint): Remove.
5719 (insert_catch_syscall, remove_catch_syscall)
5720 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
5721 (print_mention_catch_syscall, print_recreate_catch_syscall):
5722 Update.
5723 (create_syscall_event_catchpoint): Change type of "filter"
5724 parameter.
5725 (catch_syscall_split_args): Return a std::vector.
5726 (catch_syscall_command_1, catching_syscall_number_1): Update.
5727
5728 2017-07-22 Tom Tromey <tom@tromey.com>
5729
5730 * break-catch-throw.c (struct exception_catchpoint)
5731 <exception_rx>: Now a std::string.
5732 (~exception_catchpoint): Remove.
5733 (print_one_detail_exception_catchpoint): Update.
5734 (handle_gnu_v3_exceptions): Change type of except_rx.
5735 (extract_exception_regexp): Return a std::string.
5736 (catch_exception_command_1): Update.
5737
5738 2017-07-22 Tom Tromey <tom@tromey.com>
5739
5740 * break-catch-sig.c (gdb_signal_type): Remove typedef.
5741 (struct signal_catchpoint) <signals_to_be_caught>: Now a
5742 std::vector.
5743 <catch_all>: Now a bool.
5744 (~signal_catchpoint): Remove.
5745 (signal_catchpoint_insert_location)
5746 (signal_catchpoint_remove_location)
5747 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
5748 (signal_catchpoint_print_mention)
5749 (signal_catchpoint_print_recreate)
5750 (signal_catchpoint_explains_signal): Update.
5751 (create_signal_catchpoint): Change type of "filter" and
5752 "catch_all".
5753 (catch_signal_split_args): Return a std::vector. Change type of
5754 "catch_all".
5755 (catch_signal_command): Update.
5756
5757 2017-07-20 Pedro Alves <palves@redhat.com>
5758
5759 * ada-lang.c (ada_language_defn): Make extern.
5760 (_initialize_ada_language): Remove add_language call.
5761 * c-lang.c (c_language_defn, cplus_language_defn)
5762 (asm_language_defn, minimal_language_defn): Make extern.
5763 (_initialize_c_language): Delete.
5764 * completer.c (compare_cstrings): Delete, moved to utils.h.
5765 * d-lang.c (d_language_defn): Make extern.
5766 (_initialize_d_language): Remove add_language calls.
5767 * defs.h (enum language): Add comment.
5768 * f-lang.c (f_language_defn): Make extern.
5769 (_initialize_f_language): Remove add_language call.
5770 * go-lang.c (go_language_defn): Make extern.
5771 (_initialize_go_language): Remove add_language call.
5772 * language.c: Include <algorithm>.
5773 (languages): Redefine as const array.
5774 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
5775 (set_language_command): Handle "local". Use for-range loop.
5776 (set_language): Remove loop.
5777 (language_enum): Rewrite.
5778 (language_def, language_str): Remove loops.
5779 (add_language): Delete.
5780 (add_set_language_command): New, based on add_languages.
5781 (skip_language_trampoline): Adjust.
5782 (local_language_defn): Delete.
5783 (language_gdbarch_post_init): Adjust.
5784 (_initialize_language): Remove add_language calls. Call
5785 add_set_language_command.
5786 * language.h (add_language): Delete.
5787 (auto_language_defn)
5788 (unknown_language_defn, minimal_language_defn, ada_language_defn)
5789 (asm_language_defn, c_language_defn, cplus_language_defn)
5790 (d_language_defn, f_language_defn, go_language_defn)
5791 (m2_language_defn, objc_language_defn, opencl_language_defn)
5792 (pascal_language_defn, rust_language_defn): Declare.
5793 * m2-lang.c (m2_language_defn): Make extern.
5794 (_initialize_m2_language): Remove add_language call.
5795 * objc-lang.c (objc_language_defn): Make extern.
5796 (_initialize_objc_language): Remove add_language call.
5797 * opencl-lang.c (opencl_language_defn): Make extern.
5798 (_initialize_opencl_language): Remove add_language call.
5799 * p-lang.c (pascal_language_defn): Make extern.
5800 (_initialize_pascal_language): Delete.
5801 * rust-lang.c (rust_language_defn): Make extern.
5802 (_initialize_rust_language): Delete.
5803 * utils.h (compare_cstrings): New static inline function.
5804
5805 2017-07-20 Pedro Alves <palves@redhat.com>
5806
5807 * ada-lang.c (ada_to_fixed_type_1): Adjust.
5808 (get_var_value): Constify parameters.
5809 (get_int_var_value): Change prototype.
5810 (to_fixed_range_type): Adjust.
5811 * ada-lang.h (get_int_var_value): Change prototype.
5812
5813 2017-07-20 Pedro Alves <palves@redhat.com>
5814
5815 * dwarf2read.c (dw2_lookup_symbol): Use
5816 SYMBOL_MATCHES_SEARCH_NAME.
5817 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5818
5819 2017-07-20 Pedro Alves <palves@redhat.com>
5820
5821 * block.c (block_iter_name_step, block_iter_name_first)
5822 (block_iter_name_next): Delete.
5823 (block_lookup_symbol_primary): Adjust to use
5824 dict_iter_match_first/dict_iter_match_next.
5825 * block.h (block_iter_name_first, block_iter_name_next): Delete
5826 declarations.
5827 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5828 dict_iter_match_first/dict_iter_match_next.
5829
5830 2017-07-20 Pedro Alves <palves@redhat.com>
5831
5832 * cp-support.c (cp_find_first_component_aux): Add missing case for
5833 end of string.
5834
5835 2017-07-18 David Blaikie <dblaikie@gmail.com>
5836
5837 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5838 of dwo_cu's dwo_file.
5839
5840 2017-07-18 Yao Qi <yao.qi@linaro.org>
5841
5842 * remote.c (store_registers_using_G): Remove one line comment.
5843
5844 2017-07-18 Yao Qi <yao.qi@linaro.org>
5845
5846 * regcache.c (regcache_cpy): Simplify it.
5847 (regcache::cpy_no_passthrough): Remove it.
5848 * regcache.h (cpy_no_passthrough): Remove it.
5849 (regcache_dup, regcache_cpy): Update comments.
5850
5851 2017-07-18 Pedro Alves <palves@redhat.com>
5852
5853 * remote-sim.c (sim_command_completer): Adjust to work with a
5854 completion_tracker instead of a VEC.
5855
5856 2017-07-17 Pedro Alves <palves@redhat.com>
5857
5858 * completer.c (complete_source_filenames): New function.
5859 (complete_address_and_linespec_locations): New function.
5860 (location_completer): Use complete_address_and_linespec_locations.
5861 (completion_tracker::build_completion_result): Honor the tracker's
5862 request to suppress append.
5863 * completer.h (completion_tracker::suppress_append_ws)
5864 (completion_tracker::set_suppress_append_ws): New methods.
5865 (completion_tracker::m_suppress_append_ws): New field.
5866 (complete_source_filenames): New declaration.
5867 * linespec.c (linespec_complete_what): New.
5868 (struct ls_parser) <complete_what, completion_word,
5869 completion_quote_char, completion_quote_end, completion_tracker>:
5870 New fields.
5871 (string_find_incomplete_keyword_at_end): New.
5872 (linespec_lexer_lex_string): Record quote char. If in completion
5873 mode, don't throw.
5874 (linespec_lexer_consume_token): Advance the completion word point.
5875 (linespec_lexer_peek_token): Save/restore completion info.
5876 (save_stream_and_consume_token): New.
5877 (set_completion_after_number): New.
5878 (linespec_parse_basic): Set what to complete next depending on
5879 token. Handle function and label completions specially.
5880 (parse_linespec): Disable objc shortcut in completion mode. Set
5881 what to complete next depending on token type. Skip keyword if in
5882 completion mode.
5883 (complete_linespec_component, linespec_complete): New.
5884 * linespec.h (linespec_complete): Declare.
5885
5886 2017-07-17 Pedro Alves <palves@redhat.com>
5887
5888 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5889 Handle 'operator<' / 'operator<<'.
5890
5891 2017-07-17 Pedro Alves <palves@redhat.com>
5892
5893 * completer.c (collect_explicit_location_matches): Handle
5894 MATCH_LABEL.
5895 (convert_explicit_location_to_linespec): New, factored out from
5896 ...
5897 (convert_explicit_location_to_sals): ... this.
5898 (complete_label): New.
5899 (linespec_complete_label, find_label_symbols_in_block): New.
5900 (find_label_symbols): Add completion_mode parameter and adjust to
5901 call find_label_symbols_in_block.
5902 * linespec.h (linespec_complete_label): Declare.
5903
5904 2017-07-17 Pedro Alves <palves@redhat.com>
5905
5906 * ada-lang.c (ada_collect_symbol_completion_matches): Add
5907 complete_symbol_mode parameter.
5908 * cli/cli-cmds.c (complete_command): Get the completion result out
5909 of the handle_brkchars tracker if used a custom word point.
5910 * completer.c: Include "linespec.h".
5911 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5912 (advance_to_expression_complete_word_point): New.
5913 (completion_tracker::completes_to_completion_word): New.
5914 (complete_files_symbols): Pass down
5915 complete_symbol_mode::EXPRESSION.
5916 (explicit_options, probe_options): New.
5917 (collect_explicit_location_matches): Complete on the
5918 explictit_loc->foo instead of word. Use
5919 linespec_complete_function. Handle MATCH_LINE. Handle offering
5920 keyword and options completions.
5921 (backup_text_ptr): Delete.
5922 (skip_keyword): New.
5923 (complete_explicit_location): Remove 'word' parameter. Add
5924 language, quoted_arg_start and quoted_arg_end parameters.
5925 Rewrite, parsing left to right.
5926 (location_completer): Rewrite.
5927 (location_completer_handle_brkchars): New function.
5928 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5929 (enum complete_line_internal_reason): Adjust comments.
5930 (completion_tracker::discard_completions): New.
5931 (completer_handle_brkchars_func_for_completer): Handle
5932 location_completer.
5933 (gdb_custom_word_point_brkchars)
5934 (gdb_org_rl_basic_quote_characters): New.
5935 (gdb_completion_word_break_characters_throw)
5936 (completion_find_completion_word): Handle trackers that use a
5937 custom word point.
5938 (completion_tracker::advance_custom_word_point_by): New.
5939 (completion_tracker::build_completion_result): Don't rely on
5940 readline appending the quote char.
5941 (gdb_rl_attempted_completion_function_throw): Handle trackers that
5942 use a custom word point.
5943 (gdb_rl_attempted_completion_function): Restore
5944 rl_basic_quote_characters.
5945 * completer.h (class completion_tracker): Extend intro comment.
5946 (completion_tracker::set_quote_char)
5947 (completion_tracker::quote_char)
5948 (completion_tracker::set_use_custom_word_point)
5949 (completion_tracker::use_custom_word_point)
5950 (completion_tracker::custom_word_point)
5951 (completion_tracker::set_custom_word_point)
5952 (completion_tracker::advance_custom_word_point_by)
5953 (completion_tracker::completes_to_completion_word)
5954 (completion_tracker::discard_completions): New methods.
5955 (completion_tracker::m_quote_char)
5956 (completion_tracker::m_use_custom_word_point)
5957 (completion_tracker::m_custom_word_point): New fields.
5958 (advance_to_expression_complete_word_point): Declare.
5959 * f-lang.c (f_collect_symbol_completion_matches): Add
5960 complete_symbol_mode parameter.
5961 * language.h (struct language_defn)
5962 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5963 parameter.
5964 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
5965 (linespec_complete_function): New function.
5966 (linespec_lexer_lex_keyword): Adjust.
5967 * linespec.h (linespec_keywords, linespec_complete_function): New
5968 declarations.
5969 * location.c (find_end_quote): New function.
5970 (explicit_location_lex_one): Add explicit_completion_info
5971 parameter. Save quoting info. Don't throw if being called for
5972 completion. Don't handle Ada operators here.
5973 (is_cp_operator, skip_op_false_positives, first_of)
5974 (explicit_location_lex_one_function): New function.
5975 (string_to_explicit_location): Replace 'dont_throw' parameter with
5976 an explicit_completion_info pointer parameter. Handle it. Don't
5977 use explicit_location_lex_one to lex function names. Use
5978 explicit_location_lex_one_function instead.
5979 * location.h (struct explicit_completion_info): New.
5980 (string_to_explicit_location): Replace 'dont_throw' parameter with
5981 an explicit_completion_info pointer parameter.
5982 * symtab.c (default_collect_symbol_completion_matches_break_on):
5983 Add complete_symbol_mode parameter. Handle LINESPEC mode.
5984 (default_collect_symbol_completion_matches)
5985 (collect_symbol_completion_matches): Add complete_symbol_mode
5986 parameter.
5987 (collect_symbol_completion_matches_type): Pass down
5988 complete_symbol_mode::EXPRESSION.
5989 (collect_file_symbol_completion_matches): Add complete_symbol_mode
5990 parameter. Handle LINESPEC mode.
5991 * symtab.h (complete_symbol_mode): New.
5992 (default_collect_symbol_completion_matches_break_on)
5993 (default_collect_symbol_completion_matches)
5994 (collect_symbol_completion_matches)
5995 (collect_file_symbol_completion_matches): Add complete_symbol_mode
5996 parameter.
5997
5998 2017-07-17 Pedro Alves <palves@redhat.com>
5999
6000 * utils.c (enum class strncmp_iw_mode): New.
6001 (strcmp_iw): Rename to ...
6002 (strncmp_iw_with_mode): ... this. Add string2_len and mode
6003 parameters. Handle them.
6004 (strncmp_iw): New.
6005 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6006 * utils.h (strncmp_iw): Declare.
6007 (strcmp_iw): Move describing comments here.
6008
6009 2017-07-17 Pedro Alves <palves@redhat.com>
6010
6011 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6012 CP_OPERATOR_STR.
6013 * c-typeprint.c (is_type_conversion_operator): Use
6014 CP_OPERATOR_STR.
6015 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6016 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6017 CP_OPERATOR_LEN.
6018 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6019 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6020 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6021 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6022 CP_OPERATOR_STR.
6023 * location.c: Include "cp-support.h".
6024 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6025 CP_OPERATOR_STR.
6026 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6027 CP_OPERATOR_LEN.
6028
6029 2017-07-17 Pedro Alves <palves@redhat.com>
6030
6031 * cli/cli-cmds.c (complete_command): Use a completion tracker
6032 along with completion_find_completion_word for handle_brkchars
6033 phase.
6034 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6035 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6036 (struct gdb_rl_completion_word_info): New.
6037 (gdb_rl_find_completion_word): New.
6038 (completion_find_completion_word): New.
6039 * completer.h (completion_find_completion_word): Declare.
6040
6041 2017-07-17 Pedro Alves <palves@redhat.com>
6042
6043 * ada-lang.c (symbol_completion_match): Adjust comments.
6044 (symbol_completion_add): Replace vector parameter with
6045 completion_tracker parameter. Use it.
6046 (ada_make_symbol_completion_list): Rename to...
6047 (ada_collect_symbol_completion_matches): ... this. Add
6048 completion_tracker parameter and use it.
6049 (ada_language_defn): Adjust.
6050 * break-catch-syscall.c (catch_syscall_completer): Adjust
6051 prototype and work with completion_tracker instead of VEC.
6052 * breakpoint.c (condition_completer): Adjust prototype and work
6053 with completion_tracker instead of VEC.
6054 * c-lang.c (c_language_defn, cplus_language_defn)
6055 (asm_language_defn, minimal_language_defn): Adjust to renames.
6056 * cli/cli-cmds.c (complete_command): Rework using
6057 completion_tracker. Catch exceptions when completing.
6058 * cli/cli-decode.c (integer_unlimited_completer)
6059 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6060 with completion_tracker instead of VEC.
6061 * command.h (struct completion_tracker): Forward declare.
6062 (completer_ftype, completer_handle_brkchars_ftype): Change
6063 types.
6064 (complete_on_cmdlist, complete_on_enum): Adjust.
6065 * completer.c: Include <algorithm>.
6066 (struct gdb_completer_state): New.
6067 (current_completion): New global.
6068 (readline_line_completion_function): Delete.
6069 (noop_completer, filename_completer)
6070 (filename_completer_handle_brkchars, complete_files_symbols)
6071 (linespec_location_completer): Adjust to work with a
6072 completion_tracker instead of a VEC.
6073 (string_or_empty): New.
6074 (collect_explicit_location_matches): Adjust to work with a
6075 completion_tracker instead of a VEC.
6076 (explicit_location_completer): Rename to ...
6077 (complete_explicit_location): ... this and adjust to work with a
6078 completion_tracker instead of a VEC.
6079 (location_completer): Adjust to work with a completion_tracker
6080 instead of a VEC.
6081 (add_struct_fields): Adjust to work with a completion_list instead
6082 of VEC.
6083 (expression_completer): Rename to ...
6084 (complete_expression): ... this and adjust to work with a
6085 completion_tracker instead of a VEC. Use complete_files_symbols.
6086 (expression_completer): Reimplement on top of complete_expression.
6087 (symbol_completer): Adjust to work with a completion_tracker
6088 instead of a VEC.
6089 (enum complete_line_internal_reason): Add describing comments.
6090 (complete_line_internal_normal_command): Adjust to work with a
6091 completion_tracker instead of a VEC.
6092 (complete_line_internal): Rename to ...
6093 (complete_line_internal_1): ... this and adjust to work with a
6094 completion_tracker instead of a VEC. Assert TEXT is NULL in the
6095 handle_brkchars phase.
6096 (new_completion_tracker): Delete.
6097 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6098 complete_line_internal_1.
6099 (free_completion_tracker): Delete.
6100 (INITIAL_COMPLETION_HTAB_SIZE): New.
6101 (completion_tracker::completion_tracker)
6102 (completion_tracker::~completion_tracker): New.
6103 (maybe_add_completion): Delete.
6104 (completion_tracker::maybe_add_completion)
6105 (completion_tracker::add_completion)
6106 (completion_tracker::add_completions): New.
6107 (throw_max_completions_reached_error): Delete.
6108 (complete_line): Adjust to work with a completion_tracker instead
6109 of a VEC. Don't create a completion_tracker_t or check for max
6110 completions here.
6111 (command_completer, command_completer_handle_brkchars)
6112 (signal_completer, reg_or_group_completer_1)
6113 (reg_or_group_completer, default_completer_handle_brkchars):
6114 Adjust to work with a completion_tracker.
6115 (gdb_completion_word_break_characters_throw): New.
6116 (gdb_completion_word_break_characters): Reimplement.
6117 (line_completion_function): Delete.
6118 (completion_tracker::recompute_lowest_common_denominator)
6119 (expand_preserving_ws)
6120 (completion_tracker::build_completion_result)
6121 (completion_result::completion_result)
6122 (completion_result::completion_result)
6123 (completion_result::~completion_result)
6124 (completion_result::completion_result)
6125 (completion_result::release_match_list, compare_cstrings)
6126 (completion_result::sort_match_list)
6127 (completion_result::reset_match_list)
6128 (gdb_rl_attempted_completion_function_throw)
6129 (gdb_rl_attempted_completion_function): New.
6130 * completer.h (completion_list, struct completion_result)
6131 (class completion_tracker): New.
6132 (complete_line): Add completion_tracker parameter.
6133 (readline_line_completion_function): Delete.
6134 (gdb_rl_attempted_completion_function): New.
6135 (noop_completer, filename_completer, expression_completer)
6136 (location_completer, symbol_completer, command_completer)
6137 (signal_completer, reg_or_group_completer): Update prototypes.
6138 (completion_tracker_t, new_completion_tracker)
6139 (make_cleanup_free_completion_tracker): Delete.
6140 (enum maybe_add_completion_enum): Delete.
6141 (maybe_add_completion): Delete.
6142 (throw_max_completions_reached_error): Delete.
6143 * corefile.c (complete_set_gnutarget): Adjust to work with a
6144 completion_tracker instead of a VEC.
6145 * cp-abi.c (cp_abi_completer): Adjust to work with a
6146 completion_tracker instead of a VEC.
6147 * d-lang.c (d_language_defn): Adjust.
6148 * disasm.c (disassembler_options_completer): Adjust to work with a
6149 completion_tracker instead of a VEC.
6150 * f-lang.c (f_make_symbol_completion_list): Rename to ...
6151 (f_collect_symbol_completion_matches): ... this. Adjust to work
6152 with a completion_tracker instead of a VEC.
6153 (f_language_defn): Adjust.
6154 * go-lang.c (go_language_defn): Adjust.
6155 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6156 Adjust to work with a completion_tracker instead of a VEC.
6157 * infrun.c (handle_completer): Likewise.
6158 * interps.c (interpreter_completer): Likewise.
6159 * interps.h (interpreter_completer): Likewise.
6160 * language.c (unknown_language_defn, auto_language_defn)
6161 (local_language_defn): Adjust.
6162 * language.h (language_defn::la_make_symbol_completion_list):
6163 Rename to ...
6164 (language_defn::la_collect_symbol_completion_matches): ... this
6165 and adjust to work with a completion_tracker instead of a VEC.
6166 * m2-lang.c (m2_language_defn): Adjust.
6167 * objc-lang.c (objc_language_defn): Adjust.
6168 * opencl-lang.c (opencl_language_defn): Adjust.
6169 * p-lang.c (pascal_language_defn): Adjust.
6170 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6171 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6172 with a completion_tracker.
6173 * rust-lang.c (rust_language_defn): Adjust.
6174 * symtab.c (free_completion_list, do_free_completion_list)
6175 (return_val, completion_tracker): Delete.
6176 (completion_list_add_name, completion_list_add_symbol)
6177 (completion_list_add_msymbol, completion_list_objc_symbol)
6178 (completion_list_add_fields, add_symtab_completions): Add
6179 completion_tracker parameter and use it.
6180 (default_make_symbol_completion_list_break_on_1): Rename to...
6181 (default_collect_symbol_completion_matches_break_on): ... this.
6182 Add completion_tracker parameter and use it instead of allocating
6183 a completion tracker here.
6184 (default_make_symbol_completion_list_break_on): Delete old
6185 implementation.
6186 (default_make_symbol_completion_list): Delete.
6187 (default_collect_symbol_completion_matches): New.
6188 (make_symbol_completion_list): Delete.
6189 (collect_symbol_completion_matches): New.
6190 (make_symbol_completion_type): Rename to ...
6191 (collect_symbol_completion_matches_type): ... this. Add
6192 completion_tracker parameter and use it instead of VEC.
6193 (make_file_symbol_completion_list_1): Rename to...
6194 (collect_file_symbol_completion_matches): ... this. Add
6195 completion_tracker parameter and use it instead of VEC.
6196 (make_file_symbol_completion_list): Delete.
6197 (add_filename_to_list): Use completion_list instead of a VEC.
6198 (add_partial_filename_data::list): Now a completion_list.
6199 (make_source_files_completion_list): Work with a completion_list
6200 instead of a VEC.
6201 * symtab.h: Include "completer.h".
6202 (default_make_symbol_completion_list_break_on)
6203 (default_make_symbol_completion_list, make_symbol_completion_list)
6204 (make_symbol_completion_type, make_file_symbol_completion_list)
6205 (make_source_files_completion_list): Delete.
6206 (default_collect_symbol_completion_matches_break_on)
6207 (default_collect_symbol_completion_matches)
6208 (collect_symbol_completion_matches)
6209 (collect_symbol_completion_matches_type)
6210 (collect_file_symbol_completion_matches)
6211 (make_source_files_completion_list): New.
6212 * top.c (init_main): Don't install a rl_completion_entry_function
6213 hook. Install a rl_attempted_completion_function hook instead.
6214 * tui/tui-layout.c (layout_completer): Adjust to work with a
6215 completion_tracker.
6216 * tui/tui-regs.c (tui_reggroup_completer):
6217 * tui/tui-win.c (window_name_completer, focus_completer)
6218 (winheight_completer): Adjust to work with a completion_tracker.
6219 * value.c: Include "completer.h".
6220 (complete_internalvar): Adjust to work with a completion_tracker.
6221 * value.h (complete_internalvar): Likewise.
6222
6223 2017-07-17 Pedro Alves <palves@redhat.com>
6224
6225 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
6226 renames.
6227 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
6228 comments to completer_ftype's declaration.
6229 <completer_handle_brkchars>: Change type to
6230 completer_handle_brkchars_ftype.
6231 * command.h (completer_ftype): Add describing comment and give
6232 names to parameters.
6233 (completer_ftype_void): Rename to ...
6234 (completer_handle_brkchars_ftype) ... this. Add describing comment.
6235 (set_cmd_completer_handle_brkchars): Adjust.
6236 * completer.c (filename_completer_handle_brkchars): New function.
6237 (complete_line_internal_normal_command): New function, factored
6238 out from ...
6239 (complete_line_internal): ... here.
6240 (command_completer_handle_brkchars)
6241 (default_completer_handle_brkchars)
6242 (completer_handle_brkchars_func_for_completer): New functions.
6243 * completer.h (set_gdb_completion_word_break_characters): Delete
6244 declaration.
6245 (completer_handle_brkchars_func_for_completer): New declaration.
6246 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6247 completer_handle_brkchars_func_for_completer.
6248
6249 2017-07-17 Pedro Alves <palves@redhat.com>
6250
6251 * completer.c (symbol_completer): New function, based on
6252 make_symbol_completion_list_fn.
6253 * completer.h (symbol_completer): New declaration.
6254 * guile/scm-cmd.c (cmdscm_completers): Adjust.
6255 * python/py-cmd.c (completers): Adjust.
6256 * symtab.c (make_symbol_completion_list_fn): Delete.
6257 * symtab.h (make_symbol_completion_list_fn): Delete.
6258 * cli/cli-decode.c (add_cmd): Adjust.
6259
6260 2017-07-17 Pedro Alves <palves@redhat.com>
6261
6262 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
6263 * dwarf2read.c: Include "filename-seen-cache.h".
6264 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
6265 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
6266 * filename-seen-cache.c: New file.
6267 * filename-seen-cache.h: New file.
6268 * symtab.c: Include "filename-seen-cache.h".
6269 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
6270 (create_filename_seen_cache, clear_filename_seen_cache)
6271 (delete_filename_seen_cache, filename_seen): Delete, parts moved
6272 to filename-seen-cache.h/filename-seen-cache.c.
6273 (output_source_filename, sources_info)
6274 (maybe_add_partial_symtab_filename)
6275 (make_source_files_completion_list): Adjust to use
6276 filename_seen_cache.
6277
6278 2017-07-17 Pedro Alves <palves@redhat.com>
6279
6280 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
6281 fields.
6282 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
6283 dwarf2_debug_sections*)): New.
6284 (dwarf2_per_objfile::dwarf2_per_objfile(const
6285 dwarf2_per_objfile&)): Declare as deleted.
6286 (dwarf2_per_objfile::operator=): Declare as deleted.
6287 (dwarf2_per_objfile::dwarf2_per_objfile)
6288 (dwarf2_per_objfile::~dwarf2_per_objfile)
6289 (dwarf2_per_objfile::free_cached_comp_units): New.
6290 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
6291 ctor. Call dwarf2_per_objfile's ctor manually.
6292 (dwarf2_locate_sections): Deleted/refactored as ...
6293 (dwarf2_per_objfile::locate_sections): ... this new method.
6294 (free_cached_comp_units): Defer to
6295 dwarf2_per_objfile::free_cached_comp_units.
6296 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
6297
6298 2017-07-14 Tom Tromey <tom@tromey.com>
6299
6300 PR rust/21764:
6301 * rust-exp.y (convert_ast_to_expression): Add "want_type"
6302 parameter.
6303 <UNOP_SIZEOF>: Split into separate case.
6304 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
6305
6306 2017-07-14 Tom Tromey <tom@tromey.com>
6307
6308 PR rust/21763:
6309 * symtab.c (symbol_matches_domain): Add language_rust to special
6310 case.
6311 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
6312 treat LOC_TYPEDEF symbols as variables.
6313
6314 2017-07-14 Pedro Alves <palves@redhat.com>
6315
6316 * symtab.c (make_file_symbol_completion_list_1): Iterate over
6317 symtabs matching all symtabs with SRCFILE as file name instead of
6318 only considering the first hit, with lookup_symtab.
6319
6320 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6321
6322 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
6323 operator_name parameters.
6324 (gen_expr): Update function call.
6325
6326 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6327
6328 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
6329 parameter.
6330 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
6331 Likewise.
6332 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
6333 parameter, use agent_expr::gdbarch instead, update function
6334 calls.
6335 (locexpr_tracepoint_var_ref): Likewise.
6336 (loclist_tracepoint_var_ref): Likewise.
6337 * ax-gdb.c (gen_trace_static_fields): Likewise.
6338 (gen_traced_pop): Likewise.
6339 (gen_frame_args_address): Likewise.
6340 (gen_frame_locals_address): Likewise.
6341 (gen_var_ref): Likewise.
6342 (gen_struct_ref_recursive): Likewise.
6343 (gen_static_field): Likewise.
6344 (gen_maybe_namespace_elt): Likewise.
6345 (gen_expr): Likewise.
6346 (gen_trace_for_var): Likewise.
6347 (gen_trace_for_expr): Likewise.
6348 (gen_trace_for_return_address): Likewise.
6349
6350 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6351
6352 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
6353 parameter.
6354 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
6355
6356 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6357
6358 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
6359 from ax, update calls.
6360 (gen_usual_arithmetic): Likewise.
6361 (gen_integral_promotions): Likewise.
6362 (gen_bitfield_ref): Likewise.
6363 (gen_primitive_field): Likewise.
6364 (gen_struct_ref_recursive): Likewise.
6365 (gen_struct_ref): Likewise.
6366 (gen_maybe_namespace_elt): Likewise.
6367 (gen_struct_elt_for_reference): Likewise.
6368 (gen_namespace_elt): Likewise.
6369 (gen_aggregate_elt_ref): Likewise.
6370 (gen_expr): Get gdbarch from ax, update calls.
6371 (gen_expr_binop_rest): Likewise.
6372
6373 2017-07-13 Pedro Alves <palves@redhat.com>
6374
6375 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
6376 as default tdesc.
6377 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
6378 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
6379 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
6380 tdesc_amd64_linux as default tdesc. Get final tdesc from the
6381 tdep.
6382 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
6383 Get final tdesc from the tdep.
6384 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
6385 default tdesc.
6386 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6387 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6388 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
6389 Use it as default tdesc.
6390 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
6391 down to amd_init_abi. No longer handle fallback tdesc here.
6392 * amd64-tdep.h (tdesc_x32): Declare.
6393 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
6394 parameter.
6395 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
6396 as default tdesc.
6397
6398 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6399
6400 * s390-linux-tdep.c (s390_process_record): Add support for
6401 instructions new in arch12.
6402
6403 2017-07-11 John Baldwin <jhb@FreeBSD.org>
6404
6405 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
6406 PT_GETFSBASE and PT_GETGSBASE.
6407 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
6408 PT_SETGSBASE.
6409
6410 2017-07-11 John Baldwin <jhb@FreeBSD.org>
6411
6412 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
6413 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
6414 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
6415 those rules.
6416 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
6417 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
6418 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
6419 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
6420 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
6421 * features/i386/amd64.xml: Add 64bit-segments.xml.
6422 * features/i386/amd64-avx-avx512.c: Regenerated.
6423 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
6424 * features/i386/amd64-avx-mpx.c: Regenerated.
6425 * features/i386/amd64-avx.c: Regenerated.
6426 * features/i386/amd64-mpx.c: Regenerated.
6427 * features/i386/amd64.c: Regenerated.
6428 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
6429 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6430 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
6431 * regformats/i386/amd64-avx.dat: Regenerated.
6432 * regformats/i386/amd64-mpx.dat: Regenerated.
6433 * regformats/i386/amd64.dat: Regenerated.
6434
6435 2017-07-10 Yao Qi <yao.qi@linaro.org>
6436
6437 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6438 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6439
6440 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
6441
6442 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
6443 unsetenv.
6444 * gnulib/aclocal.m4: Regenerate.
6445 * gnulib/config.in: Regenerate.
6446 * gnulib/configure: Regenerate.
6447 * gnulib/import/Makefile.am: Regenerate.
6448 * gnulib/import/Makefile.in: Regenerate.
6449 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6450 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6451 * gnulib/import/m4/environ.m4: New file.
6452 * gnulib/import/m4/setenv.m4: New file.
6453 * gnulib/import/setenv.c: New file.
6454 * gnulib/import/unsetenv.c: New file.
6455
6456 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
6457
6458 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
6459 address when op is DW_OP_addr.
6460
6461 2017-07-09 Tom Tromey <tom@tromey.com>
6462
6463 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
6464 check and apply to outer type.
6465
6466 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6467
6468 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
6469 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
6470 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
6471 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
6472
6473 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6474
6475 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
6476
6477 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6478
6479 * corelow.c (get_core_siginfo): Remove.
6480 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
6481 instead of get_core_siginfo.
6482 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
6483 * gdbarch.h: Re-generate.
6484 * gdbarch.c: Re-generate.
6485 * linux-tdep.c (linux_core_xfer_siginfo): New.
6486 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
6487
6488 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6489
6490 * corelow.c (thread_section_name): Move to ...
6491 * gdbcore.h (thread_section_name): ... here.
6492
6493 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6494
6495 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
6496 (struct siginfo32): New.
6497 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
6498 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
6499 via ptrace(PT_LWPINFO).
6500
6501 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6502
6503 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
6504 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
6505 (fbsd_get_siginfo_type): New.
6506 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
6507 (_initialize_fbsd_tdep): New.
6508
6509 2017-07-06 David Blaikie <dblaikie@gmail.com>
6510
6511 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
6512 a singular dwo_unit*) to support multiple CUs in the same way that
6513 multiple TUs are supported.
6514 (create_cus_hash_table): Replace create_dwo_cu with a function for
6515 parsing multiple CUs from a DWO file.
6516 (open_and_init_dwo_file): Use create_cus_hash_table rather than
6517 create_dwo_cu.
6518 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
6519 htab_find, rather than comparing the signature to a singleton CU in
6520 the dwo_file.
6521
6522 2017-07-06 Pedro Alves <palves@redhat.com>
6523
6524 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
6525
6526 2017-07-04 Pedro Alves <palves@redhat.com>
6527
6528 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
6529 * gdbtypes.h (TYPE_STATIC): Delete.
6530 (struct fn_field) <is_public, is_abstract, is_static, is_final,
6531 is_synchronized, is_native>: Delete.
6532 <dummy>: Bump.
6533 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
6534 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
6535 (TYPE_FN_FIELD_ABSTRACT): Delete.
6536
6537 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
6538
6539 * buffer.h (buffer_finish): Fix spelling mistakes.
6540
6541 2017-07-01 Eli Zaretskii <eliz@gnu.org>
6542
6543 * .dir-locals.el: Automatically switch to C-style comments in
6544 versions of Emacs that support the feature.
6545
6546 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
6547 Pedro Alves <palves@redhat.com>
6548
6549 PR cli/21688
6550 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
6551 (process_next_line): New variable 'inline_cmd'.
6552 Adjust 'if' clauses for "python", "compile" and "guile" to use
6553 'command_name_equals' and check for '!inline_cmd'.
6554
6555 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
6556
6557 PR cli/21688
6558 * cli/cli-script.c (command_name_equals_not_inline): New function.
6559 (process_next_line): Adjust 'if' clauses for "python", "compile"
6560 and "guile" to use command_name_equals_not_inline.
6561
6562 2017-06-29 Pedro Alves <palves@redhat.com>
6563
6564 * completer.c (expression_completer): Call
6565 linespec_location_completer instead of location_completer.
6566
6567 2017-06-29 Pedro Alves <palves@redhat.com>
6568
6569 * completer.c (expression_completer): Remove code that recomputes
6570 'text' from 'word'.
6571
6572 2017-06-29 Yao Qi <yao.qi@linaro.org>
6573
6574 * regformats/regdat.sh: Generate code with
6575 "ifndef IN_PROCESS_AGENT".
6576
6577 2017-06-28 Pedro Alves <palves@redhat.com>
6578
6579 * command.h: Include "common/scoped_restore.h".
6580
6581 2017-06-28 Yao Qi <yao.qi@linaro.org>
6582
6583 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
6584 instead of obstack_grow.
6585
6586 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
6587
6588 PR gdb/21337
6589 * symfile.c (reread_symbols): Call objfiles_changed just before
6590 read_symbols.
6591
6592 2017-06-27 Pedro Alves <palves@redhat.com>
6593
6594 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
6595 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
6596 (completion_list_add_symbol, completion_list_add_msymbol):
6597 ... these new functions.
6598 (add_symtab_completions)
6599 (default_make_symbol_completion_list_break_on_1): Adjust.
6600
6601 2017-06-27 Pedro Alves <palves@redhat.com>
6602
6603 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
6604 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
6605 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
6606 dtor.
6607 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
6608 'storage_obstack' field an auto_obstack. In-class initialize all
6609 non-bitfield fields. Make minsyms_read bool.
6610 * symfile.c (read_symbols): Adjust.
6611
6612 2017-06-27 Alan Hayward <alan.hayward@arm.com>
6613
6614 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
6615 (gdbsim_store_register): Likewise.
6616
6617 2017-06-27 Pedro Alves <palves@redhat.com>
6618
6619 * c-exp.y (name_obstack): Now an auto_obstack.
6620 (yylex): Use auto_obstack::clear.
6621 (c_parse): Use auto_obstack::clear instead of reinitializing and
6622 freeing the obstack.
6623 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
6624 * d-exp.y (name_obstack): Now an auto_obstack.
6625 (yylex): Use auto_obstack::clear.
6626 (d_parse): Use auto_obstack::clear instead of reinitializing and
6627 freeing the obstack.
6628 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
6629 auto_obstack.
6630 * dwarf2read.c (create_addrmap_from_index)
6631 (dwarf2_build_psymtabs_hard)
6632 (update_enumeration_type_from_children): Likewise.
6633 * gdb_obstack.h (auto_obstack): New type.
6634 * go-exp.y (name_obstack): Now an auto_obstack.
6635 (build_packaged_name): Use auto_obstack::clear.
6636 (go_parse): Use auto_obstack::clear instead of reinitializing and
6637 freeing the obstack.
6638 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
6639 auto_obstack.
6640 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
6641 * rust-exp.y (work_obstack): Now an auto_obstack.
6642 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
6643 reinitializing and freeing the obstack.
6644 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
6645 (host_char_to_target): Use auto_obstack.
6646 * utils.h (make_cleanup_obstack_free): Delete declaration.
6647 * valprint.c (generic_emit_char, generic_printstr): Use
6648 auto_obstack.
6649
6650 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
6651
6652 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
6653 thread.
6654 (darwin_init_thread_list): Don't update dummy thread.
6655 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
6656
6657 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
6658
6659 * record-full.c (netorder16): Remove.
6660
6661 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
6662
6663 * common/diagnostics.h: Define macros for GCC.
6664 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
6665 * common/vec.h: Include diagnostics.h.
6666 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
6667 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
6668 warning.
6669
6670 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
6671
6672 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
6673 New macro.
6674 * ada-lex.l: Ignore deprecated register warnings.
6675
6676 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
6677
6678 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
6679 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
6680
6681 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
6682
6683 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
6684 its own line.
6685
6686 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
6687
6688 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
6689
6690 2017-06-23 Alan Hayward <alan.hayward@arm.com>
6691
6692 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
6693 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
6694 (xtensa_register_read_masked): Likewise.
6695
6696 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
6697
6698 * common/environ.c (gdb_environ::unset): Update comment.
6699
6700 2017-06-22 Alan Hayward <alan.hayward@arm.com>
6701
6702 * python/py-unwind.c (pyuw_sniffer): Allocate space for
6703 registers.
6704
6705 2017-06-22 Alan Hayward <alan.hayward@arm.com>
6706
6707 * record-full.c (record_full_exec_insn): Use byte_vector.
6708
6709 2017-06-22 Yao Qi <yao.qi@linaro.org>
6710
6711 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
6712 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6713
6714 2017-06-22 Alan Hayward <alan.hayward@arm.com>
6715
6716 * remote.c (cached_reg): Move from here...
6717 * regcache.h (cached_reg): ...to here.
6718 * python/py-unwind.c (struct reg_info): Remove.
6719 (cached_frame_info): Use cached_reg_t.
6720 (pyuw_prev_register): Likewise.
6721 (pyuw_sniffer): Use cached_reg_t and allocate registers.
6722 (pyuw_dealloc_cache): Free all registers.
6723
6724 2017-06-22 Pedro Alves <palves@redhat.com>
6725 Simon Marchi <simon.marchi@ericsson.com>
6726
6727 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
6728 warning.
6729 * common/diagnostics.h: New file.
6730
6731 2017-06-22 Pedro Alves <palves@redhat.com>
6732
6733 * common/agent.h: Add include guards.
6734
6735 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
6736
6737 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
6738 talk about addressable units instead of bytes.
6739
6740 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6741
6742 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
6743 of '::const_iterator'.
6744
6745 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6746
6747 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6748 'unittests/environ-selftests.c'.
6749 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
6750 * charset.c (find_charset_names): Declare object 'iconv_env'.
6751 Update code to use 'iconv_env' object. Remove call to
6752 'free_environ'.
6753 * common/environ.c: Include <utility>.
6754 (make_environ): Delete function.
6755 (free_environ): Delete function.
6756 (gdb_environ::clear): New function.
6757 (gdb_environ::operator=): New function.
6758 (gdb_environ::get): Likewise.
6759 (environ_vector): Delete function.
6760 (set_in_environ): Delete function.
6761 (gdb_environ::set): New function.
6762 (unset_in_environ): Delete function.
6763 (gdb_environ::unset): New function.
6764 (gdb_environ::envp): Likewise.
6765 * common/environ.h: Include <vector>.
6766 (struct gdb_environ): Delete; transform into...
6767 (class gdb_environ): ... this class.
6768 (free_environ): Delete prototype.
6769 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
6770 environ_vector): Likewise.
6771 * infcmd.c (run_command_1): Update code to call
6772 'envp' from 'gdb_environ' class.
6773 (environment_info): Update code to call methods from 'gdb_environ'
6774 class.
6775 (unset_environment_command): Likewise.
6776 (path_info): Likewise.
6777 (path_command): Likewise.
6778 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
6779 (inferior::inferior): Initialize 'environment' using the host's
6780 information.
6781 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
6782 Include "environ.h".
6783 (class inferior) <environment>: Change type from 'struct
6784 gdb_environ' to 'gdb_environ'.
6785 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6786 methods from 'gdb_environ' class.
6787 * solib.c (solib_find_1): Likewise
6788 * unittests/environ-selftests.c: New file.
6789
6790 2017-06-20 Yao Qi <yao.qi@linaro.org>
6791
6792 * features/i386/i386-linux.xml: Exchange the order of including
6793 32bit-linux.xml and 32bit-sse.xml.
6794 * features/i386/i386-linux.c: Regenerated.
6795
6796 2017-06-20 Yao Qi <yao.qi@linaro.org>
6797
6798 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6799 Delete copy ctor and assignment operator.
6800 (tdesc_type): Likewise.
6801 (tdesc_feature): Likewise.
6802 (tdesc_free_reg): Remove.
6803 (tdesc_create_reg): Use new.
6804 (tdesc_free_type): Remove.
6805 (tdesc_create_vector): Use new.
6806 (tdesc_create_union): Likewise.
6807 (tdesc_create_flags): Likewise.
6808 (tdesc_create_enum): Likewise.
6809 (tdesc_free_feature): Delete.
6810 (free_target_description): Use delete.
6811
6812 2017-06-19 John Baldwin <jhb@FreeBSD.org>
6813
6814 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6815 registers.
6816
6817 2017-06-19 Pedro Alves <palves@redhat.com>
6818
6819 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6820 after gdb::unlinker.
6821
6822 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
6823
6824 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6825 gdb_environ to access an environment variable.
6826
6827 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
6828
6829 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6830 gdb_byte*.
6831
6832 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6833
6834 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6835
6836 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6837
6838 * configure: Re-generate.
6839 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6840
6841 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6842
6843 * configure: Re-generate.
6844 * warning.m4: Pass -Werror to compiler when checking for
6845 supported warning flags.
6846
6847 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6848
6849 * Makefile.in (COMPILE.pre): Add "-x c++".
6850
6851 2017-06-16 Alan Hayward <alan.hayward@arm.com>
6852 Pedro Alves <palves@redhat.com>
6853 Yao Qi <yao.qi@linaro.org>
6854
6855 * defs.h (RequireLongest): New.
6856 (extract_integer): Declare function template.
6857 (extract_signed_integer): Remove the declaration, but define it
6858 static inline.
6859 (extract_unsigned_integer): Likewise.
6860 (store_integer): Declare function template.
6861 (store_signed_integer): Remove the declaration, but define it
6862 static inline.
6863 (store_unsigned_integer): Likewise.
6864 * findvar.c (extract_integer): New function template.
6865 (extract_signed_integer): Remove.
6866 (extract_unsigned_integer): Remove.
6867 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6868 instantiations.
6869 (store_integer): New function template.
6870 (store_signed_integer): Remove.
6871 (store_unsigned_integer): Remove.
6872 (store_integer): Explicit instantiations.
6873 * regcache.c (regcache_raw_read_signed): Update.
6874 (regcache::raw_read): New function.
6875 (regcache::raw_read_signed): Remove.
6876 (regcache::raw_read_unsigned): Remove.
6877 (regcache_raw_read_unsigned): Update.
6878 (regcache_raw_write_unsigned): Update.
6879 (regcache::raw_write_signed): Remove.
6880 (regcache::raw_write): New function.
6881 (regcache_cooked_read_signed): Update.
6882 (regcache::raw_write_unsigned): Remove.
6883 (regcache::cooked_read_signed): Remove.
6884 (regcache_cooked_read_unsigned): Update.
6885 (regcache::cooked_read_unsigned): Remove.
6886 (regcache_cooked_write_signed): Update.
6887 (regcache_cooked_write_unsigned): Update.
6888 * regcache.h (regcache) <raw_read_signed>: Remove.
6889 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6890 <raw_read, raw_write>: New.
6891 <cooked_read_signed, cooked_write_signed>: Remove.
6892 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6893 <cooked_read, cooked_write>: New.
6894 * sh64-tdep.c (sh64_pseudo_register_read): Update.
6895 (sh64_pseudo_register_write): Update.
6896
6897 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
6898
6899 * arc-tdep.c (arc_disassembler_options): New variable.
6900 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6901 of default_print_insn.
6902 (arc_delayed_print_insn): Set info->section when needed,
6903 use default_print_insn to retrieve a disassembler.
6904
6905 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
6906
6907 PR gdb/21574
6908 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6909 to mention $SHELL and startup-with-shell.
6910
6911 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
6912
6913 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6914
6915 2017-06-14 Yao Qi <yao.qi@linaro.org>
6916
6917 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6918 default_print_insn instead of print_insn_aarch64.
6919 * arm-tdep.c (gdb_print_insn_arm): Call
6920 default_print_insn instead of print_insn_big_arm
6921 and print_insn_little_arm.
6922 * i386-tdep.c (i386_print_insn): Call default_print_insn
6923 instead of print_insn_i386.
6924 * ia64-tdep.c (ia64_print_insn): Call
6925 default_print_insn instead of print_insn_ia64.
6926 * mips-tdep.c (gdb_print_insn_mips): Call
6927 default_print_insn instead of print_insn_big_mips
6928 and print_insn_little_mips.
6929 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6930 instead of print_insn_spu.
6931
6932 2017-06-14 Pedro Alves <palves@redhat.com>
6933
6934 * ada-lang.c: Include "common/byte-vector.h".
6935 (ada_value_primitive_packed_val): Use gdb::byte_vector.
6936 * charset.c (wchar_iterator::iterate): Resize the vector instead
6937 of reserving it.
6938 * common/byte-vector.h: Include "common/def-vector.h".
6939 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6940 * cli/cli-dump.c: Include "common/byte-vector.h".
6941 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6942 * common/byte-vector.h: New file.
6943 * common/def-vector.h: New file.
6944 * common/default-init-alloc.h: New file.
6945 * dwarf2loc.c: Include "common/byte-vector.h".
6946 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6947 instead of reserving it.
6948 * dwarf2read.c: Include "common/byte-vector.h".
6949 (data_buf::m_vec): Now a gdb::byte_vector.
6950 * gdb_regex.c: Include "common/def-vector.h".
6951 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6952 * mi/mi-main.c: Include "common/byte-vector.h".
6953 (mi_cmd_data_read_memory): Use gdb::byte_vector.
6954 * printcmd.c: Include "common/byte-vector.h".
6955 (print_scalar_formatted): Use gdb::byte_vector.
6956 * valprint.c: Include "common/byte-vector.h".
6957 (maybe_negate_by_bytes, print_decimal_chars): Use
6958 gdb::byte_vector.
6959
6960 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6961
6962 * darwin-nat.c: Include "nat/fork-inferior.h".
6963
6964 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6965
6966 * configure.nat: Factor out Darwin bits that are not
6967 architecture-specific. Add fork-inferior.o.
6968
6969 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6970
6971 * configure.nat: Factor out AIX bits that are not
6972 architecture-specific. Add fork-inferior.o.
6973
6974 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6975
6976 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
6977 (read_pieced_value, write_pieced_value): ...here. Reduce to
6978 wrappers that just call rw_pieced_value.
6979
6980 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6981
6982 * dwarf2loc.c (write_pieced_value): When writing the data for a
6983 memory piece, use write_memory_with_notification instead of
6984 write_memory.
6985
6986 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6987
6988 * valops.c (read_value_memory): Change embedded_offset to
6989 represent a bit offset instead of a byte offset.
6990 * value.h (read_value_memory): Adjust comment.
6991
6992 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6993
6994 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6995 dest_offset_bits and source_offset_bits.
6996 (write_pieced_value): Likewise.
6997
6998 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6999
7000 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7001 given by DW_OP_bit_piece.
7002 (write_pieced_value): Likewise.
7003
7004 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7005
7006 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7007 some other preparations to the places where sufficient information
7008 is available.
7009 (write_pieced_value): Likewise.
7010
7011 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7012
7013 * dwarf2loc.c (bits_to_bytes): New function.
7014 (read_pieced_value): Fix offset calculations for register pieces
7015 on big-endian targets.
7016 (write_pieced_value): Likewise.
7017
7018 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7019
7020 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7021 (write_pieced_value): Likewise.
7022
7023 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7024
7025 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7026 transfer the source value's least significant bits, instead of its
7027 lowest-addressed ones. Rename type_len to max_offset.
7028 (read_pieced_value): Mirror above changes to write_pieced_value as
7029 applicable.
7030
7031 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7032
7033 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7034 truncate full bytes from dest_offset_bits before using it as an
7035 offset into the buffer.
7036
7037 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7038
7039 * dwarf2loc.c (write_pieced_value): Include transfer size in
7040 byte-wise check.
7041
7042 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7043
7044 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7045 calculation of this_size.
7046
7047 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7048
7049 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7050 when targeting a bit-field.
7051 (write_pieced_value): Likewise.
7052
7053 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7054
7055 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7056 (allocate_piece_closure): Drop addr_size parameter.
7057 (dwarf2_evaluate_loc_desc_full): Adjust call to
7058 allocate_piece_closure.
7059
7060 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7061
7062 PR gdb/21226
7063 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7064 the LSB end, independent of endianness.
7065
7066 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7067
7068 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7069 size capping.
7070
7071 2017-06-13 Yao Qi <yao.qi@linaro.org>
7072
7073 * mips-linux-nat.c: Move include features/mips*-linux.c to
7074 mips-linux-tdep.c.
7075 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7076 to mips-linux-tdep.c.
7077 * mips-linux-tdep.c: Include features/mips*-linux.c
7078 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7079 functions.
7080 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7081 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7082 (tdesc_mips64_dsp_linux): Declare.
7083
7084 2017-06-12 Tom Tromey <tom@tromey.com>
7085
7086 * valprint.h (val_print_type_code_int): Remove.
7087 * valprint.c (generic_val_print_int): Always call
7088 val_print_scalar_formatted.
7089 (val_print_type_code_int): Remove.
7090 * printcmd.c (print_scalar_formatted): Handle options->format==0.
7091 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7092 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7093 * ada-valprint.c (ada_val_print_num): Use
7094 val_print_scalar_formatted.
7095
7096 2017-06-12 Tom Tromey <tom@tromey.com>
7097
7098 * printcmd.c (print_scalar_formatted): Unify the two switches.
7099 Don't convert scalars to LONGEST.
7100
7101 2017-06-12 Tom Tromey <tom@tromey.com>
7102
7103 PR exp/16225:
7104 * valprint.h (print_decimal_chars): Update.
7105 * valprint.c (maybe_negate_by_bytes): New function.
7106 (print_decimal_chars): Add "is_signed" argument.
7107 * printcmd.c (print_scalar_formatted): Update.
7108
7109 2017-06-12 Tom Tromey <tom@tromey.com>
7110
7111 PR exp/16225:
7112 * valprint.h (print_binary_chars, print_hex_chars): Update.
7113 * valprint.c (val_print_type_code_int): Update.
7114 (print_binary_chars): Add "zero_pad" argument.
7115 (emit_octal_digit): New function.
7116 (print_octal_chars): Don't zero-pad.
7117 (print_decimal_chars): Likewise.
7118 (print_hex_chars): Add "zero_pad" argument.
7119 * sh64-tdep.c (sh64_do_fp_register): Update.
7120 * regcache.c (regcache::dump): Update.
7121 * printcmd.c (print_scalar_formatted): Update.
7122 * infcmd.c (default_print_one_register_info): Update.
7123
7124 2017-06-12 Pedro Alves <palves@redhat.com>
7125 Alan Hayward <alan.hayward@arm.com>
7126
7127 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7128 (mips_eabi_push_dummy_call): Rename local 'regsize' to
7129 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
7130 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
7131 Assert that abi_regsize bytes fit in 'ref_valbuf'.
7132
7133 2017-06-12 Pedro Alves <palves@redhat.com>
7134
7135 * dwarf2read.c (mapped_symtab::data): Now a vector of
7136 symtab_index_entry instead of vector of
7137 std::unique_ptr<symtab_index_entry>. All users adjusted to check
7138 whether an element's name is NULL instead of checking whether the
7139 element itself is NULL.
7140 (find_slot): Change return type. Adjust.
7141 (hash_expand, , add_index_entry, uniquify_cu_indices)
7142 (write_hash_table): Adjust.
7143
7144 2017-06-12 Pedro Alves <palves@redhat.com>
7145
7146 * dwarf2read.c (recursively_count_psymbols): New function.
7147 (write_psymtabs_to_index): Call it to compute number of psyms and
7148 pass estimate size of psyms_seen to unordered_set's ctor.
7149
7150 2017-06-12 Pedro Alves <palves@redhat.com>
7151
7152 * dwarf2read.c (write_hash_table): Check if key already exists
7153 before emplacing.
7154
7155 2017-06-12 Pedro Alves <palves@redhat.com>
7156
7157 * dwarf2read.c (data_buf::append_space): Rename to...
7158 (data_buf::grow): ... this, and make private. Adjust all callers.
7159 (data_buf::append_uint): New method.
7160 (add_address_entry, write_one_signatured_type)
7161 (write_psymtabs_to_index): Use it.
7162
7163 2017-06-12 Pedro Alves <palves@redhat.com>
7164
7165 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7166 (file_write (FILE *, const std::vector<Elem>&)): Delete.
7167 (data_buf::file_write): Call ::fwrite directly.
7168
7169 2017-06-12 Pedro Alves <palves@redhat.com>
7170
7171 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7172 std::vector::erase.
7173
7174 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7175
7176 Code cleanup: C++ify .gdb_index producer.
7177 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7178 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7179 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7180 (create_strtab, add_string): Remove.
7181 (file_write, data_buf): New.
7182 (struct symtab_index_entry): Use std::vector for cu_indices.
7183 (struct mapped_symtab): Use std::vector for data.
7184 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7185 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7186 Remove.
7187 (find_slot): Change return type. Update it to the new data structures.
7188 (hash_expand, add_index_entry): Update it to the new data structures.
7189 (offset_type_compare): Remove.
7190 (uniquify_cu_indices): Update it to the new data structures.
7191 (c_str_view, c_str_view_hasher, vector_hasher): New.
7192 (add_indices_to_cpool): Remove.
7193 (write_hash_table): Update it to the new data structures.
7194 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7195 (eq_psymtab_cu_index): Remove.
7196 (psym_index_map): New typedef.
7197 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7198 reference and std::unordered_map for cu_index_htab.
7199 (add_address_entry, add_address_entry_worker, write_address_map)
7200 (write_psymbols): Update it to the new data structures.
7201 (write_obstack): Remove.
7202 (struct signatured_type_index_data): Change types_list to a data_buf
7203 reference and psyms_seen to a std::unordered_set reference.
7204 (write_one_signatured_type, recursively_write_psymbols)
7205 (write_psymtabs_to_index): Update it to the new data structures.
7206
7207 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
7208
7209 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7210 separate-debug-file commands.
7211 * symfile.h (separate_debug_file_debug): New global.
7212 * symfile.c (separate_debug_file_debug): New global.
7213 (separate_debug_file_exists, find_separate_debug_file): Add
7214 debug output.
7215 (_initialize_symfile): Add "set debug separate-debug-file"
7216 command.
7217 * build-id.c (build_id_to_debug_bfd,
7218 find_separate_debug_file_by_buildid): Add debug output.
7219
7220 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
7221
7222 * gdbarch.sh (displaced_step_free_closure): Remove.
7223 * gdbarch.h, gdbarch.c: Re-generate.
7224 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
7225 displaced_step_free_closure.
7226 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
7227 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
7228 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7229 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7230 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7231 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7232 * arch-utils.h (simple_displaced_step_free_closure): Remove.
7233 * arch-utils.c (simple_displaced_step_free_closure): Remove.
7234 * infrun.c (displaced_step_clear): Call xfree instead of
7235 gdbarch_displaced_step_free_closure.
7236
7237 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
7238
7239 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
7240 NULL".
7241
7242 2017-06-08 Alan Hayward <alan.hayward@arm.com>
7243
7244 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
7245 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
7246 (mn10300_push_dummy_call): Likewise.
7247
7248 2017-06-08 Alan Hayward <alan.hayward@arm.com>
7249
7250 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
7251
7252 2017-06-08 Alan Hayward <alan.hayward@arm.com>
7253
7254 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
7255
7256 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7257
7258 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
7259 able to start inferiors using a shell.
7260 (New remote packets): Announce new packet "QStartupWithShell".
7261 * remote.c: Add PACKET_QStartupWithShell.
7262 (extended_remote_create_inferior): Handle new
7263 PACKET_QStartupWithShell.
7264 (remote_protocol_features) <QStartupWithShell>: New entry for
7265 PACKET_QStartupWithShell.
7266 (_initialize_remote): Call "add_packet_config_cmd" for
7267 QStartupShell.
7268
7269 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7270 Pedro Alves <palves@redhat.com>
7271
7272 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
7273 and "nat/fork-inferior.h".
7274 * common/common-inferior.h: New file, with contents from
7275 "gdb/inferior.h".
7276 * commom/common-utils.c: Include "common-utils.h".
7277 (stringify_argv): New function.
7278 * common/common-utils.h (stringify_argv): New prototype.
7279 * configure.nat: Add "fork-inferior.o" as a dependency for
7280 "*linux*", "fbsd*" and "nbsd*" hosts.
7281 * corefile.c (get_exec_file): Update comment.
7282 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
7283 instead of "startup_inferior".
7284 (darwin_create_inferior): Call "add_thread_silent" after
7285 "fork_inferior".
7286 * fork-child.c: Cleanup unnecessary includes.
7287 (SHELL_FILE): Move to "common/common-fork-child.c".
7288 (environ): Likewise.
7289 (exec_wrapper): Initialize.
7290 (get_exec_wrapper): New function.
7291 (breakup_args): Move to "common/common-fork-child.c"; rename to
7292 "breakup_args_for_exec".
7293 (escape_bang_in_quoted_argument): Move to
7294 "common/common-fork-child.c".
7295 (saved_ui): New variable.
7296 (prefork_hook): New function.
7297 (postfork_hook): Likewise.
7298 (postfork_child_hook): Likewise.
7299 (gdb_startup_inferior): Likewise.
7300 (fork_inferior): Move to "common/common-fork-child.c". Update
7301 function to support gdbserver.
7302 (startup_inferior): Likewise.
7303 * gdbcore.h (get_exec_file): Remove declaration.
7304 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
7305 instead of "startup_inferior". Call "add_thread_silent" after
7306 "fork_inferior".
7307 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
7308 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
7309 instead of "startup_inferior". Call "add_thread_silent" after
7310 "fork_inferior".
7311 * inferior.h: Include "common-inferior.h".
7312 (trace_start_error): Move to "common/common-utils.h".
7313 (trace_start_error_with_name): Likewise.
7314 (fork_inferior): Move prototype to "nat/fork-inferior.h".
7315 (startup_inferior): Likewise.
7316 (gdb_startup_inferior): New prototype.
7317 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
7318 * nat/fork-inferior.h: New file.
7319 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
7320 instead of "startup_inferior". Call "add_thread_silent" after
7321 "fork_inferior".
7322 * target.h (target_terminal_init): Move prototype to
7323 "target/target.h".
7324 (target_terminal_inferior): Likewise.
7325 (target_terminal_ours): Likewise.
7326 * target/target.h (target_terminal_init): New prototype, moved
7327 from "target.h".
7328 (target_terminal_inferior): Likewise.
7329 (target_terminal_ours): Likewise.
7330 * utils.c (gdb_flush_out_err): New function.
7331
7332 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7333
7334 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
7335 * common/common-gdbthread.h: New file, with parts from
7336 "gdb/gdbthread.h".
7337 * gdbthread.h: Include "common-gdbthread.h".
7338 (switch_to_thread): Moved to "common/common-gdbthread.h".
7339
7340 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7341
7342 * Makefile.in (SFILES): Add "common/job-control.c".
7343 (HFILES_NO_SRCDIR): Add "common/job-control.h".
7344 (COMMON_OBS): Add "job-control.o".
7345 * common/job-control.c: New file, with contents from
7346 "gdb/inflow.c".
7347 * common/job-control.h: New file, with contents from "terminal.h".
7348 * fork-child.c: Include "job-control.h".
7349 * inflow.c: Include "job-control.h".
7350 (gdb_setpgid): Move to "common/common-inflow.c".
7351 (_initialize_inflow): Move setting of "job_control" to
7352 "handle_job_control".
7353 * terminal.h (job_control): Moved to "common/common-terminal.h".
7354 (gdb_setpgid): Likewise.
7355 * top.c: Include "job_control.h".
7356 * utils.c: Likewise.
7357 (job_control): Moved to "job-control.c".
7358
7359 2017-06-07 Pedro Alves <palves@redhat.com>
7360
7361 * Makefile.in (SFILES): Add gdb_regex.c.
7362 (COMMON_OBS): Add gdb_regex.o.
7363 * ada-lang.c (ada_add_standard_exceptions)
7364 (ada_add_exceptions_from_frame, name_matches_regex)
7365 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
7366 parameter type to compiled_regex. Adjust.
7367 (ada_exceptions_list): Use compiled_regex.
7368 * break-catch-throw.c (exception_catchpoint::pattern): Now a
7369 std::unique_ptr<compiled_regex>.
7370 (exception_catchpoint::~exception_catchpoint): Remove regfree
7371 call.
7372 (check_status_exception_catchpoint): Adjust to use compiled_regex.
7373 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
7374 * breakpoint.c (solib_catchpoint::compiled): Now a
7375 std::unique_ptr<compiled_regex>.
7376 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
7377 (check_status_catch_solib): Adjust to use compiled_regex.
7378 (add_solib_catchpoint): Adjust to use compiled_regex.
7379 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
7380 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
7381 compiled_regex reference. Adjust to use it.
7382 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
7383 declaration. Include "gdb_regex.h".
7384 (apropos_cmd): Change regex parameter to compiled_regex reference.
7385 * gdb_regex.c: New file.
7386 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
7387 declarations.
7388 (class compiled_regex): New.
7389 * linux-tdep.c: Include "common/gdb_optional.h".
7390 (struct mapping_regexes): New, factored out from
7391 mapping_is_anonymous_p, and adjusted to use compiled_regex.
7392 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
7393 gdb::optional and remove cleanups. Adjust to compiled_regex.
7394 * probe.c: Include "common/gdb_optional.h".
7395 (collect_probes): Use compiled_regex and gdb::optional and remove
7396 cleanups.
7397 * skip.c: Include "common/gdb_optional.h".
7398 (skiplist_entry::compiled_function_regexp): Now a
7399 gdb::optional<compiled_regex>.
7400 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
7401 (free_skiplist_entry): Remove regfree call.
7402 (compile_skip_regexp, skip_rfunction_p): Adjust to use
7403 compiled_regex and gdb::optional.
7404 * symtab.c: Include "common/gdb_optional.h".
7405 (search_symbols): Use compiled_regex and gdb::optional.
7406 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
7407 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
7408 to gdb_regex.c.
7409
7410 2017-06-07 Alan Hayward <alan.hayward@arm.com>
7411
7412 * regcache.c (regcache::save): Avoid buffer use.
7413 (regcache::dump): Likewise.
7414
7415 2017-06-07 Alan Hayward <alan.hayward@arm.com>
7416
7417 * sh-tdep.c (sh_pseudo_register_read): Remove
7418 MAX_REGISTER_SIZE.
7419 (sh_pseudo_register_write): Likewise.
7420 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
7421 (sh64_pseudo_register_write): Likewise
7422
7423 2017-06-07 Alan Hayward <alan.hayward@arm.com>
7424
7425 * aarch64-tdep.c (aarch64_store_return_value): Use
7426 V_REGISTER_SIZE.
7427 (aarch64_pseudo_read_value): Likewise.
7428 (aarch64_pseudo_write): Likewise.
7429
7430 2017-06-06 Yao Qi <yao.qi@linaro.org>
7431
7432 * regformats/regdef.h (set_register_cache): Remove the
7433 declaration.
7434
7435 2017-06-06 Alan Hayward <alan.hayward@arm.com>
7436
7437 * frame.c (frame_unwind_register_signed): Use
7438 frame_unwind_register_value.
7439
7440 2017-06-06 Pedro Alves <palves@redhat.com>
7441
7442 PR breakpoints/21553
7443 * breakpoint.c (create_breakpoints_sal_default)
7444 (init_breakpoint_sal, create_breakpoint_sal): Use
7445 gdb::unique_xmalloc_ptr for string parameters.
7446 (create_breakpoint): Constify 'extra_string' and 'cond_string'
7447 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
7448 (base_breakpoint_create_breakpoints_sal)
7449 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
7450 (strace_marker_create_breakpoints_sal)
7451 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
7452 string parameters.
7453 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
7454 gdb::unique_xmalloc_ptr for string parameters.
7455 (create_breakpoint): Constify 'extra_string' and 'cond_string'
7456 parameters.
7457
7458 2017-06-06 Alan Hayward <alan.hayward@arm.com>
7459
7460 * alpha-tdep.c (alpha_register_to_value): Use
7461 get_frame_register_value.
7462 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
7463
7464 2017-06-06 Alan Hayward <alan.hayward@arm.com>
7465
7466 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
7467 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
7468 (ia64_value_to_register): Likewise.
7469 (ia64_extract_return_value): Likewise.
7470 (ia64_store_return_value): Likewise.
7471 (ia64_push_dummy_call): Likewise.
7472
7473 2017-06-04 Joel Brobecker <brobecker@adacore.com>
7474
7475 GDB 8.0 released.
7476
7477 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
7478
7479 * x86-linux-nat.c (struct arch_lwp_info): Remove.
7480
7481 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
7482
7483 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
7484 parameter.
7485 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
7486
7487 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
7488
7489 * event-loop.c (poll_timers): Unallocate timer using delete
7490 instead of xfree.
7491
7492 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
7493
7494 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
7495 (struct breakpoint) <~breakpoint>: New.
7496 (struct watchpoint): Inherit from breakpoint.
7497 <~watchpoint>: New.
7498 <base>: Remove.
7499 (struct tracepoint): Inherit from breakpoint.
7500 <base>: Remove.
7501 * breakpoint.c (longjmp_breakpoint_ops): Remove.
7502 (struct longjmp_breakpoint): Inherit from breakpoint.
7503 <~longjmp_breakpoint>: New.
7504 <base>: Remove.
7505 (new_breakpoint_from_type): Remove casts.
7506 (watchpoint_in_thread_scope): Remove reference to base field.
7507 (watchpoint_del_at_next_stop): Likewise.
7508 (update_watchpoint): Likewise.
7509 (watchpoint_check): Likewise.
7510 (bpstat_check_watchpoint): Likewise.
7511 (set_longjmp_breakpoint): Likewise.
7512 (struct fork_catchpoint): Inherit from breakpoint.
7513 <base>: Remove.
7514 (struct solib_catchpoint): Inherit from breakpoint.
7515 <~solib_catchpoint>: New.
7516 <base>: Remove.
7517 (dtor_catch_solib): Change to ...
7518 (solib_catchpoint::~solib_catchpoint): ... this.
7519 (breakpoint_hit_catch_solib): Remove reference to base field.
7520 (add_solib_catchpoint): Likewise.
7521 (create_fork_vfork_event_catchpoint): Likewise.
7522 (struct exec_catchpoint): Inherit from breakpoint.
7523 <~exec_catchpoint>: New.
7524 <base>: Remove.
7525 (dtor_catch_exec): Change to ...
7526 (exec_catchpoint::~exec_catchpoint): ... this.
7527 (dtor_watchpoint): Change to ...
7528 (watchpoint::~watchpoint): ... this.
7529 (watch_command_1): Remove reference to base field.
7530 (catch_exec_command_1): Likewise.
7531 (base_breakpoint_dtor): Change to ...
7532 (breakpoint::~breakpoint): ... this.
7533 (base_breakpoint_ops): Remove dtor field value.
7534 (longjmp_bkpt_dtor): Change to ...
7535 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
7536 (strace_marker_create_breakpoints_sal): Remove reference to base
7537 field.
7538 (delete_breakpoint): Don't manually call breakpoint destructor.
7539 (create_tracepoint_from_upload): Remove reference to base field.
7540 (trace_pass_set_count): Likewise.
7541 (initialize_breakpoint_ops): Don't initialize
7542 momentary_breakpoint_ops, don't set dtors.
7543 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
7544 <~ada_catchpoint>: New.
7545 <base>: Remove.
7546 (create_excep_cond_exprs): Remove reference to base field.
7547 (dtor_exception): Change to ...
7548 (ada_catchpoint::~ada_catchpoint): ... this.
7549 (dtor_catch_exception): Remove.
7550 (dtor_catch_exception_unhandled): Remove.
7551 (dtor_catch_assert): Remove.
7552 (create_ada_exception_catchpoint): Remove reference to base
7553 field.
7554 (initialize_ada_catchpoint_ops): Don't set dtors.
7555 * break-catch-sig.c (struct signal_catchpoint): Inherit from
7556 breakpoint.
7557 <~signal_catchpoint>: New.
7558 <base>: Remove.
7559 (signal_catchpoint_dtor): Change to ...
7560 (signal_catchpoint::~signal_catchpoint): ... this.
7561 (create_signal_catchpoint): Remove reference to base field.
7562 (initialize_signal_catchpoint_ops): Don't set dtor.
7563 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
7564 from breakpoint.
7565 <~syscall_catchpoint>: New.
7566 <base>: Remove.
7567 (dtor_catch_syscall): Change to ...
7568 (syscall_catchpoint::~syscall_catchpoint): ... this.
7569 (create_syscall_event_catchpoint): Remove reference to base
7570 field.
7571 (initialize_syscall_catchpoint_ops): Don't set dtor.
7572 * break-catch-throw.c (struct exception_catchpoint): Inherit
7573 from breakpoint.
7574 <~exception_catchpoint>: New.
7575 <base>: Remove.
7576 (dtor_exception_catchpoint): Change to ...
7577 (exception_catchpoint::~exception_catchpoint): ... this.
7578 (handle_gnu_v3_exceptions): Remove reference to base field.
7579 (initialize_throw_catchpoint_ops): Don't set dtor.
7580 * ctf.c (ctf_get_traceframe_address): Remove reference to base
7581 field.
7582 * remote.c (remote_get_tracepoint_status): Likewise.
7583 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
7584 * tracefile.c (tracefile_fetch_registers): Likewise.
7585 * tracepoint.c (actions_command): Likewise.
7586 (validate_actionline): Likewise.
7587 (tfind_1): Likewise.
7588 (get_traceframe_location): Likewise.
7589 (find_matching_tracepoint_location): Likewise.
7590 (parse_tracepoint_status): Likewise.
7591 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
7592
7593 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
7594
7595 * breakpoint.c (struct longjmp_breakpoint): New struct.
7596 (is_tracepoint_type): Change return type to bool.
7597 (is_longjmp_type): New function.
7598 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
7599 (set_raw_breakpoint_without_location): Use
7600 new_breakpoint_from_type.
7601 (set_raw_breakpoint): Likewise.
7602
7603 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
7604
7605 * breakpoint.c (new_breakpoint_from_type): New function.
7606 (create_breakpoint_sal): Use new_breakpoint_from_type and
7607 unique_ptr.
7608 (create_breakpoint): Likewise.
7609
7610 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
7611
7612 * memattr.c (mem_info_command): Rename to ...
7613 (info_mem_command): ... this.
7614 (mem_enable_command): Rename to ...
7615 (enable_mem_command): ... this.
7616 (mem_disable_command): Rename to ...
7617 (disable_mem_command): ... this.
7618 (mem_delete_command): Rename to ...
7619 (delete_mem_command): ... this.
7620 (_initialize_mem): Adjust function names.
7621
7622 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
7623
7624 * btrace.c (handle_pt_insn_events): New.
7625 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
7626 STATUS. Split into this and ...
7627 (handle_pt_insn_event_flags): ... this.
7628
7629 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
7630
7631 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
7632 and struct pt_insn.resynced.
7633 * configure: Regenerated.
7634 * config.in: Regenerated.
7635
7636 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7637
7638 * btrace.c (ftrace_find_call_by_number): New function.
7639 (ftrace_new_function): Store objects, not pointers.
7640 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
7641 ftrace_new_gap, ftrace_update_function,
7642 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
7643 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
7644 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
7645 btrace_ends_with_single_insn, btrace_call_get): Account for
7646 btrace_thread_info::functions now storing objects.
7647 * btrace.h (struct btrace_thread_info): Add constructor.
7648 (struct btrace_thread_info) <functions>: Make std::vector.
7649 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
7650 Initialize with default values.
7651 * record-btrace.c (record_btrace_frame_sniffer): Account for
7652 btrace_thread_info::functions now storing objects.
7653
7654 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7655
7656 * btrace.c: Remove typedef bfun_s.
7657 (ftrace_new_gap): Directly add gaps to the list of gaps.
7658 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
7659 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
7660 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
7661 instead of gdb VEC.
7662
7663 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7664
7665 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
7666 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
7667 with btrace_thread_info::next_segment and
7668 btrace_thread_info::prev_segment.
7669 * btrace.h: Remove struct btrace_func_link.
7670 (struct btrace_function): Replace pair of function segment pointers
7671 with pair of indices.
7672 * python/py-record-btrace.c (btpy_call_prev_sibling,
7673 btpy_call_next_sibling): Replace references to
7674 btrace_thread_info::segment with btrace_thread_info::next_segment and
7675 btrace_thread_info::prev_segment.
7676 * record-btrace.c (record_btrace_frame_this_id): Use
7677 btrace_find_call_by_number.
7678
7679 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7680
7681 * btrace.c (ftrace_new_function, ftrace_fixup_level,
7682 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
7683 btrace_insn_next, btrace_insn_prev): Remove references to
7684 btrace_thread_info::flow.
7685 * btrace.h (struct btrace_function): Remove FLOW.
7686
7687 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7688
7689 * btrace.c (ftrace_find_call_by_number): New function.
7690 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
7691 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
7692 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
7693 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
7694 index.
7695 * btrace.h (struct btrace_function): Turn UP into an index.
7696 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
7697 as an index.
7698 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
7699 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
7700 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
7701
7702 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7703
7704 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7705 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7706 ftrace_update_function, ftrace_compute_global_level_offset,
7707 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
7708 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
7709 btrace_insn_end, btrace_is_empty): Remove references to
7710 btrace_thread_info::begin and btrace_thread_info::end.
7711 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
7712 (struct btrace_thread_info) <functions>: Adjust comment.
7713 * record-btrace.c (record_btrace_start_replaying): Remove reference to
7714 btrace_thread_info::begin.
7715
7716 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7717
7718 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7719 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7720 ftrace_update_function): Remove arguments that implicitly were always
7721 BTINFO->END.
7722 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
7723 Don't pass BTINFO->END.
7724
7725 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7726
7727 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
7728 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
7729 btrace_find_insn_by_number): Replace function segment pointer with
7730 index.
7731 (btrace_insn_cmp): Simplify.
7732 * btrace.h: (struct btrace_insn_iterator) Rename index to
7733 insn_index. Replace function segment pointer with index into function
7734 segment vector.
7735 * record-btrace.c (record_btrace_call_history): Replace function
7736 segment pointer use with index.
7737 (record_btrace_frame_sniffer): Retrieve function call segment through
7738 vector.
7739 (record_btrace_set_replay): Remove defunc't safety check.
7740
7741 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7742
7743 * btrace.c (btrace_ends_with_single_insn): New function.
7744 (btrace_call_get, btrace_call_number, btrace_call_begin,
7745 btrace_call_end, btrace_call_next, btrace_call_prev,
7746 btrace_find_call_by_number): Use index into call segment vector
7747 instead of pointer.
7748 (btrace_call_cmp): Simplify.
7749 * btrace.h (struct btrace_call_iterator): Replace function call segment
7750 pointer with index into vector.
7751 * record-btrace.c (record_btrace_call_history): Use index instead of
7752 pointer.
7753
7754 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7755
7756 * btrace.c (btrace_insn_begin, btrace_insn_end,
7757 btrace_find_insn_by_number): Add btinfo to iterator.
7758 * btrace.h (struct btrace_insn_iterator): Add btinfo.
7759
7760 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7761
7762 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
7763 and save pointers directly.
7764 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
7765 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
7766 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
7767 changed signature of functions.
7768 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
7769 (btrace_fetch): Remove code that adds btrace_function pointers to
7770 vector of btrace_functions.
7771 (btrace_clear): Simplify freeing vector of btrace_functions.
7772
7773 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7774
7775 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
7776 Replace VEC_* with std::vector functions.
7777 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
7778 (struct btrace_thread_info)<functions>: Change type to std::vector.
7779
7780 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
7781
7782 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
7783 "Removed targets and native configurations" up. Merge duplicate
7784 "New commands" sub-sections. Add "New options" sub-sections.
7785
7786 2017-05-26 Alan Hayward <alan.hayward@arm.com>
7787
7788 * defs.h (copy_integer_to_size): New declaration.
7789 * findvar.c (copy_integer_to_size): New function.
7790 (do_cint_test): New selftest function.
7791 (copy_integer_to_size_test): Likewise.
7792 (_initialize_findvar): Likewise.
7793 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7794 (mips_fbsd_collect_reg): Use raw_collect_integer.
7795 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7796 (mips64_fill_gregset): Use raw_collect_integer
7797 (mips64_fill_fpregset): Use raw_supply_integer.
7798 * regcache.c (regcache::raw_supply_integer): New function.
7799 (regcache::raw_collect_integer): Likewise.
7800 * regcache.h: (regcache::raw_supply_integer): New declaration.
7801 (regcache::raw_collect_integer): Likewise.
7802
7803 2017-05-24 Yao Qi <yao.qi@linaro.org>
7804
7805 * Makefile.in (SFILES): Add gdbarch-selftests.c.
7806 (COMMON_OBS): Add gdbarch-selftests.o.
7807 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7808 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7809 * gdbarch-selftests.c: New file.
7810 * regcache.h (regcache) <~regcache>: Mark it virtual if
7811 GDB_SELF_TEST.
7812 <raw_write>: Likewise.
7813
7814 2017-05-24 Yao Qi <yao.qi@linaro.org>
7815
7816 * regcache.c (current_regcache): Change it to
7817 regcache::current_regcache.
7818 (regcache_observer_target_changed): Update.
7819 (regcache_thread_ptid_changed): Make it a regcache static
7820 method.
7821 (regcache_thread_ptid_changed): Update.
7822 (class regcache_access): New.
7823 (current_regcache_test): Update.
7824 (_initialize_regcache): Update.
7825 * regcache.h: Include forward_list.
7826 (regcache): Declare regcache_thread_ptid_changed and declare
7827 registers_changed_ptid as friend.
7828
7829 2017-05-24 Yao Qi <yao.qi@linaro.org>
7830
7831 * i387-tdep.c (i387_register_to_value): Use register_size
7832 instead of TYPE_LENGTH.
7833 * m68k-tdep.c (m68k_register_to_value): Likewise.
7834
7835 2017-05-24 Yao Qi <yao.qi@linaro.org>
7836
7837 * i387-tdep.c (i387_convert_register_p): Return false if type
7838 code isn't TYPE_CODE_FLT.
7839
7840 2017-05-24 Yao Qi <yao.qi@linaro.org>
7841
7842 * alpha-tdep.c (alpha_convert_register_p): Return true if type
7843 length is 4.
7844 (alpha_register_to_value): Remove type length check.
7845 (alpha_value_to_register): Likewise.
7846
7847 2017-05-24 Yao Qi <yao.qi@linaro.org>
7848
7849 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7850 TYPE_CODE_FLT.
7851
7852 2017-05-24 Yao Qi <yao.qi@linaro.org>
7853
7854 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7855 TYPE_CODE_FLT or not.
7856
7857 2017-05-24 Yao Qi <yao.qi@linaro.org>
7858
7859 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7860 * avr-tdep.c (avr_gdbarch_init): Likewise.
7861 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7862 * cris-tdep.c (cris_gdbarch_init): Likewise.
7863 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7864 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7865 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7866 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7867 * mep-tdep.c (mep_gdbarch_init): Likewise.
7868 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7869 * mips-tdep.c (mips_gdbarch_init): Likewise.
7870 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7871 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7872 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7873 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7874 * v850-tdep.c (v850_gdbarch_init): Likewise.
7875
7876 2017-05-24 Yao Qi <yao.qi@linaro.org>
7877
7878 * selftest-arch.c (tests_with_arch): Call registers_changed
7879 and reinit_frame_cache.
7880 * selftest.c (run_self_tests): Likewise.
7881
7882 2017-05-24 Yao Qi <yao.qi@linaro.org>
7883
7884 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7885 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7886
7887 2017-05-24 Yao Qi <yao.qi@linaro.org>
7888
7889 * rl78-tdep.c (rl78_gdbarch_init): Don't call
7890 set_gdbarch_print_insn.
7891
7892 2017-05-24 Yao Qi <yao.qi@linaro.org>
7893
7894 * h8300-tdep.c (h8300_gdbarch_init): Don't call
7895 set_gdbarch_print_insn.
7896
7897 2017-05-24 Yao Qi <yao.qi@linaro.org>
7898
7899 * alpha-tdep.c (alpha_gdbarch_init): Don't call
7900 set_gdbarch_print_insn.
7901 * arc-tdep.c (arc_gdbarch_init): Likewise.
7902 * arch-utils.c: include dis-asm.h.
7903 (default_print_insn): New function.
7904 * arch-utils.h (default_print_insn): Declare.
7905 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7906 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7907 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7908 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7909 * frv-tdep.c (frv_gdbarch_init): Likewise.
7910 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7911 * gdbarch.sh (print_insn): Use default_print_insn.
7912 * gdbarch.c: Regenerated.
7913 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7914 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7915 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7916 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7917 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7918 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7919 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7920 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7921 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7922 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7923 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7924 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7925 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7926 * mt-tdep.c (mt_gdbarch_init): Likewise.
7927 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7928 * nios2-tdep.c (nios2_print_insn): Remove.
7929 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7930 * rx-tdep.c (rx_gdbarch_init): Likewise.
7931 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7932 * score-tdep.c (score_print_insn): Remove.
7933 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7934 * sh-tdep.c (sh_gdbarch_init): Likewise.
7935 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7936 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7937 * tic6x-tdep.c (tic6x_print_insn): Remove.
7938 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7939 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7940 * v850-tdep.c (v850_gdbarch_init): Likewise.
7941 * vax-tdep.c (vax_gdbarch_init): Likewise.
7942 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7943 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7944
7945 2017-05-23 John Baldwin <jhb@FreeBSD.org>
7946
7947 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7948 (MIPS_FP0_REGNUM): Remove.
7949 (MIPS_FSR_REGNUM): Remove.
7950 (mips_fbsd_supply_fpregs): Use mips_regnum.
7951 (mips_fbsd_supply_gregs): Likewise.
7952 (mips_fbsd_collect_fpregs): Likewise.
7953 (mips_fbsd_collect_gregs): Likewise.
7954
7955 2017-05-23 John Baldwin <jhb@FreeBSD.org>
7956
7957 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7958 (getpfpregs_supplies): New function.
7959 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7960 getfpregs_supplies.
7961 (mips_fbsd_store_inferior_registers): Likewise.
7962
7963 2017-05-22 Pedro Alves <palves@redhat.com>
7964
7965 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7966 maintainer.
7967
7968 2017-05-22 Alan Hayward <alan.hayward@arm.com>
7969
7970 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7971 (store_register): Likewise.
7972 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7973 (get_decimal_float_return_value): Likewise.
7974 (do_ppc_sysv_return_value): Likewise.
7975 (ppc64_sysv_abi_push_integer): Likewise.
7976 (ppc64_sysv_abi_push_freg): Likewise.
7977 (ppc64_sysv_abi_return_value_base): Likewise.
7978 (ppc64_sysv_abi_return_value): Likewise.
7979 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7980 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7981 * rs6000-nat.c: Likewise.
7982 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7983 (rs6000_value_to_register): Likewise.
7984 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7985
7986 2017-05-21 Tom Tromey <tom@tromey.com>
7987
7988 PR rust/21466:
7989 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7990 arrays as "[T]", not "[T; ]".
7991
7992 2017-05-19 Tom Tromey <tom@tromey.com>
7993
7994 PR rust/21484:
7995 * rust-lang.c (exp_descriptor_rust): New function.
7996 (rust_language_defn): Use it.
7997 * p-lang.c (pascal_language_defn): Update.
7998 * opencl-lang.c (opencl_language_defn): Update.
7999 * objc-lang.c (objc_language_defn): Update.
8000 * m2-lang.c (m2_language_defn): Update.
8001 * language.h (struct language_defn)
8002 <la_watch_location_expression>: New member.
8003 * language.c (unknown_language_defn, auto_language_defn)
8004 (local_language_defn): Update.
8005 * go-lang.c (go_language_defn): Update.
8006 * f-lang.c (f_language_defn): Update.
8007 * d-lang.c (d_language_defn): Update.
8008 * c-lang.h (c_watch_location_expression): Declare.
8009 * c-lang.c (c_watch_location_expression): New function.
8010 (c_language_defn, cplus_language_defn, asm_language_defn)
8011 (minimal_language_defn): Use it.
8012 * breakpoint.c (watch_command_1): Call
8013 la_watch_location_expression.
8014 * ada-lang.c (ada_language_defn): Update.
8015
8016 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8017
8018 PR tui/21482
8019 * gdb_curses.h (NOMACROS): Define.
8020 (NCURSES_NOMACROS): Define.
8021
8022 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8023
8024 PR tui/21482
8025 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8026 arg to char *.
8027 * tui/tui-wingeneral.c (box_win): Likewise.
8028 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8029 (tui_show_source_line): Likewise.
8030 (tui_show_exec_info_content): Likewise.
8031
8032 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8033
8034 * sparc-tdep.c (sparc_structure_return_p)
8035 (sparc_arg_on_registers_p): New functions.
8036 (sparc32_store_arguments): Use them.
8037 * sparc64-tdep.c (sparc64_16_byte_align_p)
8038 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8039 Handle TYPE_CODE_ARRAY.
8040
8041 2017-05-17 Yao Qi <yao.qi@linaro.org>
8042
8043 * cli/cli-decode.c (add_alias_cmd): New function.
8044 * command.h (add_alias_cmd): Declare.
8045 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8046 instead call add_alias_cmd.
8047
8048 2017-05-17 Pedro Alves <palves@redhat.com>
8049
8050 * Makefile.in (nat_extra_makefile_frag): Rename to ...
8051 (nat_makefile_frag): ... this. All references updated.
8052 * configure.ac: Likewise.
8053 * configure.nat: Likewise. Enhance comments.
8054 * configure: Regenerate.
8055
8056 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8057
8058 * procfs.c (procfs_create_inferior): Change prototype to match
8059 definition.
8060
8061 2017-05-13 Eli Zaretskii <eliz@gnu.org>
8062
8063 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8064 C++ compiler warning.
8065
8066 2017-05-12 Tom Tromey <tom@tromey.com>
8067
8068 PR rust/21483:
8069 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8070 recurse, just call value_struct_elt directly.
8071
8072 2017-05-12 Tom Tromey <tom@tromey.com>
8073
8074 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8075 OP_RUST_ARRAY>: Fix.
8076
8077 2017-05-12 Tom Tromey <tom@tromey.com>
8078
8079 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8080
8081 2017-05-09 Yao Qi <yao.qi@linaro.org>
8082
8083 * regcache.c: Include <forward_list>.
8084 (struct regcache_list): Remove.
8085 (current_regcache): Update.
8086 (get_thread_arch_aspace_regcache): Update for std::forward_list.
8087 (regcache_thread_ptid_changed): Likewise.
8088 (registers_changed_ptid): Likewise.
8089 (current_regcache_size): Likewise.
8090
8091 2017-05-09 Yao Qi <yao.qi@linaro.org>
8092
8093 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8094 (current_regcache_size): New function.
8095 (current_regcache_test): New function.
8096 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8097
8098 2017-05-08 Alan Hayward <alan.hayward@arm.com>
8099
8100 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8101 (print_gp_register_row): Use get_frame_register_value.
8102
8103 2017-05-08 Alan Hayward <alan.hayward@arm.com>
8104
8105 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8106 (mips_supply_fpregset): Likewise.
8107 (mips64_supply_gregset): Likewise.
8108
8109 2017-05-08 Alan Hayward <alan.hayward@arm.com>
8110
8111 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
8112 regcache->raw_supply_zeroed.
8113
8114 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
8115
8116 * configure.nat: Rearrange 'case' statements to match
8117 host before cpu.
8118
8119 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
8120
8121 * Makefile.in: Remove "@host_makefile_frag@". Add variables
8122 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8123 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
8124 "@nat_extra_makefile_frag@".
8125 (Makefile): Remove dependency on "@frags@".
8126 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8127 (data-directory/Makefile): Likewise.
8128 * config/aarch64/linux.mh: Deleted; moved contents to
8129 "gdb/configure.nat".
8130 * config/alpha/alpha-linux.mh: Likewise.
8131 * config/alpha/nbsd.mh: Likewise.
8132 * config/arm/linux.mh: Likewise.
8133 * config/arm/nbsdelf.mh: Likewise.
8134 * config/i386/cygwin.mh: Likewise.
8135 * config/i386/cygwin64.mh: Likewise.
8136 * config/i386/darwin.mh: Likewise.
8137 * config/i386/fbsd.mh: Likewise.
8138 * config/i386/fbsd64.mh: Likewise.
8139 * config/i386/go32.mh: Likewise.
8140 * config/i386/i386gnu.mh: Likewise.
8141 * config/i386/i386sol2.mh: Likewise.
8142 * config/i386/linux.mh: Likewise.
8143 * config/i386/linux64.mh: Likewise.
8144 * config/i386/mingw.mh: Likewise.
8145 * config/i386/mingw64.mh: Likewise.
8146 * config/i386/nbsd64.mh: Likewise.
8147 * config/i386/nbsdelf.mh: Likewise.
8148 * config/i386/nto.mh: Likewise.
8149 * config/i386/obsd.mh: Likewise.
8150 * config/i386/obsd64.mh: Likewise.
8151 * config/i386/sol2-64.mh: Likewise.
8152 * config/ia64/linux.mh: Likewise.
8153 * config/m32r/linux.mh: Likewise.
8154 * config/m68k/linux.mh: Likewise.
8155 * config/m68k/nbsdelf.mh: Likewise.
8156 * config/m68k/obsd.mh: Likewise.
8157 * config/m88k/obsd.mh: Likewise.
8158 * config/mips/fbsd.mh: Likewise.
8159 * config/mips/linux.mh: Likewise.
8160 * config/mips/nbsd.mh: Likewise.
8161 * config/mips/obsd64.mh: Likewise.
8162 * config/pa/linux.mh: Likewise.
8163 * config/pa/nbsd.mh: Likewise.
8164 * config/pa/obsd.mh: Likewise.
8165 * config/powerpc/aix.mh: Likewise.
8166 * config/powerpc/fbsd.mh: Likewise.
8167 * config/powerpc/linux.mh: Likewise.
8168 * config/powerpc/nbsd.mh: Likewise.
8169 * config/powerpc/obsd.mh: Likewise.
8170 * config/powerpc/ppc64-linux.mh: Likewise.
8171 * config/powerpc/spu-linux.mh: Likewise.
8172 * config/s390/linux.mh: Likewise.
8173 * config/sh/nbsd.mh: Likewise.
8174 * config/sparc/fbsd.mh: Likewise.
8175 * config/sparc/linux.mh: Likewise.
8176 * config/sparc/linux64.mh: Likewise.
8177 * config/sparc/nbsd64.mh: Likewise.
8178 * config/sparc/nbsdelf.mh: Likewise.
8179 * config/sparc/obsd64.mh: Likewise.
8180 * config/sparc/sol2.mh: Likewise.
8181 * config/tilegx/linux.mh: Likewise.
8182 * config/vax/nbsdelf.mh: Likewise.
8183 * config/vax/obsd.mh: Likewise.
8184 * config/xtensa/linux.mh: Likewise.
8185 * config/i386/i386gnu.mn: New file, with excerpts from
8186 "config/i386/i386gnu.mh".
8187 * configure: Regenerate.
8188 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8189 *.mh files under "gdb/config".
8190 * configure.nat: New file, with contents from the
8191 "gdb/config/*/*.mh" files.
8192
8193 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
8194
8195 * btrace.c (btrace_clear): Free insn vector.
8196
8197 2017-05-05 Pedro Alves <palves@redhat.com>
8198
8199 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8200 * configure: Regenerate.
8201
8202 2017-05-04 Pedro Alves <palves@redhat.com>
8203
8204 * Makefile.in (SFILES): Add progspace-and-thread.c.
8205 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8206 (COMMON_OBS): Add progspace-and-thread.o.
8207 * breakpoint.c: Include "progspace-and-thread.h".
8208 (update_inserted_breakpoint_locations)
8209 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8210 Use scoped_restore_current_pspace_and_thread.
8211 (create_std_terminate_master_breakpoint): Use
8212 scoped_restore_current_program_space.
8213 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8214 (print_breakpoint_location): Use
8215 scoped_restore_current_program_space.
8216 (bp_loc_is_permanent): Use
8217 scoped_restore_current_pspace_and_thread.
8218 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8219 (download_tracepoint_locations): Use
8220 scoped_restore_current_pspace_and_thread.
8221 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
8222 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
8223 (enum step_over_calls_kind): Moved from inferior.h.
8224 (class scoped_restore_current_thread): New class.
8225 * gdbthread.h (make_cleanup_restore_current_thread): Delete
8226 declaration.
8227 (scoped_restore_current_thread): New class.
8228 * infcmd.c: Include "common/gdb_optional.h".
8229 (continue_1, proceed_after_attach): Use
8230 scoped_restore_current_thread.
8231 (notice_new_inferior): Use scoped_restore_current_thread.
8232 * inferior.c: Include "progspace-and-thread.h".
8233 (restore_inferior, save_current_inferior): Delete.
8234 (add_inferior_command, clone_inferior_command): Use
8235 scoped_restore_current_pspace_and_thread.
8236 * inferior.h (scoped_restore_current_inferior): New class.
8237 * infrun.c: Include "progspace-and-thread.h" and
8238 "common/gdb_optional.h".
8239 (follow_fork_inferior): Use
8240 scoped_restore_current_pspace_and_thread.
8241 (scoped_restore_exited_inferior): New class.
8242 (handle_vfork_child_exec_or_exit): Use
8243 scoped_restore_exited_inferior,
8244 scoped_restore_current_pspace_and_thread,
8245 scoped_restore_current_thread and scoped_restore.
8246 (fetch_inferior_event): Use scoped_restore_current_thread.
8247 * linespec.c (decode_line_full, decode_line_1): Use
8248 scoped_restore_current_program_space.
8249 * mi/mi-main.c: Include "progspace-and-thread.h".
8250 (exec_continue): Use scoped_restore_current_thread.
8251 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
8252 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
8253 * proc-service.c (ps_pglobal_lookup): Use
8254 scoped_restore_current_program_space.
8255 * progspace-and-thread.c: New file.
8256 * progspace-and-thread.h: New file.
8257 * progspace.c (release_program_space, clone_program_space): Use
8258 scoped_restore_current_program_space.
8259 (restore_program_space, save_current_program_space)
8260 (save_current_space_and_thread): Delete.
8261 (switch_to_program_space_and_thread): Moved to
8262 progspace-and-thread.c.
8263 * progspace.h (save_current_program_space)
8264 (save_current_space_and_thread): Delete declarations.
8265 (scoped_restore_current_program_space): New class.
8266 * remote.c (remote_btrace_maybe_reopen): Use
8267 scoped_restore_current_thread.
8268 * symtab.c: Include "progspace-and-thread.h".
8269 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
8270 * thread.c (print_thread_info_1): Use
8271 scoped_restore_current_thread.
8272 (struct current_thread_cleanup): Delete.
8273 (do_restore_current_thread_cleanup)
8274 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
8275 (scoped_restore_current_thread::~scoped_restore_current_thread):
8276 ... this new dtor.
8277 (make_cleanup_restore_current_thread): Rename/convert to ...
8278 (scoped_restore_current_thread::scoped_restore_current_thread):
8279 ... this new ctor.
8280 (thread_apply_all_command): Use scoped_restore_current_thread.
8281 (thread_apply_command): Use scoped_restore_current_thread.
8282 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
8283 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
8284
8285 2017-05-04 Pedro Alves <palves@redhat.com>
8286
8287 * thread.c (make_cleanup_restore_current_thread): Move
8288 find_thread_ptid call before the is_stopped call. Assert that the
8289 thread is found. Replace is_stopped call by checking the thread's
8290 state directly. Remove unnecessary NULL-thread check.
8291
8292 2017-05-04 Pedro Alves <palves@redhat.com>
8293
8294 * corelow.c (thread_section_name): New class.
8295 (get_core_register_section, get_core_siginfo): Use it.
8296
8297 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
8298
8299 * corelow.c (sniff_core_bfd): Remove extra semicolon.
8300 (get_core_register_section): Remove xfree of NULL pointer.
8301
8302 2017-05-03 Alan Hayward <alan.hayward@arm.com>
8303
8304 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
8305 * regcache.c (regcache::raw_supply_zeroed): New function.
8306 * regcache.h (regcache::raw_supply_zeroed): New declaration.
8307
8308 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
8309
8310 * gdbarch.sh: Remove commented out definition of
8311 TARGET_CHAR_BIT.
8312 * gdbarch.h: Re-generate.
8313
8314 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
8315
8316 * configure: Regenerate.
8317
8318 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
8319
8320 * solib-target.c (solib_target_relocate_section_addresses):
8321 Remove num_section_bases, num_bases, segment_bases variables.
8322
8323 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8324
8325 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
8326
8327 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8328
8329 * solib-target.c: Include <vector>
8330 (struct lm_info_target) <~lm_info_target>: Remove.
8331 <segment_bases, section_bases>: Change type to
8332 std::vector<CORE_ADDR>.
8333 (library_list_start_segment, library_list_start_section,
8334 library_list_end_library,
8335 solib_target_relocate_section_addresses): Adjust.
8336
8337 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8338
8339 * gdbarch.sh (software_single_step): Change return type to
8340 std::vector<CORE_ADDR>.
8341 * gdbarch.c, gdbarch.h: Re-generate.
8342 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
8343 Adjust.
8344 (arm_deal_with_atomic_sequence_raw): Adjust.
8345 (thumb_get_next_pcs_raw): Adjust.
8346 (arm_get_next_pcs_raw): Adjust.
8347 (arm_get_next_pcs): Adjust.
8348 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
8349 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
8350 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
8351 (alpha_software_single_step): Adjust.
8352 * alpha-tdep.h (alpha_software_single_step): Adjust.
8353 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
8354 * arm-tdep.c (arm_software_single_step): Adjust.
8355 (arm_breakpoint_kind_from_current_state): Adjust.
8356 * arm-tdep.h (arm_software_single_step): Adjust.
8357 * breakpoint.c (insert_single_step_breakpoint): Adjust.
8358 * cris-tdep.c (cris_software_single_step): Adjust.
8359 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
8360 (micromips_deal_with_atomic_sequence): Adjust.
8361 (deal_with_atomic_sequence): Adjust.
8362 (mips_software_single_step): Adjust.
8363 * mips-tdep.h (mips_software_single_step): Adjust.
8364 * moxie-tdep.c (moxie_software_single_step): Adjust.
8365 * nios2-tdep.c (nios2_software_single_step): Adjust.
8366 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
8367 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
8368 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
8369 * s390-linux-tdep.c (s390_software_single_step): Adjust.
8370 * sparc-tdep.c (sparc_software_single_step): Adjust.
8371 * spu-tdep.c (spu_software_single_step): Adjust.
8372 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
8373
8374 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8375
8376 * gdbarch.sh: Use semi-colon as field separator instead of colon.
8377 * gdbarch.h: Re-generate.
8378
8379 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8380
8381 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
8382 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
8383 * python/py-instruction.c, python/py-instruction.h: New file.
8384 * python/py-record.c: Add py-instruction.h include.
8385 (gdbpy_initialize_record): Make gdb.Instruction a super class of
8386 gdb.RecordInstruction.
8387 * python/python-internal.h: Add gdbpy_initialize_instruction
8388 declaration.
8389 * python/python.c (do_start_initialization): Add
8390 gdbpy_initialize_instruction.
8391
8392 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8393
8394 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
8395 Remove.
8396 (btrace_func_from_recpy_func): New function.
8397 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
8398 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
8399 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
8400 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
8401 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
8402 Also, use new helper functions.
8403 (btpy_list_item): Use new helper functions.
8404 (recpy_bt_function_call_history): Use new type name.
8405 (btpy_call_getset): Remove.
8406 (gdbpy_initialize_btrace): Remove code to initialize
8407 gdb.BtraceFunctionCall.
8408 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
8409 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
8410 recpy_bt_func_prev, recpy_bt_func_next): New export.
8411 * python/py-record.c (recpy_func_type): New static object.
8412 (recpy_func_new, recpy_func_level, recpy_func_symbol,
8413 recpy_func_instructions, recpy_func_up, recpy_func_prev,
8414 recpy_func_next): New function.
8415 (recpy_element_hash, recpy_element_richcompare): Updated comment.
8416 (recpy_func_getset): New static object.
8417 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
8418 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
8419
8420 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8421
8422 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
8423 (btpy_object, btpy_insn_type, btpy_new): Remove.
8424 (btpy_list_object): Use gdb.RecordInstruction type instead of
8425 gdb.BtraceInstruction type.
8426 (btrace_insn_from_recpy_insn): New function.
8427 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
8428 btpy_new.
8429 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
8430 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
8431 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
8432 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
8433 instead of btpy_object.
8434 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8435 btpy_insn_data, btpy_insn_decode): Rename to ...
8436 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
8437 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
8438 recpy_bt_insn_decode): This. Also, use new helper functions.
8439 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
8440 recpy_insn_type.
8441 (btpy_insn_getset): Remove.
8442 (gdbpy_initialize_btrace): Remove code to initialize
8443 gdb.BtraceInstruction. Use recpy_element_object.
8444 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
8445 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
8446 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
8447 * python/py-record.c (recpy_insn_type): New static object.
8448 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
8449 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
8450 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
8451 New function.
8452 (recpy_insn_getset): New static object.
8453 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
8454 * python/py-record.h (recpy_element_object): New typedef.
8455 (recpy_insn_type, recpy_insn_new): New export.
8456
8457 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8458
8459 * py-record-btrace.c (btpy_insn_new): Removed.
8460 (btpy_insn_or_gap_new): New function.
8461 (btpy_insn_error): Removed.
8462 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8463 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
8464 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
8465 btpy_insn_or_gap_new instead of btpy_insn_new.
8466 (btpy_insn_getset): Remove btpy_insn_error.
8467 * py-record.c (recpy_gap_type): New static object.
8468 (recpy_gap_object): New typedef.
8469 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
8470 recpy_gap_reason_string): New function.
8471 (recpy_gap_getset): New static object.
8472 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
8473 * py-record.h (recpy_gap_new): New export.
8474
8475 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8476
8477 * python/py-record.c (recpy_ptid): Remove.
8478 (recpy_record_getset): Remove recpy_ptid.
8479
8480 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8481
8482 * btrace.c (btrace_fetch): Set inferior_ptid.
8483 * python/py-record-btrace.c: Add "py-record.h" include.
8484 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
8485 recpy_bt_end, recpy_bt_instruction_history,
8486 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
8487 in gdb.Record object instead of current ptid.
8488 * python/py-record.c: Include new "py-record.h" file.
8489 (recpy_record_object): Moved to py-record.h.
8490 * python/py-record.h: New file.
8491
8492 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8493
8494 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
8495 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
8496 indentation.
8497
8498 2017-05-01 Joel Brobecker <brobecker@adacore.com>
8499
8500 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
8501 the past maintainers section.
8502
8503 2017-04-28 Yao Qi <yao.qi@linaro.org>
8504
8505 * infcmd.c (get_return_value): Use regcache ctor, and remove
8506 cleanup.
8507
8508 2017-04-28 Yao Qi <yao.qi@linaro.org>
8509 Pedro Alves <palves@redhat.com>
8510
8511 * regcache.c (regcache::regcache): New tag dispatch ctor.
8512 (do_cooked_read): Moved above.
8513 (regcache_dup): Use the tag dispatch ctor..
8514 * regcache.h (regcache): Declare ctor, delete copy ctor and
8515 assignment operator, remove friend regcache_dup.
8516
8517 2017-04-28 Yao Qi <yao.qi@linaro.org>
8518
8519 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
8520 call method save instead of regcache_cpy.
8521 * regcache.h (struct regcache): Make regcache_dup a friend.
8522
8523 2017-04-28 Yao Qi <yao.qi@linaro.org>
8524
8525 * regcache.c (struct regcache): Move to regcache.h
8526 (regcache::arch): New method.
8527 (regcache_get_ptid): Update.
8528 (get_regcache_arch): Call arch method.
8529 (get_regcache_aspace): Call method aspace.
8530 (register_buffer): Change it to method.
8531 (regcache_save): Change it to regcache::save.
8532 (regcache_restore): Likewise.
8533 (regcache_cpy_no_passthrough): Remove the declaration.
8534 (regcache_cpy): Call methods restore and cpy_no_passthrough.
8535 (regcache_cpy_no_passthrough): Change it to method
8536 cpy_no_passthrough.
8537 (regcache_register_status): Change it to method
8538 get_register_status.
8539 (regcache_invalidate): Change it to method invalidate.
8540 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
8541 (regcache_raw_update): Change it to method raw_update.
8542 (regcache_raw_read): Likewise.
8543 (regcache_raw_read_signed): Likewise.
8544 (regcache_raw_read_unsigned): Likewise.
8545 (regcache_raw_write_signed): Likewise.
8546 (regcache_raw_write_unsigned): Likewise.
8547 (regcache_cooked_read): Likewise.
8548 (regcache_cooked_read_value): Likewise.
8549 (regcache_cooked_read_signed): Likewise.
8550 (regcache_cooked_read_unsigned): Likewise.
8551 (regcache_cooked_write_signed): Likewise.
8552 (regcache_cooked_write_unsigned): Likewise.
8553 (regcache_raw_set_cached_value): Likewise.
8554 (regcache_raw_write): Likewise.
8555 (regcache_cooked_write): Likewise.
8556 (regcache_xfer_part): Likewise.
8557 (regcache_raw_read_part): Likewise.
8558 (regcache_raw_write_part): Likewise.
8559 (regcache_cooked_read_part): Likewise.
8560 (regcache_cooked_write_part): Likewise.
8561 (regcache_raw_supply): Likewise.
8562 (regcache_raw_collect): Likewise.
8563 (regcache_transfer_regset): Likewise.
8564 (regcache_supply_regset): Likewise.
8565 (regcache_collect_regset): Likewise.
8566 (regcache_debug_print_register): Likewise.
8567 (enum regcache_dump_what): Move it to regcache.h.
8568 (regcache_dump): Change it to method dump.
8569 * regcache.h (enum regcache_dump_what): New.
8570 (class regcache): New.
8571 * target.c (target_fetch_registers): Call method
8572 debug_print_register.
8573 (target_store_registers): Likewise.
8574
8575 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8576
8577 * windows-nat.c (struct lm_info_windows): Initialize field.
8578 (windows_make_so): Allocate lm_info_windows with new.
8579 (windows_free_so): Free lm_info_windows with delete.
8580
8581 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8582
8583 * solib-darwin.c (struct lm_info_darwin): Initialize field.
8584 (darwin_current_sos): Allocate lm_info_darwin with new, remove
8585 cleanup.
8586 (darwin_free_so): Free lm_info_darwin with delete.
8587
8588 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8589
8590 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
8591 <l_addr_p>: Change type to bool.
8592 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
8593 (svr4_free_so): Free lm_info_svr4 with delete.
8594 (svr4_copy_library_list): Replace memcpy with call to copy
8595 constructor.
8596 (library_list_start_library, svr4_default_sos): Allocate
8597 lm_info_svr4 with new.
8598
8599 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8600
8601 * solib-target.c (struct lm_info_target): Add destructor,
8602 initialize fields.
8603 <name>: Change type to std::string.
8604 (library_list_start_library): Allocate lm_info_target with new.
8605 (solib_target_free_library_list): Free lm_info_target with
8606 delete.
8607 (solib_target_current_sos): Adapt to std::string.
8608 (solib_target_free_so): Free lm_info_target with delete.
8609
8610 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8611
8612 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
8613 fields.
8614 (frv_current_sos): Allocate lm_info_frv with new.
8615 (frv_relocate_main_executable): Free lm_info_frv with delete,
8616 allocate with new.
8617 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
8618
8619 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8620
8621 * solib-frv.c (struct lm_info_frv): Fix indentation.
8622
8623 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8624
8625 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
8626 map field.
8627 (dsbt_current_sos): Allocate lm_info_dsbt with new.
8628 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
8629 and allocate with new.
8630 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
8631
8632 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8633
8634 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
8635 <filename, member_name>: Change type to std::string.
8636 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
8637 (library_list_start_library): Allocate lm_info_aix with new.
8638 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
8639 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
8640 with copy constructor.
8641
8642 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8643
8644 * solist.h (struct lm_info): Remove.
8645 (struct lm_info_base): New class.
8646 (struct so_list) <lm_info>: Change type to lm_info_base *.
8647 * nto-tdep.c (struct lm_info): Remove.
8648 (lm_addr): Adjust.
8649 * solib-aix.c (struct lm_info): Rename to ...
8650 (struct lm_info_aix): ... this. Extend lm_info_base.
8651 (lm_info_p): Rename to ...
8652 (lm_info_aix_p): ... this, and adjust.
8653 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
8654 solib_aix_parse_libraries, library_list_start_library,
8655 solib_aix_free_library_list, solib_aix_parse_libraries,
8656 solib_aix_get_library_list,
8657 solib_aix_relocate_section_addresses, solib_aix_free_so,
8658 solib_aix_get_section_offsets,
8659 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
8660 Adjust.
8661 (struct solib_aix_inferior_data) <library_list>: Adjust.
8662 * solib-darwin.c (struct lm_info): Rename to ...
8663 (struct lm_info_darwin): ... this. Extend lm_info_base.
8664 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
8665 * solib-dsbt.c (struct lm_info): Rename to ...
8666 (struct lm_info_dsbt): ... this. Extend lm_info_base.
8667 (struct dsbt_info) <main_executable_lm_info): Adjust.
8668 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
8669 dsbt_relocate_section_addresses): Adjust.
8670 * solib-frv.c (struct lm_info): Rename to ...
8671 (struct lm_info_frv): ... this. Extend lm_info_base.
8672 (main_executable_lm_info): Adjust.
8673 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
8674 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
8675 find_canonical_descriptor_in_load_object,
8676 frv_fdpic_find_canonical_descriptor): Adjust.
8677 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
8678 to lm_info_svr4.
8679 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
8680 svr4_clear_so, svr4_copy_library_list,
8681 library_list_start_library, svr4_default_sos, svr4_read_so_list,
8682 svr4_current_sos, svr4_fetch_objfile_link_map,
8683 solist_update_incremental): Adjust.
8684 * solib-svr4.h (struct lm_info_svr4): Move here from
8685 solib-svr4.c.
8686 * solib-target.c (struct lm_info): Rename to ...
8687 (struct lm_info_target): ... this. Extend lm_info_base.
8688 (lm_info_p): Rename to ...
8689 (lm_info_target_p): ... this.
8690 (solib_target_parse_libraries, library_list_start_segment,
8691 library_list_start_section, library_list_start_library,
8692 library_list_end_library, solib_target_free_library_list,
8693 solib_target_current_sos, solib_target_free_so,
8694 solib_target_relocate_section_addresses): Adjust.
8695 * windows-nat.c (struct lm_info): Rename to ...
8696 (struct lm_info_windows): ... this. Extend lm_info_base.
8697 (windows_make_so, handle_load_dll, handle_unload_dll,
8698 windows_xfer_shared_libraries): Adjust.
8699
8700 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8701
8702 * solib-darwin.c (struct darwin_so_list): Remove.
8703 (darwin_current_sos): Allocate an so_list object instead of a
8704 darwin_so_list, separately allocate an lm_info object.
8705 (darwin_free_so): Free lm_info.
8706
8707 2017-04-28 John Baldwin <jhb@FreeBSD.org>
8708
8709 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
8710 with fprintf_filtered.
8711
8712 2017-04-28 Yao Qi <yao.qi@linaro.org>
8713
8714 * regcache.c (regcache::regcache): New function.
8715 (regcache::~regcache): New function.
8716 (regcache_xmalloc_1): Remove.
8717 (regcache_xmalloc): Call new regcache.
8718 (regcache_xfree): Call delete regcache.
8719 (get_thread_arch_aspace_regcache): Call new regcache.
8720
8721 2017-04-28 Yao Qi <yao.qi@linaro.org>
8722
8723 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
8724 lwp instead of ptid_get_lwp.
8725
8726 2017-04-28 Yao Qi <yao.qi@linaro.org>
8727
8728 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
8729 lwp_info instead of getting from inferior_ptid.
8730
8731 2017-04-27 Keith Seitz <keiths@redhat.com>
8732
8733 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
8734 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
8735 (CV_CONVERSION_BADNESS): Define.
8736 (rank_one_type): Remove overly restrictive rvalue reference
8737 rank checks.
8738 Add cv-qualifier checks and subranks for type equality.
8739 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
8740 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
8741 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
8742
8743 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
8744
8745 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
8746 count when creating the object.
8747
8748 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
8749 Ulrich Weigand <uweigand@de.ibm.com>
8750
8751 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
8752 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
8753 is used in AIX.
8754 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
8755 (process_xcoff_symbol): Likewise.
8756 (scan_xcoff_symtab): Likewise.
8757
8758 2017-04-26 Alan Hayward <alan.hayward@arm.com>
8759
8760 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
8761 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
8762 (ia64_access_reg): Use get_frame_register_unsigned.
8763 (ia64_access_rse_reg): Likewise.
8764 (ia64_libunwind_frame_prev_register): Likewise.
8765
8766 2017-04-26 Jiong Wang <jiong.wang@arm.com>
8767
8768 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
8769 * gdbarch.c: Regenerated.
8770 * gdbarch.h: Regenerated.
8771 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
8772 visibility external.
8773 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
8774 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
8775 (enum cfa_how_kind): Move to ...
8776 (struct dwarf2_frame_state_reg_info): Likewise.
8777 (struct dwarf2_frame_state): Likewise.
8778 * dwarf2-frame.h: ... here.
8779 (dwarf2_frame_state_alloc_regs): New declaration.
8780 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
8781 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
8782
8783 2017-04-26 Alan Hayward <alan.hayward@arm.com>
8784
8785 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8786 regcache_raw_read_unsigned.
8787 (xtensa_pseudo_register_write): Likewise.
8788
8789 2017-04-26 Alan Hayward <alan.hayward@arm.com>
8790
8791 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8792 (nds32_pseudo_register_write): Likewise.
8793
8794 2017-04-25 Yao Qi <yao.qi@linaro.org>
8795
8796 * regcache.c (struct regcache) <readonly_p>: Change its type
8797 to bool.
8798 (regcache_xmalloc_1): Update parameter type and callers update.
8799
8800 2017-04-25 Yao Qi <yao.qi@linaro.org>
8801
8802 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8803 set_gdbarch_wchar_bit.
8804 * arm-tdep.c (arm_gdbarch_init): Likewise.
8805
8806 2017-04-25 Pedro Alves <palves@redhat.com>
8807
8808 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8809 (BothAreRelocatable, memcopy, memmove): Don't define.
8810 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8811 macros.
8812
8813 2017-04-25 Pedro Alves <palves@redhat.com>
8814
8815 * common/common-defs.h: Include "common/poison.h".
8816 * common/function-view.h: (Not, Or, Requires): Move to traits.h
8817 and adjust.
8818 * common/poison.h: New file.
8819 * common/traits.h: Include <type_traits>.
8820 (Not, Or, Requires): New, moved from common/function-view.h.
8821
8822 2017-04-25 Pedro Alves <palves@redhat.com>
8823
8824 * breakpoint.h (struct breakpoint): In-class initialize all
8825 fields. Make boolean fields "bool".
8826 * breakpoint.c (init_raw_breakpoint_without_location): Remove
8827 memset call and initializations no longer necessary.
8828
8829 2017-04-25 Pedro Alves <palves@redhat.com>
8830
8831 * btrace.c (pt_btrace_insn_flags): Change parameter type to
8832 reference.
8833 (pt_btrace_insn): New function.
8834 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8835
8836 2017-04-25 Pedro Alves <palves@redhat.com>
8837
8838 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
8839 "base" field and inherit from "bp_location" instead. Add
8840 non-default ctor.
8841 (allocate_location_exception): Use new non-default ctor.
8842 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8843 (init_bp_location): Convert to ...
8844 (bp_location::bp_location): ... this new ctor, and remove memset
8845 call.
8846 (base_breakpoint_allocate_location): Use the new non-default ctor.
8847 * breakpoint.h (bp_location): Now a class. Declare default and
8848 non-default ctors. In-class initialize all members.
8849 (init_bp_location): Remove declaration.
8850
8851 2017-04-25 Pedro Alves <palves@redhat.com>
8852
8853 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8854 assignment operator.
8855
8856 2017-04-24 Yao Qi <yao.qi@linaro.org>
8857
8858 * doublest.c (convert_doublest_to_floatformat): Call
8859 floatformat_totalsize_bytes.
8860
8861 2017-04-22 Tom Tromey <tom@tromey.com>
8862
8863 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8864 ui_out_emit_list.
8865 * stack.c (print_frame): Use ui_out_emit_list.
8866 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8867 ui_out_emit_list.
8868 * mi/mi-main.c (print_one_inferior)
8869 (mi_cmd_data_list_register_names)
8870 (mi_cmd_data_list_register_values, mi_cmd_list_features)
8871 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8872 ui_out_emit_list.
8873 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8874 (mi_output_solib_attribs): Use ui_out_emit_list,
8875 ui_out_emit_tuple.
8876 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8877 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8878 (mi_cmd_stack_list_args, list_args_or_locals): Use
8879 ui_out_emit_list.
8880 * disasm.c (do_assembly_only): Use ui_out_emit_list.
8881 * breakpoint.c (print_solib_event, output_thread_groups): Use
8882 ui_out_emit_list.
8883
8884 2017-04-22 Tom Tromey <tom@tromey.com>
8885
8886 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8887 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8888 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8889
8890 2017-04-22 Tom Tromey <tom@tromey.com>
8891
8892 * tracepoint.c (tvariables_info_1)
8893 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8894
8895 2017-04-22 Tom Tromey <tom@tromey.com>
8896
8897 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8898 annotate_arg_emitter.
8899 * breakpoint.c (print_mention_watchpoint)
8900 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8901 * annotate.h (struct annotate_arg_emitter): New.
8902
8903 2017-04-22 Tom Tromey <tom@tromey.com>
8904
8905 * record-btrace.c (record_btrace_insn_history)
8906 (record_btrace_insn_history_range, record_btrace_call_history)
8907 (record_btrace_call_history_range): Use ui_out_emit_tuple.
8908 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8909 ui_out_emit_tuple.
8910 * stack.c (print_frame_info): Use ui_out_emit_tuple.
8911 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8912 * skip.c (skip_info): Use ui_out_emit_tuple.
8913 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8914 * progspace.c (print_program_space): Use ui_out_emit_tuple.
8915 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8916 * osdata.c (info_osdata): Use ui_out_emit_tuple.
8917 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8918 ui_out_emit_tuple.
8919 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8920 (output_register, mi_cmd_data_read_memory)
8921 (mi_cmd_data_read_memory_bytes, mi_load_progress)
8922 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8923 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8924 Use ui_out_emit_tuple.
8925 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8926 ui_out_emit_tuple.
8927 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8928 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8929 * linux-thread-db.c (info_auto_load_libthread_db): Use
8930 ui_out_emit_tuple.
8931 * inferior.c (print_inferior): Use ui_out_emit_tuple.
8932 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8933 * disasm.c (do_mixed_source_and_assembly_deprecated)
8934 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8935 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8936 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8937 * breakpoint.c (print_one_breakpoint_location)
8938 (print_one_breakpoint): Use ui_out_emit_tuple.
8939 * auto-load.c (print_script, info_auto_load_cmd): Use
8940 ui_out_emit_tuple.
8941 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8942
8943 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
8944
8945 * thread.c (print_thread_info_1): Remove dead code.
8946
8947 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8948
8949 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8950 GDB_SELF_TEST.
8951 * arm-tdep.c (selftests::arm_record_test): Likewise.
8952
8953 2017-04-21 Yao Qi <yao.qi@linaro.org>
8954
8955 * regcache.c (regcache_restore): Remove argument 2. Replace
8956 argument 3 with regcache. Get register status from
8957 src->register_status and get register contents from
8958 register_buffer (src, regnum).
8959 (regcache_cpy): Update.
8960
8961 2017-04-19 Pedro Alves <palves@redhat.com>
8962
8963 * gdbthread.h (thread): Add missing closing parenthesis in
8964 comment.
8965
8966 2017-04-19 Pedro Alves <palves@redhat.com>
8967
8968 * common/refcounted-object.h: New file.
8969 * gdbthread.h: Include "common/refcounted-object.h".
8970 (thread_info): Inherit from refcounted_object and add comments.
8971 (thread_info::incref, thread_info::decref)
8972 (thread_info::m_refcount): Delete.
8973 (thread_info::deletable): Use the refcounted_object::refcount()
8974 method.
8975 * inferior.c (current_inferior_): Add comment.
8976 (set_current_inferior): Increment/decrement refcounts.
8977 (prune_inferiors, remove_inferior_command): Skip inferiors marked
8978 not-deletable instead of comparing with the current inferior.
8979 (initialize_inferiors): Increment the initial inferior's refcount.
8980 * inferior.h (struct inferior): Forward declare.
8981 Include "common/refcounted-object.h".
8982 (current_inferior, set_current_inferior): Move declaration to
8983 before struct inferior's definition, and fix comment.
8984 (inferior): Inherit from refcounted_object. Add comments.
8985 * thread.c (switch_to_thread_no_regs): Reference the thread's
8986 inferior pointer directly instead of doing a ptid lookup.
8987 (switch_to_no_thread): New function.
8988 (switch_to_thread(thread_info *)): New function, factored out
8989 from ...
8990 (switch_to_thread(ptid_t)): ... this.
8991 (restore_current_thread): Delete.
8992 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8993 fields, and add 'inf' field.
8994 (do_restore_current_thread_cleanup): Check whether old->inf is
8995 alive instead of looking up an inferior by ptid. Use
8996 switch_to_thread and switch_to_no_thread.
8997 (restore_current_thread_cleanup_dtor): Use old->inf directly
8998 instead of lookup up an inferior by id. Decref the inferior.
8999 Don't restore 'removable'.
9000 (make_cleanup_restore_current_thread): Same the inferior pointer
9001 in old, instead of the inferior number. Incref the inferior.
9002 Don't save/clear 'removable'.
9003
9004 2017-04-19 Pedro Alves <palves@redhat.com>
9005
9006 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9007 unittests/scoped_restore-selftests.c.
9008 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9009 * common/scoped_restore.h (scoped_restore_base): Make "class".
9010 (scoped_restore_base::release): New public method.
9011 (scoped_restore_base::scoped_restore_base): New protected ctor.
9012 (scoped_restore_base::m_saved_var): New protected field.
9013 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9014 scoped_restore_base base class instead of m_saved_var directly.
9015 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9016 (scoped_restore_tmpl::scoped_restore_tmpl(const
9017 scoped_restore_tmpl<T>&)): Likewise.
9018 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9019 method.
9020 (scoped_restore_tmpl::saved_var): New method.
9021 (scoped_restore_tmpl::m_saved_var): Delete.
9022 * inferior.h (inferior::detaching): Now a bool.
9023 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9024 cleanup.
9025 * unittests/scoped_restore-selftests.c: New file.
9026
9027 2017-04-19 Pedro Alves <palves@redhat.com>
9028
9029 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9030 Re-sort in alphabetic order.
9031
9032 2017-04-18 Pedro Alves <palves@redhat.com>
9033
9034 * xml-support.c (obstack_xml_printf): Delete.
9035 * xml-support.h (obstack_xml_printf): Delete.
9036
9037 2017-04-18 Pedro Alves <palves@redhat.com>
9038
9039 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9040 vdebug, verror, body_text, start_element, end_element, name,
9041 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9042 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9043 is_xinclude>: Make private and add m_ prefix.
9044 (gdb_xml_parser::body_text): New method, based on ...
9045 (gdb_xml_body_text): ... this. Adjust.
9046 (gdb_xml_parser::vdebug): New method, based on ...
9047 (gdb_xml_debug): ... this. Adjust.
9048 (gdb_xml_parser::verror): New method, based on ...
9049 (gdb_xml_error): ... this. Adjust.
9050 (gdb_xml_parser::start_element): New method, based on ...
9051 (gdb_xml_start_element): ... this. Adjust.
9052 (gdb_xml_start_element_wrapper): Defer to
9053 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9054 (gdb_xml_parser::end_element): New method, based on ...
9055 (gdb_xml_end_element_wrapper): ... this. Adjust.
9056 (gdb_xml_parser::~gdb_xml_parser): Adjust.
9057 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9058 (gdb_xml_parser::use_dtd): New method, based on ...
9059 (gdb_xml_use_dtd): ... this. Adjust.
9060 (gdb_xml_parser::parse): New method, based on ...
9061 (gdb_xml_parse): ... this. Adjust.
9062 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9063 (xinclude_start_include): Adjust to call the parser's name method.
9064 (xml_xinclude_default, xml_xinclude_start_doctype)
9065 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9066 method.
9067 (xml_process_xincludes): Adjust to call parser methods.
9068 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9069 declarations.
9070
9071 2017-04-18 Pedro Alves <palves@redhat.com>
9072
9073 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9074 gdb::optional<std::string>.
9075 * xml-support.c: Include <string>.
9076 (scope_level::scope_level(scope_level &&))
9077 (scope_level::~scope_level): Delete.
9078 (scope_level::body): Now a std::string.
9079 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9080 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9081 parameter.
9082 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9083 (xinclude_parsing_data::output): Now a std::string reference.
9084 (xinclude_start_include): Adjust.
9085 (xml_xinclude_default): Adjust.
9086 (xml_process_xincludes): Add 'output' parameter, and return bool.
9087 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9088 and return bool.
9089 * xml-tdesc.c: Include <unordered_map> and <string>.
9090 (tdesc_xml_cache): Delete.
9091 (tdesc_xml_cache_s): Delete.
9092 (xml_cache): Now an std::unordered_map.
9093 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9094 (target_fetch_description_xml): Change return type to
9095 gdb::optional<std::string>, and adjust.
9096 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9097 (target_fetch_description_xml): Change return type to
9098 gdb::optional<std::string>.
9099
9100 2017-04-18 Pedro Alves <palves@redhat.com>
9101
9102 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9103 unittests/optional-selftests.c.
9104 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9105 * unittests/optional-selftests.c: New file.
9106 * unittests/optional/assignment/1.cc: New file.
9107 * unittests/optional/assignment/2.cc: New file.
9108 * unittests/optional/assignment/3.cc: New file.
9109 * unittests/optional/assignment/4.cc: New file.
9110 * unittests/optional/assignment/5.cc: New file.
9111 * unittests/optional/assignment/6.cc: New file.
9112 * unittests/optional/assignment/7.cc: New file.
9113 * unittests/optional/cons/copy.cc: New file.
9114 * unittests/optional/cons/default.cc: New file.
9115 * unittests/optional/cons/move.cc: New file.
9116 * unittests/optional/cons/value.cc: New file.
9117 * unittests/optional/in_place.cc: New file.
9118 * unittests/optional/observers/1.cc: New file.
9119 * unittests/optional/observers/2.cc: New file.
9120
9121 2017-04-18 Pedro Alves <palves@redhat.com>
9122
9123 * common/gdb_optional.h: Include common/traits.h.
9124 (in_place_t): New type.
9125 (in_place): New constexpr variable.
9126 (optional::optional): Remove member initialization of
9127 m_instantiated.
9128 (optional::optional(in_place_t...)): New constructor.
9129 (optional::~optional): Use reset.
9130 (optional::optional(const optional&)): New.
9131 (optional::optional(const optional&&)): New.
9132 (optional::optional(T &)): New.
9133 (optional::optional(T &&)): New.
9134 (operator::operator=(const optional &)): New.
9135 (operator::operator=(optional &&)): New.
9136 (operator::operator= (const T &))
9137 (operator::operator= (T &&))
9138 (operator::emplace (Args &&... args)): Return a T&. Use reset.
9139 (operator::reset): New.
9140 (operator::m_instantiated):: Add in-class initializer.
9141 * common/traits.h: Include <type_traits>.
9142 (struct And): New types.
9143
9144 2017-04-18 Pedro Alves <palves@redhat.com>
9145
9146 * xml-support.c: Include <vector>.
9147 (scope_level::scope_level(const gdb_xml_element *))
9148 (scope_level::scope_level(scope_level&&)): New.
9149 (scope_level::~scope_level): New.
9150 (scope_level_s): Delete.
9151 (gdb_xml_parser::scopes): Now a std::vector.
9152 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9153 Use std::vector.
9154 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9155 scope cleanup code.
9156 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9157 of the scopes member. Use std::vector::emplace_back.
9158
9159 2017-04-18 Pedro Alves <palves@redhat.com>
9160
9161 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
9162 a bool.
9163 (gdb_xml_end_element): Change type of first parameter.
9164 (gdb_xml_cleanup): Rename to ...
9165 (gdb_xml_parser::~gdb_xml_parser): ... this.
9166 (gdb_xml_create_parser_and_cleanup): Delete with ...
9167 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9168 to this new ctor.
9169 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9170 using gdb_xml_create_parser_and_cleanup.
9171 (xinclude_parsing_data): Add ctor/dtor.
9172 (xml_xinclude_cleanup): Delete.
9173 (xml_process_xincludes): Create a local xinclude_parsing_data
9174 instead of heap-allocating one. Create a local gdb_xml_parser
9175 instead of heap-allocating one with
9176 gdb_xml_create_parser_and_cleanup.
9177
9178 2017-04-18 John Baldwin <jhb@FreeBSD.org>
9179
9180 PR threads/20743
9181 * fbsd-nat.c (resume_one_thread_cb): Remove.
9182 (resume_all_threads_cb): Remove.
9183 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9184 iterate_over_threads.
9185
9186 2017-04-17 Joel Brobecker <brobecker@adacore.com>
9187
9188 * NEWS: Create a new section for the next release branch.
9189 Rename the section of the current branch, now that it has
9190 been cut.
9191
9192 2017-04-17 Joel Brobecker <brobecker@adacore.com>
9193
9194 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9195 * version.in: Bump version to 8.0.50.DATE-git.
9196
9197 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
9198
9199 PR gdb/21385
9200 * windows-nat.c (windows_create_inferior): Declare 'allargs'
9201 independently of the host, and fix build breakage on Cygwin.
9202
9203 2017-04-13 Pedro Alves <palves@redhat.com>
9204
9205 * inferior.c (free_inferior): Convert to ...
9206 (inferior::~inferior): ... this dtor.
9207 (inferior::inferior): New ctor, factored out from ...
9208 (add_inferior_silent): ... here. Allocate the inferior with a new
9209 expression.
9210 (delete_inferior): Call delete instead of free_inferior.
9211 * inferior.h (gdb_environ, continuation): Forward declare.
9212 (inferior): Now a class. Add in-class initialization to all
9213 members. Make boolean fields bool, except 'detaching'.
9214 (inferior::inferior): New explicit ctor.
9215 (inferior::~inferior): New.
9216
9217 2017-04-13 Pedro Alves <palves@redhat.com>
9218
9219 * inferior.c (init_inferior_list): Delete.
9220 * inferior.h (init_inferior_list): Delete.
9221
9222 2017-04-13 Pedro Alves <palves@redhat.com>
9223
9224 PR threads/13217
9225 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
9226 (top level): Call it twice, with different thread sets.
9227
9228 2017-04-13 Pedro Alves <palves@redhat.com>
9229
9230 * thread.c: Include <algorithm>.
9231 (thread_array_cleanup): Delete.
9232 (scoped_inc_dec_ref): New class.
9233 (live_threads_count): New function.
9234 (set_thread_refcount): Delete.
9235 (tp_array_compar_ascending): Now a bool.
9236 (tp_array_compar): Convert to a std::sort comparison function.
9237 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9238 and live_threads_count.
9239
9240 2017-04-13 Pedro Alves <palves@redhat.com>
9241
9242 * infrun.c (follow_fork_inferior): Also switch the current
9243 inferior.
9244
9245 2017-04-13 Pedro Alves <palves@redhat.com>
9246
9247 * breakpoint.c (watch_command_1): Save watchpoint-frame info
9248 before calling create_internal_breakpoint.
9249
9250 2017-04-13 Pedro Alves <palves@redhat.com>
9251
9252 * fork-child.c (execv_argv): New class.
9253 (breakup_args): Refactored as ...
9254 (execv_argv::init_for_no_shell): .. this method of execv_argv.
9255 Copy arguments to storage and replace separators with NULL
9256 terminators in place.
9257 (escape_bang_in_quoted_argument): Adjust to return bool.
9258 (execv_argv::execv_argv): New ctor.
9259 (execv_argv::init_for_shell): New method, factored out from
9260 fork_inferior. Don't strdup strings into the vector.
9261 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
9262 Remove free_vector_argv call.
9263
9264 2017-04-13 Yao Qi <yao.qi@linaro.org>
9265
9266 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
9267 tdep->rx_psw_type.
9268
9269 2017-04-13 Yao Qi <yao.qi@linaro.org>
9270
9271 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
9272 * rx-tdep.c (rx_gdbarch_init): Likewise.
9273
9274 2017-04-13 Pedro Alves <palves@redhat.com>
9275
9276 * breakpoint.h (struct breakpoint): Reindent.
9277
9278 2017-04-13 Pedro Alves <palves@redhat.com>
9279
9280 * breakpoint.c (bp_location): Rename to ...
9281 (bp_locations): ... this. All references updated.
9282 (bp_location_count): Rename to ...
9283 (bp_locations_count): ... this. All references updated.
9284 (bp_location_placed_address_before_address_max): Rename to ...
9285 (bp_locations_placed_address_before_address_max): ... this. All
9286 references updated.
9287 (bp_location_shadow_len_after_address_max): Rename to ...
9288 (bp_locations_shadow_len_after_address_max): ... this. All
9289 references updated.
9290 (bp_location_compare_addrs): Rename to ...
9291 (bp_locations_compare_addrs): ... this. All references updated.
9292 (bp_location_compare):Rename to ...
9293 (bp_locations_compare): ... this. All references updated.
9294 (bp_location_target_extensions_update): Rename to ...
9295 (bp_locations_target_extensions_update): ... this. All references
9296 updated.
9297
9298 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
9299
9300 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
9301 * common/common.m4: Check headers 'termios.h', 'termio.h' and
9302 'sgtty.h'.
9303 * common/gdb_termios.h: New file, with parts of "terminal.h".
9304 * inflow.c: Include "gdb_termios.h".
9305 * ser-unix.c: Include "gdb_termios.h".
9306 * terminal.h: Move terminal-related defines to
9307 "common/gdb_termios.h".
9308
9309 2017-04-12 Tom Tromey <tom@tromey.com>
9310
9311 * probe.c (parse_probes): Update.
9312 * location.h (delete_event_location): Don't declare.
9313 (event_location_deleter::operator()): Update.
9314 * location.c (event_location_deleter::operator()): Rename from
9315 delete_event_location.
9316 * linespec.h (linespec_result) <location>: Change type to
9317 event_location_up.
9318 * linespec.c (canonicalize_linespec, event_location_to_sals)
9319 (decode_objc): Update.
9320 (linespec_result): Don't call delete_event_location.
9321 * breakpoint.c (create_breakpoints_sal)
9322 (bkpt_probe_create_sals_from_location)
9323 (strace_marker_create_sals_from_location): Update.
9324
9325 2017-04-12 Tom Tromey <tom@tromey.com>
9326
9327 * linespec.h (struct linespec_result): Add constructor and
9328 destructor.
9329 (init_linespec_result, destroy_linespec_result)
9330 (make_cleanup_destroy_linespec_result): Don't declare.
9331 * linespec.c (init_linespec_result): Remove.
9332 (linespec_result::~linespec_result): Rename from
9333 destroy_linespec_result. Update.
9334 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
9335 Remove.
9336 * breakpoint.c (create_breakpoint, break_range_command)
9337 (decode_location_default): Update.
9338 * ax-gdb.c (agent_command_1): Update.
9339
9340 2017-04-12 Tom Tromey <tom@tromey.com>
9341
9342 * remote.c (remote_download_tracepoint): Update.
9343 * python/py-breakpoint.c (bppy_get_location): Update.
9344 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
9345 (gdbscm_breakpoint_location): Update.
9346 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
9347 * breakpoint.h (struct breakpoint) <location, location_range_end>:
9348 Change type to event_location_up.
9349 * breakpoint.c (create_overlay_event_breakpoint)
9350 (create_longjmp_master_breakpoint)
9351 (create_std_terminate_master_breakpoint)
9352 (create_exception_master_breakpoint)
9353 (breakpoint_event_location_empty_p, print_breakpoint_location)
9354 (print_one_breakpoint_location, create_thread_event_breakpoint)
9355 (init_breakpoint_sal, create_breakpoint)
9356 (print_recreate_ranged_breakpoint, break_range_command)
9357 (init_ada_exception_breakpoint, say_where): Update.
9358 (base_breakpoint_dtor): Don't call delete_event_location.
9359 (bkpt_print_recreate, tracepoint_print_recreate)
9360 (dprintf_print_recreate, update_static_tracepoint)
9361 (breakpoint_re_set_default): Update.
9362
9363 2017-04-12 Tom Tromey <tom@tromey.com>
9364
9365 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
9366 type of "to_do". Update.
9367 (compute_stack_depth): Use std::vector.
9368
9369 2017-04-12 Tom Tromey <tom@tromey.com>
9370
9371 * printcmd.c (find_instruction_backward): Use std::vector.
9372
9373 2017-04-12 Tom Tromey <tom@tromey.com>
9374
9375 * symfile.c (objfilep): Remove typedef.
9376 (reread_symbols): Use a std::vector.
9377
9378 2017-04-12 Tom Tromey <tom@tromey.com>
9379
9380 * mi/mi-main.c (exec_direction_forward): Remove.
9381 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
9382 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
9383 scoped_restore.
9384 * guile/guile.c (guile_repl_command, guile_command)
9385 (gdbscm_execute_gdb_command): Use scoped_restore.
9386 * go-exp.y (go_parse): Use scoped_restore.
9387 * d-exp.y (d_parse): Use scoped_restore.
9388 * cli/cli-decode.c (cmd_func): Use scoped_restore.
9389 * c-exp.y (c_parse): Use scoped_restore.
9390
9391 2017-04-12 Tom Tromey <tom@tromey.com>
9392
9393 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
9394 (mi_parse): Update return type.
9395 (mi_parse_free): Remove.
9396 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
9397 (mi_parse::~mi_parse): Rename from mi_parse_free.
9398 (mi_parse_cleanup): Remove.
9399 (mi_parse): Return a unique_ptr. Use new.
9400 * mi/mi-main.c (mi_execute_command): Update.
9401
9402 2017-04-12 Tom Tromey <tom@tromey.com>
9403
9404 * location.c (explicit_location_lex_one): Return a
9405 unique_xmalloc_ptr.
9406 (string_to_explicit_location): Update. Remove cleanups.
9407
9408 2017-04-12 Tom Tromey <tom@tromey.com>
9409
9410 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
9411 (compare_value_and_voffset): Change type. Update.
9412 (compute_vtable_size): Change type of "offset_vec".
9413 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
9414 (gnuv3_get_typeid): Remove extraneous declaration.
9415
9416 2017-04-12 Tom Tromey <tom@tromey.com>
9417
9418 * charset.h (wchar_iterator): Fix comment.
9419
9420 2017-04-12 Tom Tromey <tom@tromey.com>
9421
9422 * charset.c (iconv_wrapper): New class.
9423 (cleanup_iconv): Remove.
9424 (convert_between_encodings): Use it.
9425
9426 2017-04-12 Tom Tromey <tom@tromey.com>
9427
9428 * symfile.h (increment_reading_symtab): Update type.
9429 * symfile.c (decrement_reading_symtab): Remove.
9430 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
9431 * psymtab.c (psymtab_to_symtab): Update.
9432 * dwarf2read.c (dw2_instantiate_symtab): Update.
9433
9434 2017-04-12 Tom Tromey <tom@tromey.com>
9435
9436 * jit.c (struct jit_reader): Declare separately. Add constructor
9437 and destructor. Change type of "handle".
9438 (loaded_jit_reader): Define separately.
9439 (jit_reader_load): Update. New "new".
9440 (jit_reader_unload_command): Use "delete".
9441 * gdb-dlfcn.h (struct dlclose_deleter): New.
9442 (gdb_dlhandle_up): New typedef.
9443 (gdb_dlopen, gdb_dlsym): Update types.
9444 (gdb_dlclose): Remove.
9445 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
9446 (gdb_dlsym): Change type of "handle".
9447 (make_cleanup_dlclose): Remove.
9448 (dlclose_deleter::operator()): Rename from gdb_dlclose.
9449 * compile/compile-c-support.c (load_libcc): Update.
9450
9451 2017-04-12 Tom Tromey <tom@tromey.com>
9452
9453 * symtab.h (find_pcs_for_symtab_line): Change return type.
9454 * symtab.c (find_pcs_for_symtab_line): Change return type.
9455 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
9456 type of "vec". Update.
9457 (ltpy_get_pcs_for_line): Update.
9458 * linespec.c (decode_digits_ordinary): Update.
9459
9460 2017-04-12 Tom Tromey <tom@tromey.com>
9461
9462 * tracepoint.c (actions_command): Update.
9463 * python/python.c (python_command, python_interactive_command):
9464 Update.
9465 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9466 * guile/guile.c (guile_command): Update.
9467 * defs.h (read_command_lines, read_command_lines_1): Return
9468 command_line_up.
9469 (command_lines_deleter): New struct.
9470 (command_line_up): New typedef.
9471 * compile/compile.c (compile_code_command)
9472 (compile_print_command): Update.
9473 * cli/cli-script.h (get_command_line, copy_command_lines): Return
9474 command_line_up.
9475 (make_cleanup_free_command_lines): Remove.
9476 * cli/cli-script.c (get_command_line, read_command_lines_1)
9477 (copy_command_lines): Return command_line_up.
9478 (while_command, if_command, read_command_lines, define_command)
9479 (document_command): Update.
9480 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
9481 Remove.
9482 * breakpoint.h (breakpoint_set_commands): Change type of
9483 "commands".
9484 * breakpoint.c (breakpoint_set_commands): Change type of
9485 "commands". Update.
9486 (do_map_commands_command, update_dprintf_command_list)
9487 (create_tracepoint_from_upload): Update.
9488
9489 2017-04-12 Tom Tromey <tom@tromey.com>
9490
9491 * tracepoint.c (scope_info): Update.
9492 * spu-tdep.c (spu_catch_start): Update.
9493 * python/python.c (gdbpy_decode_line): Update.
9494 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
9495 * python/py-breakpoint.c (bppy_init): Update.
9496 * probe.c (parse_probes): Update.
9497 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
9498 * location.h (event_location_deleter): New struct.
9499 (event_location_up): New typedef.
9500 (new_linespec_location, new_address_location, new_probe_location)
9501 (new_explicit_location, copy_event_location)
9502 (string_to_event_location, string_to_event_location_basic)
9503 (string_to_explicit_location): Update return type.
9504 (make_cleanup_delete_event_location): Remove.
9505 * location.c (new_linespec_location, new_address_location)
9506 (new_probe_location, new_explicit_location, copy_event_location):
9507 Return event_location_up.
9508 (delete_event_location_cleanup)
9509 (make_cleanup_delete_event_location): Remove.
9510 (string_to_explicit_location, string_to_event_location_basic)
9511 (string_to_event_location): Return event_location_up.
9512 * linespec.c (canonicalize_linespec, event_location_to_sals)
9513 (decode_line_with_current_source)
9514 (decode_line_with_last_displayed, decode_objc): Update.
9515 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
9516 * completer.c (location_completer): Update.
9517 * cli/cli-cmds.c (edit_command, list_command): Update.
9518 * breakpoint.c (create_overlay_event_breakpoint)
9519 (create_longjmp_master_breakpoint)
9520 (create_std_terminate_master_breakpoint)
9521 (create_exception_master_breakpoint)
9522 (create_thread_event_breakpoint): Update.
9523 (init_breakpoint_sal): Update. Remove some dead code.
9524 (create_breakpoint_sal): Change type of "location". Update.
9525 (create_breakpoints_sal, create_breakpoint, break_command_1)
9526 (dprintf_command, break_range_command, until_break_command)
9527 (init_ada_exception_breakpoint)
9528 (strace_marker_create_sals_from_location)
9529 (update_static_tracepoint, trace_command, ftrace_command)
9530 (strace_command, create_tracepoint_from_upload): Update.
9531 * break-catch-throw.c (re_set_exception_catchpoint): Update.
9532 * ax-gdb.c (agent_command_1): Update.
9533
9534 2017-04-12 Pedro Alves <palves@redhat.com>
9535
9536 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
9537 * configure.tgt: Handle i[34567]86-*-go32* and
9538 i[34567]86-*-msdosdjgpp*.
9539 * i386-tdep.c (i386_svr4_reg_to_regnum):
9540 Make extern.
9541 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
9542 i386-go32-tdep.c.
9543 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
9544 * i386-go32-tdep.c: New file.
9545 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
9546 declarations.
9547
9548 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
9549
9550 * aix-thread.c (pd_status2str): Change return type to const char *.
9551
9552 2017-04-12 Pedro Alves <palves@redhat.com>
9553
9554 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
9555 calls to set_gdbarch_gnu_triplet_regexp.
9556
9557 2017-04-12 Pedro Alves <palves@redhat.com>
9558
9559 PR gdb/21323
9560 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
9561 New enum value.
9562 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
9563 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
9564 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
9565 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
9566 * gdbarch.h, gdbarch.c: Regenerate.
9567 * aarch64-tdep.c (aarch64_gdbarch_init): Override
9568 gdbarch_wchar_bit and gdbarch_wchar_signed.
9569 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
9570 * arm-tdep.c (arm_gdbarch_init): Likewise.
9571 * avr-tdep.c (avr_gdbarch_init): Likewise.
9572 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
9573 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
9574 * i386-tdep.c (i386_go32_init_abi): Likewise.
9575 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9576 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9577 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9578 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9579 * sh-tdep.c (sh_gdbarch_init): Likewise.
9580 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9581 * sparc64-tdep.c (sparc64_init_abi): Likewise.
9582 * windows-tdep.c (windows_init_abi): Likewise.
9583 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9584
9585 2017-04-12 Pedro Alves <palves@redhat.com>
9586
9587 PR c++/21323
9588 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
9589 cplus_primitive_type_char32_t>: New enum values.
9590 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
9591 and cplus_primitive_type_char32_t.
9592 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
9593 32, use the archtecture's built-in type for char16_t and char32_t,
9594 respectively. Otherwise, fallback to init_integer_type as before,
9595 but make the type unsigned, and issue a complaint.
9596 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
9597
9598 2017-04-12 Alan Hayward <alan.hayward@arm.com>
9599
9600 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
9601 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
9602
9603 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
9604
9605 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
9606 'const char *'.
9607
9608 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
9609
9610 * common/common-utils.c (free_vector_argv): New function.
9611 * common/common-utils.h: Include <vector>.
9612 (free_vector_argv): New prototype.
9613 * darwin-nat.c (darwin_create_inferior): Rewrite function
9614 prototype in order to constify "exec_file" and accept a
9615 "std::string" for "allargs".
9616 * fork-child.c: Include <vector>.
9617 (breakup_args): Rewrite function, using C++.
9618 (fork_inferior): Rewrite function header, constify "exec_file_arg"
9619 and accept "std::string" for "allargs". Update the code to
9620 calculate "argv" based on "allargs". Update calls to "exec_fun"
9621 and "execvp".
9622 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
9623 order to constify "exec_file" and accept a "std::string" for
9624 "allargs".
9625 * go32-nat.c (go32_create_inferior): Likewise.
9626 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
9627 * infcmd.c (run_command_1): Constify "exec_file". Use
9628 "std::string" for inferior arguments.
9629 * inferior.h (fork_inferior): Update prototype.
9630 * linux-nat.c (linux_nat_create_inferior): Rewrite function
9631 prototype in order to constify "exec_file" and accept a
9632 "std::string" for "allargs".
9633 * nto-procfs.c (procfs_create_inferior): Likewise.
9634 * procfs.c (procfs_create_inferior): Likewise.
9635 * remote-sim.c (gdbsim_create_inferior): Likewise.
9636 * remote.c (extended_remote_run): Update code to accept
9637 "std::string" as argument.
9638 (extended_remote_create_inferior): Rewrite function prototype in
9639 order to constify "exec_file" and accept a "std::string" for
9640 "allargs".
9641 * rs6000-nat.c (super_create_inferior): Likewise.
9642 (rs6000_create_inferior): Likewise.
9643 * target.h (struct target_ops) <to_create_inferior>: Likewise.
9644 * windows-nat.c (windows_create_inferior): Likewise.
9645
9646 2017-04-11 Pedro Alves <palves@redhat.com>
9647
9648 * thread.c: Fix whitespace throughout.
9649
9650 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
9651
9652 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
9653
9654 2017-04-11 Alan Hayward <alan.hayward@arm.com>
9655
9656 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
9657
9658 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
9659
9660 PR gdb/21364
9661 * osdata.c (info_osdata): Check if 'type' is an empty string
9662 instead of NULL.
9663
9664 2017-04-10 Pedro Alves <palves@redhat.com>
9665
9666 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
9667 (ptid_to_global_thread_id, in_thread_list)
9668 (do_captured_list_thread_ids, set_resumed, set_running)
9669 (set_executing, set_stop_requested, finish_thread_state)
9670 (validate_registers_access, can_access_registers_ptid)
9671 (print_thread_info_1, switch_to_thread)
9672 (do_restore_current_thread_cleanup)
9673 (make_cleanup_restore_current_thread, thread_command)
9674 (thread_name_command): Use operator== instead of ptid_equal.
9675
9676 2017-04-10 Pedro Alves <palves@redhat.com>
9677
9678 * thread.c (struct current_thread_cleanup) <next>: Delete field.
9679 (current_thread_cleanup_chain): Delete.
9680 (restore_current_thread_cleanup_dtor)
9681 (make_cleanup_restore_current_thread): Remove references to
9682 current_thread_cleanup_chain.
9683
9684 2017-04-10 Alan Hayward <alan.hayward@arm.com>
9685
9686 * msp430-tdep.c (msp430_pseudo_register_read): Never return
9687 REG_UNKNOWN.
9688
9689 2017-04-10 Yao Qi <yao.qi@linaro.org>
9690
9691 PR gdb/19942
9692 * gdbthread.h (thread_info::deletable): New method.
9693 (thread_info::incref): New method.
9694 (thread_info::decref): New method.
9695 (thread_info::refcount): Move it to private.
9696 * infrun.c (save_stop_context): Call inc_refcount.
9697 (release_stop_context_cleanup): Likewise.
9698 * thread.c (set_thread_exited): New function.
9699 (init_thread_list): Delete "tp" only it is deletable, otherwise
9700 call set_thread_exited.
9701 (delete_thread_1): Call set_thread_exited.
9702 (current_thread_cleanup) <inferior_pid>: Remove.
9703 <thread>: New field.
9704 (restore_current_thread_ptid_changed): Removed.
9705 (do_restore_current_thread_cleanup): Adjust.
9706 (restore_current_thread_cleanup_dtor): Don't call
9707 find_thread_ptid.
9708 (set_thread_refcount): Use dec_refcount.
9709 (make_cleanup_restore_current_thread): Adjust.
9710 (thread_apply_all_command): Call inc_refcount.
9711 (_initialize_thread): Don't call
9712 observer_attach_thread_ptid_changed.
9713
9714 2017-04-10 Yao Qi <yao.qi@linaro.org>
9715
9716 * thread.c (delete_thread_1): Hoist code on marking thread as
9717 exited.
9718
9719 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9720
9721 * windows-nat.c (windows_detach): Initialize ptid with
9722 minus_one_ptid.
9723
9724 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
9725
9726 * unittests/ptid-selftests.c: Fix erroneous assert messages.
9727
9728 2017-04-07 Alan Hayward <alan.hayward@arm.com>
9729
9730 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
9731 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
9732 (bfin_pseudo_register_write): Likewise
9733
9734 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
9735
9736 * common/ptid.h (struct ptid): Change to...
9737 (class ptid_t): ... this.
9738 <ptid_t>: New constructors.
9739 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
9740 matches>: New methods.
9741 <make_null, make_minus_one>: New static methods.
9742 <pid>: Rename to...
9743 <m_pid>: ...this.
9744 <lwp>: Rename to...
9745 <m_lwp>: ...this.
9746 <tid>: Rename to...
9747 <m_tid>: ...this.
9748 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
9749 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
9750 as references, move comment to class ptid_t.
9751 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
9752 ptid_t static methods.
9753 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
9754 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
9755 Take ptid arguments as references, implement using ptid_t methods.
9756 * unittests/ptid-selftests.c: New file.
9757 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9758 unittests/ptid-selftests.c.
9759 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
9760
9761 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
9762
9763 * python/python.c (python_run_simple_file): Cast mode literal to
9764 non-const char pointer as expected by PyFile_FromString.
9765
9766 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
9767
9768 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
9769 minus_one_ptid and null_ptid.
9770
9771 2017-04-05 Pedro Alves <palves@redhat.com>
9772
9773 * warning.m4 (build_warnings): Remove -Wno-write-strings.
9774 * configure: Regenerate.
9775
9776 2017-04-05 Pedro Alves <palves@redhat.com>
9777
9778 * ada-exp.y (yyerror): Constify.
9779 * ada-lang.c (bound_name, get_selections)
9780 (ada_variant_discrim_type)
9781 (ada_variant_discrim_name, ada_value_struct_elt)
9782 (ada_lookup_struct_elt_type, is_unchecked_variant)
9783 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
9784 (catch_ada_exception_command_split)
9785 (catch_ada_assert_command_split, catch_assert_command)
9786 (ada_op_name): Constify.
9787 * ada-lang.h (ada_yyerror, get_selections)
9788 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9789 * arc-tdep.c (arc_print_frame_cache): Constify.
9790 * arm-tdep.c (arm_skip_stub): Constify.
9791 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9792 (gen_aggregate_elt_ref): Constify.
9793 * bcache.c (print_bcache_statistics): Constify.
9794 * bcache.h (print_bcache_statistics): Constify.
9795 * break-catch-throw.c (catch_exception_command_1):
9796 * breakpoint.c (struct ep_type_description::description):
9797 Constify.
9798 (add_solib_catchpoint): Constify.
9799 (catch_fork_command_1): Add cast.
9800 (add_catch_command): Constify.
9801 * breakpoint.h (add_catch_command, add_solib_catchpoint):
9802 Constify.
9803 * bsd-uthread.c (bsd_uthread_state): Constify.
9804 * buildsym.c (patch_subfile_names): Constify.
9805 * buildsym.h (next_symbol_text_func, patch_subfile_names):
9806 Constify.
9807 * c-exp.y (yyerror): Constify.
9808 (token::oper): Constify.
9809 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9810 * c-varobj.c (cplus_describe_child): Constify.
9811 * charset.c (find_charset_names): Add cast.
9812 (find_charset_names): Constify array and add const_cast.
9813 * cli/cli-cmds.c (complete_command, cd_command): Constify.
9814 (edit_command): Constify.
9815 * cli/cli-decode.c (lookup_cmd): Constify.
9816 * cli/cli-dump.c (dump_memory_command, dump_value_command):
9817 Constify.
9818 (struct dump_context): Constify.
9819 (add_dump_command, restore_command): Constify.
9820 * cli/cli-script.c (get_command_line): Constify.
9821 * cli/cli-script.h (get_command_line): Constify.
9822 * cli/cli-utils.c (check_for_argument): Constify.
9823 * cli/cli-utils.h (check_for_argument): Constify.
9824 * coff-pe-read.c (struct read_pe_section_data): Constify.
9825 * command.h (lookup_cmd): Constify.
9826 * common/print-utils.c (decimal2str): Constify.
9827 * completer.c (gdb_print_filename): Constify.
9828 * corefile.c (set_gnutarget): Constify.
9829 * cp-name-parser.y (yyerror): Constify.
9830 * cp-valprint.c (cp_print_class_member): Constify.
9831 * cris-tdep.c (cris_register_name, crisv32_register_name):
9832 Constify.
9833 * d-exp.y (yyerror): Constify.
9834 (struct token::oper): Constify.
9835 * d-lang.h (d_yyerror): Constify.
9836 * dbxread.c (struct header_file_location::name): Constify.
9837 (add_old_header_file, add_new_header_file, last_function_name)
9838 (dbx_next_symbol_text, add_bincl_to_list)
9839 (find_corresponding_bincl_psymtab, set_namestring)
9840 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9841 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9842 * defs.h (command_line_input, print_address_symbolic)
9843 (deprecated_readline_begin_hook): Constify.
9844 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9845 Constify.
9846 * event-top.c (handle_line_of_input): Constify and add cast.
9847 * exceptions.c (catch_errors): Constify.
9848 * exceptions.h (catch_errors): Constify.
9849 * expprint.c (print_subexp_standard, op_string, op_name)
9850 (op_name_standard, dump_raw_expression, dump_raw_expression):
9851 * expression.h (op_name, op_string, dump_raw_expression):
9852 Constify.
9853 * f-exp.y (yyerror): Constify.
9854 (struct token::oper): Constify.
9855 (struct f77_boolean_val::name): Constify.
9856 * f-lang.c (f_word_break_characters): Constify.
9857 * f-lang.h (f_yyerror): Constify.
9858 * fork-child.c (fork_inferior): Add cast.
9859 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9860 (new_variant): Constify.
9861 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9862 * gdbarch.c: Regenerate.
9863 * gdbcore.h (set_gnutarget): Constify.
9864 * go-exp.y (yyerror): Constify.
9865 (token::oper): Constify.
9866 * go-lang.h (go_yyerror): Constify.
9867 * go32-nat.c (go32_sysinfo): Constify.
9868 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9869 * guile/scm-cmd.c (cmdscm_function): Constify.
9870 * guile/scm-param.c (pascm_param_value): Constify.
9871 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9872 (h8300sx_register_name): Constify.
9873 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9874 Constify.
9875 * ia64-tdep.c (ia64_register_names): Constify.
9876 * infcmd.c (construct_inferior_arguments): Constify.
9877 (path_command, attach_post_wait): Constify.
9878 * language.c (show_range_command, show_case_command)
9879 (unk_lang_error): Constify.
9880 * language.h (language_defn::la_error)
9881 (language_defn::la_name_of_this): Constify.
9882 * linespec.c (decode_line_2): Constify.
9883 * linux-thread-db.c (thread_db_err_str): Constify.
9884 * lm32-tdep.c (lm32_register_name): Constify.
9885 * m2-exp.y (yyerror): Constify.
9886 * m2-lang.h (m2_yyerror): Constify.
9887 * m32r-tdep.c (m32r_register_names): Constify and make static.
9888 * m68hc11-tdep.c (m68hc11_register_names): Constify.
9889 * m88k-tdep.c (m88k_register_name): Constify.
9890 * macroexp.c (appendmem): Constify.
9891 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9892 (upgrade_type, parse_external, parse_partial_symbols)
9893 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9894 (new_symbol): Constify.
9895 * memattr.c (mem_info_command): Constify.
9896 * mep-tdep.c (register_name_from_keyword): Constify.
9897 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9898 Constify.
9899 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9900 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9901 * mi/mi-main.c (captured_mi_execute_command): Constify and add
9902 cast.
9903 (mi_execute_async_cli_command): Constify.
9904 * mips-tdep.c (mips_register_name): Constify.
9905 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9906 (am33_register_name, am33_2_register_name)
9907 * moxie-tdep.c (moxie_register_names): Constify.
9908 * nat/linux-osdata.c (osdata_type): Constify fields.
9909 * nto-tdep.c (nto_parse_redirection): Constify.
9910 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9911 (lookup_child_selector): Constify.
9912 (objc_methcall::name): Constify.
9913 * objc-lang.h (lookup_objc_class, lookup_child_selector)
9914 (lookup_struct_typedef): Constify.
9915 * objfiles.c (pc_in_section): Constify.
9916 * objfiles.h (pc_in_section): Constify.
9917 * p-exp.y (struct token::oper): Constify.
9918 (yyerror): Constify.
9919 * p-lang.h (pascal_yyerror): Constify.
9920 * parser-defs.h (op_name_standard): Constify.
9921 (op_print::string): Constify.
9922 (exp_descriptor::op_name): Constify.
9923 * printcmd.c (print_address_symbolic): Constify.
9924 * psymtab.c (print_partial_symbols): Constify.
9925 * python/py-breakpoint.c (stop_func): Constify.
9926 (bppy_get_expression): Constify.
9927 * python/py-cmd.c (cmdpy_completer::name): Constify.
9928 (cmdpy_function): Constify.
9929 * python/py-event.c (evpy_add_attribute)
9930 (gdbpy_initialize_event_generic): Constify.
9931 * python/py-event.h (evpy_add_attribute)
9932 (gdbpy_initialize_event_generic): Constify.
9933 * python/py-evts.c (add_new_registry): Constify.
9934 * python/py-finishbreakpoint.c (outofscope_func): Constify.
9935 * python/py-framefilter.c (get_py_iter_from_func): Constify.
9936 * python/py-inferior.c (get_buffer): Add cast.
9937 * python/py-param.c (parm_constant::name): Constify.
9938 * python/py-unwind.c (fprint_frame_id): Constify.
9939 * python/python.c (gdbpy_parameter_value): Constify.
9940 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9941 * remote.c (memory_packet_config::name): Constify.
9942 (show_packet_config_cmd, remote_write_bytes)
9943 (remote_buffer_add_string):
9944 * reverse.c (exec_reverse_once): Constify.
9945 * rs6000-tdep.c (variant::name, variant::description): Constify.
9946 * rust-exp.y (rustyyerror): Constify.
9947 * rust-lang.c (rust_op_name): Constify.
9948 * rust-lang.h (rustyyerror): Constify.
9949 * serial.h (serial_ops::name): Constify.
9950 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9951 (sh_sh3e_register_name, sh_sh2e_register_name)
9952 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9953 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9954 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9955 (sh_sh4al_dsp_register_name): Constify.
9956 * sh64-tdep.c (sh64_register_name): Constify.
9957 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9958 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9959 * stabsread.c (patch_block_stabs, read_type_number)
9960 (ref_map::stabs, ref_add, process_reference)
9961 (symbol_reference_defined, define_symbol, define_symbol)
9962 (error_type, read_type, read_member_functions, read_cpp_abbrev)
9963 (read_one_struct_field, read_struct_fields, read_baseclasses)
9964 (read_tilde_fields, read_struct_type, read_array_type)
9965 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9966 (read_huge_number, read_range_type, read_args, common_block_start)
9967 (find_name_end): Constify.
9968 * stabsread.h (common_block_start, define_symbol)
9969 (process_one_symbol, symbol_reference_defined, ref_add):
9970 * symfile.c (get_section_index, add_symbol_file_command):
9971 * symfile.h (get_section_index): Constify.
9972 * target-descriptions.c (tdesc_type::name): Constify.
9973 (tdesc_free_type): Add cast.
9974 * target.c (find_default_run_target):
9975 (add_deprecated_target_alias, find_default_run_target)
9976 (target_announce_detach): Constify.
9977 (do_option): Constify.
9978 * target.h (add_deprecated_target_alias): Constify.
9979 * thread.c (print_thread_info_1): Constify.
9980 * top.c (deprecated_readline_begin_hook, command_line_input):
9981 Constify.
9982 (init_main): Add casts.
9983 * top.h (handle_line_of_input): Constify.
9984 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9985 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9986 (tfind_command): Rename to ...
9987 (tfind_command_1): ... this and constify.
9988 (tfind_command): New function.
9989 (tfind_end_command, tfind_start_command): Adjust.
9990 (encode_source_string): Constify.
9991 * tracepoint.h (encode_source_string): Constify.
9992 * tui/tui-data.c (tui_partial_win_by_name): Constify.
9993 * tui/tui-data.h (tui_partial_win_by_name): Constify.
9994 * tui/tui-source.c (tui_set_source_content_nil): Constify.
9995 * tui/tui-source.h (tui_set_source_content_nil): Constify.
9996 * tui/tui-win.c (parse_scrolling_args): Constify.
9997 * tui/tui-windata.c (tui_erase_data_content): Constify.
9998 * tui/tui-windata.h (tui_erase_data_content): Constify.
9999 * tui/tui-winsource.c (tui_erase_source_content): Constify.
10000 * tui/tui.c (tui_enable): Add cast.
10001 * utils.c (defaulted_query): Constify.
10002 (init_page_info): Add cast.
10003 (puts_debug, subset_compare): Constify.
10004 * utils.h (subset_compare): Constify.
10005 * varobj.c (varobj_format_string): Constify.
10006 * varobj.h (varobj_format_string): Constify.
10007 * vax-tdep.c (vax_register_name): Constify.
10008 * windows-nat.c (windows_detach): Constify.
10009 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10010 * xml-support.c (gdb_xml_end_element): Constify.
10011 * xml-tdesc.c (tdesc_start_reg): Constify.
10012 * xstormy16-tdep.c (xstormy16_register_name): Constify.
10013 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10014 * xtensa-tdep.h (xtensa_register_t::name): Constify.
10015
10016 2017-04-05 Pedro Alves <palves@redhat.com>
10017
10018 * proc-api.c (struct trans): Constify.
10019 (procfs_note): Constify.
10020 * proc-events.c (struct trans, syscall_table):
10021 * proc-flags.c (struct trans): Constify.
10022 * proc-utils.h (procfs_note): Constify.
10023 * proc-why.c (struct trans): Constify.
10024 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10025 (procfs_detach): Constify.
10026 * sol-thread.c (struct string_map): Constify.
10027 (td_err_string, td_state_string): Constify.
10028
10029 2017-04-05 Pedro Alves <palves@redhat.com>
10030
10031 * proc-api.c (procfs_filename): Don't initialize
10032 procfs_filename.
10033 (prepare_to_trace): Assume procfs_filename is non-NULL.
10034 (_initialize_proc_api): Give procfs_filename a default value here.
10035
10036 2017-04-05 Pedro Alves <palves@redhat.com>
10037
10038 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10039 'cond_string' parameter.
10040 (extract_exception_regexp): Constify 'string' parameter.
10041 (catch_exception_command_1): Constify.
10042 * breakpoint.c (init_catchpoint)
10043 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10044 parameter.
10045 (ep_parse_optional_if_clause, catch_fork_command_1)
10046 (catch_exec_command_1): Constify.
10047 * breakpoint.h (init_catchpoint): Constify 'cond_string'
10048 parameter.
10049 (ep_parse_optional_if_clause): Constify.
10050 * cli/cli-utils.c (remove_trailing_whitespace)
10051 (check_for_argument): Constify.
10052 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10053 non-const overload.
10054 (check_for_argument): Likewise.
10055
10056 2017-04-05 Pedro Alves <palves@redhat.com>
10057
10058 * event-top.c (command_line_handler): Add cast to execute_command
10059 call.
10060 * record-btrace.c (cmd_record_btrace_bts_start)
10061 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10062 (cmd_record_btrace_start): Add cast to execute_command call.
10063 * record-full.c (record_full_goto_insn):
10064 * record.c (record_start, record_stop): Add cast to
10065 execute_command_to_string calls.
10066 (cmd_record_start): Add cast to execute_command calls.
10067
10068 2017-04-05 Pedro Alves <palves@redhat.com>
10069
10070 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10071 static inline function.
10072 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10073 array and use gdb_PyArg_ParseTupleAndKeywords.
10074 * python/py-cmd.c (cmdpy_init): Likewise.
10075 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10076 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10077 (infpy_search_memory): Likewise.
10078 * python/py-objfile.c (objfpy_add_separate_debug_file)
10079 (gdbpy_lookup_objfile): Likewise.
10080 * python/py-symbol.c (gdbpy_lookup_symbol)
10081 (gdbpy_lookup_global_symbol): Likewise.
10082 * python/py-type.c (gdbpy_lookup_type): Likewise.
10083 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10084 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10085 Likewise.
10086
10087 2017-04-05 Pedro Alves <palves@redhat.com>
10088
10089 * python/python-internal.h (gdb_PyGetSetDef): New type.
10090 * python/py-block.c (block_object_getset)
10091 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10092 * python/py-event.c (event_object_getset)
10093 (finish_breakpoint_object_getset): Likewise.
10094 * python/py-inferior.c (inferior_object_getset): Likewise.
10095 * python/py-infthread.c (thread_object_getset): Likewise.
10096 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10097 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10098 * python/py-objfile.c (objfile_getset): Likewise.
10099 * python/py-progspace.c (pspace_getset): Likewise.
10100 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10101 Likewise.
10102 * python/py-record.c (recpy_record_getset): Likewise.
10103 * python/py-symbol.c (symbol_object_getset): Likewise.
10104 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10105 Likewise.
10106 * python/py-type.c (type_object_getset, field_object_getset):
10107 Likewise.
10108 * python/py-value.c (value_object_getset): Likewise.
10109
10110 2017-04-05 Pedro Alves <palves@redhat.com>
10111
10112 * python/python-internal.h (gdb_PyObject_CallMethod)
10113 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10114 New functions.
10115 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10116 (PySys_GetObject, PySys_SetPath): New macros.
10117
10118 2017-04-05 Pedro Alves <palves@redhat.com>
10119
10120 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10121 info_osdata_command.
10122 * osdata.c (info_osdata_command): Rename to ...
10123 (info_osdata): ... this. Constify 'type' parameter, and remove
10124 the 'from_tty' parameter. Accept NULL TYPE.
10125 (info_osdata_command): New function.
10126 * osdata.h (info_osdata_command): Remove declaration.
10127 (info_osdata): New declaration.
10128
10129 2017-04-05 Pedro Alves <palves@redhat.com>
10130
10131 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
10132 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
10133 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
10134 parameter.
10135 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
10136 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
10137 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
10138 parameter.
10139 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
10140 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
10141 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
10142 (mi_cmd_file_list_exec_source_files)
10143 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
10144 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10145 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
10146 parameter.
10147 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
10148 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
10149 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
10150 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
10151 (mi_cmd_stack_info_frame): Constify 'command' parameter.
10152 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10153 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10154 'command' parameter.
10155 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10156 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10157 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10158 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10159 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10160 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10161 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10162 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10163 (mi_cmd_var_set_update_range): Constify 'command' parameter.
10164 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10165 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10166 parameter.
10167 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10168 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10169 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10170 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10171 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10172 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10173 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10174 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10175 (mi_cmd_data_list_changed_registers)
10176 (mi_cmd_data_write_register_values)
10177 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10178 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10179 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10180 (mi_cmd_list_features, mi_cmd_list_target_features)
10181 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10182 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10183 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10184 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10185 (mi_cmd_trace_frame_collected): Constify 'command'
10186 parameter.
10187 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10188 'command' parameter.
10189
10190 2017-04-05 Pedro Alves <palves@redhat.com>
10191
10192 * ada-lang.c (ada_completer_word_break_characters): Now a const
10193 array.
10194 (ada_get_gdb_completer_word_break_characters): Constify.
10195 * completer.c (gdb_completer_command_word_break_characters)
10196 (gdb_completer_file_name_break_characters)
10197 (gdb_completer_quote_characters): Now const arrays.
10198 (get_gdb_completer_quote_characters): Constify.
10199 (set_rl_completer_word_break_characters): New function.
10200 (set_gdb_completion_word_break_characters)
10201 (complete_line_internal): Use it.
10202 * completer.h (get_gdb_completer_quote_characters): Constify.
10203 (set_rl_completer_word_break_characters): Declare.
10204 * f-lang.c (f_word_break_characters): Constify.
10205 * language.c (default_word_break_characters): Constify.
10206 * language.h (language_defn::la_word_break_characters): Constify.
10207 (default_word_break_characters): Constify.
10208 * top.c (init_main): Use set_rl_completer_word_break_characters.
10209
10210 2017-04-05 Pedro Alves <palves@redhat.com>
10211
10212 * aix-thread.c (aix_thread_pid_to_str)
10213 (aix_thread_extra_thread_info): Constify.
10214 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10215 * bsd-uthread.c (bsd_uthread_extra_thread_info)
10216 (bsd_uthread_pid_to_str): Constify.
10217 * corelow.c (core_pid_to_str): Constify.
10218 * darwin-nat.c (darwin_pid_to_str): Constify.
10219 * fbsd-nat.c (fbsd_pid_to_str): Constify.
10220 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
10221 Constify.
10222 * gnu-nat.c (gnu_pid_to_str): Constify.
10223 * go32-nat.c (go32_pid_to_str): Constify.
10224 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
10225 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
10226 * inferior.c (inferior_pid_to_str): Constify.
10227 * linux-nat.c (linux_nat_pid_to_str): Constify.
10228 * linux-tdep.c (linux_core_pid_to_str): Constify.
10229 * linux-thread-db.c (thread_db_pid_to_str)
10230 (thread_db_extra_thread_info): Constify.
10231 * nto-tdep.c (nto_extra_thread_info): Constify.
10232 * nto-tdep.h (nto_extra_thread_info): Constify.
10233 * obsd-nat.c (obsd_pid_to_str): Constify.
10234 * procfs.c (procfs_pid_to_str): Constify.
10235 * ravenscar-thread.c (ravenscar_extra_thread_info)
10236 (ravenscar_pid_to_str): Constify.
10237 * remote-sim.c (gdbsim_pid_to_str): Constify.
10238 * remote.c (remote_threads_extra_info, remote_pid_to_str):
10239 Constify.
10240 * sol-thread.c (solaris_pid_to_str): Constify.
10241 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
10242 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
10243 * target.c (default_pid_to_str, target_pid_to_str)
10244 (normal_pid_to_str, default_pid_to_str): Constify.
10245 * target.h (target_ops::to_pid_to_str)
10246 (target_ops::to_extra_thread_info): Constify.
10247 (target_pid_to_str, normal_pid_to_str): Constify.
10248 * windows-nat.c (windows_pid_to_str): Constify.
10249 * gdbarch.sh (core_pid_to_str): Constify.
10250 * target-delegates.c: Regenerate.
10251 * gdbarch.h, gdbarch.c: Regenerate.
10252
10253 2017-04-05 Pedro Alves <palves@redhat.com>
10254
10255 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
10256 the memory of the temporary warning_pre_print override.
10257 * utils.c (warning_pre_print): Constify.
10258 * utils.h (warning_pre_print): Constify.
10259
10260 2017-04-05 Pedro Alves <palves@redhat.com>
10261
10262 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
10263 (shell_command): New function.
10264 (make_command): Use std::string.
10265 (init_cli_cmds): Register shell_command instead of shell_escape.
10266
10267 2017-04-05 Pedro Alves <palves@redhat.com>
10268
10269 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
10270 * tracepoint.c (default_collect): Don't initialize.
10271
10272 2017-04-05 Pedro Alves <palves@redhat.com>
10273
10274 * macroexp.c (macro_buffer::shared): Now a bool.
10275 (init_buffer): Update.
10276 (init_shared_buffer): Constify 'addr' parameter.
10277 (substitute_args, expand, macro_expand, macro_expand_next): Remove
10278 casts.
10279
10280 2017-04-05 Pedro Alves <palves@redhat.com>
10281
10282 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
10283 * disasm.c (set_disassembler_options): Constify local.
10284 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
10285
10286 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
10287
10288 PR gdb/21352
10289 * tracefile.c (tsave_command): Fix argument parsing for '-r'
10290 option.
10291
10292 2017-04-05 Yao Qi <yao.qi@linaro.org>
10293
10294 * frame.c (frame_unwind_register_unsigned): Call
10295 frame_unwind_register_value.
10296
10297 2017-04-05 Yao Qi <yao.qi@linaro.org>
10298
10299 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
10300 Use gdb_test_multiple, and don't match anchor.
10301
10302 2017-04-05 Pedro Alves <palves@redhat.com>
10303
10304 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
10305 (Write After Approval): Remove Simon Marchi.
10306
10307 2017-04-05 Pedro Alves <palves@redhat.com>
10308
10309 * common/gdb_optional.h (optional::optional): Make constexpr and
10310 initialize m_dummy.
10311
10312 2017-04-04 John Baldwin <jhb@FreeBSD.org>
10313
10314 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10315 (amd64fbsd_jmp_buf_reg_offset): Remove.
10316 (amd64fbsd_supply_uthread): Remove function.
10317 (amd64fbsd_collect_uthread): Remove function.
10318 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
10319 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
10320 (x86_64-*-freebsd*): Remove bsd-uthread.o.
10321 (fbsd-nat.c): Update comment.
10322 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10323 (i386fbsd_jmp_buf_reg_offset): Remove.
10324 (i386fbsd_supply_uthread): Remove function.
10325 (i386fbsd_collect_uthread): Remove function.
10326 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
10327
10328 2017-04-04 John Baldwin <jhb@FreeBSD.org>
10329
10330 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
10331 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
10332 * NEWS: Mention that support for FreeBSD/alpha was removed.
10333 * alpha-fbsd-tdep.c: Delete file.
10334 * config/alpha/fbsd.mh: Delete file.
10335 * configure.host: Delete alpha*-*-freebsd* and
10336 alpha*-*-kfreebsd*-gnu.
10337 * configure.tgt: Delete alpha*-*-freebsd* and
10338 alpha*-*-kfreebsd*-gnu.
10339
10340 2017-04-04 John Baldwin <jhb@FreeBSD.org>
10341
10342 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
10343 amd64bsd_store_inferior_registers): Use ptid from regcache.
10344
10345 2017-04-04 Pedro Alves <palves@redhat.com>
10346
10347 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
10348 data fields, make them private and add "m_" prefixes.
10349 (lnp_state_machine::lnp_state_machine): New ctor.
10350 (record_line, check_line_address, handle_set_discriminator)
10351 (handle_set_address, handle_advance_pc, handle_special_opcode)
10352 (handle_advance_line, handle_set_file, handle_negate_stmt)
10353 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
10354 (end_sequence, advance_line): New methods.
10355 (m_gdbarch, m_record_lines_p): New fields.
10356 (lnp_reader_state): Delete.
10357 (dwarf_record_line): Rename to ...
10358 (lnp_state_machine::record_line): ... adjust.
10359 (init_lnp_state_machine): Delete.
10360 (lnp_state_machine::lnp_state_machine): New.
10361 (check_line_address): Rename to ...
10362 (lnp_state_machine::check_line_address): This.
10363 (dwarf_decode_lines_1): Remove reference to "reader_state".
10364 Adjust lnp_state_machine having a non-default ctor. Use bool.
10365 State machine internal state manipulation moved to
10366 lnp_state_machine methods.
10367
10368 2017-04-04 Pedro Alves <palves@redhat.com>
10369
10370 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10371 unittests/offset-type-selftests.c.
10372 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
10373 * common/offset-type.h: New file.
10374 * common/preprocessor.h: New file.
10375 * common/traits.h: New file.
10376 * common/valid-expr.h: New file.
10377 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
10378 sect_offset and cu_offset strong typedefs throughout.
10379 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
10380 typedefs throughout.
10381 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
10382 sect_offset and cu_offset strong typedefs throughout.
10383 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
10384 typedefs throughout.
10385 * gdbtypes.h: Include "common/offset-type.h".
10386 (cu_offset): Now an offset type (strong typedef) instead of a
10387 struct.
10388 (sect_offset): Likewise.
10389 (union call_site_parameter_u): Rename "param_offset" field to
10390 "param_cu_off".
10391 * unittests/offset-type-selftests.c: New file.
10392
10393 2017-04-04 Pedro Alves <palves@redhat.com>
10394
10395 * common/underlying.h: New file.
10396 * dwarf2read.c: Include "common/gdb_optional.h" and
10397 "common/underlying.h".
10398 (dir_index, file_name_index): New types.
10399 (file_entry): Use them.
10400 (file_entry::include): Use to_underlying.
10401 (line_header::add_file_name): Use dir_index.
10402 (read_formatted_entries): Use gdb::optional. Read form before
10403 writting to file_entry.
10404 (dwarf_decode_line_header): Use dir_index.
10405 (lnp_state_machine::current_file): Use to_underlying.
10406 (lnp_state_machine::file): Change type to file_name_index.
10407 (dwarf_record_line): Use to_underlying.
10408 (init_lnp_state_machine): Use file_name_index.
10409 (dwarf_decode_lines_1): Use dir_index and file_name_index.
10410
10411 2017-04-04 Pedro Alves <palves@redhat.com>
10412
10413 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
10414 operator bool, has_value and get methods.
10415
10416 2017-04-04 Pedro Alves <palves@redhat.com>
10417
10418 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
10419 fields.
10420 (line_header): Initialize all data fields. Change type of
10421 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
10422 Change type of include_dirs to std::vector<const char *>. Remove
10423 num_include_dirs, include_dirs_size. Change type of file_names to
10424 std::vector<file_entry>. Remove num_file_names, file_names_size.
10425 (line_header::line_header): New.
10426 (line_header::add_include_dir, line_header::add_file_name): New
10427 methods.
10428 (line_header::include_dir_at): Remove NULL check.
10429 (line_header::file_name_at): Add const overload.
10430 (line_header_up): New unique_ptr typedef.
10431 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
10432 std::vector. Remove free_line_header call.
10433 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
10434 free_line_header call.
10435 (free_cu_line_header): Delete.
10436 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
10437 (setup_type_unit_groups): Use line_header_up instead of cleanups.
10438 Adjust to use std::vector.
10439 (free_line_header): Delete.
10440 (free_line_header_voidp): Use delete.
10441 (add_include_dir): Replace with ...
10442 (line_header::add_include_dir): ... this method. Use std::vector.
10443 (add_file_name): Replace with ...
10444 (line_header::add_file_name): ... this method. Use std::vector.
10445 (add_include_dir_stub): Delete.
10446 (read_formatted_entries): Remove memset.
10447 (dwarf_decode_line_header): Return a line_header_up instead of a
10448 raw pointer. Remove cleanup handling. Pass lambdas to
10449 read_formatted_entries. Adjust to use line_header methods.
10450 (dwarf_decode_lines_1): Adjust to use line_header methods.
10451 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
10452 use std::vector.
10453
10454 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
10455
10456 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
10457 instead of struct ptid.
10458
10459 2017-05-04 Alan Hayward <alan.hayward@arm.com>
10460
10461 * frame.c (get_frame_register_bytes): Unwind using value.
10462 (put_frame_register_bytes): Likewise.
10463
10464 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
10465
10466 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
10467 aggregate-like.
10468
10469 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
10470
10471 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
10472
10473 2017-03-29 Yao Qi <yao.qi@linaro.org>
10474
10475 * gdbthread.h (struct thread_info): Declare constructor and
10476 destructor. Add some in-class member initializers.
10477 * thread.c (free_thread): Remove.
10478 (init_thread_list): Call delete instead of free_thread.
10479 (new_thread): Call thread_info constructor.
10480 (thread_info::thread_info): New function.
10481 (thread_info::~thread_info): New function.
10482 (delete_thread_1): Call delete instead of free_thread.
10483 (make_cleanup_restore_current_thread): Move tp and frame to
10484 inner block.
10485
10486 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10487
10488 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
10489 (arc_skip_prologue): Likewise.
10490 (arc_make_frame_cache): Likewise.
10491 (arc_pv_get_operand): New function.
10492 (arc_is_in_prologue): Likewise.
10493 (arc_analyze_prologue): Likewise.
10494 (arc_print_frame_cache): Likewise.
10495 (MAX_PROLOGUE_LENGTH): New constant.
10496
10497 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10498
10499 * configure.tgt: Add arc-insn.o.
10500 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
10501 (dump_arc_instruction_command): New function.
10502 (arc_fprintf_disasm): Likewise.
10503 (arc_disassemble_info): Likewise.
10504 (arc_insn_get_operand_value): Likewise.
10505 (arc_insn_get_operand_value_signed): Likewise.
10506 (arc_insn_get_memory_base_reg): Likewise.
10507 (arc_insn_get_memory_offset): Likewise.
10508 (arc_insn_get_branch_target): Likewise.
10509 (arc_insn_dump): Likewise.
10510 (arc_insn_get_linear_next_pc): Likewise.
10511 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
10512 (arc_disassemble_info): Likewise.
10513 (arc_insn_get_branch_target): Likewise.
10514 (arc_insn_get_linear_next_pc): Likewise.
10515 * NEWS: Mention new "maint print arc arc-instruction".
10516
10517 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10518
10519 * arc-tdep (maintenance_print_arc_list): New variable.
10520 (maintenance_print_arc_command): New function.
10521
10522 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10523
10524 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
10525 Add "limm" and "reserved".
10526 (arc_cannot_fetch_register, arc_cannot_store_register): Add
10527 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
10528 * arc-tdep.h (arc_regnum): Likewise.
10529
10530 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10531
10532 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10533 for THREADPTR register.
10534 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
10535 register.
10536 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
10537 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
10538 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
10539
10540 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10541
10542 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
10543 registers above gdbarch_num_regs (gdbarch) as privileged in
10544 call0 ABI.
10545
10546 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10547
10548 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10549 for a single specified register or for all registers in
10550 a0_base..a0_base + C0_NREGS range.
10551 (supply_gregset_reg): Call regcache_raw_supply for a single
10552 specified register or for all registers in a0_base..a0_base +
10553 C0_NREGS range.
10554
10555 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10556
10557 * arch/xtensa.h (C0_NREGS): Add definition.
10558 * xtensa-tdep.c (C0_NREGS): Remove definition.
10559
10560 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10561
10562 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
10563 Drop xtensa_default_isa initialization.
10564 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
10565
10566 2017-03-27 Pedro Alves <palves@redhat.com>
10567
10568 * dwarf2read.c (file_entry) <dir_index>: Add comment.
10569 (file_entry::include_dir): New method.
10570 (line_header::include_dir_at, line_header::file_name_at): New
10571 methods.
10572 (setup_type_unit_groups, setup_type_unit_groups)
10573 (psymtab_include_file_name): Simplify using the new methods.
10574 (lnp_state_machine) <the_line_header>: New field.
10575 <file>: Add comment.
10576 (lnp_state_machine::current_file): New method.
10577 (dwarf_record_line): Simplify using the new methods.
10578 (init_lnp_state_machine): Initialize the "the_line_header" field.
10579 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
10580 Simplify using the new methods.
10581
10582 2017-03-27 Pedro Alves <palves@redhat.com>
10583
10584 * cp-name-parser.y (make_empty): Delete.
10585 (demangler_special, nested_name, ptr_operator, array_indicator)
10586 (direct_declarator, declarator_1): Use fill_comp instead of
10587 make_empty.
10588
10589 2017-03-27 Pedro Alves <palves@redhat.com>
10590
10591 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
10592 to ATTRIBUTE_PRINTF.
10593 * solib-target.c (library_list_start_list): Print "string" not
10594 "version".
10595 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
10596 gdb_xml_error call.
10597
10598 2017-03-27 Pedro Alves <palves@redhat.com>
10599
10600 * dwarf2read.c (struct file_and_directory): New.
10601 (dwarf2_get_dwz_file): Adjust to use std::string.
10602 (dw2_get_file_names_reader): Adjust to use file_and_directory.
10603 (find_file_and_directory): Adjust to return a file_and_directory
10604 object.
10605 (read_file_scope): Adjust to use file_and_directory. Remove
10606 make_cleanup/do_cleanups calls.
10607 (open_and_init_dwp_file): Adjust to use std::string. Remove
10608 make_cleanup/do_cleanups calls.
10609 * python/python.c (do_start_initialization): Adjust to ldirname
10610 returning a std::string.
10611 * utils.c (ldirname): Now returns a std::string.
10612 * utils.h (ldirname): Change return type to std::string.
10613 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
10614 returning a std::string.
10615 * xml-tdesc.c (file_read_description_xml): Likewise.
10616
10617 2017-03-24 Alan Hayward <alan.hayward@arm.com>
10618
10619 * regcache.c (regcache_debug_print_register): New function.
10620 * regcache.h (regcache_debug_print_register): New declaration.
10621 * target.c (debug_print_register): Remove.
10622 (target_fetch_registers): Call regcache_debug_print_register.
10623 (target_store_registers): Likewise.
10624
10625 2017-03-24 Pádraig Brady <pbrady@fb.com>
10626
10627 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
10628 reference beyond the 'lh->include_dirs' array before accessing to
10629 it.
10630 (psymtab_include_file_name): Likewise.
10631 (dwarf_decode_lines_1): Likewise.
10632 (dwarf_decode_lines): Likewise.
10633 (file_file_name): Likewise.
10634
10635 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
10636
10637 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
10638 inferior_ptid.
10639 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10640 ps_lsetfpregs): Likewise.
10641 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
10642 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10643 ps_lsetfpregs): Likewise.
10644 * target.c (target_fetch_registers, target_store_registers):
10645 Remove asserts.
10646
10647 2017-03-23 Alan Hayward <alan.hayward@arm.com>
10648
10649 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
10650
10651 2017-03-23 Yao Qi <yao.qi@linaro.org>
10652
10653 * aarch64-tdep.c (aarch64_process_record_test): Declare.
10654 (_initialize_aarch64_tdep): Register it.
10655 (aarch64_record_load_store): Handle PRFM instruction.
10656 (aarch64_process_record_test): New function.
10657
10658 2017-03-23 Yao Qi <yao.qi@linaro.org>
10659
10660 * aarch64-tdep.c (aarch64_record_load_store): Fix code
10661 indentation.
10662
10663 2017-03-23 Yao Qi <yao.qi@linaro.org>
10664
10665 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
10666
10667 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10668
10669 python/python.c (do_start_initialization): Fix memory leak.
10670
10671 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10672
10673 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
10674 using get_ptrace_pid.
10675 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
10676 inferior_ptid.
10677 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
10678 inferior_ptid instead of pid.
10679
10680 2017-03-22 Yao Qi <yao.qi@linaro.org>
10681
10682 * aarch64-tdep.c: Wrap locally used classes in anonymous
10683 namespace.
10684 * arm-tdep.c: Likewise.
10685 * linespec.c: Likewise.
10686 * ui-out.c: Likewise.
10687
10688 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
10689
10690 PR gdb/19637
10691 * python/lib/gdb/printer/bound_registers.py: Import sys.
10692
10693 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
10694
10695 * windows-nat.c (do_windows_fetch_inferior_registers): Add
10696 windows_thread_info parameter and use it instead of
10697 current_thread.
10698 (windows_fetch_inferior_registers): Don't set current_thread,
10699 pass the thread to do_windows_fetch_inferior_registers. Use
10700 ptid from regcache instead of inferior_ptid.
10701 (do_windows_store_inferior_registers): Add windows_thread_info
10702 parameter and use it instead of current_thread.
10703 (windows_store_inferior_registers): Don't set current_thread,
10704 pass the thread to do_windows_store_inferior_registers. Use
10705 ptid from regcache instead of inferior_ptid.
10706
10707 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
10708
10709 * ser-mingw.c (ser_windows_raw): Remove reference to
10710 struct serial::current_timeout.
10711
10712 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
10713
10714 PR tdep/20928
10715 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
10716 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
10717 (sparc64_fsr_type): Fix %fsr decoding.
10718
10719 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
10720
10721 * python/py-record-btrace.c (btpy_insn_data): Change return type
10722 for Python 2.
10723
10724 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
10725
10726 * spu-linux-nat.c (spu_fetch_inferior_registers,
10727 spu_store_inferior_registers): Use ptid from regcache, set and
10728 restore inferior_ptid.
10729 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
10730 Likewise.
10731
10732 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
10733
10734 * i386-linux-nat.c (fetch_register, store_register,
10735 i386_linux_fetch_inferior_registers,
10736 i386_linux_store_inferior_registers): Use ptid from regcache.
10737 * ia64-linux-nat.c (ia64_linux_fetch_register,
10738 ia64_linux_store_register): Likewise.
10739 * inf-ptrace.c (inf_ptrace_fetch_register,
10740 inf_ptrace_store_register): Likewise.
10741 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
10742 m32r_linux_store_inferior_registers): Likewise.
10743 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
10744 m68kbsd_store_inferior_registers): Likewise.
10745 * m68k-linux-nat.c (fetch_register, store_register,
10746 m68k_linux_fetch_inferior_registers,
10747 m68k_linux_store_inferior_registers): Likewise.
10748 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
10749 m88kbsd_store_inferior_registers): Likewise.
10750 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
10751 mips_fbsd_store_inferior_registers): Likewise.
10752 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
10753 mips64_linux_regsets_store_registers): Likewise.
10754 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
10755 mipsnbsd_store_inferior_registers): Likewise.
10756 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
10757 mips64obsd_store_inferior_registers): Likewise.
10758 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
10759 Likewise.
10760 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
10761 ppcfbsd_store_inferior_registers): Likewise.
10762 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
10763 ppc_linux_store_inferior_registers): Likewise.
10764 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
10765 ppcnbsd_store_inferior_registers): Likewise.
10766 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
10767 ppcobsd_store_registers): Likewise.
10768 * procfs.c (procfs_fetch_registers, procfs_store_registers):
10769 Likewise.
10770 * ravenscar-thread.c (ravenscar_fetch_registers,
10771 ravenscar_store_registers, ravenscar_prepare_to_store):
10772 Likewise.
10773 * record-btrace.c (record_btrace_fetch_registers,
10774 record_btrace_store_registers, record_btrace_prepare_to_store):
10775 Likewise.
10776 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
10777 Lookup inferior using ptid from regcache, instead of
10778 current_inferior.
10779 * remote.c (remote_fetch_registers, remote_store_registers): Use
10780 ptid from regcache.
10781 * rs6000-nat.c (fetch_register, store_register): Likewise.
10782 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
10783 s390_linux_store_inferior_registers): Likewise.
10784 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10785 shnbsd_store_inferior_registers): Likewise.
10786 * sol-thread.c (sol_thread_fetch_registers,
10787 sol_thread_store_registers): Likewise.
10788 * sparc-nat.c (sparc_fetch_inferior_registers,
10789 sparc_store_inferior_registers): Likewise.
10790 * tilegx-linux-nat.c (fetch_inferior_registers,
10791 store_inferior_registers): Likewise.
10792 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10793 vaxbsd_store_inferior_registers): Likewise.
10794 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10795 store_xtregs): Likewise.
10796
10797 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10798
10799 PR gdb/14441
10800 * NEWS: Mention support for rvalue references in GDB and python.
10801 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10802 supports both lvalue and rvalue references.
10803
10804 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10805
10806 PR gdb/14441
10807 * gdbtypes.c (rank_one_type): Implement overloading
10808 resolution rules regarding rvalue references.
10809
10810 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10811
10812 PR gdb/14441
10813 * aarch64-tdep.c (aarch64_type_align)
10814 (aarch64_extract_return_value, aarch64_store_return_value): Change
10815 lvalue reference type checks to general reference type checks.
10816 * amd64-tdep.c (amd64_classify): Likewise.
10817 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10818 Likewise.
10819 * arm-tdep.c (arm_type_align, arm_extract_return_value)
10820 (arm_store_return_value): Likewise.
10821 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10822 * c-typeprint.c (c_print_type): Likewise.
10823 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10824 (cplus_number_of_children, cplus_describe_child): Likewise.
10825 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10826 * completer.c (expression_completer): Likewise.
10827 * cp-support.c (make_symbol_overload_list_adl_namespace):
10828 Likewise.
10829 * darwin-nat-info.c (info_mach_region_command): Likewise.
10830 * dwarf2loc.c (entry_data_value_coerce_ref)
10831 (value_of_dwarf_reg_entry): Likewise.
10832 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10833 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10834 Likewise.
10835 * findvar.c (extract_typed_address, store_typed_address):
10836 Likewise.
10837 * gdbtypes.c (rank_one_type): Likewise.
10838 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10839 * infcall.c (value_arg_coerce): Likewise.
10840 * language.c (pointer_type): Likewise.
10841 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10842 Likewise.
10843 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10844 * mn10300-tdep.c (mn10300_type_align): Likewise.
10845 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10846 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10847 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10848 Likewise.
10849 * printcmd.c (print_formatted, x_command): Likewise.
10850 * python/py-type.c (typy_get_composite, typy_template_argument):
10851 Likewise.
10852 * python/py-value.c (valpy_referenced_value)
10853 (valpy_get_dynamic_type, value_has_field): Likewise.
10854 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10855 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10856 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10857 * spu-tdep.c (spu_scalar_value_p): Likewise.
10858 * symtab.c (lookup_symbol_aux): Likewise.
10859 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10860 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10861 Likewise.
10862 * valops.c (value_cast_pointers, value_cast)
10863 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10864 (value_struct_elt, value_struct_elt_bitpos)
10865 (value_find_oload_method_list, find_overload_match)
10866 (value_rtti_indirect_type): Likewise.
10867 * valprint.c (val_print_scalar_type_p, generic_val_print):
10868 Likewise.
10869 * value.c (value_actual_type, value_as_address, unpack_long)
10870 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10871 (coerce_ref): Likewise.
10872 * varobj.c (varobj_get_value_type): Likewise.
10873
10874 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10875
10876 PR gdb/14441
10877 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10878 table of constants.
10879 * python/lib/gdb/command/explore.py: Support exploring values
10880 of rvalue reference types.
10881 * python/lib/gdb/types.py: Implement get_basic_type() for
10882 rvalue reference types.
10883 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10884 constant.
10885 * python/py-value.c (valpy_getitem): Add an rvalue reference
10886 check.
10887 (valpy_reference_value): Add new parameter "refcode".
10888 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10889 New wrappers for valpy_reference_value().
10890 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10891 (gdbpy_invoke_xmethod): Likewise.
10892
10893 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10894
10895 PR gdb/14441
10896 * dwarf2read.c (process_die, read_type_die_1): Handle the
10897 DW_TAG_rvalue_reference_type DIE.
10898 (read_tag_reference_type): Add new parameter "refcode".
10899
10900 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10901
10902 PR gdb/14441
10903 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10904 (c_type_print_modifier, c_type_print_varspec_suffix)
10905 (c_type_print_base): Support printing rvalue reference types.
10906 * c-valprint.c (c_val_print, c_value_print): Support printing
10907 rvalue reference values.
10908
10909 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10910
10911 PR gdb/14441
10912 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10913 typename.
10914 * cp-support.c (replace_typedefs): Handle
10915 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10916 * python/py-type.c (typy_lookup_type): Likewise.
10917
10918 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10919
10920 PR gdb/14441
10921 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10922 * parse.c (insert_type): Change assert statement.
10923 (follow_types): Handle rvalue reference types.
10924 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10925 constant.
10926
10927 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10928
10929 PR gdb/14441
10930 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10931 value_ref() interface.
10932 * c-valprint.c (c_value_print): Likewise.
10933 * infcall.c (value_arg_coerce): Likewise.
10934 * python/py-value.c (valpy_reference_value): Likewise.
10935 * valops.c (value_cast, value_reinterpret_cast)
10936 (value_dynamic_cast, typecmp): Likewise.
10937 (value_ref): Parameterize by kind of return value reference type.
10938 * value.h (value_ref): Add new parameter "refcode".
10939
10940 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10941
10942 PR gdb/14441
10943 * dwarf2read.c (read_tag_reference_type): Use
10944 lookup_lvalue_reference_type() instead of lookup_reference_type().
10945 * eval.c (evaluate_subexp_standard): Likewise.
10946 * f-exp.y: Likewise.
10947 * gdbtypes.c (make_reference_type, lookup_reference_type):
10948 Generalize with rvalue reference types.
10949 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10950 convenience wrappers for lookup_reference_type().
10951 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10952 reference kind parameter.
10953 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10954 wrappers for lookup_reference_type().
10955 * guile/scm-type.c (gdbscm_type_reference): Use
10956 lookup_lvalue_reference_type() instead of lookup_reference_type().
10957 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10958 * parse.c (follow_types): Likewise.
10959 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10960 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10961 Likewise.
10962 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10963 (gdbpy_invoke_xmethod): Likewise.
10964 * stabsread.c: Provide extra argument to make_reference_type()
10965 call.
10966 * valops.c (value_ref, value_rtti_indirect_type): Use
10967 lookup_lvalue_reference_type() instead of lookup_reference_type().
10968
10969 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10970
10971 PR gdb/14441
10972 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10973 (TYPE_IS_REFERENCE): New macro.
10974 (struct type): Add rvalue_reference_type field.
10975 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10976
10977 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
10978
10979 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10980 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10981 New function definition.
10982 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10983 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10984 New function declaration.
10985 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10986 * mi/mi-interp.h: New file.
10987 * solib.c (info_sharedlibrary_command): Replace for loop with
10988 ALL_SO_LIBS macro
10989 * solib.h (update_solib_list): New function declaration.
10990 (so_list_head): Move macro.
10991 * solist.h (ALL_SO_LIBS): New macro.
10992
10993 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
10994
10995 * infcmd.c (post_create_inferior): Remove unused argument in
10996 call to solib_add.
10997 * remote.c (remote_start_remote): Likewise.
10998 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10999 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11000 (enable_break): Likewise.
11001 * solib.c (update_solib_list): Remove unused target argument
11002 and its documentation.
11003 (solib_add): Remove unused target argument. Remove unused
11004 argument in call to update_solib_list.
11005 (info_sharedlibrary_command): Remove unused argument in call
11006 to update_solib_list.
11007 (sharedlibrary_command): Remove unused argument in call to
11008 solib_add.
11009 (handle_solib_event): Likewise.
11010 (reload_shared_libraries): Likewise.
11011 * solib.h (solib_add): Remove unused target argument.
11012
11013 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
11014
11015 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11016 (s390_displaced_step_fixup): Cover relative branches with the
11017 default fixup handling. This fixes lack of support for some
11018 relative branch instructions.
11019
11020 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11021
11022 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11023 ptid from regcache.
11024
11025 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11026
11027 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11028 i386_darwin_store_inferior_registers): Use ptid from regcache.
11029
11030 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11031
11032 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11033 i386bsd_store_inferior_registers): Use ptid from regcache.
11034
11035 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11036
11037 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11038 hppaobsd_store_registers): Use ptid from regcache.
11039
11040 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11041
11042 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11043 hppanbsd_store_registers): Use ptid from regcache.
11044
11045 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11046
11047 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11048 from regcache. Use get_ptrace_pid.
11049
11050 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11051
11052 * corelow.c (get_core_register_section): Use ptid from regcache,
11053 update doc.
11054
11055 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11056
11057 * bsd-uthread.c (bsd_uthread_fetch_registers,
11058 bsd_uthread_store_registers): Use ptid from regcache, set and
11059 restore inferior_ptid.
11060
11061 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11062
11063 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11064 fetch_fp_regs, store_register, store_regs, store_fp_register,
11065 store_fp_regs): Use ptid from regcache.
11066
11067 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11068
11069 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11070 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11071 store_vfp_regs): Use ptid from regcache.
11072
11073 2017-03-17 Pedro Alves <palves@redhat.com>
11074
11075 PR remote/21188
11076 * ser-base.c (ser_base_wait_for): Add comment.
11077 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11078 version.
11079 * ser-unix.c (hardwire_raw): Remove reference to
11080 scb->current_timeout.
11081 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11082 (hardwire_ops): Install ser_base_readchar instead of
11083 hardwire_readchar.
11084 * serial.h (struct serial) <current_timeout, timeout_remaining>:
11085 Remove fields.
11086
11087 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
11088
11089 PR gdb/19637
11090 * python/lib/gdb/printer/bound_registers.py: Add support for
11091 Python 3.
11092
11093 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
11094
11095 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11096 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11097 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11098 byte_offset to subobj_byte_offset. Fix the handling of
11099 DWARF_VALUE_STACK on big-endian targets when coming via an
11100 implicit pointer.
11101 (dwarf2_evaluate_loc_desc): Adjust call to
11102 dwarf2_evaluate_loc_desc_full.
11103 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11104 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11105
11106 2017-03-16 Yao Qi <yao.qi@linaro.org>
11107
11108 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11109 and REVSH instructions.
11110
11111 2017-03-16 Yao Qi <yao.qi@linaro.org>
11112
11113 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11114 (arm_record_test): Declare.
11115 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11116 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11117 align with the manual.
11118 (thumb_record_misc): Adjust the code order to align with the
11119 manual.
11120 (thumb2_record_decode_insn_handler): Fix instruction matching.
11121 (instruction_reader_thumb): New class.
11122 (arm_record_test): New function.
11123
11124 2017-03-16 Yao Qi <yao.qi@linaro.org>
11125
11126 * arm-tdep.c (abstract_memory_reader): New class.
11127 (instruction_reader): New class.
11128 (extract_arm_insn): Add argument 'reader'. Callers updated.
11129 (decode_insn): Likewise.
11130
11131 2017-03-16 Doug Evans <dje@google.com>
11132
11133 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
11134 member. Change type of TYPE member to SCM. All uses updated.
11135 (lsscm_make_lazy_string_smob): Add assert.
11136 (lsscm_make_lazy_string): Flag bad length values.
11137 (lsscm_elt_type): New function.
11138 (gdbscm_lazy_string_to_value): Rewrite to use
11139 lsscm_safe_lazy_string_to_value.
11140 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
11141 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
11142 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
11143 in incoming type.
11144 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11145 * guile/scm-type.c (tyscm_scm_to_type): New function.
11146
11147 2017-03-15 Doug Evans <dje@google.com>
11148
11149 PR python/17728, python/18439, python/18779
11150 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
11151 member. Change type of TYPE member to PyObject *. All uses updated.
11152 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11153 (gdbpy_create_lazy_string_object): Flag bad length values.
11154 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11155 Handle typedefs in incoming type.
11156 (stpy_lazy_string_elt_type): New function.
11157 (gdbpy_extract_lazy_string): Call it.
11158 * python/py-value.c (valpy_lazy_string): Flag bad length values.
11159 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
11160 typedefs in incoming type.
11161
11162 2017-03-16 Doug Evans <dje@google.com>
11163
11164 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11165 * guile/scm-type.c (tyscm_scm_to_type): New function.
11166
11167 2017-03-16 Jiong Wang <jiong.wang@arm.com>
11168
11169 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11170 "ULONGEST" for "skip".
11171
11172 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
11173
11174 PR gdb/21220
11175 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11176 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11177 (inf_ptrace_peek_poke): ...here. New function. Now also loop
11178 over ptrace peek/poke until end of buffer or error.
11179
11180 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
11181
11182 * parse.c (length_of_subexp): Make static.
11183 * parser-defs.h (length_of_subexp): Remove.
11184
11185 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
11186
11187 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11188 as well.
11189
11190 2017-03-14 Pedro Alves <palves@redhat.com>
11191
11192 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11193 (main): Use std::unique_ptr. Remove calls to
11194 cp_demangled_name_parse_free.
11195
11196 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11197
11198 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11199 alphabsd_store_inferior_registers): Use regcache->ptid instead
11200 of inferior_ptid.
11201
11202 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11203
11204 * aix-thread.c (aix_thread_fetch_registers,
11205 aix_thread_store_registers): Use regcache->ptid instead of
11206 inferior_ptid.
11207
11208 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11209
11210 * aarch64-linux-nat.c (fetch_gregs_from_thread,
11211 store_gregs_to_thread, fetch_fpregs_from_thread,
11212 store_fpregs_to_thread): Use regcache->ptid instead of
11213 inferior_ptid.
11214
11215 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11216
11217 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11218 amd64_linux_fetch_inferior_registers): Use regcache->ptid
11219 instead of inferior_ptid.
11220
11221 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11222
11223 * target.c (target_fetch_registers, target_store_registers): Add
11224 assert.
11225
11226 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11227
11228 * regcache.h (regcache_get_ptid): New function.
11229 * regcache.c (regcache_get_ptid): New function.
11230
11231 2017-03-13 Mark Wielaard <mark@klomp.org>
11232
11233 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11234
11235 2017-03-10 Keith Seitz <keiths@redhat.com>
11236
11237 PR c++/8218
11238 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11239
11240 2017-03-08 Pedro Alves <palves@redhat.com>
11241
11242 PR gdb/18360
11243 * infrun.c (start_step_over, do_target_resume, resume)
11244 (restart_threads): Assert we're not resuming a thread that is
11245 meant to be stopped.
11246 (infrun_thread_stop_requested_callback): Delete.
11247 (infrun_thread_stop_requested): If the thread is internally
11248 stopped, queue a pending stop event and clear the thread's
11249 inline-frame state.
11250 (handle_stop_requested): New function.
11251 (handle_syscall_event, handle_inferior_event_1): Use
11252 handle_stop_requested.
11253 (handle_stop_requested): New function.
11254 (handle_signal_stop): Set the thread's stop_signal here instead of
11255 at caller.
11256 (finish_step_over): Clear step over info unconditionally.
11257 (handle_signal_stop): If the user had interrupted the event
11258 thread, consider the stop a random signal.
11259 (handle_signal_stop) <signal arrived while stepping over
11260 breakpoint>: Don't restart threads here.
11261 (stop_waiting): Don't clear step-over info here.
11262
11263 2017-03-08 Pedro Alves <palves@redhat.com>
11264
11265 PR 21206
11266 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
11267 goes to argument 2, not 1.
11268
11269 2017-03-08 Pedro Alves <palves@redhat.com>
11270
11271 PR cli/21218
11272 * top.c (gdb_readline_wrapper): Avoid passing NULL to
11273 display_gdb_prompt.
11274 (command_line_input): Add comment.
11275
11276 2017-03-08 Pedro Alves <palves@redhat.com>
11277
11278 PR tui/21216
11279 * tui/tui-file.c (tui_file::write): New.
11280 * tui/tui-file.h (tui_file): Override "write".
11281 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
11282 factored out from ...
11283 (tui_puts): ... here.
11284 (tui_putc): Use them.
11285 (tui_write): New function.
11286 * tui/tui-io.h (tui_write): Declare.
11287
11288 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
11289
11290 * Makefile.in (SFILES): Replace "environ.c" with
11291 "common/environ.c".
11292 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
11293 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
11294 to...
11295 * common/environ.c: ... here.
11296 * environ.h: Moved to...
11297 * common/environ.h: ... here.
11298
11299 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
11300
11301 * gdbarch.sh (pstring_ptr): New static function.
11302 (gdbarch_disassembler_options): Use it.
11303 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
11304 not valid_disassembler_option->name.
11305 * gdbarch.c: Regenerate.
11306
11307 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
11308
11309 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
11310
11311 2017-03-07 Pedro Alves <palves@redhat.com>
11312
11313 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
11314
11315 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
11316
11317 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
11318 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
11319 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
11320 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
11321
11322 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
11323
11324 * xtensa-linux-nat.c (fetch_gregs): Remove const.
11325
11326 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
11327
11328 * remote.c (remote_add_target_side_commands): Use range-based
11329 for loop.
11330
11331 2017-03-03 Yao Qi <yao.qi@linaro.org>
11332
11333 PR gdb/21165
11334 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
11335 value is lazy.
11336 * valprint.c (common_val_print): Likewise.
11337
11338 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
11339
11340 * NEWS: Mention new set/show disassembler-options commands.
11341 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
11342 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
11343 (prospective_options): New static variable.
11344 (gdb_disassembler::gdb_disassembler): Initialize
11345 m_di.disassembler_options.
11346 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
11347 (get_disassembler_options): New function.
11348 (set_disassembler_options): Likewise.
11349 (set_disassembler_options_sfunc): Likewise.
11350 (show_disassembler_options_sfunc): Likewise.
11351 (disassembler_options_completer): Likewise.
11352 (_initialize_disasm): Likewise.
11353 * disasm.h (get_disassembler_options): New prototype.
11354 (set_disassembler_options): Likewise.
11355 * gdbarch.sh (gdbarch_disassembler_options): New variable.
11356 (gdbarch_verify_disassembler_options): Likewise.
11357 * gdbarch.c: Regenerate.
11358 * gdbarch.h: Likewise.
11359 * arm-tdep.c (num_disassembly_options): Delete.
11360 (set_disassembly_style): Likewise.
11361 (arm_disassembler_options): New static variable.
11362 (set_disassembly_style_sfunc): Convert short style name into long
11363 option name. Call set_disassembler_options.
11364 (show_disassembly_style_sfunc): New function.
11365 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
11366 set_gdbarch_verify_disassembler_options.
11367 (_initialize_arm_tdep): Delete regnames variable and update callers.
11368 (arm_disassembler_options): Initialize.
11369 (disasm_options): New variable.
11370 (num_disassembly_options): Rename from this...
11371 (num_disassembly_styles): ...to this. Compute by scanning through
11372 disasm_options.
11373 (valid_disassembly_styles): Initialize using disasm_options.
11374 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
11375 set_arm_regname_option.
11376 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
11377 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
11378 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
11379 set_gdbarch_verify_disassembler_options.
11380 * s390-tdep.c (s390_disassembler_options): New static variable.
11381 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
11382 set_gdbarch_verify_disassembler_options.
11383
11384 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
11385
11386 * remote.c (remote_add_target_side_condition): Remove "struct"
11387 keyword from range-based for loop.
11388
11389 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
11390
11391 * remote.c (remote_add_target_side_condition): Use range-based
11392 for loop. Update comment.
11393
11394 2017-02-27 Yao Qi <yao.qi@linaro.org>
11395
11396 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
11397
11398 2017-02-26 Alan Hayward <alan.hayward@arm.com>
11399
11400 * regcache.c (regcache_raw_update): New function.
11401 (regcache_raw_read): Move code to regcache_raw_update.
11402 * regcache.h (regcache_raw_update): New declaration.
11403 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
11404
11405 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
11406
11407 * dwarf2read.c (create_debug_type_hash_table): Initialize
11408 header.signature and header.type_offset_in_tu.
11409
11410 2017-02-24 Pedro Alves <palves@redhat.com>
11411
11412 * symtab.c (make_file_symbol_completion_list_1): Use
11413 add_symtab_completions.
11414
11415 2017-02-24 Alan Hayward <alan.hayward@arm.com>
11416
11417 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
11418
11419 2017-02-24 Alan Hayward <alan.hayward@arm.com>
11420
11421 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
11422 I386_MAX_REGISTER_SIZE.
11423 (i386_pseudo_register_write): Likewise.
11424 (i386_process_record): Likewise.
11425 * i387-tdep.c (i387_supply_xsave): Likewise.
11426 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
11427 (store_register): Likewise.
11428
11429 2017-02-23 Pedro Alves <palves@redhat.com>
11430
11431 * ada-lang.c: Include "common/function-view.h".
11432 (ada_iterate_over_symbols): Adjust to use function_view as
11433 callback type.
11434 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
11435 (ada_make_symbol_completion_list): Use a lambda.
11436 (ada_exc_search_name_matches): Delete.
11437 (name_matches_regex): New.
11438 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
11439 * compile/compile-c-support.c: Include "common/function-view.h".
11440 (print_one_macro): Change prototype to accept a ui_file pointer.
11441 (write_macro_definitions): Use a lambda.
11442 * dwarf2read.c: Include "common/function-view.h".
11443 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
11444 (dw2_expand_symtabs_matching): Adjust to use function_view as
11445 callback type.
11446 * language.h: Include "common/function-view.h".
11447 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
11448 function_view as callback type.
11449 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
11450 * linespec.c: Include "common/function-view.h".
11451 (collect_info::add_symbol): New method.
11452 (struct symbol_and_data_callback, iterate_inline_only, struct
11453 symbol_matcher_data, iterate_name_matcher): Delete.
11454 (iterate_over_all_matching_symtabs): Adjust to use function_view
11455 as callback type and lambdas.
11456 (iterate_over_file_blocks): Adjust to use function_view as
11457 callback type.
11458 (decode_compound_collector): Now a class with private fields.
11459 (decode_compound_collector::release_symbols): New method.
11460 (collect_one_symbol): Rename to...
11461 (decode_compound_collector::operator()): ... this and adjust.
11462 (lookup_prefix_sym): decode_compound_collector construction bits
11463 move to decode_compound_collector ctor. Pass the
11464 decode_compound_collector object directly as callback. Remove
11465 cleanups and use decode_compound_collector::release_symbols
11466 instead.
11467 (symtab_collector): Now a class with private fields.
11468 (symtab_collector::release_symtabs): New method.
11469 (add_symtabs_to_list): Rename to...
11470 (symtab_collector::operator()): ... this and adjust.
11471 (collect_symtabs_from_filename): symtab_collector construction
11472 bits move to symtab_collector ctor. Pass the symtab_collector
11473 object directly as callback. Remove cleanups and use
11474 symtab_collector::release_symtabs instead.
11475 (collect_symbols): Delete.
11476 (add_matching_symbols_to_info): Use lambdas.
11477 * macrocmd.c (print_macro_callback): Delete.
11478 (info_macro_command): Use a lambda.
11479 (info_macros_command): Pass print_macro_definition as callable
11480 directly.
11481 (print_one_macro): Remove 'ignore' parameter.
11482 (macro_list_command): Adjust.
11483 * macrotab.c (macro_for_each_data::fn): Now a function_view.
11484 (macro_for_each_data::user_data): Delete field.
11485 (foreach_macro): Adjust to call the function_view.
11486 (macro_for_each): Adjust to use function_view as callback type.
11487 (foreach_macro_in_scope): Adjust to call the function_view.
11488 (macro_for_each_in_scope): Adjust to use function_view as callback
11489 type.
11490 * macrotab.h: Include "common/function-view.h".
11491 (macro_callback_fn): Declare a prototype instead of a pointer.
11492 Remove "user_data" parameter.
11493 (macro_for_each, macro_for_each_in_scope): Adjust to use
11494 function_view as callback type.
11495 * psymtab.c (partial_map_expand_apply)
11496 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
11497 Adjust to use function_view as callback type and to return bool.
11498 (psym_expand_symtabs_matching): Adjust to use function_view as
11499 callback types.
11500 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
11501 to use function_view as callback type and to return bool.
11502 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
11503 callback types.
11504 * symfile.c (expand_symtabs_matching): Adjust to use function_view
11505 as callback types.
11506 * symfile.h: Include "common/function-view.h".
11507 (expand_symtabs_file_matcher_ftype)
11508 (expand_symtabs_symbol_matcher_ftype)
11509 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
11510 return bool.
11511 (quick_symbol_functions::map_symtabs_matching_filename)
11512 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
11513 function_view as callback type and return bool.
11514 (expand_symtabs_matching): Adjust to use function_view as callback
11515 type.
11516 (maintenance_expand_name_matcher)
11517 (maintenance_expand_file_matcher): Delete.
11518 (maintenance_expand_symtabs): Use lambdas.
11519 * symtab.c (iterate_over_some_symtabs): Adjust to use
11520 function_view as callback types and return bool.
11521 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
11522 of a cleanup.
11523 (lookup_symtab_callback): Delete.
11524 (lookup_symtab): Use a lambda.
11525 (iterate_over_symbols): Adjust to use function_view as callback
11526 type.
11527 (struct search_symbols_data, search_symbols_file_matches)
11528 (search_symbols_name_matches): Delete.
11529 (search_symbols): Use a pair of lambdas.
11530 (struct add_name_data, add_macro_name, symbol_completion_matcher)
11531 (symtab_expansion_callback): Delete.
11532 (default_make_symbol_completion_list_break_on_1): Use lambdas.
11533 * symtab.h: Include "common/function-view.h".
11534 (iterate_over_some_symtabs): Adjust to use function_view as
11535 callback type and return bool.
11536 (iterate_over_symtabs): Adjust to use function_view as callback
11537 type.
11538 (symbol_found_callback_ftype): Remove 'data' parameter and return
11539 bool.
11540 (iterate_over_symbols): Adjust to use function_view as callback
11541 type.
11542
11543 2017-02-23 Pedro Alves <palves@redhat.com>
11544
11545 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
11546 (%.o) <unittests/%.c>: New pattern.
11547 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
11548 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
11549 * common/function-view.h: New file.
11550 * unittests/function-view-selftests.c: New file.
11551 * configure: Regenerate.
11552
11553 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
11554
11555 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
11556 inferior_ptid.
11557 * go32-nat.c (go32_thread_alive): Likewise.
11558
11559 2017-02-23 Yao Qi <yao.qi@linaro.org>
11560
11561 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
11562 delete.
11563
11564 2017-02-23 Yao Qi <yao.qi@linaro.org>
11565
11566 * varobj.c (varobj_clear_saved_item): Use delete instead of
11567 xfree.
11568 (update_dynamic_varobj_children): Likewise.
11569
11570 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11571
11572 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
11573
11574 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
11575
11576 * common/enum-flags.h (enum_flags::enum_flags): Initialize
11577 m_enum_value to 0 in default constructor.
11578
11579 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11580
11581 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
11582 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
11583 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
11584 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
11585 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
11586 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
11587 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
11588 IS_STORE_CONDITIONAL_INSN.
11589
11590 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11591
11592 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
11593
11594 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11595
11596 * NEWS (Changes since GDB 7.12): Add DWARF-5.
11597
11598 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11599
11600 * dwarf2read.c (skip_one_die, read_attribute_value)
11601 (dwarf2_const_value_attr, dump_die_shallow)
11602 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
11603 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
11604
11605 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11606
11607 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
11608 (dwarf_parse_macro_header): Accept DWARF version 5.
11609 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
11610
11611 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11612
11613 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
11614 DW_AT_GNU_*.
11615 * common/common-exceptions.h (enum errors): Likewise.
11616 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
11617 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
11618 (dwarf_expr_context::execute_stack_op): Likewise.
11619 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
11620 Likewise.
11621 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
11622 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
11623 (show_entry_values_debug, call_site_to_target_addr)
11624 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
11625 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
11626 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
11627 (value_of_dwarf_block_entry, indirect_pieced_value)
11628 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
11629 (disassemble_dwarf_expression): Likewise.
11630 * dwarf2read.c (process_die, inherit_abstract_dies)
11631 (read_call_site_scope): Likewise.
11632 * gdbtypes.h (struct func_type, struct call_site_parameter)
11633 (struct call_site): Likewise.
11634 * stack.c (read_frame_arg): Likewise.
11635 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
11636
11637 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11638
11639 * defs.h (read_unsigned_leb128): New declaration.
11640 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
11641 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
11642 (dwarf2_find_location_expression): Call also
11643 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
11644 * dwarf2loc.h (dwarf2_version): New declaration.
11645 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
11646 rnglists.
11647 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
11648 .debug_rnglists.
11649 (struct dwop_section_names): Add loclists_dwo.
11650 (dwop_section_names): Add .debug_loclists.dwo.
11651 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
11652 (struct dwarf2_per_cu_data): Add dwarf_version.
11653 (struct dwo_sections): Add loclists.
11654 (struct attr_abbrev): Add implicit_const.
11655 (read_indirect_line_string): New declaration.
11656 (read_unsigned_leb128): Delete declaration.
11657 (rcuh_kind): New definition.
11658 (read_and_check_comp_unit_head): Change parameter
11659 is_debug_types_section to section_kind.
11660 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
11661 (read_comp_unit_head): Change parameter abfd to section, add parameter
11662 section_kind. Handle DWARF-5.
11663 (error_check_comp_unit_head): Accept also DWARF version 5.
11664 (read_and_check_comp_unit_head): Change parameter
11665 is_debug_types_section to section_kind.
11666 (read_and_check_type_unit_head): Delete function.
11667 (read_abbrev_offset): Handle DWARF-5.
11668 (create_debug_type_hash_table): Add parameter section_kind. Process
11669 only DW_UT_type. Use signature and type_offset_in_tu from struct
11670 comp_unit_head.
11671 (create_debug_types_hash_table): Update create_debug_type_hash_table
11672 caller.
11673 (create_all_type_units): Call create_debug_type_hash_table.
11674 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
11675 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
11676 caller.
11677 (skip_one_die): Handle DW_FORM_implicit_const.
11678 (dwarf2_rnglists_process): New function.
11679 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
11680 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
11681 (read_attribute_value): Handle DW_FORM_implicit_const,
11682 DW_FORM_line_strp.
11683 (read_attribute): Handle DW_FORM_implicit_const.
11684 (read_indirect_string_at_offset_from): New function from
11685 read_indirect_string_at_offset.
11686 (read_indirect_string_at_offset): Call
11687 read_indirect_string_at_offset_from.
11688 (read_indirect_line_string_at_offset): New function.
11689 (read_indirect_string): New function comment.
11690 (read_indirect_line_string): New function.
11691 (read_unsigned_leb128): Make it global.
11692 (dwarf2_string_attr): Handle DWARF-5.
11693 (add_include_dir_stub, read_formatted_entries): New functions.
11694 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
11695 Handle DWARF-5.
11696 (per_cu_header_read_in): Update read_comp_unit_head caller.
11697 (dwarf2_version): New function.
11698 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
11699 rnglists.
11700 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
11701 fields.
11702
11703 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11704
11705 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
11706
11707 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11708
11709 * dwarf2read.c (dwarf2_ranges_process): New function from
11710 dwarf2_ranges_read.
11711 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
11712 dwarf2_ranges_process.
11713
11714 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11715
11716 * dwarf2read.c (create_debug_type_hash_table): New function from
11717 create_debug_types_hash_table.
11718 (create_debug_types_hash_table): Call create_debug_type_hash_table.
11719 (create_all_type_units, open_and_init_dwo_file): Update
11720 create_debug_types_hash_table callers.
11721
11722 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
11723
11724 PR gdb/16188
11725 * fork-child.c (trace_start_error): Fix thinko. va_end should
11726 refer to 'ap', not 'args'.
11727
11728 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
11729 Pedro Alves <palves@redhat.com>
11730
11731 PR gdb/16188
11732 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
11733 calls succeeded.
11734 * fork-child.c (trace_start_error): New function.
11735 (trace_start_error_with_name): Likewise.
11736 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
11737 * inf-ptrace.c (inf_ptrace_me): Likewise.
11738 * inferior.h (trace_start_error): New prototype.
11739 (trace_start_error_with_name): Likewise.
11740
11741 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
11742
11743 PR gdb/21164
11744 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
11745 NULL before using it.
11746 * symmisc.c (maintenance_print_symbols): Likewise.
11747 (maintenance_print_msymbols): Likewise.
11748
11749 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11750
11751 * NEWS: Add record Python bindings entry.
11752
11753 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11754
11755 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
11756 py-record-full.o.
11757 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
11758 * python/py-record-btrace.c, python/py-record-btrace.h,
11759 python/py-record-full.c, python/py-record-full.h: New file.
11760 * python/py-record.c: Add include for py-record-btrace.h and
11761 py-record-full.h.
11762 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
11763 recpy_instruction_history, recpy_function_call_history, recpy_begin,
11764 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
11765 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
11766 New definition.
11767 (gdbpy_initialize_btrace): New export.
11768 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
11769
11770 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11771
11772 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
11773 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
11774 * python/py-record.c: New file.
11775 * python/python-internal.h (gdbpy_start_recording,
11776 gdbpy_current_recording, gdpy_stop_recording,
11777 gdbpy_initialize_record): New export.
11778 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
11779 (python_GdbMethods): Add gdbpy_start_recording,
11780 gdbpy_current_recording and gdbpy_stop_recording.
11781
11782 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11783
11784 * record-btrace.c (record_btrace_record_method): New function.
11785 (init_record_btrace_ops): Initialize to_record_method.
11786 * record-full.c (record_full_record_method): New function.
11787 (init_record_full_ops, init_record_full_core_ops): Add
11788 record_full_record_method.
11789 * record.h (enum record_method): New enum.
11790 * target-debug.h (target_debug_print_enum_record_method: New define.
11791 * target-delegates.c: Regenerate.
11792 * target.c (target_record_method): New function.
11793 * target.h: Include record.h.
11794 (struct target_ops) <to_record_method>: New field.
11795 (target_record_method): New export.
11796
11797 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11798
11799 * record.h (record_start, record_stop): New export.
11800 * record.c (record_start, record_stop): New function.
11801
11802 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11803
11804 * btrace.c (btrace_fetch): Copy function call segments pointer
11805 into a vector.
11806 (btrace_clear): Clear the vector.
11807 (btrace_find_insn_by_number): Use binary search to find the correct
11808 function call segment.
11809 * btrace.h (brace_fun_p): New typedef.
11810 (struct btrace_thread_info) <functions>: New field.
11811
11812 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11813
11814 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11815 * btrace.c (btrace_decode_error): ... here. New function.
11816 * btrace.h (btrace_decode_error): New export.
11817
11818 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11819
11820 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11821 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11822 btrace_find_insn_by_number): Remove special case for gaps.
11823 * btrace.h (btrace_insn_get_error): New export.
11824 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11825 * record-btrace.c (btrace_insn_history): Print number for gaps.
11826 (record_btrace_info, record_btrace_goto): Handle gaps.
11827
11828 2017-02-14 Tom Tromey <tom@tromey.com>
11829
11830 PR python/13598:
11831 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11832 event.
11833 * python/py-evts.c (gdbpy_initialize_py_events): Add
11834 before_prompt registry.
11835 * python/py-events.h (events_object) <before_prompt>: New field.
11836
11837 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
11838
11839 * btrace.c (ftrace_new_switch): Preserve up link and flags.
11840
11841 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
11842
11843 * symfile (_initialize_symfile): Add usage text to the load command's
11844 help text.
11845
11846 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
11847
11848 * utils.c (defaulted_query): Don't query on secondary UIs.
11849
11850 2017-02-10 Tom Tromey <tom@tromey.com>
11851
11852 * rust-lang.c (rust_get_disr_info): Remove unused variable.
11853
11854 2017-02-10 Tom Tromey <tom@tromey.com>
11855
11856 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11857 "cleanup" local.
11858 * python/py-type.c (typy_legacy_template_argument): Remove
11859 unnecessary "cleanup" local.
11860
11861 2017-02-10 Tom Tromey <tom@tromey.com>
11862
11863 * python/python.c (do_start_initialization): New function, from
11864 _initialize_python.
11865 (_initialize_python): Call do_start_initialization.
11866 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11867 goto.
11868
11869 2017-02-10 Tom Tromey <tom@tromey.com>
11870
11871 * python/py-prettyprint.c (pretty_print_one_value): Use
11872 gdbpy_ref.
11873
11874 2017-02-10 Tom Tromey <tom@tromey.com>
11875
11876 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11877 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11878 gdbpy_ref.
11879 * python/py-type.c (field_new): Use gdbpy_ref.
11880 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11881 gdbpy_ref.
11882 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11883 (py_free_pspace): Likewise.
11884 (pspace_to_pspace_object): Likewise.
11885 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11886 (py_free_objfile): Likewise.
11887 (objfile_to_objfile_object): Likewise.
11888 * python/py-inferior.c (delete_thread_object): Use
11889 gdbpy_ref.
11890 (infpy_read_memory): Likewise.
11891 (py_free_inferior): Likewise.
11892 * python/py-evtregistry.c (create_eventregistry_object): Use
11893 gdbpy_ref.
11894 * python/py-event.c (create_event_object): Use gdbpy_ref.
11895
11896 2017-02-10 Tom Tromey <tom@tromey.com>
11897
11898 * python/py-ref.h (gdbpy_ref_policy): Now a template.
11899 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11900 used.
11901 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11902 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11903 python/py-exitedevent.c, python/py-finishbreakpoint.c,
11904 python/py-framefilter.c, python/py-function.c,
11905 python/py-inferior.c, python/py-infevents.c,
11906 python/py-linetable.c, python/py-newobjfileevent.c,
11907 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11908 python/py-signalevent.c, python/py-stopevent.c,
11909 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11910 python/py-unwind.c, python/py-utils.c, python/py-value.c,
11911 python/py-varobj.c, python/py-xmethods.c, python/python.c,
11912 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11913
11914 2017-02-10 Tom Tromey <tom@tromey.com>
11915
11916 * ui-out.h (ui_out_emit_type): New class.
11917 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11918 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11919 and ui_out_emit_tuple.
11920 (enumerate_locals): Likewise.
11921 (py_mi_print_variables, py_print_locals, py_print_args): Use
11922 ui_out_emit_list.
11923 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11924 ui_out_emit_list.
11925 * common/gdb_optional.h: New file.
11926
11927 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
11928
11929 * MAINTAINERS (Write After Approval): Update my e-mail address.
11930
11931 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
11932
11933 PR gdb/21122
11934 * breakpoint.c (_initialize_breakpoint): Update the help description
11935 of the 'commands' command to indicate that it takes a list argument.
11936
11937 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
11938
11939 * interps.c (current_interp_set_logging): Remove "return".
11940
11941 2017-02-09 Gary Benson <gbenson@redhat.com>
11942
11943 * symtab.c (add_symtab_completions): Prevent NULL pointer
11944 dereference.
11945
11946 2017-02-08 Pedro Alves <palves@redhat.com>
11947
11948 * interps.c (interp::interp): Remove reference to quiet_p.
11949 (interp_set): Make static. Remove dead "Switching to" output
11950 code.
11951 (interp_quiet_p, interp_set_quiet): Delete.
11952 (interpreter_exec_cmd): Don't set the interpreter quiet.
11953 * interps.h (interp_quiet_p): Make static.
11954 (class interp) <quiet_p>: Remove field
11955
11956 2017-02-08 Jerome Guitton <guitton@adacore.com>
11957
11958 * cli/cli-decode.c (find_command_name_length): Make it extern.
11959 * cli/cli-decode.h (find_command_name_length): Declare.
11960 * cli/cli-script.c (command_name_equals, line_first_arg):
11961 New functions.
11962 (process_next_line): Use cli-decode to parse command names.
11963 (build_command_line): Make args a constant pointer.
11964
11965 2017-02-08 Jerome Guitton <guitton@adacore.com>
11966
11967 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11968 Remove case-insensitive search.
11969
11970 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
11971
11972 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11973 at the end of the line. Avoids an ARI warning.
11974
11975 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
11976
11977 * NEWS: Mention support for record/replay of Intel 64 rdrand and
11978 rdseed instructions.
11979 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11980
11981 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
11982
11983 PR tdep/20936
11984 Provide and use sparc32 and sparc64 target description XML files.
11985 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11986 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11987 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11988 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11989 * features/sparc/sparc32-solaris.xml: New file.
11990 * features/sparc/sparc64-solaris.xml: New file.
11991 * features/sparc/sparc32-solaris.c: Generated.
11992 * features/sparc/sparc64-solaris.c: Generated.
11993 * sparc-tdep.h: Account for differences in target descriptions.
11994 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11995 (sparc32_register_type): Use target provided registers.
11996 (validate_tdesc_registers): New function.
11997 (sparc32_gdbarch_init): Use tdesc_has_registers.
11998 Set pseudoregister functions.
11999 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12000 (sparc64_register_type): Use target provided registers.
12001 (sparc64_init_abi): Set pseudoregister functions.
12002
12003 2017-02-03 Tom Tromey <tom@tromey.com>
12004
12005 PR rust/21097:
12006 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12007 with a single member.
12008
12009 2017-02-03 Pedro Alves <palves@redhat.com>
12010
12011 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12012 (cli_interp_base::~cli_interp_base): New.
12013 (cli_interp): New struct.
12014 (as_cli_interp): Cast the interp itself to cli_interp.
12015 (cli_interpreter_pre_command_loop): Rename to ...
12016 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
12017 parameter.
12018 (cli_interpreter_init): Rename to ...
12019 (cli_interp::init): ... this. Remove 'self' parameter. Use
12020 boolean. Make extern.
12021 (cli_interpreter_resume): Rename to ...
12022 (cli_interp::resume): ... this. Remove 'data' parameter. Make
12023 extern.
12024 (cli_interpreter_suspend): Rename to ...
12025 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
12026 extern.
12027 (cli_interpreter_exec): Rename to ...
12028 (cli_interp::exec): ... this. Remove 'data' parameter. Make
12029 extern.
12030 (cli_interpreter_supports_command_editing): Rename to ...
12031 (cli_interp_base::supports_command_editing): ... this. Remove
12032 'interp' parameter. Make extern.
12033 (cli_ui_out): Rename to ...
12034 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
12035 Make extern.
12036 (cli_set_logging): Rename to ...
12037 (cli_interp_base::set_logging): ... this. Remove 'interp'
12038 parameter. Make extern.
12039 (cli_interp_procs): Delete.
12040 (cli_interp_factory): Adjust to use "new".
12041 * cli/cli-interp.h: Include "interps.h".
12042 (struct cli_interp_base): New struct.
12043 * interps.c (struct interp): Delete. Fields moved to interps.h.
12044 (interp_new): Delete.
12045 (interp::interp, interp::~interp): New.
12046 (interp_set): Use bool, and return void. Assume the interpreter
12047 has suspend, init and resume methods, and that the all return
12048 void.
12049 (set_top_level_interpreter): interp_set returns void.
12050 (interp_ui_out): Adapt.
12051 (current_interp_set_logging): Adapt.
12052 (interp_data): Delete.
12053 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12054 (interp_exec): Adapt.
12055 (top_level_interpreter_data): Delete.
12056 * interps.h (interp_init_ftype, interp_resume_ftype)
12057 (interp_suspend_ftype, interp_exec_ftype)
12058 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12059 (class interp): New.
12060 (interp_new): Delete.
12061 (interp_set): Now returns void. Use bool.
12062 (interp_data, top_level_interpreter_data): Delete.
12063 * mi/mi-common.h: Include interps.h.
12064 (class mi_interp): Inherit from interp. Define a ctor. Declare
12065 init, resume, suspect, exec, interp_ui_out, set_logging and
12066 pre_command_loop methods.
12067 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12068 (mi_interpreter_init): Rename to ...
12069 (mi_interp::init): ... this. Remove the 'interp' parameter, use
12070 bool, return void and make extern. Adjust.
12071 (mi_interpreter_resume): ... Rename to ...
12072 (mi_interp::resume): ... this. Remove the 'data' parameter,
12073 return void and make extern. Adjust.
12074 (mi_interpreter_suspend): ... Rename to ...
12075 (mi_interp::suspend): ... this. Remove the 'data' parameter,
12076 return void and make extern. Adjust.
12077 (mi_interpreter_exec): ... Rename to ...
12078 (mi_interp::exec): ... this. Remove the 'data' parameter and make
12079 extern. Adjust.
12080 (mi_interpreter_pre_command_loop): ... Rename to ...
12081 (mi_interp::pre_command_loop): ... this. Remove the 'self'
12082 parameter and make extern.
12083 (mi_on_normal_stop_1): Adjust.
12084 (mi_ui_out): Rename to ...
12085 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
12086 parameter and make extern. Adjust.
12087 (mi_set_logging): Rename to ...
12088 (mi_interp::set_logging): ... this. Remove the 'interp'
12089 parameter and make extern. Adjust.
12090 (mi_interp_procs): Delete.
12091 (mi_interp_factory): Adjust to use 'new'.
12092 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12093 (mi_print_exception, mi_execute_command, mi_load_progress):
12094 Adjust.
12095 * tui/tui-interp.c (tui_interp): New class.
12096 (as_tui_interp): Return a tui_interp pointer.
12097 (tui_on_normal_stop, tui_on_signal_received)
12098 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12099 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12100 to use interp::interp_ui_out.
12101 (tui_init): Rename to ...
12102 (tui_interp::init): ... this. Remove the 'self' parameter, use
12103 bool, return void and make extern. Adjust.
12104 (tui_resume): Rename to ...
12105 (tui_interp::resume): ... this. Remove the 'data' parameter,
12106 return void and make extern. Adjust.
12107 (tui_suspend): Rename to ...
12108 (tui_interp::suspend): ... this. Remove the 'data' parameter,
12109 return void and make extern. Adjust.
12110 (tui_ui_out): Rename to ...
12111 (tui_interp::interp_ui_out): ... this. Remove the 'self'
12112 parameter, and make extern. Adjust.
12113 (tui_exec): Rename to ...
12114 (tui_interp::exec): ... this. Remove the 'data' parameter and
12115 make extern.
12116 (tui_interp_procs): Delete.
12117 (tui_interp_factory): Use "new".
12118
12119 2017-02-02 Tom Tromey <tom@tromey.com>
12120
12121 * rust-exp.y (ends_raw_string, space_then_number)
12122 (rust_identifier_start_p): Return bool.
12123 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12124 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12125 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12126 (rust_chartype_p): Return bool.
12127 (val_print_struct, rust_print_struct_def, rust_print_type):
12128 Update.
12129 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
12130 Return bool.
12131
12132 2017-02-02 Tom Tromey <tom@tromey.com>
12133
12134 * rust-lang.c: Reindent.
12135
12136 2017-02-02 Tom Tromey <tom@tromey.com>
12137
12138 * rust-lang.h (rust_crate_for_block): Update.
12139 * rust-lang.c (rust_crate_for_block): Return std::string.
12140 (rust_get_disr_info): Use std:;string, not
12141 gdb::unique_xmalloc_ptr.
12142 * rust-exp.y (crate_name): Update.
12143
12144 2017-02-02 Pedro Alves <palves@redhat.com>
12145
12146 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
12147 field out of gdb_disassembler_test and make it static.
12148
12149 2017-02-02 Pedro Alves <palves@redhat.com>
12150
12151 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
12152 mi1_interp and mi_interp fields.
12153
12154 2017-02-02 Pedro Alves <palves@redhat.com>
12155
12156 * cli/cli-interp.c (struct saved_output_files, saved_output):
12157 Moved from cli/cli-logging.c.
12158 (cli_set_logging): New function.
12159 (cli_interp_procs): Install cli_set_logging.
12160 * cli/cli-interp.h (make_logging_output, cli_set_logging):
12161 Declare.
12162 * cli/cli-logging.c (struct saved_output_files, saved_output):
12163 Moved to cli/cli-interp.c.
12164 (pop_output_files): Don't save outputs here.
12165 (make_logging_output): New function.
12166 (handle_redirections): Don't build tee nor save previous outputs
12167 here.
12168 * interps.c (current_interp_set_logging): Change prototype.
12169 Assume there's always a set_logging_proc method installed.
12170 * interps.h (interp_set_logging_ftype): Change prototype.
12171 (current_interp_set_logging): Change prototype and adjust comment.
12172 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
12173 use make_logging_output.
12174 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
12175 2017-02-02 Pedro Alves <palves@redhat.com>
12176
12177 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12178 from ...
12179 (set_logging_overwrite): ... here.
12180 (logging_no_redirect_file): Delete.
12181 (set_logging_redirect): Don't handle redirection on the fly.
12182 Instead warn that "logging off" / "logging on" is necessary.
12183 (pop_output_files): Delete references to logging_no_redirect_file.
12184 (show_logging_command): Always speak in terms of what will happen
12185 once logging is reenabled.
12186
12187 2017-02-02 Pedro Alves <palves@redhat.com>
12188
12189 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12190
12191 2017-02-02 Pedro Alves <palves@redhat.com>
12192
12193 * disasm.c (gdb_pretty_print_insn): Rename to ...
12194 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12195 Remove gdbarch parameter. Adapt to clear the object's buffers
12196 instead of allocating new buffers, and to print using the object's
12197 gdb_disassembler instead of calling gdb_print_insn.
12198 (dump_insns): Use gdb_pretty_print_disassembler.
12199 * disasm.h (gdb_pretty_print_insn): Delete declaration.
12200 (gdb_pretty_print_disassembler): New class.
12201 * record-btrace.c (btrace_insn_history): Use
12202 gdb_pretty_print_disassembler.
12203
12204 2017-02-02 Pedro Alves <palves@redhat.com>
12205
12206 * ada-lang.c (type_as_string): Use string_file.
12207 * ada-valprint.c (ada_print_floating): Use string_file.
12208 * ada-varobj.c (ada_varobj_scalar_image)
12209 (ada_varobj_get_value_image): Use string_file.
12210 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12211 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12212 * breakpoint.c (update_inserted_breakpoint_locations)
12213 (insert_breakpoint_locations, reattach_breakpoints)
12214 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12215 (print_it_watchpoint): Use string_file.
12216 (save_breakpoints): Use stdio_file.
12217 * c-exp.y (oper): Use string_file.
12218 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12219 tee_file.
12220 (pop_output_files): Use delete.
12221 (handle_redirections): Use stdio_file and tee_file.
12222 * cli/cli-setshow.c (do_show_command): Use string_file.
12223 * compile/compile-c-support.c (c_compute_program): Use
12224 string_file.
12225 * compile/compile-c-symbols.c (generate_vla_size): Take a
12226 'string_file &' instead of a 'ui_file *'.
12227 (generate_c_for_for_one_variable): Take a 'string_file &' instead
12228 of a 'ui_file *'. Use string_file.
12229 (generate_c_for_variable_locations): Take a 'string_file &'
12230 instead of a 'ui_file *'.
12231 * compile/compile-internal.h (generate_c_for_for_one_variable):
12232 Take a 'string_file &' instead of a 'ui_file *'.
12233 * compile/compile-loc2c.c (push, pushf, unary, binary)
12234 (print_label, pushf_register_address, pushf_register)
12235 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12236 'ui_file *'. Adjust.
12237 * compile/compile.c (compile_to_object): Use string_file.
12238 * compile/compile.h (compile_dwarf_expr_to_c)
12239 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
12240 'ui_file *'.
12241 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
12242 (replace_typedefs_qualified_name): Use string_file and
12243 obstack_copy0.
12244 * disasm.c (gdb_pretty_print_insn): Use string_file.
12245 (gdb_disassembly): Adjust reference the null_stream global.
12246 (do_ui_file_delete): Delete.
12247 (gdb_insn_length): Use null_stream.
12248 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
12249 * dwarf2loc.c (dwarf2_compile_property_to_c)
12250 (locexpr_generate_c_location, loclist_generate_c_location): Take a
12251 'string_file &' instead of a 'ui_file *'.
12252 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
12253 * dwarf2read.c (do_ui_file_peek_last): Delete.
12254 (dwarf2_compute_name): Use string_file.
12255 * event-top.c (gdb_setup_readline): Use stdio_file.
12256 * gdbarch.sh (verify_gdbarch): Use string_file.
12257 * gdbtypes.c (safe_parse_type): Use null_stream.
12258 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
12259 string_file.
12260 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
12261 'string_file *' instead of a 'ui_file *'.
12262 (gdbscm_arch_disassemble): Use string_file.
12263 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
12264 * guile/scm-ports.c (class ioscm_file_port): Now a class that
12265 inherits from ui_file.
12266 (ioscm_file_port_delete, ioscm_file_port_rewind)
12267 (ioscm_file_port_put): Delete.
12268 (ioscm_file_port_write): Rename to ...
12269 (ioscm_file_port::write): ... this. Remove file_port_magic
12270 checks.
12271 (ioscm_file_port_new): Delete.
12272 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
12273 ui_file_up.
12274 * guile/scm-type.c (tyscm_type_name): Use string_file.
12275 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
12276 Use string_file.
12277 * infcmd.c (print_return_value_1): Use string_file.
12278 * infrun.c (print_target_wait_results): Use string_file.
12279 * language.c (add_language): Use string_file.
12280 * location.c (explicit_to_string_internal): Use string_file.
12281 * main.c (captured_main_1): Use null_file.
12282 * maint.c (maintenance_print_architecture): Use stdio_file.
12283 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
12284 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
12285 event_channel>: Change type to mi_console_file pointer.
12286 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
12287 (mi_console_file_delete): Delete.
12288 (struct mi_console_file): Delete.
12289 (mi_console_file_magic): Delete.
12290 (mi_console_file_new): Delete.
12291 (mi_console_file::mi_console_file): New.
12292 (mi_console_file_delete): Delete.
12293 (mi_console_file_fputs): Delete.
12294 (mi_console_file::write): New.
12295 (mi_console_raw_packet): Delete.
12296 (mi_console_file::flush): New.
12297 (mi_console_file_flush): Delete.
12298 (mi_console_set_raw): Rename to ...
12299 (mi_console_file::set_raw): ... this.
12300 * mi/mi-console.h (class mi_console_file): New class.
12301 (mi_console_file_new, mi_console_set_raw): Delete.
12302 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
12303 (mi_set_logging): Use delete and tee_file. Adjust.
12304 * mi/mi-main.c (output_register): Use string_file.
12305 (mi_cmd_data_evaluate_expression): Use string_file.
12306 (mi_cmd_data_read_memory): Use string_file.
12307 (mi_cmd_execute, print_variable_or_computed): Use string_file.
12308 * mi/mi-out.c (mi_ui_out::main_stream): New.
12309 (mi_ui_out::rewind): Use main_stream and
12310 string_file.
12311 (mi_ui_out::put): Use main_stream and string_file.
12312 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12313 Allocate a 'string_file' instead.
12314 (mi_out_new): Don't allocate a mem_fileopen stream here.
12315 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12316 (mi_ui_out::main_stream): Declare method.
12317 * printcmd.c (eval_command): Use string_file.
12318 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
12319 * python/py-arch.c (archpy_disassemble): Use string_file.
12320 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
12321 * python/py-frame.c (frapy_str): Use string_file.
12322 * python/py-framefilter.c (py_print_type, py_print_single_arg):
12323 Use string_file.
12324 * python/py-type.c (typy_str): Use string_file.
12325 * python/py-unwind.c (unwind_infopy_str): Use string_file.
12326 * python/py-value.c (valpy_str): Use string_file.
12327 * record-btrace.c (btrace_insn_history): Use string_file.
12328 * regcache.c (regcache_print): Use stdio_file.
12329 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
12330 * remote.c (escape_buffer): Use string_file.
12331 * rust-lang.c (rust_get_disr_info): Use string_file.
12332 * serial.c (serial_open_ops_1): Use stdio_file.
12333 (do_serial_close): Use delete.
12334 * stack.c (print_frame_arg): Use string_file.
12335 (print_frame_args): Remove local mem_fileopen stream, not used.
12336 (print_frame): Use string_file.
12337 * symmisc.c (maintenance_print_symbols): Use stdio_file.
12338 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
12339 Take a 'string_file *' instead of a 'ui_file *'.
12340 * top.c (new_ui): Use stdio_file and stderr_file.
12341 (free_ui): Use delete.
12342 (execute_command_to_string): Use string_file.
12343 (quit_confirm): Use string_file.
12344 * tracepoint.c (collection_list::append_exp): Use string_file.
12345 * tui/tui-disasm.c (tui_disassemble): Use string_file.
12346 * tui/tui-file.c: Don't include "ui-file.h".
12347 (enum streamtype, struct tui_stream): Delete.
12348 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
12349 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
12350 (tui_file::tui_file): New method.
12351 (tui_file_fputs): Delete.
12352 (tui_file_get_strbuf): Delete.
12353 (tui_file::puts): New method.
12354 (tui_file_adjust_strbuf): Delete.
12355 (tui_file_flush): Delete.
12356 (tui_file::flush): New method.
12357 * tui/tui-file.h: Tweak intro comment.
12358 Include ui-file.h.
12359 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
12360 (tui_file_adjust_strbuf): Delete declarations.
12361 (class tui_file): New class.
12362 * tui/tui-io.c (tui_initialize_io): Use tui_file.
12363 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
12364 (tui_register_format): Use string_stream.
12365 * tui/tui-stack.c (tui_make_status_line): Use string_file.
12366 (tui_get_function_from_frame): Use string_file.
12367 * typeprint.c (type_to_string): Use string_file.
12368 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
12369 (null_stream): New global.
12370 (ui_file_delete): Delete.
12371 (ui_file::ui_file): New.
12372 (null_file_isatty): Delete.
12373 (ui_file::~ui_file): New.
12374 (null_file_rewind): Delete.
12375 (ui_file::printf): New.
12376 (null_file_put): Delete.
12377 (null_file_flush): Delete.
12378 (ui_file::putstr): New.
12379 (null_file_write): Delete.
12380 (ui_file::putstrn): New.
12381 (null_file_read): Delete.
12382 (ui_file::putc): New.
12383 (null_file_fputs): Delete.
12384 (null_file_write_async_safe): Delete.
12385 (ui_file::vprintf): New.
12386 (null_file_delete): Delete.
12387 (null_file::write): New.
12388 (null_file_fseek): Delete.
12389 (null_file::puts): New.
12390 (ui_file_data): Delete.
12391 (null_file::write_async_safe): New.
12392 (gdb_flush, ui_file_isatty): Adjust.
12393 (ui_file_put, ui_file_rewind): Delete.
12394 (ui_file_write): Adjust.
12395 (ui_file_write_for_put): Delete.
12396 (ui_file_write_async_safe, ui_file_read): Adjust.
12397 (ui_file_fseek): Delete.
12398 (fputs_unfiltered): Adjust.
12399 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
12400 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
12401 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
12402 (set_ui_file_data): Delete.
12403 (string_file::~string_file, string_file::write)
12404 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
12405 (do_ui_file_as_string, ui_file_as_string): Delete.
12406 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
12407 (struct mem_file): Delete.
12408 (mem_file_new): Delete.
12409 (stdio_file::stdio_file): New.
12410 (mem_file_delete): Delete.
12411 (stdio_file::stdio_file): New.
12412 (mem_fileopen): Delete.
12413 (stdio_file::~stdio_file): New.
12414 (mem_file_rewind): Delete.
12415 (stdio_file::set_stream): New.
12416 (mem_file_put): Delete.
12417 (stdio_file::open): New.
12418 (mem_file_write): Delete.
12419 (stdio_file_magic, struct stdio_file): Delete.
12420 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
12421 (stdio_file::flush): New.
12422 (stdio_file_read): Rename to ...
12423 (stdio_file::read): ... this. Adjust.
12424 (stdio_file_write): Rename to ...
12425 (stdio_file::write): ... this. Adjust.
12426 (stdio_file_write_async_safe): Rename to ...
12427 (stdio_file::write_async_safe) ... this. Adjust.
12428 (stdio_file_fputs): Rename to ...
12429 (stdio_file::puts) ... this. Adjust.
12430 (stdio_file_isatty): Delete.
12431 (stdio_file_fseek): Delete.
12432 (stdio_file::isatty): New.
12433 (stderr_file_write): Rename to ...
12434 (stderr_file::write) ... this. Adjust.
12435 (stderr_file_fputs): Rename to ...
12436 (stderr_file::puts) ... this. Adjust.
12437 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
12438 (stderr_file::stderr_file): New.
12439 (tee_file_magic): Delete.
12440 (struct tee_file): Delete.
12441 (tee_file::tee_file): New.
12442 (tee_file_new): Delete.
12443 (tee_file::~tee_file): New.
12444 (tee_file_delete): Delete.
12445 (tee_file_flush): Rename to ...
12446 (tee_file::flush): ... this. Adjust.
12447 (tee_file_write): Rename to ...
12448 (tee_file::write): ... this. Adjust.
12449 (tee_file::write_async_safe): New.
12450 (tee_file_fputs): Rename to ...
12451 (tee_file::puts): ... this. Adjust.
12452 (tee_file_isatty): Rename to ...
12453 (tee_file::isatty): ... this. Adjust.
12454 * ui-file.h (struct obstack, struct ui_file): Don't
12455 forward-declare.
12456 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
12457 (ui_file_write_ftype)
12458 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
12459 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
12460 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
12461 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
12462 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
12463 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
12464 (set_ui_file_fseek): Delete.
12465 (ui_file_data, ui_file_delete, ui_file_rewind)
12466 (struct ui_file): New.
12467 (ui_file_up): New.
12468 (class null_file): New.
12469 (null_stream): Declare.
12470 (ui_file_write_for_put, ui_file_put): Delete.
12471 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
12472 Delete.
12473 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
12474 (gdb_fopen, tee_file_new): Delete.
12475 (struct string_file): New.
12476 (struct stdio_file): New.
12477 (stdio_file_up): New.
12478 (struct stderr_file): New.
12479 (class tee_file): New.
12480 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
12481 of a 'ui_file *'. Adjust.
12482 * ui-out.h (class ui_out) <field_stream>: Likewise.
12483 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
12484 (null_stream): Delete.
12485 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
12486 Adjust.
12487 * utils.h (struct ui_file): Delete forward declaration..
12488 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
12489 (error_stream): Take a 'string_file &' instead of a
12490 'ui_file *'.
12491 * varobj.c (varobj_value_get_print_value): Use string_file.
12492 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
12493 * gdbarch.c: Regenerate.
12494
12495 2017-02-02 Pedro Alves <palves@redhat.com>
12496
12497 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
12498 (gdb_pretty_print_insn): ... this. Now a free function. Add back
12499 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
12500 Adjust to call gdb_print_insn instead of
12501 gdb_disassembler::print_insn.
12502 (dump_insns, do_mixed_source_and_assembly_deprecated)
12503 (do_mixed_source_and_assembly, do_assembly_only): Add back a
12504 'gdbarch' parameter. Remove gdb_disassembler parameter.
12505 (gdb_disassembly): Don't allocate a gdb_disassembler here.
12506 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
12507 declaration.
12508 (gdb_pretty_print_insn): Re-add declaration.
12509 * record-btrace.c (btrace_insn_history): Don't allocate a
12510 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
12511
12512 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
12513
12514 * disasm.h (gdb_disassembly): Remove file_string parameter.
12515 * disasm.c (gdb_disassembly): Likewise.
12516 * cli/cli-cmds.c (print_disassembly): Adapt.
12517 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
12518 * stack.c (do_gdb_disassembly): Likewise.
12519
12520 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
12521
12522 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
12523 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
12524 targets. And if the implicit value is longer than needed, extract
12525 the first bytes instead of the "least significant" ones.
12526
12527 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
12528
12529 * btrace.c (btrace_enable): Do not call btrace_add_pc for
12530 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
12531 (btrace_fetch): Assert can_access_registers_ptid.
12532 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
12533 validate_registers_access.
12534
12535 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
12536
12537 * gdbthread.h (can_access_registers_ptid): New.
12538 * thread.c (can_access_registers_ptid): New.
12539
12540 2017-02-01 Pedro Alves <palves@redhat.com>
12541
12542 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
12543
12544 2017-01-31 Pedro Alves <palves@redhat.com>
12545
12546 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
12547 Fix typos.
12548
12549 2017-01-31 Pedro Alves <palves@redhat.com>
12550
12551 * stack.c (print_frame_args): Remove local mem_fileopen stream,
12552 not used.
12553
12554 2017-01-31 Pedro Alves <palves@redhat.com>
12555
12556 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
12557
12558 2017-01-31 Pedro Alves <palves@redhat.com>
12559
12560 * common/scoped_restore.h
12561 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
12562 change the value's parameter type to T2.
12563 (make_scoped_restore): Likewise.
12564
12565 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
12566 Richard Henderson <rth@redhat.com>
12567
12568 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
12569 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
12570 GS_BASE for older kernels.
12571 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
12572 GS_BASE for older kernels.
12573 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
12574 and GS_BASE to the offset table.
12575 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
12576 system register group.
12577 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
12578 for older kernels.
12579 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
12580 amd64 ABI.
12581 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
12582 AMD64_GSBASE_REGNUM.
12583 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
12584 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
12585 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
12586 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
12587 i386/64bit-segments.xml in those rules.
12588 * features/i386/64bit-segments.xml: New file.
12589 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
12590 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
12591 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
12592 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
12593 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
12594 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
12595 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
12596 * features/i386/amd64-avx-linux.c: Regenerated.
12597 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
12598 * features/i386/amd64-avx-mpx.c: Regenerated.
12599 * features/i386/amd64-avx512-linux.c: Regenerated.
12600 * features/i386/amd64-linux.c: Regenerated.
12601 * features/i386/amd64-mpx-linux.c: Regenerated.
12602 * features/i386/i386-avx-mpx-linux.c: Regenerated.
12603 * features/i386/i386-avx-mpx.c: Regenerated.
12604 * features/i386/x32-avx-linux.c: Regenerated.
12605 * features/i386/x32-avx512-linux.c: Regenerated.
12606 * regformats/i386/amd64-avx-linux.dat: Regenerated.
12607 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
12608 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
12609 * regformats/i386/amd64-linux.dat: Regenerated.
12610 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
12611 * regformats/i386/x32-avx-linux.dat: Regenerated.
12612 * regformats/i386/x32-avx512-linux.dat: Regenerated.
12613 * regformats/i386/x32-linux.dat: Regenerated.
12614
12615 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
12616
12617 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
12618 Set to AMD64_NUM_REGS.
12619
12620 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
12621
12622 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
12623 that checks validity of a register number.
12624
12625 2017-01-27 Kees Cook <keescook@google.com>
12626
12627 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
12628 fetch_fpregs if target has fpa registers.
12629 (arm_linux_store_inferior_registers): Call store_fpregs if target
12630 has fpa registers.
12631
12632 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
12633
12634 * cris-tdep.c (cris_gdbarch_init): Remove check for
12635 info.byte_order and force it to BFD_ENDIAN_LITTLE.
12636
12637 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
12638
12639 * corelow.c (get_core_register_section): Check for regset
12640 existence before checking for REGSET_VARIABLE_SIZE.
12641
12642 2017-01-26 Yao Qi <yao.qi@linaro.org>
12643 Pedro Alves <palves@redhat.com>
12644
12645 PR gdb/20939
12646 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
12647 call memory_error, save memaddr instead.
12648 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
12649 negative, cal memory_error.
12650 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
12651
12652 2017-01-26 Yao Qi <yao.qi@linaro.org>
12653
12654 * disasm-selftests.c (memory_error_test): New function.
12655 (_initialize_disasm_selftests): Register memory_error_test.
12656
12657 2017-01-26 Yao Qi <yao.qi@linaro.org>
12658
12659 * Makefile.in (SFILES): Add disasm-selftests.c and
12660 selftest-arch.c.
12661 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
12662 * disasm-selftests.c: New file.
12663 * selftest-arch.c: New file.
12664 * selftest-arch.h: New file.
12665
12666 2017-01-26 Yao Qi <yao.qi@linaro.org>
12667
12668 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
12669 to bfd_arch_mep. Don't return 0 if section is not
12670 found. Call print_insn_mep.
12671
12672 2017-01-26 Pedro Alves <palves@redhat.com>
12673 Yao Qi <yao.qi@linaro.org>
12674
12675 * arm-tdep.c: Include "disasm.h".
12676 (gdb_print_insn_arm): Update code to get gdbarch.
12677 * disasm.c (dis_asm_read_memory): Change it to
12678 gdb_disassembler::dis_asm_read_memory.
12679 (dis_asm_memory_error): Likewise.
12680 (dis_asm_print_address): Likewise.
12681 (gdb_pretty_print_insn): Change it to
12682 gdb_disassembler::pretty_print_insn.
12683 (dump_insns): Add one argument gdb_disassemlber. All
12684 callers updated.
12685 (do_mixed_source_and_assembly_deprecated): Likewise.
12686 (do_mixed_source_and_assembly): Likewise.
12687 (do_assembly_only): Likewise.
12688 (gdb_disassembler::gdb_disassembler): New.
12689 (gdb_disassembler::print_insn): New.
12690 * disasm.h (class gdb_disassembler): New.
12691 (gdb_pretty_print_insn): Remove declaration.
12692 (gdb_disassemble_info): Likewise.
12693 * guile/scm-disasm.c (class gdbscm_disassembler): New.
12694 (gdbscm_disasm_read_memory_worker): Update.
12695 (gdbscm_disasm_read_memory): Update.
12696 (gdbscm_disasm_memory_error): Remove.
12697 (gdbscm_disasm_print_address): Remove.
12698 (gdbscm_disassembler::gdbscm_disassembler): New.
12699 (gdbscm_print_insn_from_port): Update.
12700 * mips-tdep.c: Include disasm.h.
12701 (gdb_print_insn_mips): Update code to get gdbarch.
12702 * record-btrace.c (btrace_insn_history): Update.
12703 * spu-tdep.c: Include disasm.h.
12704 (struct spu_dis_asm_data): Remove.
12705 (struct spu_dis_asm_info): New.
12706 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
12707 SPU id.
12708 (gdb_print_insn_spu): Cast disassemble_info to
12709 spu_dis_asm_info.
12710
12711 2017-01-26 Yao Qi <yao.qi@linaro.org>
12712
12713 * disasm.c (do_ui_file_delete): Delete.
12714 (gdb_insn_length): Move code creating stream to ...
12715 * utils.c (null_stream): ... here. New function.
12716 * utils.h (null_stream): Declare.
12717
12718 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
12719
12720 * python/py-inferior.c (find_thread_object): Return directly
12721 from the loop. Remove "found" variable.
12722
12723 2017-01-21 Joel Brobecker <brobecker@adacore.com>
12724
12725 GDB 7.12.1 released.
12726
12727 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
12728
12729 * python/py-function.c (fnpy_call): Reorder declarations to have
12730 the gdbpy_enter object declared first.
12731 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
12732
12733 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
12734
12735 PR python/21068
12736 * python/python-internal.h (PyMem_RawMalloc): Define for
12737 Python < 3.4.
12738 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
12739 PyMem_RawMalloc instead of PyMem_Malloc.
12740
12741 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
12742 Luis Machado <lgustavo@codesourcery.com>
12743
12744 * NEWS (New commands): Mention flash-erase.
12745 (New MI commands): Mention target-flash-erase.
12746 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
12747 command.
12748 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
12749 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
12750 * target.c (flash_erase_command): New function.
12751 (initialize_targets): Add new flash-erase command.
12752 * target.h (flash_erase_command): New declaration.
12753
12754 2017-01-20 Joel Brobecker <brobecker@adacore.com>
12755
12756 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
12757 HAVE_SYS_PROCFS_H is defined.
12758
12759 2017-01-18 Alan Hayward <alan.hayward@arm.com>
12760
12761 * remote.c (struct cached_reg): Change data into a pointer.
12762 * (stop_reply_dtr): Free data pointers before deleting vector.
12763 (process_stop_reply): Likewise.
12764 (remote_parse_stop_reply): Allocate space for data
12765
12766 2017-01-18 Alan Hayward <alan.hayward@arm.com>
12767
12768 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
12769 MAX_REGISTER_SIZE.
12770 (amd64_pseudo_register_read_value): Likewise.
12771 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
12772 (store_register_using_P): Likewise.
12773 * regcache.c (regcache_xfer_part): Likewise.
12774
12775 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
12776
12777 Split real and pseudo registers.
12778 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
12779 (sparc32_pseudo_regnum): New enum.
12780 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
12781 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
12782 (SPARC32_CP0_REGISTERS): New macro.
12783 (sparc32_pseudo_register_name): New function.
12784 (sparc32_register_name): Use sparc32_pseudo_register_name.
12785 (sparc32_pseudo_register_type): New function.
12786 (sparc32_register_type): Use sparc32_pseudo_register_type.
12787 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12788 pseudo register numbers.
12789 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12790 (SPARC64_CP0_REGISTERS): New macro.
12791 (sparc64_pseudo_register_name): New function.
12792 (sparc64_register_name): Use sparc64_pseudo_register_name.
12793 (sparc64_pseudo_register_type): New function.
12794 (sparc64_register_type): Use sparc64_pseudo_register_type.
12795 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12796 pseudo register numbers.
12797 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12798 sparc64_store_arguments): Handle pseudo register numbers.
12799
12800 2017-01-13 Yao Qi <yao.qi@linaro.org>
12801
12802 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12803 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12804 output.
12805 (getpkt_or_notif_sane_1): Likewise.
12806
12807 2017-01-13 Yao Qi <yao.qi@linaro.org>
12808
12809 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12810 of CC. Pass "-x c++-header" instead of "-x c".
12811
12812 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12813
12814 * remote.c (remote_can_async_p): Update comment.
12815
12816 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12817
12818 * linux-nat.c (linux_nat_can_async_p): Update comment.
12819
12820 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12821
12822 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12823
12824 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
12825
12826 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12827
12828 2017-01-10 Tom Tromey <tom@tromey.com>
12829
12830 * python/py-type.c (typy_legacy_template_argument): Update.
12831 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12832 ~demangle_parse_info): Declare new members.
12833 (cp_demangled_name_to_comp): Return unique_ptr.
12834 (cp_demangled_name_parse_free)
12835 (make_cleanup_cp_demangled_name_parse_free)
12836 (cp_new_demangle_parse_info): Remove.
12837 * cp-support.c (do_demangled_name_parse_free_cleanup)
12838 (make_cleanup_cp_demangled_name_parse_free): Remove.
12839 (inspect_type, cp_canonicalize_string_full)
12840 (cp_canonicalize_string): Update.
12841 (mangled_name_to_comp): Change return type.
12842 (cp_class_name_from_physname, method_name_from_physname)
12843 (cp_func_name, cp_remove_params): Update.
12844 * cp-name-parser.y (demangle_parse_info): New constructor, from
12845 cp_new_demangle_parse_info.
12846 (~demangle_parse_info): New destructor, from
12847 cp_demangled_name_parse_free.
12848 (cp_merge_demangle_parse_infos): Update.
12849 (cp_demangled_name_to_comp): Change return type.
12850
12851 2017-01-10 Tom Tromey <tom@tromey.com>
12852
12853 * top.c (prevent_dont_repeat): Change return type.
12854 * python/python.c (execute_gdb_command): Use std::string.
12855 Update.
12856 * guile/guile.c (gdbscm_execute_gdb_command): Update.
12857 * command.h (prevent_dont_repeat): Change return type.
12858 * breakpoint.c (bpstat_do_actions_1): Update.
12859
12860 2017-01-10 Tom Tromey <tom@tromey.com>
12861
12862 * value.h (scoped_value_mark::~scoped_value_mark): Call
12863 free_to_mark.
12864 (scoped_value_mark::free_to_mark): New method.
12865 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12866 scoped_value_mark.
12867
12868 2017-01-10 Tom Tromey <tom@tromey.com>
12869
12870 * python/py-value.c (valpy_dereference, valpy_referenced_value)
12871 (valpy_reference_value, valpy_const_value, valpy_get_address)
12872 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12873 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12874 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12875 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12876 scoped_value_mark.
12877 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12878 * value.h (scoped_value_mark): New class.
12879
12880 2017-01-10 Tom Tromey <tom@tromey.com>
12881
12882 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12883 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12884 * psymtab.c (discard_psymtabs_upto): Remove.
12885 (make_cleanup_discard_psymtabs): Remove.
12886 (struct psymtab_state): Remove.
12887
12888 2017-01-10 Tom Tromey <tom@tromey.com>
12889
12890 * record-full.c (record_full_save_cleanups): Remove.
12891 (record_full_save): Use gdb::unlinker.
12892 * gcore.c (do_bfd_delete_cleanup): Remove.
12893 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
12894 cleanups.
12895 * dwarf2read.c (unlink_if_set): Remove.
12896 (write_psymtabs_to_index): Use gdb::unlinker.
12897 * common/gdb_unlinker.h: New file.
12898
12899 2017-01-10 Tom Tromey <tom@tromey.com>
12900
12901 * windows-tdep.c (windows_xfer_shared_library): Update.
12902 * windows-nat.c (windows_make_so): Update.
12903 * utils.h (make_cleanup_bfd_unref): Remove.
12904 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12905 * symfile.h (symfile_bfd_open)
12906 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12907 * symfile.c (read_symbols, symbol_file_add)
12908 (separate_debug_file_exists): Update.
12909 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12910 (generic_load, reread_symbols): Update.
12911 * symfile-mem.c (symbol_file_add_from_memory): Update.
12912 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12913 (spu_symbol_file_add_from_memory): Update.
12914 * solist.h (struct target_so_ops) <bfd_open>: Return
12915 gdb_bfd_ref_ptr.
12916 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12917 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12918 gdb_bfd_ref_ptr.
12919 (solib_map_sections, reload_shared_libraries_1): Update.
12920 * solib-svr4.c (enable_break): Update.
12921 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12922 * solib-frv.c (enable_break2): Update.
12923 * solib-dsbt.c (enable_break): Update.
12924 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12925 gdb_bfd_ref_ptr.
12926 (darwin_solib_get_all_image_info_addr_at_init): Update.
12927 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12928 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12929 * record-full.c (record_full_save): Update.
12930 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12931 * procfs.c (insert_dbx_link_bpt_in_file): Update.
12932 * minidebug.c (find_separate_debug_file_in_section): Return
12933 gdb_bfd_ref_ptr.
12934 * machoread.c (macho_add_oso_symfile): Change abfd to
12935 gdb_bfd_ref_ptr.
12936 (macho_symfile_read_all_oso): Update.
12937 (macho_check_dsym): Return gdb_bfd_ref_ptr.
12938 (macho_symfile_read): Update.
12939 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12940 (jit_bfd_try_read_symtab): Update.
12941 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12942 (gdb_bfd_openw, gdb_bfd_openr_iovec)
12943 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12944 gdb_bfd_ref_ptr.
12945 (gdb_bfd_ref_policy): New struct.
12946 (gdb_bfd_ref_ptr): New typedef.
12947 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12948 (gdb_bfd_openw, gdb_bfd_openr_iovec)
12949 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12950 gdb_bfd_ref_ptr.
12951 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12952 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12953 (gcore_command): Update.
12954 * exec.c (exec_file_attach): Update.
12955 * elfread.c (elf_symfile_read): Update.
12956 * dwarf2read.c (dwarf2_get_dwz_file): Update.
12957 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12958 (open_and_init_dwo_file): Update.
12959 (open_dwp_file): Return gdb_bfd_ref_ptr.
12960 (open_and_init_dwp_file): Update.
12961 * corelow.c (core_open): Update.
12962 * compile/compile-object-load.c (compile_object_load): Update.
12963 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12964 * coffread.c (coff_symfile_read): Update.
12965 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12966 gdb_bfd_ref_ptr. Rename.
12967 (dump_bfd_file, restore_command): Update.
12968 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12969 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12970 (find_separate_debug_file_by_buildid): Update.
12971
12972 2017-01-10 Tom Tromey <tom@tromey.com>
12973
12974 * common/gdb_ref_ptr.h: New file.
12975 * python/py-ref.h (struct gdbpy_ref_policy): New.
12976 (gdbpy_ref): Now a typedef.
12977
12978 2017-01-10 Tom Tromey <tom@tromey.com>
12979
12980 * utils.h (make_cleanup_htab_delete): Don't declare.
12981 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12982 Remove.
12983 * linespec.c (decode_compound_collector): Add constructor,
12984 destructor.
12985 (lookup_prefix_sym): Remove cleanup.
12986 (symtab_collector): Add constructor, destructor.
12987 (collect_symtabs_from_filename): Remove cleanup.
12988 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12989 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12990 Use htab_up.
12991 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12992 * dwarf2read.c (dw2_expand_symtabs_matching)
12993 (dw2_map_symbol_filenames, dwarf_decode_macros)
12994 (write_psymtabs_to_index): Use htab_up.
12995 * dwarf2loc.c (func_verify_no_selftailcall)
12996 (call_site_find_chain_1, func_verify_no_selftailcall)
12997 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12998 std::vector, gdb::unique_xmalloc_ptr.
12999 (call_sitep): Remove typedef.
13000 (dwarf2_locexpr_baton_eval): Remove unused variable.
13001
13002 2017-01-10 Tom Tromey <tom@tromey.com>
13003
13004 * python/python-internal.h (make_cleanup_py_decref)
13005 (make_cleanup_py_xdecref): Don't declare.
13006 * python/py-utils.c (py_decref, make_cleanup_py_decref)
13007 (py_xdecref, make_cleanup_py_xdecref): Remove.
13008
13009 2017-01-10 Tom Tromey <tom@tromey.com>
13010
13011 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13012 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13013
13014 2017-01-10 Tom Tromey <tom@tromey.com>
13015
13016 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13017
13018 2017-01-10 Tom Tromey <tom@tromey.com>
13019
13020 * python/py-utils.c (unicode_to_encoded_string)
13021 (python_string_to_target_string)
13022 (python_string_to_target_python_string)
13023 (python_string_to_host_string, gdbpy_obj_to_string)
13024 (get_addr_from_python): Use gdbpy_ref.
13025
13026 2017-01-10 Tom Tromey <tom@tromey.com>
13027
13028 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13029 gdbpy_ref.
13030
13031 2017-01-10 Tom Tromey <tom@tromey.com>
13032
13033 * python/python.c (eval_python_command, gdbpy_decode_line)
13034 (gdbpy_run_events, gdbpy_start_type_printers)
13035 (gdbpy_apply_type_printers): Use gdbpy_ref.
13036
13037 2017-01-10 Tom Tromey <tom@tromey.com>
13038
13039 * python/py-param.c (get_doc_string, compute_enum_values): Use
13040 gdbpy_ref.
13041
13042 2017-01-10 Tom Tromey <tom@tromey.com>
13043
13044 * python/py-inferior.c (find_thread_object, build_inferior_list):
13045 Use gdbpy_ref.
13046
13047 2017-01-10 Tom Tromey <tom@tromey.com>
13048
13049 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13050
13051 2017-01-10 Tom Tromey <tom@tromey.com>
13052
13053 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13054 gdbpy_ref.
13055
13056 2017-01-10 Tom Tromey <tom@tromey.com>
13057
13058 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
13059 extra incref.
13060 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13061 Use gdbpy_ref.
13062
13063 2017-01-10 Tom Tromey <tom@tromey.com>
13064
13065 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13066 gdbpy_ref.
13067
13068 2017-01-10 Tom Tromey <tom@tromey.com>
13069
13070 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
13071 decref results of PyArg_ParseTupleAndKeywords.
13072
13073 2017-01-10 Tom Tromey <tom@tromey.com>
13074
13075 * python/python.c (python_run_simple_file): Use
13076 unique_xmalloc_ptr, gdbpy_ref.
13077
13078 2017-01-10 Tom Tromey <tom@tromey.com>
13079
13080 * python/py-prettyprint.c (print_stack_unless_memory_error)
13081 (print_string_repr, print_children): Use gdbpy_ref.
13082 (dummy_python_frame): New class.
13083 (dummy_python_frame::dummy_python_frame): Rename from
13084 push_dummy_python_frame.
13085 (py_restore_tstate): Remove.
13086
13087 2017-01-10 Tom Tromey <tom@tromey.com>
13088
13089 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13090
13091 2017-01-10 Tom Tromey <tom@tromey.com>
13092
13093 * python/python.c (ensure_python_env, restore_python_env):
13094 Remove.
13095 * python/python-internal.h (ensure_python_env): Don't declare.
13096 * varobj.h (varobj_ensure_python_env): Don't declare.
13097 * varobj.c (varobj_ensure_python_env): Remove.
13098
13099 2017-01-10 Tom Tromey <tom@tromey.com>
13100
13101 * varobj.c (varobj_value_get_print_value): Use
13102 gdbpy_enter_varobj.
13103
13104 2017-01-10 Tom Tromey <tom@tromey.com>
13105
13106 * python/py-prettyprint.c (print_string_repr, print_children):
13107 Update.
13108 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13109 of "encoding".
13110 * varobj.c (varobj_value_get_print_value): Update.
13111 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13112
13113 2017-01-10 Tom Tromey <tom@tromey.com>
13114
13115 * varobj.c (varobj_get_display_hint)
13116 (dynamic_varobj_has_child_method, install_new_value_visualizer)
13117 (varobj_set_visualizer, free_variable): Use
13118 gdbpy_enter_varobj.
13119
13120 2017-01-10 Tom Tromey <tom@tromey.com>
13121
13122 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13123 (do_finish_initialization): New function. Use gdbpy_ref.
13124 (gdbpy_finish_initialization): Use gdbpy_enter. Call
13125 do_finish_initialization.
13126
13127 2017-01-10 Tom Tromey <tom@tromey.com>
13128
13129 * python/py-param.c (get_set_value, get_show_value): Use
13130 gdbpy_enter, gdbpy_ref.
13131
13132 2017-01-10 Tom Tromey <tom@tromey.com>
13133
13134 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
13135
13136 2017-01-10 Tom Tromey <tom@tromey.com>
13137
13138 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
13139
13140 2017-01-10 Tom Tromey <tom@tromey.com>
13141
13142 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
13143 Use gdbpy_enter_varobj.
13144
13145 2017-01-10 Tom Tromey <tom@tromey.com>
13146
13147 * varobj.c (gdbpy_enter_varobj): New constructor.
13148 * python/python-internal.h (gdbpy_enter_varobj): New class.
13149 * python/py-varobj.c (py_varobj_get_iterator): Use
13150 gdbpy_enter_varobj.
13151
13152 2017-01-10 Tom Tromey <tom@tromey.com>
13153
13154 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13155 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13156 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13157 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13158 unique_xmalloc_ptr.
13159 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13160
13161 2017-01-10 Tom Tromey <tom@tromey.com>
13162
13163 * python/py-xmethods.c (invoke_match_method): Use
13164 gdbpy_ref.
13165
13166 2017-01-10 Tom Tromey <tom@tromey.com>
13167
13168 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13169 gdbpy_enter, gdbpy_ref.
13170
13171 2017-01-10 Tom Tromey <tom@tromey.com>
13172
13173 * python/python.c (python_interactive_command): Use gdbpy_enter.
13174
13175 2017-01-10 Tom Tromey <tom@tromey.com>
13176
13177 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13178 gdbpy_ref.
13179
13180 2017-01-10 Tom Tromey <tom@tromey.com>
13181
13182 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13183 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13184
13185 2017-01-10 Tom Tromey <tom@tromey.com>
13186
13187 * utils.h (htab_deleter): New struct.
13188 (htab_up): New typedef.
13189 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13190 gdbpy_enter, gdbpy_ref, htab_up.
13191
13192 2017-01-10 Tom Tromey <tom@tromey.com>
13193
13194 * python/py-unwind.c (pending_frame_invalidate): Remove.
13195 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13196
13197 2017-01-10 Tom Tromey <tom@tromey.com>
13198
13199 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13200 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13201
13202 2017-01-10 Tom Tromey <tom@tromey.com>
13203
13204 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13205
13206 2017-01-10 Tom Tromey <tom@tromey.com>
13207
13208 * python/python.c (gdbpy_eval_from_control_command)
13209 (gdbpy_source_script, gdbpy_run_events)
13210 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13211 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13212 gdbpy_enter.
13213
13214 2017-01-10 Tom Tromey <tom@tromey.com>
13215
13216 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13217
13218 2017-01-10 Tom Tromey <tom@tromey.com>
13219
13220 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
13221
13222 2017-01-10 Tom Tromey <tom@tromey.com>
13223
13224 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
13225 (python_on_inferior_call_pre, python_on_inferior_call_post)
13226 (python_on_memory_change, python_on_register_change)
13227 (python_inferior_exit, python_new_objfile, add_thread_object)
13228 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
13229
13230 2017-01-10 Tom Tromey <tom@tromey.com>
13231
13232 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13233 (bpfinishpy_handle_exit): Use gdbpy_enter.
13234
13235 2017-01-10 Tom Tromey <tom@tromey.com>
13236
13237 * python/py-cmd.c (cmdpy_destroyer)
13238 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13239 gdbpy_enter.
13240
13241 2017-01-10 Tom Tromey <tom@tromey.com>
13242
13243 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13244 gdbpy_enter.
13245 (gdbpy_breakpoint_has_cond): Likewise.
13246
13247 2017-01-10 Tom Tromey <tom@tromey.com>
13248
13249 * python/python.c (gdbpy_enter): New constructor.
13250 (~gdbpy_enter): New destructor.
13251 (restore_python_env, ensure_python_env): Rewrite.
13252 * python/python-internal.h (gdbpy_enter): New class.
13253
13254 2017-01-10 Tom Tromey <tom@tromey.com>
13255
13256 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
13257
13258 2017-01-10 Tom Tromey <tom@tromey.com>
13259
13260 * python/py-value.c (value_has_field, get_field_flag)
13261 (get_field_type, valpy_getitem, convert_value_from_python): Use
13262 gdbpy_ref.
13263
13264 2017-01-10 Tom Tromey <tom@tromey.com>
13265
13266 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
13267 gdbpy_ref.
13268
13269 2017-01-10 Tom Tromey <tom@tromey.com>
13270
13271 * python/py-prettyprint.c (search_pp_list)
13272 (find_pretty_printer_from_objfiles)
13273 (find_pretty_printer_from_progspace)
13274 (find_pretty_printer_from_gdb, find_pretty_printer)
13275 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
13276 gdbpy_ref.
13277
13278 2017-01-10 Tom Tromey <tom@tromey.com>
13279
13280 * python/py-param.c (call_doc_function): Use gdbpy_ref.
13281
13282 2017-01-10 Tom Tromey <tom@tromey.com>
13283
13284 * python/py-linetable.c (build_line_table_tuple_from_pcs)
13285 (ltpy_get_all_source_lines): Use gdbpy_ref.
13286
13287 2017-01-10 Tom Tromey <tom@tromey.com>
13288
13289 * python/py-framefilter.c (extract_sym, extract_value)
13290 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
13291 gdbpy_ref.
13292
13293 2017-01-10 Tom Tromey <tom@tromey.com>
13294
13295 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
13296
13297 2017-01-10 Tom Tromey <tom@tromey.com>
13298
13299 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
13300
13301 2017-01-10 Tom Tromey <tom@tromey.com>
13302
13303 * python/py-function.c (convert_values_to_python, fnpy_init): Use
13304 gdbpy_ref.
13305
13306 2017-01-10 Tom Tromey <tom@tromey.com>
13307
13308 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
13309
13310 2017-01-10 Tom Tromey <tom@tromey.com>
13311
13312 * python/py-type.c (convert_field, make_fielditem, typy_fields)
13313 (typy_range): Use gdbpy_ref.
13314
13315 2017-01-10 Tom Tromey <tom@tromey.com>
13316
13317 * python/py-threadevent.c (create_thread_event_object): Use
13318 gdbpy_ref.
13319 * python/py-stopevent.c (create_stop_event_object): Simplify.
13320 (emit_stop_event): Use gdbpy_ref.
13321 * python/py-signalevent.c (create_signal_event_object): Use
13322 gdbpy_ref.
13323 * python/py-newobjfileevent.c (create_new_objfile_event_object)
13324 (emit_new_objfile_event, create_clear_objfiles_event_object)
13325 (emit_clear_objfiles_event): Use gdbpy_ref.
13326 * python/py-infevents.c (create_inferior_call_event_object)
13327 (create_register_changed_event_object)
13328 (create_memory_changed_event_object, emit_inferior_call_event)
13329 (emit_memory_changed_event, emit_register_changed_event): Use
13330 gdbpy_ref.
13331 * python/py-exitedevent.c (create_exited_event_object)
13332 (emit_exited_event): Use gdbpy_ref.
13333 * python/py-event.h (evpy_emit_event): Remove
13334 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
13335 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
13336 * python/py-continueevent.c (emit_continue_event): Use
13337 gdbpy_ref.
13338 * python/py-breakpoint.c (gdbpy_breakpoint_created)
13339 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
13340 gdbpy_ref.
13341 * python/py-bpevent.c (create_breakpoint_event_object): Use
13342 gdbpy_ref.
13343
13344 2017-01-10 Tom Tromey <tom@tromey.com>
13345
13346 * python/py-ref.h: New file.
13347
13348 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
13349
13350 * cli-out.c (cli_ui_out::do_redirect): Change return type to
13351 void.
13352 * cli-out.h (cli_ui_out::do_redirect): Likewise.
13353 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
13354 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
13355 * ui-out.c (ui_out::redirect): Likewise.
13356 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
13357 * cli/cli-logging.c (set_logging_redirect): Update call site of
13358 ui_out::redirect.
13359 (handle_redirections): Likewise.
13360 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
13361 * top.c (execute_command_to_string): Likewise.
13362 * utils.c (do_ui_out_redirect_pop): Likewise.
13363
13364 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
13365
13366 * stack.c (_initialize_stack): Update "frame" command help message.
13367
13368 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
13369
13370 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
13371
13372 2017-01-06 Yao Qi <yao.qi@linaro.org>
13373
13374 * x86-linux-nat.h: Include gdb_proc_service.h.
13375
13376 2017-01-06 Yao Qi <yao.qi@linaro.org>
13377
13378 * ser-base.h: Include serial.h.
13379
13380 2017-01-06 Yao Qi <yao.qi@linaro.org>
13381
13382 * ppc-linux-tdep.h: Include ppc-tdep.h.
13383
13384 2017-01-06 Yao Qi <yao.qi@linaro.org>
13385
13386 * nat/amd64-linux-siginfo.h: Include signal.h.
13387
13388 2017-01-06 Yao Qi <yao.qi@linaro.org>
13389
13390 * nat/aarch64-linux-hw-point.h: Include break-common.h.
13391
13392 2017-01-06 Yao Qi <yao.qi@linaro.org>
13393
13394 * mi/mi-parse.h: Include mi-cmds.h.
13395
13396 2017-01-06 Yao Qi <yao.qi@linaro.org>
13397
13398 * inf-loop.c: Don't include "target.h".
13399 * inf-loop.h: Include it here.
13400
13401 2017-01-06 Yao Qi <yao.qi@linaro.org>
13402
13403 * dfp.h: Include "dboulest.h" and "expression.h".
13404
13405 2017-01-06 Yao Qi <yao.qi@linaro.org>
13406
13407 * ax-gdb.h: Include "ax.h".
13408
13409 2017-01-06 Yao Qi <yao.qi@linaro.org>
13410
13411 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
13412 with nat/gdb_ptrace.h.
13413
13414 2017-01-05 Yao Qi <yao.qi@linaro.org>
13415
13416 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
13417 new line.
13418 (mips64_fbsd_sigframe_init): Likewise.
13419
13420 2017-01-04 John Baldwin <jhb@FreeBSD.org>
13421
13422 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
13423 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
13424
13425 2017-01-04 John Baldwin <jhb@FreeBSD.org>
13426
13427 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
13428 * NEWS: Mention new FreeBSD/mips native configuration.
13429 * config/mips/fbsd.mh: New file.
13430 * configure.host: Add mips*-*-freebsd*.
13431 * mips-fbsd-nat.c: New file.
13432
13433 2017-01-04 John Baldwin <jhb@FreeBSD.org>
13434
13435 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
13436 (ALLDEPFILES): Add mips-fbsd-tdep.c.
13437 * NEWS: Mention new FreeBSD/mips target.
13438 * configure.tgt: Add mips*-*-freebsd*.
13439 * mips-fbsd-tdep.c: New file.
13440 * mips-fbsd-tdep.h: New file.
13441
13442 2017-01-04 Yao Qi <yao.qi@linaro.org>
13443
13444 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
13445 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
13446
13447 2017-01-01 Joel Brobecker <brobecker@adacore.com>
13448
13449 Update copyright year range in all GDB files.
13450
13451 2017-01-01 Joel Brobecker <brobecker@adacore.com>
13452
13453 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
13454
13455 For older changes see ChangeLog-2016.
13456 \f
13457 Local Variables:
13458 mode: change-log
13459 left-margin: 8
13460 fill-column: 74
13461 version-control: never
13462 coding: utf-8
13463 End:
This page took 0.396298 seconds and 5 git commands to generate.