e4409896bacbdf4ee6a658bb53257a9cb014528f
[binutils-gdb.git] / gdb / ChangeLog
1 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * infrun.h: Include common/byte-vector.h.
4 (struct displaced_step_closure): New struct.
5 (struct buf_displaced_step_closure): New struct.
6 * infrun.c (displaced_step_closure::~displaced_step_closure):
7 Provide default implementation.
8 (displaced_step_clear): Deallocate step closure with delete.
9 * aarch64-tdep.c (displaced_step_closure): Rename to ...
10 (aarch64_displaced_step_closure): ... this, extend
11 displaced_step_closure.
12 (aarch64_displaced_step_data) <dsc>: Change type to
13 aarch64_displaced_step_closure.
14 (aarch64_displaced_step_copy_insn): Adjust to type change, use
15 unique_ptr.
16 (aarch64_displaced_step_fixup): Add cast for displaced step
17 closure.
18 * amd64-tdep.c (displaced_step_closure): Rename to ...
19 (amd64_displaced_step_closure): ... this, extend
20 displaced_step_closure.
21 <insn_buf>: Change type to std::vector<gdb_byte>.
22 <max_len>: Remove.
23 (fixup_riprel): Change type of DSC parameter, adjust to type
24 change of insn_buf.
25 (fixup_displaced_copy): Change type of DSC parameter.
26 (amd64_displaced_step_copy_insn): Instantiate
27 amd64_displaced_step_closure.
28 (amd64_displaced_step_fixup): Add cast for closure type, adjust
29 to type change of insn_buf.
30 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
31 parameter DSC.
32 (arm_linux_copy_svc): Likewise.
33 (cleanup_kernel_helper_return): Likewise.
34 (arm_catch_kernel_helper_return): Likewise.
35 (arm_linux_displaced_step_copy_insn): Instantiate
36 arm_displaced_step_closure.
37 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
38 (displaced_read_reg): Change type of parameter DSC.
39 (branch_write_pc): Likewise.
40 (load_write_pc): Likewise.
41 (alu_write_pc): Likewise.
42 (displaced_write_reg): Likewise.
43 (arm_copy_unmodified): Likewise.
44 (thumb_copy_unmodified_32bit): Likewise.
45 (thumb_copy_unmodified_16bit): Likewise.
46 (cleanup_preload): Likewise.
47 (install_preload): Likewise.
48 (arm_copy_preload): Likewise.
49 (thumb2_copy_preload): Likewise.
50 (install_preload_reg): Likewise.
51 (arm_copy_preload_reg): Likewise.
52 (cleanup_copro_load_store): Likewise.
53 (install_copro_load_store): Likewise.
54 (arm_copy_copro_load_store) Likewise.
55 (thumb2_copy_copro_load_store): Likewise.
56 (cleanup_branch): Likewise.
57 (install_b_bl_blx): Likewise.
58 (arm_copy_b_bl_blx): Likewise.
59 (thumb2_copy_b_bl_blx): Likewise.
60 (thumb_copy_b): Likewise.
61 (install_bx_blx_reg): Likewise.
62 (arm_copy_bx_blx_reg): Likewise.
63 (thumb_copy_bx_blx_reg): Likewise.
64 (cleanup_alu_imm): Likewise.
65 (arm_copy_alu_imm): Likewise.
66 (thumb2_copy_alu_imm): Likewise.
67 (cleanup_alu_reg): Likewise.
68 (install_alu_reg): Likewise.
69 (arm_copy_alu_reg): Likewise.
70 (thumb_copy_alu_reg): Likewise.
71 (cleanup_alu_shifted_reg): Likewise.
72 (install_alu_shifted_reg): Likewise.
73 (arm_copy_alu_shifted_reg): Likewise.
74 (cleanup_load): Likewise.
75 (cleanup_store): Likewise.
76 (arm_copy_extra_ld_st): Likewise.
77 (install_load_store): Likewise.
78 (thumb2_copy_load_literal): Likewise.
79 (thumb2_copy_load_reg_imm): Likewise.
80 (arm_copy_ldr_str_ldrb_strb): Likewise.
81 (cleanup_block_load_all): Likewise.
82 (cleanup_block_store_pc): Likewise.
83 (cleanup_block_load_pc): Likewise.
84 (arm_copy_block_xfer): Likewise.
85 (thumb2_copy_block_xfer): Likewise.
86 (cleanup_svc): Likewise.
87 (install_svc): Likewise.
88 (arm_copy_svc): Likewise.
89 (thumb_copy_svc): Likewise.
90 (arm_copy_undef): Likewise.
91 (thumb_32bit_copy_undef): Likewise.
92 (arm_copy_unpred): Likewise.
93 (arm_decode_misc_memhint_neon): Likewise.
94 (arm_decode_unconditional): Likewise.
95 (arm_decode_miscellaneous): Likewise.
96 (arm_decode_dp_misc): Likewise.
97 (arm_decode_ld_st_word_ubyte): Likewise.
98 (arm_decode_media): Likewise.
99 (arm_decode_b_bl_ldmstm): Likewise.
100 (arm_decode_ext_reg_ld_st): Likewise.
101 (thumb2_decode_dp_shift_reg): Likewise.
102 (thumb2_decode_ext_reg_ld_st): Likewise.
103 (arm_decode_svc_copro): Likewise.
104 (thumb2_decode_svc_copro): Likewise.
105 (install_pc_relative): Likewise.
106 (thumb_copy_pc_relative_16bit): Likewise.
107 (thumb_decode_pc_relative_16bit): Likewise.
108 (thumb_copy_pc_relative_32bit): Likewise.
109 (thumb_copy_16bit_ldr_literal): Likewise.
110 (thumb_copy_cbnz_cbz): Likewise.
111 (thumb2_copy_table_branch): Likewise.
112 (cleanup_pop_pc_16bit_all): Likewise.
113 (thumb_copy_pop_pc_16bit): Likewise.
114 (thumb_process_displaced_16bit_insn): Likewise.
115 (decode_thumb_32bit_ld_mem_hints): Likewise.
116 (thumb_process_displaced_32bit_insn): Likewise.
117 (thumb_process_displaced_insn): Likewise.
118 (arm_process_displaced_insn): Likewise.
119 (arm_displaced_init_closure): Likewise.
120 (arm_displaced_step_fixup): Add cast for closure.
121 * arm-tdep.h: Include infrun.h.
122 (displaced_step_closure): Rename to ...
123 (arm_displaced_step_closure): ... this, extend
124 displaced_step_closure.
125 <u::svc::copy_svc_os>: Change type of parameter DSC.
126 <cleanup>: Likewise.
127 (arm_process_displaced_insn): Likewise.
128 (arm_displaced_init_closure): Likewise.
129 (displaced_read_reg): Likewise.
130 (displaced_write_reg): Likewise.
131 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
132 Adjust.
133 * i386-tdep.h: Include infrun.h.
134 (i386_displaced_step_closure): New typedef.
135 * i386-tdep.c (i386_displaced_step_copy_insn): Use
136 i386_displaced_step_closure.
137 (i386_displaced_step_fixup): Adjust.
138 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
139 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
140 and unique_ptr.
141 (ppc_displaced_step_fixup): Adjust.
142 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
143 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
144 and unique_ptr.
145 (s390_displaced_step_fixup): Adjust.
146
147 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
148
149 * interps.h (interp_resume, interp_suspend, interp_set_temp):
150 Remove declarations.
151
152 2017-10-20 Tom Tromey <tom@tromey.com>
153
154 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
155 std::vector.
156 (gdb_bfd_record_inclusion): Update.
157 (bfdp): Remove typedef.
158
159 2017-10-20 Tom Tromey <tom@tromey.com>
160
161 * gdb_bfd.c (gdb_bfd_ref): Use new.
162 (struct gdb_bfd_data): Add constructor, destructor, and member
163 initializers.
164 (gdb_bfd_unref): Use delete.
165
166 2017-10-20 Tom Tromey <tom@tromey.com>
167
168 * exec.c (exec_file_attach): Use new_bfd_ref.
169 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
170 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
171 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
172 new_bfd_ref.
173 * gdb_bfd.h (new_bfd_ref): New function.
174
175 2017-10-20 Pedro Alves <palves@redhat.com>
176
177 * main.c (captured_command_loop): Add attribute noinline.
178
179 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
180
181 * interps.c (struct interp_factory): Add constructor.
182 (interp_factory_p): Remove typedef.
183 (DEF_VEC_P(interp_factory_p)): Remove.
184 (interpreter_factories): Change type to std::vector.
185 (interp_factory_register): Adjust.
186 (interp_lookup): Adjust.
187 (interpreter_completer): Adjust.
188
189 2017-10-19 Tom Tromey <tom@tromey.com>
190
191 * break-catch-syscall.c (catch_syscall_completer): Use
192 std::string, gdb::unique_xmalloc_ptr.
193
194 2017-10-19 Tom Tromey <tom@tromey.com>
195
196 * infcall.c (call_function_by_hand_dummy): Use std::string.
197
198 2017-10-19 Tom Tromey <tom@tromey.com>
199
200 * mi/mi-main.c (mi_cmd_execute): Update.
201 * top.h (prepare_execute_command): Return scoped_value_mark.
202 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
203 Add move constructor.
204 * top.c (prepare_execute_command): Return scoped_value_mark.
205 (execute_command): Update.
206
207 2017-10-19 Pedro Alves <palves@redhat.com>
208
209 * xml-support.c (xml_fetch_content_from_file): Check fread's
210 return.
211
212 2017-10-19 Pedro Alves <palves@redhat.com>
213
214 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
215 async.
216 (handle_error_fd): New function.
217 (ser_base_async): Add/delete an event loop file handler for
218 error_fd.
219
220 2017-10-19 Pedro Alves <palves@redhat.com>
221
222 * xml-support.c (xml_fetch_content_from_file): Don't read in
223 chunks. Instead use fseek to determine the file's size, and read
224 it in one go.
225
226 2017-11-18 Keith Seitz <keiths@redhat.com>
227
228 * c-exp.y (oper): Canonicalize conversion operators of user-defined
229 types.
230 Add whitespace to front of type name.
231
232 2017-10-18 Keith Seitz <keiths@redhat.com>
233
234 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
235 DW_AT_accessibility.
236
237 2017-10-18 Yao Qi <yao.qi@linaro.org>
238
239 * features/tic6x-c62x-linux.c: Remove.
240
241 2017-10-17 Tom Tromey <tom@tromey.com>
242
243 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
244 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
245 (do_mixed_source_and_assembly): Likewise.
246
247 2017-10-17 Tom Tromey <tom@tromey.com>
248
249 * regcache.c (regcache::xfer_part): Remove assertion.
250
251 2017-10-17 Pedro Alves <palves@redhat.com>
252
253 * xml-support.c (xml_fetch_content_from_file): Call
254 unique_ptr::release() instead unique_ptr::get() when passing
255 through xrealloc.
256
257 2017-10-17 Yao Qi <yao.qi@linaro.org>
258
259 * regcache.c (regcache::xfer_part): Remove parameters read and
260 write, add parameter is_raw. All callers are updated.
261
262 2017-10-16 Keith Seitz <keiths@redhat.com>
263
264 * c-typeprint.c (enum access_specifier): Moved here from
265 c_type_print_base.
266 (output_access_specifier): New function.
267 (c_type_print_base): Consider typedefs when assessing
268 whether access labels are needed.
269 Use output_access_specifier as needed.
270 Output access specifier for typedefs, if needed.
271 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
272 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
273 fields.
274 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
275 accessor macros.
276
277 2017-10-16 Tom Tromey <tom@tromey.com>
278
279 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
280 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
281 * target.c (target_fileio_read_stralloc): Update.
282 * sparc64-tdep.c (adi_is_addr_mapped): Update.
283 * target.h (target_fileio_read_stralloc): Return
284 unique_xmalloc_ptr.
285
286 2017-10-16 Tom Tromey <tom@tromey.com>
287
288 * xml-syscall.c (xml_init_syscalls_info): Update.
289 * xml-support.c (xinclude_start_include): Update.
290 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
291 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
292 (xml_fetch_content_from_file): Likewise.
293 * osdata.c (get_osdata): Update.
294 * target.h (target_read_stralloc, target_get_osdata): Return
295 unique_xmalloc_ptr.
296 * solib-aix.c (solib_aix_get_library_list): Update.
297 * solib-target.c (solib_target_current_sos): Update.
298 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
299 * xml-tdesc.c (fetch_available_features_from_target): Update.
300 (target_fetch_description_xml): Update.
301 (file_read_description_xml): Update.
302 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
303 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
304 (remote_pid_to_exec_file): Update.
305 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
306 (target_get_osdata): Likewise.
307
308 2017-10-16 Tom Tromey <tom@tromey.com>
309
310 * remote.c (remote_register_number_and_offset): Use std::vector.
311 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
312 (putpkt_binary): Use gdb::def_vector.
313 (compare_sections_command): Use gdb::byte_vector.
314
315 2017-10-16 Tom Tromey <tom@tromey.com>
316
317 * ppc-linux-nat.c (hwdebug_insert_point): Use
318 gdb::unique_xmalloc_ptr, XDUP.
319
320 2017-10-16 Tom Tromey <tom@tromey.com>
321
322 * probe.c (parse_probes): Use std::string.
323 (info_probes_for_ops, enable_probes_command)
324 (disable_probes_command): Remove cleanups.
325
326 2017-10-16 Tom Tromey <tom@tromey.com>
327
328 * buildsym.c (block_compar): Remove.
329 (end_symtab_get_static_block): Use std::vector.
330
331 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
332
333 * memrange.h (struct mem_range): Define operator< and operator==.
334 (mem_range_s): Remove.
335 (DEF_VEC_O (mem_range_s)): Remove.
336 (normalize_mem_ranges): Change parameter type to std::vector.
337 * memrange.c (compare_mem_ranges): Remove.
338 (normalize_mem_ranges): Change parameter type to std::vector,
339 adjust to vector change.
340 * exec.c (section_table_available_memory): Return vector, remove
341 parameter.
342 (section_table_read_available_memory): Adjust to std::vector
343 change.
344 * remote.c (remote_read_bytes): Adjust to std::vector
345 change.
346 * tracepoint.h (traceframe_available_memory): Change parameter
347 type to std::vector.
348 * tracepoint.c (traceframe_available_memory): Change parameter
349 type to std::vector, adjust.
350 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
351 std::vector change.
352 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
353 unittests/memrange-selftests.c.
354 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
355 * gdb/unittests/memrange-selftests.c: New file.
356
357 2017-10-16 Pedro Alves <palves@redhat.com>
358
359 * elfread.c (probe_key_free): Rename range-for variable.
360 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
361 (find_probe_by_pc, collect_probes): Rename range-for variable.
362
363 2017-10-16 Yao Qi <yao.qi@linaro.org>
364
365 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
366 * features/tic6x-c62x.c: Remove.
367 * features/tic6x-c64x-linux.c: Remove.
368 * features/tic6x-c64x.c: Remove.
369 * features/tic6x-c64xp-linux.c: Remove.
370 * features/tic6x-c64xp.c: Remove.
371 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
372 initialize_tdesc_tic6x_*_linux functions.
373 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
374 initialize_tdesc_tic6x_* functions.
375
376 2017-10-16 Yao Qi <yao.qi@linaro.org>
377
378 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
379 tic6x-c62x.
380 * regformats/tic6x-c62x.dat: Remove.
381 * regformats/tic6x-c64x.dat: Remove.
382 * regformats/tic6x-c64xp.dat: Remove.
383
384 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
385
386 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
387 (the !HAVE_LIBEXPAT version).
388
389 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
390
391 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
392 const.
393
394 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
395
396 * target.h: Include tracepoint.h.
397 (enum trace_find_type): Move to tracepoint.h.
398 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
399 * tracepoint.h: Don't include target.h
400 (enum trace_find_type): Move from target.h.
401 (parse_traceframe_info): Return a unique ptr.
402 * tracepoint.c (current_traceframe_info): Change type to unique
403 ptr.
404 (free_traceframe_info): Remove.
405 (clear_traceframe_info): Don't manually free
406 current_traceframe_info.
407 (free_result): Remove.
408 (parse_traceframe_info): Return a unique ptr.
409 (get_traceframe_info): Adjust to unique ptr.
410 * ctf.c (ctf_traceframe_info): Return a unique ptr.
411 * remote.c (remote_traceframe_info): Return a unique ptr.
412 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
413 ptr.
414 * target-debug.h (target_debug_print_traceframe_info_up): New
415 macro.
416 * target-delegates.c: Regenerate.
417
418 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
419
420 * memrange.h (struct mem_range): Add constructors.
421 * tracepoint.h (struct traceframe_info) <memory>: Change type to
422 std::vector<mem_range>.
423 * tracepoint.c (free_traceframe_info): Don't manually free
424 vector.
425 (traceframe_info_start_memory): Adjust to vector change.
426 (traceframe_available_memory): Likewise.
427 * tracefile-tfile.c (build_traceframe_info): Likewise.
428 * ctf.c (ctf_traceframe_info): Likewise.
429
430 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
431
432 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
433 std::vector<int>.
434 * tracepoint.c (free_traceframe_info): Deallocate with delete.
435 (traceframe_info_start_tvar): Adjust to vector change.
436 (parse_traceframe_info): Allocate with new.
437 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
438 vector change.
439 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
440 change.
441 tfile_traceframe_info): Allocate with new.
442 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
443 change.
444
445 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
446
447 * tracepoint.c (traceframe_info): Rename to...
448 (current_traceframe_info): ...this.
449 (clear_traceframe_info): Adjust.
450 (get_traceframe_info): Adjust.
451
452 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
453
454 * nat/linux-osdata.c: Include algorithm.
455 (compare_processes): Remove.
456 (struct pid_pgid_entry): New struct.
457 (linux_xfer_osdata_processgroups): Use std::vector instead of
458 XNEWVEC.
459
460 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
461
462 * objfiles.h: Don't include symfile.h.
463 (struct partial_symbol): Remove forward-declaration.
464 (struct objfile) <global_psymbols, static_psymbols>: Change type
465 to std::vector<partial_symbol *>.
466 * objfiles.c (objfile::objfile): Don't memset those fields.
467 (objfile::~objfile): Don't free those fields.
468 * psympriv.h (struct psymbol_allocation_list): Remove
469 forward-declaration.
470 (add_psymbol_to_list): Change psymbol_allocation_list parameter
471 to std::vector.
472 (start_psymtab_common): Change parameters to std::vector.
473 * psymtab.c: Include algorithm.
474 (require_partial_symbols): Call shrink_to_fit.
475 (find_pc_sect_psymbol): Adjust to vector change.
476 (match_partial_symbol): Likewise.
477 (lookup_partial_symbol): Likewise.
478 (psym_relocate): Likewise.
479 (dump_psymtab): Likewise.
480 (recursively_search_psymtabs): Likewise.
481 (compare_psymbols): Remove.
482 (sort_pst_symbols): Adjust to vector change.
483 (start_psymtab_common): Likewise.
484 (end_psymtab_common): Likewise.
485 (psymbol_bcache_full): De-constify return value.
486 (add_psymbol_to_bcache): Likewise.
487 (extend_psymbol_list): Remove.
488 (append_psymbol_to_list): Adjust to vector change.
489 (add_psymbol_to_list): Likewise.
490 (init_psymbol_list): Likewise.
491 (maintenance_info_psymtabs): Likewise.
492 (maintenance_check_psymtabs): Likewise.
493 * symfile.h (struct psymbol_allocation_list): Remove.
494 * symfile.c (reread_symbols): Adjust to vector change.
495 * dbxread.c (start_psymtab): Change type of parameters.
496 (dbx_symfile_read): Adjust to vector change.
497 (read_dbx_symtab): Likewise.
498 (start_psymtab): Change type of parameters.
499 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
500 (create_partial_symtab): Likewise.
501 (add_partial_symbol): Likewise.
502 (write_one_signatured_type): Likewise.
503 (recursively_write_psymbols): Likewise.
504 * mdebugread.c (parse_partial_symbols): Likewise.
505 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
506 (scan_xcoff_symtab): Adjust to vector change.
507 (xcoff_initial_scan): Likewise.
508
509 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
510
511 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
512
513 2017-10-13 Yao Qi <yao.qi@linaro.org>
514
515 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
516 Remove s390x-*-expedite, add s390x-expedite.
517
518 2017-10-13 Yao Qi <yao.qi@linaro.org>
519
520 * features/s390-gs-linux64.c: Regenerated.
521 * features/s390x-gs-linux64.c: Regenerated.
522
523 2017-10-13 Tom Tromey <tom@tromey.com>
524
525 * compile/compile-object-run.c (do_module_cleanup): Use delete.
526 * solib.c (update_solib_list, reload_shared_libraries_1): Use
527 delete.
528 * symfile.c (symbol_file_add_with_addrs): Use new.
529 (symbol_file_add_separate): Update comment.
530 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
531 * jit.c (jit_object_close_impl): Use new.
532 (jit_unregister_code): Use delete.
533 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
534 (~objfile): Rename from free_objfile.
535 (free_objfile_separate_debug, do_free_objfile_cleanup)
536 (free_all_objfiles, objfile_purge_solibs): Use delete.
537 * objfiles.h (struct objfile): Add constructor and destructor.
538 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
539 (allocate_objfile, free_objfile): Don't declare.
540 (struct objstats): Add initializers.
541
542 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
543
544 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
545 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
546 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
547 * gdbarch.h: Regenerate.
548 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
549 Adjust comment.
550 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
551 (i386_displaced_step_fixup): Adjust comment.
552 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
553
554 2017-10-12 Tom Tromey <tom@tromey.com>
555
556 * prologue-value.h (pv_area::store_would_trash): Return bool.
557 (pv_area::find_reg): Likewise.
558 * prologue-value.c (pv_area::store_would_trash): Return bool.
559 (pv_area::find_reg): Likewise.
560
561 2017-10-12 Tom Tromey <tom@tromey.com>
562
563 * s390-linux-tdep.c (s390_store, s390_load)
564 (s390_check_for_saved, s390_analyze_prologue): Update.
565 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
566 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
567 * prologue-value.h (class pv_area): Move from prologue-value.c.
568 Change names of members. Add constructor, destructor, member
569 functions.
570 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
571 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
572 (pv_area_fetch, pv_area_scan): Don't declare.
573 * prologue-value.c (struct pv_area::area_entry): Now member of
574 pv_area.
575 (struct pv_area): Move to prologue-value.h.
576 (pv_area::pv_area): Rename from make_pv_area.
577 (pv_area::~pv_area): Rename from free_pv_area.
578 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
579 (clear_entries, find_entry, overlaps, store_would_trash, store)
580 (fetch, find_reg, scan): Now member of pv_area.
581 Remove "area" argument. Update.
582 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
583 Update.
584 * mn10300-tdep.c (push_reg, check_for_saved)
585 (mn10300_analyze_prologue): Update.
586 * mep-tdep.c (is_arg_spill, check_for_saved)
587 (mep_analyze_prologue): Update.
588 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
589 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
590 (m32c_is_struct_return, m32c_analyze_prologue): Update.
591 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
592 Update.
593 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
594 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
595
596 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
597
598 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
599 * linux-nat.c (linux_nat_delete_thread): New variable.
600 (lwp_free): Invoke linux_nat_delete_thread if set.
601 (linux_nat_set_delete_thread): New function.
602 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
603 thread delete callback.
604 * arm-linux-nat.c (arm_linux_delete_thread): New function.
605 (_initialize_arm_linux_nat): Assign thread delete callback.
606 * s390-linux-nat.c (s390_delete_thread): New function.
607 (_initialize_s390_nat): Assign thread delete callback.
608 * x86-linux-nat.c (x86_linux_add_target): Likewise.
609 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
610 function.
611 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
612 declaration.
613 * nat/x86-linux.c (x86_linux_delete_thread): New function.
614 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
615
616 2017-10-09 Tom Tromey <tom@tromey.com>
617
618 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
619 std::string.
620 * tui/tui-layout.c (enum tui_status): Use std::string.
621
622 2017-10-11 Tom Tromey <tom@tromey.com>
623
624 * gdbthread.h (thread_command): Constify.
625 * inferior.h (detach_command): Constify.
626 * top.h (set_history, show_history): Constify.
627 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
628 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
629 * bsd-kvm.c (bsd_kvm_cmd): Constify.
630 * printcmd.c (set_command): Constify.
631 (non_const_set_command): New function.
632 * dcache.c (set_dcache_command, show_dcache_command): Constify.
633 * breakpoint.c (enable_command, disable_command, delete_command)
634 (catch_command, tcatch_command, set_breakpoint_cmd)
635 (show_breakpoint_cmd): Constify.
636 * macrocmd.c (macro_command): Constify.
637 * infcmd.c (unset_command, kill_command, detach_command)
638 (info_proc_cmd): Constify.
639 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
640 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
641 (info_auto_load_cmd): Constify.
642 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
643 (unset_tdesc_cmd): Constify.
644 * ada-lang.c (set_ada_command, show_ada_command)
645 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
646 * guile/guile.c (set_guile_command, show_guile_command)
647 (info_guile_command): Constify.
648 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
649 Constify.
650 * skip.c (skip_command): Constify.
651 * compile/compile.c (_initialize_compile): Constify.
652 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
653 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
654 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
655 (maint_btrace_pt_show_cmd): Constify.
656 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
657 Constify.
658 * python/python.c (user_show_python, user_set_python): Constify.
659 * mips-tdep.c (set_mips_command, show_mips_command)
660 (set_mipsfpu_command): Constify.
661 * record-btrace.c (cmd_record_btrace_start)
662 (cmd_set_record_btrace, cmd_show_record_btrace)
663 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
664 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
665 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
666 Constify.
667 * symfile.c (overlay_command): Constify.
668 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
669 * cli/cli-logging.c (set_logging_command, show_logging_command):
670 Constify.
671 * cli/cli-dump.c (dump_command, append_command)
672 (srec_dump_command, ihex_dump_command, verilog_dump_command)
673 (tekhex_dump_command, binary_dump_command)
674 (binary_append_command): Constify.
675 * cli/cli-decode.c (struct cmd_list_element): Change type of
676 "fun".
677 * cli/cli-cmds.c (info_command, show_command, set_debug)
678 (show_debug): Constify.
679 (show_command): Add non-const overload.
680 * top.c (set_history, show_history): Constify.
681 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
682 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
683 * target.c (target_command): Constify.
684 * sparc64-tdep.c (info_adi_command): Constify.
685 * record-full.c (cmd_record_full_start): Constify.
686 (set_record_full_command): Constify. Fix typo.
687 (show_record_full_command): Constify.
688 * thread.c (thread_command, thread_apply_command): Constify.
689 * memattr.c (dummy_cmd): Constify.
690 * value.c (function_command): Constify.
691 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
692 * probe.c (info_probes_command): Constify.
693 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
694 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
695 (show_thread_cmd, set_thread_default_cmd)
696 (show_thread_default_cmd): Constify.
697 (check_empty): Constify.
698 * tracepoint.c (tfind_command): Constify.
699 * cp-support.c (maint_cplus_command): Constify.
700 * windows-tdep.c (info_w32_command): Constify.
701 * record.c (cmd_record_start, set_record_command)
702 (show_record_command, info_record_command, cmd_record_goto):
703 Constify.
704 * ravenscar-thread.c (set_ravenscar_command)
705 (show_ravenscar_command): Constify.
706 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
707 Constify.
708 (add_internal_problem_command): Remove casts.
709 * arc-tdep.c (maintenance_print_arc_command): Constify.
710 * valprint.c (set_print, show_print, set_print_raw)
711 (show_print_raw): Constify.
712 * maint.c (maintenance_command, maintenance_info_command)
713 (maintenance_print_command, maintenance_set_cmd)
714 (maintenance_show_cmd, set_per_command_cmd)
715 (show_per_command_cmd, maintenance_check_command): Constify.
716 * language.c (set_check, show_check): Constify.
717 * typeprint.c (show_print_type, set_print_type): Constify.
718 * go32-nat.c (go32_info_dos_command): Constify.
719
720 2017-10-11 Tom Tromey <tom@tromey.com>
721
722 * breakpoint.c (prepare_re_set_context): Remove.
723 (breakpoint_re_set_one): Update. Don't use cleanups.
724 (breakpoint_re_set): Use scoped_restore, std::string, and
725 scoped_restore_current_language.
726
727 2017-10-11 Tom Tromey <tom@tromey.com>
728
729 * breakpoint.c (commands_command_1): Use std::string.
730 (cleanup_executing_breakpoints): Remove.
731 (bpstat_do_actions_1): Use scoped_restore.
732 (bpstat_check_watchpoint): Use std::string.
733 (decode_static_tracepoint_spec): Likewise.
734 (break_range_command): Likewise.
735 (watch_command_1): Likewise.
736 (compare_breakpoints): Change argument types.
737 (clear_command): Use std::vector.
738 (cleanup_executing_breakpoints): Remove.
739 (update_global_location_list): Use unique_xmalloc_ptr.
740 (strace_command): Remove unused declaration.
741
742 2017-10-11 John Baldwin <jhb@FreeBSD.org>
743
744 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
745 * NEWS: Mention new FreeBSD/arm native configuration.
746 * configure.host: Add arm*-*-freebsd*.
747 * configure.nat: Likewise.
748 * arm-fbsd-nat.c: New file.
749
750 2017-10-11 John Baldwin <jhb@FreeBSD.org>
751
752 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
753 (ALLDEPFILES): Add arm-fbsd-tdep.c.
754 * NEWS: Mention new FreeBSD/arm target.
755 * configure.tgt: Add arm*-*-freebsd*.
756 * arm-fbsd-tdep.c: New file.
757 * arm-fbsd-tdep.h: New file.
758
759 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
760
761 * linux-tdep.c (linux_make_corefile_notes): Remove call to
762 `gdbarch_elfcore_write_linux_prpsinfo'.
763 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
764 method.
765 (elf_internal_linux_prpsinfo): Remove declaration.
766 * gdbarch.h: Regenerate.
767 * gdbarch.c: Regenerate.
768
769 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
770
771 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
772 `set_gdbarch_elfcore_write_linux_prpsinfo'.
773
774 2017-10-11 Pedro Alves <palves@redhat.com>
775
776 * breakpoint.c (reattach_breakpoints): Delete.
777 * breakpoint.h (reattach_breakpoints): Delete.
778
779 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
780
781 * symfile.c (registered_sym_fns): Make struct, not typedef.
782 (DEF_VEC_O (registered_sym_fns)): Remove.
783 (symtab_fns): Change type to std::vector.
784 (add_symtab_fns): Adjust.
785 (find_sym_fns): Adjust.
786
787 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
788
789 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
790 * arc-tdep.h (arc_arch_is_em): New function.
791 (arc_arch_is_hs): Likewise.
792
793 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
794
795 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
796 parentheses in the declaration.
797 (macro_lookup_inclusion): Likewise.
798 (macro_lookup_definition): Likewise.
799 * p-lang.h (pascal_builtin_types): Likewise.
800 * tui/tui-data.c (tui_win_list): Likewise.
801 * tui/tui-data.h (tui_win_list): Likewise.
802 * utils.h (make_cleanup_free_section_addr_info): Likewise.
803
804 2017-10-11 Mark Rages <markrages@gmail.com>
805
806 * target-memory.c (block_boundaries): Fix for block address not
807 aligned on block size.
808
809 2017-10-10 Pedro Alves <palves@redhat.com>
810 Tom Tromey <tom@tromey.com>
811
812 * breakpoint.c (struct captured_breakpoint_query_args)
813 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
814 (print_breakpoint): New.
815 * breakpoint.h (print_breakpoint): Declare.
816 * common/common-exceptions.h (enum return_reason): Remove
817 references to catch_exceptions.
818 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
819 Delete.
820 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
821 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
822 * gdb.h: Delete.
823 * gdbthread.h (thread_select): Declare.
824 * mi/mi-cmd-break.c: Don't include gdb.h.
825 (breakpoint_notify): Use print_breakpoint.
826 * mi/mi-cmd-catch.c: Don't include gdb.h.
827 * mi/mi-interp.c: Don't include gdb.h.
828 (mi_print_breakpoint_for_event): New.
829 (mi_breakpoint_created, mi_breakpoint_modified): Use
830 mi_print_breakpoint_for_event.
831 * mi/mi-main.c: Don't include gdb.h.
832 (mi_cmd_thread_select): Parse the global thread ID here. Use
833 thread_select instead of gdb_thread_select.
834 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
835 of using gdb_list_thread_ids.
836 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
837 FILEIO_ENOSYS here.
838 (remote_fileio_request): Use TRY/CATCH instead of
839 catch_exceptions.
840 * symfile-mem.c (struct symbol_file_add_from_memory_args)
841 (symbol_file_add_from_memory_wrapper): Delete.
842 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
843 * thread.c: Don't include gdb.h.
844 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
845 (thread_alive): Use thread_select.
846 (do_captured_thread_select): Delete, parts salvaged as ...
847 (thread_select): ... this new function.
848 (gdb_thread_select): Delete.
849
850 2017-10-10 Pedro Alves <palves@redhat.com>
851 Tom Tromey <tom@tromey.com>
852
853 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
854 and reverse logic.
855 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
856 No longer macros. Instead ...
857 (enum wp_check_result): They're now values of this new
858 enumeration.
859 (watchpoint_check): Change return type to wp_check_result and
860 parameter type to bpstat.
861 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
862 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
863 catch_errors. Reverse logic of watchpoint_check call.
864 (breakpoint_re_set_one): Now returns void and takes a breakpoint
865 pointer as parameter.
866 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
867 * common/common-exceptions.c (throw_exception_sjlj): Update
868 comments to avoid mentioning catch_errors.
869 * exceptions.c (catch_errors): Delete.
870 * exceptions.h: Update comments to avoid mentioning catch_errors.
871 (catch_errors_ftype, catch_errors): Delete.
872 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
873 (hook_stop_stub): Delete.
874 (restore_selected_frame): Change return type to void, and
875 parameter type to const frame_id &.
876 (restore_infcall_control_state): Use TRY/CATCH instead of
877 catch_errors.
878 * main.c (captured_command_loop): Return void and remove
879 parameter. Remove references to catch_errors.
880 (captured_main): Use TRY/CATCH instead of catch_errors.
881 * objc-lang.c (objc_submethod_helper_data)
882 (find_objc_msgcall_submethod_helper): Delete.
883 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
884 catch_errors.
885 * record-full.c (record_full_message): Return void.
886 (record_full_message_args, record_full_message_wrapper): Delete.
887 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
888 instead of catch_errors.
889 * solib-aix.c (solib_aix_open_symbol_file_object): Change
890 parameter type to int.
891 * solib-darwin.c (open_symbol_file_object): Ditto.
892 * solib-dsbt.c (open_symbol_file_object): Ditto.
893 * solib-frv.c (open_symbol_file_object): Ditto.
894 * solib-svr4.c (open_symbol_file_object): Ditto.
895 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
896 * solib.c (update_solib_list): Use TRY/CATCH instead of
897 catch_errors.
898 * solist.h (struct target_so_ops) <open_symbol_file_object>:
899 Change type.
900 * symmisc.c (struct print_symbol_args): Remove.
901 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
902 (print_symbol): Change type.
903 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
904 and remove parameters.
905 (catch_errors): New.
906 (get_windows_debug_event): Adjust.
907
908 2017-10-09 Tom Tromey <tom@tromey.com>
909
910 * mi/mi-main.c (free_splay_tree): Remove.
911 (list_available_thread_groups): Use splay_tree_up.
912 * common/gdb_splay_tree.h: New file.
913
914 2017-10-09 Tom Tromey <tom@tromey.com>
915
916 * mi/mi-main.c (do_nothing): Remove.
917 (list_available_thread_groups): Update.
918
919 2017-10-09 Pedro Alves <palves@redhat.com>
920
921 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
922 reading registers when switching context.
923
924 2017-10-09 John Baldwin <jhb@FreeBSD.org>
925
926 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
927 (fbsd_convert_siginfo): Likewise.
928 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
929
930 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
931
932 * configure.ac (try_guile_versions): Remove guile-2.2.
933 * configure: Regenerate.
934
935 2017-10-09 Tom Tromey <tom@tromey.com>
936
937 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
938 (COMPILE.pre): Use $(CXX).
939
940 2017-10-09 Pedro Alves <palves@redhat.com>
941
942 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
943 Use bool.
944 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
945 * cp-support.h (cp_remove_params): Now returns a
946 gdb::unique_xmalloc_ptr.
947 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
948 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
949 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
950 returning a gdb::unique_xmalloc_ptr.
951 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
952 * stack.c (find_frame_funname): Adjust to cp_remove_params
953 returning a gdb::unique_xmalloc_ptr.
954
955 2017-10-08 Tom Tromey <tom@tromey.com>
956
957 * dwarf2read.c (dwarf2_get_dwz_file): Use
958 gdb::unique_xmalloc_ptr.
959 (find_slot_in_mapped_hash): Likewise.
960 (dwarf2_physname): Likewise.
961 (create_dwo_unit_in_dwp_v1): Use std::string.
962 (create_dwo_unit_in_dwp_v2): Likewise.
963 (lookup_dwo_cutu): Likewise.
964 (inherit_abstract_dies): Use std::vector.
965 (read_array_type): Likewise.
966 (dwarf_decode_macros): Remove unused declaration.
967 (unsigned_int_compar): Remove.
968 (dwarf2_build_psymtabs_hard): Use scoped_restore.
969 (psymtabs_addrmap_cleanup): Remove.
970
971 2017-10-08 Tom Tromey <tom@tromey.com>
972
973 * frame-unwind.c (frame_unwind_try_unwinder): Update.
974 * frame.h (frame_cleanup_after_sniffer): Declare.
975 (frame_prepare_for_sniffer): Return void.
976 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
977 type of argument.
978 (frame_prepare_for_sniffer): Return void.
979
980 2017-10-08 Tom Tromey <tom@tromey.com>
981
982 * utils.h (make_cleanup_value_free): Remove.
983 * utils.c (do_value_free, struct cleanup): Remove.
984 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
985 Use gdb_value_up.
986 * value.h (struct value_deleter): New.
987 (gdb_value_up): New typedef.
988
989 2017-10-08 Tom Tromey <tom@tromey.com>
990
991 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
992 (make_cleanup_free_search_symbols): Remove.
993 (search_symbols): Return std::vector.
994 (symbol_search::compare_search_syms): Now member of
995 symbol_search. Change arguments.
996 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
997 (symtab_symbol_info, rbreak_command): Update.
998 * symtab.h (struct symbol_search) <next>: Remove.
999 Add constructors.
1000 (symbol_search::operator<): New function.
1001 (symbol_search::operator==): New function.
1002 (search_symbols): Remove std::vector.
1003 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1004 (symbol_search::compare_search_syms): Declare.
1005
1006 2017-10-06 Yao Qi <yao.qi@linaro.org>
1007
1008 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1009 arch/aarch64-insn.o.
1010 Remove one rule.
1011 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1012
1013 2017-10-06 Yao Qi <yao.qi@linaro.org>
1014
1015 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1016 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1017 arch/arm-linux.o respectively.
1018 * configure.tgt: Likewise.
1019
1020 2017-10-06 Yao Qi <yao.qi@linaro.org>
1021
1022 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1023 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1024
1025 2017-10-06 Pedro Alves <palves@redhat.com>
1026
1027 * windows-nat.c: Include <algorithm>.
1028
1029 2017-10-06 Yao Qi <yao.qi@linaro.org>
1030
1031 * configure.tgt (i386_tobjs): New variable.
1032 (amd64_tobjs): New variable.
1033 Set $cpu_obs and $os_obs.
1034
1035 2017-10-06 Yao Qi <yao.qi@linaro.org>
1036
1037 * Makefile.in (CONFIG_SRC_SUBDIR): New.
1038 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1039 (clean): Remove object files and dependency files.
1040 (distclean): Remove the directory.
1041 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1042 * configure: Re-generated.
1043 * configure.tgt: Replace amd64.o with arch/amd64.o.
1044
1045 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
1046
1047 PR build/22188
1048 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1049 and SETEND.
1050
1051 2017-10-05 Pedro Alves <palves@redhat.com>
1052
1053 * linux-nat.c (linux_child_follow_fork): When following the parent
1054 and detaching the child, consult the parent thread's architecture
1055 instead of the child's.
1056
1057 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1058
1059 * ax.h: Do not include "doublest.h".
1060 (union agent_val): Remove.
1061
1062 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1063
1064 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1065 (decimal_to_string): Return std::string object.
1066 (decimal_from_string): Accept std::string object. Return bool.
1067 (decimal_from_integral, decimal_from_doublest): Remove.
1068 (decimal_from_longest): Add prototype.
1069 (decimal_from_ulongest): Likewise.
1070 (decimal_to_longest): Likewise.
1071 (decimal_from_doublest): Likewise.
1072 * dfp.c: Do not include "gdbtypes.h" or "value.h".
1073 (MAX_DECIMAL_STRING): Move here.
1074 (decimal_to_string): Return std::string object.
1075 (decimal_from_string): Accept std::string object. Return bool.
1076 (decimal_from_integral): Remove, replace by ...
1077 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1078 (decimal_to_longest): New function.
1079 (decimal_from_floating): Remove, replace by ...
1080 (decimal_from_doublest): ... this new function.
1081 (decimal_to_doublest): Update to new decimal_to_string interface.
1082
1083 * value.c (unpack_long): Use decimal_to_longest.
1084 * valops.c (value_cast): Use decimal_from_doublest instead of
1085 decimal_from_floating. Use decimal_from_[u]longest isntead of
1086 decimal_from_integral.
1087 * valarith.c (value_args_as_decimal): Likewise.
1088 * valprint.c (print_decimal_floating): Update to new
1089 decimal_to_string interface.
1090 * printcmd.c (printf_decfloat): Likewise.
1091 * c-exp.y (parse_number): Update to new decimal_from_string interface.
1092
1093 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1094
1095 * doublest.h: Do not include "floatformat.h". Remove stale comments.
1096 * gdbtypes.c: Include "floatformat.h".
1097 * value.c: Likewise.
1098 * m68k-tdep.c: Likewise.
1099
1100 * findvar.c: Do not include "floatformat.h".
1101 * amd64-darwin-tdep.c: Likewise.
1102 * arm-linux-tdep.c: Likewise.
1103 * i386-darwin-tdep.c: Likewise.
1104 * i387-tdep.c: Likewise.
1105 * m68k-linux-tdep.c: Likewise.
1106 * mep-tdep.c: Likewise.
1107 * mips-tdep.c: Likewise.
1108 * nios2-tdep.c: Likewise.
1109 * s390-linux-tdep.c: Likewise.
1110 * sparc-obsd-tdep.c: Likewise.
1111 * sparc-tdep.c: Likewise.
1112 * sparc64-tdep.c: Likewise.
1113 * spu-tdep.c: Likewise.
1114 * tic6x-tdep.c: Likewise.
1115 * tilegx-tdep.c: Likewise.
1116 * vax-tdep.c: Likewise.
1117 * xstormy16-tdep.c: Likewise.
1118 * xtensa-tdep.c: Likewise.
1119
1120 * top.c: Do not include "doublest.h".
1121 * aarch64-tdep.c: Likewise.
1122 * alpha-tdep.c: Likewise.
1123 * arm-linux-tdep.c: Likewise.
1124 * m68k-linux-tdep.c: Likewise.
1125 * tilegx-tdep.c: Likewise.
1126 * xstormy16-tdep.c: Likewise.
1127
1128 2017-10-05 John Baldwin <jhb@FreeBSD.org>
1129
1130 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
1131 (mipsn32_fbsd_sigframe): Define.
1132 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
1133 for FreeBSD/mipsn32.
1134
1135 2017-10-05 John Baldwin <jhb@FreeBSD.org>
1136
1137 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
1138 AT_HWCAP.
1139
1140 2017-10-05 Tristan Gingold <tgingold@free.fr>
1141
1142 * MAINTAINERS (Misc): Update my email address.
1143
1144 2017-10-04 Pedro Alves <palves@redhat.com>
1145
1146 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
1147 it instead of target_gdbarch.
1148 (get_remote_state, get_remote_packet_size): Adjust
1149 get_remote_arch_state calls, passing down target_gdbarch
1150 explicitly.
1151 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1152 'gdbarch' and use it instead of target_gdbarch.
1153 (get_memory_packet_size): Adjust get_remote_arch_state calls,
1154 passing down target_gdbarch explicitly.
1155 (struct stop_reply) <arch>: New field.
1156 (remote_parse_stop_reply): Use the stopped thread's architecture,
1157 not the current inferior's. Save the architecture in the
1158 stop_reply.
1159 (process_stop_reply): Use the stop reply's architecture.
1160 (process_g_packet, remote_fetch_registers)
1161 (remote_prepare_to_store, store_registers_using_G)
1162 (remote_store_registers): Adjust get_remote_arch_state calls,
1163 using the regcache's architecture.
1164 (remote_get_trace_status): Adjust get_remote_arch_state calls,
1165 passing down target_gdbarch explicitly.
1166 * spu-multiarch.c (spu_thread_architecture): Defer to the target
1167 beneath instead of calling target_gdbarch.
1168 * target.c (default_thread_architecture): Use the specified
1169 inferior's architecture, instead of the current inferior's
1170 architecture (via target_gdbarch).
1171
1172 2017-10-04 Pedro Alves <palves@redhat.com>
1173
1174 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1175 case.
1176 (regcache_print): Handle !target_has_registers here instead.
1177
1178 2017-10-04 Pedro Alves <palves@redhat.com>
1179
1180 * frame.c (create_test_frame): Delete.
1181 * frame.h (create_test_frame): Delete.
1182 * gdbarch-selftests.c: Include gdbthread.h and target.h.
1183 (class regcache_test): Delete.
1184 (test_target_has_registers, test_target_has_stack)
1185 (test_target_has_memory, test_target_prepare_to_store)
1186 (test_target_store_registers): New functions.
1187 (test_target_ops): New class.
1188 (register_to_value_test): Error out if there's already a
1189 process_stratum (or higher) target pushed. Create a fuller mock
1190 environment, with mock target_ops, inferior, address space, thread
1191 and inferior_ptid.
1192 * progspace.c (struct address_space): Move to ...
1193 * progspace.h (struct address_space): ... here.
1194 * regcache.h (regcache::~regcache, regcache::raw_write)
1195 [GDB_SELF_TEST]: No longer virtual.
1196
1197 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
1198
1199 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1200
1201 2017-10-04 Pedro Alves <palves@redhat.com>
1202
1203 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1204 out of 'between TRY and CATCH'.
1205
1206 2017-10-04 Pedro Alves <palves@redhat.com>
1207
1208 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1209 * common/common-exceptions.h (TRY): Open an outermost scope.
1210 Expand intro comment.
1211 (CATCH): Reindent.
1212 (END_CATCH): Close the outermost scope.
1213 * completer.c (complete_line_internal): Add missing END_CATCH.
1214
1215 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1216
1217 * NEWS (Changes since GDB 8.0): Add entry about new
1218 'set-cwd-on-gdbserver' feature.
1219 (New remote packets): Add entry for QSetWorkingDir.
1220 * common/common-inferior.h (set_inferior_cwd): New prototype.
1221 * infcmd.c (set_inferior_cwd): Remove "static".
1222 (show_cwd_command): Expand text to include remote debugging.
1223 * remote.c: Add PACKET_QSetWorkingDir.
1224 (remote_protocol_features) <QSetWorkingDir>: New entry for
1225 PACKET_QSetWorkingDir.
1226 (extended_remote_set_inferior_cwd): New function.
1227 (extended_remote_create_inferior): Call
1228 "extended_remote_set_inferior_cwd".
1229 (_initialize_remote): Call "add_packet_config_cmd" for
1230 QSetWorkingDir.
1231
1232 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1233
1234 * NEWS (New commands): Mention "set/show cwd".
1235 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
1236 "cd" command's help text.
1237 * common/common-inferior.h (get_inferior_cwd): New prototype.
1238 * infcmd.c (inferior_cwd_scratch): New global variable.
1239 (set_inferior_cwd): New function.
1240 (get_inferior_cwd): Likewise.
1241 (set_cwd_command): Likewise.
1242 (show_cwd_command): Likewise.
1243 (_initialize_infcmd): Add "set/show cwd" commands.
1244 * inferior.h (class inferior) <cwd>: New field.
1245 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
1246 (fork_inferior): Change inferior's cwd before its execution.
1247 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
1248 to CreateProcess.
1249
1250 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1251
1252 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
1253 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
1254 (COMMON_OBS): Add gdb_tilde_expand.o.
1255 * common/gdb_tilde_expand.c: New file.
1256 * common/gdb_tilde_expand.h: Likewise.
1257
1258 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
1259
1260 * gdbarch.sh (objfile): Remove duplicate declaration.
1261 * gdbarch.h: Regenerate.
1262
1263 2017-10-03 Tom Tromey <tom@tromey.com>
1264
1265 * utils.c (internal_vproblem): Use string_vprintf.
1266
1267 2017-10-03 Tom Tromey <tom@tromey.com>
1268
1269 * printcmd.c (info_symbol_command): Use std::string.
1270
1271 2017-10-03 Tom Tromey <tom@tromey.com>
1272
1273 * top.c (gdb_safe_append_history): Use std::string.
1274
1275 2017-10-03 Tom Tromey <tom@tromey.com>
1276
1277 * event-top.c (stdin_event_handler): Update.
1278 * main.c (captured_main_1): Update.
1279 * top.h (make_delete_ui_cleanup): Remove.
1280 (struct ui): Add constructor and destructor.
1281 (new_ui, delete_ui): Remove.
1282 * top.c (make_delete_ui_cleanup): Remove.
1283 (new_ui_command): Use std::unique_ptr.
1284 (delete_ui_cleanup): Remove.
1285 (ui::ui): Rename from new_ui. Update.
1286 (free_ui): Remove.
1287 (ui::~ui): Rename from delete_ui. Update.
1288
1289 2017-10-03 Tom Tromey <tom@tromey.com>
1290
1291 * symfile.c (load_progress): Use gdb::byte_vector.
1292
1293 2017-10-03 Tom Tromey <tom@tromey.com>
1294
1295 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
1296 declaration.
1297 * printcmd.c (x_command): Remove unused declaration.
1298 * symfile.c (symbol_file_command): Remove unused declaration.
1299
1300 2017-10-03 Tom Tromey <tom@tromey.com>
1301
1302 * utils.c (internal_vproblem): Use std::string.
1303 (defaulted_query): Likewise.
1304
1305 2017-10-03 Tom Tromey <tom@tromey.com>
1306
1307 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
1308 * top.c (execute_command_to_string): Update.
1309 * utils.c (make_cleanup_restore_page_info): Remove.
1310 (do_restore_page_info_cleanup): Remove.
1311 (set_batch_flag_and_restore_page_info):
1312 New.
1313 (make_cleanup_restore_page_info): Remove.
1314 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1315 (~set_batch_flag_and_restore_page_info): New
1316 (make_cleanup_restore_uinteger): Remove.
1317 (make_cleanup_restore_integer): Remove.
1318 (struct restore_integer_closure): Remove.
1319 (restore_integer): Remove.
1320 * utils.h (struct set_batch_flag_and_restore_page_info): New
1321 class.
1322 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1323 (make_cleanup_restore_page_info): Remove.
1324 (make_cleanup_restore_uinteger) Remove.
1325 (make_cleanup_restore_integer) Remove.
1326
1327 2017-10-03 Tom Tromey <tom@tromey.com>
1328
1329 * record-full.h (record_full_gdb_operation_disable_set): Return
1330 scoped_restore_tmpl<int>.
1331 * infrun.c (adjust_pc_after_break): Update.
1332 (handle_signal_stop): Update.
1333 * record-full.c (record_full_gdb_operation_disable_set): Return
1334 scoped_restore_tmpl<int>.
1335 (record_full_wait_1, record_full_insert_breakpoint)
1336 (record_full_remove_breakpoint, record_full_save)
1337 (record_full_goto_insn): Update.
1338
1339 2017-10-02 Tom Tromey <tom@tromey.com>
1340
1341 PR rust/22236:
1342 * rust-lang.c (rust_val_print_str): New function.
1343 (val_print_struct): Call it.
1344 (rust_subscript): Preserve name of slice type.
1345
1346 2017-10-02 Tom Tromey <tom@tromey.com>
1347
1348 * rust-lang.c (rust_subscript): Handle slices in
1349 EVAL_AVOID_SIDE_EFFECTS case.
1350
1351 2017-10-02 Tom Tromey <tom@tromey.com>
1352
1353 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
1354
1355 2017-10-02 Tom Tromey <tom@tromey.com>
1356
1357 * rust-lang.h (rust_slice_type): Add "extern".
1358
1359 2017-10-02 Tom Tromey <tom@tromey.com>
1360 Pedro Alves <palves@redhat.com>
1361
1362 * ada-lang.h (ada_exc_info::operator<): Make const.
1363 (ada_exc_info::operator==): Make const.
1364 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
1365 Make const.
1366
1367 2017-09-29 Tom Tromey <tom@tromey.com>
1368
1369 * target.c (read_whatever_is_readable): Change type of "result".
1370 Update.
1371 (free_memory_read_result_vector): Remove.
1372 (read_memory_robust): Change return type. Update.
1373 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
1374 bin2hex, std::string.
1375 * target.h (memory_read_result_s): Remove typedef.
1376 (free_memory_read_result_vector): Remove.
1377 (read_memory_robust): Return std::vector.
1378
1379 2017-09-29 Tom Tromey <tom@tromey.com>
1380
1381 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
1382
1383 2017-09-29 Tom Tromey <tom@tromey.com>
1384
1385 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
1386 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
1387 operator< and operator==.
1388 (ada_exceptions_list): Return a std::vector.
1389 * ada-lang.c (ada_exc_info::operator<): Rename from
1390 compare_ada_exception_info.
1391 (ada_exc_info::operator==): New.
1392 (sort_remove_dups_ada_exceptions_list): Change type of
1393 "exceptions".
1394 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
1395 (ada_add_global_exceptions): Likewise.
1396 (ada_exceptions_list_1): Return a std::vector.
1397 (ada_exceptions_list): Likewise.
1398
1399 2017-09-29 Tom Tromey <tom@tromey.com>
1400
1401 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
1402 'std::set *'.
1403 (print_one_inferior): Update.
1404 (free_vector_of_ints): Remove.
1405 (list_available_thread_groups): Change "ids" to std::set.
1406 (mi_cmd_list_thread_groups): Update.
1407 (struct collect_cores_data) <core>: Now a std::set.
1408 (collect_cores): Update.
1409 (unique): Remove.
1410 (print_one_inferior): Update.
1411
1412 2017-09-29 Tom Tromey <tom@tromey.com>
1413
1414 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
1415 (mi_execute_async_cli_command): Likewise.
1416 (mi_cmd_trace_frame_collected): Use field_fmt.
1417
1418 2017-09-29 Tom Tromey <tom@tromey.com>
1419
1420 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
1421 gdb::byte_vector.
1422
1423 2017-09-29 Tom Tromey <tom@tromey.com>
1424
1425 * mi/mi-parse.c (mi_parse): Remove unused declaration.
1426
1427 2017-09-29 Tom Tromey <tom@tromey.com>
1428
1429 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
1430
1431 2017-09-29 Tom Tromey <tom@tromey.com>
1432
1433 * varobj.h (varobj_gen_name): Return std::string.
1434 * varobj.c (varobj_gen_name): Return std::string.
1435 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
1436 (mi_cmd_var_delete): Don't copy "name".
1437
1438 2017-09-29 Tom Tromey <tom@tromey.com>
1439
1440 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
1441 (mi_cmd_break_insert_1): Update.
1442
1443 2017-09-29 Tom Tromey <tom@tromey.com>
1444
1445 * target.h (make_scoped_defer_target_commit_resume): Update.
1446 * target.c (make_scoped_defer_target_commit_resume): Rename from
1447 make_cleanup_defer_target_commit_resume. Return a
1448 scoped_restore.
1449 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
1450
1451 2017-09-29 Tom Tromey <tom@tromey.com>
1452
1453 * main.c (captured_main_1): Remove unused declaration.
1454 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
1455
1456 2017-09-29 Tom Tromey <tom@tromey.com>
1457
1458 * symtab.c (search_symbols): Remove unused outer cleanup.
1459 (make_source_files_completion_list): Remove unused declaration.
1460
1461 2017-09-29 Tom Tromey <tom@tromey.com>
1462
1463 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
1464
1465 2017-09-29 Tom Tromey <tom@tromey.com>
1466
1467 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
1468 gdb::byte_vector.
1469
1470 2017-09-29 Tom Tromey <tom@tromey.com>
1471
1472 * complaints.c (vcomplaint): Use std::string.
1473
1474 2017-09-29 Tom Tromey <tom@tromey.com>
1475
1476 * tracepoint.c (trace_variable_command): Use std::string.
1477 (encode_actions_1): Remove unused declarations.
1478 (create_tsv_from_upload): Use std::string.
1479
1480 2017-09-29 Tom Tromey <tom@tromey.com>
1481
1482 * cp-support.c (gdb_demangle): Use std::string.
1483
1484 2017-09-29 Tom Tromey <tom@tromey.com>
1485
1486 * stack.c (parse_frame_specification): Use std::string
1487 (info_frame_command): Use gdb::unique_xmalloc_ptr.
1488
1489 2017-09-29 Tom Tromey <tom@tromey.com>
1490
1491 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
1492
1493 2017-09-29 Tom Tromey <tom@tromey.com>
1494
1495 * utils.c (vfprintf_maybe_filtered): Use std::string.
1496 (vfprintf_unfiltered): Likewise.
1497
1498 2017-09-29 Tom Tromey <tom@tromey.com>
1499
1500 * event-top.c (top_level_prompt): Return std::string.
1501 (display_gdb_prompt): Update.
1502
1503 2017-09-29 Tom Tromey <tom@tromey.com>
1504
1505 * unittests/common-utils-selftests.c (format): New function.
1506 (string_vprintf_tests): New function.
1507 (_initialize_common_utils_selftests): Register new tests.
1508 * common/common-utils.c (string_vprintf): New function.
1509 * common/common-utils.h (string_vprintf): Declare.
1510
1511 2017-09-29 Pedro Alves <palves@redhat.com>
1512
1513 * common/rsp-low.c (unpack_varlen_hex): Constify.
1514 * common/rsp-low.h (unpack_varlen_hex): Constify.
1515 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
1516 Constify.
1517 * remote.c (remote_set_permissions, read_ptid)
1518 (remote_current_thread, remote_get_threads_with_qthreadinfo)
1519 (remote_static_tracepoint_marker_at)
1520 (remote_static_tracepoint_markers_by_strid)
1521 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
1522 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
1523 (parse_tracepoint_definition, parse_tsv_definition)
1524 (parse_static_tracepoint_marker_definition): Constify.
1525 * tracepoint.h (parse_static_tracepoint_marker_definition)
1526 (parse_trace_status, parse_tracepoint_status)
1527 (parse_tracepoint_definition, parse_tsv_definition): Constify.
1528
1529 2017-09-29 Pedro Alves <palves@redhat.com>
1530
1531 * remote.c (target_buf, target_buf_size): Delete.
1532 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
1533 Use the connection's packet buffer instead.
1534 All callers adjusted.
1535 (_initialize_remote): Remove references to target_buf and
1536 target_buf_size.
1537
1538 2017-09-28 Pedro Alves <palves@redhat.com>
1539
1540 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1541 unittests/common-utils-selftests.c.
1542 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
1543 (COMMON_OBS): Remove utils-selftests.o.
1544 * utils-selftests.c: Move to ...
1545 * unittests/common-utils-selftests.c: ... here and rename self
1546 test to "string_printf".
1547
1548 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
1549
1550 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
1551 having NULL cus or tus.
1552
1553 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1554
1555 * arm-tdep.c: (convert_from_extended): Remove.
1556 (convert_to_extended): Likewise.
1557 (arm_extract_return_value): Use convert_typed_floating.
1558 (arm_store_return_value): Likewise.
1559
1560 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1561 * sh-tdep.c: Do not include "floatformat.h".
1562 (sh_littlebyte_bigword_type): New function.
1563 (sh_register_convert_to_virtual): Use convert_typed_floating.
1564 (sh_register_convert_to_raw): Likewise.
1565 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1566 (sh64_littlebyte_bigword_type): New function.
1567 (sh64_extract_return_value): Use convert_typed_floating.
1568 (sh64_register_convert_to_virtual): Likewise.
1569 (sh64_register_convert_to_raw): Likewise.
1570
1571 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1572
1573 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
1574 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
1575
1576 * gdbtypes.h (union type_specific): Make field floatformat hold
1577 just a single struct floatformat, not an array.
1578 (floatformat_from_type): Move here.
1579 * gdbtypes.c (floatformat_from_type): Move here. Update to
1580 changed TYPE_FLOATFORMAT definition.
1581 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
1582 (recursive_dump_type): Likewise.
1583 (init_float_type): Install correct floatformat for byte order.
1584 (arch_float_type): Likewise.
1585
1586 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1587
1588 * gdbtypes.c (init_type): Change incoming argument from
1589 length-in-bytes to length-in-bits. Assert length is a
1590 multiple of TARGET_CHAR_BITS.
1591 (arch_type, arch_flags_type): Likewise.
1592 (init_integer_type): Update call to init_type.
1593 (init_character_type): Likewise.
1594 (init_boolean_type): Likewise.
1595 (init_float_type): Likewise.
1596 (init_decfloat_type): Likewise.
1597 (init_complex_type): Likewise.
1598 (init_pointer_type): Likewise.
1599 (objfile_type): Likewise.
1600 (arch_integer_type): Update call to arch_type.
1601 (arch_character_type): Likewise.
1602 (arch_boolean_type): Likewise.
1603 (arch_float_type): Likewise.
1604 (arch_decfloat_type): Likewise.
1605 (arch_complex_type): Likewise.
1606 (arch_pointer_type): Likewise.
1607 (gdbtypes_post_init): Likewise.
1608
1609 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
1610 (read_base_type): Likewise.
1611 * mdebugread.c (basic_type): Likewise.
1612 * stabsread.c (dbx_init_float_type): Likewise.
1613 (rs6000_builtin_type): Likewise.
1614 (read_range_type): Likewise. Also, fix call to init_integer_type
1615 with erroneous length argument.
1616
1617 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
1618 * d-lang.c (build_d_types): Likewise.
1619 * f-lang.c (build_fortran_types): Likewise.
1620 * go-lang.c (build_go_types): Likewise.
1621 * opencl-lang.c (build_opencl_types): Likewise.
1622 * jit.c (finalize_symtab): Likewise.
1623 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
1624 (build_std_type_info_type): Likewise.
1625 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
1626 update call to arch_flags_type.
1627
1628 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
1629 arch_type.
1630 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
1631 * windows-tdep.c (windows_get_tlb_type): Likewise.
1632
1633 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
1634 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1635 * m32c-tdep.c (make_types): Likewise.
1636 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
1637 (rl78_psw_type): Update call to arch_flags_type.
1638 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
1639 * rx-tdep.c (rx_psw_type): Likewise.
1640 (rx_fpsw_type): Likewise.
1641 * sparc-tdep.c (sparc_psr_type): Likewise.
1642 (sparc_fsr_type): Likewise.
1643 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
1644 (sparc64_ccr_type): Likewise.
1645 (sparc64_fsr_type): Likewise.
1646 (sparc64_fprs_type): Likewise.
1647
1648 2017-09-27 Tom Tromey <tom@tromey.com>
1649
1650 * findcmd.c (find_command): Constify.
1651
1652 2017-09-27 Tom Tromey <tom@tromey.com>
1653
1654 * ada-tasks.c (task_command_1, task_command): Constify.
1655
1656 2017-09-27 Tom Tromey <tom@tromey.com>
1657
1658 * symtab.c (maintenance_print_symbol_cache)
1659 (maintenance_flush_symbol_cache)
1660 (maintenance_print_symbol_cache_statistics): Constify.
1661
1662 2017-09-27 Tom Tromey <tom@tromey.com>
1663
1664 * inferior.c (detach_inferior_command, kill_inferior_command)
1665 (inferior_command): Constify.
1666
1667 2017-09-27 Tom Tromey <tom@tromey.com>
1668
1669 * regcache.c (regcache_print, maintenance_print_registers)
1670 (maintenance_print_raw_registers)
1671 (maintenance_print_cooked_registers)
1672 (maintenance_print_register_groups)
1673 (maintenance_print_remote_registers): Constify.
1674
1675 2017-09-27 Tom Tromey <tom@tromey.com>
1676
1677 * printcmd.c (map_display_numbers, undisplay_command)
1678 (enable_disable_display_command, enable_display_command)
1679 (disable_display_command): Constify.
1680
1681 2017-09-27 Tom Tromey <tom@tromey.com>
1682
1683 * breakpoint.h (delete_command): Don't declare.
1684 * breakpoint.c (delete_command, enable_once_command)
1685 (enable_count_command, enable_delete_command, breakpoint_1)
1686 (maintenance_info_breakpoints, stopin_command, stopat_command)
1687 (delete_command, delete_trace_command, save_breakpoints)
1688 (save_breakpoints_command, save_tracepoints_command): Constify.
1689
1690 2017-09-27 Tom Tromey <tom@tromey.com>
1691
1692 * macrocmd.c (macro_expand_command, macro_expand_once_command)
1693 (skip_ws, extract_identifier, macro_define_command)
1694 (macro_undef_command, macro_list_command): Constify.
1695
1696 2017-09-27 Tom Tromey <tom@tromey.com>
1697
1698 * infcmd.c (environment_info, set_environment_command)
1699 (unset_environment_command, path_info, info_proc_cmd_1)
1700 (info_proc_cmd_mappings, info_proc_cmd_stat)
1701 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
1702 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
1703
1704 2017-09-27 Tom Tromey <tom@tromey.com>
1705
1706 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
1707 Constify.
1708
1709 2017-09-27 Tom Tromey <tom@tromey.com>
1710
1711 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
1712
1713 2017-09-27 Tom Tromey <tom@tromey.com>
1714
1715 * demangle.c (demangle_command): Constify.
1716
1717 2017-09-27 Tom Tromey <tom@tromey.com>
1718
1719 * progspace.c (maintenance_info_program_spaces_command):
1720 Constify.
1721
1722 2017-09-27 Tom Tromey <tom@tromey.com>
1723
1724 * compile/compile.c (check_raw_argument, compile_file_command)
1725 (compile_code_command, compile_print_command): Constify.
1726
1727 2017-09-27 Tom Tromey <tom@tromey.com>
1728
1729 * reggroups.c (maintenance_print_reggroups): Constify.
1730
1731 2017-09-27 Tom Tromey <tom@tromey.com>
1732
1733 * dwarf2read.c (save_gdb_index_command): Constify.
1734
1735 2017-09-27 Tom Tromey <tom@tromey.com>
1736
1737 * stap-probe.c (info_probes_stap_command): Constify.
1738
1739 2017-09-27 Tom Tromey <tom@tromey.com>
1740
1741 * fork-child.c (unset_exec_wrapper_command): Constify.
1742
1743 2017-09-27 Tom Tromey <tom@tromey.com>
1744
1745 * btrace.c (get_uint, get_context_size, no_chunk)
1746 (maint_btrace_packet_history_cmd)
1747 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
1748 (maint_info_btrace_cmd): Constify.
1749
1750 2017-09-27 Tom Tromey <tom@tromey.com>
1751
1752 * reverse.c (delete_bookmark_command): Constify.
1753
1754 2017-09-27 Tom Tromey <tom@tromey.com>
1755
1756 * remote.c (set_memory_packet_size)
1757 (set_memory_write_packet_size, show_memory_write_packet_size)
1758 (set_memory_read_packet_size, show_memory_read_packet_size)
1759 (compare_sections_command, packet_command, remote_put_command)
1760 (remote_get_command, remote_delete_command): Constify.
1761
1762 2017-09-27 Tom Tromey <tom@tromey.com>
1763
1764 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
1765 (set_mipsfpu_double_command, set_mipsfpu_none_command)
1766 (set_mipsfpu_auto_command): Constify.
1767
1768 2017-09-27 Tom Tromey <tom@tromey.com>
1769
1770 * cli/cli-cmds.h (cd_command): Constify.
1771 * cli/cli-cmds.c (cd_command): Constify.
1772
1773 2017-09-27 Tom Tromey <tom@tromey.com>
1774
1775 * thread.c (thread_name_command, thread_find_command): Constify.
1776
1777 2017-09-27 Tom Tromey <tom@tromey.com>
1778
1779 * probe.c (enable_probes_command, disable_probes_command):
1780 Constify.
1781
1782 2017-09-27 Tom Tromey <tom@tromey.com>
1783
1784 * symfile.c (symbol_file_command): Constify.
1785 * gdbcore.h (deprecated_file_changed_hook): Constify.
1786 * exec.c (deprecated_file_changed_hook, exec_file_command)
1787 (file_command): Constify.
1788 * defs.h (symbol_file_command): Constify.
1789
1790 2017-09-27 Tom Tromey <tom@tromey.com>
1791
1792 * remote-fileio.c (set_system_call_allowed)
1793 (show_system_call_allowed): Constify.
1794
1795 2017-09-27 Tom Tromey <tom@tromey.com>
1796
1797 * tracepoint.c (delete_trace_variable_command)
1798 (tfind_end_command, tfind_start_command, tfind_pc_command)
1799 (tfind_tracepoint_command, tfind_line_command)
1800 (tfind_range_command, tfind_outside_command): Constify.
1801
1802 2017-09-27 Tom Tromey <tom@tromey.com>
1803
1804 * ax-gdb.c (maint_agent_printf_command, agent_command)
1805 (agent_eval_command): Constify.
1806
1807 2017-09-27 Tom Tromey <tom@tromey.com>
1808
1809 * tracepoint.c (info_scope_command): Constify.
1810 * python/python.c (gdbpy_decode_line): Constify.
1811 * python/py-breakpoint.c (bppy_init): Constify.
1812 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1813 * location.h: (new_linespec_location)
1814 (string_to_event_location_basic, string_to_event_location):
1815 Constify.
1816 * location.c (new_linespec_location)
1817 (string_to_event_location_basic, string_to_event_location):
1818 Constify.
1819 * linespec.h (decode_line_with_current_source)
1820 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1821 * linespec.c (linespec_lex_to_end)
1822 (decode_line_with_current_source)
1823 (decode_line_with_last_displayed): Constify.
1824 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1825 Constify.
1826 * cli/cli-cmds.c (edit_command, list_command): Constify.
1827 * breakpoint.h (until_break_command, watch_command_wrapper)
1828 (awatch_command_wrapper, rwatch_command_wrapper)
1829 (init_ada_exception_breakpoint): Constify.
1830 * breakpoint.c (break_command_1, dprintf_command)
1831 (break_range_command, watch_command_wrapper)
1832 (rwatch_command_wrapper, awatch_command_wrapper)
1833 (until_break_command, init_ada_exception_breakpoint)
1834 (strace_marker_create_sals_from_location, trace_command)
1835 (ftrace_command, strace_command, struct tracepoint): Constify.
1836 * ax-gdb.c (agent_command_1): Constify.
1837 * ada-lang.c (ada_exception_sal): Constify.
1838
1839 2017-09-27 Tom Tromey <tom@tromey.com>
1840
1841 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1842 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1843 (get_context_size, no_chunk, get_insn_history_modifiers)
1844 (cmd_record_insn_history, get_call_history_modifiers)
1845 (cmd_record_call_history): Constify.
1846
1847 2017-09-27 Tom Tromey <tom@tromey.com>
1848
1849 * source.c (show_substitute_path_command)
1850 (unset_substitute_path_command, set_substitute_path_command):
1851 Constify.
1852
1853 2017-09-27 Tom Tromey <tom@tromey.com>
1854
1855 * typeprint.c (maintenance_print_type): Constify.
1856 * maint.c (maintenance_dump_me, maintenance_demangle)
1857 (maintenance_time_display, maintenance_info_sections)
1858 (maintenance_print_statistics, maintenance_deprecate)
1859 (maintenance_undeprecate): Constify.
1860 (maintenance_do_deprecate): Constify. Use std::string.
1861 (maintenance_selftest): Constify.
1862 * gdbtypes.h (maintenance_print_type): Constify.
1863
1864 2017-09-27 Tom Tromey <tom@tromey.com>
1865
1866 * hppa-tdep.c (unwind_command): Constify.
1867
1868 2017-09-27 Tom Tromey <tom@tromey.com>
1869
1870 * target-descriptions.c (unset_tdesc_filename_cmd)
1871 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1872 Constify.
1873
1874 2017-09-27 Tom Tromey <tom@tromey.com>
1875
1876 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1877
1878 2017-09-27 Tom Tromey <tom@tromey.com>
1879
1880 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1881
1882 2017-09-27 Tom Tromey <tom@tromey.com>
1883
1884 * tui/tui-regs.c (tui_reg_command): Constify.
1885
1886 2017-09-27 Tom Tromey <tom@tromey.com>
1887
1888 * skip.c (skip_file_command, skip_function_command)
1889 (skip_enable_command, skip_disable_command, skip_delete_command):
1890 Constify.
1891
1892 2017-09-27 Tom Tromey <tom@tromey.com>
1893
1894 * record-btrace.c (cmd_record_btrace_bts_start)
1895 (cmd_record_btrace_pt_start): Constify.
1896
1897 2017-09-27 Tom Tromey <tom@tromey.com>
1898
1899 * symmisc.c (maintenance_print_symbols)
1900 (maintenance_print_msymbols, maintenance_print_objfiles)
1901 (maintenance_info_symtabs, maintenance_check_symtabs)
1902 (maintenance_expand_symtabs, maintenance_info_line_tables):
1903 Constify.
1904
1905 2017-09-27 Tom Tromey <tom@tromey.com>
1906
1907 * top.c (new_ui_command): Constify.
1908
1909 2017-09-27 Tom Tromey <tom@tromey.com>
1910
1911 * symfile.c (add_symbol_file_command)
1912 (remove_symbol_file_command, list_overlays_command)
1913 (map_overlay_command, unmap_overlay_command)
1914 (overlay_auto_command, overlay_manual_command)
1915 (overlay_off_command, overlay_load_command): Constify.
1916
1917 2017-09-27 Tom Tromey <tom@tromey.com>
1918
1919 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1920 (info_spu_mailbox_command, info_spu_dma_command)
1921 (info_spu_proxydma_command): Constify.
1922
1923 2017-09-27 Tom Tromey <tom@tromey.com>
1924
1925 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1926
1927 2017-09-27 Tom Tromey <tom@tromey.com>
1928
1929 * cli/cli-script.c (user_defined_command): Constify.
1930
1931 2017-09-27 Tom Tromey <tom@tromey.com>
1932
1933 * cli/cli-dump.c (dump_memory_command, dump_value_command)
1934 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1935 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1936 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1937 (dump_binary_value, append_binary_memory, append_binary_value):
1938 Constify.
1939 (struct dump_context) <func>: Constify.
1940 (add_dump_command): Update.
1941
1942 2017-09-27 Tom Tromey <tom@tromey.com>
1943
1944 * cli/cli-cmds.c (show_version, show_configuration)
1945 (source_command, show_user): Constify.
1946
1947 2017-09-27 Tom Tromey <tom@tromey.com>
1948
1949 * target.c (maintenance_print_target_stack): Constify.
1950
1951 2017-09-27 Tom Tromey <tom@tromey.com>
1952
1953 * interps.c (interpreter_exec_cmd): Constify.
1954
1955 2017-09-27 Tom Tromey <tom@tromey.com>
1956
1957 * record-full.c (cmd_record_full_restore): Constify.
1958
1959 2017-09-27 Tom Tromey <tom@tromey.com>
1960
1961 * memattr.c (enable_mem_command, disable_mem_command)
1962 (delete_mem_command): Constify.
1963
1964 2017-09-27 Tom Tromey <tom@tromey.com>
1965
1966 * value.c (show_convenience): Constify.
1967
1968 2017-09-27 Tom Tromey <tom@tromey.com>
1969
1970 * gdbcore.h (core_file_command): Update.
1971 * corefile.c (core_file_command): Constify.
1972
1973 2017-09-27 Tom Tromey <tom@tromey.com>
1974
1975 * user-regs.c (maintenance_print_user_registers): Constify.
1976
1977 2017-09-27 Tom Tromey <tom@tromey.com>
1978
1979 * cp-namespace.c (maintenance_cplus_namespace): Constify.
1980
1981 2017-09-27 Tom Tromey <tom@tromey.com>
1982
1983 * cp-support.c (first_component_command): Constify.
1984
1985 2017-09-27 Tom Tromey <tom@tromey.com>
1986
1987 * psymtab.c (maintenance_print_psymbols)
1988 (maintenance_info_psymtabs, maintenance_check_psymtabs):
1989 Constify.
1990
1991 2017-09-27 Tom Tromey <tom@tromey.com>
1992
1993 * windows-tdep.c (display_tib): Constify.
1994
1995 2017-09-27 Tom Tromey <tom@tromey.com>
1996
1997 * linux-fork.c (delete_checkpoint_command)
1998 (detach_checkpoint_command): Constify.
1999
2000 2017-09-27 Tom Tromey <tom@tromey.com>
2001
2002 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2003
2004 2017-09-27 Tom Tromey <tom@tromey.com>
2005
2006 * arc-tdep.c (dump_arc_instruction_command): Constify.
2007
2008 2017-09-27 Tom Tromey <tom@tromey.com>
2009
2010 * valprint.c (set_radix, show_radix): Constify.
2011
2012 2017-09-27 Tom Tromey <tom@tromey.com>
2013
2014 * dtrace-probe.c (info_probes_dtrace_command): Constify.
2015
2016 2017-09-27 Tom Tromey <tom@tromey.com>
2017
2018 * command.h (not_just_help_class_command): Update.
2019 * cli/cli-decode.h (not_just_help_class_command): Update.
2020 * cli/cli-decode.c (not_just_help_class_command): Constify.
2021
2022 2017-09-27 Tom Tromey <tom@tromey.com>
2023
2024 * gdb_bfd.c (maintenance_info_bfds): Constify.
2025
2026 2017-09-27 Tom Tromey <tom@tromey.com>
2027
2028 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2029 overloads.
2030 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
2031 (do_const_cfunc): New function.
2032 (cmd_cfunc_eq): New overload.
2033 (cli_user_command_p): Check do_const_cfunc.
2034 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2035 const_cfunc.
2036 * command.h (add_cmd): Add const overload and no-function
2037 overload.
2038 (set_cmd_cfunc): Add const overload.
2039 (cmd_const_cfunc_ftype): Declare.
2040 (cmd_cfunc_eq): Add const overload.
2041 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2042 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2043 overload.
2044
2045 2017-09-27 Tom Tromey <tom@tromey.com>
2046
2047 * macroexp.c (get_next_token_for_substitution): New function.
2048 (substitute_args): Call it. Check for __VA_OPT__.
2049
2050 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
2051 Pedro Alves <palves@redhat.com>
2052
2053 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2054 producer_is_icc_lt_14.
2055 (producer_is_icc_lt_14): New function.
2056 (check_producer): Add code for checking version of ICC.
2057 (producer_is_icc): Move to producer.c.
2058 (read_structure_type): Restrict ICC workaround to ICC<14.
2059 * producer.c: Include selftest.h.
2060 (producer_is_icc, producer_parsing_tests, _initialize_producer):
2061 New functions.
2062 * producer.h (producer_is_icc): New declaration.
2063
2064 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
2065
2066 * Makefile.in (SFILES): Add producer.c.
2067 (COMMON_OBS): Add producer.o
2068 * amd64-tdep.c (producer.h): Add new include.
2069 * dwarf2read.c (producer.h): Add new include.
2070 * producer.c: New file.
2071 * producer.h: New file.
2072 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2073 producer.c.
2074 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2075 producer.h.
2076
2077 2017-09-26 Matthias Klose <doko@ubuntu.com>
2078
2079 * configure.ac: Search ncursesw before ncurses.
2080 Check ncursesw/ncurses.h before ncurses/ncurses.h.
2081 * gdb_curses.h: Include <ncursesw/ncurses.h>
2082 * config.in, configure: Regenerate.
2083
2084 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2085
2086 PR gdb/22185
2087 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2088 obsolete.
2089 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2090 Remove i386sol2 support.
2091 * configure.nat <i386sol2>: Remove.
2092 <sol2-64>: Fold into ...
2093 <sol2>: ... this.
2094 Move common settings to default section.
2095 Add sol-thread.o.
2096 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2097 x86_64-*-solaris2.1[0-9]*>: Rename to ...
2098 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2099 <i[34567]86-*-solaris*>: Remove.
2100 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2101
2102 * configure.ac: Remove wctype in libw check.
2103 (_MSE_INT_H): Don't define on Solaris 7-9.
2104 <solaris*>: Remove libthread_db.so.1 check.
2105 * configure: Regenerate.
2106 * config.in: Regenerate.
2107
2108 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2109 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2110 (gdb_ps_size_t): Remove.
2111 Use base types in users.
2112 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2113
2114 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2115
2116 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2117
2118 PR build/22206
2119 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2120 (adi_is_addr_mapped): Likewise.
2121 (PSR_ICC): Don't redefine.
2122 (PSR_IMPL): Likewise.
2123
2124 2017-09-25 Tom Tromey <tom@tromey.com>
2125
2126 * regcache.c (regcache::dump): Use string_printf.
2127
2128 2017-09-25 Tom Tromey <tom@tromey.com>
2129
2130 * regcache.c (class regcache_invalidator): New.
2131 (struct register_to_invalidate): Remove.
2132 (make_cleanup_regcache_invalidate): Remove.
2133 (regcache::raw_write): Use regcache_invalidator.
2134
2135 2017-09-25 Tom Tromey <tom@tromey.com>
2136
2137 * spu-tdep.c (spu2ppu_sniffer): Update.
2138 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
2139 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
2140 Remove.
2141 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
2142 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
2143 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
2144 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
2145 (frame_pop): Update.
2146
2147 2017-09-25 Tom Tromey <tom@tromey.com>
2148
2149 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2150 * regcache.h (regcache_xfree): Don't declare.
2151 * regcache.c (regcache_xfree): Remove.
2152 (do_regcache_xfree): Use delete.
2153 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2154 * linux-fork.c (free_fork): Use delete.
2155 (fork_save_infrun_state): Likewise.
2156 * jit.c (jit_dealloc_cache): Use delete.
2157 * infrun.c (discard_infcall_suspend_state): Use delete.
2158
2159 2017-09-25 Tom Tromey <tom@tromey.com>
2160
2161 * regcache.h (regcache_xmalloc): Don't declare.
2162 (regcache_raw_set_cached_value): Update comment.
2163 * regcache.c (regcache_xmalloc): Remove.
2164 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2165 * jit.c (jit_frame_sniffer): Use new.
2166 * frame.c (frame_save_as_regcache): Use new.
2167
2168 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2169
2170 * NEWS: Advertise support for guarded-storage registers on IBM z.
2171
2172 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2173
2174 * s390-linux-nat.c (have_regset_gs): New static variable.
2175 (s390_linux_fetch_inferior_registers): Handle guarded-storage
2176 control block and guarded-storage broadcast control regsets.
2177 (s390_read_description): Detect whether the target has
2178 guarded-storage support, return appropriate tdesc.
2179 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2180 (features/s390x-gs-linux64.c): Likewise.
2181 (struct gdbarch_tdep) <have_gs>: New field.
2182 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2183 (s390_gsbc_regset): New variables.
2184 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2185 and s390_gsbc_regset, if applicable.
2186 (s390_core_read_description): Check whether core file was from a
2187 target with guarded-storage support; include appropriate regsets.
2188 (s390_gdbarch_init): Add registers for guarded-storage support.
2189 (_initialize_s390_tdep): Initialize new target descriptions that
2190 include registers for guarded-storage support.
2191 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2192 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2193 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2194 (S390_NUM_REGS): Adjust macro definition.
2195 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2196 (tdesc_s390x_gs_linux64): New declarations.
2197
2198 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2199
2200 * features/s390-gs-linux64.xml: New file.
2201 * features/s390-gs.xml: New file.
2202 * features/s390-gsbc.xml: New file.
2203 * features/s390x-gs-linux64.xml: New file.
2204 * features/Makefile (WHICH): Add s390-gs-linux64 and
2205 s390x-gs-linux64.
2206 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2207 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2208 * features/s390-gs-linux64.c: New generated file.
2209 * features/s390x-gs-linux64.c: New file.
2210 * regformats/s390-gs-linux64.dat: New file.
2211 * regformats/s390x-gs-linux64.dat: New file.
2212
2213 2017-09-23 Tom Tromey <tom@tromey.com>
2214
2215 * defs.h (make_cleanup_override_quit_handler): Don't declare.
2216
2217 2017-09-22 Tom Tromey <tom@tromey.com>
2218
2219 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
2220 type to scoped_restore_tmpl.
2221 <scoped_input_handler>: Initialize m_quit_handler directly.
2222
2223 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
2224
2225 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2226 (cd_command): Likewise. Free "current_directory" before
2227 assigning to it.
2228 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2229 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2230 * top.c (gdb_dirbuf): Remove global declaration.
2231 * top.h (gdb_dirbuf): Likewise.
2232
2233 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
2234
2235 * gnulib/aclocal.m4: Regenerate.
2236 * gnulib/config.in: Regenerate.
2237 * gnulib/configure: Regenerate.
2238 * gnulib/import/Makefile.am: Regenerate.
2239 * gnulib/import/Makefile.in: Regenerate.
2240 * gnulib/import/assure.h: New file.
2241 * gnulib/import/at-func.c: Likewise
2242 * gnulib/import/chdir-long.c: New file.
2243 * gnulib/import/chdir-long.h: New file.
2244 * gnulib/import/cloexec.c: New file.
2245 * gnulib/import/cloexec.h: New file.
2246 * gnulib/import/close.c: New file.
2247 * gnulib/import/closedir.c: New file.
2248 * gnulib/import/dirent-private.h: New file.
2249 * gnulib/import/dup-safer.c: New file.
2250 * gnulib/import/dup.c: New file.
2251 * gnulib/import/dup2.c: New file.
2252 * gnulib/import/error.c: New file.
2253 * gnulib/import/error.h: New file.
2254 * gnulib/import/exitfail.c: New file.
2255 * gnulib/import/exitfail.h: New file.
2256 * gnulib/import/fchdir.c: New file.
2257 * gnulib/import/fcntl.c: New file.
2258 * gnulib/import/fcntl.in.h: New file.
2259 * gnulib/import/fd-hook.c: New file.
2260 * gnulib/import/fd-hook.h: New file.
2261 * gnulib/import/fd-safer.c: New file.
2262 * gnulib/import/fdopendir.c: New file.
2263 * gnulib/import/filename.h: New file.
2264 * gnulib/import/filenamecat-lgpl.c: New file.
2265 * gnulib/import/filenamecat.h: New file.
2266 * gnulib/import/fstat.c: New file.
2267 * gnulib/import/fstatat.c: New file.
2268 * gnulib/import/getcwd-lgpl.c: New file.
2269 * gnulib/import/getcwd.c: New file.
2270 * gnulib/import/getdtablesize.c: New file.
2271 * gnulib/import/getlogin_r.c: New file.
2272 * gnulib/import/getprogname.c: New file.
2273 * gnulib/import/getprogname.h: New file.
2274 * gnulib/import/gettext.h: New file.
2275 * gnulib/import/glob-libc.h: New file.
2276 * gnulib/import/glob.c: New file.
2277 * gnulib/import/glob.in.h: New file.
2278 * gnulib/import/intprops.h: New file.
2279 * gnulib/import/m4/chdir-long.m4: New file.
2280 * gnulib/import/m4/close.m4: New file.
2281 * gnulib/import/m4/closedir.m4: New file.
2282 * gnulib/import/m4/d-ino.m4: New file.
2283 * gnulib/import/m4/d-type.m4: New file.
2284 * gnulib/import/m4/dup.m4: New file.
2285 * gnulib/import/m4/dup2.m4: New file.
2286 * gnulib/import/m4/error.m4: New file.
2287 * gnulib/import/m4/fchdir.m4: New file.
2288 * gnulib/import/m4/fcntl.m4: New file.
2289 * gnulib/import/m4/fcntl_h.m4: New file.
2290 * gnulib/import/m4/fdopendir.m4: New file.
2291 * gnulib/import/m4/filenamecat.m4: New file.
2292 * gnulib/import/m4/fstat.m4: New file.
2293 * gnulib/import/m4/fstatat.m4: New file.
2294 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
2295 * gnulib/import/m4/getcwd-path-max.m4: New file.
2296 * gnulib/import/m4/getcwd.m4: New file.
2297 * gnulib/import/m4/getdtablesize.m4: New file.
2298 * gnulib/import/m4/getlogin_r.m4: New file.
2299 * gnulib/import/m4/getprogname.m4: New file.
2300 * gnulib/import/m4/glob.m4: New file.
2301 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2302 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2303 * gnulib/import/m4/mempcpy.m4: New file.
2304 * gnulib/import/m4/memrchr.m4: New file.
2305 * gnulib/import/m4/mode_t.m4: New file.
2306 * gnulib/import/m4/msvc-inval.m4: New file.
2307 * gnulib/import/m4/msvc-nothrow.m4: New file.
2308 * gnulib/import/m4/open.m4: New file.
2309 * gnulib/import/m4/openat.m4: New file.
2310 * gnulib/import/m4/opendir.m4: New file.
2311 * gnulib/import/m4/readdir.m4: New file.
2312 * gnulib/import/m4/realloc.m4: New file.
2313 * gnulib/import/m4/rewinddir.m4: New file.
2314 * gnulib/import/m4/save-cwd.m4: New file.
2315 * gnulib/import/m4/strdup.m4: New file.
2316 * gnulib/import/m4/strerror.m4: New file.
2317 * gnulib/import/m4/unistd-safer.m4: New file.
2318 * gnulib/import/mempcpy.c: New file.
2319 * gnulib/import/memrchr.c: New file.
2320 * gnulib/import/msvc-inval.c: New file.
2321 * gnulib/import/msvc-inval.h: New file.
2322 * gnulib/import/msvc-nothrow.c: New file.
2323 * gnulib/import/msvc-nothrow.h: New file.
2324 * gnulib/import/open.c: New file.
2325 * gnulib/import/openat-die.c: New file.
2326 * gnulib/import/openat-priv.h: New file.
2327 * gnulib/import/openat-proc.c: New file.
2328 * gnulib/import/openat.c: New file.
2329 * gnulib/import/openat.h: New file.
2330 * gnulib/import/opendir.c: New file.
2331 * gnulib/import/pipe-safer.c: New file.
2332 * gnulib/import/readdir.c: New file.
2333 * gnulib/import/realloc.c: New file.
2334 * gnulib/import/rewinddir.c: New file.
2335 * gnulib/import/save-cwd.c: New file.
2336 * gnulib/import/save-cwd.h: New file.
2337 * gnulib/import/strdup.c: New file.
2338 * gnulib/import/strerror-override.c: New file.
2339 * gnulib/import/strerror-override.h: New file.
2340 * gnulib/import/strerror.c: New file.
2341 * gnulib/import/unistd--.h: New file.
2342 * gnulib/import/unistd-safer.h: New file.
2343 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
2344 "getcwd" and "glob".
2345 * ser-tcp.c: Undefine "close" before redefining it.
2346
2347 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
2348
2349 * guile/scm-value.c (gdbscm_value_address): Initialize address,
2350 get rid of res_val.
2351
2352 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2353
2354 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
2355 <sol2,sparc>: Likewise.
2356 <sol2-64,i386>: Likewise.
2357
2358 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
2359 -Wdeprecated-declarations on *-*-solaris*.
2360 * configure: Regenerate.
2361
2362 * procfs.c: Include "nat/inferior.h".
2363 (procfs_info_proc): Fix typo.
2364
2365 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2366
2367 * remote.c (vector): Include.
2368 (struct private_thread_info): Add field, thread_handle.
2369 (free_private_thread_info): Deallocate storage associated with
2370 thread handle.
2371 (get_private_info_thread): Initialize `thread_handle' field.
2372 (struct thread_item): Add field, thread_handle.
2373 (clear_threads_listing_context): Deallocate storage associated
2374 with thread handle.
2375 (start_thread): Add support for "handle" attribute.
2376 (thread_attributes): Add "handle".
2377 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
2378 field.
2379 (remote_update_thread_list): Update thread_handle.
2380 (remote_thread_handle_to_thread_info): New function.
2381 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
2382
2383 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2384
2385 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
2386 function.
2387 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
2388 * python/python-internal.h (thread_object_type): Declare.
2389
2390 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2391
2392 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
2393 (target_thread_handle_to_thread_info): Declare.
2394 * target.c (target_thread_handle_to_thread_info): New function.
2395 * target-delegates.c: Regenerate.
2396 * gdbthread.h (find_thread_by_handle): Declare.
2397 * thread.c (find_thread_by_handle): New function.
2398 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
2399 function.
2400 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
2401
2402 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
2403
2404 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
2405
2406 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
2407
2408 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
2409
2410 2017-09-21 Yao Qi <yao.qi@linaro.org>
2411
2412 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
2413 to gdb_target_obs.
2414
2415 2017-09-20 Tom Tromey <tom@tromey.com>
2416
2417 * breakpoint.c (struct counted_command_line): Remove.
2418 (breakpoint_commands): Update.
2419 (alloc_counted_command_line, incref_counted_command_line)
2420 (decref_counted_command_line, do_cleanup_counted_command_line)
2421 (make_cleanup_decref_counted_command_line): Remove.
2422 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
2423 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
2424 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
2425 (save_breakpoints): Update.
2426 * breakpoint.h (counted_command_line): Now a typedef to
2427 shared_ptr.
2428 (struct breakpoint) <commands>: Now a counted_command_line.
2429 (struct bpstats) <command>: Likewise.
2430
2431 2017-09-20 Tom Tromey <tom@tromey.com>
2432
2433 * breakpoint.c (struct commands_info, do_map_commands_command):
2434 Remove.
2435 (commands_command_1): Update.
2436 (iterate_over_related_breakpoints): Take a function_view.
2437 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
2438 (delete_command): Update.
2439 (map_breakpoint_numbers): Take a function_view.
2440 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
2441 (disable_command): Update.
2442 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
2443 (enable_command): Update.
2444 (struct disp_data, do_enable_breakpoint_disp)
2445 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
2446 (do_map_enable_delete_breakpoint): Remove.
2447 (enable_once_command, enable_count_command, enable_delete_command)
2448 (delete_trace_variable_command): Update.
2449
2450 2017-09-20 Tom Tromey <tom@tromey.com>
2451
2452 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
2453 (bpstat_clear): Use delete.
2454 (bpstats): New constructors.
2455 (bpstat_copy, bpstat_stop_status): Use new.
2456 (dprintf_after_condition_true): Update.
2457 * breakpoint.h (bpstats::bpstats): Add constructors.
2458 (bpstats::~bpstats): Add destructor.
2459
2460 2017-09-20 Pedro Alves <palves@redhat.com>
2461
2462 * eval.c (make_params): Delete, refactored as ...
2463 (class fake_method): ... this new type's ctor.
2464 (fake_method::~fake_method): New.
2465 (evaluate_subexp_standard): Use 'fake_method'.
2466
2467 2017-09-20 Tom Tromey <tom@tromey.com>
2468
2469 * windows-nat.c (get_windows_debug_event, windows_wait)
2470 (do_initial_windows_stuff, windows_attach): Update.
2471 * utils.c (vwarning, internal_vproblem): Update.
2472 (ui_unregister_input_event_handler_cleanup)
2473 (prepare_to_handle_input): Remove.
2474 (class scoped_input_handler): New.
2475 (defaulted_query, prompt_for_continue): Update.
2476 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
2477 Update.
2478 * top.c (undo_terminal_modifications_before_exit): Update.
2479 * target/target.h (target_terminal_init, target_terminal_inferior)
2480 (target_terminal_ours): Don't declare.
2481 (class target_terminal): New.
2482 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
2483 (target_terminal_ours_for_output)
2484 (make_cleanup_restore_target_terminal): Don't declare.
2485 (target_terminal_info): Remove.
2486 * target.c (enum terminal_state, terminal_state): Remove.
2487 (target_terminal::terminal_state): Define.
2488 (target_terminal::init): Rename from target_terminal_init.
2489 (target_terminal::inferior): Rename from
2490 target_terminal_inferior.
2491 (target_terminal::ours): Rename from target_terminal_ours.
2492 (target_terminal::ours_for_output): Rename from
2493 target_terminal_ours_for_output.
2494 (target_terminal::info): New method.
2495 (cleanup_restore_target_terminal)
2496 (make_cleanup_restore_target_terminal): Remove.
2497 * solib.c (handle_solib_event): Update.
2498 * remote.c (remote_serial_quit_handler): Update.
2499 (remote_terminal_inferior, remote_wait_as): Update.
2500 * record-full.c (record_full_wait_1): Update.
2501 * nto-procfs.c (procfs_create_inferior): Update.
2502 * nat/fork-inferior.c (startup_inferior): Update.
2503 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
2504 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
2505 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
2506 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
2507 (mi_breakpoint_created, mi_breakpoint_deleted)
2508 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
2509 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2510 (mi_user_selected_context_changed, report_initial_inferior):
2511 Update.
2512 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
2513 (linux_nat_terminal_inferior): Update.
2514 * infrun.c (follow_fork_inferior)
2515 (handle_vfork_child_exec_or_exit, do_target_resume)
2516 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
2517 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
2518 Update.
2519 * inflow.c (child_terminal_init, info_terminal_command): Update.
2520 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
2521 (attach_command): Update.
2522 * infcall.c (call_thread_fsm_should_stop): Update.
2523 * gnu-nat.c (gnu_attach): Update.
2524 * extension.c (struct active_ext_lang_state)
2525 (restore_active_ext_lang): Update.
2526 * exceptions.c (print_flush): Update.
2527 * event-top.c (async_enable_stdin, default_quit_handler): Update.
2528 (struct quit_handler_cleanup_data, restore_quit_handler)
2529 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
2530 Remove.
2531 * cp-support.c (gdb_demangle): Update.
2532 * breakpoint.c (update_inserted_breakpoint_locations)
2533 (insert_breakpoint_locations, handle_jit_event)
2534 (disable_breakpoints_in_unloaded_shlib): Update.
2535 * annotate.c (annotate_breakpoints_invalid)
2536 (annotate_frames_invalid): Update.
2537
2538 2017-09-20 Tom Tromey <tom@tromey.com>
2539
2540 * main.c (catch_command_errors): Rename from
2541 catch_command_errors_const.
2542 (captured_main_1): Update.
2543
2544 2017-09-20 Pedro Alves <palves@redhat.com>
2545
2546 * cli/cli-cmds.c (list_command): Use print_sal_location.
2547 (print_sal_location): New function.
2548 (ambiguous_line_spec): Use print_sal_location.
2549 * linespec.c (symbol_to_sal): Record the symbol in the sal.
2550 * symtab.c (find_function_start_sal): Likewise.
2551 * symtab.h (symtab_and_line::symbol): New field.
2552
2553 2017-09-20 Pedro Alves <palves@redhat.com>
2554
2555 * linespec.c (minsym_found): Handle non-text minsyms.
2556 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
2557
2558 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2559
2560 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
2561 backslash.
2562
2563 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2564
2565 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
2566 vmovups instead vmovaps.
2567 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
2568
2569 2017-09-19 John Baldwin <jhb@FreeBSD.org>
2570
2571 * NEWS (Changes since GDB 8.0): Add starti.
2572 * infcmd.c (enum run_break): New.
2573 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
2574 case.
2575 (run_command): Use enum run_how.
2576 (start_command): Likewise.
2577 (starti_command): New function.
2578 (RUN_ARGS_HELP): New macro.
2579 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
2580 commands. Add starti command.
2581
2582 2017-09-19 Yao Qi <yao.qi@linaro.org>
2583
2584 * Makefile.in (monitor.o): Remove the rule.
2585
2586 2017-09-19 Yao Qi <yao.qi@linaro.org>
2587
2588 * annotate.h (struct annotate_arg_emitter): Use
2589 DISABLE_COPY_AND_ASSIGN.
2590 * common/refcounted-object.h (refcounted_object): Likewise.
2591 * completer.h (struct completion_result): Likewise.
2592 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
2593 * filename-seen-cache.h (filename_seen_cache): Likewise.
2594 * gdbcore.h (thread_section_name): Likewise.
2595 * gdb_regex.h (compiled_regex): Likewise.
2596 * gdbthread.h (scoped_restore_current_thread): Likewise.
2597 * inferior.h (scoped_restore_current_inferior): Likewise.
2598 * jit.c (jit_reader): Likewise.
2599 * linespec.h (struct linespec_result): Likewise.
2600 * mi/mi-parse.h (struct mi_parse): Likewise.
2601 * nat/fork-inferior.c (execv_argv): Likewise.
2602 * progspace.h (scoped_restore_current_program_space): Likewise.
2603 * python/python-internal.h (class gdbpy_enter): Likewise.
2604 * regcache.h (regcache): Likewise.
2605 * target-descriptions.c (struct tdesc_reg): Likewise.
2606 (struct tdesc_type): Likewise.
2607 (struct tdesc_feature): Likewise.
2608 * ui-out.h (ui_out_emit_type): Likewise.
2609
2610 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
2611
2612 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
2613 label abort_expression.
2614
2615 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2616
2617 * common/buffer.c (buffer_xml_printf): Adjust.
2618 * common/xml-utils.c (xml_escape_text): Change return type to
2619 std::string, update code accordingly.
2620 * common/xml-utils.h (xml_escape_text): Change return type to
2621 std::string.
2622 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
2623 * windows-tdep.c (windows_xfer_shared_library): Adjust.
2624 * unittests/xml-utils-selftests.c (test_xml_escape_text):
2625 Adjust.
2626
2627 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2628
2629 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
2630 (SUBDIR_UNITTESTS_OBS): Add new object file.
2631 * unittests/xml-utils-selftests.c: New file.
2632
2633 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2634
2635 * common/selftest.h (selftest): New struct/interface.
2636 (register_test): Add name parameter, add new overload.
2637 (run_tests): Add filter parameter.
2638 (for_each_selftest_ftype): New typedef.
2639 (for_each_selftest): New declaration.
2640 * common/selftest.c (tests): Change type to
2641 map<string, unique_ptr<selftest>>.
2642 (simple_selftest): New struct.
2643 (register_test): New function.
2644 (register_test): Add name parameter and use it.
2645 (run_tests): Add filter parameter and use it. Add prints.
2646 Adjust to vector -> map change.
2647 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
2648 registering selftests.
2649 * arm-tdep.c (_initialize_arm_tdep): Likewise.
2650 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
2651 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
2652 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
2653 * findvar.c (_initialize_findvar): Likewise.
2654 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
2655 * maint.c (maintenance_selftest): Update call to run_tests.
2656 (maintenance_info_selftests): New function.
2657 (_initialize_maint_cmds): Register "maintenance info selftests"
2658 command. Update "maintenance selftest" doc.
2659 * regcache.c (_initialize_regcache): Add names when registering
2660 selftests.
2661 * rust-exp.y (_initialize_rust_exp): Likewise.
2662 * selftest-arch.c (gdbarch_selftest): New struct.
2663 (gdbarch_tests): Remove.
2664 (register_test_foreach_arch): Add name parameter. Call
2665 register_test.
2666 (tests_with_arch): Remove, move most content to
2667 gdbarch_selftest::operator().
2668 (_initialize_selftests_foreach_arch): Remove.
2669 * selftest-arch.h (register_test_foreach_arch): Add name
2670 parameter.
2671 (run_tests_with_arch): New declaration.
2672 * utils-selftests.c (_initialize_utils_selftests): Add names
2673 when registering selftests.
2674 * utils.c (_initialize_utils): Likewise.
2675 * unittests/array-view-selftests.c
2676 (_initialize_array_view_selftests): Likewise.
2677 * unittests/environ-selftests.c (_initialize_environ_selftests):
2678 Likewise.
2679 * unittests/function-view-selftests.c
2680 (_initialize_function_view_selftests): Likewise.
2681 * unittests/offset-type-selftests.c
2682 (_initialize_offset_type_selftests): Likewise.
2683 * unittests/optional-selftests.c
2684 (_initialize_optional_selftests): Likewise.
2685 * unittests/scoped_restore-selftests.c
2686 (_initialize_scoped_restore_selftests): Likewise.
2687 * NEWS: Document "maintenance selftest" and "maint info
2688 selftests".
2689
2690 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2691
2692 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
2693 scoped_restore.
2694
2695 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2696
2697 * mi/mi-main.c (mi_load_progress): Make uiout variable
2698 a unique_ptr.
2699
2700 2017-09-15 Pedro Alves <palves@redhat.com>
2701
2702 * compile/compile-c-types.c (convert_enum, convert_int)
2703 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
2704
2705 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2706
2707 * dwarf2read.c (copy_string): Remove.
2708 (parse_macro_definition): Replace copy_string with savestring.
2709
2710 2017-09-15 Yao Qi <yao.qi@linaro.org>
2711
2712 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
2713 gdb_target_obs.
2714 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
2715 Likewise.
2716 (i[34567]86-*-linux*): Likewise.
2717
2718 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2719
2720 * dwarf2expr.h (dwarf_stack_value): Add constructor.
2721 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
2722 <stack>: Change type to std::vector.
2723 <stack_len, stack_allocated>: Remove.
2724 <grow_stack>: Remove.
2725 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2726 (dwarf_expr_context::~dwarf_expr_context): Remove.
2727 (dwarf_expr_context::grow_stack): Remove.
2728 (dwarf_expr_context::push): Adjust.
2729 (dwarf_expr_context::pop): Adjust.
2730 (dwarf_expr_context::fetch): Adjust.
2731 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
2732 (dwarf_expr_context::stack_empty_p): Adjust.
2733 (dwarf_expr_context::execute_stack_op): Adjust.
2734
2735 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2736
2737 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
2738 return type to bool.
2739 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
2740
2741 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2742
2743 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
2744 Change type to bool.
2745 (dwarf_stack_value) <in_stack_memory>: Likewise.
2746 (dwarf_expr_context) <push_address>: Change parameter type to
2747 bool.
2748 <fetch_in_stack_memory>: Change return type to bool.
2749 <push>: Change parameter type to bool.
2750 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
2751 to bool.
2752 (dwarf_expr_context::push_address): Likewise.
2753 (dwarf_expr_context::fetch_in_stack_memory): Change return type
2754 to bool.
2755 (dwarf_expr_context::execute_stack_op): Adjust.
2756 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
2757
2758 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2759
2760 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
2761 (struct dwarf_expr_context) <n_pieces>: Remove.
2762 <pieces>: Change type to std::vector.
2763 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2764 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
2765 pieces.
2766 (dwarf_expr_context::add_piece): Adjust.
2767 * dwarf2loc.c (struct piece_closure): Initialize fields.
2768 <n_pieces>: Remove.
2769 <pieces>: Change type to std::vector.
2770 (allocate_piece_closure): Adjust, change parameter to
2771 std::vector rvalue and std::move it to piece_closure.
2772 (rw_pieced_value): Adjust.
2773 (check_pieced_synthetic_pointer): Adjust.
2774 (indirect_synthetic_pointer): Adjust.
2775 (coerce_pieced_ref): Adjust.
2776 (free_pieced_value_closure): Adjust. Use delete to free
2777 piece_closure.
2778 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
2779 to allocate_piece_closure.
2780 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2781
2782 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2783
2784 * probe.h (probe_ops_cp): Remove typedef.
2785 (DEF_VEC_P (probe_ops_cp)): Remove.
2786 (all_probe_ops): Change type to std::vector.
2787 * probe.c (info_probes_for_ops): Adjust to vector change.
2788 (probe_linespec_to_ops): Likewise.
2789 (all_probe_ops): Change type to std::vector.
2790 (_initialize_probe): Adjust to vector change.
2791 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2792 * elfread.c (elf_get_probes): Likewise.
2793 * stap-probe.c (_initialize_stap_probe): Likewise.
2794
2795 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2796
2797 * probe.h (struct bound_probe): Define constructors.
2798 * probe.c (bound_probe_s): Remove typedef.
2799 (DEF_VEC_O (bound_probe_s)): Remove VEC.
2800 (collect_probes): Change return type to std::vector, remove
2801 cleanup.
2802 (compare_probes): Return bool, change parameter type. Change
2803 semantic to "less than".
2804 (gen_ui_out_table_header_info): Change parameter to std::vector
2805 and update.
2806 (exists_probe_with_pops): Likewise.
2807 (info_probes_for_ops): Update to std::vector change.
2808 (enable_probes_command): Likewise.
2809 (disable_probes_command): Likewise.
2810
2811 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2812
2813 * probe.h (struct probe_ops) <get_probes>: Change parameter from
2814 vec to std::vector.
2815 * probe.c (parse_probes_in_pspace): Update.
2816 (find_probes_in_objfile): Update.
2817 (find_probe_by_pc): Update.
2818 (collect_probes): Update.
2819 (probe_any_get_probes): Update.
2820 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2821 return type to reference to std::vector.
2822 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2823 std::vector and update.
2824 (dtrace_process_dof): Likewise.
2825 (dtrace_get_probes): Likewise.
2826 * elfread.c (elf_get_probes): Change return type to std::vector,
2827 store an std::vector in bfd_data.
2828 (probe_key_free): Update to std::vector.
2829 * stap-probe.c (handle_stap_probe): Change parameter to
2830 std::vector and update.
2831 (stap_get_probes): Likewise.
2832 * symfile-debug.c (debug_sym_get_probes): Change return type to
2833 std::vector and update.
2834
2835 2017-09-11 Tom Tromey <tom@tromey.com>
2836
2837 * breakpoint.c (program_breakpoint_here_p): Update.
2838 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2839 from make_show_memory_breakpoints_cleanup. Return a
2840 scoped_restore_tmpl<int>.
2841 (restore_show_memory_breakpoints): Remove.
2842 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2843 * mem-break.c (memory_validate_breakpoint): Update.
2844 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2845 (ia64_memory_remove_breakpoint): Update.
2846 (ia64_breakpoint_from_pc): Update.
2847 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2848 from make_show_memory_breakpoints_cleanup.
2849
2850 2017-09-11 Tom Tromey <tom@tromey.com>
2851
2852 * d-namespace.c (d_lookup_symbol): Use std::string.
2853 (find_symbol_in_baseclass): Likewise.
2854
2855 2017-09-11 Tom Tromey <tom@tromey.com>
2856
2857 * ctf.c (ctf_start): Use std::string.
2858
2859 2017-09-11 Tom Tromey <tom@tromey.com>
2860
2861 * ada-lang.c (is_known_support_routine): Update.
2862 (ada_unhandled_exception_name_addr_from_raise): Update.
2863 * guile/scm-frame.c (gdbscm_frame_name): Update.
2864 * python/py-frame.c (frapy_name): Update.
2865 (frapy_function): Update.
2866 * stack.h (find_frame_funname): Update.
2867 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2868 (print_frame): Update.
2869
2870 2017-09-11 Tom Tromey <tom@tromey.com>
2871
2872 * findcmd.c (put_bits): Take a gdb::byte_vector.
2873 (parse_find_args): Return gdb::byte_vector. "args" now const.
2874 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
2875 cleanups.
2876 (find_command): Update.
2877
2878 2017-09-11 Tom Tromey <tom@tromey.com>
2879
2880 * cli/cli-script.c (class scoped_restore_hook_in): New.
2881 (clear_hook_in_cleanup): Remove.
2882 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2883 scoped_restore_hook_in.
2884
2885 2017-09-11 Tom Tromey <tom@tromey.com>
2886
2887 * cli/cli-script.c (restore_interp): Remove.
2888 (read_command_lines): Use scoped_restore_interp.
2889 * interps.c (scoped_restore_interp::set_temp): Rename from
2890 interp_set_temp.
2891 * interps.h (class scoped_restore_interp): New.
2892 (interp_set_temp): Remove.
2893
2894 2017-09-11 Tom Tromey <tom@tromey.com>
2895
2896 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2897 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2898 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2899 scoped_restore.
2900 (mi_cmd_break_insert_1): Update.
2901 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2902 scoped_restore.
2903
2904 2017-09-11 Tom Tromey <tom@tromey.com>
2905
2906 * demangle.c (demangle_command): Update.
2907 * breakpoint.c (disable_command): Update.
2908 (enable_command): Update.
2909 (find_location_by_number): Make "number" const. Use
2910 get_number_trailer.
2911 * cli/cli-utils.c (extract_arg): Return std::string.
2912 * probe.c (parse_probe_linespec): Update. Change types.
2913 (collect_probes): Take string arguments.
2914 (parse_probe_linespec): Likewise.
2915 (info_probes_for_ops): Update.
2916 (enable_probes_command): Update.
2917 (disable_probes_command): Update.
2918 * break-catch-sig.c (catch_signal_split_args): Update.
2919 * mi/mi-parse.c (mi_parse): Update.
2920
2921 2017-09-11 Tom Tromey <tom@tromey.com>
2922
2923 * language.h (language_enum): Make argument const.
2924 * language.c (language_enum): Make argument const.
2925
2926 2017-09-11 Tom Tromey <tom@tromey.com>
2927
2928 * common/common-utils.h (skip_to_space): Remove macro, redeclare
2929 as function.
2930 (skip_to_space): Rename from skip_to_space_const.
2931 * common/common-utils.c (skip_to_space): New function.
2932 (skip_to_space): Rename from skip_to_space_const.
2933 * cli/cli-utils.h (get_number): Rename from get_number_const.
2934 (extract_arg): Rename from extract_arg_const.
2935 * cli/cli-utils.c (get_number): Rename from get_number_const.
2936 (extract_arg): Rename from extract_arg_const.
2937 (number_or_range_parser::get_number): Use ::get_number.
2938 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2939 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2940 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2941 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2942 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2943 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2944 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2945 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2946
2947 2017-09-11 Tom Tromey <tom@tromey.com>
2948
2949 * python/python.c (do_start_initialization): Use
2950 py-event-types.def to initialize types.
2951 Define all object type structures.
2952 * python/python-internal.h: Don't declare event initialization
2953 functions.
2954 * python/py-threadevent.c (thread_event_object_type): Don't
2955 define.
2956 * python/py-stopevent.c (stop_event_object_type): Don't define.
2957 * python/py-signalevent.c (signal_event_object_type): Don't
2958 declare or define.
2959 * python/py-newobjfileevent.c (new_objfile_event_object_type)
2960 (clear_objfiles_event_object_type): Don't declare or define.
2961 * python/py-infevents.c (inferior_call_pre_event_object_type)
2962 (inferior_call_post_event_object_type)
2963 (register_changed_event_object_type)
2964 (memory_changed_event_object_type): Don't declare or define.
2965 * python/py-inferior.c (new_thread_event_object_type)
2966 (new_inferior_event_object_type)
2967 (inferior_deleted_event_object_type): Don't declare or define.
2968 * python/py-exitedevent.c (exited_event_object_type): Don't
2969 declare or define.
2970 * python/py-evts.c (gdbpy_initialize_py_events): Use
2971 py-all-events.def.
2972 * python/py-events.h (thread_event_object_type): Don't declare.
2973 (events_object): Use py-all-events.def.
2974 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
2975 py-event-types.def.
2976 * python/py-event-types.def: New file.
2977 * python/py-continueevent.c (create_continue_event_object): Don't
2978 declare or define.
2979 * python/py-bpevent.c (breakpoint_event_object_type): Don't
2980 declare or define.
2981 * python/py-all-events.def: New file.
2982
2983 2017-09-11 Tom Tromey <tom@tromey.com>
2984
2985 * python/py-threadevent.c (create_thread_event_object): Return
2986 gdbpy_ref.
2987 * python/py-stopevent.h (create_stop_event_object)
2988 (create_breakpoint_event_object, create_signal_event_object):
2989 Update.
2990 * python/py-stopevent.c (create_stop_event_object): Return
2991 gdbpy_ref.
2992 (emit_stop_event): Update.
2993 * python/py-signalevent.c (create_signal_event_object): Return
2994 gdbpy_ref.
2995 * python/py-infevents.c (create_inferior_call_event_object):
2996 Update.
2997 * python/py-event.h (create_event_object)
2998 (create_thread_event_object): Update.
2999 * python/py-event.c (create_event_object): Return gdbpy_ref.
3000 * python/py-continueevent.c: Return gdbpy_ref.
3001 * python/py-bpevent.c (create_breakpoint_event_object): Return
3002 gdbpy_ref.
3003
3004 2017-09-11 Tom Tromey <tom@tromey.com>
3005
3006 PR python/15622:
3007 * NEWS: Add entry.
3008 * python/python.c (do_start_initialization): Initialize new event
3009 types.
3010 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3011 (gdbpy_initialize_inferior_deleted_event)
3012 (gdbpy_initialize_new_thread_event): Declare.
3013 * python/py-threadevent.c (create_thread_event_object): Add option
3014 "thread" parameter.
3015 * python/py-inferior.c (new_thread_event_object_type)
3016 (new_inferior_event_object_type)
3017 (inferior_deleted_event_object_type): Declare.
3018 (python_new_inferior, python_inferior_deleted): New functions.
3019 (add_thread_object): Emit new_thread event.
3020 (gdbpy_initialize_inferior): Attach new functions to corresponding
3021 observers.
3022 (new_thread, new_inferior, inferior_deleted): Define new event
3023 types.
3024 * python/py-evts.c (gdbpy_initialize_py_events): Add new
3025 registries.
3026 * python/py-events.h (events_object) <new_inferior,
3027 inferior_deleted, new_thread>: New fields.
3028 * python/py-event.h (create_thread_event_breakpoint): Add optional
3029 "thread" parameter.
3030
3031 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
3032
3033 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3034 check current_ui instead.
3035 (internal_vproblem): Likewise.
3036
3037 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
3038
3039 * thread.c (print_thread_info_1): Remove unnecessary calls to
3040 uiout->is_mi_like_p.
3041
3042 2017-09-09 Tom Tromey <tom@tromey.com>
3043
3044 * namespace.h (add_using_directive): Update.
3045 * namespace.c (add_using_directive): Change type of excludes to
3046 std::vector.
3047 * dwarf2read.c (read_import_statement): Use std::vector.
3048 (read_namespace): Update.
3049 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3050
3051 2017-09-09 Tom Tromey <tom@tromey.com>
3052
3053 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3054
3055 2017-09-09 Tom Tromey <tom@tromey.com>
3056
3057 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3058
3059 2017-09-09 Tom Tromey <tom@tromey.com>
3060
3061 * stack.c (func_command): Use gdb::def_vector.
3062
3063 2017-09-09 Tom Tromey <tom@tromey.com>
3064
3065 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3066 ui_out_emit_list, ui_out_emit_tuple.
3067 (mi_cmd_var_update): Likewise.
3068
3069 2017-09-09 Tom Tromey <tom@tromey.com>
3070
3071 * mi/mi-interp.c (mi_user_selected_context_changed): Use
3072 ui_out_redirect_pop.
3073 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3074 ui_out_redirect_pop.
3075 * utils.c (do_ui_out_redirect_pop)
3076 (make_cleanup_ui_out_redirect_pop): Remove.
3077 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3078 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3079 * ui-out.h (ui_out_redirect_pop): New class.
3080
3081 2017-09-09 Tom Tromey <tom@tromey.com>
3082
3083 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3084 (list_available_thread_groups, mi_cmd_list_thread_groups)
3085 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3086 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3087 Likewise.
3088
3089 2017-09-09 Tom Tromey <tom@tromey.com>
3090
3091 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3092 ui_out_emit_tuple.
3093
3094 2017-09-09 Tom Tromey <tom@tromey.com>
3095
3096 * target.c (flash_erase_command): Use ui_out_emit_tuple.
3097 * stack.c (print_frame): Use ui_out_emit_tuple.
3098 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3099 (info_spu_mailbox_command, info_spu_dma_command)
3100 (info_spu_proxydma_command): Likewise.
3101 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3102 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3103 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3104 ui_out_emit_tuple.
3105 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3106
3107 2017-09-09 Tom Tromey <tom@tromey.com>
3108
3109 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3110 (class ui_out_emit_table): Update comment.
3111 * ui-out.c (do_cleanup_table_end)
3112 (make_cleanup_ui_out_table_begin_end): Remove.
3113 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3114 (info_spu_dma_cmdlist): Likewise.
3115 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3116 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3117 ui_out_emit_table.
3118
3119 2017-09-09 Tom Tromey <tom@tromey.com>
3120
3121 * thread.c (print_thread_info_1): Use ui_out_emit_table,
3122 ui_out_emit_list, gdb::optional.
3123
3124 2017-09-09 John Baldwin <jhb@FreeBSD.org>
3125
3126 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
3127 prototype.
3128 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
3129 prototype.
3130 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
3131 prototype.
3132 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
3133 * ada-exp.y: Remove _initialize_ada_exp prototype.
3134 * ada-lang.c: Remove _initialize_ada_language prototype.
3135 * ada-tasks.c: Remove _initialize_tasks prototype.
3136 * addrmap.c: Remove _initialize_addrmap prototype.
3137 * agent.c: Remove _initialize_agent prototype.
3138 * aix-thread.c: Remove _initialize_aix_thread prototype.
3139 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
3140 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
3141 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
3142 prototype.
3143 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
3144 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
3145 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3146 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3147 prototype.
3148 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3149 prototype.
3150 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3151 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3152 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3153 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3154 prototype.
3155 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3156 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3157 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3158 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3159 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3160 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3161 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3162 prototype.
3163 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3164 prototype.
3165 * annotate.c: Remove _initialize_annotate prototype.
3166 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3167 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3168 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3169 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3170 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3171 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3172 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3173 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3174 prototype.
3175 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3176 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3177 * auto-load.c: Remove _initialize_auto_load prototype.
3178 * auxv.c: Remove _initialize_auxv prototype.
3179 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3180 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3181 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3182 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3183 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3184 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3185 prototype.
3186 * break-catch-throw.c: Remove _initialize_break_catch_throw
3187 prototype.
3188 * breakpoint.c: Remove _initialize_breakpoint prototype.
3189 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3190 * btrace.c: Remove _initialize_btrace prototype.
3191 * charset.c: Remove _initialize_charset prototype.
3192 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3193 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3194 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3195 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3196 * cli/cli-script.c: Remove _initialize_cli_script prototype.
3197 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3198 * coffread.c: Remove _initialize_coffread prototype.
3199 * compile/compile.c: Remove _initialize_compile prototype.
3200 * complaints.c: Remove _initialize_complaints prototype.
3201 * completer.c: Remove _initialize_completer prototype.
3202 * copying.awk: Remove _initialize_copying prototype.
3203 * copying.c: Regenerate.
3204 * core-regset.c: Remove _initialize_core_regset prototype.
3205 * corefile.c: Remove _initialize_core prototype.
3206 * corelow.c: Remove _initialize_corelow prototype.
3207 * cp-abi.c: Remove _initialize_cp_abi prototype.
3208 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3209 * cp-support.c: Remove _initialize_cp_support prototype.
3210 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3211 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3212 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3213 * ctf.c: Remove _initialize_ctf prototype.
3214 * d-lang.c: Remove _initialize_d_language prototype.
3215 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
3216 prototype.
3217 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
3218 * dbxread.c: Remove _initialize_dbxread prototype.
3219 * dcache.c: Remove _initialize_dcache prototype.
3220 * demangle.c: Remove _initialize_demangler prototype.
3221 * disasm-selftests.c: Remove _initialize_disasm_selftests
3222 prototype.
3223 * disasm.c: Remove _initialize_disasm prototype.
3224 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3225 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3226 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3227 prototype.
3228 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3229 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3230 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3231 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3232 * elfread.c: Remove _initialize_elfread prototype.
3233 * exec.c: Remove _initialize_exec prototype.
3234 * extension.c: Remove _initialize_extension prototype.
3235 * f-lang.c: Remove _initialize_f_language prototype.
3236 * f-valprint.c: Remove _initialize_f_valprint prototype.
3237 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
3238 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
3239 * filesystem.c: Remove _initialize_filesystem prototype.
3240 * findcmd.c: Remove _initialize_mem_search prototype.
3241 * fork-child.c: Remove _initialize_fork_child prototype.
3242 * frame-base.c: Remove _initialize_frame_base prototype.
3243 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
3244 * frame.c: Remove _initialize_frame prototype.
3245 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
3246 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
3247 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
3248 * gcore.c: Remove _initialize_gcore prototype.
3249 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
3250 * gdbarch.c: Regenerate.
3251 * gdbarch.sh: Remove _initialize_gdbarch prototype.
3252 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
3253 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
3254 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
3255 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
3256 * go-lang.c: Remove _initialize_go_language prototype.
3257 * go32-nat.c: Remove _initialize_go32_nat prototype.
3258 * guile/guile.c: Remove _initialize_guile prototype.
3259 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
3260 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
3261 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
3262 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
3263 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
3264 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
3265 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
3266 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
3267 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
3268 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
3269 prototype.
3270 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
3271 prototype.
3272 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
3273 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
3274 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
3275 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
3276 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
3277 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
3278 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
3279 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
3280 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
3281 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
3282 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
3283 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
3284 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
3285 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3286 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
3287 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
3288 prototype.
3289 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
3290 prototype.
3291 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
3292 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
3293 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
3294 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
3295 * infcall.c: Remove _initialize_infcall prototype.
3296 * infcmd.c: Remove _initialize_infcmd prototype.
3297 * inferior.c: Remove _initialize_inferiors prototype.
3298 * inflow.c: Remove _initialize_inflow prototype.
3299 * infrun.c: Remove _initialize_infrun prototype.
3300 * interps.c: Remove _initialize_interpreter prototype.
3301 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
3302 * jit.c: Remove _initialize_jit prototype.
3303 * language.c: Remove _initialize_language prototype.
3304 * linux-fork.c: Remove _initialize_linux_fork prototype.
3305 * linux-nat.c: Remove _initialize_linux_nat prototype.
3306 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
3307 * linux-thread-db.c: Remove _initialize_thread_db prototype.
3308 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
3309 * m2-lang.c: Remove _initialize_m2_language prototype.
3310 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
3311 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
3312 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
3313 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
3314 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
3315 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3316 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3317 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
3318 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
3319 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
3320 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3321 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3322 * machoread.c: Remove _initialize_machoread prototype.
3323 * macrocmd.c: Remove _initialize_macrocmd prototype.
3324 * macroscope.c: Remove _initialize_macroscope prototype.
3325 * maint.c: Remove _initialize_maint_cmds prototype.
3326 * mdebugread.c: Remove _initialize_mdebugread prototype.
3327 * memattr.c: Remove _initialize_mem prototype.
3328 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
3329 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
3330 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
3331 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
3332 * mi/mi-main.c: Remove _initialize_mi_main prototype.
3333 * microblaze-linux-tdep.c: Remove
3334 _initialize_microblaze_linux_tdep prototype.
3335 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
3336 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
3337 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
3338 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
3339 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
3340 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
3341 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
3342 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
3343 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
3344 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
3345 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
3346 prototype.
3347 * mipsread.c: Remove _initialize_mipsread prototype.
3348 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
3349 prototype.
3350 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
3351 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
3352 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
3353 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
3354 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
3355 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
3356 prototype.
3357 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
3358 * nto-procfs.c: Remove _initialize_procfs prototype.
3359 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
3360 * objc-lang.c: Remove _initialize_objc_language prototype.
3361 * objfiles.c: Remove _initialize_objfiles prototype.
3362 * observer.c: Remove observer_test_first_notification_function,
3363 observer_test_second_notification_function,
3364 observer_test_third_notification_function, and
3365 _initialize_observer prototypes.
3366 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
3367 * osabi.c: Remove _initialize_gdb_osabi prototype.
3368 * osdata.c: Remove _initialize_osdata prototype.
3369 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
3370 * parse.c: Remove _initialize_parse prototype.
3371 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
3372 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
3373 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
3374 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
3375 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
3376 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
3377 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
3378 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
3379 * printcmd.c: Remove _initialize_printcmd prototype.
3380 * probe.c: Remove _initialize_probe prototype.
3381 * proc-api.c: Remove _initialize_proc_api prototype.
3382 * proc-events.c: Remove _initialize_proc_events prototype.
3383 * proc-service.c: Remove _initialize_proc_service prototype.
3384 * procfs.c: Remove _initialize_procfs prototype.
3385 * psymtab.c: Remove _initialize_psymtab prototype.
3386 * python/python.c: Remove _initialize_python prototype.
3387 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
3388 * record-btrace.c: Remove _initialize_record_btrace prototype.
3389 * record-full.c: Remove _initialize_record_full prototype.
3390 * record.c: Remove _initialize_record prototype.
3391 * regcache.c: Remove _initialize_regcache prototype.
3392 * reggroups.c: Remove _initialize_reggroup prototype.
3393 * remote-notif.c: Remove _initialize_notif prototype.
3394 * remote-sim.c: Remove _initialize_remote_sim prototype.
3395 * remote.c: Remove _initialize_remote prototype.
3396 * reverse.c: Remove _initialize_reverse prototype.
3397 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
3398 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
3399 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
3400 prototype.
3401 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
3402 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
3403 * rust-exp.y: Remove _initialize_rust_exp prototype.
3404 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
3405 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
3406 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
3407 * score-tdep.c: Remove _initialize_score_tdep prototype.
3408 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
3409 prototype.
3410 * ser-go32.c: Remove _initialize_ser_dos prototype.
3411 * ser-mingw.c: Remove _initialize_ser_windows prototype.
3412 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
3413 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
3414 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
3415 * serial.c: Remove _initialize_serial prototype.
3416 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
3417 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
3418 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
3419 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
3420 * skip.c: Remove _initialize_step_skip prototype.
3421 * sol-thread.c: Remove _initialize_sol_thread prototype.
3422 * solib-aix.c: Remove _initialize_solib_aix prototype.
3423 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
3424 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
3425 * solib-frv.c: Remove _initialize_frv_solib prototype.
3426 * solib-spu.c: Remove _initialize_spu_solib prototype.
3427 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
3428 * solib-target.c: Remove _initialize_solib_target prototype.
3429 * solib.c: Remove _initialize_solib prototype.
3430 * source.c: Remove _initialize_source prototype.
3431 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
3432 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
3433 prototype.
3434 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
3435 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
3436 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
3437 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
3438 prototype.
3439 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
3440 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
3441 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
3442 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
3443 prototype.
3444 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
3445 prototype.
3446 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
3447 prototype.
3448 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
3449 prototype.
3450 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
3451 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
3452 prototype.
3453 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
3454 prototype.
3455 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
3456 prototype.
3457 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
3458 prototype.
3459 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
3460 prototype.
3461 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
3462 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
3463 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
3464 * stabsread.c: Remove _initialize_stabsread prototype.
3465 * stack.c: Remove _initialize_stack prototype.
3466 * stap-probe.c: Remove _initialize_stap_probe prototype.
3467 * std-regs.c: Remove _initialize_frame_reg prototype.
3468 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
3469 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
3470 * symfile.c: Remove _initialize_symfile prototype.
3471 * symmisc.c: Remove _initialize_symmisc prototype.
3472 * symtab.c: Remove _initialize_symtab prototype.
3473 * target-dcache.c: Remove _initialize_target_dcache prototype.
3474 * target-descriptions.c: Remove _initialize_target_descriptions
3475 prototype.
3476 * thread.c: Remove _initialize_thread prototype.
3477 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
3478 prototype.
3479 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
3480 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
3481 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
3482 prototype.
3483 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
3484 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
3485 * tracefile.c: Remove _initialize_tracefile prototype.
3486 * tracepoint.c: Remove _initialize_tracepoint prototype.
3487 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
3488 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
3489 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
3490 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
3491 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
3492 * tui/tui-win.c: Remove _initialize_tui_win prototype.
3493 * tui/tui.c: Remove _initialize_tui prototype.
3494 * typeprint.c: Remove _initialize_typeprint prototype.
3495 * user-regs.c: Remove _initialize_user_regs prototype.
3496 * utils.c: Remove _initialize_utils prototype.
3497 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
3498 * valarith.c: Remove _initialize_valarith prototype.
3499 * valops.c: Remove _initialize_valops prototype.
3500 * valprint.c: Remove _initialize_valprint prototype.
3501 * value.c: Remove _initialize_values prototype.
3502 * varobj.c: Remove _initialize_varobj prototype.
3503 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
3504 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
3505 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
3506 * windows-nat.c: Remove _initialize_windows_nat,
3507 _initialize_check_for_gdb_ini, and _initialize_loadable
3508 prototypes.
3509 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
3510 * xcoffread.c: Remove _initialize_xcoffread prototype.
3511 * xml-support.c: Remove _initialize_xml_support prototype.
3512 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
3513 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
3514 prototype.
3515 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
3516 prototype.
3517 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
3518
3519 2017-09-08 Keith Seitz <keiths@redhat.com>
3520
3521 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
3522 field.
3523
3524 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
3525
3526 * f-valprint.c (f_val_print): Remove check for one byte
3527 sized integers. Remove printing of character type.
3528
3529 2017-09-08 Frank Penczek <frank.penczek@intel.com>
3530 Christoph Weinmann <christoph.t.weinmann@intel.com>
3531 Bernhard Heckel <bernhard.heckel@intel.com>
3532
3533 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
3534 to maintain proper indentation when printing pointers/refs.
3535
3536 2017-09-07 Joel Brobecker <brobecker@adacore.com>
3537
3538 GDB 8.0.1 released.
3539
3540 2017-09-07 Joel Brobecker <brobecker@adacore.com>
3541
3542 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
3543
3544 2017-09-05 Tom Tromey <tom@tromey.com>
3545
3546 * parse.c (funcall_chain): Now a std::vector.
3547 (start_arglist, end_arglist): Simplify.
3548 (free_funcalls): Remove.
3549 (parse_exp_in_context_1): Remove cleanup.
3550
3551 2017-09-05 Tom Tromey <tom@tromey.com>
3552
3553 * go-exp.y (go_parse): Don't create a cleanup.
3554
3555 2017-09-05 Tom Tromey <tom@tromey.com>
3556
3557 * d-exp.y (PrimaryExpression): Use std::string.
3558 (d_parse): Don't create a cleanup.
3559
3560 2017-09-05 Tom Tromey <tom@tromey.com>
3561
3562 * utils.c (do_clear_parser_state): Remove.
3563 (make_cleanup_clear_parser_state): Remove.
3564 * p-exp.y (pascal_parse): Use scoped_restore.
3565 * m2-exp.y (m2_parse): Use scoped_restore.
3566 * f-exp.y (f_parse): Use scoped_restore.
3567 * d-exp.y (d_parse): Use scoped_restore.
3568 * c-exp.y (c_parse): Use scoped_restore.
3569 * ada-exp.y (ada_parse): Use scoped_restore.
3570 * utils.h (make_cleanup_clear_parser_state): Remove.
3571
3572 2017-09-06 Keith Seitz <keiths@redhat.com>
3573
3574 * dwarf2read.c (dw2_linkage_name_attr): New function.
3575 (dw2_linkage_name): New function.
3576 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
3577 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
3578 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
3579
3580 2017-09-06 Kamil Rytarowski <n54@gmx.com>
3581
3582 * config/djgpp/djconfig.sh: Correct shell portability issue.
3583
3584 2017-09-06 Kamil Rytarowski <n54@gmx.com>
3585
3586 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
3587
3588 2017-09-06 John Baldwin <jhb@FreeBSD.org>
3589
3590 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
3591 * NEWS: Mention new FreeBSD/mips native configuration.
3592 * configure.host: Add aarch64*-*-freebsd*.
3593 * configure.nat: Likewise.
3594 * aarch64-fbsd-nat.c: New file.
3595
3596 2017-09-06 John Baldwin <jhb@FreeBSD.org>
3597
3598 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
3599 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
3600 * NEWS: Mention new FreeBSD/aarch64 target.
3601 * configure.tgt: Add aarch64*-*-freebsd*.
3602 * aarch64-fbsd-tdep.c: New file.
3603 * aarch64-fbsd-tdep.h: New file.
3604
3605 2017-09-06 Kamil Rytarowski <n54@gmx.com>
3606
3607 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
3608
3609 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3610
3611 * parse.c (find_minsym_type_and_address): Don't relocate addresses
3612 of TLS symbols.
3613
3614 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3615
3616 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
3617 call.
3618
3619 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3620
3621 * infrun.c (follow_exec): Call add_thread after
3622 target_find_description.
3623
3624 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3625
3626 * infrun.c (handle_inferior_event_1): When exec'ing, read
3627 stop_pc after follow_exec.
3628
3629 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3630
3631 * remote.c (process_g_packet): Update error message.
3632
3633 2017-09-05 Yao Qi <yao.qi@linaro.org>
3634
3635 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
3636 targets.
3637
3638 2017-09-05 Pedro Alves <palves@redhat.com>
3639
3640 * eval.c (eval_call, evaluate_funcall): New functions, factored
3641 out from ...
3642 (evaluate_subexp_standard): ... this.
3643
3644 2017-09-05 Yao Qi <yao.qi@linaro.org>
3645
3646 * amd64-tdep.c (amd64_target_description): Create target
3647 descriptions.
3648 (_initialize_amd64_tdep): Don't call functions
3649 initialize_tdesc_amd64_*. Add self tests.
3650 * arch/amd64.c (amd64_create_target_description): Add parameter
3651 is_linux. Call set_tdesc_osabi if is_linux is true.
3652 * arch/amd64.h (amd64_create_target_description): Update the
3653 declaration.
3654 * arch/i386.c (i386_create_target_description): Add parameter
3655 is_linux. Call set_tdesc_osabi if is_linux is true.
3656 * arch/i386.h (i386_create_target_description): Update
3657 declaration.
3658 * configure.tgt: Add i386.o to gdb_target_obs.
3659 * features/Makefile (XMLTOC): Remove i386/*.xml.
3660 * features/i386/amd64-avx-avx512.c: Remove.
3661 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
3662 * features/i386/amd64-avx-mpx.c: Remove.
3663 * features/i386/amd64-avx.c: Remove.
3664 * features/i386/amd64-mpx.c: Remove.
3665 * features/i386/amd64.c: Remove.
3666 * features/i386/i386-avx-avx512.c: Remove.
3667 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
3668 * features/i386/i386-avx-mpx.c: Remove.
3669 * features/i386/i386-avx.c: Remove.
3670 * features/i386/i386-mmx.c: Remove.
3671 * features/i386/i386-mpx.c: Remove.
3672 * features/i386/i386.c: Remove.
3673 * i386-tdep.c: Don't include features/i386/i386*.c., include
3674 target-descriptions.h and arch/i386.h.
3675 (i386_target_description): Create target descriptions.
3676 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
3677 functions. Do self tests.
3678
3679 2017-09-05 Yao Qi <yao.qi@linaro.org>
3680
3681 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
3682 * features/i386/amd64-avx-avx512-linux.c: Removed.
3683 * features/i386/amd64-avx-linux.c: Removed.
3684 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
3685 * features/i386/amd64-avx-mpx-linux.c: Removed.
3686 * features/i386/amd64-linux.c: Removed.
3687 * features/i386/amd64-mpx-linux.c: Removed.
3688 * features/i386/x32-avx-avx512-linux.c: Removed.
3689 * features/i386/x32-avx-linux.c: Removed.
3690 * features/i386/x32-linux.c: Removed.
3691
3692 2017-09-05 Yao Qi <yao.qi@linaro.org>
3693
3694 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
3695 features/i386/*.c.
3696 (amd64_linux_read_description): Call
3697 amd64_create_target_description.
3698 * arch/amd64.c: New file.
3699 * arch/amd64.h: New file.
3700 * configure.tgt (x86_64-*-linux*): Append amd64.o.
3701 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
3702
3703 2017-09-05 Yao Qi <yao.qi@linaro.org>
3704
3705 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
3706 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
3707 (amd64_linux_read_description): Create target descriptions.
3708 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
3709 functions. Add unit tests.
3710 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
3711 x32-core.xml.
3712 * features/i386/64bit-avx.c: Generated.
3713 * features/i386/64bit-avx512.c: Generated.
3714 * features/i386/64bit-core.c: Generated.
3715 * features/i386/64bit-linux.c: Generated.
3716 * features/i386/64bit-mpx.c: Generated.
3717 * features/i386/64bit-pkeys.c: Generated.
3718 * features/i386/64bit-segments.c: Generated.
3719 * features/i386/64bit-sse.c: Generated.
3720 * features/i386/x32-core.c: Generated.
3721 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
3722 c files for amd64-linux and x32-linux.
3723
3724 2017-09-05 Yao Qi <yao.qi@linaro.org>
3725
3726 * amd64-linux-tdep.c (amd64_linux_read_description): New
3727 function.
3728 (amd64_linux_core_read_description): Call
3729 amd64_linux_read_description.
3730 (amd64_linux_init_abi): Likewise.
3731 (amd64_x32_linux_init_abi): Likewise.
3732 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
3733 * x86-linux-nat.c (x86_linux_read_description): Call
3734 amd64_linux_read_description.
3735
3736 2017-09-05 Yao Qi <yao.qi@linaro.org>
3737
3738 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
3739 comments.
3740
3741 2017-09-05 Yao Qi <yao.qi@linaro.org>
3742
3743 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
3744 * features/i386/i386-avx-avx512-linux.c: Remove.
3745 * features/i386/i386-avx-linux.c: Remove.
3746 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
3747 * features/i386/i386-avx-mpx-linux.c: Remove.
3748 * features/i386/i386-linux.c: Remove.
3749 * features/i386/i386-mmx-linux.c: Remove.
3750 * features/i386/i386-mpx-linux.c: Remove.
3751
3752 2017-09-05 Yao Qi <yao.qi@linaro.org>
3753
3754 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
3755 (SFILES): Add arch/i386.c.
3756 (HFILES_NO_SRCDIR): Add arch/i386.h.
3757 * arch/i386.c: New file.
3758 * arch/i386.h: New file.
3759 * arch/tdesc.h (allocate_target_description): Declare.
3760 (set_tdesc_architecture): Declare.
3761 (set_tdesc_osabi): Declare.
3762 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
3763 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
3764 include arch/i386.h.
3765 (i386_linux_read_description): Remove code and call
3766 i386_create_target_description.
3767 (set_tdesc_architecture): New function.
3768 (set_tdesc_osabi): New function.
3769 * target-descriptions.h (allocate_target_description): Remove.
3770
3771 2017-09-05 Yao Qi <yao.qi@linaro.org>
3772
3773 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
3774 * target-descriptions.c (tdesc_create_feature): Likewise, and
3775 adjust code.
3776 * features/i386/32bit-avx.c: Re-generated.
3777 * features/i386/32bit-avx512.c: Re-generated.
3778 * features/i386/32bit-core.c: Re-generated.
3779 * features/i386/32bit-linux.c: Re-generated.
3780 * features/i386/32bit-mpx.c: Re-generated.
3781 * features/i386/32bit-pkeys.c: Re-generated.
3782 * features/i386/32bit-sse.c: Re-generated.
3783
3784 2017-09-05 Yao Qi <yao.qi@linaro.org>
3785
3786 * regformats/regdef.h (struct reg): Override operator == and !=.
3787
3788 2017-09-05 Yao Qi <yao.qi@linaro.org>
3789
3790 * arch/tdesc.h: New file.
3791 * regformats/regdat.sh: Generate code using tdesc_create_reg.
3792 * target-descriptions.c: Update comments.
3793 * target-descriptions.h: Include "arch/tdesc.h". Remove the
3794 declarations.
3795 * features/i386/32bit-avx.c: Re-generated.
3796 * features/i386/32bit-avx512.c: Re-generated.
3797 * features/i386/32bit-core.c: Re-generated.
3798 * features/i386/32bit-linux.c: Re-generated.
3799 * features/i386/32bit-mpx.c: Re-generated.
3800 * features/i386/32bit-pkeys.c: Re-generated.
3801 * features/i386/32bit-sse.c: Re-generated.
3802
3803 2017-09-05 Yao Qi <yao.qi@linaro.org>
3804
3805 * regformats/regdat.sh: Update generated code.
3806
3807 2017-09-05 Yao Qi <yao.qi@linaro.org>
3808
3809 * regformats/regdat.sh: Adjust code order.
3810
3811 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3812
3813 * expprint.c (dump_subexp_body_standard): Use constant format
3814 string in fprintf_filtered call.
3815
3816 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3817
3818 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3819 NetBSD/i386.
3820 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3821
3822 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3823
3824 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3825
3826 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3827
3828 * bsd-kvm.o: Define _KMEMUSER.
3829 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3830 * configure: Regenerate.
3831
3832 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3833
3834 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3835 * i386-fbsd-nat.c: Likewise.
3836
3837 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3838
3839 * unittests/array-view-selftests.c: Add include of <array>.
3840
3841 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3842
3843 * spu-tdep.c (flush_ea_cache): Add missing argument to
3844 call_function_by_hand.
3845
3846 2017-09-04 Pedro Alves <palves@redhat.com>
3847
3848 * NEWS (Safer support for debugging with no debug info): New.
3849
3850 2017-09-04 Pedro Alves <palves@redhat.com>
3851
3852 * c-exp.y (function_method, function_method_void): Add current
3853 instance flags to TYPE_INSTANCE.
3854 * dwarf2read.c (check_modifier): New.
3855 (compute_delayed_physnames): Assert that only C++ adds delayed
3856 physnames. Mark fn_fields as const/volatile depending on
3857 physname.
3858 * eval.c (make_params): New type_instance_flags parameter. Use
3859 it as the new type's instance flags.
3860 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3861 flags element and pass it to make_params.
3862 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3863 instance flags element.
3864 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3865 * gdbtypes.h: Include "enum-flags.h".
3866 (type_instance_flags): New enum-flags type.
3867 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3868 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3869 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3870 (follow_type_instance_flags): New function.
3871 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3872 * parser-defs.h (follow_type_instance_flags): Declare.
3873 * valops.c (value_struct_elt_for_reference): const/volatile must
3874 match too.
3875
3876 2017-09-04 Pedro Alves <palves@redhat.com>
3877
3878 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3879 function/method scopes; lookup the nested name as a function local
3880 static variable.
3881
3882 2017-09-04 Pedro Alves <palves@redhat.com>
3883
3884 (%type <voidval>): Add function_method.
3885 * c-exp.y (exp): New production for calls with no arguments.
3886 (function_method, function_method_void_or_typelist): New
3887 productions.
3888 (exp): New production for "method()::static_var".
3889 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3890 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3891 Handle OP_FUNC_STATIC_VAR.
3892 * parse.c (operator_length_standard):
3893 Handle OP_FUNC_STATIC_VAR.
3894
3895 2017-09-04 Pedro Alves <palves@redhat.com>
3896
3897 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3898 handling.
3899 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3900 Ditto.
3901 * parse.c (operator_length_standard, operator_check_standard):
3902 Ditto.
3903 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3904
3905 2017-09-04 Pedro Alves <palves@redhat.com>
3906
3907 * ax-gdb.c: Include "typeprint.h".
3908 (gen_expr_for_cast): New function.
3909 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3910 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3911 type is unknown.
3912 * dwarf2read.c (new_symbol_full): Fallback to int instead of
3913 nodebug_data_symbol.
3914 * eval.c: Include "typeprint.h".
3915 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3916 Error out if symbol has unknown type.
3917 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3918 evaluate_subexp_for_cast.
3919 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3920 OP_VAR_MSYM_VALUE.
3921 (evaluate_subexp_for_cast): New function.
3922 * gdbtypes.c (init_nodebug_var_type): New function.
3923 (objfile_type): Use it to initialize types of variables with no
3924 debug info.
3925 * typeprint.c (error_unknown_type): New.
3926 * typeprint.h (error_unknown_type): New declaration.
3927 * compile/compile-c-types.c (convert_type_basic): Handle
3928 TYPE_CODE_ERROR; warn and fallback to int for variables with
3929 unknown type.
3930
3931 2017-09-04 Pedro Alves <palves@redhat.com>
3932
3933 * eval.c (evaluate_var_value): New function, factored out from ...
3934 (evaluate_subexp_standard): ... here.
3935
3936 2017-09-04 Pedro Alves <palves@redhat.com>
3937
3938 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3939 Remove useless assignments to 'op'.
3940
3941 2017-09-04 Pedro Alves <palves@redhat.com>
3942
3943 * eval.c (eval_skip_value): New function.
3944 (evaluate_subexp_standard): Use it.
3945
3946 2017-09-04 Pedro Alves <palves@redhat.com>
3947
3948 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3949 function name from symbol/minsym and pass it to
3950 error_call_unknown_return_type.
3951
3952 2017-09-04 Pedro Alves <palves@redhat.com>
3953
3954 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3955 * ax-gdb.c (gen_msym_var_ref): New function.
3956 (gen_expr): Handle OP_VAR_MSYM_VALUE.
3957 * eval.c (evaluate_var_msym_value): New function.
3958 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3959 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3960 to call_function_by_hand.
3961 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3962 Handle OP_VAR_MSYM_VALUE.
3963 (union exp_element) <msymbol>: New field.
3964 * minsyms.h (struct type): Forward declare.
3965 (find_minsym_type_and_address): Declare.
3966 * parse.c (write_exp_elt_msym): New function.
3967 (write_exp_msymbol): Delete, refactored as ...
3968 (find_minsym_type_and_address): ... this new function.
3969 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3970 (operator_length_standard, operator_check_standard): Handle
3971 OP_VAR_MSYM_VALUE.
3972 * std-operator.def (OP_VAR_MSYM_VALUE): New.
3973
3974 2017-09-04 Pedro Alves <palves@redhat.com>
3975
3976 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3977 TYPE_GNU_IFUNC specially here. Throw error if return type is
3978 unknown.
3979 * ada-typeprint.c (print_func_type): Handle functions with unknown
3980 return type.
3981 * c-typeprint.c (c_type_print_base): Handle functions and methods
3982 with unknown return type.
3983 * compile/compile-c-symbols.c (convert_symbol_bmsym)
3984 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3985 * compile/compile-c-types.c: Include "objfiles.h".
3986 (convert_func): For functions with unknown return type, warn and
3987 default to int.
3988 * compile/compile-object-run.c (compile_object_run): Adjust call
3989 to call_function_by_hand_dummy.
3990 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3991 call_function_by_hand.
3992 * eval.c (evaluate_subexp_standard): Adjust calls to
3993 call_function_by_hand. Handle functions and methods with unknown
3994 return type. Pass expect_type to call_function_by_hand.
3995 * f-typeprint.c (f_type_print_base): Handle functions with unknown
3996 return type.
3997 * gcore.c (call_target_sbrk): Adjust call to
3998 call_function_by_hand.
3999 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4000 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
4001 an integer address type instead of nodebug.
4002 * guile/scm-value.c (gdbscm_value_call): Adjust call to
4003 call_function_by_hand.
4004 * infcall.c (error_call_unknown_return_type): New function.
4005 (call_function_by_hand): New "default_return_type" parameter.
4006 Pass it down.
4007 (call_function_by_hand_dummy): New "default_return_type"
4008 parameter. Use it instead of defaulting to int. If there's no
4009 default and the return type is unknown, throw an error. If
4010 there's a default return type, and the called function has no
4011 debug info, then assume the function is prototyped.
4012 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4013 New "default_return_type" parameter.
4014 (error_call_unknown_return_type): New declaration.
4015 * linux-fork.c (call_lseek): Cast return type of lseek.
4016 (inferior_call_waitpid, checkpoint_command): Adjust calls to
4017 call_function_by_hand.
4018 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4019 calls to call_function_by_hand.
4020 * m2-typeprint.c (m2_procedure): Handle functions with unknown
4021 return type.
4022 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4023 (value_nsstring, print_object_command): Adjust calls to
4024 call_function_by_hand.
4025 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4026 functions with unknown return type.
4027 (pascal_type_print_func_varspec_suffix): New function.
4028 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4029 TYPE_CODE_METHOD>: Use it.
4030 * python/py-value.c (valpy_call): Adjust call to
4031 call_function_by_hand.
4032 * rust-lang.c (rust_evaluate_funcall): Adjust call to
4033 call_function_by_hand.
4034 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4035 call_function_by_hand.
4036 * valops.c (value_allocate_space_in_inferior): Adjust call to
4037 call_function_by_hand.
4038 * typeprint.c (type_print_unknown_return_type): New function.
4039 * typeprint.h (type_print_unknown_return_type): New declaration.
4040
4041 2017-09-04 Pedro Alves <palves@redhat.com>
4042
4043 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4044 types with more than one parameter as prototyped.
4045
4046 2017-09-04 Pedro Alves <palves@redhat.com>
4047
4048 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4049 (disassemble_command): Use gdb_disassembly_flags instead of bare
4050 int.
4051 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4052 (dump_insns, do_mixed_source_and_assembly_deprecated)
4053 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4054 Use gdb_disassembly_flags instead of bare int.
4055 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4056 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4057 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4058 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
4059 (enum gdb_disassembly_flag): ... values of this new enumeration.
4060 (gdb_disassembly_flags): Define.
4061 (gdb_disassembly)
4062 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4063 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4064 gdb_disassembly_flags instead of bare int.
4065 * record-btrace.c (btrace_insn_history)
4066 (record_btrace_insn_history, record_btrace_insn_history_range)
4067 (record_btrace_insn_history_from): Use gdb_disassembly_flags
4068 instead of bare int.
4069 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4070 Use gdb_disassembly_flags instead of bare int.
4071 * target-debug.h (target_debug_print_gdb_disassembly_flags):
4072 Define.
4073 * target-delegates.c: Regenerate.
4074 * target.c (target_insn_history, target_insn_history_from)
4075 (target_insn_history_range): Use gdb_disassembly_flags instead of
4076 bare int.
4077 * target.h: Include "disasm.h".
4078 (struct target_ops) <to_insn_history, to_insn_history_from,
4079 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4080 int.
4081 (target_insn_history, target_insn_history_from)
4082 (target_insn_history_range): Use gdb_disassembly_flags instead of
4083 bare int.
4084
4085 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4086
4087 * cli/cli-script.c (build_command_line): For if/while commands,
4088 check whether args is empty.
4089
4090 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4091
4092 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4093 (enum command_control_type): Likewise.
4094 (struct command_line): Likewise.
4095 (free_command_lines): Likewise.
4096 (struct command_lines_deleter): Likewise.
4097 (command_line_up): Likewise.
4098 (read_command_lines): Likewise.
4099 (read_command_lines_1): Likewise.
4100 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4101 (enum command_control_type): Likewise.
4102 (struct command_line): Likewise.
4103 (free_command_lines): Likewise.
4104 (struct command_lines_deleter): Likewise.
4105 (command_line_up): Likewise.
4106 (read_command_lines): Likewise.
4107 (read_command_lines_1): Likewise.
4108 * breakpoint.h: Include cli/cli-script.h.
4109 * extension-priv.h: Likewise.
4110 * gdbcmd.h: Likewise.
4111
4112 2017-09-04 Pedro Alves <palves@redhat.com>
4113
4114 * ada-lang.c (is_known_support_routine): Move sal declaration to
4115 where it is initialized.
4116 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4117 (parse_breakpoint_sals, decode_static_tracepoint_spec)
4118 (clear_command, update_static_tracepoint): Remove init_sal
4119 references. Move declarations closer to initializations.
4120 * cli/cli-cmds.c (list_command): Move sal declarations closer to
4121 initializations.
4122 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
4123 references. Move sal declarations closer to initializations.
4124 * frame.c (find_frame_sal): Return a symtab_and_line via function
4125 return instead of output parameter. Remove init_sal references.
4126 * frame.h (find_frame_sal): Return a symtab_and_line via function
4127 return instead of output parameter.
4128 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
4129 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
4130 instead of memset.
4131 (gdbscm_find_pc_line): Remove init_sal reference.
4132 * infcall.c (call_function_by_hand_dummy): Remove init_sal
4133 references. Move declarations closer to initializations.
4134 * infcmd.c (set_step_frame): Update. Move declarations closer to
4135 initializations.
4136 (finish_backward): Remove init_sal references. Move declarations
4137 closer to initializations.
4138 * infrun.c (process_event_stop_test, handle_step_into_function)
4139 (insert_hp_step_resume_breakpoint_at_frame)
4140 (insert_step_resume_breakpoint_at_caller): Likewise.
4141 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
4142 (symbol_to_sal): Likewise.
4143 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
4144 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
4145 to its initialization.
4146 * reverse.c (save_bookmark_command): Use new/delete. Remove
4147 init_sal references. Move declarations closer to initializations.
4148 * source.c (get_current_source_symtab_and_line): Remove brace
4149 initialization.
4150 (set_current_source_symtab_and_line): Now takes the sal by const
4151 reference. Remove brace initialization.
4152 (line_info): Remove init_sal reference.
4153 * source.h (set_current_source_symtab_and_line): Now takes a
4154 symtab_and_line via const reference.
4155 * stack.c (set_current_sal_from_frame): Adjust.
4156 (print_frame_info): Adjust.
4157 (get_last_displayed_sal): Return the sal via function return
4158 instead of via output parameter. Simplify.
4159 (frame_info): Adjust.
4160 * stack.h (get_last_displayed_sal): Return the sal via function
4161 return instead of via output parameter.
4162 * symtab.c (init_sal): Delete.
4163 (find_pc_sect_line): Remove init_sal references. Move
4164 declarations closer to initializations.
4165 (find_function_start_sal): Remove init_sal references. Move
4166 declarations closer to initializations.
4167 * symtab.h (struct symtab_and_line): In-class initialize all
4168 fields.
4169 * tracepoint.c (set_traceframe_context)
4170 (print_one_static_tracepoint_marker): Remove init_sal references.
4171 Move declarations closer to initializations.
4172 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4173 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
4174 declarations closer to initializations.
4175 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4176 init_sal references. Adjust.
4177
4178 2017-09-04 Pedro Alves <palves@redhat.com>
4179
4180 * ax-gdb.c (agent_command_1): Use range-for.
4181 * break-catch-throw.c (re_set_exception_catchpoint): Update.
4182 * breakpoint.c: Include "common/array-view.h".
4183 (init_breakpoint_sal, create_breakpoint_sal): Change sals
4184 parameter from struct symtabs_and_lines to
4185 array_view<symtab_and_line>. Adjust. Use range-for. Update.
4186 (breakpoint_sals_to_pc): Change sals parameter from struct
4187 symtabs_and_lines to std::vector reference.
4188 (check_fast_tracepoint_sals): Change sals parameter from struct
4189 symtabs_and_lines to std::array_view. Use range-for.
4190 (decode_static_tracepoint_spec): Return a std::vector instead of
4191 symtabs_and_lines. Update.
4192 (create_breakpoint): Update.
4193 (break_range_command, until_break_command, clear_command): Update.
4194 (base_breakpoint_decode_location, bkpt_decode_location)
4195 (bkpt_probe_create_sals_from_location)
4196 (bkpt_probe_decode_location, tracepoint_decode_location)
4197 (tracepoint_probe_decode_location)
4198 (strace_marker_create_sals_from_location): Return a std::vector
4199 instead of symtabs_and_lines.
4200 (strace_marker_create_breakpoints_sal): Update.
4201 (strace_marker_decode_location): Return a std::vector instead of
4202 symtabs_and_lines. Update.
4203 (update_breakpoint_locations): Change struct symtabs_and_lines
4204 parameters to gdb::array_view. Adjust.
4205 (location_to_sals): Return a std::vector instead of
4206 symtabs_and_lines. Update.
4207 (breakpoint_re_set_default): Use std::vector instead of struct
4208 symtabs_and_lines.
4209 (decode_location_default): Return a std::vector instead of
4210 symtabs_and_lines. Update.
4211 * breakpoint.h: Include "common/array-view.h".
4212 (struct breakpoint_ops) <decode_location>: Now returns a
4213 std::vector instead of returning a symtabs_and_lines via output
4214 parameter.
4215 (update_breakpoint_locations): Change sals parameters to use
4216 gdb::array_view.
4217 * cli/cli-cmds.c (edit_command, list_command): Update to use
4218 std::vector and gdb::array_view.
4219 (ambiguous_line_spec): Adjust to use gdb::array_view and
4220 range-for.
4221 (compare_symtabs): Rename to ...
4222 (cmp_symtabs): ... this. Change parameters to symtab_and_line
4223 const reference and adjust.
4224 (filter_sals): Rewrite using std::vector and standard algorithms.
4225 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4226 (jump_command): Update to use std::vector.
4227 * linespec.c (struct linespec_state) <canonical_names>: Update
4228 comment.
4229 (add_sal_to_sals_basic): Delete.
4230 (add_sal_to_sals, filter_results, convert_results_to_lsals)
4231 (decode_line_2, create_sals_line_offset)
4232 (convert_address_location_to_sals, convert_linespec_to_sals)
4233 (convert_explicit_location_to_sals, parse_linespec)
4234 (event_location_to_sals, decode_line_full, decode_line_1)
4235 (decode_line_with_current_source)
4236 (decode_line_with_last_displayed, decode_objc)
4237 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
4238 (linespec_result::~linespec_result): Adjust to use std::vector
4239 instead of symtabs_and_lines.
4240 * linespec.h (linespec_sals::sals): Now a std::vector.
4241 (struct linespec_result): Use std::vector, bool, and in-class
4242 initialization.
4243 (decode_line_1, decode_line_with_current_source)
4244 (decode_line_with_last_displayed): Return std::vector.
4245 * macrocmd.c (info_macros_command): Use std::vector.
4246 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
4247 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
4248 std::vector.
4249 * probe.h (parse_probes): Return a std::vector.
4250 * python/python.c (gdbpy_decode_line): Use std::vector and
4251 gdb::array_view.
4252 * source.c (select_source_symtab, line_info): Use std::vector.
4253 * stack.c (func_command): Use std::vector.
4254 * symtab.h (struct symtabs_and_lines): Delete.
4255 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
4256
4257 2017-09-04 Pedro Alves <palves@redhat.com>
4258
4259 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4260 unittests/array-view-selftests.c.
4261 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
4262 * common/array-view.h: New file.
4263 * unittests/array-view-selftests.c: New file.
4264
4265 2017-09-04 Pedro Alves <palves@redhat.com>
4266
4267 * cli/cli-cmds.c (edit_command): Pass message to
4268 ambiguous_line_spec.
4269 (list_command): Pass message to ambiguous_line_spec. Say
4270 "first"/"last" instead of "start" and "end" to be consistent with
4271 the manual.
4272 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
4273 them to print formatted message.
4274
4275 2017-09-04 Pedro Alves <palves@redhat.com>
4276
4277 * btrace.c (ftrace_add_pt): Pass btrace_insn to
4278 ftrace_update_insns by reference instead of pointer.
4279
4280 2017-09-04 Yao Qi <yao.qi@linaro.org>
4281
4282 * i386-go32-tdep.c: Include x86-xstate.h.
4283 (i386_go32_init_abi): Call i386_target_description.
4284 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
4285 if xcr0 is X86_XSTATE_X87_MASK.
4286 * i386-tdep.h (tdesc_i386): Remove the declaration.
4287 (tdesc_i386_mmx): Likewise.
4288
4289 2017-09-04 Yao Qi <yao.qi@linaro.org>
4290
4291 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
4292 X86_XSTATE_SSE_MASK instead of 0.
4293
4294 2017-09-04 Yao Qi <yao.qi@linaro.org>
4295
4296 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
4297 i386_target_description.
4298 * i386-fbsd-nat.c (i386fbsd_read_description): Call
4299 i386_target_description.
4300 * i386-tdep.c (i386_gdbarch_init): Likewise.
4301
4302 2017-09-04 Yao Qi <yao.qi@linaro.org>
4303
4304 * amd64-darwin-tdep.c: Include "x86-xstate.h".
4305 (x86_darwin_init_abi_64): Call amd64_target_description.
4306 * amd64-dicos-tdep.c: Likewise.
4307 * amd64-fbsd-nat.c: Likewise.
4308 * amd64-fbsd-tdep.c: Likewise.
4309 * amd64-nbsd-tdep.c: Likewise.
4310 * amd64-obsd-tdep.c: Likewise.
4311 * amd64-sol2-tdep.c: Likewise.
4312 * amd64-windows-tdep.c: Likewise.
4313 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
4314
4315 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4316
4317 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
4318 (btrace_function) <insn>: Change type to use std::vector.
4319 * btrace.c (ftrace_debug, ftrace_call_num_insn,
4320 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
4321 ftrace_update_insns, ftrace_compute_global_level_offset,
4322 btrace_stitch_bts, btrace_clear, btrace_insn_get,
4323 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
4324 change to std::vector.
4325 (ftrace_update_insns): Adjust to change to std::vector, change
4326 type of INSN parameter.
4327 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
4328 * record-btrace.c (btrace_call_history_insn_range,
4329 btrace_compute_src_line_range,
4330 record_btrace_frame_prev_register): Adjust to change to
4331 std::vector.
4332 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
4333 to change to std::vector.
4334
4335 2017-09-03 Tom Tromey <tom@tromey.com>
4336
4337 * corefile.c (reopen_exec_file): Use std::string.
4338
4339 2017-09-03 Tom Tromey <tom@tromey.com>
4340
4341 * compile/compile.c (compile_register_name_mangled): Return
4342 std::string.
4343 * compile/compile-loc2c.c (pushf_register_address): Update.
4344 (pushf_register): Update.
4345 * compile/compile-c-types.c (convert_array): Update.
4346 * compile/compile-c-symbols.c (generate_vla_size): Update.
4347 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
4348 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
4349 (convert_one_symbol): Update.
4350 (generate_c_for_for_one_variable): Update.
4351 * compile/compile-c-support.c (c_get_range_decl_name): Return a
4352 std::string.
4353 (generate_register_struct): Update.
4354 * compile/compile-internal.h (c_get_range_decl_name): Return a
4355 std::string.
4356 (compile_register_name_mangled): Return std::string.
4357
4358 2017-09-03 Tom Tromey <tom@tromey.com>
4359
4360 * utils.c (perror_string): Return a std::string.
4361 (throw_perror_with_name, perror_warning_with_name): Update.
4362
4363 2017-09-03 Tom Tromey <tom@tromey.com>
4364
4365 * demangle.c (demangle_command): Use std::string,
4366 unique_xmalloc_ptr.
4367
4368 2017-09-03 Tom Tromey <tom@tromey.com>
4369
4370 * cli/cli-setshow.c (do_set_command): Use std::string.
4371
4372 2017-09-03 Tom Tromey <tom@tromey.com>
4373
4374 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
4375
4376 2017-09-03 Tom Tromey <tom@tromey.com>
4377
4378 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
4379
4380 2017-09-03 Tom Tromey <tom@tromey.com>
4381
4382 * mi/mi-cmd-env.c (env_execute_cli_command): Use
4383 gdb::unique_xmalloc_ptr.
4384
4385 2017-09-03 Tom Tromey <tom@tromey.com>
4386
4387 * thread.c (print_thread_info_1): Use string_printf.
4388 (thread_apply_command, thread_apply_all_command): Use
4389 std::string.
4390
4391 2017-09-03 Tom Tromey <tom@tromey.com>
4392
4393 * valprint.c (val_print_string): Update.
4394 * gdbcore.h (memory_error_message): Return std::string.
4395 * corefile.c (memory_error_message): Return std::string.
4396 (memory_error): Update.
4397 * breakpoint.c (insert_bp_location): Update.
4398
4399 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4400
4401 * target/waitstatus.h (target_waitstatus_to_string): Change
4402 return type to std::string.
4403 * target/waitstatus.c (target_waitstatus_to_string): Return
4404 std::string.
4405 * target.h (target_waitstatus_to_string): Remove declaration.
4406 * infrun.c (resume, clear_proceed_status_thread,
4407 print_target_wait_results, do_target_wait, save_waitstatus,
4408 stop_all_threads): Adjust.
4409 * record-btrace.c (record_btrace_wait): Adjust.
4410 * target-debug.h
4411 (target_debug_print_struct_target_waitstatus_p): Adjust.
4412
4413 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4414
4415 PR gdb/22046
4416 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
4417 detection.
4418
4419 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4420
4421 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
4422 for setting/unsetting environment variables on the remote target.
4423 (New remote packets): Add entries for QEnvironmentHexEncoded,
4424 QEnvironmentUnset and QEnvironmentReset.
4425 * common/environ.c (gdb_environ::operator=): Extend method to
4426 handle m_user_set_env_list and m_user_unset_env_list.
4427 (gdb_environ::clear): Likewise.
4428 (match_var_in_string): Change type of first parameter from 'char
4429 *' to 'const char *'.
4430 (gdb_environ::set): Extend method to handle
4431 m_user_set_env_list and m_user_unset_env_list.
4432 (gdb_environ::unset): Likewise.
4433 (gdb_environ::clear_user_set_env): New method.
4434 (gdb_environ::user_set_envp): Likewise.
4435 (gdb_environ::user_unset_envp): Likewise.
4436 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
4437 m_user_unset_env_list on move constructor/assignment.
4438 (unset): Add new default parameter 'update_unset_list = true'.
4439 (clear_user_set_env): New method.
4440 (user_set_envp): Likewise.
4441 (user_unset_envp): Likewise.
4442 (m_user_set_env_list): New std::set.
4443 (m_user_unset_env_list): Likewise.
4444 * common/rsp-low.c (hex2str): New function.
4445 (bin2hex): New overload for bin2hex function.
4446 * common/rsp-low.c (hex2str): New prototype.
4447 (str2hex): New overload prototype.
4448 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
4449 QEnvironmentUnset and QEnvironmentReset.
4450 (remote_protocol_features): Add QEnvironmentHexEncoded,
4451 QEnvironmentUnset and QEnvironmentReset packets.
4452 (send_environment_packet): New function.
4453 (extended_remote_environment_support): Likewise.
4454 (extended_remote_create_inferior): Call
4455 extended_remote_environment_support.
4456 (_initialize_remote): Add QEnvironmentHexEncoded,
4457 QEnvironmentUnset and QEnvironmentReset packet configs.
4458 * unittests/environ-selftests.c (gdb_selftest_env_var):
4459 New variable.
4460 (test_vector_initialization): New function.
4461 (test_init_from_host_environ): Likewise.
4462 (test_reinit_from_host_environ): Likewise.
4463 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
4464 Likewise.
4465 (test_unset_set_empty_vector): Likewise.
4466 (test_vector_clear): Likewise.
4467 (test_std_move): Likewise.
4468 (test_move_constructor):
4469 (test_self_move): Likewise.
4470 (test_set_unset_reset): Likewise.
4471 (run_tests): Rewrite in terms of the functions above.
4472
4473 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
4474
4475 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
4476 (adi_available): Use a temp variable of type CORE_ADDR as argument
4477 3 when calling target_auxv_search.
4478 (adi_normalize_address): Use masks and xor operators to calculate
4479 normalized address.
4480 (adi_read_versions, adi_write_versions, adi_print_versions)
4481 (do_examine, do_assign): Use paddress.
4482
4483 2017-08-29 John Baldwin <jhb@FreeBSD.org>
4484
4485 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
4486 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
4487 out of loop and add supply of FIR.
4488 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
4489 add collect of FIR.
4490
4491 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
4492
4493 PR gdb/21827
4494 * cli/cli-script.c (define_command): Don't convert command name
4495 to lower case.
4496
4497 2017-08-25 Joel Brobecker <brobecker@adacore.com>
4498
4499 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
4500 Update all callers accordingly. Remove all code blocks handling
4501 the case where DISPP is not NULL.
4502
4503 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4504
4505 PR symtab/22003
4506 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
4507 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4508 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
4509
4510 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4511
4512 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
4513 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
4514 (read_comp_units_from_section): New parameter abbrev_section, use
4515 read_and_check_comp_unit_head, allocate signatured_type if needed.
4516 (create_all_comp_units): Update read_comp_units_from_section caller.
4517
4518 2017-08-23 Pedro Alves <palves@redhat.com>
4519
4520 PR remote/21852
4521 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
4522 to null_ptid and switch to thread without reading the registers
4523 after adding the inferior.
4524
4525 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
4526
4527 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
4528 compile-gcc.
4529 * compile/compile.c (compile_gcc, show_compile_gcc): New.
4530 (compile_to_object): Implement compile_gcc.
4531 (_initialize_compile): Install "set compile-gcc". Initialize
4532 compile_gcc.
4533
4534 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
4535
4536 * compile/compile.c (compile_to_object): Conditionally call
4537 set_verbose. Conditionally call compile or compile_v0.
4538
4539 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
4540
4541 * sparc64-tdep.h: (adi_normalize_address): New export.
4542 * sparc-nat.h: (open_adi_tag_fd): New export.
4543 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
4544 * sparc64-linux-tdep.c:
4545 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
4546 (sparc64_linux_handle_segmentation_fault): New function.
4547 (sparc64_linux_init_abi): Register
4548 sparc64_linux_handle_segmentation_fault
4549 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
4550 (sparc64_addr_bits_remove): New function.
4551 (sparc64_init_abi): Register sparc64_addr_bits_remove.
4552 (MAX_PROC_NAME_SIZE): New macro.
4553 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
4554 (sparc64adilist): New variable.
4555 (adi_proc_list): New variable.
4556 (find_adi_info): New function.
4557 (add_adi_info): New function.
4558 (get_adi_info_proc): New function.
4559 (get_adi_info): New function.
4560 (info_adi_command): New function.
4561 (read_maps_entry): New function.
4562 (adi_available): New function.
4563 (adi_normalize_address): New function.
4564 (adi_align_address): New function.
4565 (adi_convert_byte_count): New function.
4566 (adi_tag_fd): New function.
4567 (adi_is_addr_mapped): New function.
4568 (adi_read_versions): New function.
4569 (adi_write_versions): New function.
4570 (adi_print_versions): New function.
4571 (do_examine): New function.
4572 (do_assign): New function.
4573 (adi_examine_command): New function.
4574 (adi_assign_command): New function.
4575 (_initialize_sparc64_adi_tdep): New function.
4576
4577 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
4578
4579 * breakpoint.c (breakpoints_info): Rename to ...
4580 (info_breakpoints_command): ... this.
4581 (watchpoints_info): Rename to ...
4582 (info_watchpoints_command): ... this.
4583 (tracepoints_info): Rename to ...
4584 (info_tracepoints_command): ... this.
4585 (_initialize_breakpoint): Adjust.
4586 * dcache.c (dcache_info): Rename to ...
4587 (info_display_command): ... this.
4588 (_initialize_dcache): Adjust.
4589 * frame.h (args_info): Rename to ...
4590 (info_args_command): ... this.
4591 (locals_info): Rename to ...
4592 (info_locals_command): ... this.
4593 * infcmd.c (nofp_registers_info): Rename to ...
4594 (info_registers_command): ... this.
4595 (float_info): Rename to ...
4596 (info_float_command): ... this.
4597 (program_info): Rename to ...
4598 (info_program_command): ... this.
4599 (all_registers_info): Rename to ...
4600 (info_all_registers_command): ... this.
4601 (vector_info): Rename to ...
4602 (info_vector_command): ... this.
4603 (float_info): Rename to ...
4604 (info_float_command): ... this.
4605 (_initialize_infcmd): Adjust.
4606 * inferior.h (term_info): Rename to ...
4607 (info_terminal_command): ... this.
4608 * inflow.c (term_info): Rename to ...
4609 (info_terminal_command): ... this.
4610 (_initialize_inflow): Adjust.
4611 * infrun.c (signals_info): Rename to ...
4612 (info_signals_command): ... this.
4613 (_initialize_infrun): Adjust.
4614 * objc-lang.c (classes_info): Rename to ...
4615 (info_classes_command): ... this.
4616 (selectors_info): Rename to ...
4617 (info_selectors_command): ... this.
4618 (_initialize_objc_language): Adjust.
4619 * printcmd.c (sym_info): Rename to ...
4620 (info_symbol_command): ... this.
4621 (address_info): Rename to ...
4622 (info_address_command): ... this.
4623 (display_info): Rename to ...
4624 (info_display_command): ... this.
4625 (_initialize_printcmd): Adjust.
4626 * reverse.c (bookmarks_info): Rename to ...
4627 (info_breakpoints_command): ... this.
4628 (_initialize_reverse): Adjust.
4629 * ser-go32.c (dos_info): Rename to ...
4630 (info_serial_command): ... this.
4631 (_initialize_ser_dos): Adjust.
4632 * skip.c (skip_info): Rename to ...
4633 (info_skip_command): ... this.
4634 (_initialize_step_skip): Adjust.
4635 * source.c (line_info): Rename to ...
4636 (info_line_command): ... this.
4637 (source_info): Rename to ...
4638 (info_source_command)
4639 * stack.c (frame_info): Rename to ...
4640 (info_frame_command): ... this.
4641 (locals_info): Rename to ...
4642 (info_locals_command): ... this.
4643 (args_info): Rename to ...
4644 (info_args_command): ... this.
4645 (_initialize_stack): Adjust.
4646 * symtab.c (sources_info): Rename to ...
4647 (info_sources_command): ... this.
4648 (variables_info): Rename to ...
4649 (info_variables_command): ... this.
4650 (functions_info): Rename to ...
4651 (info_functions_command): ... this.
4652 (types_info): Rename to ...
4653 (info_types_command): ... this.
4654 (_initialize_symtab): Adjust.
4655 * target.c (target_info): Rename to ...
4656 (info_target_command): ... this.
4657 (initialize_targets): Adjust.
4658 * tracepoint.c (tvariables_info): Rename to ...
4659 (info_tvariables_command): ... this.
4660 (scope_info): Rename to ...
4661 (info_scope_command): ... this.
4662 (trace_dump_actions): Adjust.
4663 (_initialize_tracepoint): Adjust.
4664
4665 2017-08-22 Tom Tromey <tom@tromey.com>
4666
4667 * breakpoint.h (install_breakpoint): Update.
4668 * breakpoint.c (add_solib_catchpoint): Update.
4669 (install_breakpoint): Change argument to a std::unique_ptr.
4670 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
4671 (create_breakpoint_sal, create_breakpoint): Update.
4672 (watch_command_1, catch_exec_command_1)
4673 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
4674 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
4675 Return the breakpoint.
4676 (set_raw_breakpoint_without_location, set_raw_breakpoint)
4677 (new_single_step_breakpoint): Update.
4678 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
4679 std::unique_ptr.
4680 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4681 std::unique_ptr.
4682 * break-catch-sig.c (create_signal_catchpoint): Use
4683 std::unique_ptr.
4684 * ada-lang.c (create_ada_exception_catchpoint): Use
4685 std::unique_ptr.
4686
4687 2017-08-22 Tom Tromey <tom@tromey.com>
4688
4689 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
4690
4691 2017-08-22 Tom Tromey <tom@tromey.com>
4692
4693 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
4694 (lookup_partial_symbol): Update.
4695
4696 2017-08-22 Tom Tromey <tom@tromey.com>
4697
4698 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
4699 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
4700 (find_and_open_source, symtab_to_fullname): Update.
4701 * psymtab.c (psymtab_to_fullname): Update.
4702
4703 2017-08-22 Tom Tromey <tom@tromey.com>
4704
4705 * exec.c (exec_file_attach): Update.
4706 * linux-thread-db.c (try_thread_db_load): Update.
4707 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
4708 * utils.c (gdb_realpath): Change return type.
4709 (gdb_realpath_keepfile): Update.
4710 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
4711 (_initialize_utils): Register the new self test.
4712 * source.c (openp): Update.
4713 (find_and_open_source): Update.
4714 * nto-tdep.c (nto_find_and_open_solib): Update.
4715 * main.c (set_gdb_data_directory): Update.
4716 (captured_main_1): Update.
4717 * dwarf2read.c (dwarf2_get_dwz_file): Update
4718 (dw2_map_symbol_filenames): Update.
4719 * auto-load.c (auto_load_safe_path_vec_update): Update.
4720 (filename_is_in_auto_load_safe_path_vec): Change type of
4721 "filename_realp".
4722 (auto_load_objfile_script): Update.
4723 (file_is_auto_load_safe): Update. Use std::string.
4724 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
4725
4726 2017-08-22 Tom Tromey <tom@tromey.com>
4727
4728 * utils.c (gdb_realpath_keepfile): Return a
4729 gdb::unique_xmalloc_ptr.
4730 * exec.c (exec_file_attach): Update.
4731 * utils.h (gdb_realpath_keepfile): Return a
4732 gdb::unique_xmalloc_ptr.
4733
4734 2017-08-22 Tom Tromey <tom@tromey.com>
4735
4736 * compile/compile.c (compile_file_command): Use
4737 gdb::unique_xmalloc_ptr, std::string.
4738 * utils.c (gdb_abspath): Change return type.
4739 * source.c (openp): Update.
4740 * objfiles.c (allocate_objfile): Update.
4741 * main.c (set_gdb_data_directory): Update.
4742 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
4743
4744 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
4745
4746 * cli-cmds.c (list_commands): List actual code around more than
4747 one location.
4748
4749 2017-08-21 John Baldwin <jhb@FreeBSD.org>
4750
4751 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
4752
4753 2017-08-21 Pedro Alves <palves@redhat.com>
4754
4755 PR gdb/19487
4756 * c-exp.y (variable production): Handle function aliases.
4757 * minsyms.c (msymbol_is_text): New function.
4758 * minsyms.h (msymbol_is_text): Declare.
4759 * symtab.c (find_function_alias_target): New function.
4760 * symtab.h (find_function_alias_target): Declare.
4761
4762 2017-08-21 Pedro Alves <palves@redhat.com>
4763
4764 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
4765 typedefs.
4766 * typeprint.c (whatis_exp): If handling "whatis", and expression
4767 is OP_TYPE, strip one typedef level. Otherwise don't strip
4768 typedefs here.
4769 * valops.c (value_cast): Save "to" type before resolving
4770 stubs/typedefs. Use that type as resulting value's type.
4771
4772 2017-08-18 Tom Tromey <tom@tromey.com>
4773 Pedro Alves <palves@redhat.com>
4774
4775 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
4776 * sol-thread.c (sol_thread_resume, sol_thread_wait)
4777 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4778 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4779 * proc-service.c (ps_xfer_memory): Use scoped_restore.
4780 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4781 (linux_get_siginfo_data): Add "thread" argument. Use
4782 scoped_restore.
4783 * linux-nat.c (linux_child_follow_fork)
4784 (check_stopped_by_watchpoint): Use scoped_restore.
4785 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4786 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4787 (restore_inferior_ptid, save_inferior_ptid): Remove.
4788 * btrace.c (btrace_fetch): Use scoped_restore.
4789 * bsd-uthread.c (bsd_uthread_fetch_registers)
4790 (bsd_uthread_store_registers): Use scoped_restore.
4791 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4792 scoped_restore.
4793 * aix-thread.c (aix_thread_resume, aix_thread_wait)
4794 (aix_thread_xfer_partial): Use scoped_restore.
4795 * inferior.h (save_inferior_ptid): Remove.
4796
4797 2017-08-18 Yao Qi <yao.qi@linaro.org>
4798
4799 PR tdep/21818
4800 * arm-tdep.c (gdb_print_insn_arm): Mark
4801 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4802
4803 2017-08-18 Yao Qi <yao.qi@linaro.org>
4804
4805 * NEWS: Mention GDBserver's new option "--selftest".
4806 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4807 * selftest.c: Move it to common/selftest.c.
4808 * selftest.h: Move it to common/selftest.h.
4809 * selftest-arch.c (reset): New function.
4810 (tests_with_arch): Call reset.
4811
4812 2017-08-18 Yao Qi <yao.qi@linaro.org>
4813
4814 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
4815 instead of exception_fprintf and printf_filtered.
4816
4817 2017-08-18 Yao Qi <yao.qi@linaro.org>
4818
4819 * selftest.c (register_self_test): Rename it to
4820 selftests::register_test.
4821 (run_self_tests): selftest::run_tests.
4822 * selftest.h: Update declarations.
4823 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4824 selftests::register_test_foreach_arch.
4825 * selftest-arch.h: Update declaration.
4826 * aarch64-tdep.c: Update.
4827 * arm-tdep.c: Likewise.
4828 * disasm-selftests.c: Likewise.
4829 * dwarf2loc.c: Likewise.
4830 * dwarf2-frame.c: Likewise.
4831 * findvar.c: Likewise.
4832 * gdbarch-selftests.c: Likewise.
4833 * maint.c (maintenance_selftest): Likewise.
4834 * regcache.c: Likewise.
4835 * rust-exp.y: Likewise.
4836 * selftest-arch.c: Likewise.
4837 * unittests/environ-selftests.c: Likewise.
4838 * unittests/function-view-selftests.c: Likewise.
4839 * unittests/offset-type-selftests.c: Likewise.
4840 * unittests/optional-selftests.c: Likewise.
4841 * unittests/scoped_restore-selftests.c: Likewise.
4842 * utils-selftests.c: Likewise.
4843
4844 2017-08-17 Pedro Alves <palves@redhat.com>
4845
4846 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4847 local.
4848
4849 2017-08-17 Pedro Alves <palves@redhat.com>
4850
4851 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4852 field.
4853 (reset_die_in_process): Delete, replaced by ...
4854 (process_die_scope): ... this new class. Make it responsible for
4855 freeing cu->line_header too.
4856 (process_die): Use process_die_scope.
4857 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4858 cu->line_header_die_owner. Don't release the line header if it's
4859 owned by the CU.
4860 (setup_type_unit_groups): Make the CU/DIE own the line header.
4861 Don't release the line header here.
4862
4863 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
4864
4865 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4866
4867 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
4868
4869 * NEWS: Mention new shortcuts for nexti and stepi in TUI
4870 Single-Key mode
4871
4872 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
4873
4874 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4875 mode command list.
4876
4877 2017-08-15 Stafford Horne <shorne@gmail.com>
4878
4879 * MAINTAINERS (Write After Approval): Add Stafford Horne.
4880
4881 2017-08-15 Stafford Horne <shorne@gmail.com>
4882
4883 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4884
4885 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
4886
4887 PR gdb/21954
4888 * infcmd.c (unset_environment_command): Use the 'clear' method on
4889 the environment instead of resetting it.
4890
4891 2017-08-15 John Baldwin <jhb@FreeBSD.org>
4892
4893 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4894 platforms.
4895
4896 2017-08-14 Tom Tromey <tom@tromey.com>
4897
4898 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4899 (print_binary_chars): Likewise.
4900 (BITS_IN_BYTES): Remove.
4901
4902 2017-08-14 Tom Tromey <tom@tromey.com>
4903
4904 PR gdb/21675
4905 * valprint.c (LOW_ZERO): Change value to 034.
4906 (print_octal_chars): Add static_asserts for octal constants.
4907 * printcmd.c (print_scalar_formatted): Add 'd' case.
4908
4909 2017-08-11 Tom Tromey <tom@tromey.com>
4910
4911 * symfile.c (add_symbol_file_command): Use std::vector.
4912
4913 2017-08-14 Tom Tromey <tom@tromey.com>
4914
4915 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4916 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4917 std::move.
4918 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4919
4920 2017-08-11 Pedro Alves <palves@redhat.com>
4921
4922 * infrun.c (process_event_stop_test): Adjust
4923 function_name_is_marked_for_skip call.
4924 * skip.c: Include <list>.
4925 (skiplist_entry): Make it a class with private fields, and
4926 getters/setters.
4927 (skiplist_entry_chain): Delete.
4928 (skiplist_entries): New.
4929 (skiplist_entry_count): Delete.
4930 (highest_skiplist_entry_num): New.
4931 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4932 (add_skiplist_entry): Delete.
4933 (skiplist_entry::skiplist_entry): New.
4934 (skiplist_entry::add_entry): New.
4935 (skip_file_command, skip_function): Adjust.
4936 (compile_skip_regexp): Delete.
4937 (skip_command): Don't compile regexp here. Adjust to use
4938 skiplist_entry::add_entry.
4939 (skip_info): Adjust to use range-for and getters.
4940 (skip_enable_command, skip_disable_command): Adjust to use
4941 range-for and setters.
4942 (skip_delete_command): Adjust to use std::list.
4943 (add_skiplist_entry): Delete.
4944 (skip_file_p): Delete, refactored as ...
4945 (skiplist_entry::do_skip_file_p): ... this new method.
4946 (skip_gfile_p): Delete, refactored as ...
4947 (skiplist_entry::do_gskip_file_p): ... this new method.
4948 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4949 (skiplist_entry::skip_function_p): ... this new method.
4950 (function_name_is_marked_for_skip): Now returns bool, and takes
4951 the function sal by const reference. Adjust to use range-for and
4952 skiplist_entry methods.
4953 (_initialize_step_skip): Remove references to
4954 skiplist_entry_chain, skiplist_entry_count.
4955 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4956 takes the function sal by const reference.
4957
4958 2017-08-11 Yao Qi <yao.qi@linaro.org>
4959
4960 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4961 (dwarf2_frame_cache): Remove reset_cache_cleanup.
4962 (dwarf2_frame_cache):
4963 * frame-unwind.c (frame_unwind_try_unwinder): Catch
4964 RETURN_MASK_ALL and set *this_case to NULL.
4965 * frame-unwind.h: Update comments.
4966
4967 2017-08-11 Yao Qi <yao.qi@linaro.org>
4968
4969 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4970 (dwarf2_frame_state_copy_regs): Remove.
4971 (dwarf2_frame_state_free_regs): Remove.
4972 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4973 (dwarf2_restore_rule): Call method .alloc_regs instead of
4974 dwarf2_frame_state_alloc_regs.
4975 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
4976 constructor. Call std::move.
4977 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4978 (dwarf2_frame_cache): Likewise.
4979
4980 [GDB_SELF_TEST]: Include selftest.h and
4981 selftest-arch.h.
4982 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4983 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4984 execute_cfa_program_test.
4985
4986 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4987 copy ctor, assignment operator, move assignment.
4988 <alloc_regs>: New method.
4989 <swap>: New method.
4990 (struct dwarf2_frame_state): Delete dtor.
4991 (dwarf2_frame_state_alloc_regs): Remove declaration.
4992 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4993 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4994
4995 2017-08-11 Yao Qi <yao.qi@linaro.org>
4996
4997 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4998 (dwarf2_frame_state::dwarf2_frame_state): New.
4999 (dwarf2_frame_state::~dwarf2_frame_state): New.
5000 (dwarf2_fetch_cfa_info): Update.
5001 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
5002 rather than a pointer. Update code.
5003 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5004 dtor.
5005 <data_align, code_align, retaddr_column>: Change them to const.
5006 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5007 to bool.
5008
5009 2017-08-11 Yao Qi <yao.qi@linaro.org>
5010
5011 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5012 <loc.exp>: New field.
5013 * dwarf2-frame.c (execute_cfa_program): Update.
5014 (dwarf2_frame_prev_register): Update.
5015
5016 2017-08-10 Pedro Alves <palves@redhat.com>
5017
5018 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5019
5020 2017-08-09 John Baldwin <jhb@FreeBSD.org>
5021
5022 * fbsd-nat.c (struct fbsd_fork_info): Remove.
5023 (fbsd_pending_children): Use std::list.
5024 (fbsd_remember_child): Likewise.
5025 (fbsd_is_child_pending): Likewise.
5026 (fbsd_pending_vfork_done): Use std::forward_list.
5027 (fbsd_add_vfork_done): Likewise.
5028 (fbsd_is_vfork_done_pending): Likewise.
5029 (fbsd_next_vfork_done): Likewise.
5030
5031 2017-08-09 John Baldwin <jhb@FreeBSD.org>
5032
5033 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5034 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5035 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5036 for `mapfilename'.
5037 (fbsd_xfer_partial): Use gdb::byte_vector.
5038 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
5039
5040 2017-08-09 John Baldwin <jhb@FreeBSD.org>
5041
5042 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5043 "filestuff.h".
5044 (fbsd_find_memory_regions): Fix `mapfile' initialization.
5045
5046 2017-08-09 Tom Tromey <tom@tromey.com>
5047
5048 * skip.c (skiplist_entry): New constructor.
5049 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5050 (skiplist_entry::file_is_glob): Now bool.
5051 (skiplist_entry::file, skiplist_entry::function): Now
5052 std::string.
5053 (make_skip_entry): Return a unique_ptr. Use new.
5054 (free_skiplist_entry, free_skiplist_entry_cleanup)
5055 (make_free_skiplist_entry_cleanup): Remove.
5056 (skip_command, skip_disable_command, add_skiplist_entry)
5057 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5058 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5059 (function_name_is_marked_for_skip): Update.
5060 (skip_delete_command): Update. Use delete.
5061
5062 2017-08-09 Jiong Wang <jiong.wang@arm.com>
5063
5064 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5065 (aarch64_linux_core_read_description): New function.
5066 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5067
5068 2017-08-09 Pedro Alves <palves@redhat.com>
5069
5070 * cp-name-parser.y (cp_comp_to_string): Return a
5071 gdb::unique_xmalloc_ptr<char>.
5072 * cp-support.c (replace_typedefs_qualified_name)
5073 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5074 (cp_canonicalize_string_full): Use op= instead of explicit
5075 convertion.
5076 (cp_class_name_from_physname, method_name_from_physname)
5077 (cp_func_name, cp_remove_params): Adjust to use
5078 gdb::unique_xmalloc_ptr<char>.
5079 * cp-support.h (cp_comp_to_string): Return a
5080 gdb::unique_xmalloc_ptr<char>.
5081 * python/py-type.c (typy_lookup_type): Adjust to use
5082 gdb::unique_xmalloc_ptr<char>.
5083
5084 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
5085
5086 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5087
5088 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
5089 Yao Qi <yao.qi@linaro.org>
5090
5091 * cp-support.c (cp_canonicalize_string_full): Use
5092 gdb::unique_xmalloc_ptr<char>.
5093 (cp_canonicalize_string): Likewise.
5094
5095 2017-08-09 Yao Qi <yao.qi@linaro.org>
5096
5097 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5098 * regformats/i386/amd64-avx-avx512.dat: Remove.
5099 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5100 * regformats/i386/amd64-avx-mpx.dat:Remove.
5101 * regformats/i386/amd64-avx.dat: Remove.
5102 * regformats/i386/amd64-mpx.dat: Remove.
5103 * regformats/i386/i386-avx-avx512.dat: Remove.
5104 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5105 * regformats/i386/i386-avx-mpx.dat: Remove.
5106 * regformats/i386/i386-mmx.dat: Remove.
5107 * regformats/i386/i386-mpx.dat: Remove.
5108
5109 2017-08-09 Yao Qi <yao.qi@linaro.org>
5110
5111 * amd64-tdep.h (tdesc_x32): Remove the declaration.
5112 * amd64-tdep.c: Don't include features/i386/x32*.c.
5113 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5114 functions.
5115 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5116 and i386/x32-avx-avx512.
5117 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5118 and i386/x32.xml.
5119 * features/i386/x32-avx-avx512.c: Removed.
5120 * features/i386/x32-avx-avx512.xml: Removed.
5121 * features/i386/x32-avx.c: Removed.
5122 * features/i386/x32-avx.xml: Removed.
5123 * features/i386/x32.c: Removed.
5124 * features/i386/x32.xml: Removed.
5125 * regformats/i386/x32-avx-avx512.dat: Removed.
5126 * regformats/i386/x32-avx.dat: Removed.
5127 * regformats/i386/x32.dat: Removed.
5128
5129 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5130
5131 PR breakpoints/21886
5132 * mem-break.c (default_memory_insert_breakpoint): Use
5133 `->placed_address' rather than `->reqstd_address' for the
5134 breakpoint location.
5135
5136 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5137
5138 * arch-utils.c (default_print_insn): Remove arch/mach/endian
5139 assertions.
5140
5141 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5142
5143 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
5144 a union of `tdep_info', `tdesc_data' and `id'.
5145 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5146 rather than `info.tdep_info'.
5147 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5148 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5149 * i386-tdep.c (i386_gdbarch_init): Likewise.
5150 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5151 * mips-tdep.c (mips_gdbarch_init): Likewise.
5152 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5153 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5154 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5155 `info.tdep_info'.
5156 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5157 `info.tdep_info'.
5158 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5159 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5160 `info.tdep_info'.
5161 * spu-tdep.c (spu_gdbarch_init): Likewise.
5162 * gdbarch.h: Regenerate.
5163
5164 2017-08-07 Leszek Swirski <leszeks@google.com>
5165
5166 PR symtab/20899
5167 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5168
5169 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
5170
5171 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5172 (gdbsim_open): Rename gdb_argv args object to argv.
5173
5174 2017-08-05 Tom Tromey <tom@tromey.com>
5175
5176 * compile/compile-object-load.c (compile_object_load): Use
5177 gdb::unique_xmalloc_ptr.
5178 * cli/cli-dump.c (scan_filename): Rename from
5179 scan_filename_with_cleanup. Change return type.
5180 (scan_expression): Rename from scan_expression_with_cleanup.
5181 Change return type.
5182 (dump_memory_to_file, dump_value_to_file, restore_command):
5183 Use gdb::unique_xmalloc_ptr. Update.
5184 * cli/cli-cmds.c (find_and_open_script): Use
5185 gdb::unique_xmalloc_ptr.
5186 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5187 * symmisc.c (maintenance_print_symbols)
5188 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5189 * symfile.c (symfile_bfd_open, generic_load)
5190 (add_symbol_file_command, remove_symbol_file_command): Use
5191 gdb::unique_xmalloc_ptr.
5192 * source.c (openp): Use gdb::unique_xmalloc_ptr.
5193 * psymtab.c (maintenance_print_psymbols): Use
5194 gdb::unique_xmalloc_ptr.
5195 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5196 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5197 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5198 (reload_shared_libraries_1): Likewise.
5199
5200 2017-08-05 Tom Tromey <tom@tromey.com>
5201
5202 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5203 (rust_op_vector, rust_set_vector): New typedefs.
5204 (current_parser): New global.
5205 (work_obstack): Change to pointer type. Update all users.
5206 (rust_ast, pstate): Remove globals.
5207 (struct rust_parser): New.
5208 (%union) <params, field_inits>: Change type.
5209 (start, tuple_expr, unit_expr, struct_expr_list, literal)
5210 (field_expr, expr_list, maybe_expr_list, type_list): Update.
5211 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5212 (convert_params_to_types, convert_params_to_expression): Change
5213 type of "params".
5214 (ast_string): Change type of "fields".
5215 (rust_parse): Make a rust_parser. Remove cleanups.
5216 (rust_lex_tests): Make and install an auto_obstack.
5217
5218 2017-08-04 Yao Qi <yao.qi@linaro.org>
5219
5220 * configure.srv (ipa_x32_linux_regobj): New.
5221 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
5222 instead of X86_TDESC_AVX512.
5223 (initialize_low_tracepoint): Call
5224 init_registers_x32_avx_avx512_linux.
5225
5226 2017-08-04 Yao Qi <yao.qi@linaro.org>
5227
5228 * utils.h (gdb_argv): Add namespace std for nullptr_t.
5229
5230 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
5231
5232 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
5233
5234 2017-08-03 Tom Tromey <tom@tromey.com>
5235
5236 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
5237 Remove.
5238 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
5239
5240 2017-08-03 Tom Tromey <tom@tromey.com>
5241
5242 * python/py-param.c (compute_enum_values): Use gdb_argv.
5243
5244 2017-08-03 Tom Tromey <tom@tromey.com>
5245
5246 * utils.h (struct gdb_argv_deleter): New.
5247 (gdb_argv): New class.
5248 * utils.c (gdb_argv::reset): New method.
5249 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
5250 * tracefile.c (tsave_command): Use gdb_argv.
5251 * top.c (new_ui_command): Use gdb_argv.
5252 * symmisc.c (maintenance_print_symbols)
5253 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
5254 * symfile.c (symbol_file_command, generic_load)
5255 (remove_symbol_file_command): Use gdb_argv.
5256 * stack.c (backtrace_command): Use gdb_argv.
5257 * source.c (add_path, show_substitute_path_command)
5258 (unset_substitute_path_command, set_substitute_path_command):
5259 Use gdb_argv.
5260 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
5261 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
5262 * remote.c (extended_remote_run, remote_put_command)
5263 (remote_get_command, remote_delete_command): Use gdb_argv.
5264 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
5265 (gdbsim_open): Use gdb_argv.
5266 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
5267 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
5268 * procfs.c (procfs_info_proc): Use gdb_argv.
5269 * interps.c (interpreter_exec_cmd): Use gdb_argv.
5270 * infrun.c (handle_command): Use gdb_argv.
5271 * inferior.c (add_inferior_command, clone_inferior_command):
5272 Use gdb_argv.
5273 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
5274 * exec.c (exec_file_command): Use gdb_argv.
5275 * cli/cli-cmds.c (alias_command): Use gdb_argv.
5276 * compile/compile.c (build_argc_argv): Use gdb_argv.
5277
5278 2017-08-03 Tom Tromey <tom@tromey.com>
5279
5280 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
5281
5282 2017-08-03 Tom Tromey <tom@tromey.com>
5283
5284 * python/python.c (compute_python_string): Return std::string.
5285 (gdbpy_eval_from_control_command): Update.
5286 (do_start_initialization): Use std::string.
5287 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
5288 xstrprintf.
5289 * python/py-breakpoint.c (local_setattro): Use string_printf, not
5290 xstrprintf.
5291
5292 2017-08-03 Tom Tromey <tom@tromey.com>
5293
5294 * top.h (do_restore_instream_cleanup): Remove.
5295 * top.c (do_restore_instream_cleanup): Remove.
5296 (read_command_file): Use scoped_restore.
5297 * cli/cli-script.c (execute_user_command): Use scoped_restore.
5298
5299 2017-08-03 Tom Tromey <tom@tromey.com>
5300
5301 * cli/cli-script.c (execute_user_command)
5302 (execute_control_command): Use scoped_restore.
5303
5304 2017-08-03 Tom Tromey <tom@tromey.com>
5305
5306 * cli/cli-script.c (do_restore_user_call_depth): Remove.
5307 (execute_user_command): Remove user_call_depth; use
5308 user_args_stack's size instead.
5309
5310 2017-08-03 Tom Tromey <tom@tromey.com>
5311
5312 * top.h (in_user_command): Remove.
5313 * top.c (in_user_command): Remove.
5314 * cli/cli-script.c (do_restore_user_call_depth)
5315 (execute_user_command): Update.
5316
5317 2017-08-03 Tom Tromey <tom@tromey.com>
5318
5319 * valops.c (search_struct_method): Use gdb::byte_vector.
5320 * valarith.c (value_concat): Use std::vector.
5321 * target.c (memory_xfer_partial): Use gdb::byte_vector.
5322 (simple_search_memory): Likewise.
5323 * printcmd.c (find_string_backward): Use gdb::byte_vector.
5324 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
5325 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
5326 * elfread.c (elf_rel_plt_read): Use std::string.
5327 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
5328 * cli/cli-dump.c (restore_section_callback): Use
5329 gdb::byte_vector.
5330
5331 2017-08-03 Tom Tromey <tom@tromey.com>
5332
5333 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
5334
5335 2017-08-03 Tom Tromey <tom@tromey.com>
5336
5337 * tui/tui-regs.c (tui_restore_gdbout): Remove.
5338 (tui_register_format): Use scoped_restore.
5339
5340 2017-08-03 Tom Tromey <tom@tromey.com>
5341
5342 * reverse.c (exec_direction_default): Remove.
5343 (exec_reverse_once): Use scoped_restore.
5344 * remote.c (restore_remote_timeout): Remove.
5345 (remote_flash_erase, remote_flash_write, remote_flash_done)
5346 (readchar, remote_serial_write): Use scoped_restore.
5347 * cli/cli-script.c (struct source_cleanup_lines_args)
5348 (source_cleanup_lines): Remove.
5349 (script_from_file): Use scoped_restore.
5350 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
5351 (source_command): Use scoped_restore.
5352
5353 2017-08-03 Tom Tromey <tom@tromey.com>
5354
5355 * utils.h (make_cleanup_free_so): Remove.
5356 * utils.c (do_free_so, make_cleanup_free_so): Remove.
5357 * solist.h (struct so_deleter): New.
5358 (so_list_up): New typedef.
5359 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
5360
5361 2017-08-03 Tom Tromey <tom@tromey.com>
5362
5363 * utils.h (make_cleanup_restore_current_language): Remove.
5364 * utils.c (do_restore_current_language)
5365 (make_cleanup_restore_current_language): Remove.
5366 * parse.c (parse_exp_in_context_1)
5367 (parse_expression_with_language): Use
5368 scoped_restore_current_language.
5369 * mi/mi-main.c (mi_cmd_execute): Use
5370 scoped_restore_current_language.
5371 * language.h (scoped_restore_current_language): New class.
5372
5373 2017-08-03 Tom Tromey <tom@tromey.com>
5374
5375 * compile/compile.c (cleanup_unlink_file): Remove.
5376 (compile_to_object): Use gdb::unlinker.
5377 (eval_compile_command): Likewise.
5378
5379 2017-08-03 Tom Tromey <tom@tromey.com>
5380
5381 * utils.h (make_cleanup_fclose): Remove.
5382 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
5383
5384 2017-08-03 Tom Tromey <tom@tromey.com>
5385
5386 * top.c (open_terminal_stream): Return gdb_file_up.
5387 (new_ui_command): Update.
5388
5389 2017-08-03 Tom Tromey <tom@tromey.com>
5390
5391 * source.c (print_source_lines_base, forward_search_command)
5392 (reverse_search_command): Use gdb_file_up.
5393
5394 2017-08-03 Tom Tromey <tom@tromey.com>
5395
5396 * fbsd-nat.c (fbsd_find_memory_regions): Update.
5397
5398 2017-08-03 Tom Tromey <tom@tromey.com>
5399
5400 * cli/cli-cmds.c (find_and_open_script): Change return type.
5401 Remove "streamp" and "full_path" parameters.
5402 (source_script_with_search): Update.
5403 * auto-load.c (source_script_file): Update.
5404 * cli/cli-cmds.h (find_and_open_script): Change type.
5405 (open_script): New struct.
5406
5407 2017-08-03 Tom Tromey <tom@tromey.com>
5408
5409 * xml-support.c (xml_fetch_content_from_file): Update.
5410 * ui-file.c (stdio_file::open): Update.
5411 * tracefile-tfile.c (tfile_start): Update.
5412 * remote.c (remote_file_put, remote_file_get): Update.
5413 * nat/linux-procfs.c (linux_proc_get_int)
5414 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
5415 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
5416 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
5417 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
5418 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
5419 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
5420 * linux-nat.c (linux_proc_pending_signals): Update.
5421 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
5422 (file_closer): Remove.
5423 * compile/compile.c (compile_to_object): Update.
5424 * common/filestuff.h (struct gdb_file_deleter): New.
5425 (gdb_file_up): New typedef.
5426 (gdb_fopen_cloexec): Change return type.
5427 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
5428 * cli/cli-dump.c (fopen_with_cleanup): Remove.
5429 (dump_binary_file, restore_binary_file): Update.
5430 * auto-load.c (auto_load_objfile_script_1): Update.
5431
5432 2017-08-03 Tom Tromey <tom@tromey.com>
5433
5434 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
5435 (info_static_tracepoint_markers_command): Likewise.
5436 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
5437 * skip.c (skip_info): Use ui_out_emit_table.
5438 * progspace.c (print_program_space): Use ui_out_emit_table.
5439 * osdata.c (info_osdata): Use ui_out_emit_table.
5440 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
5441 ui_out_emit_table.
5442 * linux-thread-db.c (info_auto_load_libthread_db): Use
5443 ui_out_emit_table.
5444 * inferior.c (print_inferior): Use ui_out_emit_table.
5445 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
5446 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
5447 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
5448 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
5449 * ui-out.h (class ui_out_emit_table): New.
5450
5451 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
5452
5453 * mips-tdep.c (mips_fpu_type_str): New function.
5454 (mips_dump_tdep): Call it.
5455
5456 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
5457
5458 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
5459 `->mips_fpu_type'.
5460
5461 2017-07-31 Xavier Roirand <roirand@adacore.com>
5462
5463 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
5464
5465 2017-07-27 Xavier Roirand <roirand@adacore.com>
5466
5467 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
5468
5469 2017-07-26 Yao Qi <yao.qi@linaro.org>
5470
5471 * cli/cli-cmds.c (maintenancechecklist): New variable.
5472 * gdbcmd.h (maintenancechecklist): Declare it.
5473 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
5474 Call i386_linux_read_description with different masks.
5475 * maint.c (maintenance_check_command): New function.
5476 (_initialize_maint_cmds): Call add_prefix_cmd.
5477 * target-descriptions.c (tdesc_reg): override operator != and ==.
5478 (tdesc_type): Likewise.
5479 (tdesc_feature): Likewise.
5480 (target_desc): Likewise.
5481 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
5482 (maintenance_check_xml_descriptions): New function.
5483 (_initialize_target_descriptions) Add command "xml-descriptions".
5484 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
5485
5486 2017-07-26 Yao Qi <yao.qi@linaro.org>
5487
5488 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
5489 Include features/i386/32bit-*.c.
5490 (i386_linux_read_description): Generate target description if it
5491 doesn't exist.
5492 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
5493 functions.
5494 * features/i386/32bit-linux.c: Re-generated.
5495 * features/i386/32bit-sse.c: Likewise.
5496 * target-descriptions.c (print_c_feature::visit): Print code to
5497 set register number if needed.
5498 (print_c_feature) <m_next_regnum>: New field.
5499
5500 2017-07-26 Yao Qi <yao.qi@linaro.org>
5501
5502 * features/Makefile (CFILES): Rename with TDESC_CFILES.
5503 (FEATURE_XMLFILES): New.
5504 (FEATURE_CFILES): New.
5505 New rules.
5506 (clean-cfiles): Remove generated c files.
5507 * features/i386/32bit-avx.c: Generated.
5508 * features/i386/32bit-avx512.c: Generated.
5509 * features/i386/32bit-core.c: Generated.
5510 * features/i386/32bit-linux.c: Generated.
5511 * features/i386/32bit-mpx.c: Generated.
5512 * features/i386/32bit-pkeys.c: Generated.
5513 * features/i386/32bit-sse.c: Generated.
5514 * target-descriptions.c: Include algorithm.
5515 (tdesc_element_visitor): Add method visit_end.
5516 (print_c_tdesc): Implement visit_end.
5517 (print_c_tdesc:: m_filename_after_features): Move it to
5518 protected.
5519 (print_c_feature): New class.
5520 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
5521 name starts with "i386/32bit-".
5522
5523 2017-07-26 Yao Qi <yao.qi@linaro.org>
5524
5525 * target-descriptions.c (tdesc_element_visitor): New class.
5526 (tdesc_element): New class.
5527 (tdesc_reg): Inherit from tdesc_element.
5528 (tdesc_reg::accept): New function.
5529 (tdesc_type): Inherit from tdesc_element.
5530 (tdesc_type::accept): New function.
5531 (tdesc_feature): Inherit from tdesc_element.
5532 (tdesc_feature::accept): New function.
5533 (target_desc): Inherit from tdesc_element.
5534 (target_desc::target_desc): New.
5535 (target_desc::~target_desc): New.
5536 (target_desc::accept): New.
5537 (allocate_target_description): Use new.
5538 (free_target_description): Use delete.
5539 (print_c_tdesc): New class.
5540 (maint_print_c_tdesc_cmd): Adjust.
5541
5542 * features/aarch64.c: Re-generated.
5543 * features/arc-arcompact.c: Re-generated.
5544 * features/arc-v2.c: Re-generated.
5545 * features/arm/arm-with-iwmmxt.c: Re-generated.
5546 * features/arm/arm-with-m.c: Re-generated.
5547 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
5548 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
5549 * features/arm/arm-with-neon.c: Re-generated.
5550 * features/arm/arm-with-vfpv2.c: Re-generated.
5551 * features/arm/arm-with-vfpv3.c: Re-generated.
5552 * features/i386/amd64-avx-avx512.c: Re-generated.
5553 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5554 * features/i386/amd64-avx.c: Re-generated.
5555 * features/i386/amd64-avx-linux.c: Re-generated.
5556 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
5557 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5558 * features/i386/amd64-avx-mpx.c: Re-generated.
5559 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
5560 * features/i386/amd64.c: Re-generated.
5561 * features/i386/amd64-linux.c: Re-generated.
5562 * features/i386/amd64-mpx.c: Re-generated.
5563 * features/i386/amd64-mpx-linux.c: Re-generated.
5564 * features/i386/i386-avx-avx512.c: Re-generated.
5565 * features/i386/i386-avx-avx512-linux.c: Re-generated.
5566 * features/i386/i386-avx.c: Re-generated.
5567 * features/i386/i386-avx-linux.c: Re-generated.
5568 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
5569 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
5570 * features/i386/i386-avx-mpx.c: Re-generated.
5571 * features/i386/i386-avx-mpx-linux.c: Re-generated.
5572 * features/i386/i386.c: Re-generated.
5573 * features/i386/i386-linux.c: Re-generated.
5574 * features/i386/i386-mmx.c: Re-generated.
5575 * features/i386/i386-mmx-linux.c: Re-generated.
5576 * features/i386/i386-mpx.c: Re-generated.
5577 * features/i386/i386-mpx-linux.c: Re-generated.
5578 * features/i386/x32-avx-avx512.c: Re-generated.
5579 * features/i386/x32-avx-avx512-linux.c: Re-generated.
5580 * features/i386/x32-avx.c: Re-generated.
5581 * features/i386/x32-avx-linux.c: Re-generated.
5582 * features/i386/x32.c: Re-generated.
5583 * features/i386/x32-linux.c: Re-generated.
5584 * features/microblaze.c: Re-generated.
5585 * features/microblaze-with-stack-protect.c: Re-generated.
5586 * features/mips64-dsp-linux.c: Re-generated.
5587 * features/mips64-linux.c: Re-generated.
5588 * features/mips-dsp-linux.c: Re-generated.
5589 * features/mips-linux.c: Re-generated.
5590 * features/nds32.c: Re-generated.
5591 * features/nios2.c: Re-generated.
5592 * features/nios2-linux.c: Re-generated.
5593 * features/rs6000/powerpc-32.c: Re-generated.
5594 * features/rs6000/powerpc-32l.c: Re-generated.
5595 * features/rs6000/powerpc-403.c: Re-generated.
5596 * features/rs6000/powerpc-403gc.c : Re-generated.
5597 * features/rs6000/powerpc-405.c: Re-generated.
5598 * features/rs6000/powerpc-505.c: Re-generated.
5599 * features/rs6000/powerpc-601.c: Re-generated.
5600 * features/rs6000/powerpc-602.c: Re-generated.
5601 * features/rs6000/powerpc-603.c: Re-generated.
5602 * features/rs6000/powerpc-604.c: Re-generated.
5603 * features/rs6000/powerpc-64.c: Re-generated.
5604 * features/rs6000/powerpc-64l.c: Re-generated.
5605 * features/rs6000/powerpc-7400.c: Re-generated.
5606 * features/rs6000/powerpc-750.c: Re-generated.
5607 * features/rs6000/powerpc-860.c: Re-generated.
5608 * features/rs6000/powerpc-altivec32.c: Re-generated.
5609 * features/rs6000/powerpc-altivec32l.c: Re-generated.
5610 * features/rs6000/powerpc-altivec64.c: Re-generated.
5611 * features/rs6000/powerpc-altivec64l.c: Re-generated.
5612 * features/rs6000/powerpc-cell32l.c: Re-generated.
5613 * features/rs6000/powerpc-cell64l.c: Re-generated.
5614 * features/rs6000/powerpc-e500.c: Re-generated.
5615 * features/rs6000/powerpc-e500l.c: Re-generated.
5616 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
5617 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
5618 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
5619 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
5620 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
5621 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
5622 * features/rs6000/powerpc-vsx32.c: Re-generated.
5623 * features/rs6000/powerpc-vsx32l.c: Re-generated.
5624 * features/rs6000/powerpc-vsx64.c: Re-generated.
5625 * features/rs6000/powerpc-vsx64l.c: Re-generated.
5626 * features/rs6000/rs6000.c: Re-generated.
5627 * features/s390-linux32.c: Re-generated.
5628 * features/s390-linux32v1.c: Re-generated.
5629 * features/s390-linux32v2.c: Re-generated.
5630 * features/s390-linux64.c: Re-generated.
5631 * features/s390-linux64v1.c: Re-generated.
5632 * features/s390-linux64v2.c: Re-generated.
5633 * features/s390-te-linux64.c: Re-generated.
5634 * features/s390-tevx-linux64.c: Re-generated.
5635 * features/s390-vx-linux64.c: Re-generated.
5636 * features/s390x-linux64.c: Re-generated.
5637 * features/s390x-linux64v1.c: Re-generated.
5638 * features/s390x-linux64v2.c: Re-generated.
5639 * features/s390x-te-linux64.c: Re-generated.
5640 * features/s390x-tevx-linux64.c: Re-generated.
5641 * features/s390x-vx-linux64.c: Re-generated.
5642 * features/sparc/sparc32-solaris.c: Re-generated.
5643 * features/sparc/sparc64-solaris.c: Re-generated.
5644 * features/tic6x-c62x.c: Re-generated.
5645 * features/tic6x-c62x-linux.c: Re-generated.
5646 * features/tic6x-c64x.c: Re-generated.
5647 * features/tic6x-c64x-linux.c: Re-generated.
5648 * features/tic6x-c64xp.c: Re-generated.
5649 * features/tic6x-c64xp-linux.c: Re-generated.
5650
5651 2017-07-26 Yao Qi <yao.qi@linaro.org>
5652
5653 * i386-linux-tdep.c (i386_linux_read_description): New function.
5654 (i386_linux_core_read_description): Call
5655 i386_linux_read_description.
5656 * i386-linux-tdep.h (i386_linux_read_description): Declare.
5657 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
5658 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
5659 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
5660 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
5661 * x86-linux-nat.c (x86_linux_read_description): Call
5662 i386_linux_read_description.
5663
5664 2017-07-26 Yao Qi <yao.qi@linaro.org>
5665
5666 * NEWS: Mention it.
5667 * features/Makefile (%.c: %.xml): Pass the xml file name to
5668 command "maint print c-tdesc".
5669 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
5670 name from 'arg'.
5671
5672 2017-07-26 Yao Qi <yao.qi@linaro.org>
5673
5674 * target-descriptions.c (target_desc): Add ctor and dtor. Do
5675 in-class initialization.
5676 (tdesc_create_feature): Call new instead of XCNEW.
5677 (free_target_description): Ue delete.
5678
5679 2017-07-25 John Baldwin <jhb@FreeBSD.org>
5680
5681 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
5682
5683 2017-07-25 Yao Qi <yao.qi@linaro.org>
5684
5685 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
5686 constant.
5687 (amd64_x32_init_abi): Likewise.
5688 * amd64-tdep.h (amd64_init_abi): Update declaration.
5689 (amd64_x32_init_abi): Likewise.
5690
5691 2017-07-25 Yao Qi <yao.qi@linaro.org>
5692
5693 PR tdep/21717
5694 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
5695 condition for FPSCR.
5696 (arm_linux_store_inferior_registers): Likewise.
5697
5698 2017-07-22 Tom Tromey <tom@tromey.com>
5699
5700 * break-catch-syscall.c (struct catch_syscall_inferior_data)
5701 <syscalls_counts>: Now a std::vector.
5702 (get_catch_syscall_inferior_data): Use "new".
5703 (catch_syscall_inferior_data_cleanup): Use "delete".
5704 (insert_catch_syscall, remove_catch_syscall)
5705 (clear_syscall_counts): Update.
5706
5707 2017-07-22 Tom Tromey <tom@tromey.com>
5708
5709 * break-catch-syscall.c (syscall_catchpoint)
5710 <syscalls_to_be_caught>: Now a std::vector<int>
5711 (~syscall_catchpoint): Remove.
5712 (insert_catch_syscall, remove_catch_syscall)
5713 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
5714 (print_mention_catch_syscall, print_recreate_catch_syscall):
5715 Update.
5716 (create_syscall_event_catchpoint): Change type of "filter"
5717 parameter.
5718 (catch_syscall_split_args): Return a std::vector.
5719 (catch_syscall_command_1, catching_syscall_number_1): Update.
5720
5721 2017-07-22 Tom Tromey <tom@tromey.com>
5722
5723 * break-catch-throw.c (struct exception_catchpoint)
5724 <exception_rx>: Now a std::string.
5725 (~exception_catchpoint): Remove.
5726 (print_one_detail_exception_catchpoint): Update.
5727 (handle_gnu_v3_exceptions): Change type of except_rx.
5728 (extract_exception_regexp): Return a std::string.
5729 (catch_exception_command_1): Update.
5730
5731 2017-07-22 Tom Tromey <tom@tromey.com>
5732
5733 * break-catch-sig.c (gdb_signal_type): Remove typedef.
5734 (struct signal_catchpoint) <signals_to_be_caught>: Now a
5735 std::vector.
5736 <catch_all>: Now a bool.
5737 (~signal_catchpoint): Remove.
5738 (signal_catchpoint_insert_location)
5739 (signal_catchpoint_remove_location)
5740 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
5741 (signal_catchpoint_print_mention)
5742 (signal_catchpoint_print_recreate)
5743 (signal_catchpoint_explains_signal): Update.
5744 (create_signal_catchpoint): Change type of "filter" and
5745 "catch_all".
5746 (catch_signal_split_args): Return a std::vector. Change type of
5747 "catch_all".
5748 (catch_signal_command): Update.
5749
5750 2017-07-20 Pedro Alves <palves@redhat.com>
5751
5752 * ada-lang.c (ada_language_defn): Make extern.
5753 (_initialize_ada_language): Remove add_language call.
5754 * c-lang.c (c_language_defn, cplus_language_defn)
5755 (asm_language_defn, minimal_language_defn): Make extern.
5756 (_initialize_c_language): Delete.
5757 * completer.c (compare_cstrings): Delete, moved to utils.h.
5758 * d-lang.c (d_language_defn): Make extern.
5759 (_initialize_d_language): Remove add_language calls.
5760 * defs.h (enum language): Add comment.
5761 * f-lang.c (f_language_defn): Make extern.
5762 (_initialize_f_language): Remove add_language call.
5763 * go-lang.c (go_language_defn): Make extern.
5764 (_initialize_go_language): Remove add_language call.
5765 * language.c: Include <algorithm>.
5766 (languages): Redefine as const array.
5767 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
5768 (set_language_command): Handle "local". Use for-range loop.
5769 (set_language): Remove loop.
5770 (language_enum): Rewrite.
5771 (language_def, language_str): Remove loops.
5772 (add_language): Delete.
5773 (add_set_language_command): New, based on add_languages.
5774 (skip_language_trampoline): Adjust.
5775 (local_language_defn): Delete.
5776 (language_gdbarch_post_init): Adjust.
5777 (_initialize_language): Remove add_language calls. Call
5778 add_set_language_command.
5779 * language.h (add_language): Delete.
5780 (auto_language_defn)
5781 (unknown_language_defn, minimal_language_defn, ada_language_defn)
5782 (asm_language_defn, c_language_defn, cplus_language_defn)
5783 (d_language_defn, f_language_defn, go_language_defn)
5784 (m2_language_defn, objc_language_defn, opencl_language_defn)
5785 (pascal_language_defn, rust_language_defn): Declare.
5786 * m2-lang.c (m2_language_defn): Make extern.
5787 (_initialize_m2_language): Remove add_language call.
5788 * objc-lang.c (objc_language_defn): Make extern.
5789 (_initialize_objc_language): Remove add_language call.
5790 * opencl-lang.c (opencl_language_defn): Make extern.
5791 (_initialize_opencl_language): Remove add_language call.
5792 * p-lang.c (pascal_language_defn): Make extern.
5793 (_initialize_pascal_language): Delete.
5794 * rust-lang.c (rust_language_defn): Make extern.
5795 (_initialize_rust_language): Delete.
5796 * utils.h (compare_cstrings): New static inline function.
5797
5798 2017-07-20 Pedro Alves <palves@redhat.com>
5799
5800 * ada-lang.c (ada_to_fixed_type_1): Adjust.
5801 (get_var_value): Constify parameters.
5802 (get_int_var_value): Change prototype.
5803 (to_fixed_range_type): Adjust.
5804 * ada-lang.h (get_int_var_value): Change prototype.
5805
5806 2017-07-20 Pedro Alves <palves@redhat.com>
5807
5808 * dwarf2read.c (dw2_lookup_symbol): Use
5809 SYMBOL_MATCHES_SEARCH_NAME.
5810 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5811
5812 2017-07-20 Pedro Alves <palves@redhat.com>
5813
5814 * block.c (block_iter_name_step, block_iter_name_first)
5815 (block_iter_name_next): Delete.
5816 (block_lookup_symbol_primary): Adjust to use
5817 dict_iter_match_first/dict_iter_match_next.
5818 * block.h (block_iter_name_first, block_iter_name_next): Delete
5819 declarations.
5820 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5821 dict_iter_match_first/dict_iter_match_next.
5822
5823 2017-07-20 Pedro Alves <palves@redhat.com>
5824
5825 * cp-support.c (cp_find_first_component_aux): Add missing case for
5826 end of string.
5827
5828 2017-07-18 David Blaikie <dblaikie@gmail.com>
5829
5830 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5831 of dwo_cu's dwo_file.
5832
5833 2017-07-18 Yao Qi <yao.qi@linaro.org>
5834
5835 * remote.c (store_registers_using_G): Remove one line comment.
5836
5837 2017-07-18 Yao Qi <yao.qi@linaro.org>
5838
5839 * regcache.c (regcache_cpy): Simplify it.
5840 (regcache::cpy_no_passthrough): Remove it.
5841 * regcache.h (cpy_no_passthrough): Remove it.
5842 (regcache_dup, regcache_cpy): Update comments.
5843
5844 2017-07-18 Pedro Alves <palves@redhat.com>
5845
5846 * remote-sim.c (sim_command_completer): Adjust to work with a
5847 completion_tracker instead of a VEC.
5848
5849 2017-07-17 Pedro Alves <palves@redhat.com>
5850
5851 * completer.c (complete_source_filenames): New function.
5852 (complete_address_and_linespec_locations): New function.
5853 (location_completer): Use complete_address_and_linespec_locations.
5854 (completion_tracker::build_completion_result): Honor the tracker's
5855 request to suppress append.
5856 * completer.h (completion_tracker::suppress_append_ws)
5857 (completion_tracker::set_suppress_append_ws): New methods.
5858 (completion_tracker::m_suppress_append_ws): New field.
5859 (complete_source_filenames): New declaration.
5860 * linespec.c (linespec_complete_what): New.
5861 (struct ls_parser) <complete_what, completion_word,
5862 completion_quote_char, completion_quote_end, completion_tracker>:
5863 New fields.
5864 (string_find_incomplete_keyword_at_end): New.
5865 (linespec_lexer_lex_string): Record quote char. If in completion
5866 mode, don't throw.
5867 (linespec_lexer_consume_token): Advance the completion word point.
5868 (linespec_lexer_peek_token): Save/restore completion info.
5869 (save_stream_and_consume_token): New.
5870 (set_completion_after_number): New.
5871 (linespec_parse_basic): Set what to complete next depending on
5872 token. Handle function and label completions specially.
5873 (parse_linespec): Disable objc shortcut in completion mode. Set
5874 what to complete next depending on token type. Skip keyword if in
5875 completion mode.
5876 (complete_linespec_component, linespec_complete): New.
5877 * linespec.h (linespec_complete): Declare.
5878
5879 2017-07-17 Pedro Alves <palves@redhat.com>
5880
5881 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5882 Handle 'operator<' / 'operator<<'.
5883
5884 2017-07-17 Pedro Alves <palves@redhat.com>
5885
5886 * completer.c (collect_explicit_location_matches): Handle
5887 MATCH_LABEL.
5888 (convert_explicit_location_to_linespec): New, factored out from
5889 ...
5890 (convert_explicit_location_to_sals): ... this.
5891 (complete_label): New.
5892 (linespec_complete_label, find_label_symbols_in_block): New.
5893 (find_label_symbols): Add completion_mode parameter and adjust to
5894 call find_label_symbols_in_block.
5895 * linespec.h (linespec_complete_label): Declare.
5896
5897 2017-07-17 Pedro Alves <palves@redhat.com>
5898
5899 * ada-lang.c (ada_collect_symbol_completion_matches): Add
5900 complete_symbol_mode parameter.
5901 * cli/cli-cmds.c (complete_command): Get the completion result out
5902 of the handle_brkchars tracker if used a custom word point.
5903 * completer.c: Include "linespec.h".
5904 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5905 (advance_to_expression_complete_word_point): New.
5906 (completion_tracker::completes_to_completion_word): New.
5907 (complete_files_symbols): Pass down
5908 complete_symbol_mode::EXPRESSION.
5909 (explicit_options, probe_options): New.
5910 (collect_explicit_location_matches): Complete on the
5911 explictit_loc->foo instead of word. Use
5912 linespec_complete_function. Handle MATCH_LINE. Handle offering
5913 keyword and options completions.
5914 (backup_text_ptr): Delete.
5915 (skip_keyword): New.
5916 (complete_explicit_location): Remove 'word' parameter. Add
5917 language, quoted_arg_start and quoted_arg_end parameters.
5918 Rewrite, parsing left to right.
5919 (location_completer): Rewrite.
5920 (location_completer_handle_brkchars): New function.
5921 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5922 (enum complete_line_internal_reason): Adjust comments.
5923 (completion_tracker::discard_completions): New.
5924 (completer_handle_brkchars_func_for_completer): Handle
5925 location_completer.
5926 (gdb_custom_word_point_brkchars)
5927 (gdb_org_rl_basic_quote_characters): New.
5928 (gdb_completion_word_break_characters_throw)
5929 (completion_find_completion_word): Handle trackers that use a
5930 custom word point.
5931 (completion_tracker::advance_custom_word_point_by): New.
5932 (completion_tracker::build_completion_result): Don't rely on
5933 readline appending the quote char.
5934 (gdb_rl_attempted_completion_function_throw): Handle trackers that
5935 use a custom word point.
5936 (gdb_rl_attempted_completion_function): Restore
5937 rl_basic_quote_characters.
5938 * completer.h (class completion_tracker): Extend intro comment.
5939 (completion_tracker::set_quote_char)
5940 (completion_tracker::quote_char)
5941 (completion_tracker::set_use_custom_word_point)
5942 (completion_tracker::use_custom_word_point)
5943 (completion_tracker::custom_word_point)
5944 (completion_tracker::set_custom_word_point)
5945 (completion_tracker::advance_custom_word_point_by)
5946 (completion_tracker::completes_to_completion_word)
5947 (completion_tracker::discard_completions): New methods.
5948 (completion_tracker::m_quote_char)
5949 (completion_tracker::m_use_custom_word_point)
5950 (completion_tracker::m_custom_word_point): New fields.
5951 (advance_to_expression_complete_word_point): Declare.
5952 * f-lang.c (f_collect_symbol_completion_matches): Add
5953 complete_symbol_mode parameter.
5954 * language.h (struct language_defn)
5955 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5956 parameter.
5957 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
5958 (linespec_complete_function): New function.
5959 (linespec_lexer_lex_keyword): Adjust.
5960 * linespec.h (linespec_keywords, linespec_complete_function): New
5961 declarations.
5962 * location.c (find_end_quote): New function.
5963 (explicit_location_lex_one): Add explicit_completion_info
5964 parameter. Save quoting info. Don't throw if being called for
5965 completion. Don't handle Ada operators here.
5966 (is_cp_operator, skip_op_false_positives, first_of)
5967 (explicit_location_lex_one_function): New function.
5968 (string_to_explicit_location): Replace 'dont_throw' parameter with
5969 an explicit_completion_info pointer parameter. Handle it. Don't
5970 use explicit_location_lex_one to lex function names. Use
5971 explicit_location_lex_one_function instead.
5972 * location.h (struct explicit_completion_info): New.
5973 (string_to_explicit_location): Replace 'dont_throw' parameter with
5974 an explicit_completion_info pointer parameter.
5975 * symtab.c (default_collect_symbol_completion_matches_break_on):
5976 Add complete_symbol_mode parameter. Handle LINESPEC mode.
5977 (default_collect_symbol_completion_matches)
5978 (collect_symbol_completion_matches): Add complete_symbol_mode
5979 parameter.
5980 (collect_symbol_completion_matches_type): Pass down
5981 complete_symbol_mode::EXPRESSION.
5982 (collect_file_symbol_completion_matches): Add complete_symbol_mode
5983 parameter. Handle LINESPEC mode.
5984 * symtab.h (complete_symbol_mode): New.
5985 (default_collect_symbol_completion_matches_break_on)
5986 (default_collect_symbol_completion_matches)
5987 (collect_symbol_completion_matches)
5988 (collect_file_symbol_completion_matches): Add complete_symbol_mode
5989 parameter.
5990
5991 2017-07-17 Pedro Alves <palves@redhat.com>
5992
5993 * utils.c (enum class strncmp_iw_mode): New.
5994 (strcmp_iw): Rename to ...
5995 (strncmp_iw_with_mode): ... this. Add string2_len and mode
5996 parameters. Handle them.
5997 (strncmp_iw): New.
5998 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5999 * utils.h (strncmp_iw): Declare.
6000 (strcmp_iw): Move describing comments here.
6001
6002 2017-07-17 Pedro Alves <palves@redhat.com>
6003
6004 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6005 CP_OPERATOR_STR.
6006 * c-typeprint.c (is_type_conversion_operator): Use
6007 CP_OPERATOR_STR.
6008 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6009 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6010 CP_OPERATOR_LEN.
6011 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6012 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6013 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6014 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6015 CP_OPERATOR_STR.
6016 * location.c: Include "cp-support.h".
6017 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6018 CP_OPERATOR_STR.
6019 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6020 CP_OPERATOR_LEN.
6021
6022 2017-07-17 Pedro Alves <palves@redhat.com>
6023
6024 * cli/cli-cmds.c (complete_command): Use a completion tracker
6025 along with completion_find_completion_word for handle_brkchars
6026 phase.
6027 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6028 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6029 (struct gdb_rl_completion_word_info): New.
6030 (gdb_rl_find_completion_word): New.
6031 (completion_find_completion_word): New.
6032 * completer.h (completion_find_completion_word): Declare.
6033
6034 2017-07-17 Pedro Alves <palves@redhat.com>
6035
6036 * ada-lang.c (symbol_completion_match): Adjust comments.
6037 (symbol_completion_add): Replace vector parameter with
6038 completion_tracker parameter. Use it.
6039 (ada_make_symbol_completion_list): Rename to...
6040 (ada_collect_symbol_completion_matches): ... this. Add
6041 completion_tracker parameter and use it.
6042 (ada_language_defn): Adjust.
6043 * break-catch-syscall.c (catch_syscall_completer): Adjust
6044 prototype and work with completion_tracker instead of VEC.
6045 * breakpoint.c (condition_completer): Adjust prototype and work
6046 with completion_tracker instead of VEC.
6047 * c-lang.c (c_language_defn, cplus_language_defn)
6048 (asm_language_defn, minimal_language_defn): Adjust to renames.
6049 * cli/cli-cmds.c (complete_command): Rework using
6050 completion_tracker. Catch exceptions when completing.
6051 * cli/cli-decode.c (integer_unlimited_completer)
6052 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6053 with completion_tracker instead of VEC.
6054 * command.h (struct completion_tracker): Forward declare.
6055 (completer_ftype, completer_handle_brkchars_ftype): Change
6056 types.
6057 (complete_on_cmdlist, complete_on_enum): Adjust.
6058 * completer.c: Include <algorithm>.
6059 (struct gdb_completer_state): New.
6060 (current_completion): New global.
6061 (readline_line_completion_function): Delete.
6062 (noop_completer, filename_completer)
6063 (filename_completer_handle_brkchars, complete_files_symbols)
6064 (linespec_location_completer): Adjust to work with a
6065 completion_tracker instead of a VEC.
6066 (string_or_empty): New.
6067 (collect_explicit_location_matches): Adjust to work with a
6068 completion_tracker instead of a VEC.
6069 (explicit_location_completer): Rename to ...
6070 (complete_explicit_location): ... this and adjust to work with a
6071 completion_tracker instead of a VEC.
6072 (location_completer): Adjust to work with a completion_tracker
6073 instead of a VEC.
6074 (add_struct_fields): Adjust to work with a completion_list instead
6075 of VEC.
6076 (expression_completer): Rename to ...
6077 (complete_expression): ... this and adjust to work with a
6078 completion_tracker instead of a VEC. Use complete_files_symbols.
6079 (expression_completer): Reimplement on top of complete_expression.
6080 (symbol_completer): Adjust to work with a completion_tracker
6081 instead of a VEC.
6082 (enum complete_line_internal_reason): Add describing comments.
6083 (complete_line_internal_normal_command): Adjust to work with a
6084 completion_tracker instead of a VEC.
6085 (complete_line_internal): Rename to ...
6086 (complete_line_internal_1): ... this and adjust to work with a
6087 completion_tracker instead of a VEC. Assert TEXT is NULL in the
6088 handle_brkchars phase.
6089 (new_completion_tracker): Delete.
6090 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6091 complete_line_internal_1.
6092 (free_completion_tracker): Delete.
6093 (INITIAL_COMPLETION_HTAB_SIZE): New.
6094 (completion_tracker::completion_tracker)
6095 (completion_tracker::~completion_tracker): New.
6096 (maybe_add_completion): Delete.
6097 (completion_tracker::maybe_add_completion)
6098 (completion_tracker::add_completion)
6099 (completion_tracker::add_completions): New.
6100 (throw_max_completions_reached_error): Delete.
6101 (complete_line): Adjust to work with a completion_tracker instead
6102 of a VEC. Don't create a completion_tracker_t or check for max
6103 completions here.
6104 (command_completer, command_completer_handle_brkchars)
6105 (signal_completer, reg_or_group_completer_1)
6106 (reg_or_group_completer, default_completer_handle_brkchars):
6107 Adjust to work with a completion_tracker.
6108 (gdb_completion_word_break_characters_throw): New.
6109 (gdb_completion_word_break_characters): Reimplement.
6110 (line_completion_function): Delete.
6111 (completion_tracker::recompute_lowest_common_denominator)
6112 (expand_preserving_ws)
6113 (completion_tracker::build_completion_result)
6114 (completion_result::completion_result)
6115 (completion_result::completion_result)
6116 (completion_result::~completion_result)
6117 (completion_result::completion_result)
6118 (completion_result::release_match_list, compare_cstrings)
6119 (completion_result::sort_match_list)
6120 (completion_result::reset_match_list)
6121 (gdb_rl_attempted_completion_function_throw)
6122 (gdb_rl_attempted_completion_function): New.
6123 * completer.h (completion_list, struct completion_result)
6124 (class completion_tracker): New.
6125 (complete_line): Add completion_tracker parameter.
6126 (readline_line_completion_function): Delete.
6127 (gdb_rl_attempted_completion_function): New.
6128 (noop_completer, filename_completer, expression_completer)
6129 (location_completer, symbol_completer, command_completer)
6130 (signal_completer, reg_or_group_completer): Update prototypes.
6131 (completion_tracker_t, new_completion_tracker)
6132 (make_cleanup_free_completion_tracker): Delete.
6133 (enum maybe_add_completion_enum): Delete.
6134 (maybe_add_completion): Delete.
6135 (throw_max_completions_reached_error): Delete.
6136 * corefile.c (complete_set_gnutarget): Adjust to work with a
6137 completion_tracker instead of a VEC.
6138 * cp-abi.c (cp_abi_completer): Adjust to work with a
6139 completion_tracker instead of a VEC.
6140 * d-lang.c (d_language_defn): Adjust.
6141 * disasm.c (disassembler_options_completer): Adjust to work with a
6142 completion_tracker instead of a VEC.
6143 * f-lang.c (f_make_symbol_completion_list): Rename to ...
6144 (f_collect_symbol_completion_matches): ... this. Adjust to work
6145 with a completion_tracker instead of a VEC.
6146 (f_language_defn): Adjust.
6147 * go-lang.c (go_language_defn): Adjust.
6148 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6149 Adjust to work with a completion_tracker instead of a VEC.
6150 * infrun.c (handle_completer): Likewise.
6151 * interps.c (interpreter_completer): Likewise.
6152 * interps.h (interpreter_completer): Likewise.
6153 * language.c (unknown_language_defn, auto_language_defn)
6154 (local_language_defn): Adjust.
6155 * language.h (language_defn::la_make_symbol_completion_list):
6156 Rename to ...
6157 (language_defn::la_collect_symbol_completion_matches): ... this
6158 and adjust to work with a completion_tracker instead of a VEC.
6159 * m2-lang.c (m2_language_defn): Adjust.
6160 * objc-lang.c (objc_language_defn): Adjust.
6161 * opencl-lang.c (opencl_language_defn): Adjust.
6162 * p-lang.c (pascal_language_defn): Adjust.
6163 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6164 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6165 with a completion_tracker.
6166 * rust-lang.c (rust_language_defn): Adjust.
6167 * symtab.c (free_completion_list, do_free_completion_list)
6168 (return_val, completion_tracker): Delete.
6169 (completion_list_add_name, completion_list_add_symbol)
6170 (completion_list_add_msymbol, completion_list_objc_symbol)
6171 (completion_list_add_fields, add_symtab_completions): Add
6172 completion_tracker parameter and use it.
6173 (default_make_symbol_completion_list_break_on_1): Rename to...
6174 (default_collect_symbol_completion_matches_break_on): ... this.
6175 Add completion_tracker parameter and use it instead of allocating
6176 a completion tracker here.
6177 (default_make_symbol_completion_list_break_on): Delete old
6178 implementation.
6179 (default_make_symbol_completion_list): Delete.
6180 (default_collect_symbol_completion_matches): New.
6181 (make_symbol_completion_list): Delete.
6182 (collect_symbol_completion_matches): New.
6183 (make_symbol_completion_type): Rename to ...
6184 (collect_symbol_completion_matches_type): ... this. Add
6185 completion_tracker parameter and use it instead of VEC.
6186 (make_file_symbol_completion_list_1): Rename to...
6187 (collect_file_symbol_completion_matches): ... this. Add
6188 completion_tracker parameter and use it instead of VEC.
6189 (make_file_symbol_completion_list): Delete.
6190 (add_filename_to_list): Use completion_list instead of a VEC.
6191 (add_partial_filename_data::list): Now a completion_list.
6192 (make_source_files_completion_list): Work with a completion_list
6193 instead of a VEC.
6194 * symtab.h: Include "completer.h".
6195 (default_make_symbol_completion_list_break_on)
6196 (default_make_symbol_completion_list, make_symbol_completion_list)
6197 (make_symbol_completion_type, make_file_symbol_completion_list)
6198 (make_source_files_completion_list): Delete.
6199 (default_collect_symbol_completion_matches_break_on)
6200 (default_collect_symbol_completion_matches)
6201 (collect_symbol_completion_matches)
6202 (collect_symbol_completion_matches_type)
6203 (collect_file_symbol_completion_matches)
6204 (make_source_files_completion_list): New.
6205 * top.c (init_main): Don't install a rl_completion_entry_function
6206 hook. Install a rl_attempted_completion_function hook instead.
6207 * tui/tui-layout.c (layout_completer): Adjust to work with a
6208 completion_tracker.
6209 * tui/tui-regs.c (tui_reggroup_completer):
6210 * tui/tui-win.c (window_name_completer, focus_completer)
6211 (winheight_completer): Adjust to work with a completion_tracker.
6212 * value.c: Include "completer.h".
6213 (complete_internalvar): Adjust to work with a completion_tracker.
6214 * value.h (complete_internalvar): Likewise.
6215
6216 2017-07-17 Pedro Alves <palves@redhat.com>
6217
6218 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
6219 renames.
6220 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
6221 comments to completer_ftype's declaration.
6222 <completer_handle_brkchars>: Change type to
6223 completer_handle_brkchars_ftype.
6224 * command.h (completer_ftype): Add describing comment and give
6225 names to parameters.
6226 (completer_ftype_void): Rename to ...
6227 (completer_handle_brkchars_ftype) ... this. Add describing comment.
6228 (set_cmd_completer_handle_brkchars): Adjust.
6229 * completer.c (filename_completer_handle_brkchars): New function.
6230 (complete_line_internal_normal_command): New function, factored
6231 out from ...
6232 (complete_line_internal): ... here.
6233 (command_completer_handle_brkchars)
6234 (default_completer_handle_brkchars)
6235 (completer_handle_brkchars_func_for_completer): New functions.
6236 * completer.h (set_gdb_completion_word_break_characters): Delete
6237 declaration.
6238 (completer_handle_brkchars_func_for_completer): New declaration.
6239 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6240 completer_handle_brkchars_func_for_completer.
6241
6242 2017-07-17 Pedro Alves <palves@redhat.com>
6243
6244 * completer.c (symbol_completer): New function, based on
6245 make_symbol_completion_list_fn.
6246 * completer.h (symbol_completer): New declaration.
6247 * guile/scm-cmd.c (cmdscm_completers): Adjust.
6248 * python/py-cmd.c (completers): Adjust.
6249 * symtab.c (make_symbol_completion_list_fn): Delete.
6250 * symtab.h (make_symbol_completion_list_fn): Delete.
6251 * cli/cli-decode.c (add_cmd): Adjust.
6252
6253 2017-07-17 Pedro Alves <palves@redhat.com>
6254
6255 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
6256 * dwarf2read.c: Include "filename-seen-cache.h".
6257 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
6258 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
6259 * filename-seen-cache.c: New file.
6260 * filename-seen-cache.h: New file.
6261 * symtab.c: Include "filename-seen-cache.h".
6262 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
6263 (create_filename_seen_cache, clear_filename_seen_cache)
6264 (delete_filename_seen_cache, filename_seen): Delete, parts moved
6265 to filename-seen-cache.h/filename-seen-cache.c.
6266 (output_source_filename, sources_info)
6267 (maybe_add_partial_symtab_filename)
6268 (make_source_files_completion_list): Adjust to use
6269 filename_seen_cache.
6270
6271 2017-07-17 Pedro Alves <palves@redhat.com>
6272
6273 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
6274 fields.
6275 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
6276 dwarf2_debug_sections*)): New.
6277 (dwarf2_per_objfile::dwarf2_per_objfile(const
6278 dwarf2_per_objfile&)): Declare as deleted.
6279 (dwarf2_per_objfile::operator=): Declare as deleted.
6280 (dwarf2_per_objfile::dwarf2_per_objfile)
6281 (dwarf2_per_objfile::~dwarf2_per_objfile)
6282 (dwarf2_per_objfile::free_cached_comp_units): New.
6283 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
6284 ctor. Call dwarf2_per_objfile's ctor manually.
6285 (dwarf2_locate_sections): Deleted/refactored as ...
6286 (dwarf2_per_objfile::locate_sections): ... this new method.
6287 (free_cached_comp_units): Defer to
6288 dwarf2_per_objfile::free_cached_comp_units.
6289 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
6290
6291 2017-07-14 Tom Tromey <tom@tromey.com>
6292
6293 PR rust/21764:
6294 * rust-exp.y (convert_ast_to_expression): Add "want_type"
6295 parameter.
6296 <UNOP_SIZEOF>: Split into separate case.
6297 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
6298
6299 2017-07-14 Tom Tromey <tom@tromey.com>
6300
6301 PR rust/21763:
6302 * symtab.c (symbol_matches_domain): Add language_rust to special
6303 case.
6304 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
6305 treat LOC_TYPEDEF symbols as variables.
6306
6307 2017-07-14 Pedro Alves <palves@redhat.com>
6308
6309 * symtab.c (make_file_symbol_completion_list_1): Iterate over
6310 symtabs matching all symtabs with SRCFILE as file name instead of
6311 only considering the first hit, with lookup_symtab.
6312
6313 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6314
6315 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
6316 operator_name parameters.
6317 (gen_expr): Update function call.
6318
6319 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6320
6321 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
6322 parameter.
6323 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
6324 Likewise.
6325 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
6326 parameter, use agent_expr::gdbarch instead, update function
6327 calls.
6328 (locexpr_tracepoint_var_ref): Likewise.
6329 (loclist_tracepoint_var_ref): Likewise.
6330 * ax-gdb.c (gen_trace_static_fields): Likewise.
6331 (gen_traced_pop): Likewise.
6332 (gen_frame_args_address): Likewise.
6333 (gen_frame_locals_address): Likewise.
6334 (gen_var_ref): Likewise.
6335 (gen_struct_ref_recursive): Likewise.
6336 (gen_static_field): Likewise.
6337 (gen_maybe_namespace_elt): Likewise.
6338 (gen_expr): Likewise.
6339 (gen_trace_for_var): Likewise.
6340 (gen_trace_for_expr): Likewise.
6341 (gen_trace_for_return_address): Likewise.
6342
6343 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6344
6345 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
6346 parameter.
6347 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
6348
6349 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6350
6351 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
6352 from ax, update calls.
6353 (gen_usual_arithmetic): Likewise.
6354 (gen_integral_promotions): Likewise.
6355 (gen_bitfield_ref): Likewise.
6356 (gen_primitive_field): Likewise.
6357 (gen_struct_ref_recursive): Likewise.
6358 (gen_struct_ref): Likewise.
6359 (gen_maybe_namespace_elt): Likewise.
6360 (gen_struct_elt_for_reference): Likewise.
6361 (gen_namespace_elt): Likewise.
6362 (gen_aggregate_elt_ref): Likewise.
6363 (gen_expr): Get gdbarch from ax, update calls.
6364 (gen_expr_binop_rest): Likewise.
6365
6366 2017-07-13 Pedro Alves <palves@redhat.com>
6367
6368 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
6369 as default tdesc.
6370 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
6371 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
6372 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
6373 tdesc_amd64_linux as default tdesc. Get final tdesc from the
6374 tdep.
6375 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
6376 Get final tdesc from the tdep.
6377 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
6378 default tdesc.
6379 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6380 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6381 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
6382 Use it as default tdesc.
6383 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
6384 down to amd_init_abi. No longer handle fallback tdesc here.
6385 * amd64-tdep.h (tdesc_x32): Declare.
6386 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
6387 parameter.
6388 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
6389 as default tdesc.
6390
6391 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6392
6393 * s390-linux-tdep.c (s390_process_record): Add support for
6394 instructions new in arch12.
6395
6396 2017-07-11 John Baldwin <jhb@FreeBSD.org>
6397
6398 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
6399 PT_GETFSBASE and PT_GETGSBASE.
6400 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
6401 PT_SETGSBASE.
6402
6403 2017-07-11 John Baldwin <jhb@FreeBSD.org>
6404
6405 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
6406 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
6407 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
6408 those rules.
6409 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
6410 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
6411 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
6412 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
6413 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
6414 * features/i386/amd64.xml: Add 64bit-segments.xml.
6415 * features/i386/amd64-avx-avx512.c: Regenerated.
6416 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
6417 * features/i386/amd64-avx-mpx.c: Regenerated.
6418 * features/i386/amd64-avx.c: Regenerated.
6419 * features/i386/amd64-mpx.c: Regenerated.
6420 * features/i386/amd64.c: Regenerated.
6421 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
6422 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6423 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
6424 * regformats/i386/amd64-avx.dat: Regenerated.
6425 * regformats/i386/amd64-mpx.dat: Regenerated.
6426 * regformats/i386/amd64.dat: Regenerated.
6427
6428 2017-07-10 Yao Qi <yao.qi@linaro.org>
6429
6430 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6431 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6432
6433 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
6434
6435 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
6436 unsetenv.
6437 * gnulib/aclocal.m4: Regenerate.
6438 * gnulib/config.in: Regenerate.
6439 * gnulib/configure: Regenerate.
6440 * gnulib/import/Makefile.am: Regenerate.
6441 * gnulib/import/Makefile.in: Regenerate.
6442 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6443 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6444 * gnulib/import/m4/environ.m4: New file.
6445 * gnulib/import/m4/setenv.m4: New file.
6446 * gnulib/import/setenv.c: New file.
6447 * gnulib/import/unsetenv.c: New file.
6448
6449 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
6450
6451 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
6452 address when op is DW_OP_addr.
6453
6454 2017-07-09 Tom Tromey <tom@tromey.com>
6455
6456 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
6457 check and apply to outer type.
6458
6459 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6460
6461 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
6462 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
6463 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
6464 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
6465
6466 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6467
6468 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
6469
6470 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6471
6472 * corelow.c (get_core_siginfo): Remove.
6473 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
6474 instead of get_core_siginfo.
6475 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
6476 * gdbarch.h: Re-generate.
6477 * gdbarch.c: Re-generate.
6478 * linux-tdep.c (linux_core_xfer_siginfo): New.
6479 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
6480
6481 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6482
6483 * corelow.c (thread_section_name): Move to ...
6484 * gdbcore.h (thread_section_name): ... here.
6485
6486 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6487
6488 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
6489 (struct siginfo32): New.
6490 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
6491 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
6492 via ptrace(PT_LWPINFO).
6493
6494 2017-07-07 John Baldwin <jhb@FreeBSD.org>
6495
6496 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
6497 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
6498 (fbsd_get_siginfo_type): New.
6499 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
6500 (_initialize_fbsd_tdep): New.
6501
6502 2017-07-06 David Blaikie <dblaikie@gmail.com>
6503
6504 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
6505 a singular dwo_unit*) to support multiple CUs in the same way that
6506 multiple TUs are supported.
6507 (create_cus_hash_table): Replace create_dwo_cu with a function for
6508 parsing multiple CUs from a DWO file.
6509 (open_and_init_dwo_file): Use create_cus_hash_table rather than
6510 create_dwo_cu.
6511 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
6512 htab_find, rather than comparing the signature to a singleton CU in
6513 the dwo_file.
6514
6515 2017-07-06 Pedro Alves <palves@redhat.com>
6516
6517 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
6518
6519 2017-07-04 Pedro Alves <palves@redhat.com>
6520
6521 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
6522 * gdbtypes.h (TYPE_STATIC): Delete.
6523 (struct fn_field) <is_public, is_abstract, is_static, is_final,
6524 is_synchronized, is_native>: Delete.
6525 <dummy>: Bump.
6526 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
6527 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
6528 (TYPE_FN_FIELD_ABSTRACT): Delete.
6529
6530 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
6531
6532 * buffer.h (buffer_finish): Fix spelling mistakes.
6533
6534 2017-07-01 Eli Zaretskii <eliz@gnu.org>
6535
6536 * .dir-locals.el: Automatically switch to C-style comments in
6537 versions of Emacs that support the feature.
6538
6539 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
6540 Pedro Alves <palves@redhat.com>
6541
6542 PR cli/21688
6543 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
6544 (process_next_line): New variable 'inline_cmd'.
6545 Adjust 'if' clauses for "python", "compile" and "guile" to use
6546 'command_name_equals' and check for '!inline_cmd'.
6547
6548 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
6549
6550 PR cli/21688
6551 * cli/cli-script.c (command_name_equals_not_inline): New function.
6552 (process_next_line): Adjust 'if' clauses for "python", "compile"
6553 and "guile" to use command_name_equals_not_inline.
6554
6555 2017-06-29 Pedro Alves <palves@redhat.com>
6556
6557 * completer.c (expression_completer): Call
6558 linespec_location_completer instead of location_completer.
6559
6560 2017-06-29 Pedro Alves <palves@redhat.com>
6561
6562 * completer.c (expression_completer): Remove code that recomputes
6563 'text' from 'word'.
6564
6565 2017-06-29 Yao Qi <yao.qi@linaro.org>
6566
6567 * regformats/regdat.sh: Generate code with
6568 "ifndef IN_PROCESS_AGENT".
6569
6570 2017-06-28 Pedro Alves <palves@redhat.com>
6571
6572 * command.h: Include "common/scoped_restore.h".
6573
6574 2017-06-28 Yao Qi <yao.qi@linaro.org>
6575
6576 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
6577 instead of obstack_grow.
6578
6579 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
6580
6581 PR gdb/21337
6582 * symfile.c (reread_symbols): Call objfiles_changed just before
6583 read_symbols.
6584
6585 2017-06-27 Pedro Alves <palves@redhat.com>
6586
6587 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
6588 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
6589 (completion_list_add_symbol, completion_list_add_msymbol):
6590 ... these new functions.
6591 (add_symtab_completions)
6592 (default_make_symbol_completion_list_break_on_1): Adjust.
6593
6594 2017-06-27 Pedro Alves <palves@redhat.com>
6595
6596 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
6597 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
6598 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
6599 dtor.
6600 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
6601 'storage_obstack' field an auto_obstack. In-class initialize all
6602 non-bitfield fields. Make minsyms_read bool.
6603 * symfile.c (read_symbols): Adjust.
6604
6605 2017-06-27 Alan Hayward <alan.hayward@arm.com>
6606
6607 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
6608 (gdbsim_store_register): Likewise.
6609
6610 2017-06-27 Pedro Alves <palves@redhat.com>
6611
6612 * c-exp.y (name_obstack): Now an auto_obstack.
6613 (yylex): Use auto_obstack::clear.
6614 (c_parse): Use auto_obstack::clear instead of reinitializing and
6615 freeing the obstack.
6616 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
6617 * d-exp.y (name_obstack): Now an auto_obstack.
6618 (yylex): Use auto_obstack::clear.
6619 (d_parse): Use auto_obstack::clear instead of reinitializing and
6620 freeing the obstack.
6621 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
6622 auto_obstack.
6623 * dwarf2read.c (create_addrmap_from_index)
6624 (dwarf2_build_psymtabs_hard)
6625 (update_enumeration_type_from_children): Likewise.
6626 * gdb_obstack.h (auto_obstack): New type.
6627 * go-exp.y (name_obstack): Now an auto_obstack.
6628 (build_packaged_name): Use auto_obstack::clear.
6629 (go_parse): Use auto_obstack::clear instead of reinitializing and
6630 freeing the obstack.
6631 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
6632 auto_obstack.
6633 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
6634 * rust-exp.y (work_obstack): Now an auto_obstack.
6635 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
6636 reinitializing and freeing the obstack.
6637 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
6638 (host_char_to_target): Use auto_obstack.
6639 * utils.h (make_cleanup_obstack_free): Delete declaration.
6640 * valprint.c (generic_emit_char, generic_printstr): Use
6641 auto_obstack.
6642
6643 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
6644
6645 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
6646 thread.
6647 (darwin_init_thread_list): Don't update dummy thread.
6648 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
6649
6650 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
6651
6652 * record-full.c (netorder16): Remove.
6653
6654 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
6655
6656 * common/diagnostics.h: Define macros for GCC.
6657 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
6658 * common/vec.h: Include diagnostics.h.
6659 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
6660 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
6661 warning.
6662
6663 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
6664
6665 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
6666 New macro.
6667 * ada-lex.l: Ignore deprecated register warnings.
6668
6669 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
6670
6671 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
6672 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
6673
6674 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
6675
6676 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
6677 its own line.
6678
6679 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
6680
6681 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
6682
6683 2017-06-23 Alan Hayward <alan.hayward@arm.com>
6684
6685 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
6686 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
6687 (xtensa_register_read_masked): Likewise.
6688
6689 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
6690
6691 * common/environ.c (gdb_environ::unset): Update comment.
6692
6693 2017-06-22 Alan Hayward <alan.hayward@arm.com>
6694
6695 * python/py-unwind.c (pyuw_sniffer): Allocate space for
6696 registers.
6697
6698 2017-06-22 Alan Hayward <alan.hayward@arm.com>
6699
6700 * record-full.c (record_full_exec_insn): Use byte_vector.
6701
6702 2017-06-22 Yao Qi <yao.qi@linaro.org>
6703
6704 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
6705 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6706
6707 2017-06-22 Alan Hayward <alan.hayward@arm.com>
6708
6709 * remote.c (cached_reg): Move from here...
6710 * regcache.h (cached_reg): ...to here.
6711 * python/py-unwind.c (struct reg_info): Remove.
6712 (cached_frame_info): Use cached_reg_t.
6713 (pyuw_prev_register): Likewise.
6714 (pyuw_sniffer): Use cached_reg_t and allocate registers.
6715 (pyuw_dealloc_cache): Free all registers.
6716
6717 2017-06-22 Pedro Alves <palves@redhat.com>
6718 Simon Marchi <simon.marchi@ericsson.com>
6719
6720 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
6721 warning.
6722 * common/diagnostics.h: New file.
6723
6724 2017-06-22 Pedro Alves <palves@redhat.com>
6725
6726 * common/agent.h: Add include guards.
6727
6728 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
6729
6730 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
6731 talk about addressable units instead of bytes.
6732
6733 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6734
6735 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
6736 of '::const_iterator'.
6737
6738 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6739
6740 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6741 'unittests/environ-selftests.c'.
6742 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
6743 * charset.c (find_charset_names): Declare object 'iconv_env'.
6744 Update code to use 'iconv_env' object. Remove call to
6745 'free_environ'.
6746 * common/environ.c: Include <utility>.
6747 (make_environ): Delete function.
6748 (free_environ): Delete function.
6749 (gdb_environ::clear): New function.
6750 (gdb_environ::operator=): New function.
6751 (gdb_environ::get): Likewise.
6752 (environ_vector): Delete function.
6753 (set_in_environ): Delete function.
6754 (gdb_environ::set): New function.
6755 (unset_in_environ): Delete function.
6756 (gdb_environ::unset): New function.
6757 (gdb_environ::envp): Likewise.
6758 * common/environ.h: Include <vector>.
6759 (struct gdb_environ): Delete; transform into...
6760 (class gdb_environ): ... this class.
6761 (free_environ): Delete prototype.
6762 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
6763 environ_vector): Likewise.
6764 * infcmd.c (run_command_1): Update code to call
6765 'envp' from 'gdb_environ' class.
6766 (environment_info): Update code to call methods from 'gdb_environ'
6767 class.
6768 (unset_environment_command): Likewise.
6769 (path_info): Likewise.
6770 (path_command): Likewise.
6771 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
6772 (inferior::inferior): Initialize 'environment' using the host's
6773 information.
6774 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
6775 Include "environ.h".
6776 (class inferior) <environment>: Change type from 'struct
6777 gdb_environ' to 'gdb_environ'.
6778 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6779 methods from 'gdb_environ' class.
6780 * solib.c (solib_find_1): Likewise
6781 * unittests/environ-selftests.c: New file.
6782
6783 2017-06-20 Yao Qi <yao.qi@linaro.org>
6784
6785 * features/i386/i386-linux.xml: Exchange the order of including
6786 32bit-linux.xml and 32bit-sse.xml.
6787 * features/i386/i386-linux.c: Regenerated.
6788
6789 2017-06-20 Yao Qi <yao.qi@linaro.org>
6790
6791 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6792 Delete copy ctor and assignment operator.
6793 (tdesc_type): Likewise.
6794 (tdesc_feature): Likewise.
6795 (tdesc_free_reg): Remove.
6796 (tdesc_create_reg): Use new.
6797 (tdesc_free_type): Remove.
6798 (tdesc_create_vector): Use new.
6799 (tdesc_create_union): Likewise.
6800 (tdesc_create_flags): Likewise.
6801 (tdesc_create_enum): Likewise.
6802 (tdesc_free_feature): Delete.
6803 (free_target_description): Use delete.
6804
6805 2017-06-19 John Baldwin <jhb@FreeBSD.org>
6806
6807 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6808 registers.
6809
6810 2017-06-19 Pedro Alves <palves@redhat.com>
6811
6812 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6813 after gdb::unlinker.
6814
6815 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
6816
6817 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6818 gdb_environ to access an environment variable.
6819
6820 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
6821
6822 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6823 gdb_byte*.
6824
6825 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6826
6827 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6828
6829 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6830
6831 * configure: Re-generate.
6832 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6833
6834 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6835
6836 * configure: Re-generate.
6837 * warning.m4: Pass -Werror to compiler when checking for
6838 supported warning flags.
6839
6840 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6841
6842 * Makefile.in (COMPILE.pre): Add "-x c++".
6843
6844 2017-06-16 Alan Hayward <alan.hayward@arm.com>
6845 Pedro Alves <palves@redhat.com>
6846 Yao Qi <yao.qi@linaro.org>
6847
6848 * defs.h (RequireLongest): New.
6849 (extract_integer): Declare function template.
6850 (extract_signed_integer): Remove the declaration, but define it
6851 static inline.
6852 (extract_unsigned_integer): Likewise.
6853 (store_integer): Declare function template.
6854 (store_signed_integer): Remove the declaration, but define it
6855 static inline.
6856 (store_unsigned_integer): Likewise.
6857 * findvar.c (extract_integer): New function template.
6858 (extract_signed_integer): Remove.
6859 (extract_unsigned_integer): Remove.
6860 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6861 instantiations.
6862 (store_integer): New function template.
6863 (store_signed_integer): Remove.
6864 (store_unsigned_integer): Remove.
6865 (store_integer): Explicit instantiations.
6866 * regcache.c (regcache_raw_read_signed): Update.
6867 (regcache::raw_read): New function.
6868 (regcache::raw_read_signed): Remove.
6869 (regcache::raw_read_unsigned): Remove.
6870 (regcache_raw_read_unsigned): Update.
6871 (regcache_raw_write_unsigned): Update.
6872 (regcache::raw_write_signed): Remove.
6873 (regcache::raw_write): New function.
6874 (regcache_cooked_read_signed): Update.
6875 (regcache::raw_write_unsigned): Remove.
6876 (regcache::cooked_read_signed): Remove.
6877 (regcache_cooked_read_unsigned): Update.
6878 (regcache::cooked_read_unsigned): Remove.
6879 (regcache_cooked_write_signed): Update.
6880 (regcache_cooked_write_unsigned): Update.
6881 * regcache.h (regcache) <raw_read_signed>: Remove.
6882 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6883 <raw_read, raw_write>: New.
6884 <cooked_read_signed, cooked_write_signed>: Remove.
6885 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6886 <cooked_read, cooked_write>: New.
6887 * sh64-tdep.c (sh64_pseudo_register_read): Update.
6888 (sh64_pseudo_register_write): Update.
6889
6890 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
6891
6892 * arc-tdep.c (arc_disassembler_options): New variable.
6893 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6894 of default_print_insn.
6895 (arc_delayed_print_insn): Set info->section when needed,
6896 use default_print_insn to retrieve a disassembler.
6897
6898 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
6899
6900 PR gdb/21574
6901 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6902 to mention $SHELL and startup-with-shell.
6903
6904 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
6905
6906 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6907
6908 2017-06-14 Yao Qi <yao.qi@linaro.org>
6909
6910 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6911 default_print_insn instead of print_insn_aarch64.
6912 * arm-tdep.c (gdb_print_insn_arm): Call
6913 default_print_insn instead of print_insn_big_arm
6914 and print_insn_little_arm.
6915 * i386-tdep.c (i386_print_insn): Call default_print_insn
6916 instead of print_insn_i386.
6917 * ia64-tdep.c (ia64_print_insn): Call
6918 default_print_insn instead of print_insn_ia64.
6919 * mips-tdep.c (gdb_print_insn_mips): Call
6920 default_print_insn instead of print_insn_big_mips
6921 and print_insn_little_mips.
6922 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6923 instead of print_insn_spu.
6924
6925 2017-06-14 Pedro Alves <palves@redhat.com>
6926
6927 * ada-lang.c: Include "common/byte-vector.h".
6928 (ada_value_primitive_packed_val): Use gdb::byte_vector.
6929 * charset.c (wchar_iterator::iterate): Resize the vector instead
6930 of reserving it.
6931 * common/byte-vector.h: Include "common/def-vector.h".
6932 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6933 * cli/cli-dump.c: Include "common/byte-vector.h".
6934 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6935 * common/byte-vector.h: New file.
6936 * common/def-vector.h: New file.
6937 * common/default-init-alloc.h: New file.
6938 * dwarf2loc.c: Include "common/byte-vector.h".
6939 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6940 instead of reserving it.
6941 * dwarf2read.c: Include "common/byte-vector.h".
6942 (data_buf::m_vec): Now a gdb::byte_vector.
6943 * gdb_regex.c: Include "common/def-vector.h".
6944 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6945 * mi/mi-main.c: Include "common/byte-vector.h".
6946 (mi_cmd_data_read_memory): Use gdb::byte_vector.
6947 * printcmd.c: Include "common/byte-vector.h".
6948 (print_scalar_formatted): Use gdb::byte_vector.
6949 * valprint.c: Include "common/byte-vector.h".
6950 (maybe_negate_by_bytes, print_decimal_chars): Use
6951 gdb::byte_vector.
6952
6953 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6954
6955 * darwin-nat.c: Include "nat/fork-inferior.h".
6956
6957 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6958
6959 * configure.nat: Factor out Darwin bits that are not
6960 architecture-specific. Add fork-inferior.o.
6961
6962 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6963
6964 * configure.nat: Factor out AIX bits that are not
6965 architecture-specific. Add fork-inferior.o.
6966
6967 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6968
6969 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
6970 (read_pieced_value, write_pieced_value): ...here. Reduce to
6971 wrappers that just call rw_pieced_value.
6972
6973 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6974
6975 * dwarf2loc.c (write_pieced_value): When writing the data for a
6976 memory piece, use write_memory_with_notification instead of
6977 write_memory.
6978
6979 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6980
6981 * valops.c (read_value_memory): Change embedded_offset to
6982 represent a bit offset instead of a byte offset.
6983 * value.h (read_value_memory): Adjust comment.
6984
6985 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6986
6987 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6988 dest_offset_bits and source_offset_bits.
6989 (write_pieced_value): Likewise.
6990
6991 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6992
6993 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6994 given by DW_OP_bit_piece.
6995 (write_pieced_value): Likewise.
6996
6997 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6998
6999 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7000 some other preparations to the places where sufficient information
7001 is available.
7002 (write_pieced_value): Likewise.
7003
7004 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7005
7006 * dwarf2loc.c (bits_to_bytes): New function.
7007 (read_pieced_value): Fix offset calculations for register pieces
7008 on big-endian targets.
7009 (write_pieced_value): Likewise.
7010
7011 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7012
7013 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7014 (write_pieced_value): Likewise.
7015
7016 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7017
7018 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7019 transfer the source value's least significant bits, instead of its
7020 lowest-addressed ones. Rename type_len to max_offset.
7021 (read_pieced_value): Mirror above changes to write_pieced_value as
7022 applicable.
7023
7024 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7025
7026 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7027 truncate full bytes from dest_offset_bits before using it as an
7028 offset into the buffer.
7029
7030 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7031
7032 * dwarf2loc.c (write_pieced_value): Include transfer size in
7033 byte-wise check.
7034
7035 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7036
7037 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7038 calculation of this_size.
7039
7040 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7041
7042 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7043 when targeting a bit-field.
7044 (write_pieced_value): Likewise.
7045
7046 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7047
7048 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7049 (allocate_piece_closure): Drop addr_size parameter.
7050 (dwarf2_evaluate_loc_desc_full): Adjust call to
7051 allocate_piece_closure.
7052
7053 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7054
7055 PR gdb/21226
7056 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7057 the LSB end, independent of endianness.
7058
7059 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7060
7061 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7062 size capping.
7063
7064 2017-06-13 Yao Qi <yao.qi@linaro.org>
7065
7066 * mips-linux-nat.c: Move include features/mips*-linux.c to
7067 mips-linux-tdep.c.
7068 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7069 to mips-linux-tdep.c.
7070 * mips-linux-tdep.c: Include features/mips*-linux.c
7071 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7072 functions.
7073 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7074 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7075 (tdesc_mips64_dsp_linux): Declare.
7076
7077 2017-06-12 Tom Tromey <tom@tromey.com>
7078
7079 * valprint.h (val_print_type_code_int): Remove.
7080 * valprint.c (generic_val_print_int): Always call
7081 val_print_scalar_formatted.
7082 (val_print_type_code_int): Remove.
7083 * printcmd.c (print_scalar_formatted): Handle options->format==0.
7084 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7085 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7086 * ada-valprint.c (ada_val_print_num): Use
7087 val_print_scalar_formatted.
7088
7089 2017-06-12 Tom Tromey <tom@tromey.com>
7090
7091 * printcmd.c (print_scalar_formatted): Unify the two switches.
7092 Don't convert scalars to LONGEST.
7093
7094 2017-06-12 Tom Tromey <tom@tromey.com>
7095
7096 PR exp/16225:
7097 * valprint.h (print_decimal_chars): Update.
7098 * valprint.c (maybe_negate_by_bytes): New function.
7099 (print_decimal_chars): Add "is_signed" argument.
7100 * printcmd.c (print_scalar_formatted): Update.
7101
7102 2017-06-12 Tom Tromey <tom@tromey.com>
7103
7104 PR exp/16225:
7105 * valprint.h (print_binary_chars, print_hex_chars): Update.
7106 * valprint.c (val_print_type_code_int): Update.
7107 (print_binary_chars): Add "zero_pad" argument.
7108 (emit_octal_digit): New function.
7109 (print_octal_chars): Don't zero-pad.
7110 (print_decimal_chars): Likewise.
7111 (print_hex_chars): Add "zero_pad" argument.
7112 * sh64-tdep.c (sh64_do_fp_register): Update.
7113 * regcache.c (regcache::dump): Update.
7114 * printcmd.c (print_scalar_formatted): Update.
7115 * infcmd.c (default_print_one_register_info): Update.
7116
7117 2017-06-12 Pedro Alves <palves@redhat.com>
7118 Alan Hayward <alan.hayward@arm.com>
7119
7120 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7121 (mips_eabi_push_dummy_call): Rename local 'regsize' to
7122 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
7123 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
7124 Assert that abi_regsize bytes fit in 'ref_valbuf'.
7125
7126 2017-06-12 Pedro Alves <palves@redhat.com>
7127
7128 * dwarf2read.c (mapped_symtab::data): Now a vector of
7129 symtab_index_entry instead of vector of
7130 std::unique_ptr<symtab_index_entry>. All users adjusted to check
7131 whether an element's name is NULL instead of checking whether the
7132 element itself is NULL.
7133 (find_slot): Change return type. Adjust.
7134 (hash_expand, , add_index_entry, uniquify_cu_indices)
7135 (write_hash_table): Adjust.
7136
7137 2017-06-12 Pedro Alves <palves@redhat.com>
7138
7139 * dwarf2read.c (recursively_count_psymbols): New function.
7140 (write_psymtabs_to_index): Call it to compute number of psyms and
7141 pass estimate size of psyms_seen to unordered_set's ctor.
7142
7143 2017-06-12 Pedro Alves <palves@redhat.com>
7144
7145 * dwarf2read.c (write_hash_table): Check if key already exists
7146 before emplacing.
7147
7148 2017-06-12 Pedro Alves <palves@redhat.com>
7149
7150 * dwarf2read.c (data_buf::append_space): Rename to...
7151 (data_buf::grow): ... this, and make private. Adjust all callers.
7152 (data_buf::append_uint): New method.
7153 (add_address_entry, write_one_signatured_type)
7154 (write_psymtabs_to_index): Use it.
7155
7156 2017-06-12 Pedro Alves <palves@redhat.com>
7157
7158 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7159 (file_write (FILE *, const std::vector<Elem>&)): Delete.
7160 (data_buf::file_write): Call ::fwrite directly.
7161
7162 2017-06-12 Pedro Alves <palves@redhat.com>
7163
7164 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7165 std::vector::erase.
7166
7167 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7168
7169 Code cleanup: C++ify .gdb_index producer.
7170 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7171 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7172 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7173 (create_strtab, add_string): Remove.
7174 (file_write, data_buf): New.
7175 (struct symtab_index_entry): Use std::vector for cu_indices.
7176 (struct mapped_symtab): Use std::vector for data.
7177 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7178 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7179 Remove.
7180 (find_slot): Change return type. Update it to the new data structures.
7181 (hash_expand, add_index_entry): Update it to the new data structures.
7182 (offset_type_compare): Remove.
7183 (uniquify_cu_indices): Update it to the new data structures.
7184 (c_str_view, c_str_view_hasher, vector_hasher): New.
7185 (add_indices_to_cpool): Remove.
7186 (write_hash_table): Update it to the new data structures.
7187 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7188 (eq_psymtab_cu_index): Remove.
7189 (psym_index_map): New typedef.
7190 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7191 reference and std::unordered_map for cu_index_htab.
7192 (add_address_entry, add_address_entry_worker, write_address_map)
7193 (write_psymbols): Update it to the new data structures.
7194 (write_obstack): Remove.
7195 (struct signatured_type_index_data): Change types_list to a data_buf
7196 reference and psyms_seen to a std::unordered_set reference.
7197 (write_one_signatured_type, recursively_write_psymbols)
7198 (write_psymtabs_to_index): Update it to the new data structures.
7199
7200 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
7201
7202 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7203 separate-debug-file commands.
7204 * symfile.h (separate_debug_file_debug): New global.
7205 * symfile.c (separate_debug_file_debug): New global.
7206 (separate_debug_file_exists, find_separate_debug_file): Add
7207 debug output.
7208 (_initialize_symfile): Add "set debug separate-debug-file"
7209 command.
7210 * build-id.c (build_id_to_debug_bfd,
7211 find_separate_debug_file_by_buildid): Add debug output.
7212
7213 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
7214
7215 * gdbarch.sh (displaced_step_free_closure): Remove.
7216 * gdbarch.h, gdbarch.c: Re-generate.
7217 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
7218 displaced_step_free_closure.
7219 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
7220 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
7221 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7222 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7223 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7224 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7225 * arch-utils.h (simple_displaced_step_free_closure): Remove.
7226 * arch-utils.c (simple_displaced_step_free_closure): Remove.
7227 * infrun.c (displaced_step_clear): Call xfree instead of
7228 gdbarch_displaced_step_free_closure.
7229
7230 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
7231
7232 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
7233 NULL".
7234
7235 2017-06-08 Alan Hayward <alan.hayward@arm.com>
7236
7237 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
7238 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
7239 (mn10300_push_dummy_call): Likewise.
7240
7241 2017-06-08 Alan Hayward <alan.hayward@arm.com>
7242
7243 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
7244
7245 2017-06-08 Alan Hayward <alan.hayward@arm.com>
7246
7247 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
7248
7249 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7250
7251 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
7252 able to start inferiors using a shell.
7253 (New remote packets): Announce new packet "QStartupWithShell".
7254 * remote.c: Add PACKET_QStartupWithShell.
7255 (extended_remote_create_inferior): Handle new
7256 PACKET_QStartupWithShell.
7257 (remote_protocol_features) <QStartupWithShell>: New entry for
7258 PACKET_QStartupWithShell.
7259 (_initialize_remote): Call "add_packet_config_cmd" for
7260 QStartupShell.
7261
7262 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7263 Pedro Alves <palves@redhat.com>
7264
7265 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
7266 and "nat/fork-inferior.h".
7267 * common/common-inferior.h: New file, with contents from
7268 "gdb/inferior.h".
7269 * commom/common-utils.c: Include "common-utils.h".
7270 (stringify_argv): New function.
7271 * common/common-utils.h (stringify_argv): New prototype.
7272 * configure.nat: Add "fork-inferior.o" as a dependency for
7273 "*linux*", "fbsd*" and "nbsd*" hosts.
7274 * corefile.c (get_exec_file): Update comment.
7275 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
7276 instead of "startup_inferior".
7277 (darwin_create_inferior): Call "add_thread_silent" after
7278 "fork_inferior".
7279 * fork-child.c: Cleanup unnecessary includes.
7280 (SHELL_FILE): Move to "common/common-fork-child.c".
7281 (environ): Likewise.
7282 (exec_wrapper): Initialize.
7283 (get_exec_wrapper): New function.
7284 (breakup_args): Move to "common/common-fork-child.c"; rename to
7285 "breakup_args_for_exec".
7286 (escape_bang_in_quoted_argument): Move to
7287 "common/common-fork-child.c".
7288 (saved_ui): New variable.
7289 (prefork_hook): New function.
7290 (postfork_hook): Likewise.
7291 (postfork_child_hook): Likewise.
7292 (gdb_startup_inferior): Likewise.
7293 (fork_inferior): Move to "common/common-fork-child.c". Update
7294 function to support gdbserver.
7295 (startup_inferior): Likewise.
7296 * gdbcore.h (get_exec_file): Remove declaration.
7297 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
7298 instead of "startup_inferior". Call "add_thread_silent" after
7299 "fork_inferior".
7300 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
7301 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
7302 instead of "startup_inferior". Call "add_thread_silent" after
7303 "fork_inferior".
7304 * inferior.h: Include "common-inferior.h".
7305 (trace_start_error): Move to "common/common-utils.h".
7306 (trace_start_error_with_name): Likewise.
7307 (fork_inferior): Move prototype to "nat/fork-inferior.h".
7308 (startup_inferior): Likewise.
7309 (gdb_startup_inferior): New prototype.
7310 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
7311 * nat/fork-inferior.h: New file.
7312 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
7313 instead of "startup_inferior". Call "add_thread_silent" after
7314 "fork_inferior".
7315 * target.h (target_terminal_init): Move prototype to
7316 "target/target.h".
7317 (target_terminal_inferior): Likewise.
7318 (target_terminal_ours): Likewise.
7319 * target/target.h (target_terminal_init): New prototype, moved
7320 from "target.h".
7321 (target_terminal_inferior): Likewise.
7322 (target_terminal_ours): Likewise.
7323 * utils.c (gdb_flush_out_err): New function.
7324
7325 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7326
7327 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
7328 * common/common-gdbthread.h: New file, with parts from
7329 "gdb/gdbthread.h".
7330 * gdbthread.h: Include "common-gdbthread.h".
7331 (switch_to_thread): Moved to "common/common-gdbthread.h".
7332
7333 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7334
7335 * Makefile.in (SFILES): Add "common/job-control.c".
7336 (HFILES_NO_SRCDIR): Add "common/job-control.h".
7337 (COMMON_OBS): Add "job-control.o".
7338 * common/job-control.c: New file, with contents from
7339 "gdb/inflow.c".
7340 * common/job-control.h: New file, with contents from "terminal.h".
7341 * fork-child.c: Include "job-control.h".
7342 * inflow.c: Include "job-control.h".
7343 (gdb_setpgid): Move to "common/common-inflow.c".
7344 (_initialize_inflow): Move setting of "job_control" to
7345 "handle_job_control".
7346 * terminal.h (job_control): Moved to "common/common-terminal.h".
7347 (gdb_setpgid): Likewise.
7348 * top.c: Include "job_control.h".
7349 * utils.c: Likewise.
7350 (job_control): Moved to "job-control.c".
7351
7352 2017-06-07 Pedro Alves <palves@redhat.com>
7353
7354 * Makefile.in (SFILES): Add gdb_regex.c.
7355 (COMMON_OBS): Add gdb_regex.o.
7356 * ada-lang.c (ada_add_standard_exceptions)
7357 (ada_add_exceptions_from_frame, name_matches_regex)
7358 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
7359 parameter type to compiled_regex. Adjust.
7360 (ada_exceptions_list): Use compiled_regex.
7361 * break-catch-throw.c (exception_catchpoint::pattern): Now a
7362 std::unique_ptr<compiled_regex>.
7363 (exception_catchpoint::~exception_catchpoint): Remove regfree
7364 call.
7365 (check_status_exception_catchpoint): Adjust to use compiled_regex.
7366 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
7367 * breakpoint.c (solib_catchpoint::compiled): Now a
7368 std::unique_ptr<compiled_regex>.
7369 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
7370 (check_status_catch_solib): Adjust to use compiled_regex.
7371 (add_solib_catchpoint): Adjust to use compiled_regex.
7372 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
7373 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
7374 compiled_regex reference. Adjust to use it.
7375 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
7376 declaration. Include "gdb_regex.h".
7377 (apropos_cmd): Change regex parameter to compiled_regex reference.
7378 * gdb_regex.c: New file.
7379 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
7380 declarations.
7381 (class compiled_regex): New.
7382 * linux-tdep.c: Include "common/gdb_optional.h".
7383 (struct mapping_regexes): New, factored out from
7384 mapping_is_anonymous_p, and adjusted to use compiled_regex.
7385 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
7386 gdb::optional and remove cleanups. Adjust to compiled_regex.
7387 * probe.c: Include "common/gdb_optional.h".
7388 (collect_probes): Use compiled_regex and gdb::optional and remove
7389 cleanups.
7390 * skip.c: Include "common/gdb_optional.h".
7391 (skiplist_entry::compiled_function_regexp): Now a
7392 gdb::optional<compiled_regex>.
7393 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
7394 (free_skiplist_entry): Remove regfree call.
7395 (compile_skip_regexp, skip_rfunction_p): Adjust to use
7396 compiled_regex and gdb::optional.
7397 * symtab.c: Include "common/gdb_optional.h".
7398 (search_symbols): Use compiled_regex and gdb::optional.
7399 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
7400 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
7401 to gdb_regex.c.
7402
7403 2017-06-07 Alan Hayward <alan.hayward@arm.com>
7404
7405 * regcache.c (regcache::save): Avoid buffer use.
7406 (regcache::dump): Likewise.
7407
7408 2017-06-07 Alan Hayward <alan.hayward@arm.com>
7409
7410 * sh-tdep.c (sh_pseudo_register_read): Remove
7411 MAX_REGISTER_SIZE.
7412 (sh_pseudo_register_write): Likewise.
7413 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
7414 (sh64_pseudo_register_write): Likewise
7415
7416 2017-06-07 Alan Hayward <alan.hayward@arm.com>
7417
7418 * aarch64-tdep.c (aarch64_store_return_value): Use
7419 V_REGISTER_SIZE.
7420 (aarch64_pseudo_read_value): Likewise.
7421 (aarch64_pseudo_write): Likewise.
7422
7423 2017-06-06 Yao Qi <yao.qi@linaro.org>
7424
7425 * regformats/regdef.h (set_register_cache): Remove the
7426 declaration.
7427
7428 2017-06-06 Alan Hayward <alan.hayward@arm.com>
7429
7430 * frame.c (frame_unwind_register_signed): Use
7431 frame_unwind_register_value.
7432
7433 2017-06-06 Pedro Alves <palves@redhat.com>
7434
7435 PR breakpoints/21553
7436 * breakpoint.c (create_breakpoints_sal_default)
7437 (init_breakpoint_sal, create_breakpoint_sal): Use
7438 gdb::unique_xmalloc_ptr for string parameters.
7439 (create_breakpoint): Constify 'extra_string' and 'cond_string'
7440 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
7441 (base_breakpoint_create_breakpoints_sal)
7442 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
7443 (strace_marker_create_breakpoints_sal)
7444 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
7445 string parameters.
7446 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
7447 gdb::unique_xmalloc_ptr for string parameters.
7448 (create_breakpoint): Constify 'extra_string' and 'cond_string'
7449 parameters.
7450
7451 2017-06-06 Alan Hayward <alan.hayward@arm.com>
7452
7453 * alpha-tdep.c (alpha_register_to_value): Use
7454 get_frame_register_value.
7455 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
7456
7457 2017-06-06 Alan Hayward <alan.hayward@arm.com>
7458
7459 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
7460 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
7461 (ia64_value_to_register): Likewise.
7462 (ia64_extract_return_value): Likewise.
7463 (ia64_store_return_value): Likewise.
7464 (ia64_push_dummy_call): Likewise.
7465
7466 2017-06-04 Joel Brobecker <brobecker@adacore.com>
7467
7468 GDB 8.0 released.
7469
7470 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
7471
7472 * x86-linux-nat.c (struct arch_lwp_info): Remove.
7473
7474 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
7475
7476 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
7477 parameter.
7478 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
7479
7480 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
7481
7482 * event-loop.c (poll_timers): Unallocate timer using delete
7483 instead of xfree.
7484
7485 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
7486
7487 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
7488 (struct breakpoint) <~breakpoint>: New.
7489 (struct watchpoint): Inherit from breakpoint.
7490 <~watchpoint>: New.
7491 <base>: Remove.
7492 (struct tracepoint): Inherit from breakpoint.
7493 <base>: Remove.
7494 * breakpoint.c (longjmp_breakpoint_ops): Remove.
7495 (struct longjmp_breakpoint): Inherit from breakpoint.
7496 <~longjmp_breakpoint>: New.
7497 <base>: Remove.
7498 (new_breakpoint_from_type): Remove casts.
7499 (watchpoint_in_thread_scope): Remove reference to base field.
7500 (watchpoint_del_at_next_stop): Likewise.
7501 (update_watchpoint): Likewise.
7502 (watchpoint_check): Likewise.
7503 (bpstat_check_watchpoint): Likewise.
7504 (set_longjmp_breakpoint): Likewise.
7505 (struct fork_catchpoint): Inherit from breakpoint.
7506 <base>: Remove.
7507 (struct solib_catchpoint): Inherit from breakpoint.
7508 <~solib_catchpoint>: New.
7509 <base>: Remove.
7510 (dtor_catch_solib): Change to ...
7511 (solib_catchpoint::~solib_catchpoint): ... this.
7512 (breakpoint_hit_catch_solib): Remove reference to base field.
7513 (add_solib_catchpoint): Likewise.
7514 (create_fork_vfork_event_catchpoint): Likewise.
7515 (struct exec_catchpoint): Inherit from breakpoint.
7516 <~exec_catchpoint>: New.
7517 <base>: Remove.
7518 (dtor_catch_exec): Change to ...
7519 (exec_catchpoint::~exec_catchpoint): ... this.
7520 (dtor_watchpoint): Change to ...
7521 (watchpoint::~watchpoint): ... this.
7522 (watch_command_1): Remove reference to base field.
7523 (catch_exec_command_1): Likewise.
7524 (base_breakpoint_dtor): Change to ...
7525 (breakpoint::~breakpoint): ... this.
7526 (base_breakpoint_ops): Remove dtor field value.
7527 (longjmp_bkpt_dtor): Change to ...
7528 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
7529 (strace_marker_create_breakpoints_sal): Remove reference to base
7530 field.
7531 (delete_breakpoint): Don't manually call breakpoint destructor.
7532 (create_tracepoint_from_upload): Remove reference to base field.
7533 (trace_pass_set_count): Likewise.
7534 (initialize_breakpoint_ops): Don't initialize
7535 momentary_breakpoint_ops, don't set dtors.
7536 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
7537 <~ada_catchpoint>: New.
7538 <base>: Remove.
7539 (create_excep_cond_exprs): Remove reference to base field.
7540 (dtor_exception): Change to ...
7541 (ada_catchpoint::~ada_catchpoint): ... this.
7542 (dtor_catch_exception): Remove.
7543 (dtor_catch_exception_unhandled): Remove.
7544 (dtor_catch_assert): Remove.
7545 (create_ada_exception_catchpoint): Remove reference to base
7546 field.
7547 (initialize_ada_catchpoint_ops): Don't set dtors.
7548 * break-catch-sig.c (struct signal_catchpoint): Inherit from
7549 breakpoint.
7550 <~signal_catchpoint>: New.
7551 <base>: Remove.
7552 (signal_catchpoint_dtor): Change to ...
7553 (signal_catchpoint::~signal_catchpoint): ... this.
7554 (create_signal_catchpoint): Remove reference to base field.
7555 (initialize_signal_catchpoint_ops): Don't set dtor.
7556 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
7557 from breakpoint.
7558 <~syscall_catchpoint>: New.
7559 <base>: Remove.
7560 (dtor_catch_syscall): Change to ...
7561 (syscall_catchpoint::~syscall_catchpoint): ... this.
7562 (create_syscall_event_catchpoint): Remove reference to base
7563 field.
7564 (initialize_syscall_catchpoint_ops): Don't set dtor.
7565 * break-catch-throw.c (struct exception_catchpoint): Inherit
7566 from breakpoint.
7567 <~exception_catchpoint>: New.
7568 <base>: Remove.
7569 (dtor_exception_catchpoint): Change to ...
7570 (exception_catchpoint::~exception_catchpoint): ... this.
7571 (handle_gnu_v3_exceptions): Remove reference to base field.
7572 (initialize_throw_catchpoint_ops): Don't set dtor.
7573 * ctf.c (ctf_get_traceframe_address): Remove reference to base
7574 field.
7575 * remote.c (remote_get_tracepoint_status): Likewise.
7576 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
7577 * tracefile.c (tracefile_fetch_registers): Likewise.
7578 * tracepoint.c (actions_command): Likewise.
7579 (validate_actionline): Likewise.
7580 (tfind_1): Likewise.
7581 (get_traceframe_location): Likewise.
7582 (find_matching_tracepoint_location): Likewise.
7583 (parse_tracepoint_status): Likewise.
7584 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
7585
7586 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
7587
7588 * breakpoint.c (struct longjmp_breakpoint): New struct.
7589 (is_tracepoint_type): Change return type to bool.
7590 (is_longjmp_type): New function.
7591 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
7592 (set_raw_breakpoint_without_location): Use
7593 new_breakpoint_from_type.
7594 (set_raw_breakpoint): Likewise.
7595
7596 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
7597
7598 * breakpoint.c (new_breakpoint_from_type): New function.
7599 (create_breakpoint_sal): Use new_breakpoint_from_type and
7600 unique_ptr.
7601 (create_breakpoint): Likewise.
7602
7603 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
7604
7605 * memattr.c (mem_info_command): Rename to ...
7606 (info_mem_command): ... this.
7607 (mem_enable_command): Rename to ...
7608 (enable_mem_command): ... this.
7609 (mem_disable_command): Rename to ...
7610 (disable_mem_command): ... this.
7611 (mem_delete_command): Rename to ...
7612 (delete_mem_command): ... this.
7613 (_initialize_mem): Adjust function names.
7614
7615 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
7616
7617 * btrace.c (handle_pt_insn_events): New.
7618 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
7619 STATUS. Split into this and ...
7620 (handle_pt_insn_event_flags): ... this.
7621
7622 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
7623
7624 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
7625 and struct pt_insn.resynced.
7626 * configure: Regenerated.
7627 * config.in: Regenerated.
7628
7629 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7630
7631 * btrace.c (ftrace_find_call_by_number): New function.
7632 (ftrace_new_function): Store objects, not pointers.
7633 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
7634 ftrace_new_gap, ftrace_update_function,
7635 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
7636 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
7637 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
7638 btrace_ends_with_single_insn, btrace_call_get): Account for
7639 btrace_thread_info::functions now storing objects.
7640 * btrace.h (struct btrace_thread_info): Add constructor.
7641 (struct btrace_thread_info) <functions>: Make std::vector.
7642 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
7643 Initialize with default values.
7644 * record-btrace.c (record_btrace_frame_sniffer): Account for
7645 btrace_thread_info::functions now storing objects.
7646
7647 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7648
7649 * btrace.c: Remove typedef bfun_s.
7650 (ftrace_new_gap): Directly add gaps to the list of gaps.
7651 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
7652 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
7653 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
7654 instead of gdb VEC.
7655
7656 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7657
7658 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
7659 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
7660 with btrace_thread_info::next_segment and
7661 btrace_thread_info::prev_segment.
7662 * btrace.h: Remove struct btrace_func_link.
7663 (struct btrace_function): Replace pair of function segment pointers
7664 with pair of indices.
7665 * python/py-record-btrace.c (btpy_call_prev_sibling,
7666 btpy_call_next_sibling): Replace references to
7667 btrace_thread_info::segment with btrace_thread_info::next_segment and
7668 btrace_thread_info::prev_segment.
7669 * record-btrace.c (record_btrace_frame_this_id): Use
7670 btrace_find_call_by_number.
7671
7672 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7673
7674 * btrace.c (ftrace_new_function, ftrace_fixup_level,
7675 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
7676 btrace_insn_next, btrace_insn_prev): Remove references to
7677 btrace_thread_info::flow.
7678 * btrace.h (struct btrace_function): Remove FLOW.
7679
7680 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7681
7682 * btrace.c (ftrace_find_call_by_number): New function.
7683 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
7684 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
7685 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
7686 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
7687 index.
7688 * btrace.h (struct btrace_function): Turn UP into an index.
7689 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
7690 as an index.
7691 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
7692 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
7693 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
7694
7695 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7696
7697 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7698 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7699 ftrace_update_function, ftrace_compute_global_level_offset,
7700 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
7701 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
7702 btrace_insn_end, btrace_is_empty): Remove references to
7703 btrace_thread_info::begin and btrace_thread_info::end.
7704 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
7705 (struct btrace_thread_info) <functions>: Adjust comment.
7706 * record-btrace.c (record_btrace_start_replaying): Remove reference to
7707 btrace_thread_info::begin.
7708
7709 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7710
7711 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7712 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7713 ftrace_update_function): Remove arguments that implicitly were always
7714 BTINFO->END.
7715 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
7716 Don't pass BTINFO->END.
7717
7718 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7719
7720 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
7721 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
7722 btrace_find_insn_by_number): Replace function segment pointer with
7723 index.
7724 (btrace_insn_cmp): Simplify.
7725 * btrace.h: (struct btrace_insn_iterator) Rename index to
7726 insn_index. Replace function segment pointer with index into function
7727 segment vector.
7728 * record-btrace.c (record_btrace_call_history): Replace function
7729 segment pointer use with index.
7730 (record_btrace_frame_sniffer): Retrieve function call segment through
7731 vector.
7732 (record_btrace_set_replay): Remove defunc't safety check.
7733
7734 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7735
7736 * btrace.c (btrace_ends_with_single_insn): New function.
7737 (btrace_call_get, btrace_call_number, btrace_call_begin,
7738 btrace_call_end, btrace_call_next, btrace_call_prev,
7739 btrace_find_call_by_number): Use index into call segment vector
7740 instead of pointer.
7741 (btrace_call_cmp): Simplify.
7742 * btrace.h (struct btrace_call_iterator): Replace function call segment
7743 pointer with index into vector.
7744 * record-btrace.c (record_btrace_call_history): Use index instead of
7745 pointer.
7746
7747 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7748
7749 * btrace.c (btrace_insn_begin, btrace_insn_end,
7750 btrace_find_insn_by_number): Add btinfo to iterator.
7751 * btrace.h (struct btrace_insn_iterator): Add btinfo.
7752
7753 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7754
7755 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
7756 and save pointers directly.
7757 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
7758 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
7759 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
7760 changed signature of functions.
7761 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
7762 (btrace_fetch): Remove code that adds btrace_function pointers to
7763 vector of btrace_functions.
7764 (btrace_clear): Simplify freeing vector of btrace_functions.
7765
7766 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7767
7768 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
7769 Replace VEC_* with std::vector functions.
7770 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
7771 (struct btrace_thread_info)<functions>: Change type to std::vector.
7772
7773 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
7774
7775 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
7776 "Removed targets and native configurations" up. Merge duplicate
7777 "New commands" sub-sections. Add "New options" sub-sections.
7778
7779 2017-05-26 Alan Hayward <alan.hayward@arm.com>
7780
7781 * defs.h (copy_integer_to_size): New declaration.
7782 * findvar.c (copy_integer_to_size): New function.
7783 (do_cint_test): New selftest function.
7784 (copy_integer_to_size_test): Likewise.
7785 (_initialize_findvar): Likewise.
7786 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7787 (mips_fbsd_collect_reg): Use raw_collect_integer.
7788 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7789 (mips64_fill_gregset): Use raw_collect_integer
7790 (mips64_fill_fpregset): Use raw_supply_integer.
7791 * regcache.c (regcache::raw_supply_integer): New function.
7792 (regcache::raw_collect_integer): Likewise.
7793 * regcache.h: (regcache::raw_supply_integer): New declaration.
7794 (regcache::raw_collect_integer): Likewise.
7795
7796 2017-05-24 Yao Qi <yao.qi@linaro.org>
7797
7798 * Makefile.in (SFILES): Add gdbarch-selftests.c.
7799 (COMMON_OBS): Add gdbarch-selftests.o.
7800 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7801 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7802 * gdbarch-selftests.c: New file.
7803 * regcache.h (regcache) <~regcache>: Mark it virtual if
7804 GDB_SELF_TEST.
7805 <raw_write>: Likewise.
7806
7807 2017-05-24 Yao Qi <yao.qi@linaro.org>
7808
7809 * regcache.c (current_regcache): Change it to
7810 regcache::current_regcache.
7811 (regcache_observer_target_changed): Update.
7812 (regcache_thread_ptid_changed): Make it a regcache static
7813 method.
7814 (regcache_thread_ptid_changed): Update.
7815 (class regcache_access): New.
7816 (current_regcache_test): Update.
7817 (_initialize_regcache): Update.
7818 * regcache.h: Include forward_list.
7819 (regcache): Declare regcache_thread_ptid_changed and declare
7820 registers_changed_ptid as friend.
7821
7822 2017-05-24 Yao Qi <yao.qi@linaro.org>
7823
7824 * i387-tdep.c (i387_register_to_value): Use register_size
7825 instead of TYPE_LENGTH.
7826 * m68k-tdep.c (m68k_register_to_value): Likewise.
7827
7828 2017-05-24 Yao Qi <yao.qi@linaro.org>
7829
7830 * i387-tdep.c (i387_convert_register_p): Return false if type
7831 code isn't TYPE_CODE_FLT.
7832
7833 2017-05-24 Yao Qi <yao.qi@linaro.org>
7834
7835 * alpha-tdep.c (alpha_convert_register_p): Return true if type
7836 length is 4.
7837 (alpha_register_to_value): Remove type length check.
7838 (alpha_value_to_register): Likewise.
7839
7840 2017-05-24 Yao Qi <yao.qi@linaro.org>
7841
7842 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7843 TYPE_CODE_FLT.
7844
7845 2017-05-24 Yao Qi <yao.qi@linaro.org>
7846
7847 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7848 TYPE_CODE_FLT or not.
7849
7850 2017-05-24 Yao Qi <yao.qi@linaro.org>
7851
7852 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7853 * avr-tdep.c (avr_gdbarch_init): Likewise.
7854 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7855 * cris-tdep.c (cris_gdbarch_init): Likewise.
7856 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7857 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7858 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7859 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7860 * mep-tdep.c (mep_gdbarch_init): Likewise.
7861 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7862 * mips-tdep.c (mips_gdbarch_init): Likewise.
7863 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7864 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7865 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7866 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7867 * v850-tdep.c (v850_gdbarch_init): Likewise.
7868
7869 2017-05-24 Yao Qi <yao.qi@linaro.org>
7870
7871 * selftest-arch.c (tests_with_arch): Call registers_changed
7872 and reinit_frame_cache.
7873 * selftest.c (run_self_tests): Likewise.
7874
7875 2017-05-24 Yao Qi <yao.qi@linaro.org>
7876
7877 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7878 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7879
7880 2017-05-24 Yao Qi <yao.qi@linaro.org>
7881
7882 * rl78-tdep.c (rl78_gdbarch_init): Don't call
7883 set_gdbarch_print_insn.
7884
7885 2017-05-24 Yao Qi <yao.qi@linaro.org>
7886
7887 * h8300-tdep.c (h8300_gdbarch_init): Don't call
7888 set_gdbarch_print_insn.
7889
7890 2017-05-24 Yao Qi <yao.qi@linaro.org>
7891
7892 * alpha-tdep.c (alpha_gdbarch_init): Don't call
7893 set_gdbarch_print_insn.
7894 * arc-tdep.c (arc_gdbarch_init): Likewise.
7895 * arch-utils.c: include dis-asm.h.
7896 (default_print_insn): New function.
7897 * arch-utils.h (default_print_insn): Declare.
7898 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7899 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7900 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7901 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7902 * frv-tdep.c (frv_gdbarch_init): Likewise.
7903 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7904 * gdbarch.sh (print_insn): Use default_print_insn.
7905 * gdbarch.c: Regenerated.
7906 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7907 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7908 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7909 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7910 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7911 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7912 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7913 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7914 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7915 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7916 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7917 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7918 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7919 * mt-tdep.c (mt_gdbarch_init): Likewise.
7920 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7921 * nios2-tdep.c (nios2_print_insn): Remove.
7922 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7923 * rx-tdep.c (rx_gdbarch_init): Likewise.
7924 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7925 * score-tdep.c (score_print_insn): Remove.
7926 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7927 * sh-tdep.c (sh_gdbarch_init): Likewise.
7928 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7929 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7930 * tic6x-tdep.c (tic6x_print_insn): Remove.
7931 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7932 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7933 * v850-tdep.c (v850_gdbarch_init): Likewise.
7934 * vax-tdep.c (vax_gdbarch_init): Likewise.
7935 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7936 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7937
7938 2017-05-23 John Baldwin <jhb@FreeBSD.org>
7939
7940 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7941 (MIPS_FP0_REGNUM): Remove.
7942 (MIPS_FSR_REGNUM): Remove.
7943 (mips_fbsd_supply_fpregs): Use mips_regnum.
7944 (mips_fbsd_supply_gregs): Likewise.
7945 (mips_fbsd_collect_fpregs): Likewise.
7946 (mips_fbsd_collect_gregs): Likewise.
7947
7948 2017-05-23 John Baldwin <jhb@FreeBSD.org>
7949
7950 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7951 (getpfpregs_supplies): New function.
7952 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7953 getfpregs_supplies.
7954 (mips_fbsd_store_inferior_registers): Likewise.
7955
7956 2017-05-22 Pedro Alves <palves@redhat.com>
7957
7958 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7959 maintainer.
7960
7961 2017-05-22 Alan Hayward <alan.hayward@arm.com>
7962
7963 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7964 (store_register): Likewise.
7965 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7966 (get_decimal_float_return_value): Likewise.
7967 (do_ppc_sysv_return_value): Likewise.
7968 (ppc64_sysv_abi_push_integer): Likewise.
7969 (ppc64_sysv_abi_push_freg): Likewise.
7970 (ppc64_sysv_abi_return_value_base): Likewise.
7971 (ppc64_sysv_abi_return_value): Likewise.
7972 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7973 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7974 * rs6000-nat.c: Likewise.
7975 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7976 (rs6000_value_to_register): Likewise.
7977 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7978
7979 2017-05-21 Tom Tromey <tom@tromey.com>
7980
7981 PR rust/21466:
7982 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7983 arrays as "[T]", not "[T; ]".
7984
7985 2017-05-19 Tom Tromey <tom@tromey.com>
7986
7987 PR rust/21484:
7988 * rust-lang.c (exp_descriptor_rust): New function.
7989 (rust_language_defn): Use it.
7990 * p-lang.c (pascal_language_defn): Update.
7991 * opencl-lang.c (opencl_language_defn): Update.
7992 * objc-lang.c (objc_language_defn): Update.
7993 * m2-lang.c (m2_language_defn): Update.
7994 * language.h (struct language_defn)
7995 <la_watch_location_expression>: New member.
7996 * language.c (unknown_language_defn, auto_language_defn)
7997 (local_language_defn): Update.
7998 * go-lang.c (go_language_defn): Update.
7999 * f-lang.c (f_language_defn): Update.
8000 * d-lang.c (d_language_defn): Update.
8001 * c-lang.h (c_watch_location_expression): Declare.
8002 * c-lang.c (c_watch_location_expression): New function.
8003 (c_language_defn, cplus_language_defn, asm_language_defn)
8004 (minimal_language_defn): Use it.
8005 * breakpoint.c (watch_command_1): Call
8006 la_watch_location_expression.
8007 * ada-lang.c (ada_language_defn): Update.
8008
8009 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8010
8011 PR tui/21482
8012 * gdb_curses.h (NOMACROS): Define.
8013 (NCURSES_NOMACROS): Define.
8014
8015 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8016
8017 PR tui/21482
8018 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8019 arg to char *.
8020 * tui/tui-wingeneral.c (box_win): Likewise.
8021 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8022 (tui_show_source_line): Likewise.
8023 (tui_show_exec_info_content): Likewise.
8024
8025 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8026
8027 * sparc-tdep.c (sparc_structure_return_p)
8028 (sparc_arg_on_registers_p): New functions.
8029 (sparc32_store_arguments): Use them.
8030 * sparc64-tdep.c (sparc64_16_byte_align_p)
8031 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8032 Handle TYPE_CODE_ARRAY.
8033
8034 2017-05-17 Yao Qi <yao.qi@linaro.org>
8035
8036 * cli/cli-decode.c (add_alias_cmd): New function.
8037 * command.h (add_alias_cmd): Declare.
8038 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8039 instead call add_alias_cmd.
8040
8041 2017-05-17 Pedro Alves <palves@redhat.com>
8042
8043 * Makefile.in (nat_extra_makefile_frag): Rename to ...
8044 (nat_makefile_frag): ... this. All references updated.
8045 * configure.ac: Likewise.
8046 * configure.nat: Likewise. Enhance comments.
8047 * configure: Regenerate.
8048
8049 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8050
8051 * procfs.c (procfs_create_inferior): Change prototype to match
8052 definition.
8053
8054 2017-05-13 Eli Zaretskii <eliz@gnu.org>
8055
8056 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8057 C++ compiler warning.
8058
8059 2017-05-12 Tom Tromey <tom@tromey.com>
8060
8061 PR rust/21483:
8062 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8063 recurse, just call value_struct_elt directly.
8064
8065 2017-05-12 Tom Tromey <tom@tromey.com>
8066
8067 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8068 OP_RUST_ARRAY>: Fix.
8069
8070 2017-05-12 Tom Tromey <tom@tromey.com>
8071
8072 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8073
8074 2017-05-09 Yao Qi <yao.qi@linaro.org>
8075
8076 * regcache.c: Include <forward_list>.
8077 (struct regcache_list): Remove.
8078 (current_regcache): Update.
8079 (get_thread_arch_aspace_regcache): Update for std::forward_list.
8080 (regcache_thread_ptid_changed): Likewise.
8081 (registers_changed_ptid): Likewise.
8082 (current_regcache_size): Likewise.
8083
8084 2017-05-09 Yao Qi <yao.qi@linaro.org>
8085
8086 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8087 (current_regcache_size): New function.
8088 (current_regcache_test): New function.
8089 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8090
8091 2017-05-08 Alan Hayward <alan.hayward@arm.com>
8092
8093 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8094 (print_gp_register_row): Use get_frame_register_value.
8095
8096 2017-05-08 Alan Hayward <alan.hayward@arm.com>
8097
8098 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8099 (mips_supply_fpregset): Likewise.
8100 (mips64_supply_gregset): Likewise.
8101
8102 2017-05-08 Alan Hayward <alan.hayward@arm.com>
8103
8104 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
8105 regcache->raw_supply_zeroed.
8106
8107 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
8108
8109 * configure.nat: Rearrange 'case' statements to match
8110 host before cpu.
8111
8112 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
8113
8114 * Makefile.in: Remove "@host_makefile_frag@". Add variables
8115 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8116 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
8117 "@nat_extra_makefile_frag@".
8118 (Makefile): Remove dependency on "@frags@".
8119 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8120 (data-directory/Makefile): Likewise.
8121 * config/aarch64/linux.mh: Deleted; moved contents to
8122 "gdb/configure.nat".
8123 * config/alpha/alpha-linux.mh: Likewise.
8124 * config/alpha/nbsd.mh: Likewise.
8125 * config/arm/linux.mh: Likewise.
8126 * config/arm/nbsdelf.mh: Likewise.
8127 * config/i386/cygwin.mh: Likewise.
8128 * config/i386/cygwin64.mh: Likewise.
8129 * config/i386/darwin.mh: Likewise.
8130 * config/i386/fbsd.mh: Likewise.
8131 * config/i386/fbsd64.mh: Likewise.
8132 * config/i386/go32.mh: Likewise.
8133 * config/i386/i386gnu.mh: Likewise.
8134 * config/i386/i386sol2.mh: Likewise.
8135 * config/i386/linux.mh: Likewise.
8136 * config/i386/linux64.mh: Likewise.
8137 * config/i386/mingw.mh: Likewise.
8138 * config/i386/mingw64.mh: Likewise.
8139 * config/i386/nbsd64.mh: Likewise.
8140 * config/i386/nbsdelf.mh: Likewise.
8141 * config/i386/nto.mh: Likewise.
8142 * config/i386/obsd.mh: Likewise.
8143 * config/i386/obsd64.mh: Likewise.
8144 * config/i386/sol2-64.mh: Likewise.
8145 * config/ia64/linux.mh: Likewise.
8146 * config/m32r/linux.mh: Likewise.
8147 * config/m68k/linux.mh: Likewise.
8148 * config/m68k/nbsdelf.mh: Likewise.
8149 * config/m68k/obsd.mh: Likewise.
8150 * config/m88k/obsd.mh: Likewise.
8151 * config/mips/fbsd.mh: Likewise.
8152 * config/mips/linux.mh: Likewise.
8153 * config/mips/nbsd.mh: Likewise.
8154 * config/mips/obsd64.mh: Likewise.
8155 * config/pa/linux.mh: Likewise.
8156 * config/pa/nbsd.mh: Likewise.
8157 * config/pa/obsd.mh: Likewise.
8158 * config/powerpc/aix.mh: Likewise.
8159 * config/powerpc/fbsd.mh: Likewise.
8160 * config/powerpc/linux.mh: Likewise.
8161 * config/powerpc/nbsd.mh: Likewise.
8162 * config/powerpc/obsd.mh: Likewise.
8163 * config/powerpc/ppc64-linux.mh: Likewise.
8164 * config/powerpc/spu-linux.mh: Likewise.
8165 * config/s390/linux.mh: Likewise.
8166 * config/sh/nbsd.mh: Likewise.
8167 * config/sparc/fbsd.mh: Likewise.
8168 * config/sparc/linux.mh: Likewise.
8169 * config/sparc/linux64.mh: Likewise.
8170 * config/sparc/nbsd64.mh: Likewise.
8171 * config/sparc/nbsdelf.mh: Likewise.
8172 * config/sparc/obsd64.mh: Likewise.
8173 * config/sparc/sol2.mh: Likewise.
8174 * config/tilegx/linux.mh: Likewise.
8175 * config/vax/nbsdelf.mh: Likewise.
8176 * config/vax/obsd.mh: Likewise.
8177 * config/xtensa/linux.mh: Likewise.
8178 * config/i386/i386gnu.mn: New file, with excerpts from
8179 "config/i386/i386gnu.mh".
8180 * configure: Regenerate.
8181 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8182 *.mh files under "gdb/config".
8183 * configure.nat: New file, with contents from the
8184 "gdb/config/*/*.mh" files.
8185
8186 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
8187
8188 * btrace.c (btrace_clear): Free insn vector.
8189
8190 2017-05-05 Pedro Alves <palves@redhat.com>
8191
8192 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8193 * configure: Regenerate.
8194
8195 2017-05-04 Pedro Alves <palves@redhat.com>
8196
8197 * Makefile.in (SFILES): Add progspace-and-thread.c.
8198 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8199 (COMMON_OBS): Add progspace-and-thread.o.
8200 * breakpoint.c: Include "progspace-and-thread.h".
8201 (update_inserted_breakpoint_locations)
8202 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8203 Use scoped_restore_current_pspace_and_thread.
8204 (create_std_terminate_master_breakpoint): Use
8205 scoped_restore_current_program_space.
8206 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8207 (print_breakpoint_location): Use
8208 scoped_restore_current_program_space.
8209 (bp_loc_is_permanent): Use
8210 scoped_restore_current_pspace_and_thread.
8211 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8212 (download_tracepoint_locations): Use
8213 scoped_restore_current_pspace_and_thread.
8214 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
8215 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
8216 (enum step_over_calls_kind): Moved from inferior.h.
8217 (class scoped_restore_current_thread): New class.
8218 * gdbthread.h (make_cleanup_restore_current_thread): Delete
8219 declaration.
8220 (scoped_restore_current_thread): New class.
8221 * infcmd.c: Include "common/gdb_optional.h".
8222 (continue_1, proceed_after_attach): Use
8223 scoped_restore_current_thread.
8224 (notice_new_inferior): Use scoped_restore_current_thread.
8225 * inferior.c: Include "progspace-and-thread.h".
8226 (restore_inferior, save_current_inferior): Delete.
8227 (add_inferior_command, clone_inferior_command): Use
8228 scoped_restore_current_pspace_and_thread.
8229 * inferior.h (scoped_restore_current_inferior): New class.
8230 * infrun.c: Include "progspace-and-thread.h" and
8231 "common/gdb_optional.h".
8232 (follow_fork_inferior): Use
8233 scoped_restore_current_pspace_and_thread.
8234 (scoped_restore_exited_inferior): New class.
8235 (handle_vfork_child_exec_or_exit): Use
8236 scoped_restore_exited_inferior,
8237 scoped_restore_current_pspace_and_thread,
8238 scoped_restore_current_thread and scoped_restore.
8239 (fetch_inferior_event): Use scoped_restore_current_thread.
8240 * linespec.c (decode_line_full, decode_line_1): Use
8241 scoped_restore_current_program_space.
8242 * mi/mi-main.c: Include "progspace-and-thread.h".
8243 (exec_continue): Use scoped_restore_current_thread.
8244 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
8245 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
8246 * proc-service.c (ps_pglobal_lookup): Use
8247 scoped_restore_current_program_space.
8248 * progspace-and-thread.c: New file.
8249 * progspace-and-thread.h: New file.
8250 * progspace.c (release_program_space, clone_program_space): Use
8251 scoped_restore_current_program_space.
8252 (restore_program_space, save_current_program_space)
8253 (save_current_space_and_thread): Delete.
8254 (switch_to_program_space_and_thread): Moved to
8255 progspace-and-thread.c.
8256 * progspace.h (save_current_program_space)
8257 (save_current_space_and_thread): Delete declarations.
8258 (scoped_restore_current_program_space): New class.
8259 * remote.c (remote_btrace_maybe_reopen): Use
8260 scoped_restore_current_thread.
8261 * symtab.c: Include "progspace-and-thread.h".
8262 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
8263 * thread.c (print_thread_info_1): Use
8264 scoped_restore_current_thread.
8265 (struct current_thread_cleanup): Delete.
8266 (do_restore_current_thread_cleanup)
8267 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
8268 (scoped_restore_current_thread::~scoped_restore_current_thread):
8269 ... this new dtor.
8270 (make_cleanup_restore_current_thread): Rename/convert to ...
8271 (scoped_restore_current_thread::scoped_restore_current_thread):
8272 ... this new ctor.
8273 (thread_apply_all_command): Use scoped_restore_current_thread.
8274 (thread_apply_command): Use scoped_restore_current_thread.
8275 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
8276 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
8277
8278 2017-05-04 Pedro Alves <palves@redhat.com>
8279
8280 * thread.c (make_cleanup_restore_current_thread): Move
8281 find_thread_ptid call before the is_stopped call. Assert that the
8282 thread is found. Replace is_stopped call by checking the thread's
8283 state directly. Remove unnecessary NULL-thread check.
8284
8285 2017-05-04 Pedro Alves <palves@redhat.com>
8286
8287 * corelow.c (thread_section_name): New class.
8288 (get_core_register_section, get_core_siginfo): Use it.
8289
8290 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
8291
8292 * corelow.c (sniff_core_bfd): Remove extra semicolon.
8293 (get_core_register_section): Remove xfree of NULL pointer.
8294
8295 2017-05-03 Alan Hayward <alan.hayward@arm.com>
8296
8297 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
8298 * regcache.c (regcache::raw_supply_zeroed): New function.
8299 * regcache.h (regcache::raw_supply_zeroed): New declaration.
8300
8301 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
8302
8303 * gdbarch.sh: Remove commented out definition of
8304 TARGET_CHAR_BIT.
8305 * gdbarch.h: Re-generate.
8306
8307 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
8308
8309 * configure: Regenerate.
8310
8311 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
8312
8313 * solib-target.c (solib_target_relocate_section_addresses):
8314 Remove num_section_bases, num_bases, segment_bases variables.
8315
8316 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8317
8318 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
8319
8320 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8321
8322 * solib-target.c: Include <vector>
8323 (struct lm_info_target) <~lm_info_target>: Remove.
8324 <segment_bases, section_bases>: Change type to
8325 std::vector<CORE_ADDR>.
8326 (library_list_start_segment, library_list_start_section,
8327 library_list_end_library,
8328 solib_target_relocate_section_addresses): Adjust.
8329
8330 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8331
8332 * gdbarch.sh (software_single_step): Change return type to
8333 std::vector<CORE_ADDR>.
8334 * gdbarch.c, gdbarch.h: Re-generate.
8335 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
8336 Adjust.
8337 (arm_deal_with_atomic_sequence_raw): Adjust.
8338 (thumb_get_next_pcs_raw): Adjust.
8339 (arm_get_next_pcs_raw): Adjust.
8340 (arm_get_next_pcs): Adjust.
8341 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
8342 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
8343 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
8344 (alpha_software_single_step): Adjust.
8345 * alpha-tdep.h (alpha_software_single_step): Adjust.
8346 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
8347 * arm-tdep.c (arm_software_single_step): Adjust.
8348 (arm_breakpoint_kind_from_current_state): Adjust.
8349 * arm-tdep.h (arm_software_single_step): Adjust.
8350 * breakpoint.c (insert_single_step_breakpoint): Adjust.
8351 * cris-tdep.c (cris_software_single_step): Adjust.
8352 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
8353 (micromips_deal_with_atomic_sequence): Adjust.
8354 (deal_with_atomic_sequence): Adjust.
8355 (mips_software_single_step): Adjust.
8356 * mips-tdep.h (mips_software_single_step): Adjust.
8357 * moxie-tdep.c (moxie_software_single_step): Adjust.
8358 * nios2-tdep.c (nios2_software_single_step): Adjust.
8359 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
8360 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
8361 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
8362 * s390-linux-tdep.c (s390_software_single_step): Adjust.
8363 * sparc-tdep.c (sparc_software_single_step): Adjust.
8364 * spu-tdep.c (spu_software_single_step): Adjust.
8365 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
8366
8367 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8368
8369 * gdbarch.sh: Use semi-colon as field separator instead of colon.
8370 * gdbarch.h: Re-generate.
8371
8372 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8373
8374 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
8375 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
8376 * python/py-instruction.c, python/py-instruction.h: New file.
8377 * python/py-record.c: Add py-instruction.h include.
8378 (gdbpy_initialize_record): Make gdb.Instruction a super class of
8379 gdb.RecordInstruction.
8380 * python/python-internal.h: Add gdbpy_initialize_instruction
8381 declaration.
8382 * python/python.c (do_start_initialization): Add
8383 gdbpy_initialize_instruction.
8384
8385 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8386
8387 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
8388 Remove.
8389 (btrace_func_from_recpy_func): New function.
8390 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
8391 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
8392 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
8393 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
8394 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
8395 Also, use new helper functions.
8396 (btpy_list_item): Use new helper functions.
8397 (recpy_bt_function_call_history): Use new type name.
8398 (btpy_call_getset): Remove.
8399 (gdbpy_initialize_btrace): Remove code to initialize
8400 gdb.BtraceFunctionCall.
8401 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
8402 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
8403 recpy_bt_func_prev, recpy_bt_func_next): New export.
8404 * python/py-record.c (recpy_func_type): New static object.
8405 (recpy_func_new, recpy_func_level, recpy_func_symbol,
8406 recpy_func_instructions, recpy_func_up, recpy_func_prev,
8407 recpy_func_next): New function.
8408 (recpy_element_hash, recpy_element_richcompare): Updated comment.
8409 (recpy_func_getset): New static object.
8410 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
8411 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
8412
8413 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8414
8415 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
8416 (btpy_object, btpy_insn_type, btpy_new): Remove.
8417 (btpy_list_object): Use gdb.RecordInstruction type instead of
8418 gdb.BtraceInstruction type.
8419 (btrace_insn_from_recpy_insn): New function.
8420 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
8421 btpy_new.
8422 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
8423 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
8424 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
8425 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
8426 instead of btpy_object.
8427 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8428 btpy_insn_data, btpy_insn_decode): Rename to ...
8429 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
8430 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
8431 recpy_bt_insn_decode): This. Also, use new helper functions.
8432 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
8433 recpy_insn_type.
8434 (btpy_insn_getset): Remove.
8435 (gdbpy_initialize_btrace): Remove code to initialize
8436 gdb.BtraceInstruction. Use recpy_element_object.
8437 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
8438 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
8439 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
8440 * python/py-record.c (recpy_insn_type): New static object.
8441 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
8442 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
8443 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
8444 New function.
8445 (recpy_insn_getset): New static object.
8446 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
8447 * python/py-record.h (recpy_element_object): New typedef.
8448 (recpy_insn_type, recpy_insn_new): New export.
8449
8450 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8451
8452 * py-record-btrace.c (btpy_insn_new): Removed.
8453 (btpy_insn_or_gap_new): New function.
8454 (btpy_insn_error): Removed.
8455 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8456 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
8457 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
8458 btpy_insn_or_gap_new instead of btpy_insn_new.
8459 (btpy_insn_getset): Remove btpy_insn_error.
8460 * py-record.c (recpy_gap_type): New static object.
8461 (recpy_gap_object): New typedef.
8462 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
8463 recpy_gap_reason_string): New function.
8464 (recpy_gap_getset): New static object.
8465 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
8466 * py-record.h (recpy_gap_new): New export.
8467
8468 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8469
8470 * python/py-record.c (recpy_ptid): Remove.
8471 (recpy_record_getset): Remove recpy_ptid.
8472
8473 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8474
8475 * btrace.c (btrace_fetch): Set inferior_ptid.
8476 * python/py-record-btrace.c: Add "py-record.h" include.
8477 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
8478 recpy_bt_end, recpy_bt_instruction_history,
8479 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
8480 in gdb.Record object instead of current ptid.
8481 * python/py-record.c: Include new "py-record.h" file.
8482 (recpy_record_object): Moved to py-record.h.
8483 * python/py-record.h: New file.
8484
8485 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8486
8487 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
8488 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
8489 indentation.
8490
8491 2017-05-01 Joel Brobecker <brobecker@adacore.com>
8492
8493 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
8494 the past maintainers section.
8495
8496 2017-04-28 Yao Qi <yao.qi@linaro.org>
8497
8498 * infcmd.c (get_return_value): Use regcache ctor, and remove
8499 cleanup.
8500
8501 2017-04-28 Yao Qi <yao.qi@linaro.org>
8502 Pedro Alves <palves@redhat.com>
8503
8504 * regcache.c (regcache::regcache): New tag dispatch ctor.
8505 (do_cooked_read): Moved above.
8506 (regcache_dup): Use the tag dispatch ctor..
8507 * regcache.h (regcache): Declare ctor, delete copy ctor and
8508 assignment operator, remove friend regcache_dup.
8509
8510 2017-04-28 Yao Qi <yao.qi@linaro.org>
8511
8512 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
8513 call method save instead of regcache_cpy.
8514 * regcache.h (struct regcache): Make regcache_dup a friend.
8515
8516 2017-04-28 Yao Qi <yao.qi@linaro.org>
8517
8518 * regcache.c (struct regcache): Move to regcache.h
8519 (regcache::arch): New method.
8520 (regcache_get_ptid): Update.
8521 (get_regcache_arch): Call arch method.
8522 (get_regcache_aspace): Call method aspace.
8523 (register_buffer): Change it to method.
8524 (regcache_save): Change it to regcache::save.
8525 (regcache_restore): Likewise.
8526 (regcache_cpy_no_passthrough): Remove the declaration.
8527 (regcache_cpy): Call methods restore and cpy_no_passthrough.
8528 (regcache_cpy_no_passthrough): Change it to method
8529 cpy_no_passthrough.
8530 (regcache_register_status): Change it to method
8531 get_register_status.
8532 (regcache_invalidate): Change it to method invalidate.
8533 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
8534 (regcache_raw_update): Change it to method raw_update.
8535 (regcache_raw_read): Likewise.
8536 (regcache_raw_read_signed): Likewise.
8537 (regcache_raw_read_unsigned): Likewise.
8538 (regcache_raw_write_signed): Likewise.
8539 (regcache_raw_write_unsigned): Likewise.
8540 (regcache_cooked_read): Likewise.
8541 (regcache_cooked_read_value): Likewise.
8542 (regcache_cooked_read_signed): Likewise.
8543 (regcache_cooked_read_unsigned): Likewise.
8544 (regcache_cooked_write_signed): Likewise.
8545 (regcache_cooked_write_unsigned): Likewise.
8546 (regcache_raw_set_cached_value): Likewise.
8547 (regcache_raw_write): Likewise.
8548 (regcache_cooked_write): Likewise.
8549 (regcache_xfer_part): Likewise.
8550 (regcache_raw_read_part): Likewise.
8551 (regcache_raw_write_part): Likewise.
8552 (regcache_cooked_read_part): Likewise.
8553 (regcache_cooked_write_part): Likewise.
8554 (regcache_raw_supply): Likewise.
8555 (regcache_raw_collect): Likewise.
8556 (regcache_transfer_regset): Likewise.
8557 (regcache_supply_regset): Likewise.
8558 (regcache_collect_regset): Likewise.
8559 (regcache_debug_print_register): Likewise.
8560 (enum regcache_dump_what): Move it to regcache.h.
8561 (regcache_dump): Change it to method dump.
8562 * regcache.h (enum regcache_dump_what): New.
8563 (class regcache): New.
8564 * target.c (target_fetch_registers): Call method
8565 debug_print_register.
8566 (target_store_registers): Likewise.
8567
8568 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8569
8570 * windows-nat.c (struct lm_info_windows): Initialize field.
8571 (windows_make_so): Allocate lm_info_windows with new.
8572 (windows_free_so): Free lm_info_windows with delete.
8573
8574 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8575
8576 * solib-darwin.c (struct lm_info_darwin): Initialize field.
8577 (darwin_current_sos): Allocate lm_info_darwin with new, remove
8578 cleanup.
8579 (darwin_free_so): Free lm_info_darwin with delete.
8580
8581 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8582
8583 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
8584 <l_addr_p>: Change type to bool.
8585 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
8586 (svr4_free_so): Free lm_info_svr4 with delete.
8587 (svr4_copy_library_list): Replace memcpy with call to copy
8588 constructor.
8589 (library_list_start_library, svr4_default_sos): Allocate
8590 lm_info_svr4 with new.
8591
8592 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8593
8594 * solib-target.c (struct lm_info_target): Add destructor,
8595 initialize fields.
8596 <name>: Change type to std::string.
8597 (library_list_start_library): Allocate lm_info_target with new.
8598 (solib_target_free_library_list): Free lm_info_target with
8599 delete.
8600 (solib_target_current_sos): Adapt to std::string.
8601 (solib_target_free_so): Free lm_info_target with delete.
8602
8603 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8604
8605 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
8606 fields.
8607 (frv_current_sos): Allocate lm_info_frv with new.
8608 (frv_relocate_main_executable): Free lm_info_frv with delete,
8609 allocate with new.
8610 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
8611
8612 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8613
8614 * solib-frv.c (struct lm_info_frv): Fix indentation.
8615
8616 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8617
8618 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
8619 map field.
8620 (dsbt_current_sos): Allocate lm_info_dsbt with new.
8621 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
8622 and allocate with new.
8623 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
8624
8625 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8626
8627 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
8628 <filename, member_name>: Change type to std::string.
8629 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
8630 (library_list_start_library): Allocate lm_info_aix with new.
8631 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
8632 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
8633 with copy constructor.
8634
8635 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8636
8637 * solist.h (struct lm_info): Remove.
8638 (struct lm_info_base): New class.
8639 (struct so_list) <lm_info>: Change type to lm_info_base *.
8640 * nto-tdep.c (struct lm_info): Remove.
8641 (lm_addr): Adjust.
8642 * solib-aix.c (struct lm_info): Rename to ...
8643 (struct lm_info_aix): ... this. Extend lm_info_base.
8644 (lm_info_p): Rename to ...
8645 (lm_info_aix_p): ... this, and adjust.
8646 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
8647 solib_aix_parse_libraries, library_list_start_library,
8648 solib_aix_free_library_list, solib_aix_parse_libraries,
8649 solib_aix_get_library_list,
8650 solib_aix_relocate_section_addresses, solib_aix_free_so,
8651 solib_aix_get_section_offsets,
8652 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
8653 Adjust.
8654 (struct solib_aix_inferior_data) <library_list>: Adjust.
8655 * solib-darwin.c (struct lm_info): Rename to ...
8656 (struct lm_info_darwin): ... this. Extend lm_info_base.
8657 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
8658 * solib-dsbt.c (struct lm_info): Rename to ...
8659 (struct lm_info_dsbt): ... this. Extend lm_info_base.
8660 (struct dsbt_info) <main_executable_lm_info): Adjust.
8661 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
8662 dsbt_relocate_section_addresses): Adjust.
8663 * solib-frv.c (struct lm_info): Rename to ...
8664 (struct lm_info_frv): ... this. Extend lm_info_base.
8665 (main_executable_lm_info): Adjust.
8666 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
8667 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
8668 find_canonical_descriptor_in_load_object,
8669 frv_fdpic_find_canonical_descriptor): Adjust.
8670 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
8671 to lm_info_svr4.
8672 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
8673 svr4_clear_so, svr4_copy_library_list,
8674 library_list_start_library, svr4_default_sos, svr4_read_so_list,
8675 svr4_current_sos, svr4_fetch_objfile_link_map,
8676 solist_update_incremental): Adjust.
8677 * solib-svr4.h (struct lm_info_svr4): Move here from
8678 solib-svr4.c.
8679 * solib-target.c (struct lm_info): Rename to ...
8680 (struct lm_info_target): ... this. Extend lm_info_base.
8681 (lm_info_p): Rename to ...
8682 (lm_info_target_p): ... this.
8683 (solib_target_parse_libraries, library_list_start_segment,
8684 library_list_start_section, library_list_start_library,
8685 library_list_end_library, solib_target_free_library_list,
8686 solib_target_current_sos, solib_target_free_so,
8687 solib_target_relocate_section_addresses): Adjust.
8688 * windows-nat.c (struct lm_info): Rename to ...
8689 (struct lm_info_windows): ... this. Extend lm_info_base.
8690 (windows_make_so, handle_load_dll, handle_unload_dll,
8691 windows_xfer_shared_libraries): Adjust.
8692
8693 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
8694
8695 * solib-darwin.c (struct darwin_so_list): Remove.
8696 (darwin_current_sos): Allocate an so_list object instead of a
8697 darwin_so_list, separately allocate an lm_info object.
8698 (darwin_free_so): Free lm_info.
8699
8700 2017-04-28 John Baldwin <jhb@FreeBSD.org>
8701
8702 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
8703 with fprintf_filtered.
8704
8705 2017-04-28 Yao Qi <yao.qi@linaro.org>
8706
8707 * regcache.c (regcache::regcache): New function.
8708 (regcache::~regcache): New function.
8709 (regcache_xmalloc_1): Remove.
8710 (regcache_xmalloc): Call new regcache.
8711 (regcache_xfree): Call delete regcache.
8712 (get_thread_arch_aspace_regcache): Call new regcache.
8713
8714 2017-04-28 Yao Qi <yao.qi@linaro.org>
8715
8716 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
8717 lwp instead of ptid_get_lwp.
8718
8719 2017-04-28 Yao Qi <yao.qi@linaro.org>
8720
8721 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
8722 lwp_info instead of getting from inferior_ptid.
8723
8724 2017-04-27 Keith Seitz <keiths@redhat.com>
8725
8726 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
8727 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
8728 (CV_CONVERSION_BADNESS): Define.
8729 (rank_one_type): Remove overly restrictive rvalue reference
8730 rank checks.
8731 Add cv-qualifier checks and subranks for type equality.
8732 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
8733 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
8734 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
8735
8736 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
8737
8738 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
8739 count when creating the object.
8740
8741 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
8742 Ulrich Weigand <uweigand@de.ibm.com>
8743
8744 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
8745 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
8746 is used in AIX.
8747 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
8748 (process_xcoff_symbol): Likewise.
8749 (scan_xcoff_symtab): Likewise.
8750
8751 2017-04-26 Alan Hayward <alan.hayward@arm.com>
8752
8753 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
8754 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
8755 (ia64_access_reg): Use get_frame_register_unsigned.
8756 (ia64_access_rse_reg): Likewise.
8757 (ia64_libunwind_frame_prev_register): Likewise.
8758
8759 2017-04-26 Jiong Wang <jiong.wang@arm.com>
8760
8761 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
8762 * gdbarch.c: Regenerated.
8763 * gdbarch.h: Regenerated.
8764 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
8765 visibility external.
8766 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
8767 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
8768 (enum cfa_how_kind): Move to ...
8769 (struct dwarf2_frame_state_reg_info): Likewise.
8770 (struct dwarf2_frame_state): Likewise.
8771 * dwarf2-frame.h: ... here.
8772 (dwarf2_frame_state_alloc_regs): New declaration.
8773 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
8774 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
8775
8776 2017-04-26 Alan Hayward <alan.hayward@arm.com>
8777
8778 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8779 regcache_raw_read_unsigned.
8780 (xtensa_pseudo_register_write): Likewise.
8781
8782 2017-04-26 Alan Hayward <alan.hayward@arm.com>
8783
8784 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8785 (nds32_pseudo_register_write): Likewise.
8786
8787 2017-04-25 Yao Qi <yao.qi@linaro.org>
8788
8789 * regcache.c (struct regcache) <readonly_p>: Change its type
8790 to bool.
8791 (regcache_xmalloc_1): Update parameter type and callers update.
8792
8793 2017-04-25 Yao Qi <yao.qi@linaro.org>
8794
8795 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8796 set_gdbarch_wchar_bit.
8797 * arm-tdep.c (arm_gdbarch_init): Likewise.
8798
8799 2017-04-25 Pedro Alves <palves@redhat.com>
8800
8801 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8802 (BothAreRelocatable, memcopy, memmove): Don't define.
8803 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8804 macros.
8805
8806 2017-04-25 Pedro Alves <palves@redhat.com>
8807
8808 * common/common-defs.h: Include "common/poison.h".
8809 * common/function-view.h: (Not, Or, Requires): Move to traits.h
8810 and adjust.
8811 * common/poison.h: New file.
8812 * common/traits.h: Include <type_traits>.
8813 (Not, Or, Requires): New, moved from common/function-view.h.
8814
8815 2017-04-25 Pedro Alves <palves@redhat.com>
8816
8817 * breakpoint.h (struct breakpoint): In-class initialize all
8818 fields. Make boolean fields "bool".
8819 * breakpoint.c (init_raw_breakpoint_without_location): Remove
8820 memset call and initializations no longer necessary.
8821
8822 2017-04-25 Pedro Alves <palves@redhat.com>
8823
8824 * btrace.c (pt_btrace_insn_flags): Change parameter type to
8825 reference.
8826 (pt_btrace_insn): New function.
8827 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8828
8829 2017-04-25 Pedro Alves <palves@redhat.com>
8830
8831 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
8832 "base" field and inherit from "bp_location" instead. Add
8833 non-default ctor.
8834 (allocate_location_exception): Use new non-default ctor.
8835 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8836 (init_bp_location): Convert to ...
8837 (bp_location::bp_location): ... this new ctor, and remove memset
8838 call.
8839 (base_breakpoint_allocate_location): Use the new non-default ctor.
8840 * breakpoint.h (bp_location): Now a class. Declare default and
8841 non-default ctors. In-class initialize all members.
8842 (init_bp_location): Remove declaration.
8843
8844 2017-04-25 Pedro Alves <palves@redhat.com>
8845
8846 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8847 assignment operator.
8848
8849 2017-04-24 Yao Qi <yao.qi@linaro.org>
8850
8851 * doublest.c (convert_doublest_to_floatformat): Call
8852 floatformat_totalsize_bytes.
8853
8854 2017-04-22 Tom Tromey <tom@tromey.com>
8855
8856 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8857 ui_out_emit_list.
8858 * stack.c (print_frame): Use ui_out_emit_list.
8859 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8860 ui_out_emit_list.
8861 * mi/mi-main.c (print_one_inferior)
8862 (mi_cmd_data_list_register_names)
8863 (mi_cmd_data_list_register_values, mi_cmd_list_features)
8864 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8865 ui_out_emit_list.
8866 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8867 (mi_output_solib_attribs): Use ui_out_emit_list,
8868 ui_out_emit_tuple.
8869 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8870 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8871 (mi_cmd_stack_list_args, list_args_or_locals): Use
8872 ui_out_emit_list.
8873 * disasm.c (do_assembly_only): Use ui_out_emit_list.
8874 * breakpoint.c (print_solib_event, output_thread_groups): Use
8875 ui_out_emit_list.
8876
8877 2017-04-22 Tom Tromey <tom@tromey.com>
8878
8879 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8880 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8881 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8882
8883 2017-04-22 Tom Tromey <tom@tromey.com>
8884
8885 * tracepoint.c (tvariables_info_1)
8886 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8887
8888 2017-04-22 Tom Tromey <tom@tromey.com>
8889
8890 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8891 annotate_arg_emitter.
8892 * breakpoint.c (print_mention_watchpoint)
8893 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8894 * annotate.h (struct annotate_arg_emitter): New.
8895
8896 2017-04-22 Tom Tromey <tom@tromey.com>
8897
8898 * record-btrace.c (record_btrace_insn_history)
8899 (record_btrace_insn_history_range, record_btrace_call_history)
8900 (record_btrace_call_history_range): Use ui_out_emit_tuple.
8901 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8902 ui_out_emit_tuple.
8903 * stack.c (print_frame_info): Use ui_out_emit_tuple.
8904 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8905 * skip.c (skip_info): Use ui_out_emit_tuple.
8906 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8907 * progspace.c (print_program_space): Use ui_out_emit_tuple.
8908 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8909 * osdata.c (info_osdata): Use ui_out_emit_tuple.
8910 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8911 ui_out_emit_tuple.
8912 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8913 (output_register, mi_cmd_data_read_memory)
8914 (mi_cmd_data_read_memory_bytes, mi_load_progress)
8915 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8916 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8917 Use ui_out_emit_tuple.
8918 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8919 ui_out_emit_tuple.
8920 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8921 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8922 * linux-thread-db.c (info_auto_load_libthread_db): Use
8923 ui_out_emit_tuple.
8924 * inferior.c (print_inferior): Use ui_out_emit_tuple.
8925 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8926 * disasm.c (do_mixed_source_and_assembly_deprecated)
8927 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8928 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8929 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8930 * breakpoint.c (print_one_breakpoint_location)
8931 (print_one_breakpoint): Use ui_out_emit_tuple.
8932 * auto-load.c (print_script, info_auto_load_cmd): Use
8933 ui_out_emit_tuple.
8934 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8935
8936 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
8937
8938 * thread.c (print_thread_info_1): Remove dead code.
8939
8940 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8941
8942 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8943 GDB_SELF_TEST.
8944 * arm-tdep.c (selftests::arm_record_test): Likewise.
8945
8946 2017-04-21 Yao Qi <yao.qi@linaro.org>
8947
8948 * regcache.c (regcache_restore): Remove argument 2. Replace
8949 argument 3 with regcache. Get register status from
8950 src->register_status and get register contents from
8951 register_buffer (src, regnum).
8952 (regcache_cpy): Update.
8953
8954 2017-04-19 Pedro Alves <palves@redhat.com>
8955
8956 * gdbthread.h (thread): Add missing closing parenthesis in
8957 comment.
8958
8959 2017-04-19 Pedro Alves <palves@redhat.com>
8960
8961 * common/refcounted-object.h: New file.
8962 * gdbthread.h: Include "common/refcounted-object.h".
8963 (thread_info): Inherit from refcounted_object and add comments.
8964 (thread_info::incref, thread_info::decref)
8965 (thread_info::m_refcount): Delete.
8966 (thread_info::deletable): Use the refcounted_object::refcount()
8967 method.
8968 * inferior.c (current_inferior_): Add comment.
8969 (set_current_inferior): Increment/decrement refcounts.
8970 (prune_inferiors, remove_inferior_command): Skip inferiors marked
8971 not-deletable instead of comparing with the current inferior.
8972 (initialize_inferiors): Increment the initial inferior's refcount.
8973 * inferior.h (struct inferior): Forward declare.
8974 Include "common/refcounted-object.h".
8975 (current_inferior, set_current_inferior): Move declaration to
8976 before struct inferior's definition, and fix comment.
8977 (inferior): Inherit from refcounted_object. Add comments.
8978 * thread.c (switch_to_thread_no_regs): Reference the thread's
8979 inferior pointer directly instead of doing a ptid lookup.
8980 (switch_to_no_thread): New function.
8981 (switch_to_thread(thread_info *)): New function, factored out
8982 from ...
8983 (switch_to_thread(ptid_t)): ... this.
8984 (restore_current_thread): Delete.
8985 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8986 fields, and add 'inf' field.
8987 (do_restore_current_thread_cleanup): Check whether old->inf is
8988 alive instead of looking up an inferior by ptid. Use
8989 switch_to_thread and switch_to_no_thread.
8990 (restore_current_thread_cleanup_dtor): Use old->inf directly
8991 instead of lookup up an inferior by id. Decref the inferior.
8992 Don't restore 'removable'.
8993 (make_cleanup_restore_current_thread): Same the inferior pointer
8994 in old, instead of the inferior number. Incref the inferior.
8995 Don't save/clear 'removable'.
8996
8997 2017-04-19 Pedro Alves <palves@redhat.com>
8998
8999 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9000 unittests/scoped_restore-selftests.c.
9001 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9002 * common/scoped_restore.h (scoped_restore_base): Make "class".
9003 (scoped_restore_base::release): New public method.
9004 (scoped_restore_base::scoped_restore_base): New protected ctor.
9005 (scoped_restore_base::m_saved_var): New protected field.
9006 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9007 scoped_restore_base base class instead of m_saved_var directly.
9008 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9009 (scoped_restore_tmpl::scoped_restore_tmpl(const
9010 scoped_restore_tmpl<T>&)): Likewise.
9011 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9012 method.
9013 (scoped_restore_tmpl::saved_var): New method.
9014 (scoped_restore_tmpl::m_saved_var): Delete.
9015 * inferior.h (inferior::detaching): Now a bool.
9016 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9017 cleanup.
9018 * unittests/scoped_restore-selftests.c: New file.
9019
9020 2017-04-19 Pedro Alves <palves@redhat.com>
9021
9022 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9023 Re-sort in alphabetic order.
9024
9025 2017-04-18 Pedro Alves <palves@redhat.com>
9026
9027 * xml-support.c (obstack_xml_printf): Delete.
9028 * xml-support.h (obstack_xml_printf): Delete.
9029
9030 2017-04-18 Pedro Alves <palves@redhat.com>
9031
9032 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9033 vdebug, verror, body_text, start_element, end_element, name,
9034 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9035 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9036 is_xinclude>: Make private and add m_ prefix.
9037 (gdb_xml_parser::body_text): New method, based on ...
9038 (gdb_xml_body_text): ... this. Adjust.
9039 (gdb_xml_parser::vdebug): New method, based on ...
9040 (gdb_xml_debug): ... this. Adjust.
9041 (gdb_xml_parser::verror): New method, based on ...
9042 (gdb_xml_error): ... this. Adjust.
9043 (gdb_xml_parser::start_element): New method, based on ...
9044 (gdb_xml_start_element): ... this. Adjust.
9045 (gdb_xml_start_element_wrapper): Defer to
9046 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9047 (gdb_xml_parser::end_element): New method, based on ...
9048 (gdb_xml_end_element_wrapper): ... this. Adjust.
9049 (gdb_xml_parser::~gdb_xml_parser): Adjust.
9050 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9051 (gdb_xml_parser::use_dtd): New method, based on ...
9052 (gdb_xml_use_dtd): ... this. Adjust.
9053 (gdb_xml_parser::parse): New method, based on ...
9054 (gdb_xml_parse): ... this. Adjust.
9055 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9056 (xinclude_start_include): Adjust to call the parser's name method.
9057 (xml_xinclude_default, xml_xinclude_start_doctype)
9058 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9059 method.
9060 (xml_process_xincludes): Adjust to call parser methods.
9061 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9062 declarations.
9063
9064 2017-04-18 Pedro Alves <palves@redhat.com>
9065
9066 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9067 gdb::optional<std::string>.
9068 * xml-support.c: Include <string>.
9069 (scope_level::scope_level(scope_level &&))
9070 (scope_level::~scope_level): Delete.
9071 (scope_level::body): Now a std::string.
9072 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9073 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9074 parameter.
9075 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9076 (xinclude_parsing_data::output): Now a std::string reference.
9077 (xinclude_start_include): Adjust.
9078 (xml_xinclude_default): Adjust.
9079 (xml_process_xincludes): Add 'output' parameter, and return bool.
9080 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9081 and return bool.
9082 * xml-tdesc.c: Include <unordered_map> and <string>.
9083 (tdesc_xml_cache): Delete.
9084 (tdesc_xml_cache_s): Delete.
9085 (xml_cache): Now an std::unordered_map.
9086 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9087 (target_fetch_description_xml): Change return type to
9088 gdb::optional<std::string>, and adjust.
9089 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9090 (target_fetch_description_xml): Change return type to
9091 gdb::optional<std::string>.
9092
9093 2017-04-18 Pedro Alves <palves@redhat.com>
9094
9095 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9096 unittests/optional-selftests.c.
9097 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9098 * unittests/optional-selftests.c: New file.
9099 * unittests/optional/assignment/1.cc: New file.
9100 * unittests/optional/assignment/2.cc: New file.
9101 * unittests/optional/assignment/3.cc: New file.
9102 * unittests/optional/assignment/4.cc: New file.
9103 * unittests/optional/assignment/5.cc: New file.
9104 * unittests/optional/assignment/6.cc: New file.
9105 * unittests/optional/assignment/7.cc: New file.
9106 * unittests/optional/cons/copy.cc: New file.
9107 * unittests/optional/cons/default.cc: New file.
9108 * unittests/optional/cons/move.cc: New file.
9109 * unittests/optional/cons/value.cc: New file.
9110 * unittests/optional/in_place.cc: New file.
9111 * unittests/optional/observers/1.cc: New file.
9112 * unittests/optional/observers/2.cc: New file.
9113
9114 2017-04-18 Pedro Alves <palves@redhat.com>
9115
9116 * common/gdb_optional.h: Include common/traits.h.
9117 (in_place_t): New type.
9118 (in_place): New constexpr variable.
9119 (optional::optional): Remove member initialization of
9120 m_instantiated.
9121 (optional::optional(in_place_t...)): New constructor.
9122 (optional::~optional): Use reset.
9123 (optional::optional(const optional&)): New.
9124 (optional::optional(const optional&&)): New.
9125 (optional::optional(T &)): New.
9126 (optional::optional(T &&)): New.
9127 (operator::operator=(const optional &)): New.
9128 (operator::operator=(optional &&)): New.
9129 (operator::operator= (const T &))
9130 (operator::operator= (T &&))
9131 (operator::emplace (Args &&... args)): Return a T&. Use reset.
9132 (operator::reset): New.
9133 (operator::m_instantiated):: Add in-class initializer.
9134 * common/traits.h: Include <type_traits>.
9135 (struct And): New types.
9136
9137 2017-04-18 Pedro Alves <palves@redhat.com>
9138
9139 * xml-support.c: Include <vector>.
9140 (scope_level::scope_level(const gdb_xml_element *))
9141 (scope_level::scope_level(scope_level&&)): New.
9142 (scope_level::~scope_level): New.
9143 (scope_level_s): Delete.
9144 (gdb_xml_parser::scopes): Now a std::vector.
9145 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9146 Use std::vector.
9147 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9148 scope cleanup code.
9149 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9150 of the scopes member. Use std::vector::emplace_back.
9151
9152 2017-04-18 Pedro Alves <palves@redhat.com>
9153
9154 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
9155 a bool.
9156 (gdb_xml_end_element): Change type of first parameter.
9157 (gdb_xml_cleanup): Rename to ...
9158 (gdb_xml_parser::~gdb_xml_parser): ... this.
9159 (gdb_xml_create_parser_and_cleanup): Delete with ...
9160 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9161 to this new ctor.
9162 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9163 using gdb_xml_create_parser_and_cleanup.
9164 (xinclude_parsing_data): Add ctor/dtor.
9165 (xml_xinclude_cleanup): Delete.
9166 (xml_process_xincludes): Create a local xinclude_parsing_data
9167 instead of heap-allocating one. Create a local gdb_xml_parser
9168 instead of heap-allocating one with
9169 gdb_xml_create_parser_and_cleanup.
9170
9171 2017-04-18 John Baldwin <jhb@FreeBSD.org>
9172
9173 PR threads/20743
9174 * fbsd-nat.c (resume_one_thread_cb): Remove.
9175 (resume_all_threads_cb): Remove.
9176 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9177 iterate_over_threads.
9178
9179 2017-04-17 Joel Brobecker <brobecker@adacore.com>
9180
9181 * NEWS: Create a new section for the next release branch.
9182 Rename the section of the current branch, now that it has
9183 been cut.
9184
9185 2017-04-17 Joel Brobecker <brobecker@adacore.com>
9186
9187 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9188 * version.in: Bump version to 8.0.50.DATE-git.
9189
9190 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
9191
9192 PR gdb/21385
9193 * windows-nat.c (windows_create_inferior): Declare 'allargs'
9194 independently of the host, and fix build breakage on Cygwin.
9195
9196 2017-04-13 Pedro Alves <palves@redhat.com>
9197
9198 * inferior.c (free_inferior): Convert to ...
9199 (inferior::~inferior): ... this dtor.
9200 (inferior::inferior): New ctor, factored out from ...
9201 (add_inferior_silent): ... here. Allocate the inferior with a new
9202 expression.
9203 (delete_inferior): Call delete instead of free_inferior.
9204 * inferior.h (gdb_environ, continuation): Forward declare.
9205 (inferior): Now a class. Add in-class initialization to all
9206 members. Make boolean fields bool, except 'detaching'.
9207 (inferior::inferior): New explicit ctor.
9208 (inferior::~inferior): New.
9209
9210 2017-04-13 Pedro Alves <palves@redhat.com>
9211
9212 * inferior.c (init_inferior_list): Delete.
9213 * inferior.h (init_inferior_list): Delete.
9214
9215 2017-04-13 Pedro Alves <palves@redhat.com>
9216
9217 PR threads/13217
9218 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
9219 (top level): Call it twice, with different thread sets.
9220
9221 2017-04-13 Pedro Alves <palves@redhat.com>
9222
9223 * thread.c: Include <algorithm>.
9224 (thread_array_cleanup): Delete.
9225 (scoped_inc_dec_ref): New class.
9226 (live_threads_count): New function.
9227 (set_thread_refcount): Delete.
9228 (tp_array_compar_ascending): Now a bool.
9229 (tp_array_compar): Convert to a std::sort comparison function.
9230 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9231 and live_threads_count.
9232
9233 2017-04-13 Pedro Alves <palves@redhat.com>
9234
9235 * infrun.c (follow_fork_inferior): Also switch the current
9236 inferior.
9237
9238 2017-04-13 Pedro Alves <palves@redhat.com>
9239
9240 * breakpoint.c (watch_command_1): Save watchpoint-frame info
9241 before calling create_internal_breakpoint.
9242
9243 2017-04-13 Pedro Alves <palves@redhat.com>
9244
9245 * fork-child.c (execv_argv): New class.
9246 (breakup_args): Refactored as ...
9247 (execv_argv::init_for_no_shell): .. this method of execv_argv.
9248 Copy arguments to storage and replace separators with NULL
9249 terminators in place.
9250 (escape_bang_in_quoted_argument): Adjust to return bool.
9251 (execv_argv::execv_argv): New ctor.
9252 (execv_argv::init_for_shell): New method, factored out from
9253 fork_inferior. Don't strdup strings into the vector.
9254 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
9255 Remove free_vector_argv call.
9256
9257 2017-04-13 Yao Qi <yao.qi@linaro.org>
9258
9259 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
9260 tdep->rx_psw_type.
9261
9262 2017-04-13 Yao Qi <yao.qi@linaro.org>
9263
9264 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
9265 * rx-tdep.c (rx_gdbarch_init): Likewise.
9266
9267 2017-04-13 Pedro Alves <palves@redhat.com>
9268
9269 * breakpoint.h (struct breakpoint): Reindent.
9270
9271 2017-04-13 Pedro Alves <palves@redhat.com>
9272
9273 * breakpoint.c (bp_location): Rename to ...
9274 (bp_locations): ... this. All references updated.
9275 (bp_location_count): Rename to ...
9276 (bp_locations_count): ... this. All references updated.
9277 (bp_location_placed_address_before_address_max): Rename to ...
9278 (bp_locations_placed_address_before_address_max): ... this. All
9279 references updated.
9280 (bp_location_shadow_len_after_address_max): Rename to ...
9281 (bp_locations_shadow_len_after_address_max): ... this. All
9282 references updated.
9283 (bp_location_compare_addrs): Rename to ...
9284 (bp_locations_compare_addrs): ... this. All references updated.
9285 (bp_location_compare):Rename to ...
9286 (bp_locations_compare): ... this. All references updated.
9287 (bp_location_target_extensions_update): Rename to ...
9288 (bp_locations_target_extensions_update): ... this. All references
9289 updated.
9290
9291 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
9292
9293 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
9294 * common/common.m4: Check headers 'termios.h', 'termio.h' and
9295 'sgtty.h'.
9296 * common/gdb_termios.h: New file, with parts of "terminal.h".
9297 * inflow.c: Include "gdb_termios.h".
9298 * ser-unix.c: Include "gdb_termios.h".
9299 * terminal.h: Move terminal-related defines to
9300 "common/gdb_termios.h".
9301
9302 2017-04-12 Tom Tromey <tom@tromey.com>
9303
9304 * probe.c (parse_probes): Update.
9305 * location.h (delete_event_location): Don't declare.
9306 (event_location_deleter::operator()): Update.
9307 * location.c (event_location_deleter::operator()): Rename from
9308 delete_event_location.
9309 * linespec.h (linespec_result) <location>: Change type to
9310 event_location_up.
9311 * linespec.c (canonicalize_linespec, event_location_to_sals)
9312 (decode_objc): Update.
9313 (linespec_result): Don't call delete_event_location.
9314 * breakpoint.c (create_breakpoints_sal)
9315 (bkpt_probe_create_sals_from_location)
9316 (strace_marker_create_sals_from_location): Update.
9317
9318 2017-04-12 Tom Tromey <tom@tromey.com>
9319
9320 * linespec.h (struct linespec_result): Add constructor and
9321 destructor.
9322 (init_linespec_result, destroy_linespec_result)
9323 (make_cleanup_destroy_linespec_result): Don't declare.
9324 * linespec.c (init_linespec_result): Remove.
9325 (linespec_result::~linespec_result): Rename from
9326 destroy_linespec_result. Update.
9327 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
9328 Remove.
9329 * breakpoint.c (create_breakpoint, break_range_command)
9330 (decode_location_default): Update.
9331 * ax-gdb.c (agent_command_1): Update.
9332
9333 2017-04-12 Tom Tromey <tom@tromey.com>
9334
9335 * remote.c (remote_download_tracepoint): Update.
9336 * python/py-breakpoint.c (bppy_get_location): Update.
9337 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
9338 (gdbscm_breakpoint_location): Update.
9339 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
9340 * breakpoint.h (struct breakpoint) <location, location_range_end>:
9341 Change type to event_location_up.
9342 * breakpoint.c (create_overlay_event_breakpoint)
9343 (create_longjmp_master_breakpoint)
9344 (create_std_terminate_master_breakpoint)
9345 (create_exception_master_breakpoint)
9346 (breakpoint_event_location_empty_p, print_breakpoint_location)
9347 (print_one_breakpoint_location, create_thread_event_breakpoint)
9348 (init_breakpoint_sal, create_breakpoint)
9349 (print_recreate_ranged_breakpoint, break_range_command)
9350 (init_ada_exception_breakpoint, say_where): Update.
9351 (base_breakpoint_dtor): Don't call delete_event_location.
9352 (bkpt_print_recreate, tracepoint_print_recreate)
9353 (dprintf_print_recreate, update_static_tracepoint)
9354 (breakpoint_re_set_default): Update.
9355
9356 2017-04-12 Tom Tromey <tom@tromey.com>
9357
9358 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
9359 type of "to_do". Update.
9360 (compute_stack_depth): Use std::vector.
9361
9362 2017-04-12 Tom Tromey <tom@tromey.com>
9363
9364 * printcmd.c (find_instruction_backward): Use std::vector.
9365
9366 2017-04-12 Tom Tromey <tom@tromey.com>
9367
9368 * symfile.c (objfilep): Remove typedef.
9369 (reread_symbols): Use a std::vector.
9370
9371 2017-04-12 Tom Tromey <tom@tromey.com>
9372
9373 * mi/mi-main.c (exec_direction_forward): Remove.
9374 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
9375 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
9376 scoped_restore.
9377 * guile/guile.c (guile_repl_command, guile_command)
9378 (gdbscm_execute_gdb_command): Use scoped_restore.
9379 * go-exp.y (go_parse): Use scoped_restore.
9380 * d-exp.y (d_parse): Use scoped_restore.
9381 * cli/cli-decode.c (cmd_func): Use scoped_restore.
9382 * c-exp.y (c_parse): Use scoped_restore.
9383
9384 2017-04-12 Tom Tromey <tom@tromey.com>
9385
9386 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
9387 (mi_parse): Update return type.
9388 (mi_parse_free): Remove.
9389 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
9390 (mi_parse::~mi_parse): Rename from mi_parse_free.
9391 (mi_parse_cleanup): Remove.
9392 (mi_parse): Return a unique_ptr. Use new.
9393 * mi/mi-main.c (mi_execute_command): Update.
9394
9395 2017-04-12 Tom Tromey <tom@tromey.com>
9396
9397 * location.c (explicit_location_lex_one): Return a
9398 unique_xmalloc_ptr.
9399 (string_to_explicit_location): Update. Remove cleanups.
9400
9401 2017-04-12 Tom Tromey <tom@tromey.com>
9402
9403 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
9404 (compare_value_and_voffset): Change type. Update.
9405 (compute_vtable_size): Change type of "offset_vec".
9406 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
9407 (gnuv3_get_typeid): Remove extraneous declaration.
9408
9409 2017-04-12 Tom Tromey <tom@tromey.com>
9410
9411 * charset.h (wchar_iterator): Fix comment.
9412
9413 2017-04-12 Tom Tromey <tom@tromey.com>
9414
9415 * charset.c (iconv_wrapper): New class.
9416 (cleanup_iconv): Remove.
9417 (convert_between_encodings): Use it.
9418
9419 2017-04-12 Tom Tromey <tom@tromey.com>
9420
9421 * symfile.h (increment_reading_symtab): Update type.
9422 * symfile.c (decrement_reading_symtab): Remove.
9423 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
9424 * psymtab.c (psymtab_to_symtab): Update.
9425 * dwarf2read.c (dw2_instantiate_symtab): Update.
9426
9427 2017-04-12 Tom Tromey <tom@tromey.com>
9428
9429 * jit.c (struct jit_reader): Declare separately. Add constructor
9430 and destructor. Change type of "handle".
9431 (loaded_jit_reader): Define separately.
9432 (jit_reader_load): Update. New "new".
9433 (jit_reader_unload_command): Use "delete".
9434 * gdb-dlfcn.h (struct dlclose_deleter): New.
9435 (gdb_dlhandle_up): New typedef.
9436 (gdb_dlopen, gdb_dlsym): Update types.
9437 (gdb_dlclose): Remove.
9438 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
9439 (gdb_dlsym): Change type of "handle".
9440 (make_cleanup_dlclose): Remove.
9441 (dlclose_deleter::operator()): Rename from gdb_dlclose.
9442 * compile/compile-c-support.c (load_libcc): Update.
9443
9444 2017-04-12 Tom Tromey <tom@tromey.com>
9445
9446 * symtab.h (find_pcs_for_symtab_line): Change return type.
9447 * symtab.c (find_pcs_for_symtab_line): Change return type.
9448 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
9449 type of "vec". Update.
9450 (ltpy_get_pcs_for_line): Update.
9451 * linespec.c (decode_digits_ordinary): Update.
9452
9453 2017-04-12 Tom Tromey <tom@tromey.com>
9454
9455 * tracepoint.c (actions_command): Update.
9456 * python/python.c (python_command, python_interactive_command):
9457 Update.
9458 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9459 * guile/guile.c (guile_command): Update.
9460 * defs.h (read_command_lines, read_command_lines_1): Return
9461 command_line_up.
9462 (command_lines_deleter): New struct.
9463 (command_line_up): New typedef.
9464 * compile/compile.c (compile_code_command)
9465 (compile_print_command): Update.
9466 * cli/cli-script.h (get_command_line, copy_command_lines): Return
9467 command_line_up.
9468 (make_cleanup_free_command_lines): Remove.
9469 * cli/cli-script.c (get_command_line, read_command_lines_1)
9470 (copy_command_lines): Return command_line_up.
9471 (while_command, if_command, read_command_lines, define_command)
9472 (document_command): Update.
9473 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
9474 Remove.
9475 * breakpoint.h (breakpoint_set_commands): Change type of
9476 "commands".
9477 * breakpoint.c (breakpoint_set_commands): Change type of
9478 "commands". Update.
9479 (do_map_commands_command, update_dprintf_command_list)
9480 (create_tracepoint_from_upload): Update.
9481
9482 2017-04-12 Tom Tromey <tom@tromey.com>
9483
9484 * tracepoint.c (scope_info): Update.
9485 * spu-tdep.c (spu_catch_start): Update.
9486 * python/python.c (gdbpy_decode_line): Update.
9487 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
9488 * python/py-breakpoint.c (bppy_init): Update.
9489 * probe.c (parse_probes): Update.
9490 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
9491 * location.h (event_location_deleter): New struct.
9492 (event_location_up): New typedef.
9493 (new_linespec_location, new_address_location, new_probe_location)
9494 (new_explicit_location, copy_event_location)
9495 (string_to_event_location, string_to_event_location_basic)
9496 (string_to_explicit_location): Update return type.
9497 (make_cleanup_delete_event_location): Remove.
9498 * location.c (new_linespec_location, new_address_location)
9499 (new_probe_location, new_explicit_location, copy_event_location):
9500 Return event_location_up.
9501 (delete_event_location_cleanup)
9502 (make_cleanup_delete_event_location): Remove.
9503 (string_to_explicit_location, string_to_event_location_basic)
9504 (string_to_event_location): Return event_location_up.
9505 * linespec.c (canonicalize_linespec, event_location_to_sals)
9506 (decode_line_with_current_source)
9507 (decode_line_with_last_displayed, decode_objc): Update.
9508 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
9509 * completer.c (location_completer): Update.
9510 * cli/cli-cmds.c (edit_command, list_command): Update.
9511 * breakpoint.c (create_overlay_event_breakpoint)
9512 (create_longjmp_master_breakpoint)
9513 (create_std_terminate_master_breakpoint)
9514 (create_exception_master_breakpoint)
9515 (create_thread_event_breakpoint): Update.
9516 (init_breakpoint_sal): Update. Remove some dead code.
9517 (create_breakpoint_sal): Change type of "location". Update.
9518 (create_breakpoints_sal, create_breakpoint, break_command_1)
9519 (dprintf_command, break_range_command, until_break_command)
9520 (init_ada_exception_breakpoint)
9521 (strace_marker_create_sals_from_location)
9522 (update_static_tracepoint, trace_command, ftrace_command)
9523 (strace_command, create_tracepoint_from_upload): Update.
9524 * break-catch-throw.c (re_set_exception_catchpoint): Update.
9525 * ax-gdb.c (agent_command_1): Update.
9526
9527 2017-04-12 Pedro Alves <palves@redhat.com>
9528
9529 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
9530 * configure.tgt: Handle i[34567]86-*-go32* and
9531 i[34567]86-*-msdosdjgpp*.
9532 * i386-tdep.c (i386_svr4_reg_to_regnum):
9533 Make extern.
9534 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
9535 i386-go32-tdep.c.
9536 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
9537 * i386-go32-tdep.c: New file.
9538 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
9539 declarations.
9540
9541 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
9542
9543 * aix-thread.c (pd_status2str): Change return type to const char *.
9544
9545 2017-04-12 Pedro Alves <palves@redhat.com>
9546
9547 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
9548 calls to set_gdbarch_gnu_triplet_regexp.
9549
9550 2017-04-12 Pedro Alves <palves@redhat.com>
9551
9552 PR gdb/21323
9553 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
9554 New enum value.
9555 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
9556 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
9557 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
9558 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
9559 * gdbarch.h, gdbarch.c: Regenerate.
9560 * aarch64-tdep.c (aarch64_gdbarch_init): Override
9561 gdbarch_wchar_bit and gdbarch_wchar_signed.
9562 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
9563 * arm-tdep.c (arm_gdbarch_init): Likewise.
9564 * avr-tdep.c (avr_gdbarch_init): Likewise.
9565 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
9566 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
9567 * i386-tdep.c (i386_go32_init_abi): Likewise.
9568 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9569 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9570 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9571 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9572 * sh-tdep.c (sh_gdbarch_init): Likewise.
9573 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9574 * sparc64-tdep.c (sparc64_init_abi): Likewise.
9575 * windows-tdep.c (windows_init_abi): Likewise.
9576 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9577
9578 2017-04-12 Pedro Alves <palves@redhat.com>
9579
9580 PR c++/21323
9581 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
9582 cplus_primitive_type_char32_t>: New enum values.
9583 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
9584 and cplus_primitive_type_char32_t.
9585 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
9586 32, use the archtecture's built-in type for char16_t and char32_t,
9587 respectively. Otherwise, fallback to init_integer_type as before,
9588 but make the type unsigned, and issue a complaint.
9589 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
9590
9591 2017-04-12 Alan Hayward <alan.hayward@arm.com>
9592
9593 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
9594 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
9595
9596 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
9597
9598 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
9599 'const char *'.
9600
9601 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
9602
9603 * common/common-utils.c (free_vector_argv): New function.
9604 * common/common-utils.h: Include <vector>.
9605 (free_vector_argv): New prototype.
9606 * darwin-nat.c (darwin_create_inferior): Rewrite function
9607 prototype in order to constify "exec_file" and accept a
9608 "std::string" for "allargs".
9609 * fork-child.c: Include <vector>.
9610 (breakup_args): Rewrite function, using C++.
9611 (fork_inferior): Rewrite function header, constify "exec_file_arg"
9612 and accept "std::string" for "allargs". Update the code to
9613 calculate "argv" based on "allargs". Update calls to "exec_fun"
9614 and "execvp".
9615 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
9616 order to constify "exec_file" and accept a "std::string" for
9617 "allargs".
9618 * go32-nat.c (go32_create_inferior): Likewise.
9619 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
9620 * infcmd.c (run_command_1): Constify "exec_file". Use
9621 "std::string" for inferior arguments.
9622 * inferior.h (fork_inferior): Update prototype.
9623 * linux-nat.c (linux_nat_create_inferior): Rewrite function
9624 prototype in order to constify "exec_file" and accept a
9625 "std::string" for "allargs".
9626 * nto-procfs.c (procfs_create_inferior): Likewise.
9627 * procfs.c (procfs_create_inferior): Likewise.
9628 * remote-sim.c (gdbsim_create_inferior): Likewise.
9629 * remote.c (extended_remote_run): Update code to accept
9630 "std::string" as argument.
9631 (extended_remote_create_inferior): Rewrite function prototype in
9632 order to constify "exec_file" and accept a "std::string" for
9633 "allargs".
9634 * rs6000-nat.c (super_create_inferior): Likewise.
9635 (rs6000_create_inferior): Likewise.
9636 * target.h (struct target_ops) <to_create_inferior>: Likewise.
9637 * windows-nat.c (windows_create_inferior): Likewise.
9638
9639 2017-04-11 Pedro Alves <palves@redhat.com>
9640
9641 * thread.c: Fix whitespace throughout.
9642
9643 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
9644
9645 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
9646
9647 2017-04-11 Alan Hayward <alan.hayward@arm.com>
9648
9649 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
9650
9651 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
9652
9653 PR gdb/21364
9654 * osdata.c (info_osdata): Check if 'type' is an empty string
9655 instead of NULL.
9656
9657 2017-04-10 Pedro Alves <palves@redhat.com>
9658
9659 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
9660 (ptid_to_global_thread_id, in_thread_list)
9661 (do_captured_list_thread_ids, set_resumed, set_running)
9662 (set_executing, set_stop_requested, finish_thread_state)
9663 (validate_registers_access, can_access_registers_ptid)
9664 (print_thread_info_1, switch_to_thread)
9665 (do_restore_current_thread_cleanup)
9666 (make_cleanup_restore_current_thread, thread_command)
9667 (thread_name_command): Use operator== instead of ptid_equal.
9668
9669 2017-04-10 Pedro Alves <palves@redhat.com>
9670
9671 * thread.c (struct current_thread_cleanup) <next>: Delete field.
9672 (current_thread_cleanup_chain): Delete.
9673 (restore_current_thread_cleanup_dtor)
9674 (make_cleanup_restore_current_thread): Remove references to
9675 current_thread_cleanup_chain.
9676
9677 2017-04-10 Alan Hayward <alan.hayward@arm.com>
9678
9679 * msp430-tdep.c (msp430_pseudo_register_read): Never return
9680 REG_UNKNOWN.
9681
9682 2017-04-10 Yao Qi <yao.qi@linaro.org>
9683
9684 PR gdb/19942
9685 * gdbthread.h (thread_info::deletable): New method.
9686 (thread_info::incref): New method.
9687 (thread_info::decref): New method.
9688 (thread_info::refcount): Move it to private.
9689 * infrun.c (save_stop_context): Call inc_refcount.
9690 (release_stop_context_cleanup): Likewise.
9691 * thread.c (set_thread_exited): New function.
9692 (init_thread_list): Delete "tp" only it is deletable, otherwise
9693 call set_thread_exited.
9694 (delete_thread_1): Call set_thread_exited.
9695 (current_thread_cleanup) <inferior_pid>: Remove.
9696 <thread>: New field.
9697 (restore_current_thread_ptid_changed): Removed.
9698 (do_restore_current_thread_cleanup): Adjust.
9699 (restore_current_thread_cleanup_dtor): Don't call
9700 find_thread_ptid.
9701 (set_thread_refcount): Use dec_refcount.
9702 (make_cleanup_restore_current_thread): Adjust.
9703 (thread_apply_all_command): Call inc_refcount.
9704 (_initialize_thread): Don't call
9705 observer_attach_thread_ptid_changed.
9706
9707 2017-04-10 Yao Qi <yao.qi@linaro.org>
9708
9709 * thread.c (delete_thread_1): Hoist code on marking thread as
9710 exited.
9711
9712 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9713
9714 * windows-nat.c (windows_detach): Initialize ptid with
9715 minus_one_ptid.
9716
9717 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
9718
9719 * unittests/ptid-selftests.c: Fix erroneous assert messages.
9720
9721 2017-04-07 Alan Hayward <alan.hayward@arm.com>
9722
9723 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
9724 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
9725 (bfin_pseudo_register_write): Likewise
9726
9727 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
9728
9729 * common/ptid.h (struct ptid): Change to...
9730 (class ptid_t): ... this.
9731 <ptid_t>: New constructors.
9732 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
9733 matches>: New methods.
9734 <make_null, make_minus_one>: New static methods.
9735 <pid>: Rename to...
9736 <m_pid>: ...this.
9737 <lwp>: Rename to...
9738 <m_lwp>: ...this.
9739 <tid>: Rename to...
9740 <m_tid>: ...this.
9741 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
9742 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
9743 as references, move comment to class ptid_t.
9744 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
9745 ptid_t static methods.
9746 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
9747 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
9748 Take ptid arguments as references, implement using ptid_t methods.
9749 * unittests/ptid-selftests.c: New file.
9750 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9751 unittests/ptid-selftests.c.
9752 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
9753
9754 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
9755
9756 * python/python.c (python_run_simple_file): Cast mode literal to
9757 non-const char pointer as expected by PyFile_FromString.
9758
9759 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
9760
9761 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
9762 minus_one_ptid and null_ptid.
9763
9764 2017-04-05 Pedro Alves <palves@redhat.com>
9765
9766 * warning.m4 (build_warnings): Remove -Wno-write-strings.
9767 * configure: Regenerate.
9768
9769 2017-04-05 Pedro Alves <palves@redhat.com>
9770
9771 * ada-exp.y (yyerror): Constify.
9772 * ada-lang.c (bound_name, get_selections)
9773 (ada_variant_discrim_type)
9774 (ada_variant_discrim_name, ada_value_struct_elt)
9775 (ada_lookup_struct_elt_type, is_unchecked_variant)
9776 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
9777 (catch_ada_exception_command_split)
9778 (catch_ada_assert_command_split, catch_assert_command)
9779 (ada_op_name): Constify.
9780 * ada-lang.h (ada_yyerror, get_selections)
9781 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9782 * arc-tdep.c (arc_print_frame_cache): Constify.
9783 * arm-tdep.c (arm_skip_stub): Constify.
9784 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9785 (gen_aggregate_elt_ref): Constify.
9786 * bcache.c (print_bcache_statistics): Constify.
9787 * bcache.h (print_bcache_statistics): Constify.
9788 * break-catch-throw.c (catch_exception_command_1):
9789 * breakpoint.c (struct ep_type_description::description):
9790 Constify.
9791 (add_solib_catchpoint): Constify.
9792 (catch_fork_command_1): Add cast.
9793 (add_catch_command): Constify.
9794 * breakpoint.h (add_catch_command, add_solib_catchpoint):
9795 Constify.
9796 * bsd-uthread.c (bsd_uthread_state): Constify.
9797 * buildsym.c (patch_subfile_names): Constify.
9798 * buildsym.h (next_symbol_text_func, patch_subfile_names):
9799 Constify.
9800 * c-exp.y (yyerror): Constify.
9801 (token::oper): Constify.
9802 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9803 * c-varobj.c (cplus_describe_child): Constify.
9804 * charset.c (find_charset_names): Add cast.
9805 (find_charset_names): Constify array and add const_cast.
9806 * cli/cli-cmds.c (complete_command, cd_command): Constify.
9807 (edit_command): Constify.
9808 * cli/cli-decode.c (lookup_cmd): Constify.
9809 * cli/cli-dump.c (dump_memory_command, dump_value_command):
9810 Constify.
9811 (struct dump_context): Constify.
9812 (add_dump_command, restore_command): Constify.
9813 * cli/cli-script.c (get_command_line): Constify.
9814 * cli/cli-script.h (get_command_line): Constify.
9815 * cli/cli-utils.c (check_for_argument): Constify.
9816 * cli/cli-utils.h (check_for_argument): Constify.
9817 * coff-pe-read.c (struct read_pe_section_data): Constify.
9818 * command.h (lookup_cmd): Constify.
9819 * common/print-utils.c (decimal2str): Constify.
9820 * completer.c (gdb_print_filename): Constify.
9821 * corefile.c (set_gnutarget): Constify.
9822 * cp-name-parser.y (yyerror): Constify.
9823 * cp-valprint.c (cp_print_class_member): Constify.
9824 * cris-tdep.c (cris_register_name, crisv32_register_name):
9825 Constify.
9826 * d-exp.y (yyerror): Constify.
9827 (struct token::oper): Constify.
9828 * d-lang.h (d_yyerror): Constify.
9829 * dbxread.c (struct header_file_location::name): Constify.
9830 (add_old_header_file, add_new_header_file, last_function_name)
9831 (dbx_next_symbol_text, add_bincl_to_list)
9832 (find_corresponding_bincl_psymtab, set_namestring)
9833 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9834 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9835 * defs.h (command_line_input, print_address_symbolic)
9836 (deprecated_readline_begin_hook): Constify.
9837 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9838 Constify.
9839 * event-top.c (handle_line_of_input): Constify and add cast.
9840 * exceptions.c (catch_errors): Constify.
9841 * exceptions.h (catch_errors): Constify.
9842 * expprint.c (print_subexp_standard, op_string, op_name)
9843 (op_name_standard, dump_raw_expression, dump_raw_expression):
9844 * expression.h (op_name, op_string, dump_raw_expression):
9845 Constify.
9846 * f-exp.y (yyerror): Constify.
9847 (struct token::oper): Constify.
9848 (struct f77_boolean_val::name): Constify.
9849 * f-lang.c (f_word_break_characters): Constify.
9850 * f-lang.h (f_yyerror): Constify.
9851 * fork-child.c (fork_inferior): Add cast.
9852 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9853 (new_variant): Constify.
9854 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9855 * gdbarch.c: Regenerate.
9856 * gdbcore.h (set_gnutarget): Constify.
9857 * go-exp.y (yyerror): Constify.
9858 (token::oper): Constify.
9859 * go-lang.h (go_yyerror): Constify.
9860 * go32-nat.c (go32_sysinfo): Constify.
9861 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9862 * guile/scm-cmd.c (cmdscm_function): Constify.
9863 * guile/scm-param.c (pascm_param_value): Constify.
9864 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9865 (h8300sx_register_name): Constify.
9866 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9867 Constify.
9868 * ia64-tdep.c (ia64_register_names): Constify.
9869 * infcmd.c (construct_inferior_arguments): Constify.
9870 (path_command, attach_post_wait): Constify.
9871 * language.c (show_range_command, show_case_command)
9872 (unk_lang_error): Constify.
9873 * language.h (language_defn::la_error)
9874 (language_defn::la_name_of_this): Constify.
9875 * linespec.c (decode_line_2): Constify.
9876 * linux-thread-db.c (thread_db_err_str): Constify.
9877 * lm32-tdep.c (lm32_register_name): Constify.
9878 * m2-exp.y (yyerror): Constify.
9879 * m2-lang.h (m2_yyerror): Constify.
9880 * m32r-tdep.c (m32r_register_names): Constify and make static.
9881 * m68hc11-tdep.c (m68hc11_register_names): Constify.
9882 * m88k-tdep.c (m88k_register_name): Constify.
9883 * macroexp.c (appendmem): Constify.
9884 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9885 (upgrade_type, parse_external, parse_partial_symbols)
9886 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9887 (new_symbol): Constify.
9888 * memattr.c (mem_info_command): Constify.
9889 * mep-tdep.c (register_name_from_keyword): Constify.
9890 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9891 Constify.
9892 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9893 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9894 * mi/mi-main.c (captured_mi_execute_command): Constify and add
9895 cast.
9896 (mi_execute_async_cli_command): Constify.
9897 * mips-tdep.c (mips_register_name): Constify.
9898 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9899 (am33_register_name, am33_2_register_name)
9900 * moxie-tdep.c (moxie_register_names): Constify.
9901 * nat/linux-osdata.c (osdata_type): Constify fields.
9902 * nto-tdep.c (nto_parse_redirection): Constify.
9903 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9904 (lookup_child_selector): Constify.
9905 (objc_methcall::name): Constify.
9906 * objc-lang.h (lookup_objc_class, lookup_child_selector)
9907 (lookup_struct_typedef): Constify.
9908 * objfiles.c (pc_in_section): Constify.
9909 * objfiles.h (pc_in_section): Constify.
9910 * p-exp.y (struct token::oper): Constify.
9911 (yyerror): Constify.
9912 * p-lang.h (pascal_yyerror): Constify.
9913 * parser-defs.h (op_name_standard): Constify.
9914 (op_print::string): Constify.
9915 (exp_descriptor::op_name): Constify.
9916 * printcmd.c (print_address_symbolic): Constify.
9917 * psymtab.c (print_partial_symbols): Constify.
9918 * python/py-breakpoint.c (stop_func): Constify.
9919 (bppy_get_expression): Constify.
9920 * python/py-cmd.c (cmdpy_completer::name): Constify.
9921 (cmdpy_function): Constify.
9922 * python/py-event.c (evpy_add_attribute)
9923 (gdbpy_initialize_event_generic): Constify.
9924 * python/py-event.h (evpy_add_attribute)
9925 (gdbpy_initialize_event_generic): Constify.
9926 * python/py-evts.c (add_new_registry): Constify.
9927 * python/py-finishbreakpoint.c (outofscope_func): Constify.
9928 * python/py-framefilter.c (get_py_iter_from_func): Constify.
9929 * python/py-inferior.c (get_buffer): Add cast.
9930 * python/py-param.c (parm_constant::name): Constify.
9931 * python/py-unwind.c (fprint_frame_id): Constify.
9932 * python/python.c (gdbpy_parameter_value): Constify.
9933 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9934 * remote.c (memory_packet_config::name): Constify.
9935 (show_packet_config_cmd, remote_write_bytes)
9936 (remote_buffer_add_string):
9937 * reverse.c (exec_reverse_once): Constify.
9938 * rs6000-tdep.c (variant::name, variant::description): Constify.
9939 * rust-exp.y (rustyyerror): Constify.
9940 * rust-lang.c (rust_op_name): Constify.
9941 * rust-lang.h (rustyyerror): Constify.
9942 * serial.h (serial_ops::name): Constify.
9943 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9944 (sh_sh3e_register_name, sh_sh2e_register_name)
9945 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9946 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9947 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9948 (sh_sh4al_dsp_register_name): Constify.
9949 * sh64-tdep.c (sh64_register_name): Constify.
9950 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9951 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9952 * stabsread.c (patch_block_stabs, read_type_number)
9953 (ref_map::stabs, ref_add, process_reference)
9954 (symbol_reference_defined, define_symbol, define_symbol)
9955 (error_type, read_type, read_member_functions, read_cpp_abbrev)
9956 (read_one_struct_field, read_struct_fields, read_baseclasses)
9957 (read_tilde_fields, read_struct_type, read_array_type)
9958 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9959 (read_huge_number, read_range_type, read_args, common_block_start)
9960 (find_name_end): Constify.
9961 * stabsread.h (common_block_start, define_symbol)
9962 (process_one_symbol, symbol_reference_defined, ref_add):
9963 * symfile.c (get_section_index, add_symbol_file_command):
9964 * symfile.h (get_section_index): Constify.
9965 * target-descriptions.c (tdesc_type::name): Constify.
9966 (tdesc_free_type): Add cast.
9967 * target.c (find_default_run_target):
9968 (add_deprecated_target_alias, find_default_run_target)
9969 (target_announce_detach): Constify.
9970 (do_option): Constify.
9971 * target.h (add_deprecated_target_alias): Constify.
9972 * thread.c (print_thread_info_1): Constify.
9973 * top.c (deprecated_readline_begin_hook, command_line_input):
9974 Constify.
9975 (init_main): Add casts.
9976 * top.h (handle_line_of_input): Constify.
9977 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9978 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9979 (tfind_command): Rename to ...
9980 (tfind_command_1): ... this and constify.
9981 (tfind_command): New function.
9982 (tfind_end_command, tfind_start_command): Adjust.
9983 (encode_source_string): Constify.
9984 * tracepoint.h (encode_source_string): Constify.
9985 * tui/tui-data.c (tui_partial_win_by_name): Constify.
9986 * tui/tui-data.h (tui_partial_win_by_name): Constify.
9987 * tui/tui-source.c (tui_set_source_content_nil): Constify.
9988 * tui/tui-source.h (tui_set_source_content_nil): Constify.
9989 * tui/tui-win.c (parse_scrolling_args): Constify.
9990 * tui/tui-windata.c (tui_erase_data_content): Constify.
9991 * tui/tui-windata.h (tui_erase_data_content): Constify.
9992 * tui/tui-winsource.c (tui_erase_source_content): Constify.
9993 * tui/tui.c (tui_enable): Add cast.
9994 * utils.c (defaulted_query): Constify.
9995 (init_page_info): Add cast.
9996 (puts_debug, subset_compare): Constify.
9997 * utils.h (subset_compare): Constify.
9998 * varobj.c (varobj_format_string): Constify.
9999 * varobj.h (varobj_format_string): Constify.
10000 * vax-tdep.c (vax_register_name): Constify.
10001 * windows-nat.c (windows_detach): Constify.
10002 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10003 * xml-support.c (gdb_xml_end_element): Constify.
10004 * xml-tdesc.c (tdesc_start_reg): Constify.
10005 * xstormy16-tdep.c (xstormy16_register_name): Constify.
10006 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10007 * xtensa-tdep.h (xtensa_register_t::name): Constify.
10008
10009 2017-04-05 Pedro Alves <palves@redhat.com>
10010
10011 * proc-api.c (struct trans): Constify.
10012 (procfs_note): Constify.
10013 * proc-events.c (struct trans, syscall_table):
10014 * proc-flags.c (struct trans): Constify.
10015 * proc-utils.h (procfs_note): Constify.
10016 * proc-why.c (struct trans): Constify.
10017 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10018 (procfs_detach): Constify.
10019 * sol-thread.c (struct string_map): Constify.
10020 (td_err_string, td_state_string): Constify.
10021
10022 2017-04-05 Pedro Alves <palves@redhat.com>
10023
10024 * proc-api.c (procfs_filename): Don't initialize
10025 procfs_filename.
10026 (prepare_to_trace): Assume procfs_filename is non-NULL.
10027 (_initialize_proc_api): Give procfs_filename a default value here.
10028
10029 2017-04-05 Pedro Alves <palves@redhat.com>
10030
10031 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10032 'cond_string' parameter.
10033 (extract_exception_regexp): Constify 'string' parameter.
10034 (catch_exception_command_1): Constify.
10035 * breakpoint.c (init_catchpoint)
10036 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10037 parameter.
10038 (ep_parse_optional_if_clause, catch_fork_command_1)
10039 (catch_exec_command_1): Constify.
10040 * breakpoint.h (init_catchpoint): Constify 'cond_string'
10041 parameter.
10042 (ep_parse_optional_if_clause): Constify.
10043 * cli/cli-utils.c (remove_trailing_whitespace)
10044 (check_for_argument): Constify.
10045 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10046 non-const overload.
10047 (check_for_argument): Likewise.
10048
10049 2017-04-05 Pedro Alves <palves@redhat.com>
10050
10051 * event-top.c (command_line_handler): Add cast to execute_command
10052 call.
10053 * record-btrace.c (cmd_record_btrace_bts_start)
10054 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10055 (cmd_record_btrace_start): Add cast to execute_command call.
10056 * record-full.c (record_full_goto_insn):
10057 * record.c (record_start, record_stop): Add cast to
10058 execute_command_to_string calls.
10059 (cmd_record_start): Add cast to execute_command calls.
10060
10061 2017-04-05 Pedro Alves <palves@redhat.com>
10062
10063 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10064 static inline function.
10065 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10066 array and use gdb_PyArg_ParseTupleAndKeywords.
10067 * python/py-cmd.c (cmdpy_init): Likewise.
10068 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10069 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10070 (infpy_search_memory): Likewise.
10071 * python/py-objfile.c (objfpy_add_separate_debug_file)
10072 (gdbpy_lookup_objfile): Likewise.
10073 * python/py-symbol.c (gdbpy_lookup_symbol)
10074 (gdbpy_lookup_global_symbol): Likewise.
10075 * python/py-type.c (gdbpy_lookup_type): Likewise.
10076 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10077 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10078 Likewise.
10079
10080 2017-04-05 Pedro Alves <palves@redhat.com>
10081
10082 * python/python-internal.h (gdb_PyGetSetDef): New type.
10083 * python/py-block.c (block_object_getset)
10084 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10085 * python/py-event.c (event_object_getset)
10086 (finish_breakpoint_object_getset): Likewise.
10087 * python/py-inferior.c (inferior_object_getset): Likewise.
10088 * python/py-infthread.c (thread_object_getset): Likewise.
10089 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10090 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10091 * python/py-objfile.c (objfile_getset): Likewise.
10092 * python/py-progspace.c (pspace_getset): Likewise.
10093 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10094 Likewise.
10095 * python/py-record.c (recpy_record_getset): Likewise.
10096 * python/py-symbol.c (symbol_object_getset): Likewise.
10097 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10098 Likewise.
10099 * python/py-type.c (type_object_getset, field_object_getset):
10100 Likewise.
10101 * python/py-value.c (value_object_getset): Likewise.
10102
10103 2017-04-05 Pedro Alves <palves@redhat.com>
10104
10105 * python/python-internal.h (gdb_PyObject_CallMethod)
10106 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10107 New functions.
10108 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10109 (PySys_GetObject, PySys_SetPath): New macros.
10110
10111 2017-04-05 Pedro Alves <palves@redhat.com>
10112
10113 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10114 info_osdata_command.
10115 * osdata.c (info_osdata_command): Rename to ...
10116 (info_osdata): ... this. Constify 'type' parameter, and remove
10117 the 'from_tty' parameter. Accept NULL TYPE.
10118 (info_osdata_command): New function.
10119 * osdata.h (info_osdata_command): Remove declaration.
10120 (info_osdata): New declaration.
10121
10122 2017-04-05 Pedro Alves <palves@redhat.com>
10123
10124 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
10125 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
10126 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
10127 parameter.
10128 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
10129 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
10130 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
10131 parameter.
10132 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
10133 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
10134 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
10135 (mi_cmd_file_list_exec_source_files)
10136 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
10137 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10138 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
10139 parameter.
10140 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
10141 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
10142 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
10143 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
10144 (mi_cmd_stack_info_frame): Constify 'command' parameter.
10145 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10146 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10147 'command' parameter.
10148 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10149 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10150 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10151 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10152 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10153 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10154 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10155 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10156 (mi_cmd_var_set_update_range): Constify 'command' parameter.
10157 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10158 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10159 parameter.
10160 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10161 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10162 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10163 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10164 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10165 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10166 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10167 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10168 (mi_cmd_data_list_changed_registers)
10169 (mi_cmd_data_write_register_values)
10170 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10171 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10172 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10173 (mi_cmd_list_features, mi_cmd_list_target_features)
10174 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10175 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10176 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10177 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10178 (mi_cmd_trace_frame_collected): Constify 'command'
10179 parameter.
10180 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10181 'command' parameter.
10182
10183 2017-04-05 Pedro Alves <palves@redhat.com>
10184
10185 * ada-lang.c (ada_completer_word_break_characters): Now a const
10186 array.
10187 (ada_get_gdb_completer_word_break_characters): Constify.
10188 * completer.c (gdb_completer_command_word_break_characters)
10189 (gdb_completer_file_name_break_characters)
10190 (gdb_completer_quote_characters): Now const arrays.
10191 (get_gdb_completer_quote_characters): Constify.
10192 (set_rl_completer_word_break_characters): New function.
10193 (set_gdb_completion_word_break_characters)
10194 (complete_line_internal): Use it.
10195 * completer.h (get_gdb_completer_quote_characters): Constify.
10196 (set_rl_completer_word_break_characters): Declare.
10197 * f-lang.c (f_word_break_characters): Constify.
10198 * language.c (default_word_break_characters): Constify.
10199 * language.h (language_defn::la_word_break_characters): Constify.
10200 (default_word_break_characters): Constify.
10201 * top.c (init_main): Use set_rl_completer_word_break_characters.
10202
10203 2017-04-05 Pedro Alves <palves@redhat.com>
10204
10205 * aix-thread.c (aix_thread_pid_to_str)
10206 (aix_thread_extra_thread_info): Constify.
10207 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10208 * bsd-uthread.c (bsd_uthread_extra_thread_info)
10209 (bsd_uthread_pid_to_str): Constify.
10210 * corelow.c (core_pid_to_str): Constify.
10211 * darwin-nat.c (darwin_pid_to_str): Constify.
10212 * fbsd-nat.c (fbsd_pid_to_str): Constify.
10213 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
10214 Constify.
10215 * gnu-nat.c (gnu_pid_to_str): Constify.
10216 * go32-nat.c (go32_pid_to_str): Constify.
10217 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
10218 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
10219 * inferior.c (inferior_pid_to_str): Constify.
10220 * linux-nat.c (linux_nat_pid_to_str): Constify.
10221 * linux-tdep.c (linux_core_pid_to_str): Constify.
10222 * linux-thread-db.c (thread_db_pid_to_str)
10223 (thread_db_extra_thread_info): Constify.
10224 * nto-tdep.c (nto_extra_thread_info): Constify.
10225 * nto-tdep.h (nto_extra_thread_info): Constify.
10226 * obsd-nat.c (obsd_pid_to_str): Constify.
10227 * procfs.c (procfs_pid_to_str): Constify.
10228 * ravenscar-thread.c (ravenscar_extra_thread_info)
10229 (ravenscar_pid_to_str): Constify.
10230 * remote-sim.c (gdbsim_pid_to_str): Constify.
10231 * remote.c (remote_threads_extra_info, remote_pid_to_str):
10232 Constify.
10233 * sol-thread.c (solaris_pid_to_str): Constify.
10234 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
10235 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
10236 * target.c (default_pid_to_str, target_pid_to_str)
10237 (normal_pid_to_str, default_pid_to_str): Constify.
10238 * target.h (target_ops::to_pid_to_str)
10239 (target_ops::to_extra_thread_info): Constify.
10240 (target_pid_to_str, normal_pid_to_str): Constify.
10241 * windows-nat.c (windows_pid_to_str): Constify.
10242 * gdbarch.sh (core_pid_to_str): Constify.
10243 * target-delegates.c: Regenerate.
10244 * gdbarch.h, gdbarch.c: Regenerate.
10245
10246 2017-04-05 Pedro Alves <palves@redhat.com>
10247
10248 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
10249 the memory of the temporary warning_pre_print override.
10250 * utils.c (warning_pre_print): Constify.
10251 * utils.h (warning_pre_print): Constify.
10252
10253 2017-04-05 Pedro Alves <palves@redhat.com>
10254
10255 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
10256 (shell_command): New function.
10257 (make_command): Use std::string.
10258 (init_cli_cmds): Register shell_command instead of shell_escape.
10259
10260 2017-04-05 Pedro Alves <palves@redhat.com>
10261
10262 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
10263 * tracepoint.c (default_collect): Don't initialize.
10264
10265 2017-04-05 Pedro Alves <palves@redhat.com>
10266
10267 * macroexp.c (macro_buffer::shared): Now a bool.
10268 (init_buffer): Update.
10269 (init_shared_buffer): Constify 'addr' parameter.
10270 (substitute_args, expand, macro_expand, macro_expand_next): Remove
10271 casts.
10272
10273 2017-04-05 Pedro Alves <palves@redhat.com>
10274
10275 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
10276 * disasm.c (set_disassembler_options): Constify local.
10277 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
10278
10279 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
10280
10281 PR gdb/21352
10282 * tracefile.c (tsave_command): Fix argument parsing for '-r'
10283 option.
10284
10285 2017-04-05 Yao Qi <yao.qi@linaro.org>
10286
10287 * frame.c (frame_unwind_register_unsigned): Call
10288 frame_unwind_register_value.
10289
10290 2017-04-05 Yao Qi <yao.qi@linaro.org>
10291
10292 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
10293 Use gdb_test_multiple, and don't match anchor.
10294
10295 2017-04-05 Pedro Alves <palves@redhat.com>
10296
10297 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
10298 (Write After Approval): Remove Simon Marchi.
10299
10300 2017-04-05 Pedro Alves <palves@redhat.com>
10301
10302 * common/gdb_optional.h (optional::optional): Make constexpr and
10303 initialize m_dummy.
10304
10305 2017-04-04 John Baldwin <jhb@FreeBSD.org>
10306
10307 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10308 (amd64fbsd_jmp_buf_reg_offset): Remove.
10309 (amd64fbsd_supply_uthread): Remove function.
10310 (amd64fbsd_collect_uthread): Remove function.
10311 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
10312 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
10313 (x86_64-*-freebsd*): Remove bsd-uthread.o.
10314 (fbsd-nat.c): Update comment.
10315 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10316 (i386fbsd_jmp_buf_reg_offset): Remove.
10317 (i386fbsd_supply_uthread): Remove function.
10318 (i386fbsd_collect_uthread): Remove function.
10319 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
10320
10321 2017-04-04 John Baldwin <jhb@FreeBSD.org>
10322
10323 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
10324 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
10325 * NEWS: Mention that support for FreeBSD/alpha was removed.
10326 * alpha-fbsd-tdep.c: Delete file.
10327 * config/alpha/fbsd.mh: Delete file.
10328 * configure.host: Delete alpha*-*-freebsd* and
10329 alpha*-*-kfreebsd*-gnu.
10330 * configure.tgt: Delete alpha*-*-freebsd* and
10331 alpha*-*-kfreebsd*-gnu.
10332
10333 2017-04-04 John Baldwin <jhb@FreeBSD.org>
10334
10335 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
10336 amd64bsd_store_inferior_registers): Use ptid from regcache.
10337
10338 2017-04-04 Pedro Alves <palves@redhat.com>
10339
10340 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
10341 data fields, make them private and add "m_" prefixes.
10342 (lnp_state_machine::lnp_state_machine): New ctor.
10343 (record_line, check_line_address, handle_set_discriminator)
10344 (handle_set_address, handle_advance_pc, handle_special_opcode)
10345 (handle_advance_line, handle_set_file, handle_negate_stmt)
10346 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
10347 (end_sequence, advance_line): New methods.
10348 (m_gdbarch, m_record_lines_p): New fields.
10349 (lnp_reader_state): Delete.
10350 (dwarf_record_line): Rename to ...
10351 (lnp_state_machine::record_line): ... adjust.
10352 (init_lnp_state_machine): Delete.
10353 (lnp_state_machine::lnp_state_machine): New.
10354 (check_line_address): Rename to ...
10355 (lnp_state_machine::check_line_address): This.
10356 (dwarf_decode_lines_1): Remove reference to "reader_state".
10357 Adjust lnp_state_machine having a non-default ctor. Use bool.
10358 State machine internal state manipulation moved to
10359 lnp_state_machine methods.
10360
10361 2017-04-04 Pedro Alves <palves@redhat.com>
10362
10363 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10364 unittests/offset-type-selftests.c.
10365 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
10366 * common/offset-type.h: New file.
10367 * common/preprocessor.h: New file.
10368 * common/traits.h: New file.
10369 * common/valid-expr.h: New file.
10370 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
10371 sect_offset and cu_offset strong typedefs throughout.
10372 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
10373 typedefs throughout.
10374 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
10375 sect_offset and cu_offset strong typedefs throughout.
10376 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
10377 typedefs throughout.
10378 * gdbtypes.h: Include "common/offset-type.h".
10379 (cu_offset): Now an offset type (strong typedef) instead of a
10380 struct.
10381 (sect_offset): Likewise.
10382 (union call_site_parameter_u): Rename "param_offset" field to
10383 "param_cu_off".
10384 * unittests/offset-type-selftests.c: New file.
10385
10386 2017-04-04 Pedro Alves <palves@redhat.com>
10387
10388 * common/underlying.h: New file.
10389 * dwarf2read.c: Include "common/gdb_optional.h" and
10390 "common/underlying.h".
10391 (dir_index, file_name_index): New types.
10392 (file_entry): Use them.
10393 (file_entry::include): Use to_underlying.
10394 (line_header::add_file_name): Use dir_index.
10395 (read_formatted_entries): Use gdb::optional. Read form before
10396 writting to file_entry.
10397 (dwarf_decode_line_header): Use dir_index.
10398 (lnp_state_machine::current_file): Use to_underlying.
10399 (lnp_state_machine::file): Change type to file_name_index.
10400 (dwarf_record_line): Use to_underlying.
10401 (init_lnp_state_machine): Use file_name_index.
10402 (dwarf_decode_lines_1): Use dir_index and file_name_index.
10403
10404 2017-04-04 Pedro Alves <palves@redhat.com>
10405
10406 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
10407 operator bool, has_value and get methods.
10408
10409 2017-04-04 Pedro Alves <palves@redhat.com>
10410
10411 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
10412 fields.
10413 (line_header): Initialize all data fields. Change type of
10414 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
10415 Change type of include_dirs to std::vector<const char *>. Remove
10416 num_include_dirs, include_dirs_size. Change type of file_names to
10417 std::vector<file_entry>. Remove num_file_names, file_names_size.
10418 (line_header::line_header): New.
10419 (line_header::add_include_dir, line_header::add_file_name): New
10420 methods.
10421 (line_header::include_dir_at): Remove NULL check.
10422 (line_header::file_name_at): Add const overload.
10423 (line_header_up): New unique_ptr typedef.
10424 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
10425 std::vector. Remove free_line_header call.
10426 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
10427 free_line_header call.
10428 (free_cu_line_header): Delete.
10429 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
10430 (setup_type_unit_groups): Use line_header_up instead of cleanups.
10431 Adjust to use std::vector.
10432 (free_line_header): Delete.
10433 (free_line_header_voidp): Use delete.
10434 (add_include_dir): Replace with ...
10435 (line_header::add_include_dir): ... this method. Use std::vector.
10436 (add_file_name): Replace with ...
10437 (line_header::add_file_name): ... this method. Use std::vector.
10438 (add_include_dir_stub): Delete.
10439 (read_formatted_entries): Remove memset.
10440 (dwarf_decode_line_header): Return a line_header_up instead of a
10441 raw pointer. Remove cleanup handling. Pass lambdas to
10442 read_formatted_entries. Adjust to use line_header methods.
10443 (dwarf_decode_lines_1): Adjust to use line_header methods.
10444 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
10445 use std::vector.
10446
10447 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
10448
10449 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
10450 instead of struct ptid.
10451
10452 2017-05-04 Alan Hayward <alan.hayward@arm.com>
10453
10454 * frame.c (get_frame_register_bytes): Unwind using value.
10455 (put_frame_register_bytes): Likewise.
10456
10457 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
10458
10459 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
10460 aggregate-like.
10461
10462 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
10463
10464 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
10465
10466 2017-03-29 Yao Qi <yao.qi@linaro.org>
10467
10468 * gdbthread.h (struct thread_info): Declare constructor and
10469 destructor. Add some in-class member initializers.
10470 * thread.c (free_thread): Remove.
10471 (init_thread_list): Call delete instead of free_thread.
10472 (new_thread): Call thread_info constructor.
10473 (thread_info::thread_info): New function.
10474 (thread_info::~thread_info): New function.
10475 (delete_thread_1): Call delete instead of free_thread.
10476 (make_cleanup_restore_current_thread): Move tp and frame to
10477 inner block.
10478
10479 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10480
10481 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
10482 (arc_skip_prologue): Likewise.
10483 (arc_make_frame_cache): Likewise.
10484 (arc_pv_get_operand): New function.
10485 (arc_is_in_prologue): Likewise.
10486 (arc_analyze_prologue): Likewise.
10487 (arc_print_frame_cache): Likewise.
10488 (MAX_PROLOGUE_LENGTH): New constant.
10489
10490 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10491
10492 * configure.tgt: Add arc-insn.o.
10493 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
10494 (dump_arc_instruction_command): New function.
10495 (arc_fprintf_disasm): Likewise.
10496 (arc_disassemble_info): Likewise.
10497 (arc_insn_get_operand_value): Likewise.
10498 (arc_insn_get_operand_value_signed): Likewise.
10499 (arc_insn_get_memory_base_reg): Likewise.
10500 (arc_insn_get_memory_offset): Likewise.
10501 (arc_insn_get_branch_target): Likewise.
10502 (arc_insn_dump): Likewise.
10503 (arc_insn_get_linear_next_pc): Likewise.
10504 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
10505 (arc_disassemble_info): Likewise.
10506 (arc_insn_get_branch_target): Likewise.
10507 (arc_insn_get_linear_next_pc): Likewise.
10508 * NEWS: Mention new "maint print arc arc-instruction".
10509
10510 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10511
10512 * arc-tdep (maintenance_print_arc_list): New variable.
10513 (maintenance_print_arc_command): New function.
10514
10515 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
10516
10517 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
10518 Add "limm" and "reserved".
10519 (arc_cannot_fetch_register, arc_cannot_store_register): Add
10520 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
10521 * arc-tdep.h (arc_regnum): Likewise.
10522
10523 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10524
10525 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10526 for THREADPTR register.
10527 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
10528 register.
10529 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
10530 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
10531 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
10532
10533 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10534
10535 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
10536 registers above gdbarch_num_regs (gdbarch) as privileged in
10537 call0 ABI.
10538
10539 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10540
10541 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10542 for a single specified register or for all registers in
10543 a0_base..a0_base + C0_NREGS range.
10544 (supply_gregset_reg): Call regcache_raw_supply for a single
10545 specified register or for all registers in a0_base..a0_base +
10546 C0_NREGS range.
10547
10548 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10549
10550 * arch/xtensa.h (C0_NREGS): Add definition.
10551 * xtensa-tdep.c (C0_NREGS): Remove definition.
10552
10553 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
10554
10555 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
10556 Drop xtensa_default_isa initialization.
10557 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
10558
10559 2017-03-27 Pedro Alves <palves@redhat.com>
10560
10561 * dwarf2read.c (file_entry) <dir_index>: Add comment.
10562 (file_entry::include_dir): New method.
10563 (line_header::include_dir_at, line_header::file_name_at): New
10564 methods.
10565 (setup_type_unit_groups, setup_type_unit_groups)
10566 (psymtab_include_file_name): Simplify using the new methods.
10567 (lnp_state_machine) <the_line_header>: New field.
10568 <file>: Add comment.
10569 (lnp_state_machine::current_file): New method.
10570 (dwarf_record_line): Simplify using the new methods.
10571 (init_lnp_state_machine): Initialize the "the_line_header" field.
10572 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
10573 Simplify using the new methods.
10574
10575 2017-03-27 Pedro Alves <palves@redhat.com>
10576
10577 * cp-name-parser.y (make_empty): Delete.
10578 (demangler_special, nested_name, ptr_operator, array_indicator)
10579 (direct_declarator, declarator_1): Use fill_comp instead of
10580 make_empty.
10581
10582 2017-03-27 Pedro Alves <palves@redhat.com>
10583
10584 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
10585 to ATTRIBUTE_PRINTF.
10586 * solib-target.c (library_list_start_list): Print "string" not
10587 "version".
10588 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
10589 gdb_xml_error call.
10590
10591 2017-03-27 Pedro Alves <palves@redhat.com>
10592
10593 * dwarf2read.c (struct file_and_directory): New.
10594 (dwarf2_get_dwz_file): Adjust to use std::string.
10595 (dw2_get_file_names_reader): Adjust to use file_and_directory.
10596 (find_file_and_directory): Adjust to return a file_and_directory
10597 object.
10598 (read_file_scope): Adjust to use file_and_directory. Remove
10599 make_cleanup/do_cleanups calls.
10600 (open_and_init_dwp_file): Adjust to use std::string. Remove
10601 make_cleanup/do_cleanups calls.
10602 * python/python.c (do_start_initialization): Adjust to ldirname
10603 returning a std::string.
10604 * utils.c (ldirname): Now returns a std::string.
10605 * utils.h (ldirname): Change return type to std::string.
10606 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
10607 returning a std::string.
10608 * xml-tdesc.c (file_read_description_xml): Likewise.
10609
10610 2017-03-24 Alan Hayward <alan.hayward@arm.com>
10611
10612 * regcache.c (regcache_debug_print_register): New function.
10613 * regcache.h (regcache_debug_print_register): New declaration.
10614 * target.c (debug_print_register): Remove.
10615 (target_fetch_registers): Call regcache_debug_print_register.
10616 (target_store_registers): Likewise.
10617
10618 2017-03-24 Pádraig Brady <pbrady@fb.com>
10619
10620 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
10621 reference beyond the 'lh->include_dirs' array before accessing to
10622 it.
10623 (psymtab_include_file_name): Likewise.
10624 (dwarf_decode_lines_1): Likewise.
10625 (dwarf_decode_lines): Likewise.
10626 (file_file_name): Likewise.
10627
10628 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
10629
10630 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
10631 inferior_ptid.
10632 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10633 ps_lsetfpregs): Likewise.
10634 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
10635 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10636 ps_lsetfpregs): Likewise.
10637 * target.c (target_fetch_registers, target_store_registers):
10638 Remove asserts.
10639
10640 2017-03-23 Alan Hayward <alan.hayward@arm.com>
10641
10642 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
10643
10644 2017-03-23 Yao Qi <yao.qi@linaro.org>
10645
10646 * aarch64-tdep.c (aarch64_process_record_test): Declare.
10647 (_initialize_aarch64_tdep): Register it.
10648 (aarch64_record_load_store): Handle PRFM instruction.
10649 (aarch64_process_record_test): New function.
10650
10651 2017-03-23 Yao Qi <yao.qi@linaro.org>
10652
10653 * aarch64-tdep.c (aarch64_record_load_store): Fix code
10654 indentation.
10655
10656 2017-03-23 Yao Qi <yao.qi@linaro.org>
10657
10658 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
10659
10660 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10661
10662 python/python.c (do_start_initialization): Fix memory leak.
10663
10664 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
10665
10666 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
10667 using get_ptrace_pid.
10668 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
10669 inferior_ptid.
10670 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
10671 inferior_ptid instead of pid.
10672
10673 2017-03-22 Yao Qi <yao.qi@linaro.org>
10674
10675 * aarch64-tdep.c: Wrap locally used classes in anonymous
10676 namespace.
10677 * arm-tdep.c: Likewise.
10678 * linespec.c: Likewise.
10679 * ui-out.c: Likewise.
10680
10681 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
10682
10683 PR gdb/19637
10684 * python/lib/gdb/printer/bound_registers.py: Import sys.
10685
10686 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
10687
10688 * windows-nat.c (do_windows_fetch_inferior_registers): Add
10689 windows_thread_info parameter and use it instead of
10690 current_thread.
10691 (windows_fetch_inferior_registers): Don't set current_thread,
10692 pass the thread to do_windows_fetch_inferior_registers. Use
10693 ptid from regcache instead of inferior_ptid.
10694 (do_windows_store_inferior_registers): Add windows_thread_info
10695 parameter and use it instead of current_thread.
10696 (windows_store_inferior_registers): Don't set current_thread,
10697 pass the thread to do_windows_store_inferior_registers. Use
10698 ptid from regcache instead of inferior_ptid.
10699
10700 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
10701
10702 * ser-mingw.c (ser_windows_raw): Remove reference to
10703 struct serial::current_timeout.
10704
10705 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
10706
10707 PR tdep/20928
10708 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
10709 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
10710 (sparc64_fsr_type): Fix %fsr decoding.
10711
10712 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
10713
10714 * python/py-record-btrace.c (btpy_insn_data): Change return type
10715 for Python 2.
10716
10717 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
10718
10719 * spu-linux-nat.c (spu_fetch_inferior_registers,
10720 spu_store_inferior_registers): Use ptid from regcache, set and
10721 restore inferior_ptid.
10722 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
10723 Likewise.
10724
10725 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
10726
10727 * i386-linux-nat.c (fetch_register, store_register,
10728 i386_linux_fetch_inferior_registers,
10729 i386_linux_store_inferior_registers): Use ptid from regcache.
10730 * ia64-linux-nat.c (ia64_linux_fetch_register,
10731 ia64_linux_store_register): Likewise.
10732 * inf-ptrace.c (inf_ptrace_fetch_register,
10733 inf_ptrace_store_register): Likewise.
10734 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
10735 m32r_linux_store_inferior_registers): Likewise.
10736 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
10737 m68kbsd_store_inferior_registers): Likewise.
10738 * m68k-linux-nat.c (fetch_register, store_register,
10739 m68k_linux_fetch_inferior_registers,
10740 m68k_linux_store_inferior_registers): Likewise.
10741 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
10742 m88kbsd_store_inferior_registers): Likewise.
10743 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
10744 mips_fbsd_store_inferior_registers): Likewise.
10745 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
10746 mips64_linux_regsets_store_registers): Likewise.
10747 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
10748 mipsnbsd_store_inferior_registers): Likewise.
10749 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
10750 mips64obsd_store_inferior_registers): Likewise.
10751 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
10752 Likewise.
10753 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
10754 ppcfbsd_store_inferior_registers): Likewise.
10755 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
10756 ppc_linux_store_inferior_registers): Likewise.
10757 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
10758 ppcnbsd_store_inferior_registers): Likewise.
10759 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
10760 ppcobsd_store_registers): Likewise.
10761 * procfs.c (procfs_fetch_registers, procfs_store_registers):
10762 Likewise.
10763 * ravenscar-thread.c (ravenscar_fetch_registers,
10764 ravenscar_store_registers, ravenscar_prepare_to_store):
10765 Likewise.
10766 * record-btrace.c (record_btrace_fetch_registers,
10767 record_btrace_store_registers, record_btrace_prepare_to_store):
10768 Likewise.
10769 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
10770 Lookup inferior using ptid from regcache, instead of
10771 current_inferior.
10772 * remote.c (remote_fetch_registers, remote_store_registers): Use
10773 ptid from regcache.
10774 * rs6000-nat.c (fetch_register, store_register): Likewise.
10775 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
10776 s390_linux_store_inferior_registers): Likewise.
10777 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10778 shnbsd_store_inferior_registers): Likewise.
10779 * sol-thread.c (sol_thread_fetch_registers,
10780 sol_thread_store_registers): Likewise.
10781 * sparc-nat.c (sparc_fetch_inferior_registers,
10782 sparc_store_inferior_registers): Likewise.
10783 * tilegx-linux-nat.c (fetch_inferior_registers,
10784 store_inferior_registers): Likewise.
10785 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10786 vaxbsd_store_inferior_registers): Likewise.
10787 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10788 store_xtregs): Likewise.
10789
10790 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10791
10792 PR gdb/14441
10793 * NEWS: Mention support for rvalue references in GDB and python.
10794 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10795 supports both lvalue and rvalue references.
10796
10797 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10798
10799 PR gdb/14441
10800 * gdbtypes.c (rank_one_type): Implement overloading
10801 resolution rules regarding rvalue references.
10802
10803 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10804
10805 PR gdb/14441
10806 * aarch64-tdep.c (aarch64_type_align)
10807 (aarch64_extract_return_value, aarch64_store_return_value): Change
10808 lvalue reference type checks to general reference type checks.
10809 * amd64-tdep.c (amd64_classify): Likewise.
10810 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10811 Likewise.
10812 * arm-tdep.c (arm_type_align, arm_extract_return_value)
10813 (arm_store_return_value): Likewise.
10814 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10815 * c-typeprint.c (c_print_type): Likewise.
10816 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10817 (cplus_number_of_children, cplus_describe_child): Likewise.
10818 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10819 * completer.c (expression_completer): Likewise.
10820 * cp-support.c (make_symbol_overload_list_adl_namespace):
10821 Likewise.
10822 * darwin-nat-info.c (info_mach_region_command): Likewise.
10823 * dwarf2loc.c (entry_data_value_coerce_ref)
10824 (value_of_dwarf_reg_entry): Likewise.
10825 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10826 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10827 Likewise.
10828 * findvar.c (extract_typed_address, store_typed_address):
10829 Likewise.
10830 * gdbtypes.c (rank_one_type): Likewise.
10831 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10832 * infcall.c (value_arg_coerce): Likewise.
10833 * language.c (pointer_type): Likewise.
10834 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10835 Likewise.
10836 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10837 * mn10300-tdep.c (mn10300_type_align): Likewise.
10838 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10839 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10840 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10841 Likewise.
10842 * printcmd.c (print_formatted, x_command): Likewise.
10843 * python/py-type.c (typy_get_composite, typy_template_argument):
10844 Likewise.
10845 * python/py-value.c (valpy_referenced_value)
10846 (valpy_get_dynamic_type, value_has_field): Likewise.
10847 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10848 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10849 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10850 * spu-tdep.c (spu_scalar_value_p): Likewise.
10851 * symtab.c (lookup_symbol_aux): Likewise.
10852 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10853 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10854 Likewise.
10855 * valops.c (value_cast_pointers, value_cast)
10856 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10857 (value_struct_elt, value_struct_elt_bitpos)
10858 (value_find_oload_method_list, find_overload_match)
10859 (value_rtti_indirect_type): Likewise.
10860 * valprint.c (val_print_scalar_type_p, generic_val_print):
10861 Likewise.
10862 * value.c (value_actual_type, value_as_address, unpack_long)
10863 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10864 (coerce_ref): Likewise.
10865 * varobj.c (varobj_get_value_type): Likewise.
10866
10867 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10868
10869 PR gdb/14441
10870 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10871 table of constants.
10872 * python/lib/gdb/command/explore.py: Support exploring values
10873 of rvalue reference types.
10874 * python/lib/gdb/types.py: Implement get_basic_type() for
10875 rvalue reference types.
10876 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10877 constant.
10878 * python/py-value.c (valpy_getitem): Add an rvalue reference
10879 check.
10880 (valpy_reference_value): Add new parameter "refcode".
10881 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10882 New wrappers for valpy_reference_value().
10883 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10884 (gdbpy_invoke_xmethod): Likewise.
10885
10886 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10887
10888 PR gdb/14441
10889 * dwarf2read.c (process_die, read_type_die_1): Handle the
10890 DW_TAG_rvalue_reference_type DIE.
10891 (read_tag_reference_type): Add new parameter "refcode".
10892
10893 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10894
10895 PR gdb/14441
10896 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10897 (c_type_print_modifier, c_type_print_varspec_suffix)
10898 (c_type_print_base): Support printing rvalue reference types.
10899 * c-valprint.c (c_val_print, c_value_print): Support printing
10900 rvalue reference values.
10901
10902 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10903
10904 PR gdb/14441
10905 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10906 typename.
10907 * cp-support.c (replace_typedefs): Handle
10908 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10909 * python/py-type.c (typy_lookup_type): Likewise.
10910
10911 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10912
10913 PR gdb/14441
10914 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10915 * parse.c (insert_type): Change assert statement.
10916 (follow_types): Handle rvalue reference types.
10917 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10918 constant.
10919
10920 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10921
10922 PR gdb/14441
10923 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10924 value_ref() interface.
10925 * c-valprint.c (c_value_print): Likewise.
10926 * infcall.c (value_arg_coerce): Likewise.
10927 * python/py-value.c (valpy_reference_value): Likewise.
10928 * valops.c (value_cast, value_reinterpret_cast)
10929 (value_dynamic_cast, typecmp): Likewise.
10930 (value_ref): Parameterize by kind of return value reference type.
10931 * value.h (value_ref): Add new parameter "refcode".
10932
10933 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10934
10935 PR gdb/14441
10936 * dwarf2read.c (read_tag_reference_type): Use
10937 lookup_lvalue_reference_type() instead of lookup_reference_type().
10938 * eval.c (evaluate_subexp_standard): Likewise.
10939 * f-exp.y: Likewise.
10940 * gdbtypes.c (make_reference_type, lookup_reference_type):
10941 Generalize with rvalue reference types.
10942 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10943 convenience wrappers for lookup_reference_type().
10944 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10945 reference kind parameter.
10946 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10947 wrappers for lookup_reference_type().
10948 * guile/scm-type.c (gdbscm_type_reference): Use
10949 lookup_lvalue_reference_type() instead of lookup_reference_type().
10950 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10951 * parse.c (follow_types): Likewise.
10952 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10953 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10954 Likewise.
10955 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10956 (gdbpy_invoke_xmethod): Likewise.
10957 * stabsread.c: Provide extra argument to make_reference_type()
10958 call.
10959 * valops.c (value_ref, value_rtti_indirect_type): Use
10960 lookup_lvalue_reference_type() instead of lookup_reference_type().
10961
10962 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10963
10964 PR gdb/14441
10965 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10966 (TYPE_IS_REFERENCE): New macro.
10967 (struct type): Add rvalue_reference_type field.
10968 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10969
10970 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
10971
10972 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10973 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10974 New function definition.
10975 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10976 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10977 New function declaration.
10978 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10979 * mi/mi-interp.h: New file.
10980 * solib.c (info_sharedlibrary_command): Replace for loop with
10981 ALL_SO_LIBS macro
10982 * solib.h (update_solib_list): New function declaration.
10983 (so_list_head): Move macro.
10984 * solist.h (ALL_SO_LIBS): New macro.
10985
10986 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
10987
10988 * infcmd.c (post_create_inferior): Remove unused argument in
10989 call to solib_add.
10990 * remote.c (remote_start_remote): Likewise.
10991 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10992 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10993 (enable_break): Likewise.
10994 * solib.c (update_solib_list): Remove unused target argument
10995 and its documentation.
10996 (solib_add): Remove unused target argument. Remove unused
10997 argument in call to update_solib_list.
10998 (info_sharedlibrary_command): Remove unused argument in call
10999 to update_solib_list.
11000 (sharedlibrary_command): Remove unused argument in call to
11001 solib_add.
11002 (handle_solib_event): Likewise.
11003 (reload_shared_libraries): Likewise.
11004 * solib.h (solib_add): Remove unused target argument.
11005
11006 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
11007
11008 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11009 (s390_displaced_step_fixup): Cover relative branches with the
11010 default fixup handling. This fixes lack of support for some
11011 relative branch instructions.
11012
11013 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11014
11015 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11016 ptid from regcache.
11017
11018 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11019
11020 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11021 i386_darwin_store_inferior_registers): Use ptid from regcache.
11022
11023 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11024
11025 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11026 i386bsd_store_inferior_registers): Use ptid from regcache.
11027
11028 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11029
11030 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11031 hppaobsd_store_registers): Use ptid from regcache.
11032
11033 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11034
11035 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11036 hppanbsd_store_registers): Use ptid from regcache.
11037
11038 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11039
11040 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11041 from regcache. Use get_ptrace_pid.
11042
11043 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11044
11045 * corelow.c (get_core_register_section): Use ptid from regcache,
11046 update doc.
11047
11048 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11049
11050 * bsd-uthread.c (bsd_uthread_fetch_registers,
11051 bsd_uthread_store_registers): Use ptid from regcache, set and
11052 restore inferior_ptid.
11053
11054 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11055
11056 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11057 fetch_fp_regs, store_register, store_regs, store_fp_register,
11058 store_fp_regs): Use ptid from regcache.
11059
11060 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11061
11062 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11063 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11064 store_vfp_regs): Use ptid from regcache.
11065
11066 2017-03-17 Pedro Alves <palves@redhat.com>
11067
11068 PR remote/21188
11069 * ser-base.c (ser_base_wait_for): Add comment.
11070 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11071 version.
11072 * ser-unix.c (hardwire_raw): Remove reference to
11073 scb->current_timeout.
11074 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11075 (hardwire_ops): Install ser_base_readchar instead of
11076 hardwire_readchar.
11077 * serial.h (struct serial) <current_timeout, timeout_remaining>:
11078 Remove fields.
11079
11080 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
11081
11082 PR gdb/19637
11083 * python/lib/gdb/printer/bound_registers.py: Add support for
11084 Python 3.
11085
11086 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
11087
11088 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11089 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11090 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11091 byte_offset to subobj_byte_offset. Fix the handling of
11092 DWARF_VALUE_STACK on big-endian targets when coming via an
11093 implicit pointer.
11094 (dwarf2_evaluate_loc_desc): Adjust call to
11095 dwarf2_evaluate_loc_desc_full.
11096 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11097 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11098
11099 2017-03-16 Yao Qi <yao.qi@linaro.org>
11100
11101 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11102 and REVSH instructions.
11103
11104 2017-03-16 Yao Qi <yao.qi@linaro.org>
11105
11106 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11107 (arm_record_test): Declare.
11108 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11109 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11110 align with the manual.
11111 (thumb_record_misc): Adjust the code order to align with the
11112 manual.
11113 (thumb2_record_decode_insn_handler): Fix instruction matching.
11114 (instruction_reader_thumb): New class.
11115 (arm_record_test): New function.
11116
11117 2017-03-16 Yao Qi <yao.qi@linaro.org>
11118
11119 * arm-tdep.c (abstract_memory_reader): New class.
11120 (instruction_reader): New class.
11121 (extract_arm_insn): Add argument 'reader'. Callers updated.
11122 (decode_insn): Likewise.
11123
11124 2017-03-16 Doug Evans <dje@google.com>
11125
11126 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
11127 member. Change type of TYPE member to SCM. All uses updated.
11128 (lsscm_make_lazy_string_smob): Add assert.
11129 (lsscm_make_lazy_string): Flag bad length values.
11130 (lsscm_elt_type): New function.
11131 (gdbscm_lazy_string_to_value): Rewrite to use
11132 lsscm_safe_lazy_string_to_value.
11133 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
11134 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
11135 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
11136 in incoming type.
11137 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11138 * guile/scm-type.c (tyscm_scm_to_type): New function.
11139
11140 2017-03-15 Doug Evans <dje@google.com>
11141
11142 PR python/17728, python/18439, python/18779
11143 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
11144 member. Change type of TYPE member to PyObject *. All uses updated.
11145 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11146 (gdbpy_create_lazy_string_object): Flag bad length values.
11147 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11148 Handle typedefs in incoming type.
11149 (stpy_lazy_string_elt_type): New function.
11150 (gdbpy_extract_lazy_string): Call it.
11151 * python/py-value.c (valpy_lazy_string): Flag bad length values.
11152 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
11153 typedefs in incoming type.
11154
11155 2017-03-16 Doug Evans <dje@google.com>
11156
11157 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11158 * guile/scm-type.c (tyscm_scm_to_type): New function.
11159
11160 2017-03-16 Jiong Wang <jiong.wang@arm.com>
11161
11162 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11163 "ULONGEST" for "skip".
11164
11165 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
11166
11167 PR gdb/21220
11168 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11169 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11170 (inf_ptrace_peek_poke): ...here. New function. Now also loop
11171 over ptrace peek/poke until end of buffer or error.
11172
11173 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
11174
11175 * parse.c (length_of_subexp): Make static.
11176 * parser-defs.h (length_of_subexp): Remove.
11177
11178 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
11179
11180 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11181 as well.
11182
11183 2017-03-14 Pedro Alves <palves@redhat.com>
11184
11185 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11186 (main): Use std::unique_ptr. Remove calls to
11187 cp_demangled_name_parse_free.
11188
11189 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11190
11191 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11192 alphabsd_store_inferior_registers): Use regcache->ptid instead
11193 of inferior_ptid.
11194
11195 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11196
11197 * aix-thread.c (aix_thread_fetch_registers,
11198 aix_thread_store_registers): Use regcache->ptid instead of
11199 inferior_ptid.
11200
11201 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11202
11203 * aarch64-linux-nat.c (fetch_gregs_from_thread,
11204 store_gregs_to_thread, fetch_fpregs_from_thread,
11205 store_fpregs_to_thread): Use regcache->ptid instead of
11206 inferior_ptid.
11207
11208 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11209
11210 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11211 amd64_linux_fetch_inferior_registers): Use regcache->ptid
11212 instead of inferior_ptid.
11213
11214 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11215
11216 * target.c (target_fetch_registers, target_store_registers): Add
11217 assert.
11218
11219 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11220
11221 * regcache.h (regcache_get_ptid): New function.
11222 * regcache.c (regcache_get_ptid): New function.
11223
11224 2017-03-13 Mark Wielaard <mark@klomp.org>
11225
11226 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11227
11228 2017-03-10 Keith Seitz <keiths@redhat.com>
11229
11230 PR c++/8218
11231 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11232
11233 2017-03-08 Pedro Alves <palves@redhat.com>
11234
11235 PR gdb/18360
11236 * infrun.c (start_step_over, do_target_resume, resume)
11237 (restart_threads): Assert we're not resuming a thread that is
11238 meant to be stopped.
11239 (infrun_thread_stop_requested_callback): Delete.
11240 (infrun_thread_stop_requested): If the thread is internally
11241 stopped, queue a pending stop event and clear the thread's
11242 inline-frame state.
11243 (handle_stop_requested): New function.
11244 (handle_syscall_event, handle_inferior_event_1): Use
11245 handle_stop_requested.
11246 (handle_stop_requested): New function.
11247 (handle_signal_stop): Set the thread's stop_signal here instead of
11248 at caller.
11249 (finish_step_over): Clear step over info unconditionally.
11250 (handle_signal_stop): If the user had interrupted the event
11251 thread, consider the stop a random signal.
11252 (handle_signal_stop) <signal arrived while stepping over
11253 breakpoint>: Don't restart threads here.
11254 (stop_waiting): Don't clear step-over info here.
11255
11256 2017-03-08 Pedro Alves <palves@redhat.com>
11257
11258 PR 21206
11259 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
11260 goes to argument 2, not 1.
11261
11262 2017-03-08 Pedro Alves <palves@redhat.com>
11263
11264 PR cli/21218
11265 * top.c (gdb_readline_wrapper): Avoid passing NULL to
11266 display_gdb_prompt.
11267 (command_line_input): Add comment.
11268
11269 2017-03-08 Pedro Alves <palves@redhat.com>
11270
11271 PR tui/21216
11272 * tui/tui-file.c (tui_file::write): New.
11273 * tui/tui-file.h (tui_file): Override "write".
11274 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
11275 factored out from ...
11276 (tui_puts): ... here.
11277 (tui_putc): Use them.
11278 (tui_write): New function.
11279 * tui/tui-io.h (tui_write): Declare.
11280
11281 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
11282
11283 * Makefile.in (SFILES): Replace "environ.c" with
11284 "common/environ.c".
11285 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
11286 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
11287 to...
11288 * common/environ.c: ... here.
11289 * environ.h: Moved to...
11290 * common/environ.h: ... here.
11291
11292 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
11293
11294 * gdbarch.sh (pstring_ptr): New static function.
11295 (gdbarch_disassembler_options): Use it.
11296 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
11297 not valid_disassembler_option->name.
11298 * gdbarch.c: Regenerate.
11299
11300 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
11301
11302 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
11303
11304 2017-03-07 Pedro Alves <palves@redhat.com>
11305
11306 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
11307
11308 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
11309
11310 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
11311 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
11312 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
11313 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
11314
11315 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
11316
11317 * xtensa-linux-nat.c (fetch_gregs): Remove const.
11318
11319 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
11320
11321 * remote.c (remote_add_target_side_commands): Use range-based
11322 for loop.
11323
11324 2017-03-03 Yao Qi <yao.qi@linaro.org>
11325
11326 PR gdb/21165
11327 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
11328 value is lazy.
11329 * valprint.c (common_val_print): Likewise.
11330
11331 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
11332
11333 * NEWS: Mention new set/show disassembler-options commands.
11334 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
11335 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
11336 (prospective_options): New static variable.
11337 (gdb_disassembler::gdb_disassembler): Initialize
11338 m_di.disassembler_options.
11339 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
11340 (get_disassembler_options): New function.
11341 (set_disassembler_options): Likewise.
11342 (set_disassembler_options_sfunc): Likewise.
11343 (show_disassembler_options_sfunc): Likewise.
11344 (disassembler_options_completer): Likewise.
11345 (_initialize_disasm): Likewise.
11346 * disasm.h (get_disassembler_options): New prototype.
11347 (set_disassembler_options): Likewise.
11348 * gdbarch.sh (gdbarch_disassembler_options): New variable.
11349 (gdbarch_verify_disassembler_options): Likewise.
11350 * gdbarch.c: Regenerate.
11351 * gdbarch.h: Likewise.
11352 * arm-tdep.c (num_disassembly_options): Delete.
11353 (set_disassembly_style): Likewise.
11354 (arm_disassembler_options): New static variable.
11355 (set_disassembly_style_sfunc): Convert short style name into long
11356 option name. Call set_disassembler_options.
11357 (show_disassembly_style_sfunc): New function.
11358 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
11359 set_gdbarch_verify_disassembler_options.
11360 (_initialize_arm_tdep): Delete regnames variable and update callers.
11361 (arm_disassembler_options): Initialize.
11362 (disasm_options): New variable.
11363 (num_disassembly_options): Rename from this...
11364 (num_disassembly_styles): ...to this. Compute by scanning through
11365 disasm_options.
11366 (valid_disassembly_styles): Initialize using disasm_options.
11367 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
11368 set_arm_regname_option.
11369 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
11370 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
11371 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
11372 set_gdbarch_verify_disassembler_options.
11373 * s390-tdep.c (s390_disassembler_options): New static variable.
11374 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
11375 set_gdbarch_verify_disassembler_options.
11376
11377 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
11378
11379 * remote.c (remote_add_target_side_condition): Remove "struct"
11380 keyword from range-based for loop.
11381
11382 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
11383
11384 * remote.c (remote_add_target_side_condition): Use range-based
11385 for loop. Update comment.
11386
11387 2017-02-27 Yao Qi <yao.qi@linaro.org>
11388
11389 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
11390
11391 2017-02-26 Alan Hayward <alan.hayward@arm.com>
11392
11393 * regcache.c (regcache_raw_update): New function.
11394 (regcache_raw_read): Move code to regcache_raw_update.
11395 * regcache.h (regcache_raw_update): New declaration.
11396 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
11397
11398 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
11399
11400 * dwarf2read.c (create_debug_type_hash_table): Initialize
11401 header.signature and header.type_offset_in_tu.
11402
11403 2017-02-24 Pedro Alves <palves@redhat.com>
11404
11405 * symtab.c (make_file_symbol_completion_list_1): Use
11406 add_symtab_completions.
11407
11408 2017-02-24 Alan Hayward <alan.hayward@arm.com>
11409
11410 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
11411
11412 2017-02-24 Alan Hayward <alan.hayward@arm.com>
11413
11414 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
11415 I386_MAX_REGISTER_SIZE.
11416 (i386_pseudo_register_write): Likewise.
11417 (i386_process_record): Likewise.
11418 * i387-tdep.c (i387_supply_xsave): Likewise.
11419 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
11420 (store_register): Likewise.
11421
11422 2017-02-23 Pedro Alves <palves@redhat.com>
11423
11424 * ada-lang.c: Include "common/function-view.h".
11425 (ada_iterate_over_symbols): Adjust to use function_view as
11426 callback type.
11427 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
11428 (ada_make_symbol_completion_list): Use a lambda.
11429 (ada_exc_search_name_matches): Delete.
11430 (name_matches_regex): New.
11431 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
11432 * compile/compile-c-support.c: Include "common/function-view.h".
11433 (print_one_macro): Change prototype to accept a ui_file pointer.
11434 (write_macro_definitions): Use a lambda.
11435 * dwarf2read.c: Include "common/function-view.h".
11436 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
11437 (dw2_expand_symtabs_matching): Adjust to use function_view as
11438 callback type.
11439 * language.h: Include "common/function-view.h".
11440 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
11441 function_view as callback type.
11442 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
11443 * linespec.c: Include "common/function-view.h".
11444 (collect_info::add_symbol): New method.
11445 (struct symbol_and_data_callback, iterate_inline_only, struct
11446 symbol_matcher_data, iterate_name_matcher): Delete.
11447 (iterate_over_all_matching_symtabs): Adjust to use function_view
11448 as callback type and lambdas.
11449 (iterate_over_file_blocks): Adjust to use function_view as
11450 callback type.
11451 (decode_compound_collector): Now a class with private fields.
11452 (decode_compound_collector::release_symbols): New method.
11453 (collect_one_symbol): Rename to...
11454 (decode_compound_collector::operator()): ... this and adjust.
11455 (lookup_prefix_sym): decode_compound_collector construction bits
11456 move to decode_compound_collector ctor. Pass the
11457 decode_compound_collector object directly as callback. Remove
11458 cleanups and use decode_compound_collector::release_symbols
11459 instead.
11460 (symtab_collector): Now a class with private fields.
11461 (symtab_collector::release_symtabs): New method.
11462 (add_symtabs_to_list): Rename to...
11463 (symtab_collector::operator()): ... this and adjust.
11464 (collect_symtabs_from_filename): symtab_collector construction
11465 bits move to symtab_collector ctor. Pass the symtab_collector
11466 object directly as callback. Remove cleanups and use
11467 symtab_collector::release_symtabs instead.
11468 (collect_symbols): Delete.
11469 (add_matching_symbols_to_info): Use lambdas.
11470 * macrocmd.c (print_macro_callback): Delete.
11471 (info_macro_command): Use a lambda.
11472 (info_macros_command): Pass print_macro_definition as callable
11473 directly.
11474 (print_one_macro): Remove 'ignore' parameter.
11475 (macro_list_command): Adjust.
11476 * macrotab.c (macro_for_each_data::fn): Now a function_view.
11477 (macro_for_each_data::user_data): Delete field.
11478 (foreach_macro): Adjust to call the function_view.
11479 (macro_for_each): Adjust to use function_view as callback type.
11480 (foreach_macro_in_scope): Adjust to call the function_view.
11481 (macro_for_each_in_scope): Adjust to use function_view as callback
11482 type.
11483 * macrotab.h: Include "common/function-view.h".
11484 (macro_callback_fn): Declare a prototype instead of a pointer.
11485 Remove "user_data" parameter.
11486 (macro_for_each, macro_for_each_in_scope): Adjust to use
11487 function_view as callback type.
11488 * psymtab.c (partial_map_expand_apply)
11489 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
11490 Adjust to use function_view as callback type and to return bool.
11491 (psym_expand_symtabs_matching): Adjust to use function_view as
11492 callback types.
11493 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
11494 to use function_view as callback type and to return bool.
11495 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
11496 callback types.
11497 * symfile.c (expand_symtabs_matching): Adjust to use function_view
11498 as callback types.
11499 * symfile.h: Include "common/function-view.h".
11500 (expand_symtabs_file_matcher_ftype)
11501 (expand_symtabs_symbol_matcher_ftype)
11502 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
11503 return bool.
11504 (quick_symbol_functions::map_symtabs_matching_filename)
11505 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
11506 function_view as callback type and return bool.
11507 (expand_symtabs_matching): Adjust to use function_view as callback
11508 type.
11509 (maintenance_expand_name_matcher)
11510 (maintenance_expand_file_matcher): Delete.
11511 (maintenance_expand_symtabs): Use lambdas.
11512 * symtab.c (iterate_over_some_symtabs): Adjust to use
11513 function_view as callback types and return bool.
11514 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
11515 of a cleanup.
11516 (lookup_symtab_callback): Delete.
11517 (lookup_symtab): Use a lambda.
11518 (iterate_over_symbols): Adjust to use function_view as callback
11519 type.
11520 (struct search_symbols_data, search_symbols_file_matches)
11521 (search_symbols_name_matches): Delete.
11522 (search_symbols): Use a pair of lambdas.
11523 (struct add_name_data, add_macro_name, symbol_completion_matcher)
11524 (symtab_expansion_callback): Delete.
11525 (default_make_symbol_completion_list_break_on_1): Use lambdas.
11526 * symtab.h: Include "common/function-view.h".
11527 (iterate_over_some_symtabs): Adjust to use function_view as
11528 callback type and return bool.
11529 (iterate_over_symtabs): Adjust to use function_view as callback
11530 type.
11531 (symbol_found_callback_ftype): Remove 'data' parameter and return
11532 bool.
11533 (iterate_over_symbols): Adjust to use function_view as callback
11534 type.
11535
11536 2017-02-23 Pedro Alves <palves@redhat.com>
11537
11538 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
11539 (%.o) <unittests/%.c>: New pattern.
11540 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
11541 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
11542 * common/function-view.h: New file.
11543 * unittests/function-view-selftests.c: New file.
11544 * configure: Regenerate.
11545
11546 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
11547
11548 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
11549 inferior_ptid.
11550 * go32-nat.c (go32_thread_alive): Likewise.
11551
11552 2017-02-23 Yao Qi <yao.qi@linaro.org>
11553
11554 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
11555 delete.
11556
11557 2017-02-23 Yao Qi <yao.qi@linaro.org>
11558
11559 * varobj.c (varobj_clear_saved_item): Use delete instead of
11560 xfree.
11561 (update_dynamic_varobj_children): Likewise.
11562
11563 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11564
11565 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
11566
11567 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
11568
11569 * common/enum-flags.h (enum_flags::enum_flags): Initialize
11570 m_enum_value to 0 in default constructor.
11571
11572 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11573
11574 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
11575 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
11576 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
11577 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
11578 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
11579 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
11580 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
11581 IS_STORE_CONDITIONAL_INSN.
11582
11583 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11584
11585 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
11586
11587 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11588
11589 * NEWS (Changes since GDB 7.12): Add DWARF-5.
11590
11591 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11592
11593 * dwarf2read.c (skip_one_die, read_attribute_value)
11594 (dwarf2_const_value_attr, dump_die_shallow)
11595 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
11596 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
11597
11598 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11599
11600 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
11601 (dwarf_parse_macro_header): Accept DWARF version 5.
11602 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
11603
11604 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11605
11606 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
11607 DW_AT_GNU_*.
11608 * common/common-exceptions.h (enum errors): Likewise.
11609 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
11610 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
11611 (dwarf_expr_context::execute_stack_op): Likewise.
11612 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
11613 Likewise.
11614 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
11615 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
11616 (show_entry_values_debug, call_site_to_target_addr)
11617 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
11618 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
11619 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
11620 (value_of_dwarf_block_entry, indirect_pieced_value)
11621 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
11622 (disassemble_dwarf_expression): Likewise.
11623 * dwarf2read.c (process_die, inherit_abstract_dies)
11624 (read_call_site_scope): Likewise.
11625 * gdbtypes.h (struct func_type, struct call_site_parameter)
11626 (struct call_site): Likewise.
11627 * stack.c (read_frame_arg): Likewise.
11628 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
11629
11630 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11631
11632 * defs.h (read_unsigned_leb128): New declaration.
11633 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
11634 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
11635 (dwarf2_find_location_expression): Call also
11636 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
11637 * dwarf2loc.h (dwarf2_version): New declaration.
11638 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
11639 rnglists.
11640 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
11641 .debug_rnglists.
11642 (struct dwop_section_names): Add loclists_dwo.
11643 (dwop_section_names): Add .debug_loclists.dwo.
11644 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
11645 (struct dwarf2_per_cu_data): Add dwarf_version.
11646 (struct dwo_sections): Add loclists.
11647 (struct attr_abbrev): Add implicit_const.
11648 (read_indirect_line_string): New declaration.
11649 (read_unsigned_leb128): Delete declaration.
11650 (rcuh_kind): New definition.
11651 (read_and_check_comp_unit_head): Change parameter
11652 is_debug_types_section to section_kind.
11653 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
11654 (read_comp_unit_head): Change parameter abfd to section, add parameter
11655 section_kind. Handle DWARF-5.
11656 (error_check_comp_unit_head): Accept also DWARF version 5.
11657 (read_and_check_comp_unit_head): Change parameter
11658 is_debug_types_section to section_kind.
11659 (read_and_check_type_unit_head): Delete function.
11660 (read_abbrev_offset): Handle DWARF-5.
11661 (create_debug_type_hash_table): Add parameter section_kind. Process
11662 only DW_UT_type. Use signature and type_offset_in_tu from struct
11663 comp_unit_head.
11664 (create_debug_types_hash_table): Update create_debug_type_hash_table
11665 caller.
11666 (create_all_type_units): Call create_debug_type_hash_table.
11667 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
11668 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
11669 caller.
11670 (skip_one_die): Handle DW_FORM_implicit_const.
11671 (dwarf2_rnglists_process): New function.
11672 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
11673 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
11674 (read_attribute_value): Handle DW_FORM_implicit_const,
11675 DW_FORM_line_strp.
11676 (read_attribute): Handle DW_FORM_implicit_const.
11677 (read_indirect_string_at_offset_from): New function from
11678 read_indirect_string_at_offset.
11679 (read_indirect_string_at_offset): Call
11680 read_indirect_string_at_offset_from.
11681 (read_indirect_line_string_at_offset): New function.
11682 (read_indirect_string): New function comment.
11683 (read_indirect_line_string): New function.
11684 (read_unsigned_leb128): Make it global.
11685 (dwarf2_string_attr): Handle DWARF-5.
11686 (add_include_dir_stub, read_formatted_entries): New functions.
11687 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
11688 Handle DWARF-5.
11689 (per_cu_header_read_in): Update read_comp_unit_head caller.
11690 (dwarf2_version): New function.
11691 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
11692 rnglists.
11693 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
11694 fields.
11695
11696 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11697
11698 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
11699
11700 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11701
11702 * dwarf2read.c (dwarf2_ranges_process): New function from
11703 dwarf2_ranges_read.
11704 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
11705 dwarf2_ranges_process.
11706
11707 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11708
11709 * dwarf2read.c (create_debug_type_hash_table): New function from
11710 create_debug_types_hash_table.
11711 (create_debug_types_hash_table): Call create_debug_type_hash_table.
11712 (create_all_type_units, open_and_init_dwo_file): Update
11713 create_debug_types_hash_table callers.
11714
11715 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
11716
11717 PR gdb/16188
11718 * fork-child.c (trace_start_error): Fix thinko. va_end should
11719 refer to 'ap', not 'args'.
11720
11721 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
11722 Pedro Alves <palves@redhat.com>
11723
11724 PR gdb/16188
11725 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
11726 calls succeeded.
11727 * fork-child.c (trace_start_error): New function.
11728 (trace_start_error_with_name): Likewise.
11729 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
11730 * inf-ptrace.c (inf_ptrace_me): Likewise.
11731 * inferior.h (trace_start_error): New prototype.
11732 (trace_start_error_with_name): Likewise.
11733
11734 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
11735
11736 PR gdb/21164
11737 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
11738 NULL before using it.
11739 * symmisc.c (maintenance_print_symbols): Likewise.
11740 (maintenance_print_msymbols): Likewise.
11741
11742 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11743
11744 * NEWS: Add record Python bindings entry.
11745
11746 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11747
11748 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
11749 py-record-full.o.
11750 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
11751 * python/py-record-btrace.c, python/py-record-btrace.h,
11752 python/py-record-full.c, python/py-record-full.h: New file.
11753 * python/py-record.c: Add include for py-record-btrace.h and
11754 py-record-full.h.
11755 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
11756 recpy_instruction_history, recpy_function_call_history, recpy_begin,
11757 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
11758 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
11759 New definition.
11760 (gdbpy_initialize_btrace): New export.
11761 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
11762
11763 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11764
11765 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
11766 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
11767 * python/py-record.c: New file.
11768 * python/python-internal.h (gdbpy_start_recording,
11769 gdbpy_current_recording, gdpy_stop_recording,
11770 gdbpy_initialize_record): New export.
11771 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
11772 (python_GdbMethods): Add gdbpy_start_recording,
11773 gdbpy_current_recording and gdbpy_stop_recording.
11774
11775 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11776
11777 * record-btrace.c (record_btrace_record_method): New function.
11778 (init_record_btrace_ops): Initialize to_record_method.
11779 * record-full.c (record_full_record_method): New function.
11780 (init_record_full_ops, init_record_full_core_ops): Add
11781 record_full_record_method.
11782 * record.h (enum record_method): New enum.
11783 * target-debug.h (target_debug_print_enum_record_method: New define.
11784 * target-delegates.c: Regenerate.
11785 * target.c (target_record_method): New function.
11786 * target.h: Include record.h.
11787 (struct target_ops) <to_record_method>: New field.
11788 (target_record_method): New export.
11789
11790 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11791
11792 * record.h (record_start, record_stop): New export.
11793 * record.c (record_start, record_stop): New function.
11794
11795 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11796
11797 * btrace.c (btrace_fetch): Copy function call segments pointer
11798 into a vector.
11799 (btrace_clear): Clear the vector.
11800 (btrace_find_insn_by_number): Use binary search to find the correct
11801 function call segment.
11802 * btrace.h (brace_fun_p): New typedef.
11803 (struct btrace_thread_info) <functions>: New field.
11804
11805 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11806
11807 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11808 * btrace.c (btrace_decode_error): ... here. New function.
11809 * btrace.h (btrace_decode_error): New export.
11810
11811 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11812
11813 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11814 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11815 btrace_find_insn_by_number): Remove special case for gaps.
11816 * btrace.h (btrace_insn_get_error): New export.
11817 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11818 * record-btrace.c (btrace_insn_history): Print number for gaps.
11819 (record_btrace_info, record_btrace_goto): Handle gaps.
11820
11821 2017-02-14 Tom Tromey <tom@tromey.com>
11822
11823 PR python/13598:
11824 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11825 event.
11826 * python/py-evts.c (gdbpy_initialize_py_events): Add
11827 before_prompt registry.
11828 * python/py-events.h (events_object) <before_prompt>: New field.
11829
11830 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
11831
11832 * btrace.c (ftrace_new_switch): Preserve up link and flags.
11833
11834 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
11835
11836 * symfile (_initialize_symfile): Add usage text to the load command's
11837 help text.
11838
11839 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
11840
11841 * utils.c (defaulted_query): Don't query on secondary UIs.
11842
11843 2017-02-10 Tom Tromey <tom@tromey.com>
11844
11845 * rust-lang.c (rust_get_disr_info): Remove unused variable.
11846
11847 2017-02-10 Tom Tromey <tom@tromey.com>
11848
11849 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11850 "cleanup" local.
11851 * python/py-type.c (typy_legacy_template_argument): Remove
11852 unnecessary "cleanup" local.
11853
11854 2017-02-10 Tom Tromey <tom@tromey.com>
11855
11856 * python/python.c (do_start_initialization): New function, from
11857 _initialize_python.
11858 (_initialize_python): Call do_start_initialization.
11859 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11860 goto.
11861
11862 2017-02-10 Tom Tromey <tom@tromey.com>
11863
11864 * python/py-prettyprint.c (pretty_print_one_value): Use
11865 gdbpy_ref.
11866
11867 2017-02-10 Tom Tromey <tom@tromey.com>
11868
11869 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11870 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11871 gdbpy_ref.
11872 * python/py-type.c (field_new): Use gdbpy_ref.
11873 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11874 gdbpy_ref.
11875 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11876 (py_free_pspace): Likewise.
11877 (pspace_to_pspace_object): Likewise.
11878 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11879 (py_free_objfile): Likewise.
11880 (objfile_to_objfile_object): Likewise.
11881 * python/py-inferior.c (delete_thread_object): Use
11882 gdbpy_ref.
11883 (infpy_read_memory): Likewise.
11884 (py_free_inferior): Likewise.
11885 * python/py-evtregistry.c (create_eventregistry_object): Use
11886 gdbpy_ref.
11887 * python/py-event.c (create_event_object): Use gdbpy_ref.
11888
11889 2017-02-10 Tom Tromey <tom@tromey.com>
11890
11891 * python/py-ref.h (gdbpy_ref_policy): Now a template.
11892 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11893 used.
11894 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11895 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11896 python/py-exitedevent.c, python/py-finishbreakpoint.c,
11897 python/py-framefilter.c, python/py-function.c,
11898 python/py-inferior.c, python/py-infevents.c,
11899 python/py-linetable.c, python/py-newobjfileevent.c,
11900 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11901 python/py-signalevent.c, python/py-stopevent.c,
11902 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11903 python/py-unwind.c, python/py-utils.c, python/py-value.c,
11904 python/py-varobj.c, python/py-xmethods.c, python/python.c,
11905 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11906
11907 2017-02-10 Tom Tromey <tom@tromey.com>
11908
11909 * ui-out.h (ui_out_emit_type): New class.
11910 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11911 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11912 and ui_out_emit_tuple.
11913 (enumerate_locals): Likewise.
11914 (py_mi_print_variables, py_print_locals, py_print_args): Use
11915 ui_out_emit_list.
11916 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11917 ui_out_emit_list.
11918 * common/gdb_optional.h: New file.
11919
11920 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
11921
11922 * MAINTAINERS (Write After Approval): Update my e-mail address.
11923
11924 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
11925
11926 PR gdb/21122
11927 * breakpoint.c (_initialize_breakpoint): Update the help description
11928 of the 'commands' command to indicate that it takes a list argument.
11929
11930 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
11931
11932 * interps.c (current_interp_set_logging): Remove "return".
11933
11934 2017-02-09 Gary Benson <gbenson@redhat.com>
11935
11936 * symtab.c (add_symtab_completions): Prevent NULL pointer
11937 dereference.
11938
11939 2017-02-08 Pedro Alves <palves@redhat.com>
11940
11941 * interps.c (interp::interp): Remove reference to quiet_p.
11942 (interp_set): Make static. Remove dead "Switching to" output
11943 code.
11944 (interp_quiet_p, interp_set_quiet): Delete.
11945 (interpreter_exec_cmd): Don't set the interpreter quiet.
11946 * interps.h (interp_quiet_p): Make static.
11947 (class interp) <quiet_p>: Remove field
11948
11949 2017-02-08 Jerome Guitton <guitton@adacore.com>
11950
11951 * cli/cli-decode.c (find_command_name_length): Make it extern.
11952 * cli/cli-decode.h (find_command_name_length): Declare.
11953 * cli/cli-script.c (command_name_equals, line_first_arg):
11954 New functions.
11955 (process_next_line): Use cli-decode to parse command names.
11956 (build_command_line): Make args a constant pointer.
11957
11958 2017-02-08 Jerome Guitton <guitton@adacore.com>
11959
11960 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11961 Remove case-insensitive search.
11962
11963 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
11964
11965 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11966 at the end of the line. Avoids an ARI warning.
11967
11968 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
11969
11970 * NEWS: Mention support for record/replay of Intel 64 rdrand and
11971 rdseed instructions.
11972 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11973
11974 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
11975
11976 PR tdep/20936
11977 Provide and use sparc32 and sparc64 target description XML files.
11978 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11979 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11980 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11981 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11982 * features/sparc/sparc32-solaris.xml: New file.
11983 * features/sparc/sparc64-solaris.xml: New file.
11984 * features/sparc/sparc32-solaris.c: Generated.
11985 * features/sparc/sparc64-solaris.c: Generated.
11986 * sparc-tdep.h: Account for differences in target descriptions.
11987 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11988 (sparc32_register_type): Use target provided registers.
11989 (validate_tdesc_registers): New function.
11990 (sparc32_gdbarch_init): Use tdesc_has_registers.
11991 Set pseudoregister functions.
11992 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11993 (sparc64_register_type): Use target provided registers.
11994 (sparc64_init_abi): Set pseudoregister functions.
11995
11996 2017-02-03 Tom Tromey <tom@tromey.com>
11997
11998 PR rust/21097:
11999 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12000 with a single member.
12001
12002 2017-02-03 Pedro Alves <palves@redhat.com>
12003
12004 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12005 (cli_interp_base::~cli_interp_base): New.
12006 (cli_interp): New struct.
12007 (as_cli_interp): Cast the interp itself to cli_interp.
12008 (cli_interpreter_pre_command_loop): Rename to ...
12009 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
12010 parameter.
12011 (cli_interpreter_init): Rename to ...
12012 (cli_interp::init): ... this. Remove 'self' parameter. Use
12013 boolean. Make extern.
12014 (cli_interpreter_resume): Rename to ...
12015 (cli_interp::resume): ... this. Remove 'data' parameter. Make
12016 extern.
12017 (cli_interpreter_suspend): Rename to ...
12018 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
12019 extern.
12020 (cli_interpreter_exec): Rename to ...
12021 (cli_interp::exec): ... this. Remove 'data' parameter. Make
12022 extern.
12023 (cli_interpreter_supports_command_editing): Rename to ...
12024 (cli_interp_base::supports_command_editing): ... this. Remove
12025 'interp' parameter. Make extern.
12026 (cli_ui_out): Rename to ...
12027 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
12028 Make extern.
12029 (cli_set_logging): Rename to ...
12030 (cli_interp_base::set_logging): ... this. Remove 'interp'
12031 parameter. Make extern.
12032 (cli_interp_procs): Delete.
12033 (cli_interp_factory): Adjust to use "new".
12034 * cli/cli-interp.h: Include "interps.h".
12035 (struct cli_interp_base): New struct.
12036 * interps.c (struct interp): Delete. Fields moved to interps.h.
12037 (interp_new): Delete.
12038 (interp::interp, interp::~interp): New.
12039 (interp_set): Use bool, and return void. Assume the interpreter
12040 has suspend, init and resume methods, and that the all return
12041 void.
12042 (set_top_level_interpreter): interp_set returns void.
12043 (interp_ui_out): Adapt.
12044 (current_interp_set_logging): Adapt.
12045 (interp_data): Delete.
12046 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12047 (interp_exec): Adapt.
12048 (top_level_interpreter_data): Delete.
12049 * interps.h (interp_init_ftype, interp_resume_ftype)
12050 (interp_suspend_ftype, interp_exec_ftype)
12051 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12052 (class interp): New.
12053 (interp_new): Delete.
12054 (interp_set): Now returns void. Use bool.
12055 (interp_data, top_level_interpreter_data): Delete.
12056 * mi/mi-common.h: Include interps.h.
12057 (class mi_interp): Inherit from interp. Define a ctor. Declare
12058 init, resume, suspect, exec, interp_ui_out, set_logging and
12059 pre_command_loop methods.
12060 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12061 (mi_interpreter_init): Rename to ...
12062 (mi_interp::init): ... this. Remove the 'interp' parameter, use
12063 bool, return void and make extern. Adjust.
12064 (mi_interpreter_resume): ... Rename to ...
12065 (mi_interp::resume): ... this. Remove the 'data' parameter,
12066 return void and make extern. Adjust.
12067 (mi_interpreter_suspend): ... Rename to ...
12068 (mi_interp::suspend): ... this. Remove the 'data' parameter,
12069 return void and make extern. Adjust.
12070 (mi_interpreter_exec): ... Rename to ...
12071 (mi_interp::exec): ... this. Remove the 'data' parameter and make
12072 extern. Adjust.
12073 (mi_interpreter_pre_command_loop): ... Rename to ...
12074 (mi_interp::pre_command_loop): ... this. Remove the 'self'
12075 parameter and make extern.
12076 (mi_on_normal_stop_1): Adjust.
12077 (mi_ui_out): Rename to ...
12078 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
12079 parameter and make extern. Adjust.
12080 (mi_set_logging): Rename to ...
12081 (mi_interp::set_logging): ... this. Remove the 'interp'
12082 parameter and make extern. Adjust.
12083 (mi_interp_procs): Delete.
12084 (mi_interp_factory): Adjust to use 'new'.
12085 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12086 (mi_print_exception, mi_execute_command, mi_load_progress):
12087 Adjust.
12088 * tui/tui-interp.c (tui_interp): New class.
12089 (as_tui_interp): Return a tui_interp pointer.
12090 (tui_on_normal_stop, tui_on_signal_received)
12091 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12092 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12093 to use interp::interp_ui_out.
12094 (tui_init): Rename to ...
12095 (tui_interp::init): ... this. Remove the 'self' parameter, use
12096 bool, return void and make extern. Adjust.
12097 (tui_resume): Rename to ...
12098 (tui_interp::resume): ... this. Remove the 'data' parameter,
12099 return void and make extern. Adjust.
12100 (tui_suspend): Rename to ...
12101 (tui_interp::suspend): ... this. Remove the 'data' parameter,
12102 return void and make extern. Adjust.
12103 (tui_ui_out): Rename to ...
12104 (tui_interp::interp_ui_out): ... this. Remove the 'self'
12105 parameter, and make extern. Adjust.
12106 (tui_exec): Rename to ...
12107 (tui_interp::exec): ... this. Remove the 'data' parameter and
12108 make extern.
12109 (tui_interp_procs): Delete.
12110 (tui_interp_factory): Use "new".
12111
12112 2017-02-02 Tom Tromey <tom@tromey.com>
12113
12114 * rust-exp.y (ends_raw_string, space_then_number)
12115 (rust_identifier_start_p): Return bool.
12116 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12117 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12118 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12119 (rust_chartype_p): Return bool.
12120 (val_print_struct, rust_print_struct_def, rust_print_type):
12121 Update.
12122 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
12123 Return bool.
12124
12125 2017-02-02 Tom Tromey <tom@tromey.com>
12126
12127 * rust-lang.c: Reindent.
12128
12129 2017-02-02 Tom Tromey <tom@tromey.com>
12130
12131 * rust-lang.h (rust_crate_for_block): Update.
12132 * rust-lang.c (rust_crate_for_block): Return std::string.
12133 (rust_get_disr_info): Use std:;string, not
12134 gdb::unique_xmalloc_ptr.
12135 * rust-exp.y (crate_name): Update.
12136
12137 2017-02-02 Pedro Alves <palves@redhat.com>
12138
12139 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
12140 field out of gdb_disassembler_test and make it static.
12141
12142 2017-02-02 Pedro Alves <palves@redhat.com>
12143
12144 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
12145 mi1_interp and mi_interp fields.
12146
12147 2017-02-02 Pedro Alves <palves@redhat.com>
12148
12149 * cli/cli-interp.c (struct saved_output_files, saved_output):
12150 Moved from cli/cli-logging.c.
12151 (cli_set_logging): New function.
12152 (cli_interp_procs): Install cli_set_logging.
12153 * cli/cli-interp.h (make_logging_output, cli_set_logging):
12154 Declare.
12155 * cli/cli-logging.c (struct saved_output_files, saved_output):
12156 Moved to cli/cli-interp.c.
12157 (pop_output_files): Don't save outputs here.
12158 (make_logging_output): New function.
12159 (handle_redirections): Don't build tee nor save previous outputs
12160 here.
12161 * interps.c (current_interp_set_logging): Change prototype.
12162 Assume there's always a set_logging_proc method installed.
12163 * interps.h (interp_set_logging_ftype): Change prototype.
12164 (current_interp_set_logging): Change prototype and adjust comment.
12165 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
12166 use make_logging_output.
12167 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
12168 2017-02-02 Pedro Alves <palves@redhat.com>
12169
12170 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12171 from ...
12172 (set_logging_overwrite): ... here.
12173 (logging_no_redirect_file): Delete.
12174 (set_logging_redirect): Don't handle redirection on the fly.
12175 Instead warn that "logging off" / "logging on" is necessary.
12176 (pop_output_files): Delete references to logging_no_redirect_file.
12177 (show_logging_command): Always speak in terms of what will happen
12178 once logging is reenabled.
12179
12180 2017-02-02 Pedro Alves <palves@redhat.com>
12181
12182 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12183
12184 2017-02-02 Pedro Alves <palves@redhat.com>
12185
12186 * disasm.c (gdb_pretty_print_insn): Rename to ...
12187 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12188 Remove gdbarch parameter. Adapt to clear the object's buffers
12189 instead of allocating new buffers, and to print using the object's
12190 gdb_disassembler instead of calling gdb_print_insn.
12191 (dump_insns): Use gdb_pretty_print_disassembler.
12192 * disasm.h (gdb_pretty_print_insn): Delete declaration.
12193 (gdb_pretty_print_disassembler): New class.
12194 * record-btrace.c (btrace_insn_history): Use
12195 gdb_pretty_print_disassembler.
12196
12197 2017-02-02 Pedro Alves <palves@redhat.com>
12198
12199 * ada-lang.c (type_as_string): Use string_file.
12200 * ada-valprint.c (ada_print_floating): Use string_file.
12201 * ada-varobj.c (ada_varobj_scalar_image)
12202 (ada_varobj_get_value_image): Use string_file.
12203 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12204 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12205 * breakpoint.c (update_inserted_breakpoint_locations)
12206 (insert_breakpoint_locations, reattach_breakpoints)
12207 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12208 (print_it_watchpoint): Use string_file.
12209 (save_breakpoints): Use stdio_file.
12210 * c-exp.y (oper): Use string_file.
12211 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12212 tee_file.
12213 (pop_output_files): Use delete.
12214 (handle_redirections): Use stdio_file and tee_file.
12215 * cli/cli-setshow.c (do_show_command): Use string_file.
12216 * compile/compile-c-support.c (c_compute_program): Use
12217 string_file.
12218 * compile/compile-c-symbols.c (generate_vla_size): Take a
12219 'string_file &' instead of a 'ui_file *'.
12220 (generate_c_for_for_one_variable): Take a 'string_file &' instead
12221 of a 'ui_file *'. Use string_file.
12222 (generate_c_for_variable_locations): Take a 'string_file &'
12223 instead of a 'ui_file *'.
12224 * compile/compile-internal.h (generate_c_for_for_one_variable):
12225 Take a 'string_file &' instead of a 'ui_file *'.
12226 * compile/compile-loc2c.c (push, pushf, unary, binary)
12227 (print_label, pushf_register_address, pushf_register)
12228 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12229 'ui_file *'. Adjust.
12230 * compile/compile.c (compile_to_object): Use string_file.
12231 * compile/compile.h (compile_dwarf_expr_to_c)
12232 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
12233 'ui_file *'.
12234 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
12235 (replace_typedefs_qualified_name): Use string_file and
12236 obstack_copy0.
12237 * disasm.c (gdb_pretty_print_insn): Use string_file.
12238 (gdb_disassembly): Adjust reference the null_stream global.
12239 (do_ui_file_delete): Delete.
12240 (gdb_insn_length): Use null_stream.
12241 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
12242 * dwarf2loc.c (dwarf2_compile_property_to_c)
12243 (locexpr_generate_c_location, loclist_generate_c_location): Take a
12244 'string_file &' instead of a 'ui_file *'.
12245 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
12246 * dwarf2read.c (do_ui_file_peek_last): Delete.
12247 (dwarf2_compute_name): Use string_file.
12248 * event-top.c (gdb_setup_readline): Use stdio_file.
12249 * gdbarch.sh (verify_gdbarch): Use string_file.
12250 * gdbtypes.c (safe_parse_type): Use null_stream.
12251 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
12252 string_file.
12253 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
12254 'string_file *' instead of a 'ui_file *'.
12255 (gdbscm_arch_disassemble): Use string_file.
12256 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
12257 * guile/scm-ports.c (class ioscm_file_port): Now a class that
12258 inherits from ui_file.
12259 (ioscm_file_port_delete, ioscm_file_port_rewind)
12260 (ioscm_file_port_put): Delete.
12261 (ioscm_file_port_write): Rename to ...
12262 (ioscm_file_port::write): ... this. Remove file_port_magic
12263 checks.
12264 (ioscm_file_port_new): Delete.
12265 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
12266 ui_file_up.
12267 * guile/scm-type.c (tyscm_type_name): Use string_file.
12268 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
12269 Use string_file.
12270 * infcmd.c (print_return_value_1): Use string_file.
12271 * infrun.c (print_target_wait_results): Use string_file.
12272 * language.c (add_language): Use string_file.
12273 * location.c (explicit_to_string_internal): Use string_file.
12274 * main.c (captured_main_1): Use null_file.
12275 * maint.c (maintenance_print_architecture): Use stdio_file.
12276 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
12277 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
12278 event_channel>: Change type to mi_console_file pointer.
12279 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
12280 (mi_console_file_delete): Delete.
12281 (struct mi_console_file): Delete.
12282 (mi_console_file_magic): Delete.
12283 (mi_console_file_new): Delete.
12284 (mi_console_file::mi_console_file): New.
12285 (mi_console_file_delete): Delete.
12286 (mi_console_file_fputs): Delete.
12287 (mi_console_file::write): New.
12288 (mi_console_raw_packet): Delete.
12289 (mi_console_file::flush): New.
12290 (mi_console_file_flush): Delete.
12291 (mi_console_set_raw): Rename to ...
12292 (mi_console_file::set_raw): ... this.
12293 * mi/mi-console.h (class mi_console_file): New class.
12294 (mi_console_file_new, mi_console_set_raw): Delete.
12295 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
12296 (mi_set_logging): Use delete and tee_file. Adjust.
12297 * mi/mi-main.c (output_register): Use string_file.
12298 (mi_cmd_data_evaluate_expression): Use string_file.
12299 (mi_cmd_data_read_memory): Use string_file.
12300 (mi_cmd_execute, print_variable_or_computed): Use string_file.
12301 * mi/mi-out.c (mi_ui_out::main_stream): New.
12302 (mi_ui_out::rewind): Use main_stream and
12303 string_file.
12304 (mi_ui_out::put): Use main_stream and string_file.
12305 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12306 Allocate a 'string_file' instead.
12307 (mi_out_new): Don't allocate a mem_fileopen stream here.
12308 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12309 (mi_ui_out::main_stream): Declare method.
12310 * printcmd.c (eval_command): Use string_file.
12311 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
12312 * python/py-arch.c (archpy_disassemble): Use string_file.
12313 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
12314 * python/py-frame.c (frapy_str): Use string_file.
12315 * python/py-framefilter.c (py_print_type, py_print_single_arg):
12316 Use string_file.
12317 * python/py-type.c (typy_str): Use string_file.
12318 * python/py-unwind.c (unwind_infopy_str): Use string_file.
12319 * python/py-value.c (valpy_str): Use string_file.
12320 * record-btrace.c (btrace_insn_history): Use string_file.
12321 * regcache.c (regcache_print): Use stdio_file.
12322 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
12323 * remote.c (escape_buffer): Use string_file.
12324 * rust-lang.c (rust_get_disr_info): Use string_file.
12325 * serial.c (serial_open_ops_1): Use stdio_file.
12326 (do_serial_close): Use delete.
12327 * stack.c (print_frame_arg): Use string_file.
12328 (print_frame_args): Remove local mem_fileopen stream, not used.
12329 (print_frame): Use string_file.
12330 * symmisc.c (maintenance_print_symbols): Use stdio_file.
12331 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
12332 Take a 'string_file *' instead of a 'ui_file *'.
12333 * top.c (new_ui): Use stdio_file and stderr_file.
12334 (free_ui): Use delete.
12335 (execute_command_to_string): Use string_file.
12336 (quit_confirm): Use string_file.
12337 * tracepoint.c (collection_list::append_exp): Use string_file.
12338 * tui/tui-disasm.c (tui_disassemble): Use string_file.
12339 * tui/tui-file.c: Don't include "ui-file.h".
12340 (enum streamtype, struct tui_stream): Delete.
12341 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
12342 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
12343 (tui_file::tui_file): New method.
12344 (tui_file_fputs): Delete.
12345 (tui_file_get_strbuf): Delete.
12346 (tui_file::puts): New method.
12347 (tui_file_adjust_strbuf): Delete.
12348 (tui_file_flush): Delete.
12349 (tui_file::flush): New method.
12350 * tui/tui-file.h: Tweak intro comment.
12351 Include ui-file.h.
12352 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
12353 (tui_file_adjust_strbuf): Delete declarations.
12354 (class tui_file): New class.
12355 * tui/tui-io.c (tui_initialize_io): Use tui_file.
12356 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
12357 (tui_register_format): Use string_stream.
12358 * tui/tui-stack.c (tui_make_status_line): Use string_file.
12359 (tui_get_function_from_frame): Use string_file.
12360 * typeprint.c (type_to_string): Use string_file.
12361 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
12362 (null_stream): New global.
12363 (ui_file_delete): Delete.
12364 (ui_file::ui_file): New.
12365 (null_file_isatty): Delete.
12366 (ui_file::~ui_file): New.
12367 (null_file_rewind): Delete.
12368 (ui_file::printf): New.
12369 (null_file_put): Delete.
12370 (null_file_flush): Delete.
12371 (ui_file::putstr): New.
12372 (null_file_write): Delete.
12373 (ui_file::putstrn): New.
12374 (null_file_read): Delete.
12375 (ui_file::putc): New.
12376 (null_file_fputs): Delete.
12377 (null_file_write_async_safe): Delete.
12378 (ui_file::vprintf): New.
12379 (null_file_delete): Delete.
12380 (null_file::write): New.
12381 (null_file_fseek): Delete.
12382 (null_file::puts): New.
12383 (ui_file_data): Delete.
12384 (null_file::write_async_safe): New.
12385 (gdb_flush, ui_file_isatty): Adjust.
12386 (ui_file_put, ui_file_rewind): Delete.
12387 (ui_file_write): Adjust.
12388 (ui_file_write_for_put): Delete.
12389 (ui_file_write_async_safe, ui_file_read): Adjust.
12390 (ui_file_fseek): Delete.
12391 (fputs_unfiltered): Adjust.
12392 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
12393 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
12394 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
12395 (set_ui_file_data): Delete.
12396 (string_file::~string_file, string_file::write)
12397 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
12398 (do_ui_file_as_string, ui_file_as_string): Delete.
12399 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
12400 (struct mem_file): Delete.
12401 (mem_file_new): Delete.
12402 (stdio_file::stdio_file): New.
12403 (mem_file_delete): Delete.
12404 (stdio_file::stdio_file): New.
12405 (mem_fileopen): Delete.
12406 (stdio_file::~stdio_file): New.
12407 (mem_file_rewind): Delete.
12408 (stdio_file::set_stream): New.
12409 (mem_file_put): Delete.
12410 (stdio_file::open): New.
12411 (mem_file_write): Delete.
12412 (stdio_file_magic, struct stdio_file): Delete.
12413 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
12414 (stdio_file::flush): New.
12415 (stdio_file_read): Rename to ...
12416 (stdio_file::read): ... this. Adjust.
12417 (stdio_file_write): Rename to ...
12418 (stdio_file::write): ... this. Adjust.
12419 (stdio_file_write_async_safe): Rename to ...
12420 (stdio_file::write_async_safe) ... this. Adjust.
12421 (stdio_file_fputs): Rename to ...
12422 (stdio_file::puts) ... this. Adjust.
12423 (stdio_file_isatty): Delete.
12424 (stdio_file_fseek): Delete.
12425 (stdio_file::isatty): New.
12426 (stderr_file_write): Rename to ...
12427 (stderr_file::write) ... this. Adjust.
12428 (stderr_file_fputs): Rename to ...
12429 (stderr_file::puts) ... this. Adjust.
12430 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
12431 (stderr_file::stderr_file): New.
12432 (tee_file_magic): Delete.
12433 (struct tee_file): Delete.
12434 (tee_file::tee_file): New.
12435 (tee_file_new): Delete.
12436 (tee_file::~tee_file): New.
12437 (tee_file_delete): Delete.
12438 (tee_file_flush): Rename to ...
12439 (tee_file::flush): ... this. Adjust.
12440 (tee_file_write): Rename to ...
12441 (tee_file::write): ... this. Adjust.
12442 (tee_file::write_async_safe): New.
12443 (tee_file_fputs): Rename to ...
12444 (tee_file::puts): ... this. Adjust.
12445 (tee_file_isatty): Rename to ...
12446 (tee_file::isatty): ... this. Adjust.
12447 * ui-file.h (struct obstack, struct ui_file): Don't
12448 forward-declare.
12449 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
12450 (ui_file_write_ftype)
12451 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
12452 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
12453 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
12454 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
12455 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
12456 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
12457 (set_ui_file_fseek): Delete.
12458 (ui_file_data, ui_file_delete, ui_file_rewind)
12459 (struct ui_file): New.
12460 (ui_file_up): New.
12461 (class null_file): New.
12462 (null_stream): Declare.
12463 (ui_file_write_for_put, ui_file_put): Delete.
12464 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
12465 Delete.
12466 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
12467 (gdb_fopen, tee_file_new): Delete.
12468 (struct string_file): New.
12469 (struct stdio_file): New.
12470 (stdio_file_up): New.
12471 (struct stderr_file): New.
12472 (class tee_file): New.
12473 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
12474 of a 'ui_file *'. Adjust.
12475 * ui-out.h (class ui_out) <field_stream>: Likewise.
12476 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
12477 (null_stream): Delete.
12478 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
12479 Adjust.
12480 * utils.h (struct ui_file): Delete forward declaration..
12481 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
12482 (error_stream): Take a 'string_file &' instead of a
12483 'ui_file *'.
12484 * varobj.c (varobj_value_get_print_value): Use string_file.
12485 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
12486 * gdbarch.c: Regenerate.
12487
12488 2017-02-02 Pedro Alves <palves@redhat.com>
12489
12490 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
12491 (gdb_pretty_print_insn): ... this. Now a free function. Add back
12492 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
12493 Adjust to call gdb_print_insn instead of
12494 gdb_disassembler::print_insn.
12495 (dump_insns, do_mixed_source_and_assembly_deprecated)
12496 (do_mixed_source_and_assembly, do_assembly_only): Add back a
12497 'gdbarch' parameter. Remove gdb_disassembler parameter.
12498 (gdb_disassembly): Don't allocate a gdb_disassembler here.
12499 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
12500 declaration.
12501 (gdb_pretty_print_insn): Re-add declaration.
12502 * record-btrace.c (btrace_insn_history): Don't allocate a
12503 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
12504
12505 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
12506
12507 * disasm.h (gdb_disassembly): Remove file_string parameter.
12508 * disasm.c (gdb_disassembly): Likewise.
12509 * cli/cli-cmds.c (print_disassembly): Adapt.
12510 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
12511 * stack.c (do_gdb_disassembly): Likewise.
12512
12513 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
12514
12515 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
12516 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
12517 targets. And if the implicit value is longer than needed, extract
12518 the first bytes instead of the "least significant" ones.
12519
12520 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
12521
12522 * btrace.c (btrace_enable): Do not call btrace_add_pc for
12523 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
12524 (btrace_fetch): Assert can_access_registers_ptid.
12525 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
12526 validate_registers_access.
12527
12528 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
12529
12530 * gdbthread.h (can_access_registers_ptid): New.
12531 * thread.c (can_access_registers_ptid): New.
12532
12533 2017-02-01 Pedro Alves <palves@redhat.com>
12534
12535 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
12536
12537 2017-01-31 Pedro Alves <palves@redhat.com>
12538
12539 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
12540 Fix typos.
12541
12542 2017-01-31 Pedro Alves <palves@redhat.com>
12543
12544 * stack.c (print_frame_args): Remove local mem_fileopen stream,
12545 not used.
12546
12547 2017-01-31 Pedro Alves <palves@redhat.com>
12548
12549 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
12550
12551 2017-01-31 Pedro Alves <palves@redhat.com>
12552
12553 * common/scoped_restore.h
12554 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
12555 change the value's parameter type to T2.
12556 (make_scoped_restore): Likewise.
12557
12558 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
12559 Richard Henderson <rth@redhat.com>
12560
12561 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
12562 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
12563 GS_BASE for older kernels.
12564 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
12565 GS_BASE for older kernels.
12566 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
12567 and GS_BASE to the offset table.
12568 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
12569 system register group.
12570 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
12571 for older kernels.
12572 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
12573 amd64 ABI.
12574 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
12575 AMD64_GSBASE_REGNUM.
12576 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
12577 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
12578 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
12579 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
12580 i386/64bit-segments.xml in those rules.
12581 * features/i386/64bit-segments.xml: New file.
12582 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
12583 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
12584 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
12585 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
12586 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
12587 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
12588 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
12589 * features/i386/amd64-avx-linux.c: Regenerated.
12590 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
12591 * features/i386/amd64-avx-mpx.c: Regenerated.
12592 * features/i386/amd64-avx512-linux.c: Regenerated.
12593 * features/i386/amd64-linux.c: Regenerated.
12594 * features/i386/amd64-mpx-linux.c: Regenerated.
12595 * features/i386/i386-avx-mpx-linux.c: Regenerated.
12596 * features/i386/i386-avx-mpx.c: Regenerated.
12597 * features/i386/x32-avx-linux.c: Regenerated.
12598 * features/i386/x32-avx512-linux.c: Regenerated.
12599 * regformats/i386/amd64-avx-linux.dat: Regenerated.
12600 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
12601 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
12602 * regformats/i386/amd64-linux.dat: Regenerated.
12603 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
12604 * regformats/i386/x32-avx-linux.dat: Regenerated.
12605 * regformats/i386/x32-avx512-linux.dat: Regenerated.
12606 * regformats/i386/x32-linux.dat: Regenerated.
12607
12608 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
12609
12610 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
12611 Set to AMD64_NUM_REGS.
12612
12613 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
12614
12615 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
12616 that checks validity of a register number.
12617
12618 2017-01-27 Kees Cook <keescook@google.com>
12619
12620 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
12621 fetch_fpregs if target has fpa registers.
12622 (arm_linux_store_inferior_registers): Call store_fpregs if target
12623 has fpa registers.
12624
12625 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
12626
12627 * cris-tdep.c (cris_gdbarch_init): Remove check for
12628 info.byte_order and force it to BFD_ENDIAN_LITTLE.
12629
12630 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
12631
12632 * corelow.c (get_core_register_section): Check for regset
12633 existence before checking for REGSET_VARIABLE_SIZE.
12634
12635 2017-01-26 Yao Qi <yao.qi@linaro.org>
12636 Pedro Alves <palves@redhat.com>
12637
12638 PR gdb/20939
12639 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
12640 call memory_error, save memaddr instead.
12641 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
12642 negative, cal memory_error.
12643 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
12644
12645 2017-01-26 Yao Qi <yao.qi@linaro.org>
12646
12647 * disasm-selftests.c (memory_error_test): New function.
12648 (_initialize_disasm_selftests): Register memory_error_test.
12649
12650 2017-01-26 Yao Qi <yao.qi@linaro.org>
12651
12652 * Makefile.in (SFILES): Add disasm-selftests.c and
12653 selftest-arch.c.
12654 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
12655 * disasm-selftests.c: New file.
12656 * selftest-arch.c: New file.
12657 * selftest-arch.h: New file.
12658
12659 2017-01-26 Yao Qi <yao.qi@linaro.org>
12660
12661 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
12662 to bfd_arch_mep. Don't return 0 if section is not
12663 found. Call print_insn_mep.
12664
12665 2017-01-26 Pedro Alves <palves@redhat.com>
12666 Yao Qi <yao.qi@linaro.org>
12667
12668 * arm-tdep.c: Include "disasm.h".
12669 (gdb_print_insn_arm): Update code to get gdbarch.
12670 * disasm.c (dis_asm_read_memory): Change it to
12671 gdb_disassembler::dis_asm_read_memory.
12672 (dis_asm_memory_error): Likewise.
12673 (dis_asm_print_address): Likewise.
12674 (gdb_pretty_print_insn): Change it to
12675 gdb_disassembler::pretty_print_insn.
12676 (dump_insns): Add one argument gdb_disassemlber. All
12677 callers updated.
12678 (do_mixed_source_and_assembly_deprecated): Likewise.
12679 (do_mixed_source_and_assembly): Likewise.
12680 (do_assembly_only): Likewise.
12681 (gdb_disassembler::gdb_disassembler): New.
12682 (gdb_disassembler::print_insn): New.
12683 * disasm.h (class gdb_disassembler): New.
12684 (gdb_pretty_print_insn): Remove declaration.
12685 (gdb_disassemble_info): Likewise.
12686 * guile/scm-disasm.c (class gdbscm_disassembler): New.
12687 (gdbscm_disasm_read_memory_worker): Update.
12688 (gdbscm_disasm_read_memory): Update.
12689 (gdbscm_disasm_memory_error): Remove.
12690 (gdbscm_disasm_print_address): Remove.
12691 (gdbscm_disassembler::gdbscm_disassembler): New.
12692 (gdbscm_print_insn_from_port): Update.
12693 * mips-tdep.c: Include disasm.h.
12694 (gdb_print_insn_mips): Update code to get gdbarch.
12695 * record-btrace.c (btrace_insn_history): Update.
12696 * spu-tdep.c: Include disasm.h.
12697 (struct spu_dis_asm_data): Remove.
12698 (struct spu_dis_asm_info): New.
12699 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
12700 SPU id.
12701 (gdb_print_insn_spu): Cast disassemble_info to
12702 spu_dis_asm_info.
12703
12704 2017-01-26 Yao Qi <yao.qi@linaro.org>
12705
12706 * disasm.c (do_ui_file_delete): Delete.
12707 (gdb_insn_length): Move code creating stream to ...
12708 * utils.c (null_stream): ... here. New function.
12709 * utils.h (null_stream): Declare.
12710
12711 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
12712
12713 * python/py-inferior.c (find_thread_object): Return directly
12714 from the loop. Remove "found" variable.
12715
12716 2017-01-21 Joel Brobecker <brobecker@adacore.com>
12717
12718 GDB 7.12.1 released.
12719
12720 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
12721
12722 * python/py-function.c (fnpy_call): Reorder declarations to have
12723 the gdbpy_enter object declared first.
12724 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
12725
12726 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
12727
12728 PR python/21068
12729 * python/python-internal.h (PyMem_RawMalloc): Define for
12730 Python < 3.4.
12731 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
12732 PyMem_RawMalloc instead of PyMem_Malloc.
12733
12734 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
12735 Luis Machado <lgustavo@codesourcery.com>
12736
12737 * NEWS (New commands): Mention flash-erase.
12738 (New MI commands): Mention target-flash-erase.
12739 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
12740 command.
12741 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
12742 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
12743 * target.c (flash_erase_command): New function.
12744 (initialize_targets): Add new flash-erase command.
12745 * target.h (flash_erase_command): New declaration.
12746
12747 2017-01-20 Joel Brobecker <brobecker@adacore.com>
12748
12749 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
12750 HAVE_SYS_PROCFS_H is defined.
12751
12752 2017-01-18 Alan Hayward <alan.hayward@arm.com>
12753
12754 * remote.c (struct cached_reg): Change data into a pointer.
12755 * (stop_reply_dtr): Free data pointers before deleting vector.
12756 (process_stop_reply): Likewise.
12757 (remote_parse_stop_reply): Allocate space for data
12758
12759 2017-01-18 Alan Hayward <alan.hayward@arm.com>
12760
12761 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
12762 MAX_REGISTER_SIZE.
12763 (amd64_pseudo_register_read_value): Likewise.
12764 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
12765 (store_register_using_P): Likewise.
12766 * regcache.c (regcache_xfer_part): Likewise.
12767
12768 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
12769
12770 Split real and pseudo registers.
12771 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
12772 (sparc32_pseudo_regnum): New enum.
12773 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
12774 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
12775 (SPARC32_CP0_REGISTERS): New macro.
12776 (sparc32_pseudo_register_name): New function.
12777 (sparc32_register_name): Use sparc32_pseudo_register_name.
12778 (sparc32_pseudo_register_type): New function.
12779 (sparc32_register_type): Use sparc32_pseudo_register_type.
12780 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12781 pseudo register numbers.
12782 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12783 (SPARC64_CP0_REGISTERS): New macro.
12784 (sparc64_pseudo_register_name): New function.
12785 (sparc64_register_name): Use sparc64_pseudo_register_name.
12786 (sparc64_pseudo_register_type): New function.
12787 (sparc64_register_type): Use sparc64_pseudo_register_type.
12788 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12789 pseudo register numbers.
12790 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12791 sparc64_store_arguments): Handle pseudo register numbers.
12792
12793 2017-01-13 Yao Qi <yao.qi@linaro.org>
12794
12795 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12796 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12797 output.
12798 (getpkt_or_notif_sane_1): Likewise.
12799
12800 2017-01-13 Yao Qi <yao.qi@linaro.org>
12801
12802 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12803 of CC. Pass "-x c++-header" instead of "-x c".
12804
12805 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12806
12807 * remote.c (remote_can_async_p): Update comment.
12808
12809 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12810
12811 * linux-nat.c (linux_nat_can_async_p): Update comment.
12812
12813 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12814
12815 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12816
12817 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
12818
12819 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12820
12821 2017-01-10 Tom Tromey <tom@tromey.com>
12822
12823 * python/py-type.c (typy_legacy_template_argument): Update.
12824 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12825 ~demangle_parse_info): Declare new members.
12826 (cp_demangled_name_to_comp): Return unique_ptr.
12827 (cp_demangled_name_parse_free)
12828 (make_cleanup_cp_demangled_name_parse_free)
12829 (cp_new_demangle_parse_info): Remove.
12830 * cp-support.c (do_demangled_name_parse_free_cleanup)
12831 (make_cleanup_cp_demangled_name_parse_free): Remove.
12832 (inspect_type, cp_canonicalize_string_full)
12833 (cp_canonicalize_string): Update.
12834 (mangled_name_to_comp): Change return type.
12835 (cp_class_name_from_physname, method_name_from_physname)
12836 (cp_func_name, cp_remove_params): Update.
12837 * cp-name-parser.y (demangle_parse_info): New constructor, from
12838 cp_new_demangle_parse_info.
12839 (~demangle_parse_info): New destructor, from
12840 cp_demangled_name_parse_free.
12841 (cp_merge_demangle_parse_infos): Update.
12842 (cp_demangled_name_to_comp): Change return type.
12843
12844 2017-01-10 Tom Tromey <tom@tromey.com>
12845
12846 * top.c (prevent_dont_repeat): Change return type.
12847 * python/python.c (execute_gdb_command): Use std::string.
12848 Update.
12849 * guile/guile.c (gdbscm_execute_gdb_command): Update.
12850 * command.h (prevent_dont_repeat): Change return type.
12851 * breakpoint.c (bpstat_do_actions_1): Update.
12852
12853 2017-01-10 Tom Tromey <tom@tromey.com>
12854
12855 * value.h (scoped_value_mark::~scoped_value_mark): Call
12856 free_to_mark.
12857 (scoped_value_mark::free_to_mark): New method.
12858 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12859 scoped_value_mark.
12860
12861 2017-01-10 Tom Tromey <tom@tromey.com>
12862
12863 * python/py-value.c (valpy_dereference, valpy_referenced_value)
12864 (valpy_reference_value, valpy_const_value, valpy_get_address)
12865 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12866 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12867 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12868 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12869 scoped_value_mark.
12870 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12871 * value.h (scoped_value_mark): New class.
12872
12873 2017-01-10 Tom Tromey <tom@tromey.com>
12874
12875 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12876 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12877 * psymtab.c (discard_psymtabs_upto): Remove.
12878 (make_cleanup_discard_psymtabs): Remove.
12879 (struct psymtab_state): Remove.
12880
12881 2017-01-10 Tom Tromey <tom@tromey.com>
12882
12883 * record-full.c (record_full_save_cleanups): Remove.
12884 (record_full_save): Use gdb::unlinker.
12885 * gcore.c (do_bfd_delete_cleanup): Remove.
12886 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
12887 cleanups.
12888 * dwarf2read.c (unlink_if_set): Remove.
12889 (write_psymtabs_to_index): Use gdb::unlinker.
12890 * common/gdb_unlinker.h: New file.
12891
12892 2017-01-10 Tom Tromey <tom@tromey.com>
12893
12894 * windows-tdep.c (windows_xfer_shared_library): Update.
12895 * windows-nat.c (windows_make_so): Update.
12896 * utils.h (make_cleanup_bfd_unref): Remove.
12897 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12898 * symfile.h (symfile_bfd_open)
12899 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12900 * symfile.c (read_symbols, symbol_file_add)
12901 (separate_debug_file_exists): Update.
12902 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12903 (generic_load, reread_symbols): Update.
12904 * symfile-mem.c (symbol_file_add_from_memory): Update.
12905 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12906 (spu_symbol_file_add_from_memory): Update.
12907 * solist.h (struct target_so_ops) <bfd_open>: Return
12908 gdb_bfd_ref_ptr.
12909 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12910 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12911 gdb_bfd_ref_ptr.
12912 (solib_map_sections, reload_shared_libraries_1): Update.
12913 * solib-svr4.c (enable_break): Update.
12914 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12915 * solib-frv.c (enable_break2): Update.
12916 * solib-dsbt.c (enable_break): Update.
12917 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12918 gdb_bfd_ref_ptr.
12919 (darwin_solib_get_all_image_info_addr_at_init): Update.
12920 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12921 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12922 * record-full.c (record_full_save): Update.
12923 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12924 * procfs.c (insert_dbx_link_bpt_in_file): Update.
12925 * minidebug.c (find_separate_debug_file_in_section): Return
12926 gdb_bfd_ref_ptr.
12927 * machoread.c (macho_add_oso_symfile): Change abfd to
12928 gdb_bfd_ref_ptr.
12929 (macho_symfile_read_all_oso): Update.
12930 (macho_check_dsym): Return gdb_bfd_ref_ptr.
12931 (macho_symfile_read): Update.
12932 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12933 (jit_bfd_try_read_symtab): Update.
12934 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12935 (gdb_bfd_openw, gdb_bfd_openr_iovec)
12936 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12937 gdb_bfd_ref_ptr.
12938 (gdb_bfd_ref_policy): New struct.
12939 (gdb_bfd_ref_ptr): New typedef.
12940 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12941 (gdb_bfd_openw, gdb_bfd_openr_iovec)
12942 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12943 gdb_bfd_ref_ptr.
12944 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12945 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12946 (gcore_command): Update.
12947 * exec.c (exec_file_attach): Update.
12948 * elfread.c (elf_symfile_read): Update.
12949 * dwarf2read.c (dwarf2_get_dwz_file): Update.
12950 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12951 (open_and_init_dwo_file): Update.
12952 (open_dwp_file): Return gdb_bfd_ref_ptr.
12953 (open_and_init_dwp_file): Update.
12954 * corelow.c (core_open): Update.
12955 * compile/compile-object-load.c (compile_object_load): Update.
12956 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12957 * coffread.c (coff_symfile_read): Update.
12958 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12959 gdb_bfd_ref_ptr. Rename.
12960 (dump_bfd_file, restore_command): Update.
12961 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12962 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12963 (find_separate_debug_file_by_buildid): Update.
12964
12965 2017-01-10 Tom Tromey <tom@tromey.com>
12966
12967 * common/gdb_ref_ptr.h: New file.
12968 * python/py-ref.h (struct gdbpy_ref_policy): New.
12969 (gdbpy_ref): Now a typedef.
12970
12971 2017-01-10 Tom Tromey <tom@tromey.com>
12972
12973 * utils.h (make_cleanup_htab_delete): Don't declare.
12974 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12975 Remove.
12976 * linespec.c (decode_compound_collector): Add constructor,
12977 destructor.
12978 (lookup_prefix_sym): Remove cleanup.
12979 (symtab_collector): Add constructor, destructor.
12980 (collect_symtabs_from_filename): Remove cleanup.
12981 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12982 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12983 Use htab_up.
12984 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12985 * dwarf2read.c (dw2_expand_symtabs_matching)
12986 (dw2_map_symbol_filenames, dwarf_decode_macros)
12987 (write_psymtabs_to_index): Use htab_up.
12988 * dwarf2loc.c (func_verify_no_selftailcall)
12989 (call_site_find_chain_1, func_verify_no_selftailcall)
12990 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12991 std::vector, gdb::unique_xmalloc_ptr.
12992 (call_sitep): Remove typedef.
12993 (dwarf2_locexpr_baton_eval): Remove unused variable.
12994
12995 2017-01-10 Tom Tromey <tom@tromey.com>
12996
12997 * python/python-internal.h (make_cleanup_py_decref)
12998 (make_cleanup_py_xdecref): Don't declare.
12999 * python/py-utils.c (py_decref, make_cleanup_py_decref)
13000 (py_xdecref, make_cleanup_py_xdecref): Remove.
13001
13002 2017-01-10 Tom Tromey <tom@tromey.com>
13003
13004 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13005 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13006
13007 2017-01-10 Tom Tromey <tom@tromey.com>
13008
13009 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13010
13011 2017-01-10 Tom Tromey <tom@tromey.com>
13012
13013 * python/py-utils.c (unicode_to_encoded_string)
13014 (python_string_to_target_string)
13015 (python_string_to_target_python_string)
13016 (python_string_to_host_string, gdbpy_obj_to_string)
13017 (get_addr_from_python): Use gdbpy_ref.
13018
13019 2017-01-10 Tom Tromey <tom@tromey.com>
13020
13021 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13022 gdbpy_ref.
13023
13024 2017-01-10 Tom Tromey <tom@tromey.com>
13025
13026 * python/python.c (eval_python_command, gdbpy_decode_line)
13027 (gdbpy_run_events, gdbpy_start_type_printers)
13028 (gdbpy_apply_type_printers): Use gdbpy_ref.
13029
13030 2017-01-10 Tom Tromey <tom@tromey.com>
13031
13032 * python/py-param.c (get_doc_string, compute_enum_values): Use
13033 gdbpy_ref.
13034
13035 2017-01-10 Tom Tromey <tom@tromey.com>
13036
13037 * python/py-inferior.c (find_thread_object, build_inferior_list):
13038 Use gdbpy_ref.
13039
13040 2017-01-10 Tom Tromey <tom@tromey.com>
13041
13042 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13043
13044 2017-01-10 Tom Tromey <tom@tromey.com>
13045
13046 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13047 gdbpy_ref.
13048
13049 2017-01-10 Tom Tromey <tom@tromey.com>
13050
13051 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
13052 extra incref.
13053 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13054 Use gdbpy_ref.
13055
13056 2017-01-10 Tom Tromey <tom@tromey.com>
13057
13058 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13059 gdbpy_ref.
13060
13061 2017-01-10 Tom Tromey <tom@tromey.com>
13062
13063 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
13064 decref results of PyArg_ParseTupleAndKeywords.
13065
13066 2017-01-10 Tom Tromey <tom@tromey.com>
13067
13068 * python/python.c (python_run_simple_file): Use
13069 unique_xmalloc_ptr, gdbpy_ref.
13070
13071 2017-01-10 Tom Tromey <tom@tromey.com>
13072
13073 * python/py-prettyprint.c (print_stack_unless_memory_error)
13074 (print_string_repr, print_children): Use gdbpy_ref.
13075 (dummy_python_frame): New class.
13076 (dummy_python_frame::dummy_python_frame): Rename from
13077 push_dummy_python_frame.
13078 (py_restore_tstate): Remove.
13079
13080 2017-01-10 Tom Tromey <tom@tromey.com>
13081
13082 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13083
13084 2017-01-10 Tom Tromey <tom@tromey.com>
13085
13086 * python/python.c (ensure_python_env, restore_python_env):
13087 Remove.
13088 * python/python-internal.h (ensure_python_env): Don't declare.
13089 * varobj.h (varobj_ensure_python_env): Don't declare.
13090 * varobj.c (varobj_ensure_python_env): Remove.
13091
13092 2017-01-10 Tom Tromey <tom@tromey.com>
13093
13094 * varobj.c (varobj_value_get_print_value): Use
13095 gdbpy_enter_varobj.
13096
13097 2017-01-10 Tom Tromey <tom@tromey.com>
13098
13099 * python/py-prettyprint.c (print_string_repr, print_children):
13100 Update.
13101 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13102 of "encoding".
13103 * varobj.c (varobj_value_get_print_value): Update.
13104 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13105
13106 2017-01-10 Tom Tromey <tom@tromey.com>
13107
13108 * varobj.c (varobj_get_display_hint)
13109 (dynamic_varobj_has_child_method, install_new_value_visualizer)
13110 (varobj_set_visualizer, free_variable): Use
13111 gdbpy_enter_varobj.
13112
13113 2017-01-10 Tom Tromey <tom@tromey.com>
13114
13115 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13116 (do_finish_initialization): New function. Use gdbpy_ref.
13117 (gdbpy_finish_initialization): Use gdbpy_enter. Call
13118 do_finish_initialization.
13119
13120 2017-01-10 Tom Tromey <tom@tromey.com>
13121
13122 * python/py-param.c (get_set_value, get_show_value): Use
13123 gdbpy_enter, gdbpy_ref.
13124
13125 2017-01-10 Tom Tromey <tom@tromey.com>
13126
13127 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
13128
13129 2017-01-10 Tom Tromey <tom@tromey.com>
13130
13131 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
13132
13133 2017-01-10 Tom Tromey <tom@tromey.com>
13134
13135 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
13136 Use gdbpy_enter_varobj.
13137
13138 2017-01-10 Tom Tromey <tom@tromey.com>
13139
13140 * varobj.c (gdbpy_enter_varobj): New constructor.
13141 * python/python-internal.h (gdbpy_enter_varobj): New class.
13142 * python/py-varobj.c (py_varobj_get_iterator): Use
13143 gdbpy_enter_varobj.
13144
13145 2017-01-10 Tom Tromey <tom@tromey.com>
13146
13147 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13148 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13149 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13150 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13151 unique_xmalloc_ptr.
13152 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13153
13154 2017-01-10 Tom Tromey <tom@tromey.com>
13155
13156 * python/py-xmethods.c (invoke_match_method): Use
13157 gdbpy_ref.
13158
13159 2017-01-10 Tom Tromey <tom@tromey.com>
13160
13161 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13162 gdbpy_enter, gdbpy_ref.
13163
13164 2017-01-10 Tom Tromey <tom@tromey.com>
13165
13166 * python/python.c (python_interactive_command): Use gdbpy_enter.
13167
13168 2017-01-10 Tom Tromey <tom@tromey.com>
13169
13170 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13171 gdbpy_ref.
13172
13173 2017-01-10 Tom Tromey <tom@tromey.com>
13174
13175 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13176 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13177
13178 2017-01-10 Tom Tromey <tom@tromey.com>
13179
13180 * utils.h (htab_deleter): New struct.
13181 (htab_up): New typedef.
13182 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13183 gdbpy_enter, gdbpy_ref, htab_up.
13184
13185 2017-01-10 Tom Tromey <tom@tromey.com>
13186
13187 * python/py-unwind.c (pending_frame_invalidate): Remove.
13188 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13189
13190 2017-01-10 Tom Tromey <tom@tromey.com>
13191
13192 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13193 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13194
13195 2017-01-10 Tom Tromey <tom@tromey.com>
13196
13197 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13198
13199 2017-01-10 Tom Tromey <tom@tromey.com>
13200
13201 * python/python.c (gdbpy_eval_from_control_command)
13202 (gdbpy_source_script, gdbpy_run_events)
13203 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13204 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13205 gdbpy_enter.
13206
13207 2017-01-10 Tom Tromey <tom@tromey.com>
13208
13209 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13210
13211 2017-01-10 Tom Tromey <tom@tromey.com>
13212
13213 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
13214
13215 2017-01-10 Tom Tromey <tom@tromey.com>
13216
13217 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
13218 (python_on_inferior_call_pre, python_on_inferior_call_post)
13219 (python_on_memory_change, python_on_register_change)
13220 (python_inferior_exit, python_new_objfile, add_thread_object)
13221 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
13222
13223 2017-01-10 Tom Tromey <tom@tromey.com>
13224
13225 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13226 (bpfinishpy_handle_exit): Use gdbpy_enter.
13227
13228 2017-01-10 Tom Tromey <tom@tromey.com>
13229
13230 * python/py-cmd.c (cmdpy_destroyer)
13231 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13232 gdbpy_enter.
13233
13234 2017-01-10 Tom Tromey <tom@tromey.com>
13235
13236 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13237 gdbpy_enter.
13238 (gdbpy_breakpoint_has_cond): Likewise.
13239
13240 2017-01-10 Tom Tromey <tom@tromey.com>
13241
13242 * python/python.c (gdbpy_enter): New constructor.
13243 (~gdbpy_enter): New destructor.
13244 (restore_python_env, ensure_python_env): Rewrite.
13245 * python/python-internal.h (gdbpy_enter): New class.
13246
13247 2017-01-10 Tom Tromey <tom@tromey.com>
13248
13249 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
13250
13251 2017-01-10 Tom Tromey <tom@tromey.com>
13252
13253 * python/py-value.c (value_has_field, get_field_flag)
13254 (get_field_type, valpy_getitem, convert_value_from_python): Use
13255 gdbpy_ref.
13256
13257 2017-01-10 Tom Tromey <tom@tromey.com>
13258
13259 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
13260 gdbpy_ref.
13261
13262 2017-01-10 Tom Tromey <tom@tromey.com>
13263
13264 * python/py-prettyprint.c (search_pp_list)
13265 (find_pretty_printer_from_objfiles)
13266 (find_pretty_printer_from_progspace)
13267 (find_pretty_printer_from_gdb, find_pretty_printer)
13268 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
13269 gdbpy_ref.
13270
13271 2017-01-10 Tom Tromey <tom@tromey.com>
13272
13273 * python/py-param.c (call_doc_function): Use gdbpy_ref.
13274
13275 2017-01-10 Tom Tromey <tom@tromey.com>
13276
13277 * python/py-linetable.c (build_line_table_tuple_from_pcs)
13278 (ltpy_get_all_source_lines): Use gdbpy_ref.
13279
13280 2017-01-10 Tom Tromey <tom@tromey.com>
13281
13282 * python/py-framefilter.c (extract_sym, extract_value)
13283 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
13284 gdbpy_ref.
13285
13286 2017-01-10 Tom Tromey <tom@tromey.com>
13287
13288 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
13289
13290 2017-01-10 Tom Tromey <tom@tromey.com>
13291
13292 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
13293
13294 2017-01-10 Tom Tromey <tom@tromey.com>
13295
13296 * python/py-function.c (convert_values_to_python, fnpy_init): Use
13297 gdbpy_ref.
13298
13299 2017-01-10 Tom Tromey <tom@tromey.com>
13300
13301 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
13302
13303 2017-01-10 Tom Tromey <tom@tromey.com>
13304
13305 * python/py-type.c (convert_field, make_fielditem, typy_fields)
13306 (typy_range): Use gdbpy_ref.
13307
13308 2017-01-10 Tom Tromey <tom@tromey.com>
13309
13310 * python/py-threadevent.c (create_thread_event_object): Use
13311 gdbpy_ref.
13312 * python/py-stopevent.c (create_stop_event_object): Simplify.
13313 (emit_stop_event): Use gdbpy_ref.
13314 * python/py-signalevent.c (create_signal_event_object): Use
13315 gdbpy_ref.
13316 * python/py-newobjfileevent.c (create_new_objfile_event_object)
13317 (emit_new_objfile_event, create_clear_objfiles_event_object)
13318 (emit_clear_objfiles_event): Use gdbpy_ref.
13319 * python/py-infevents.c (create_inferior_call_event_object)
13320 (create_register_changed_event_object)
13321 (create_memory_changed_event_object, emit_inferior_call_event)
13322 (emit_memory_changed_event, emit_register_changed_event): Use
13323 gdbpy_ref.
13324 * python/py-exitedevent.c (create_exited_event_object)
13325 (emit_exited_event): Use gdbpy_ref.
13326 * python/py-event.h (evpy_emit_event): Remove
13327 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
13328 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
13329 * python/py-continueevent.c (emit_continue_event): Use
13330 gdbpy_ref.
13331 * python/py-breakpoint.c (gdbpy_breakpoint_created)
13332 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
13333 gdbpy_ref.
13334 * python/py-bpevent.c (create_breakpoint_event_object): Use
13335 gdbpy_ref.
13336
13337 2017-01-10 Tom Tromey <tom@tromey.com>
13338
13339 * python/py-ref.h: New file.
13340
13341 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
13342
13343 * cli-out.c (cli_ui_out::do_redirect): Change return type to
13344 void.
13345 * cli-out.h (cli_ui_out::do_redirect): Likewise.
13346 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
13347 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
13348 * ui-out.c (ui_out::redirect): Likewise.
13349 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
13350 * cli/cli-logging.c (set_logging_redirect): Update call site of
13351 ui_out::redirect.
13352 (handle_redirections): Likewise.
13353 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
13354 * top.c (execute_command_to_string): Likewise.
13355 * utils.c (do_ui_out_redirect_pop): Likewise.
13356
13357 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
13358
13359 * stack.c (_initialize_stack): Update "frame" command help message.
13360
13361 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
13362
13363 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
13364
13365 2017-01-06 Yao Qi <yao.qi@linaro.org>
13366
13367 * x86-linux-nat.h: Include gdb_proc_service.h.
13368
13369 2017-01-06 Yao Qi <yao.qi@linaro.org>
13370
13371 * ser-base.h: Include serial.h.
13372
13373 2017-01-06 Yao Qi <yao.qi@linaro.org>
13374
13375 * ppc-linux-tdep.h: Include ppc-tdep.h.
13376
13377 2017-01-06 Yao Qi <yao.qi@linaro.org>
13378
13379 * nat/amd64-linux-siginfo.h: Include signal.h.
13380
13381 2017-01-06 Yao Qi <yao.qi@linaro.org>
13382
13383 * nat/aarch64-linux-hw-point.h: Include break-common.h.
13384
13385 2017-01-06 Yao Qi <yao.qi@linaro.org>
13386
13387 * mi/mi-parse.h: Include mi-cmds.h.
13388
13389 2017-01-06 Yao Qi <yao.qi@linaro.org>
13390
13391 * inf-loop.c: Don't include "target.h".
13392 * inf-loop.h: Include it here.
13393
13394 2017-01-06 Yao Qi <yao.qi@linaro.org>
13395
13396 * dfp.h: Include "dboulest.h" and "expression.h".
13397
13398 2017-01-06 Yao Qi <yao.qi@linaro.org>
13399
13400 * ax-gdb.h: Include "ax.h".
13401
13402 2017-01-06 Yao Qi <yao.qi@linaro.org>
13403
13404 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
13405 with nat/gdb_ptrace.h.
13406
13407 2017-01-05 Yao Qi <yao.qi@linaro.org>
13408
13409 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
13410 new line.
13411 (mips64_fbsd_sigframe_init): Likewise.
13412
13413 2017-01-04 John Baldwin <jhb@FreeBSD.org>
13414
13415 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
13416 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
13417
13418 2017-01-04 John Baldwin <jhb@FreeBSD.org>
13419
13420 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
13421 * NEWS: Mention new FreeBSD/mips native configuration.
13422 * config/mips/fbsd.mh: New file.
13423 * configure.host: Add mips*-*-freebsd*.
13424 * mips-fbsd-nat.c: New file.
13425
13426 2017-01-04 John Baldwin <jhb@FreeBSD.org>
13427
13428 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
13429 (ALLDEPFILES): Add mips-fbsd-tdep.c.
13430 * NEWS: Mention new FreeBSD/mips target.
13431 * configure.tgt: Add mips*-*-freebsd*.
13432 * mips-fbsd-tdep.c: New file.
13433 * mips-fbsd-tdep.h: New file.
13434
13435 2017-01-04 Yao Qi <yao.qi@linaro.org>
13436
13437 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
13438 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
13439
13440 2017-01-01 Joel Brobecker <brobecker@adacore.com>
13441
13442 Update copyright year range in all GDB files.
13443
13444 2017-01-01 Joel Brobecker <brobecker@adacore.com>
13445
13446 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
13447
13448 For older changes see ChangeLog-2016.
13449 \f
13450 Local Variables:
13451 mode: change-log
13452 left-margin: 8
13453 fill-column: 74
13454 version-control: never
13455 coding: utf-8
13456 End: