Enable support for the AArch64 dot-prod instruction in the Cortex A55 and A75 cpus.
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2
3 PR gdb/22046
4 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5 detection.
6
7 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
8
9 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
10 for setting/unsetting environment variables on the remote target.
11 (New remote packets): Add entries for QEnvironmentHexEncoded,
12 QEnvironmentUnset and QEnvironmentReset.
13 * common/environ.c (gdb_environ::operator=): Extend method to
14 handle m_user_set_env_list and m_user_unset_env_list.
15 (gdb_environ::clear): Likewise.
16 (match_var_in_string): Change type of first parameter from 'char
17 *' to 'const char *'.
18 (gdb_environ::set): Extend method to handle
19 m_user_set_env_list and m_user_unset_env_list.
20 (gdb_environ::unset): Likewise.
21 (gdb_environ::clear_user_set_env): New method.
22 (gdb_environ::user_set_envp): Likewise.
23 (gdb_environ::user_unset_envp): Likewise.
24 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
25 m_user_unset_env_list on move constructor/assignment.
26 (unset): Add new default parameter 'update_unset_list = true'.
27 (clear_user_set_env): New method.
28 (user_set_envp): Likewise.
29 (user_unset_envp): Likewise.
30 (m_user_set_env_list): New std::set.
31 (m_user_unset_env_list): Likewise.
32 * common/rsp-low.c (hex2str): New function.
33 (bin2hex): New overload for bin2hex function.
34 * common/rsp-low.c (hex2str): New prototype.
35 (str2hex): New overload prototype.
36 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
37 QEnvironmentUnset and QEnvironmentReset.
38 (remote_protocol_features): Add QEnvironmentHexEncoded,
39 QEnvironmentUnset and QEnvironmentReset packets.
40 (send_environment_packet): New function.
41 (extended_remote_environment_support): Likewise.
42 (extended_remote_create_inferior): Call
43 extended_remote_environment_support.
44 (_initialize_remote): Add QEnvironmentHexEncoded,
45 QEnvironmentUnset and QEnvironmentReset packet configs.
46 * unittests/environ-selftests.c (gdb_selftest_env_var):
47 New variable.
48 (test_vector_initialization): New function.
49 (test_init_from_host_environ): Likewise.
50 (test_reinit_from_host_environ): Likewise.
51 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
52 Likewise.
53 (test_unset_set_empty_vector): Likewise.
54 (test_vector_clear): Likewise.
55 (test_std_move): Likewise.
56 (test_move_constructor):
57 (test_self_move): Likewise.
58 (test_set_unset_reset): Likewise.
59 (run_tests): Rewrite in terms of the functions above.
60
61 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
62
63 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
64 (adi_available): Use a temp variable of type CORE_ADDR as argument
65 3 when calling target_auxv_search.
66 (adi_normalize_address): Use masks and xor operators to calculate
67 normalized address.
68 (adi_read_versions, adi_write_versions, adi_print_versions)
69 (do_examine, do_assign): Use paddress.
70
71 2017-08-29 John Baldwin <jhb@FreeBSD.org>
72
73 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
74 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
75 out of loop and add supply of FIR.
76 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
77 add collect of FIR.
78
79 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
80
81 PR gdb/21827
82 * cli/cli-script.c (define_command): Don't convert command name
83 to lower case.
84
85 2017-08-25 Joel Brobecker <brobecker@adacore.com>
86
87 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
88 Update all callers accordingly. Remove all code blocks handling
89 the case where DISPP is not NULL.
90
91 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
92
93 PR symtab/22003
94 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
95 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
96 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
97
98 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
99
100 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
101 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
102 (read_comp_units_from_section): New parameter abbrev_section, use
103 read_and_check_comp_unit_head, allocate signatured_type if needed.
104 (create_all_comp_units): Update read_comp_units_from_section caller.
105
106 2017-08-23 Pedro Alves <palves@redhat.com>
107
108 PR remote/21852
109 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
110 to null_ptid and switch to thread without reading the registers
111 after adding the inferior.
112
113 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
114
115 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
116 compile-gcc.
117 * compile/compile.c (compile_gcc, show_compile_gcc): New.
118 (compile_to_object): Implement compile_gcc.
119 (_initialize_compile): Install "set compile-gcc". Initialize
120 compile_gcc.
121
122 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
123
124 * compile/compile.c (compile_to_object): Conditionally call
125 set_verbose. Conditionally call compile or compile_v0.
126
127 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
128
129 * sparc64-tdep.h: (adi_normalize_address): New export.
130 * sparc-nat.h: (open_adi_tag_fd): New export.
131 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
132 * sparc64-linux-tdep.c:
133 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
134 (sparc64_linux_handle_segmentation_fault): New function.
135 (sparc64_linux_init_abi): Register
136 sparc64_linux_handle_segmentation_fault
137 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
138 (sparc64_addr_bits_remove): New function.
139 (sparc64_init_abi): Register sparc64_addr_bits_remove.
140 (MAX_PROC_NAME_SIZE): New macro.
141 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
142 (sparc64adilist): New variable.
143 (adi_proc_list): New variable.
144 (find_adi_info): New function.
145 (add_adi_info): New function.
146 (get_adi_info_proc): New function.
147 (get_adi_info): New function.
148 (info_adi_command): New function.
149 (read_maps_entry): New function.
150 (adi_available): New function.
151 (adi_normalize_address): New function.
152 (adi_align_address): New function.
153 (adi_convert_byte_count): New function.
154 (adi_tag_fd): New function.
155 (adi_is_addr_mapped): New function.
156 (adi_read_versions): New function.
157 (adi_write_versions): New function.
158 (adi_print_versions): New function.
159 (do_examine): New function.
160 (do_assign): New function.
161 (adi_examine_command): New function.
162 (adi_assign_command): New function.
163 (_initialize_sparc64_adi_tdep): New function.
164
165 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
166
167 * breakpoint.c (breakpoints_info): Rename to ...
168 (info_breakpoints_command): ... this.
169 (watchpoints_info): Rename to ...
170 (info_watchpoints_command): ... this.
171 (tracepoints_info): Rename to ...
172 (info_tracepoints_command): ... this.
173 (_initialize_breakpoint): Adjust.
174 * dcache.c (dcache_info): Rename to ...
175 (info_display_command): ... this.
176 (_initialize_dcache): Adjust.
177 * frame.h (args_info): Rename to ...
178 (info_args_command): ... this.
179 (locals_info): Rename to ...
180 (info_locals_command): ... this.
181 * infcmd.c (nofp_registers_info): Rename to ...
182 (info_registers_command): ... this.
183 (float_info): Rename to ...
184 (info_float_command): ... this.
185 (program_info): Rename to ...
186 (info_program_command): ... this.
187 (all_registers_info): Rename to ...
188 (info_all_registers_command): ... this.
189 (vector_info): Rename to ...
190 (info_vector_command): ... this.
191 (float_info): Rename to ...
192 (info_float_command): ... this.
193 (_initialize_infcmd): Adjust.
194 * inferior.h (term_info): Rename to ...
195 (info_terminal_command): ... this.
196 * inflow.c (term_info): Rename to ...
197 (info_terminal_command): ... this.
198 (_initialize_inflow): Adjust.
199 * infrun.c (signals_info): Rename to ...
200 (info_signals_command): ... this.
201 (_initialize_infrun): Adjust.
202 * objc-lang.c (classes_info): Rename to ...
203 (info_classes_command): ... this.
204 (selectors_info): Rename to ...
205 (info_selectors_command): ... this.
206 (_initialize_objc_language): Adjust.
207 * printcmd.c (sym_info): Rename to ...
208 (info_symbol_command): ... this.
209 (address_info): Rename to ...
210 (info_address_command): ... this.
211 (display_info): Rename to ...
212 (info_display_command): ... this.
213 (_initialize_printcmd): Adjust.
214 * reverse.c (bookmarks_info): Rename to ...
215 (info_breakpoints_command): ... this.
216 (_initialize_reverse): Adjust.
217 * ser-go32.c (dos_info): Rename to ...
218 (info_serial_command): ... this.
219 (_initialize_ser_dos): Adjust.
220 * skip.c (skip_info): Rename to ...
221 (info_skip_command): ... this.
222 (_initialize_step_skip): Adjust.
223 * source.c (line_info): Rename to ...
224 (info_line_command): ... this.
225 (source_info): Rename to ...
226 (info_source_command)
227 * stack.c (frame_info): Rename to ...
228 (info_frame_command): ... this.
229 (locals_info): Rename to ...
230 (info_locals_command): ... this.
231 (args_info): Rename to ...
232 (info_args_command): ... this.
233 (_initialize_stack): Adjust.
234 * symtab.c (sources_info): Rename to ...
235 (info_sources_command): ... this.
236 (variables_info): Rename to ...
237 (info_variables_command): ... this.
238 (functions_info): Rename to ...
239 (info_functions_command): ... this.
240 (types_info): Rename to ...
241 (info_types_command): ... this.
242 (_initialize_symtab): Adjust.
243 * target.c (target_info): Rename to ...
244 (info_target_command): ... this.
245 (initialize_targets): Adjust.
246 * tracepoint.c (tvariables_info): Rename to ...
247 (info_tvariables_command): ... this.
248 (scope_info): Rename to ...
249 (info_scope_command): ... this.
250 (trace_dump_actions): Adjust.
251 (_initialize_tracepoint): Adjust.
252
253 2017-08-22 Tom Tromey <tom@tromey.com>
254
255 * breakpoint.h (install_breakpoint): Update.
256 * breakpoint.c (add_solib_catchpoint): Update.
257 (install_breakpoint): Change argument to a std::unique_ptr.
258 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
259 (create_breakpoint_sal, create_breakpoint): Update.
260 (watch_command_1, catch_exec_command_1)
261 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
262 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
263 Return the breakpoint.
264 (set_raw_breakpoint_without_location, set_raw_breakpoint)
265 (new_single_step_breakpoint): Update.
266 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
267 std::unique_ptr.
268 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
269 std::unique_ptr.
270 * break-catch-sig.c (create_signal_catchpoint): Use
271 std::unique_ptr.
272 * ada-lang.c (create_ada_exception_catchpoint): Use
273 std::unique_ptr.
274
275 2017-08-22 Tom Tromey <tom@tromey.com>
276
277 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
278
279 2017-08-22 Tom Tromey <tom@tromey.com>
280
281 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
282 (lookup_partial_symbol): Update.
283
284 2017-08-22 Tom Tromey <tom@tromey.com>
285
286 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
287 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
288 (find_and_open_source, symtab_to_fullname): Update.
289 * psymtab.c (psymtab_to_fullname): Update.
290
291 2017-08-22 Tom Tromey <tom@tromey.com>
292
293 * exec.c (exec_file_attach): Update.
294 * linux-thread-db.c (try_thread_db_load): Update.
295 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
296 * utils.c (gdb_realpath): Change return type.
297 (gdb_realpath_keepfile): Update.
298 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
299 (_initialize_utils): Register the new self test.
300 * source.c (openp): Update.
301 (find_and_open_source): Update.
302 * nto-tdep.c (nto_find_and_open_solib): Update.
303 * main.c (set_gdb_data_directory): Update.
304 (captured_main_1): Update.
305 * dwarf2read.c (dwarf2_get_dwz_file): Update
306 (dw2_map_symbol_filenames): Update.
307 * auto-load.c (auto_load_safe_path_vec_update): Update.
308 (filename_is_in_auto_load_safe_path_vec): Change type of
309 "filename_realp".
310 (auto_load_objfile_script): Update.
311 (file_is_auto_load_safe): Update. Use std::string.
312 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
313
314 2017-08-22 Tom Tromey <tom@tromey.com>
315
316 * utils.c (gdb_realpath_keepfile): Return a
317 gdb::unique_xmalloc_ptr.
318 * exec.c (exec_file_attach): Update.
319 * utils.h (gdb_realpath_keepfile): Return a
320 gdb::unique_xmalloc_ptr.
321
322 2017-08-22 Tom Tromey <tom@tromey.com>
323
324 * compile/compile.c (compile_file_command): Use
325 gdb::unique_xmalloc_ptr, std::string.
326 * utils.c (gdb_abspath): Change return type.
327 * source.c (openp): Update.
328 * objfiles.c (allocate_objfile): Update.
329 * main.c (set_gdb_data_directory): Update.
330 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
331
332 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
333
334 * cli-cmds.c (list_commands): List actual code around more than
335 one location.
336
337 2017-08-21 John Baldwin <jhb@FreeBSD.org>
338
339 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
340
341 2017-08-21 Pedro Alves <palves@redhat.com>
342
343 PR gdb/19487
344 * c-exp.y (variable production): Handle function aliases.
345 * minsyms.c (msymbol_is_text): New function.
346 * minsyms.h (msymbol_is_text): Declare.
347 * symtab.c (find_function_alias_target): New function.
348 * symtab.h (find_function_alias_target): Declare.
349
350 2017-08-21 Pedro Alves <palves@redhat.com>
351
352 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
353 typedefs.
354 * typeprint.c (whatis_exp): If handling "whatis", and expression
355 is OP_TYPE, strip one typedef level. Otherwise don't strip
356 typedefs here.
357 * valops.c (value_cast): Save "to" type before resolving
358 stubs/typedefs. Use that type as resulting value's type.
359
360 2017-08-18 Tom Tromey <tom@tromey.com>
361 Pedro Alves <palves@redhat.com>
362
363 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
364 * sol-thread.c (sol_thread_resume, sol_thread_wait)
365 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
366 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
367 * proc-service.c (ps_xfer_memory): Use scoped_restore.
368 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
369 (linux_get_siginfo_data): Add "thread" argument. Use
370 scoped_restore.
371 * linux-nat.c (linux_child_follow_fork)
372 (check_stopped_by_watchpoint): Use scoped_restore.
373 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
374 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
375 (restore_inferior_ptid, save_inferior_ptid): Remove.
376 * btrace.c (btrace_fetch): Use scoped_restore.
377 * bsd-uthread.c (bsd_uthread_fetch_registers)
378 (bsd_uthread_store_registers): Use scoped_restore.
379 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
380 scoped_restore.
381 * aix-thread.c (aix_thread_resume, aix_thread_wait)
382 (aix_thread_xfer_partial): Use scoped_restore.
383 * inferior.h (save_inferior_ptid): Remove.
384
385 2017-08-18 Yao Qi <yao.qi@linaro.org>
386
387 PR tdep/21818
388 * arm-tdep.c (gdb_print_insn_arm): Mark
389 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
390
391 2017-08-18 Yao Qi <yao.qi@linaro.org>
392
393 * NEWS: Mention GDBserver's new option "--selftest".
394 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
395 * selftest.c: Move it to common/selftest.c.
396 * selftest.h: Move it to common/selftest.h.
397 * selftest-arch.c (reset): New function.
398 (tests_with_arch): Call reset.
399
400 2017-08-18 Yao Qi <yao.qi@linaro.org>
401
402 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
403 instead of exception_fprintf and printf_filtered.
404
405 2017-08-18 Yao Qi <yao.qi@linaro.org>
406
407 * selftest.c (register_self_test): Rename it to
408 selftests::register_test.
409 (run_self_tests): selftest::run_tests.
410 * selftest.h: Update declarations.
411 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
412 selftests::register_test_foreach_arch.
413 * selftest-arch.h: Update declaration.
414 * aarch64-tdep.c: Update.
415 * arm-tdep.c: Likewise.
416 * disasm-selftests.c: Likewise.
417 * dwarf2loc.c: Likewise.
418 * dwarf2-frame.c: Likewise.
419 * findvar.c: Likewise.
420 * gdbarch-selftests.c: Likewise.
421 * maint.c (maintenance_selftest): Likewise.
422 * regcache.c: Likewise.
423 * rust-exp.y: Likewise.
424 * selftest-arch.c: Likewise.
425 * unittests/environ-selftests.c: Likewise.
426 * unittests/function-view-selftests.c: Likewise.
427 * unittests/offset-type-selftests.c: Likewise.
428 * unittests/optional-selftests.c: Likewise.
429 * unittests/scoped_restore-selftests.c: Likewise.
430 * utils-selftests.c: Likewise.
431
432 2017-08-17 Pedro Alves <palves@redhat.com>
433
434 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
435 local.
436
437 2017-08-17 Pedro Alves <palves@redhat.com>
438
439 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
440 field.
441 (reset_die_in_process): Delete, replaced by ...
442 (process_die_scope): ... this new class. Make it responsible for
443 freeing cu->line_header too.
444 (process_die): Use process_die_scope.
445 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
446 cu->line_header_die_owner. Don't release the line header if it's
447 owned by the CU.
448 (setup_type_unit_groups): Make the CU/DIE own the line header.
449 Don't release the line header here.
450
451 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
452
453 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
454
455 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
456
457 * NEWS: Mention new shortcuts for nexti and stepi in TUI
458 Single-Key mode
459
460 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
461
462 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
463 mode command list.
464
465 2017-08-15 Stafford Horne <shorne@gmail.com>
466
467 * MAINTAINERS (Write After Approval): Add Stafford Horne.
468
469 2017-08-15 Stafford Horne <shorne@gmail.com>
470
471 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
472
473 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
474
475 PR gdb/21954
476 * infcmd.c (unset_environment_command): Use the 'clear' method on
477 the environment instead of resetting it.
478
479 2017-08-15 John Baldwin <jhb@FreeBSD.org>
480
481 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
482 platforms.
483
484 2017-08-14 Tom Tromey <tom@tromey.com>
485
486 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
487 (print_binary_chars): Likewise.
488 (BITS_IN_BYTES): Remove.
489
490 2017-08-14 Tom Tromey <tom@tromey.com>
491
492 PR gdb/21675
493 * valprint.c (LOW_ZERO): Change value to 034.
494 (print_octal_chars): Add static_asserts for octal constants.
495 * printcmd.c (print_scalar_formatted): Add 'd' case.
496
497 2017-08-11 Tom Tromey <tom@tromey.com>
498
499 * symfile.c (add_symbol_file_command): Use std::vector.
500
501 2017-08-14 Tom Tromey <tom@tromey.com>
502
503 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
504 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
505 std::move.
506 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
507
508 2017-08-11 Pedro Alves <palves@redhat.com>
509
510 * infrun.c (process_event_stop_test): Adjust
511 function_name_is_marked_for_skip call.
512 * skip.c: Include <list>.
513 (skiplist_entry): Make it a class with private fields, and
514 getters/setters.
515 (skiplist_entry_chain): Delete.
516 (skiplist_entries): New.
517 (skiplist_entry_count): Delete.
518 (highest_skiplist_entry_num): New.
519 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
520 (add_skiplist_entry): Delete.
521 (skiplist_entry::skiplist_entry): New.
522 (skiplist_entry::add_entry): New.
523 (skip_file_command, skip_function): Adjust.
524 (compile_skip_regexp): Delete.
525 (skip_command): Don't compile regexp here. Adjust to use
526 skiplist_entry::add_entry.
527 (skip_info): Adjust to use range-for and getters.
528 (skip_enable_command, skip_disable_command): Adjust to use
529 range-for and setters.
530 (skip_delete_command): Adjust to use std::list.
531 (add_skiplist_entry): Delete.
532 (skip_file_p): Delete, refactored as ...
533 (skiplist_entry::do_skip_file_p): ... this new method.
534 (skip_gfile_p): Delete, refactored as ...
535 (skiplist_entry::do_gskip_file_p): ... this new method.
536 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
537 (skiplist_entry::skip_function_p): ... this new method.
538 (function_name_is_marked_for_skip): Now returns bool, and takes
539 the function sal by const reference. Adjust to use range-for and
540 skiplist_entry methods.
541 (_initialize_step_skip): Remove references to
542 skiplist_entry_chain, skiplist_entry_count.
543 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
544 takes the function sal by const reference.
545
546 2017-08-11 Yao Qi <yao.qi@linaro.org>
547
548 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
549 (dwarf2_frame_cache): Remove reset_cache_cleanup.
550 (dwarf2_frame_cache):
551 * frame-unwind.c (frame_unwind_try_unwinder): Catch
552 RETURN_MASK_ALL and set *this_case to NULL.
553 * frame-unwind.h: Update comments.
554
555 2017-08-11 Yao Qi <yao.qi@linaro.org>
556
557 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
558 (dwarf2_frame_state_copy_regs): Remove.
559 (dwarf2_frame_state_free_regs): Remove.
560 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
561 (dwarf2_restore_rule): Call method .alloc_regs instead of
562 dwarf2_frame_state_alloc_regs.
563 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
564 constructor. Call std::move.
565 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
566 (dwarf2_frame_cache): Likewise.
567
568 [GDB_SELF_TEST]: Include selftest.h and
569 selftest-arch.h.
570 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
571 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
572 execute_cfa_program_test.
573
574 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
575 copy ctor, assignment operator, move assignment.
576 <alloc_regs>: New method.
577 <swap>: New method.
578 (struct dwarf2_frame_state): Delete dtor.
579 (dwarf2_frame_state_alloc_regs): Remove declaration.
580 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
581 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
582
583 2017-08-11 Yao Qi <yao.qi@linaro.org>
584
585 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
586 (dwarf2_frame_state::dwarf2_frame_state): New.
587 (dwarf2_frame_state::~dwarf2_frame_state): New.
588 (dwarf2_fetch_cfa_info): Update.
589 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
590 rather than a pointer. Update code.
591 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
592 dtor.
593 <data_align, code_align, retaddr_column>: Change them to const.
594 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
595 to bool.
596
597 2017-08-11 Yao Qi <yao.qi@linaro.org>
598
599 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
600 <loc.exp>: New field.
601 * dwarf2-frame.c (execute_cfa_program): Update.
602 (dwarf2_frame_prev_register): Update.
603
604 2017-08-10 Pedro Alves <palves@redhat.com>
605
606 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
607
608 2017-08-09 John Baldwin <jhb@FreeBSD.org>
609
610 * fbsd-nat.c (struct fbsd_fork_info): Remove.
611 (fbsd_pending_children): Use std::list.
612 (fbsd_remember_child): Likewise.
613 (fbsd_is_child_pending): Likewise.
614 (fbsd_pending_vfork_done): Use std::forward_list.
615 (fbsd_add_vfork_done): Likewise.
616 (fbsd_is_vfork_done_pending): Likewise.
617 (fbsd_next_vfork_done): Likewise.
618
619 2017-08-09 John Baldwin <jhb@FreeBSD.org>
620
621 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
622 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
623 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
624 for `mapfilename'.
625 (fbsd_xfer_partial): Use gdb::byte_vector.
626 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
627
628 2017-08-09 John Baldwin <jhb@FreeBSD.org>
629
630 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
631 "filestuff.h".
632 (fbsd_find_memory_regions): Fix `mapfile' initialization.
633
634 2017-08-09 Tom Tromey <tom@tromey.com>
635
636 * skip.c (skiplist_entry): New constructor.
637 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
638 (skiplist_entry::file_is_glob): Now bool.
639 (skiplist_entry::file, skiplist_entry::function): Now
640 std::string.
641 (make_skip_entry): Return a unique_ptr. Use new.
642 (free_skiplist_entry, free_skiplist_entry_cleanup)
643 (make_free_skiplist_entry_cleanup): Remove.
644 (skip_command, skip_disable_command, add_skiplist_entry)
645 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
646 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
647 (function_name_is_marked_for_skip): Update.
648 (skip_delete_command): Update. Use delete.
649
650 2017-08-09 Jiong Wang <jiong.wang@arm.com>
651
652 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
653 (aarch64_linux_core_read_description): New function.
654 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
655
656 2017-08-09 Pedro Alves <palves@redhat.com>
657
658 * cp-name-parser.y (cp_comp_to_string): Return a
659 gdb::unique_xmalloc_ptr<char>.
660 * cp-support.c (replace_typedefs_qualified_name)
661 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
662 (cp_canonicalize_string_full): Use op= instead of explicit
663 convertion.
664 (cp_class_name_from_physname, method_name_from_physname)
665 (cp_func_name, cp_remove_params): Adjust to use
666 gdb::unique_xmalloc_ptr<char>.
667 * cp-support.h (cp_comp_to_string): Return a
668 gdb::unique_xmalloc_ptr<char>.
669 * python/py-type.c (typy_lookup_type): Adjust to use
670 gdb::unique_xmalloc_ptr<char>.
671
672 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
673
674 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
675
676 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
677 Yao Qi <yao.qi@linaro.org>
678
679 * cp-support.c (cp_canonicalize_string_full): Use
680 gdb::unique_xmalloc_ptr<char>.
681 (cp_canonicalize_string): Likewise.
682
683 2017-08-09 Yao Qi <yao.qi@linaro.org>
684
685 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
686 * regformats/i386/amd64-avx-avx512.dat: Remove.
687 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
688 * regformats/i386/amd64-avx-mpx.dat:Remove.
689 * regformats/i386/amd64-avx.dat: Remove.
690 * regformats/i386/amd64-mpx.dat: Remove.
691 * regformats/i386/i386-avx-avx512.dat: Remove.
692 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
693 * regformats/i386/i386-avx-mpx.dat: Remove.
694 * regformats/i386/i386-mmx.dat: Remove.
695 * regformats/i386/i386-mpx.dat: Remove.
696
697 2017-08-09 Yao Qi <yao.qi@linaro.org>
698
699 * amd64-tdep.h (tdesc_x32): Remove the declaration.
700 * amd64-tdep.c: Don't include features/i386/x32*.c.
701 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
702 functions.
703 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
704 and i386/x32-avx-avx512.
705 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
706 and i386/x32.xml.
707 * features/i386/x32-avx-avx512.c: Removed.
708 * features/i386/x32-avx-avx512.xml: Removed.
709 * features/i386/x32-avx.c: Removed.
710 * features/i386/x32-avx.xml: Removed.
711 * features/i386/x32.c: Removed.
712 * features/i386/x32.xml: Removed.
713 * regformats/i386/x32-avx-avx512.dat: Removed.
714 * regformats/i386/x32-avx.dat: Removed.
715 * regformats/i386/x32.dat: Removed.
716
717 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
718
719 PR breakpoints/21886
720 * mem-break.c (default_memory_insert_breakpoint): Use
721 `->placed_address' rather than `->reqstd_address' for the
722 breakpoint location.
723
724 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
725
726 * arch-utils.c (default_print_insn): Remove arch/mach/endian
727 assertions.
728
729 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
730
731 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
732 a union of `tdep_info', `tdesc_data' and `id'.
733 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
734 rather than `info.tdep_info'.
735 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
736 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
737 * i386-tdep.c (i386_gdbarch_init): Likewise.
738 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
739 * mips-tdep.c (mips_gdbarch_init): Likewise.
740 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
741 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
742 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
743 `info.tdep_info'.
744 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
745 `info.tdep_info'.
746 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
747 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
748 `info.tdep_info'.
749 * spu-tdep.c (spu_gdbarch_init): Likewise.
750 * gdbarch.h: Regenerate.
751
752 2017-08-07 Leszek Swirski <leszeks@google.com>
753
754 PR symtab/20899
755 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
756
757 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
758
759 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
760 (gdbsim_open): Rename gdb_argv args object to argv.
761
762 2017-08-05 Tom Tromey <tom@tromey.com>
763
764 * compile/compile-object-load.c (compile_object_load): Use
765 gdb::unique_xmalloc_ptr.
766 * cli/cli-dump.c (scan_filename): Rename from
767 scan_filename_with_cleanup. Change return type.
768 (scan_expression): Rename from scan_expression_with_cleanup.
769 Change return type.
770 (dump_memory_to_file, dump_value_to_file, restore_command):
771 Use gdb::unique_xmalloc_ptr. Update.
772 * cli/cli-cmds.c (find_and_open_script): Use
773 gdb::unique_xmalloc_ptr.
774 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
775 * symmisc.c (maintenance_print_symbols)
776 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
777 * symfile.c (symfile_bfd_open, generic_load)
778 (add_symbol_file_command, remove_symbol_file_command): Use
779 gdb::unique_xmalloc_ptr.
780 * source.c (openp): Use gdb::unique_xmalloc_ptr.
781 * psymtab.c (maintenance_print_psymbols): Use
782 gdb::unique_xmalloc_ptr.
783 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
784 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
785 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
786 (reload_shared_libraries_1): Likewise.
787
788 2017-08-05 Tom Tromey <tom@tromey.com>
789
790 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
791 (rust_op_vector, rust_set_vector): New typedefs.
792 (current_parser): New global.
793 (work_obstack): Change to pointer type. Update all users.
794 (rust_ast, pstate): Remove globals.
795 (struct rust_parser): New.
796 (%union) <params, field_inits>: Change type.
797 (start, tuple_expr, unit_expr, struct_expr_list, literal)
798 (field_expr, expr_list, maybe_expr_list, type_list): Update.
799 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
800 (convert_params_to_types, convert_params_to_expression): Change
801 type of "params".
802 (ast_string): Change type of "fields".
803 (rust_parse): Make a rust_parser. Remove cleanups.
804 (rust_lex_tests): Make and install an auto_obstack.
805
806 2017-08-04 Yao Qi <yao.qi@linaro.org>
807
808 * configure.srv (ipa_x32_linux_regobj): New.
809 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
810 instead of X86_TDESC_AVX512.
811 (initialize_low_tracepoint): Call
812 init_registers_x32_avx_avx512_linux.
813
814 2017-08-04 Yao Qi <yao.qi@linaro.org>
815
816 * utils.h (gdb_argv): Add namespace std for nullptr_t.
817
818 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
819
820 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
821
822 2017-08-03 Tom Tromey <tom@tromey.com>
823
824 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
825 Remove.
826 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
827
828 2017-08-03 Tom Tromey <tom@tromey.com>
829
830 * python/py-param.c (compute_enum_values): Use gdb_argv.
831
832 2017-08-03 Tom Tromey <tom@tromey.com>
833
834 * utils.h (struct gdb_argv_deleter): New.
835 (gdb_argv): New class.
836 * utils.c (gdb_argv::reset): New method.
837 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
838 * tracefile.c (tsave_command): Use gdb_argv.
839 * top.c (new_ui_command): Use gdb_argv.
840 * symmisc.c (maintenance_print_symbols)
841 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
842 * symfile.c (symbol_file_command, generic_load)
843 (remove_symbol_file_command): Use gdb_argv.
844 * stack.c (backtrace_command): Use gdb_argv.
845 * source.c (add_path, show_substitute_path_command)
846 (unset_substitute_path_command, set_substitute_path_command):
847 Use gdb_argv.
848 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
849 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
850 * remote.c (extended_remote_run, remote_put_command)
851 (remote_get_command, remote_delete_command): Use gdb_argv.
852 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
853 (gdbsim_open): Use gdb_argv.
854 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
855 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
856 * procfs.c (procfs_info_proc): Use gdb_argv.
857 * interps.c (interpreter_exec_cmd): Use gdb_argv.
858 * infrun.c (handle_command): Use gdb_argv.
859 * inferior.c (add_inferior_command, clone_inferior_command):
860 Use gdb_argv.
861 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
862 * exec.c (exec_file_command): Use gdb_argv.
863 * cli/cli-cmds.c (alias_command): Use gdb_argv.
864 * compile/compile.c (build_argc_argv): Use gdb_argv.
865
866 2017-08-03 Tom Tromey <tom@tromey.com>
867
868 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
869
870 2017-08-03 Tom Tromey <tom@tromey.com>
871
872 * python/python.c (compute_python_string): Return std::string.
873 (gdbpy_eval_from_control_command): Update.
874 (do_start_initialization): Use std::string.
875 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
876 xstrprintf.
877 * python/py-breakpoint.c (local_setattro): Use string_printf, not
878 xstrprintf.
879
880 2017-08-03 Tom Tromey <tom@tromey.com>
881
882 * top.h (do_restore_instream_cleanup): Remove.
883 * top.c (do_restore_instream_cleanup): Remove.
884 (read_command_file): Use scoped_restore.
885 * cli/cli-script.c (execute_user_command): Use scoped_restore.
886
887 2017-08-03 Tom Tromey <tom@tromey.com>
888
889 * cli/cli-script.c (execute_user_command)
890 (execute_control_command): Use scoped_restore.
891
892 2017-08-03 Tom Tromey <tom@tromey.com>
893
894 * cli/cli-script.c (do_restore_user_call_depth): Remove.
895 (execute_user_command): Remove user_call_depth; use
896 user_args_stack's size instead.
897
898 2017-08-03 Tom Tromey <tom@tromey.com>
899
900 * top.h (in_user_command): Remove.
901 * top.c (in_user_command): Remove.
902 * cli/cli-script.c (do_restore_user_call_depth)
903 (execute_user_command): Update.
904
905 2017-08-03 Tom Tromey <tom@tromey.com>
906
907 * valops.c (search_struct_method): Use gdb::byte_vector.
908 * valarith.c (value_concat): Use std::vector.
909 * target.c (memory_xfer_partial): Use gdb::byte_vector.
910 (simple_search_memory): Likewise.
911 * printcmd.c (find_string_backward): Use gdb::byte_vector.
912 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
913 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
914 * elfread.c (elf_rel_plt_read): Use std::string.
915 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
916 * cli/cli-dump.c (restore_section_callback): Use
917 gdb::byte_vector.
918
919 2017-08-03 Tom Tromey <tom@tromey.com>
920
921 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
922
923 2017-08-03 Tom Tromey <tom@tromey.com>
924
925 * tui/tui-regs.c (tui_restore_gdbout): Remove.
926 (tui_register_format): Use scoped_restore.
927
928 2017-08-03 Tom Tromey <tom@tromey.com>
929
930 * reverse.c (exec_direction_default): Remove.
931 (exec_reverse_once): Use scoped_restore.
932 * remote.c (restore_remote_timeout): Remove.
933 (remote_flash_erase, remote_flash_write, remote_flash_done)
934 (readchar, remote_serial_write): Use scoped_restore.
935 * cli/cli-script.c (struct source_cleanup_lines_args)
936 (source_cleanup_lines): Remove.
937 (script_from_file): Use scoped_restore.
938 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
939 (source_command): Use scoped_restore.
940
941 2017-08-03 Tom Tromey <tom@tromey.com>
942
943 * utils.h (make_cleanup_free_so): Remove.
944 * utils.c (do_free_so, make_cleanup_free_so): Remove.
945 * solist.h (struct so_deleter): New.
946 (so_list_up): New typedef.
947 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
948
949 2017-08-03 Tom Tromey <tom@tromey.com>
950
951 * utils.h (make_cleanup_restore_current_language): Remove.
952 * utils.c (do_restore_current_language)
953 (make_cleanup_restore_current_language): Remove.
954 * parse.c (parse_exp_in_context_1)
955 (parse_expression_with_language): Use
956 scoped_restore_current_language.
957 * mi/mi-main.c (mi_cmd_execute): Use
958 scoped_restore_current_language.
959 * language.h (scoped_restore_current_language): New class.
960
961 2017-08-03 Tom Tromey <tom@tromey.com>
962
963 * compile/compile.c (cleanup_unlink_file): Remove.
964 (compile_to_object): Use gdb::unlinker.
965 (eval_compile_command): Likewise.
966
967 2017-08-03 Tom Tromey <tom@tromey.com>
968
969 * utils.h (make_cleanup_fclose): Remove.
970 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
971
972 2017-08-03 Tom Tromey <tom@tromey.com>
973
974 * top.c (open_terminal_stream): Return gdb_file_up.
975 (new_ui_command): Update.
976
977 2017-08-03 Tom Tromey <tom@tromey.com>
978
979 * source.c (print_source_lines_base, forward_search_command)
980 (reverse_search_command): Use gdb_file_up.
981
982 2017-08-03 Tom Tromey <tom@tromey.com>
983
984 * fbsd-nat.c (fbsd_find_memory_regions): Update.
985
986 2017-08-03 Tom Tromey <tom@tromey.com>
987
988 * cli/cli-cmds.c (find_and_open_script): Change return type.
989 Remove "streamp" and "full_path" parameters.
990 (source_script_with_search): Update.
991 * auto-load.c (source_script_file): Update.
992 * cli/cli-cmds.h (find_and_open_script): Change type.
993 (open_script): New struct.
994
995 2017-08-03 Tom Tromey <tom@tromey.com>
996
997 * xml-support.c (xml_fetch_content_from_file): Update.
998 * ui-file.c (stdio_file::open): Update.
999 * tracefile-tfile.c (tfile_start): Update.
1000 * remote.c (remote_file_put, remote_file_get): Update.
1001 * nat/linux-procfs.c (linux_proc_get_int)
1002 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
1003 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
1004 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
1005 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
1006 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
1007 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
1008 * linux-nat.c (linux_proc_pending_signals): Update.
1009 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
1010 (file_closer): Remove.
1011 * compile/compile.c (compile_to_object): Update.
1012 * common/filestuff.h (struct gdb_file_deleter): New.
1013 (gdb_file_up): New typedef.
1014 (gdb_fopen_cloexec): Change return type.
1015 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
1016 * cli/cli-dump.c (fopen_with_cleanup): Remove.
1017 (dump_binary_file, restore_binary_file): Update.
1018 * auto-load.c (auto_load_objfile_script_1): Update.
1019
1020 2017-08-03 Tom Tromey <tom@tromey.com>
1021
1022 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
1023 (info_static_tracepoint_markers_command): Likewise.
1024 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
1025 * skip.c (skip_info): Use ui_out_emit_table.
1026 * progspace.c (print_program_space): Use ui_out_emit_table.
1027 * osdata.c (info_osdata): Use ui_out_emit_table.
1028 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
1029 ui_out_emit_table.
1030 * linux-thread-db.c (info_auto_load_libthread_db): Use
1031 ui_out_emit_table.
1032 * inferior.c (print_inferior): Use ui_out_emit_table.
1033 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
1034 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
1035 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
1036 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
1037 * ui-out.h (class ui_out_emit_table): New.
1038
1039 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
1040
1041 * mips-tdep.c (mips_fpu_type_str): New function.
1042 (mips_dump_tdep): Call it.
1043
1044 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
1045
1046 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
1047 `->mips_fpu_type'.
1048
1049 2017-07-31 Xavier Roirand <roirand@adacore.com>
1050
1051 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
1052
1053 2017-07-27 Xavier Roirand <roirand@adacore.com>
1054
1055 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
1056
1057 2017-07-26 Yao Qi <yao.qi@linaro.org>
1058
1059 * cli/cli-cmds.c (maintenancechecklist): New variable.
1060 * gdbcmd.h (maintenancechecklist): Declare it.
1061 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
1062 Call i386_linux_read_description with different masks.
1063 * maint.c (maintenance_check_command): New function.
1064 (_initialize_maint_cmds): Call add_prefix_cmd.
1065 * target-descriptions.c (tdesc_reg): override operator != and ==.
1066 (tdesc_type): Likewise.
1067 (tdesc_feature): Likewise.
1068 (target_desc): Likewise.
1069 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
1070 (maintenance_check_xml_descriptions): New function.
1071 (_initialize_target_descriptions) Add command "xml-descriptions".
1072 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
1073
1074 2017-07-26 Yao Qi <yao.qi@linaro.org>
1075
1076 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
1077 Include features/i386/32bit-*.c.
1078 (i386_linux_read_description): Generate target description if it
1079 doesn't exist.
1080 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
1081 functions.
1082 * features/i386/32bit-linux.c: Re-generated.
1083 * features/i386/32bit-sse.c: Likewise.
1084 * target-descriptions.c (print_c_feature::visit): Print code to
1085 set register number if needed.
1086 (print_c_feature) <m_next_regnum>: New field.
1087
1088 2017-07-26 Yao Qi <yao.qi@linaro.org>
1089
1090 * features/Makefile (CFILES): Rename with TDESC_CFILES.
1091 (FEATURE_XMLFILES): New.
1092 (FEATURE_CFILES): New.
1093 New rules.
1094 (clean-cfiles): Remove generated c files.
1095 * features/i386/32bit-avx.c: Generated.
1096 * features/i386/32bit-avx512.c: Generated.
1097 * features/i386/32bit-core.c: Generated.
1098 * features/i386/32bit-linux.c: Generated.
1099 * features/i386/32bit-mpx.c: Generated.
1100 * features/i386/32bit-pkeys.c: Generated.
1101 * features/i386/32bit-sse.c: Generated.
1102 * target-descriptions.c: Include algorithm.
1103 (tdesc_element_visitor): Add method visit_end.
1104 (print_c_tdesc): Implement visit_end.
1105 (print_c_tdesc:: m_filename_after_features): Move it to
1106 protected.
1107 (print_c_feature): New class.
1108 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
1109 name starts with "i386/32bit-".
1110
1111 2017-07-26 Yao Qi <yao.qi@linaro.org>
1112
1113 * target-descriptions.c (tdesc_element_visitor): New class.
1114 (tdesc_element): New class.
1115 (tdesc_reg): Inherit from tdesc_element.
1116 (tdesc_reg::accept): New function.
1117 (tdesc_type): Inherit from tdesc_element.
1118 (tdesc_type::accept): New function.
1119 (tdesc_feature): Inherit from tdesc_element.
1120 (tdesc_feature::accept): New function.
1121 (target_desc): Inherit from tdesc_element.
1122 (target_desc::target_desc): New.
1123 (target_desc::~target_desc): New.
1124 (target_desc::accept): New.
1125 (allocate_target_description): Use new.
1126 (free_target_description): Use delete.
1127 (print_c_tdesc): New class.
1128 (maint_print_c_tdesc_cmd): Adjust.
1129
1130 * features/aarch64.c: Re-generated.
1131 * features/arc-arcompact.c: Re-generated.
1132 * features/arc-v2.c: Re-generated.
1133 * features/arm/arm-with-iwmmxt.c: Re-generated.
1134 * features/arm/arm-with-m.c: Re-generated.
1135 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
1136 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
1137 * features/arm/arm-with-neon.c: Re-generated.
1138 * features/arm/arm-with-vfpv2.c: Re-generated.
1139 * features/arm/arm-with-vfpv3.c: Re-generated.
1140 * features/i386/amd64-avx-avx512.c: Re-generated.
1141 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
1142 * features/i386/amd64-avx.c: Re-generated.
1143 * features/i386/amd64-avx-linux.c: Re-generated.
1144 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
1145 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
1146 * features/i386/amd64-avx-mpx.c: Re-generated.
1147 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
1148 * features/i386/amd64.c: Re-generated.
1149 * features/i386/amd64-linux.c: Re-generated.
1150 * features/i386/amd64-mpx.c: Re-generated.
1151 * features/i386/amd64-mpx-linux.c: Re-generated.
1152 * features/i386/i386-avx-avx512.c: Re-generated.
1153 * features/i386/i386-avx-avx512-linux.c: Re-generated.
1154 * features/i386/i386-avx.c: Re-generated.
1155 * features/i386/i386-avx-linux.c: Re-generated.
1156 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
1157 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
1158 * features/i386/i386-avx-mpx.c: Re-generated.
1159 * features/i386/i386-avx-mpx-linux.c: Re-generated.
1160 * features/i386/i386.c: Re-generated.
1161 * features/i386/i386-linux.c: Re-generated.
1162 * features/i386/i386-mmx.c: Re-generated.
1163 * features/i386/i386-mmx-linux.c: Re-generated.
1164 * features/i386/i386-mpx.c: Re-generated.
1165 * features/i386/i386-mpx-linux.c: Re-generated.
1166 * features/i386/x32-avx-avx512.c: Re-generated.
1167 * features/i386/x32-avx-avx512-linux.c: Re-generated.
1168 * features/i386/x32-avx.c: Re-generated.
1169 * features/i386/x32-avx-linux.c: Re-generated.
1170 * features/i386/x32.c: Re-generated.
1171 * features/i386/x32-linux.c: Re-generated.
1172 * features/microblaze.c: Re-generated.
1173 * features/microblaze-with-stack-protect.c: Re-generated.
1174 * features/mips64-dsp-linux.c: Re-generated.
1175 * features/mips64-linux.c: Re-generated.
1176 * features/mips-dsp-linux.c: Re-generated.
1177 * features/mips-linux.c: Re-generated.
1178 * features/nds32.c: Re-generated.
1179 * features/nios2.c: Re-generated.
1180 * features/nios2-linux.c: Re-generated.
1181 * features/rs6000/powerpc-32.c: Re-generated.
1182 * features/rs6000/powerpc-32l.c: Re-generated.
1183 * features/rs6000/powerpc-403.c: Re-generated.
1184 * features/rs6000/powerpc-403gc.c : Re-generated.
1185 * features/rs6000/powerpc-405.c: Re-generated.
1186 * features/rs6000/powerpc-505.c: Re-generated.
1187 * features/rs6000/powerpc-601.c: Re-generated.
1188 * features/rs6000/powerpc-602.c: Re-generated.
1189 * features/rs6000/powerpc-603.c: Re-generated.
1190 * features/rs6000/powerpc-604.c: Re-generated.
1191 * features/rs6000/powerpc-64.c: Re-generated.
1192 * features/rs6000/powerpc-64l.c: Re-generated.
1193 * features/rs6000/powerpc-7400.c: Re-generated.
1194 * features/rs6000/powerpc-750.c: Re-generated.
1195 * features/rs6000/powerpc-860.c: Re-generated.
1196 * features/rs6000/powerpc-altivec32.c: Re-generated.
1197 * features/rs6000/powerpc-altivec32l.c: Re-generated.
1198 * features/rs6000/powerpc-altivec64.c: Re-generated.
1199 * features/rs6000/powerpc-altivec64l.c: Re-generated.
1200 * features/rs6000/powerpc-cell32l.c: Re-generated.
1201 * features/rs6000/powerpc-cell64l.c: Re-generated.
1202 * features/rs6000/powerpc-e500.c: Re-generated.
1203 * features/rs6000/powerpc-e500l.c: Re-generated.
1204 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
1205 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
1206 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
1207 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
1208 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
1209 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
1210 * features/rs6000/powerpc-vsx32.c: Re-generated.
1211 * features/rs6000/powerpc-vsx32l.c: Re-generated.
1212 * features/rs6000/powerpc-vsx64.c: Re-generated.
1213 * features/rs6000/powerpc-vsx64l.c: Re-generated.
1214 * features/rs6000/rs6000.c: Re-generated.
1215 * features/s390-linux32.c: Re-generated.
1216 * features/s390-linux32v1.c: Re-generated.
1217 * features/s390-linux32v2.c: Re-generated.
1218 * features/s390-linux64.c: Re-generated.
1219 * features/s390-linux64v1.c: Re-generated.
1220 * features/s390-linux64v2.c: Re-generated.
1221 * features/s390-te-linux64.c: Re-generated.
1222 * features/s390-tevx-linux64.c: Re-generated.
1223 * features/s390-vx-linux64.c: Re-generated.
1224 * features/s390x-linux64.c: Re-generated.
1225 * features/s390x-linux64v1.c: Re-generated.
1226 * features/s390x-linux64v2.c: Re-generated.
1227 * features/s390x-te-linux64.c: Re-generated.
1228 * features/s390x-tevx-linux64.c: Re-generated.
1229 * features/s390x-vx-linux64.c: Re-generated.
1230 * features/sparc/sparc32-solaris.c: Re-generated.
1231 * features/sparc/sparc64-solaris.c: Re-generated.
1232 * features/tic6x-c62x.c: Re-generated.
1233 * features/tic6x-c62x-linux.c: Re-generated.
1234 * features/tic6x-c64x.c: Re-generated.
1235 * features/tic6x-c64x-linux.c: Re-generated.
1236 * features/tic6x-c64xp.c: Re-generated.
1237 * features/tic6x-c64xp-linux.c: Re-generated.
1238
1239 2017-07-26 Yao Qi <yao.qi@linaro.org>
1240
1241 * i386-linux-tdep.c (i386_linux_read_description): New function.
1242 (i386_linux_core_read_description): Call
1243 i386_linux_read_description.
1244 * i386-linux-tdep.h (i386_linux_read_description): Declare.
1245 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
1246 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
1247 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
1248 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
1249 * x86-linux-nat.c (x86_linux_read_description): Call
1250 i386_linux_read_description.
1251
1252 2017-07-26 Yao Qi <yao.qi@linaro.org>
1253
1254 * NEWS: Mention it.
1255 * features/Makefile (%.c: %.xml): Pass the xml file name to
1256 command "maint print c-tdesc".
1257 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
1258 name from 'arg'.
1259
1260 2017-07-26 Yao Qi <yao.qi@linaro.org>
1261
1262 * target-descriptions.c (target_desc): Add ctor and dtor. Do
1263 in-class initialization.
1264 (tdesc_create_feature): Call new instead of XCNEW.
1265 (free_target_description): Ue delete.
1266
1267 2017-07-25 John Baldwin <jhb@FreeBSD.org>
1268
1269 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
1270
1271 2017-07-25 Yao Qi <yao.qi@linaro.org>
1272
1273 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
1274 constant.
1275 (amd64_x32_init_abi): Likewise.
1276 * amd64-tdep.h (amd64_init_abi): Update declaration.
1277 (amd64_x32_init_abi): Likewise.
1278
1279 2017-07-25 Yao Qi <yao.qi@linaro.org>
1280
1281 PR tdep/21717
1282 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
1283 condition for FPSCR.
1284 (arm_linux_store_inferior_registers): Likewise.
1285
1286 2017-07-22 Tom Tromey <tom@tromey.com>
1287
1288 * break-catch-syscall.c (struct catch_syscall_inferior_data)
1289 <syscalls_counts>: Now a std::vector.
1290 (get_catch_syscall_inferior_data): Use "new".
1291 (catch_syscall_inferior_data_cleanup): Use "delete".
1292 (insert_catch_syscall, remove_catch_syscall)
1293 (clear_syscall_counts): Update.
1294
1295 2017-07-22 Tom Tromey <tom@tromey.com>
1296
1297 * break-catch-syscall.c (syscall_catchpoint)
1298 <syscalls_to_be_caught>: Now a std::vector<int>
1299 (~syscall_catchpoint): Remove.
1300 (insert_catch_syscall, remove_catch_syscall)
1301 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
1302 (print_mention_catch_syscall, print_recreate_catch_syscall):
1303 Update.
1304 (create_syscall_event_catchpoint): Change type of "filter"
1305 parameter.
1306 (catch_syscall_split_args): Return a std::vector.
1307 (catch_syscall_command_1, catching_syscall_number_1): Update.
1308
1309 2017-07-22 Tom Tromey <tom@tromey.com>
1310
1311 * break-catch-throw.c (struct exception_catchpoint)
1312 <exception_rx>: Now a std::string.
1313 (~exception_catchpoint): Remove.
1314 (print_one_detail_exception_catchpoint): Update.
1315 (handle_gnu_v3_exceptions): Change type of except_rx.
1316 (extract_exception_regexp): Return a std::string.
1317 (catch_exception_command_1): Update.
1318
1319 2017-07-22 Tom Tromey <tom@tromey.com>
1320
1321 * break-catch-sig.c (gdb_signal_type): Remove typedef.
1322 (struct signal_catchpoint) <signals_to_be_caught>: Now a
1323 std::vector.
1324 <catch_all>: Now a bool.
1325 (~signal_catchpoint): Remove.
1326 (signal_catchpoint_insert_location)
1327 (signal_catchpoint_remove_location)
1328 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
1329 (signal_catchpoint_print_mention)
1330 (signal_catchpoint_print_recreate)
1331 (signal_catchpoint_explains_signal): Update.
1332 (create_signal_catchpoint): Change type of "filter" and
1333 "catch_all".
1334 (catch_signal_split_args): Return a std::vector. Change type of
1335 "catch_all".
1336 (catch_signal_command): Update.
1337
1338 2017-07-20 Pedro Alves <palves@redhat.com>
1339
1340 * ada-lang.c (ada_language_defn): Make extern.
1341 (_initialize_ada_language): Remove add_language call.
1342 * c-lang.c (c_language_defn, cplus_language_defn)
1343 (asm_language_defn, minimal_language_defn): Make extern.
1344 (_initialize_c_language): Delete.
1345 * completer.c (compare_cstrings): Delete, moved to utils.h.
1346 * d-lang.c (d_language_defn): Make extern.
1347 (_initialize_d_language): Remove add_language calls.
1348 * defs.h (enum language): Add comment.
1349 * f-lang.c (f_language_defn): Make extern.
1350 (_initialize_f_language): Remove add_language call.
1351 * go-lang.c (go_language_defn): Make extern.
1352 (_initialize_go_language): Remove add_language call.
1353 * language.c: Include <algorithm>.
1354 (languages): Redefine as const array.
1355 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
1356 (set_language_command): Handle "local". Use for-range loop.
1357 (set_language): Remove loop.
1358 (language_enum): Rewrite.
1359 (language_def, language_str): Remove loops.
1360 (add_language): Delete.
1361 (add_set_language_command): New, based on add_languages.
1362 (skip_language_trampoline): Adjust.
1363 (local_language_defn): Delete.
1364 (language_gdbarch_post_init): Adjust.
1365 (_initialize_language): Remove add_language calls. Call
1366 add_set_language_command.
1367 * language.h (add_language): Delete.
1368 (auto_language_defn)
1369 (unknown_language_defn, minimal_language_defn, ada_language_defn)
1370 (asm_language_defn, c_language_defn, cplus_language_defn)
1371 (d_language_defn, f_language_defn, go_language_defn)
1372 (m2_language_defn, objc_language_defn, opencl_language_defn)
1373 (pascal_language_defn, rust_language_defn): Declare.
1374 * m2-lang.c (m2_language_defn): Make extern.
1375 (_initialize_m2_language): Remove add_language call.
1376 * objc-lang.c (objc_language_defn): Make extern.
1377 (_initialize_objc_language): Remove add_language call.
1378 * opencl-lang.c (opencl_language_defn): Make extern.
1379 (_initialize_opencl_language): Remove add_language call.
1380 * p-lang.c (pascal_language_defn): Make extern.
1381 (_initialize_pascal_language): Delete.
1382 * rust-lang.c (rust_language_defn): Make extern.
1383 (_initialize_rust_language): Delete.
1384 * utils.h (compare_cstrings): New static inline function.
1385
1386 2017-07-20 Pedro Alves <palves@redhat.com>
1387
1388 * ada-lang.c (ada_to_fixed_type_1): Adjust.
1389 (get_var_value): Constify parameters.
1390 (get_int_var_value): Change prototype.
1391 (to_fixed_range_type): Adjust.
1392 * ada-lang.h (get_int_var_value): Change prototype.
1393
1394 2017-07-20 Pedro Alves <palves@redhat.com>
1395
1396 * dwarf2read.c (dw2_lookup_symbol): Use
1397 SYMBOL_MATCHES_SEARCH_NAME.
1398 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
1399
1400 2017-07-20 Pedro Alves <palves@redhat.com>
1401
1402 * block.c (block_iter_name_step, block_iter_name_first)
1403 (block_iter_name_next): Delete.
1404 (block_lookup_symbol_primary): Adjust to use
1405 dict_iter_match_first/dict_iter_match_next.
1406 * block.h (block_iter_name_first, block_iter_name_next): Delete
1407 declarations.
1408 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
1409 dict_iter_match_first/dict_iter_match_next.
1410
1411 2017-07-20 Pedro Alves <palves@redhat.com>
1412
1413 * cp-support.c (cp_find_first_component_aux): Add missing case for
1414 end of string.
1415
1416 2017-07-18 David Blaikie <dblaikie@gmail.com>
1417
1418 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
1419 of dwo_cu's dwo_file.
1420
1421 2017-07-18 Yao Qi <yao.qi@linaro.org>
1422
1423 * remote.c (store_registers_using_G): Remove one line comment.
1424
1425 2017-07-18 Yao Qi <yao.qi@linaro.org>
1426
1427 * regcache.c (regcache_cpy): Simplify it.
1428 (regcache::cpy_no_passthrough): Remove it.
1429 * regcache.h (cpy_no_passthrough): Remove it.
1430 (regcache_dup, regcache_cpy): Update comments.
1431
1432 2017-07-18 Pedro Alves <palves@redhat.com>
1433
1434 * remote-sim.c (sim_command_completer): Adjust to work with a
1435 completion_tracker instead of a VEC.
1436
1437 2017-07-17 Pedro Alves <palves@redhat.com>
1438
1439 * completer.c (complete_source_filenames): New function.
1440 (complete_address_and_linespec_locations): New function.
1441 (location_completer): Use complete_address_and_linespec_locations.
1442 (completion_tracker::build_completion_result): Honor the tracker's
1443 request to suppress append.
1444 * completer.h (completion_tracker::suppress_append_ws)
1445 (completion_tracker::set_suppress_append_ws): New methods.
1446 (completion_tracker::m_suppress_append_ws): New field.
1447 (complete_source_filenames): New declaration.
1448 * linespec.c (linespec_complete_what): New.
1449 (struct ls_parser) <complete_what, completion_word,
1450 completion_quote_char, completion_quote_end, completion_tracker>:
1451 New fields.
1452 (string_find_incomplete_keyword_at_end): New.
1453 (linespec_lexer_lex_string): Record quote char. If in completion
1454 mode, don't throw.
1455 (linespec_lexer_consume_token): Advance the completion word point.
1456 (linespec_lexer_peek_token): Save/restore completion info.
1457 (save_stream_and_consume_token): New.
1458 (set_completion_after_number): New.
1459 (linespec_parse_basic): Set what to complete next depending on
1460 token. Handle function and label completions specially.
1461 (parse_linespec): Disable objc shortcut in completion mode. Set
1462 what to complete next depending on token type. Skip keyword if in
1463 completion mode.
1464 (complete_linespec_component, linespec_complete): New.
1465 * linespec.h (linespec_complete): Declare.
1466
1467 2017-07-17 Pedro Alves <palves@redhat.com>
1468
1469 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
1470 Handle 'operator<' / 'operator<<'.
1471
1472 2017-07-17 Pedro Alves <palves@redhat.com>
1473
1474 * completer.c (collect_explicit_location_matches): Handle
1475 MATCH_LABEL.
1476 (convert_explicit_location_to_linespec): New, factored out from
1477 ...
1478 (convert_explicit_location_to_sals): ... this.
1479 (complete_label): New.
1480 (linespec_complete_label, find_label_symbols_in_block): New.
1481 (find_label_symbols): Add completion_mode parameter and adjust to
1482 call find_label_symbols_in_block.
1483 * linespec.h (linespec_complete_label): Declare.
1484
1485 2017-07-17 Pedro Alves <palves@redhat.com>
1486
1487 * ada-lang.c (ada_collect_symbol_completion_matches): Add
1488 complete_symbol_mode parameter.
1489 * cli/cli-cmds.c (complete_command): Get the completion result out
1490 of the handle_brkchars tracker if used a custom word point.
1491 * completer.c: Include "linespec.h".
1492 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
1493 (advance_to_expression_complete_word_point): New.
1494 (completion_tracker::completes_to_completion_word): New.
1495 (complete_files_symbols): Pass down
1496 complete_symbol_mode::EXPRESSION.
1497 (explicit_options, probe_options): New.
1498 (collect_explicit_location_matches): Complete on the
1499 explictit_loc->foo instead of word. Use
1500 linespec_complete_function. Handle MATCH_LINE. Handle offering
1501 keyword and options completions.
1502 (backup_text_ptr): Delete.
1503 (skip_keyword): New.
1504 (complete_explicit_location): Remove 'word' parameter. Add
1505 language, quoted_arg_start and quoted_arg_end parameters.
1506 Rewrite, parsing left to right.
1507 (location_completer): Rewrite.
1508 (location_completer_handle_brkchars): New function.
1509 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
1510 (enum complete_line_internal_reason): Adjust comments.
1511 (completion_tracker::discard_completions): New.
1512 (completer_handle_brkchars_func_for_completer): Handle
1513 location_completer.
1514 (gdb_custom_word_point_brkchars)
1515 (gdb_org_rl_basic_quote_characters): New.
1516 (gdb_completion_word_break_characters_throw)
1517 (completion_find_completion_word): Handle trackers that use a
1518 custom word point.
1519 (completion_tracker::advance_custom_word_point_by): New.
1520 (completion_tracker::build_completion_result): Don't rely on
1521 readline appending the quote char.
1522 (gdb_rl_attempted_completion_function_throw): Handle trackers that
1523 use a custom word point.
1524 (gdb_rl_attempted_completion_function): Restore
1525 rl_basic_quote_characters.
1526 * completer.h (class completion_tracker): Extend intro comment.
1527 (completion_tracker::set_quote_char)
1528 (completion_tracker::quote_char)
1529 (completion_tracker::set_use_custom_word_point)
1530 (completion_tracker::use_custom_word_point)
1531 (completion_tracker::custom_word_point)
1532 (completion_tracker::set_custom_word_point)
1533 (completion_tracker::advance_custom_word_point_by)
1534 (completion_tracker::completes_to_completion_word)
1535 (completion_tracker::discard_completions): New methods.
1536 (completion_tracker::m_quote_char)
1537 (completion_tracker::m_use_custom_word_point)
1538 (completion_tracker::m_custom_word_point): New fields.
1539 (advance_to_expression_complete_word_point): Declare.
1540 * f-lang.c (f_collect_symbol_completion_matches): Add
1541 complete_symbol_mode parameter.
1542 * language.h (struct language_defn)
1543 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
1544 parameter.
1545 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
1546 (linespec_complete_function): New function.
1547 (linespec_lexer_lex_keyword): Adjust.
1548 * linespec.h (linespec_keywords, linespec_complete_function): New
1549 declarations.
1550 * location.c (find_end_quote): New function.
1551 (explicit_location_lex_one): Add explicit_completion_info
1552 parameter. Save quoting info. Don't throw if being called for
1553 completion. Don't handle Ada operators here.
1554 (is_cp_operator, skip_op_false_positives, first_of)
1555 (explicit_location_lex_one_function): New function.
1556 (string_to_explicit_location): Replace 'dont_throw' parameter with
1557 an explicit_completion_info pointer parameter. Handle it. Don't
1558 use explicit_location_lex_one to lex function names. Use
1559 explicit_location_lex_one_function instead.
1560 * location.h (struct explicit_completion_info): New.
1561 (string_to_explicit_location): Replace 'dont_throw' parameter with
1562 an explicit_completion_info pointer parameter.
1563 * symtab.c (default_collect_symbol_completion_matches_break_on):
1564 Add complete_symbol_mode parameter. Handle LINESPEC mode.
1565 (default_collect_symbol_completion_matches)
1566 (collect_symbol_completion_matches): Add complete_symbol_mode
1567 parameter.
1568 (collect_symbol_completion_matches_type): Pass down
1569 complete_symbol_mode::EXPRESSION.
1570 (collect_file_symbol_completion_matches): Add complete_symbol_mode
1571 parameter. Handle LINESPEC mode.
1572 * symtab.h (complete_symbol_mode): New.
1573 (default_collect_symbol_completion_matches_break_on)
1574 (default_collect_symbol_completion_matches)
1575 (collect_symbol_completion_matches)
1576 (collect_file_symbol_completion_matches): Add complete_symbol_mode
1577 parameter.
1578
1579 2017-07-17 Pedro Alves <palves@redhat.com>
1580
1581 * utils.c (enum class strncmp_iw_mode): New.
1582 (strcmp_iw): Rename to ...
1583 (strncmp_iw_with_mode): ... this. Add string2_len and mode
1584 parameters. Handle them.
1585 (strncmp_iw): New.
1586 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
1587 * utils.h (strncmp_iw): Declare.
1588 (strcmp_iw): Move describing comments here.
1589
1590 2017-07-17 Pedro Alves <palves@redhat.com>
1591
1592 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
1593 CP_OPERATOR_STR.
1594 * c-typeprint.c (is_type_conversion_operator): Use
1595 CP_OPERATOR_STR.
1596 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
1597 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
1598 CP_OPERATOR_LEN.
1599 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
1600 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
1601 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
1602 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
1603 CP_OPERATOR_STR.
1604 * location.c: Include "cp-support.h".
1605 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
1606 CP_OPERATOR_STR.
1607 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
1608 CP_OPERATOR_LEN.
1609
1610 2017-07-17 Pedro Alves <palves@redhat.com>
1611
1612 * cli/cli-cmds.c (complete_command): Use a completion tracker
1613 along with completion_find_completion_word for handle_brkchars
1614 phase.
1615 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
1616 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
1617 (struct gdb_rl_completion_word_info): New.
1618 (gdb_rl_find_completion_word): New.
1619 (completion_find_completion_word): New.
1620 * completer.h (completion_find_completion_word): Declare.
1621
1622 2017-07-17 Pedro Alves <palves@redhat.com>
1623
1624 * ada-lang.c (symbol_completion_match): Adjust comments.
1625 (symbol_completion_add): Replace vector parameter with
1626 completion_tracker parameter. Use it.
1627 (ada_make_symbol_completion_list): Rename to...
1628 (ada_collect_symbol_completion_matches): ... this. Add
1629 completion_tracker parameter and use it.
1630 (ada_language_defn): Adjust.
1631 * break-catch-syscall.c (catch_syscall_completer): Adjust
1632 prototype and work with completion_tracker instead of VEC.
1633 * breakpoint.c (condition_completer): Adjust prototype and work
1634 with completion_tracker instead of VEC.
1635 * c-lang.c (c_language_defn, cplus_language_defn)
1636 (asm_language_defn, minimal_language_defn): Adjust to renames.
1637 * cli/cli-cmds.c (complete_command): Rework using
1638 completion_tracker. Catch exceptions when completing.
1639 * cli/cli-decode.c (integer_unlimited_completer)
1640 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
1641 with completion_tracker instead of VEC.
1642 * command.h (struct completion_tracker): Forward declare.
1643 (completer_ftype, completer_handle_brkchars_ftype): Change
1644 types.
1645 (complete_on_cmdlist, complete_on_enum): Adjust.
1646 * completer.c: Include <algorithm>.
1647 (struct gdb_completer_state): New.
1648 (current_completion): New global.
1649 (readline_line_completion_function): Delete.
1650 (noop_completer, filename_completer)
1651 (filename_completer_handle_brkchars, complete_files_symbols)
1652 (linespec_location_completer): Adjust to work with a
1653 completion_tracker instead of a VEC.
1654 (string_or_empty): New.
1655 (collect_explicit_location_matches): Adjust to work with a
1656 completion_tracker instead of a VEC.
1657 (explicit_location_completer): Rename to ...
1658 (complete_explicit_location): ... this and adjust to work with a
1659 completion_tracker instead of a VEC.
1660 (location_completer): Adjust to work with a completion_tracker
1661 instead of a VEC.
1662 (add_struct_fields): Adjust to work with a completion_list instead
1663 of VEC.
1664 (expression_completer): Rename to ...
1665 (complete_expression): ... this and adjust to work with a
1666 completion_tracker instead of a VEC. Use complete_files_symbols.
1667 (expression_completer): Reimplement on top of complete_expression.
1668 (symbol_completer): Adjust to work with a completion_tracker
1669 instead of a VEC.
1670 (enum complete_line_internal_reason): Add describing comments.
1671 (complete_line_internal_normal_command): Adjust to work with a
1672 completion_tracker instead of a VEC.
1673 (complete_line_internal): Rename to ...
1674 (complete_line_internal_1): ... this and adjust to work with a
1675 completion_tracker instead of a VEC. Assert TEXT is NULL in the
1676 handle_brkchars phase.
1677 (new_completion_tracker): Delete.
1678 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
1679 complete_line_internal_1.
1680 (free_completion_tracker): Delete.
1681 (INITIAL_COMPLETION_HTAB_SIZE): New.
1682 (completion_tracker::completion_tracker)
1683 (completion_tracker::~completion_tracker): New.
1684 (maybe_add_completion): Delete.
1685 (completion_tracker::maybe_add_completion)
1686 (completion_tracker::add_completion)
1687 (completion_tracker::add_completions): New.
1688 (throw_max_completions_reached_error): Delete.
1689 (complete_line): Adjust to work with a completion_tracker instead
1690 of a VEC. Don't create a completion_tracker_t or check for max
1691 completions here.
1692 (command_completer, command_completer_handle_brkchars)
1693 (signal_completer, reg_or_group_completer_1)
1694 (reg_or_group_completer, default_completer_handle_brkchars):
1695 Adjust to work with a completion_tracker.
1696 (gdb_completion_word_break_characters_throw): New.
1697 (gdb_completion_word_break_characters): Reimplement.
1698 (line_completion_function): Delete.
1699 (completion_tracker::recompute_lowest_common_denominator)
1700 (expand_preserving_ws)
1701 (completion_tracker::build_completion_result)
1702 (completion_result::completion_result)
1703 (completion_result::completion_result)
1704 (completion_result::~completion_result)
1705 (completion_result::completion_result)
1706 (completion_result::release_match_list, compare_cstrings)
1707 (completion_result::sort_match_list)
1708 (completion_result::reset_match_list)
1709 (gdb_rl_attempted_completion_function_throw)
1710 (gdb_rl_attempted_completion_function): New.
1711 * completer.h (completion_list, struct completion_result)
1712 (class completion_tracker): New.
1713 (complete_line): Add completion_tracker parameter.
1714 (readline_line_completion_function): Delete.
1715 (gdb_rl_attempted_completion_function): New.
1716 (noop_completer, filename_completer, expression_completer)
1717 (location_completer, symbol_completer, command_completer)
1718 (signal_completer, reg_or_group_completer): Update prototypes.
1719 (completion_tracker_t, new_completion_tracker)
1720 (make_cleanup_free_completion_tracker): Delete.
1721 (enum maybe_add_completion_enum): Delete.
1722 (maybe_add_completion): Delete.
1723 (throw_max_completions_reached_error): Delete.
1724 * corefile.c (complete_set_gnutarget): Adjust to work with a
1725 completion_tracker instead of a VEC.
1726 * cp-abi.c (cp_abi_completer): Adjust to work with a
1727 completion_tracker instead of a VEC.
1728 * d-lang.c (d_language_defn): Adjust.
1729 * disasm.c (disassembler_options_completer): Adjust to work with a
1730 completion_tracker instead of a VEC.
1731 * f-lang.c (f_make_symbol_completion_list): Rename to ...
1732 (f_collect_symbol_completion_matches): ... this. Adjust to work
1733 with a completion_tracker instead of a VEC.
1734 (f_language_defn): Adjust.
1735 * go-lang.c (go_language_defn): Adjust.
1736 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
1737 Adjust to work with a completion_tracker instead of a VEC.
1738 * infrun.c (handle_completer): Likewise.
1739 * interps.c (interpreter_completer): Likewise.
1740 * interps.h (interpreter_completer): Likewise.
1741 * language.c (unknown_language_defn, auto_language_defn)
1742 (local_language_defn): Adjust.
1743 * language.h (language_defn::la_make_symbol_completion_list):
1744 Rename to ...
1745 (language_defn::la_collect_symbol_completion_matches): ... this
1746 and adjust to work with a completion_tracker instead of a VEC.
1747 * m2-lang.c (m2_language_defn): Adjust.
1748 * objc-lang.c (objc_language_defn): Adjust.
1749 * opencl-lang.c (opencl_language_defn): Adjust.
1750 * p-lang.c (pascal_language_defn): Adjust.
1751 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
1752 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
1753 with a completion_tracker.
1754 * rust-lang.c (rust_language_defn): Adjust.
1755 * symtab.c (free_completion_list, do_free_completion_list)
1756 (return_val, completion_tracker): Delete.
1757 (completion_list_add_name, completion_list_add_symbol)
1758 (completion_list_add_msymbol, completion_list_objc_symbol)
1759 (completion_list_add_fields, add_symtab_completions): Add
1760 completion_tracker parameter and use it.
1761 (default_make_symbol_completion_list_break_on_1): Rename to...
1762 (default_collect_symbol_completion_matches_break_on): ... this.
1763 Add completion_tracker parameter and use it instead of allocating
1764 a completion tracker here.
1765 (default_make_symbol_completion_list_break_on): Delete old
1766 implementation.
1767 (default_make_symbol_completion_list): Delete.
1768 (default_collect_symbol_completion_matches): New.
1769 (make_symbol_completion_list): Delete.
1770 (collect_symbol_completion_matches): New.
1771 (make_symbol_completion_type): Rename to ...
1772 (collect_symbol_completion_matches_type): ... this. Add
1773 completion_tracker parameter and use it instead of VEC.
1774 (make_file_symbol_completion_list_1): Rename to...
1775 (collect_file_symbol_completion_matches): ... this. Add
1776 completion_tracker parameter and use it instead of VEC.
1777 (make_file_symbol_completion_list): Delete.
1778 (add_filename_to_list): Use completion_list instead of a VEC.
1779 (add_partial_filename_data::list): Now a completion_list.
1780 (make_source_files_completion_list): Work with a completion_list
1781 instead of a VEC.
1782 * symtab.h: Include "completer.h".
1783 (default_make_symbol_completion_list_break_on)
1784 (default_make_symbol_completion_list, make_symbol_completion_list)
1785 (make_symbol_completion_type, make_file_symbol_completion_list)
1786 (make_source_files_completion_list): Delete.
1787 (default_collect_symbol_completion_matches_break_on)
1788 (default_collect_symbol_completion_matches)
1789 (collect_symbol_completion_matches)
1790 (collect_symbol_completion_matches_type)
1791 (collect_file_symbol_completion_matches)
1792 (make_source_files_completion_list): New.
1793 * top.c (init_main): Don't install a rl_completion_entry_function
1794 hook. Install a rl_attempted_completion_function hook instead.
1795 * tui/tui-layout.c (layout_completer): Adjust to work with a
1796 completion_tracker.
1797 * tui/tui-regs.c (tui_reggroup_completer):
1798 * tui/tui-win.c (window_name_completer, focus_completer)
1799 (winheight_completer): Adjust to work with a completion_tracker.
1800 * value.c: Include "completer.h".
1801 (complete_internalvar): Adjust to work with a completion_tracker.
1802 * value.h (complete_internalvar): Likewise.
1803
1804 2017-07-17 Pedro Alves <palves@redhat.com>
1805
1806 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
1807 renames.
1808 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
1809 comments to completer_ftype's declaration.
1810 <completer_handle_brkchars>: Change type to
1811 completer_handle_brkchars_ftype.
1812 * command.h (completer_ftype): Add describing comment and give
1813 names to parameters.
1814 (completer_ftype_void): Rename to ...
1815 (completer_handle_brkchars_ftype) ... this. Add describing comment.
1816 (set_cmd_completer_handle_brkchars): Adjust.
1817 * completer.c (filename_completer_handle_brkchars): New function.
1818 (complete_line_internal_normal_command): New function, factored
1819 out from ...
1820 (complete_line_internal): ... here.
1821 (command_completer_handle_brkchars)
1822 (default_completer_handle_brkchars)
1823 (completer_handle_brkchars_func_for_completer): New functions.
1824 * completer.h (set_gdb_completion_word_break_characters): Delete
1825 declaration.
1826 (completer_handle_brkchars_func_for_completer): New declaration.
1827 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
1828 completer_handle_brkchars_func_for_completer.
1829
1830 2017-07-17 Pedro Alves <palves@redhat.com>
1831
1832 * completer.c (symbol_completer): New function, based on
1833 make_symbol_completion_list_fn.
1834 * completer.h (symbol_completer): New declaration.
1835 * guile/scm-cmd.c (cmdscm_completers): Adjust.
1836 * python/py-cmd.c (completers): Adjust.
1837 * symtab.c (make_symbol_completion_list_fn): Delete.
1838 * symtab.h (make_symbol_completion_list_fn): Delete.
1839 * cli/cli-decode.c (add_cmd): Adjust.
1840
1841 2017-07-17 Pedro Alves <palves@redhat.com>
1842
1843 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
1844 * dwarf2read.c: Include "filename-seen-cache.h".
1845 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
1846 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
1847 * filename-seen-cache.c: New file.
1848 * filename-seen-cache.h: New file.
1849 * symtab.c: Include "filename-seen-cache.h".
1850 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
1851 (create_filename_seen_cache, clear_filename_seen_cache)
1852 (delete_filename_seen_cache, filename_seen): Delete, parts moved
1853 to filename-seen-cache.h/filename-seen-cache.c.
1854 (output_source_filename, sources_info)
1855 (maybe_add_partial_symtab_filename)
1856 (make_source_files_completion_list): Adjust to use
1857 filename_seen_cache.
1858
1859 2017-07-17 Pedro Alves <palves@redhat.com>
1860
1861 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
1862 fields.
1863 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
1864 dwarf2_debug_sections*)): New.
1865 (dwarf2_per_objfile::dwarf2_per_objfile(const
1866 dwarf2_per_objfile&)): Declare as deleted.
1867 (dwarf2_per_objfile::operator=): Declare as deleted.
1868 (dwarf2_per_objfile::dwarf2_per_objfile)
1869 (dwarf2_per_objfile::~dwarf2_per_objfile)
1870 (dwarf2_per_objfile::free_cached_comp_units): New.
1871 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
1872 ctor. Call dwarf2_per_objfile's ctor manually.
1873 (dwarf2_locate_sections): Deleted/refactored as ...
1874 (dwarf2_per_objfile::locate_sections): ... this new method.
1875 (free_cached_comp_units): Defer to
1876 dwarf2_per_objfile::free_cached_comp_units.
1877 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
1878
1879 2017-07-14 Tom Tromey <tom@tromey.com>
1880
1881 PR rust/21764:
1882 * rust-exp.y (convert_ast_to_expression): Add "want_type"
1883 parameter.
1884 <UNOP_SIZEOF>: Split into separate case.
1885 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
1886
1887 2017-07-14 Tom Tromey <tom@tromey.com>
1888
1889 PR rust/21763:
1890 * symtab.c (symbol_matches_domain): Add language_rust to special
1891 case.
1892 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
1893 treat LOC_TYPEDEF symbols as variables.
1894
1895 2017-07-14 Pedro Alves <palves@redhat.com>
1896
1897 * symtab.c (make_file_symbol_completion_list_1): Iterate over
1898 symtabs matching all symtabs with SRCFILE as file name instead of
1899 only considering the first hit, with lookup_symtab.
1900
1901 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
1902
1903 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
1904 operator_name parameters.
1905 (gen_expr): Update function call.
1906
1907 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
1908
1909 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
1910 parameter.
1911 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
1912 Likewise.
1913 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
1914 parameter, use agent_expr::gdbarch instead, update function
1915 calls.
1916 (locexpr_tracepoint_var_ref): Likewise.
1917 (loclist_tracepoint_var_ref): Likewise.
1918 * ax-gdb.c (gen_trace_static_fields): Likewise.
1919 (gen_traced_pop): Likewise.
1920 (gen_frame_args_address): Likewise.
1921 (gen_frame_locals_address): Likewise.
1922 (gen_var_ref): Likewise.
1923 (gen_struct_ref_recursive): Likewise.
1924 (gen_static_field): Likewise.
1925 (gen_maybe_namespace_elt): Likewise.
1926 (gen_expr): Likewise.
1927 (gen_trace_for_var): Likewise.
1928 (gen_trace_for_expr): Likewise.
1929 (gen_trace_for_return_address): Likewise.
1930
1931 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
1932
1933 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
1934 parameter.
1935 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
1936
1937 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
1938
1939 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
1940 from ax, update calls.
1941 (gen_usual_arithmetic): Likewise.
1942 (gen_integral_promotions): Likewise.
1943 (gen_bitfield_ref): Likewise.
1944 (gen_primitive_field): Likewise.
1945 (gen_struct_ref_recursive): Likewise.
1946 (gen_struct_ref): Likewise.
1947 (gen_maybe_namespace_elt): Likewise.
1948 (gen_struct_elt_for_reference): Likewise.
1949 (gen_namespace_elt): Likewise.
1950 (gen_aggregate_elt_ref): Likewise.
1951 (gen_expr): Get gdbarch from ax, update calls.
1952 (gen_expr_binop_rest): Likewise.
1953
1954 2017-07-13 Pedro Alves <palves@redhat.com>
1955
1956 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
1957 as default tdesc.
1958 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
1959 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
1960 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
1961 tdesc_amd64_linux as default tdesc. Get final tdesc from the
1962 tdep.
1963 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
1964 Get final tdesc from the tdep.
1965 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
1966 default tdesc.
1967 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1968 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1969 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
1970 Use it as default tdesc.
1971 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
1972 down to amd_init_abi. No longer handle fallback tdesc here.
1973 * amd64-tdep.h (tdesc_x32): Declare.
1974 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
1975 parameter.
1976 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
1977 as default tdesc.
1978
1979 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1980
1981 * s390-linux-tdep.c (s390_process_record): Add support for
1982 instructions new in arch12.
1983
1984 2017-07-11 John Baldwin <jhb@FreeBSD.org>
1985
1986 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
1987 PT_GETFSBASE and PT_GETGSBASE.
1988 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
1989 PT_SETGSBASE.
1990
1991 2017-07-11 John Baldwin <jhb@FreeBSD.org>
1992
1993 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
1994 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
1995 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
1996 those rules.
1997 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
1998 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
1999 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
2000 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
2001 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
2002 * features/i386/amd64.xml: Add 64bit-segments.xml.
2003 * features/i386/amd64-avx-avx512.c: Regenerated.
2004 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
2005 * features/i386/amd64-avx-mpx.c: Regenerated.
2006 * features/i386/amd64-avx.c: Regenerated.
2007 * features/i386/amd64-mpx.c: Regenerated.
2008 * features/i386/amd64.c: Regenerated.
2009 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
2010 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
2011 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
2012 * regformats/i386/amd64-avx.dat: Regenerated.
2013 * regformats/i386/amd64-mpx.dat: Regenerated.
2014 * regformats/i386/amd64.dat: Regenerated.
2015
2016 2017-07-10 Yao Qi <yao.qi@linaro.org>
2017
2018 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
2019 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
2020
2021 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
2022
2023 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
2024 unsetenv.
2025 * gnulib/aclocal.m4: Regenerate.
2026 * gnulib/config.in: Regenerate.
2027 * gnulib/configure: Regenerate.
2028 * gnulib/import/Makefile.am: Regenerate.
2029 * gnulib/import/Makefile.in: Regenerate.
2030 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2031 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2032 * gnulib/import/m4/environ.m4: New file.
2033 * gnulib/import/m4/setenv.m4: New file.
2034 * gnulib/import/setenv.c: New file.
2035 * gnulib/import/unsetenv.c: New file.
2036
2037 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
2038
2039 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
2040 address when op is DW_OP_addr.
2041
2042 2017-07-09 Tom Tromey <tom@tromey.com>
2043
2044 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
2045 check and apply to outer type.
2046
2047 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2048
2049 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
2050 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
2051 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
2052 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
2053
2054 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2055
2056 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
2057
2058 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2059
2060 * corelow.c (get_core_siginfo): Remove.
2061 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
2062 instead of get_core_siginfo.
2063 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
2064 * gdbarch.h: Re-generate.
2065 * gdbarch.c: Re-generate.
2066 * linux-tdep.c (linux_core_xfer_siginfo): New.
2067 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
2068
2069 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2070
2071 * corelow.c (thread_section_name): Move to ...
2072 * gdbcore.h (thread_section_name): ... here.
2073
2074 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2075
2076 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
2077 (struct siginfo32): New.
2078 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
2079 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
2080 via ptrace(PT_LWPINFO).
2081
2082 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2083
2084 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
2085 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
2086 (fbsd_get_siginfo_type): New.
2087 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
2088 (_initialize_fbsd_tdep): New.
2089
2090 2017-07-06 David Blaikie <dblaikie@gmail.com>
2091
2092 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
2093 a singular dwo_unit*) to support multiple CUs in the same way that
2094 multiple TUs are supported.
2095 (create_cus_hash_table): Replace create_dwo_cu with a function for
2096 parsing multiple CUs from a DWO file.
2097 (open_and_init_dwo_file): Use create_cus_hash_table rather than
2098 create_dwo_cu.
2099 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
2100 htab_find, rather than comparing the signature to a singleton CU in
2101 the dwo_file.
2102
2103 2017-07-06 Pedro Alves <palves@redhat.com>
2104
2105 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
2106
2107 2017-07-04 Pedro Alves <palves@redhat.com>
2108
2109 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
2110 * gdbtypes.h (TYPE_STATIC): Delete.
2111 (struct fn_field) <is_public, is_abstract, is_static, is_final,
2112 is_synchronized, is_native>: Delete.
2113 <dummy>: Bump.
2114 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
2115 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
2116 (TYPE_FN_FIELD_ABSTRACT): Delete.
2117
2118 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
2119
2120 * buffer.h (buffer_finish): Fix spelling mistakes.
2121
2122 2017-07-01 Eli Zaretskii <eliz@gnu.org>
2123
2124 * .dir-locals.el: Automatically switch to C-style comments in
2125 versions of Emacs that support the feature.
2126
2127 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
2128 Pedro Alves <palves@redhat.com>
2129
2130 PR cli/21688
2131 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
2132 (process_next_line): New variable 'inline_cmd'.
2133 Adjust 'if' clauses for "python", "compile" and "guile" to use
2134 'command_name_equals' and check for '!inline_cmd'.
2135
2136 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
2137
2138 PR cli/21688
2139 * cli/cli-script.c (command_name_equals_not_inline): New function.
2140 (process_next_line): Adjust 'if' clauses for "python", "compile"
2141 and "guile" to use command_name_equals_not_inline.
2142
2143 2017-06-29 Pedro Alves <palves@redhat.com>
2144
2145 * completer.c (expression_completer): Call
2146 linespec_location_completer instead of location_completer.
2147
2148 2017-06-29 Pedro Alves <palves@redhat.com>
2149
2150 * completer.c (expression_completer): Remove code that recomputes
2151 'text' from 'word'.
2152
2153 2017-06-29 Yao Qi <yao.qi@linaro.org>
2154
2155 * regformats/regdat.sh: Generate code with
2156 "ifndef IN_PROCESS_AGENT".
2157
2158 2017-06-28 Pedro Alves <palves@redhat.com>
2159
2160 * command.h: Include "common/scoped_restore.h".
2161
2162 2017-06-28 Yao Qi <yao.qi@linaro.org>
2163
2164 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
2165 instead of obstack_grow.
2166
2167 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
2168
2169 PR gdb/21337
2170 * symfile.c (reread_symbols): Call objfiles_changed just before
2171 read_symbols.
2172
2173 2017-06-27 Pedro Alves <palves@redhat.com>
2174
2175 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
2176 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
2177 (completion_list_add_symbol, completion_list_add_msymbol):
2178 ... these new functions.
2179 (add_symtab_completions)
2180 (default_make_symbol_completion_list_break_on_1): Adjust.
2181
2182 2017-06-27 Pedro Alves <palves@redhat.com>
2183
2184 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
2185 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
2186 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
2187 dtor.
2188 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
2189 'storage_obstack' field an auto_obstack. In-class initialize all
2190 non-bitfield fields. Make minsyms_read bool.
2191 * symfile.c (read_symbols): Adjust.
2192
2193 2017-06-27 Alan Hayward <alan.hayward@arm.com>
2194
2195 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
2196 (gdbsim_store_register): Likewise.
2197
2198 2017-06-27 Pedro Alves <palves@redhat.com>
2199
2200 * c-exp.y (name_obstack): Now an auto_obstack.
2201 (yylex): Use auto_obstack::clear.
2202 (c_parse): Use auto_obstack::clear instead of reinitializing and
2203 freeing the obstack.
2204 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
2205 * d-exp.y (name_obstack): Now an auto_obstack.
2206 (yylex): Use auto_obstack::clear.
2207 (d_parse): Use auto_obstack::clear instead of reinitializing and
2208 freeing the obstack.
2209 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
2210 auto_obstack.
2211 * dwarf2read.c (create_addrmap_from_index)
2212 (dwarf2_build_psymtabs_hard)
2213 (update_enumeration_type_from_children): Likewise.
2214 * gdb_obstack.h (auto_obstack): New type.
2215 * go-exp.y (name_obstack): Now an auto_obstack.
2216 (build_packaged_name): Use auto_obstack::clear.
2217 (go_parse): Use auto_obstack::clear instead of reinitializing and
2218 freeing the obstack.
2219 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
2220 auto_obstack.
2221 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
2222 * rust-exp.y (work_obstack): Now an auto_obstack.
2223 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
2224 reinitializing and freeing the obstack.
2225 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
2226 (host_char_to_target): Use auto_obstack.
2227 * utils.h (make_cleanup_obstack_free): Delete declaration.
2228 * valprint.c (generic_emit_char, generic_printstr): Use
2229 auto_obstack.
2230
2231 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
2232
2233 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
2234 thread.
2235 (darwin_init_thread_list): Don't update dummy thread.
2236 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
2237
2238 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
2239
2240 * record-full.c (netorder16): Remove.
2241
2242 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
2243
2244 * common/diagnostics.h: Define macros for GCC.
2245 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
2246 * common/vec.h: Include diagnostics.h.
2247 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
2248 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
2249 warning.
2250
2251 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
2252
2253 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
2254 New macro.
2255 * ada-lex.l: Ignore deprecated register warnings.
2256
2257 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
2258
2259 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
2260 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
2261
2262 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
2263
2264 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
2265 its own line.
2266
2267 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
2268
2269 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
2270
2271 2017-06-23 Alan Hayward <alan.hayward@arm.com>
2272
2273 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
2274 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
2275 (xtensa_register_read_masked): Likewise.
2276
2277 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
2278
2279 * common/environ.c (gdb_environ::unset): Update comment.
2280
2281 2017-06-22 Alan Hayward <alan.hayward@arm.com>
2282
2283 * python/py-unwind.c (pyuw_sniffer): Allocate space for
2284 registers.
2285
2286 2017-06-22 Alan Hayward <alan.hayward@arm.com>
2287
2288 * record-full.c (record_full_exec_insn): Use byte_vector.
2289
2290 2017-06-22 Yao Qi <yao.qi@linaro.org>
2291
2292 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
2293 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
2294
2295 2017-06-22 Alan Hayward <alan.hayward@arm.com>
2296
2297 * remote.c (cached_reg): Move from here...
2298 * regcache.h (cached_reg): ...to here.
2299 * python/py-unwind.c (struct reg_info): Remove.
2300 (cached_frame_info): Use cached_reg_t.
2301 (pyuw_prev_register): Likewise.
2302 (pyuw_sniffer): Use cached_reg_t and allocate registers.
2303 (pyuw_dealloc_cache): Free all registers.
2304
2305 2017-06-22 Pedro Alves <palves@redhat.com>
2306 Simon Marchi <simon.marchi@ericsson.com>
2307
2308 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
2309 warning.
2310 * common/diagnostics.h: New file.
2311
2312 2017-06-22 Pedro Alves <palves@redhat.com>
2313
2314 * common/agent.h: Add include guards.
2315
2316 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
2317
2318 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
2319 talk about addressable units instead of bytes.
2320
2321 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2322
2323 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
2324 of '::const_iterator'.
2325
2326 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2327
2328 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2329 'unittests/environ-selftests.c'.
2330 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
2331 * charset.c (find_charset_names): Declare object 'iconv_env'.
2332 Update code to use 'iconv_env' object. Remove call to
2333 'free_environ'.
2334 * common/environ.c: Include <utility>.
2335 (make_environ): Delete function.
2336 (free_environ): Delete function.
2337 (gdb_environ::clear): New function.
2338 (gdb_environ::operator=): New function.
2339 (gdb_environ::get): Likewise.
2340 (environ_vector): Delete function.
2341 (set_in_environ): Delete function.
2342 (gdb_environ::set): New function.
2343 (unset_in_environ): Delete function.
2344 (gdb_environ::unset): New function.
2345 (gdb_environ::envp): Likewise.
2346 * common/environ.h: Include <vector>.
2347 (struct gdb_environ): Delete; transform into...
2348 (class gdb_environ): ... this class.
2349 (free_environ): Delete prototype.
2350 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
2351 environ_vector): Likewise.
2352 * infcmd.c (run_command_1): Update code to call
2353 'envp' from 'gdb_environ' class.
2354 (environment_info): Update code to call methods from 'gdb_environ'
2355 class.
2356 (unset_environment_command): Likewise.
2357 (path_info): Likewise.
2358 (path_command): Likewise.
2359 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
2360 (inferior::inferior): Initialize 'environment' using the host's
2361 information.
2362 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
2363 Include "environ.h".
2364 (class inferior) <environment>: Change type from 'struct
2365 gdb_environ' to 'gdb_environ'.
2366 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
2367 methods from 'gdb_environ' class.
2368 * solib.c (solib_find_1): Likewise
2369 * unittests/environ-selftests.c: New file.
2370
2371 2017-06-20 Yao Qi <yao.qi@linaro.org>
2372
2373 * features/i386/i386-linux.xml: Exchange the order of including
2374 32bit-linux.xml and 32bit-sse.xml.
2375 * features/i386/i386-linux.c: Regenerated.
2376
2377 2017-06-20 Yao Qi <yao.qi@linaro.org>
2378
2379 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
2380 Delete copy ctor and assignment operator.
2381 (tdesc_type): Likewise.
2382 (tdesc_feature): Likewise.
2383 (tdesc_free_reg): Remove.
2384 (tdesc_create_reg): Use new.
2385 (tdesc_free_type): Remove.
2386 (tdesc_create_vector): Use new.
2387 (tdesc_create_union): Likewise.
2388 (tdesc_create_flags): Likewise.
2389 (tdesc_create_enum): Likewise.
2390 (tdesc_free_feature): Delete.
2391 (free_target_description): Use delete.
2392
2393 2017-06-19 John Baldwin <jhb@FreeBSD.org>
2394
2395 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
2396 registers.
2397
2398 2017-06-19 Pedro Alves <palves@redhat.com>
2399
2400 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
2401 after gdb::unlinker.
2402
2403 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
2404
2405 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
2406 gdb_environ to access an environment variable.
2407
2408 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2409
2410 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
2411 gdb_byte*.
2412
2413 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2414
2415 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
2416
2417 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2418
2419 * configure: Re-generate.
2420 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
2421
2422 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2423
2424 * configure: Re-generate.
2425 * warning.m4: Pass -Werror to compiler when checking for
2426 supported warning flags.
2427
2428 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2429
2430 * Makefile.in (COMPILE.pre): Add "-x c++".
2431
2432 2017-06-16 Alan Hayward <alan.hayward@arm.com>
2433 Pedro Alves <palves@redhat.com>
2434 Yao Qi <yao.qi@linaro.org>
2435
2436 * defs.h (RequireLongest): New.
2437 (extract_integer): Declare function template.
2438 (extract_signed_integer): Remove the declaration, but define it
2439 static inline.
2440 (extract_unsigned_integer): Likewise.
2441 (store_integer): Declare function template.
2442 (store_signed_integer): Remove the declaration, but define it
2443 static inline.
2444 (store_unsigned_integer): Likewise.
2445 * findvar.c (extract_integer): New function template.
2446 (extract_signed_integer): Remove.
2447 (extract_unsigned_integer): Remove.
2448 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
2449 instantiations.
2450 (store_integer): New function template.
2451 (store_signed_integer): Remove.
2452 (store_unsigned_integer): Remove.
2453 (store_integer): Explicit instantiations.
2454 * regcache.c (regcache_raw_read_signed): Update.
2455 (regcache::raw_read): New function.
2456 (regcache::raw_read_signed): Remove.
2457 (regcache::raw_read_unsigned): Remove.
2458 (regcache_raw_read_unsigned): Update.
2459 (regcache_raw_write_unsigned): Update.
2460 (regcache::raw_write_signed): Remove.
2461 (regcache::raw_write): New function.
2462 (regcache_cooked_read_signed): Update.
2463 (regcache::raw_write_unsigned): Remove.
2464 (regcache::cooked_read_signed): Remove.
2465 (regcache_cooked_read_unsigned): Update.
2466 (regcache::cooked_read_unsigned): Remove.
2467 (regcache_cooked_write_signed): Update.
2468 (regcache_cooked_write_unsigned): Update.
2469 * regcache.h (regcache) <raw_read_signed>: Remove.
2470 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
2471 <raw_read, raw_write>: New.
2472 <cooked_read_signed, cooked_write_signed>: Remove.
2473 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
2474 <cooked_read, cooked_write>: New.
2475 * sh64-tdep.c (sh64_pseudo_register_read): Update.
2476 (sh64_pseudo_register_write): Update.
2477
2478 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
2479
2480 * arc-tdep.c (arc_disassembler_options): New variable.
2481 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
2482 of default_print_insn.
2483 (arc_delayed_print_insn): Set info->section when needed,
2484 use default_print_insn to retrieve a disassembler.
2485
2486 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
2487
2488 PR gdb/21574
2489 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
2490 to mention $SHELL and startup-with-shell.
2491
2492 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2493
2494 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
2495
2496 2017-06-14 Yao Qi <yao.qi@linaro.org>
2497
2498 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
2499 default_print_insn instead of print_insn_aarch64.
2500 * arm-tdep.c (gdb_print_insn_arm): Call
2501 default_print_insn instead of print_insn_big_arm
2502 and print_insn_little_arm.
2503 * i386-tdep.c (i386_print_insn): Call default_print_insn
2504 instead of print_insn_i386.
2505 * ia64-tdep.c (ia64_print_insn): Call
2506 default_print_insn instead of print_insn_ia64.
2507 * mips-tdep.c (gdb_print_insn_mips): Call
2508 default_print_insn instead of print_insn_big_mips
2509 and print_insn_little_mips.
2510 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
2511 instead of print_insn_spu.
2512
2513 2017-06-14 Pedro Alves <palves@redhat.com>
2514
2515 * ada-lang.c: Include "common/byte-vector.h".
2516 (ada_value_primitive_packed_val): Use gdb::byte_vector.
2517 * charset.c (wchar_iterator::iterate): Resize the vector instead
2518 of reserving it.
2519 * common/byte-vector.h: Include "common/def-vector.h".
2520 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
2521 * cli/cli-dump.c: Include "common/byte-vector.h".
2522 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
2523 * common/byte-vector.h: New file.
2524 * common/def-vector.h: New file.
2525 * common/default-init-alloc.h: New file.
2526 * dwarf2loc.c: Include "common/byte-vector.h".
2527 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
2528 instead of reserving it.
2529 * dwarf2read.c: Include "common/byte-vector.h".
2530 (data_buf::m_vec): Now a gdb::byte_vector.
2531 * gdb_regex.c: Include "common/def-vector.h".
2532 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
2533 * mi/mi-main.c: Include "common/byte-vector.h".
2534 (mi_cmd_data_read_memory): Use gdb::byte_vector.
2535 * printcmd.c: Include "common/byte-vector.h".
2536 (print_scalar_formatted): Use gdb::byte_vector.
2537 * valprint.c: Include "common/byte-vector.h".
2538 (maybe_negate_by_bytes, print_decimal_chars): Use
2539 gdb::byte_vector.
2540
2541 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
2542
2543 * darwin-nat.c: Include "nat/fork-inferior.h".
2544
2545 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
2546
2547 * configure.nat: Factor out Darwin bits that are not
2548 architecture-specific. Add fork-inferior.o.
2549
2550 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
2551
2552 * configure.nat: Factor out AIX bits that are not
2553 architecture-specific. Add fork-inferior.o.
2554
2555 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2556
2557 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
2558 (read_pieced_value, write_pieced_value): ...here. Reduce to
2559 wrappers that just call rw_pieced_value.
2560
2561 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2562
2563 * dwarf2loc.c (write_pieced_value): When writing the data for a
2564 memory piece, use write_memory_with_notification instead of
2565 write_memory.
2566
2567 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2568
2569 * valops.c (read_value_memory): Change embedded_offset to
2570 represent a bit offset instead of a byte offset.
2571 * value.h (read_value_memory): Adjust comment.
2572
2573 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2574
2575 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
2576 dest_offset_bits and source_offset_bits.
2577 (write_pieced_value): Likewise.
2578
2579 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2580
2581 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
2582 given by DW_OP_bit_piece.
2583 (write_pieced_value): Likewise.
2584
2585 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2586
2587 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
2588 some other preparations to the places where sufficient information
2589 is available.
2590 (write_pieced_value): Likewise.
2591
2592 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2593
2594 * dwarf2loc.c (bits_to_bytes): New function.
2595 (read_pieced_value): Fix offset calculations for register pieces
2596 on big-endian targets.
2597 (write_pieced_value): Likewise.
2598
2599 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2600
2601 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
2602 (write_pieced_value): Likewise.
2603
2604 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2605
2606 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
2607 transfer the source value's least significant bits, instead of its
2608 lowest-addressed ones. Rename type_len to max_offset.
2609 (read_pieced_value): Mirror above changes to write_pieced_value as
2610 applicable.
2611
2612 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2613
2614 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
2615 truncate full bytes from dest_offset_bits before using it as an
2616 offset into the buffer.
2617
2618 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2619
2620 * dwarf2loc.c (write_pieced_value): Include transfer size in
2621 byte-wise check.
2622
2623 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2624
2625 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
2626 calculation of this_size.
2627
2628 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2629
2630 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
2631 when targeting a bit-field.
2632 (write_pieced_value): Likewise.
2633
2634 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2635
2636 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
2637 (allocate_piece_closure): Drop addr_size parameter.
2638 (dwarf2_evaluate_loc_desc_full): Adjust call to
2639 allocate_piece_closure.
2640
2641 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2642
2643 PR gdb/21226
2644 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
2645 the LSB end, independent of endianness.
2646
2647 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2648
2649 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
2650 size capping.
2651
2652 2017-06-13 Yao Qi <yao.qi@linaro.org>
2653
2654 * mips-linux-nat.c: Move include features/mips*-linux.c to
2655 mips-linux-tdep.c.
2656 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
2657 to mips-linux-tdep.c.
2658 * mips-linux-tdep.c: Include features/mips*-linux.c
2659 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
2660 functions.
2661 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
2662 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
2663 (tdesc_mips64_dsp_linux): Declare.
2664
2665 2017-06-12 Tom Tromey <tom@tromey.com>
2666
2667 * valprint.h (val_print_type_code_int): Remove.
2668 * valprint.c (generic_val_print_int): Always call
2669 val_print_scalar_formatted.
2670 (val_print_type_code_int): Remove.
2671 * printcmd.c (print_scalar_formatted): Handle options->format==0.
2672 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
2673 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
2674 * ada-valprint.c (ada_val_print_num): Use
2675 val_print_scalar_formatted.
2676
2677 2017-06-12 Tom Tromey <tom@tromey.com>
2678
2679 * printcmd.c (print_scalar_formatted): Unify the two switches.
2680 Don't convert scalars to LONGEST.
2681
2682 2017-06-12 Tom Tromey <tom@tromey.com>
2683
2684 PR exp/16225:
2685 * valprint.h (print_decimal_chars): Update.
2686 * valprint.c (maybe_negate_by_bytes): New function.
2687 (print_decimal_chars): Add "is_signed" argument.
2688 * printcmd.c (print_scalar_formatted): Update.
2689
2690 2017-06-12 Tom Tromey <tom@tromey.com>
2691
2692 PR exp/16225:
2693 * valprint.h (print_binary_chars, print_hex_chars): Update.
2694 * valprint.c (val_print_type_code_int): Update.
2695 (print_binary_chars): Add "zero_pad" argument.
2696 (emit_octal_digit): New function.
2697 (print_octal_chars): Don't zero-pad.
2698 (print_decimal_chars): Likewise.
2699 (print_hex_chars): Add "zero_pad" argument.
2700 * sh64-tdep.c (sh64_do_fp_register): Update.
2701 * regcache.c (regcache::dump): Update.
2702 * printcmd.c (print_scalar_formatted): Update.
2703 * infcmd.c (default_print_one_register_info): Update.
2704
2705 2017-06-12 Pedro Alves <palves@redhat.com>
2706 Alan Hayward <alan.hayward@arm.com>
2707
2708 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
2709 (mips_eabi_push_dummy_call): Rename local 'regsize' to
2710 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
2711 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
2712 Assert that abi_regsize bytes fit in 'ref_valbuf'.
2713
2714 2017-06-12 Pedro Alves <palves@redhat.com>
2715
2716 * dwarf2read.c (mapped_symtab::data): Now a vector of
2717 symtab_index_entry instead of vector of
2718 std::unique_ptr<symtab_index_entry>. All users adjusted to check
2719 whether an element's name is NULL instead of checking whether the
2720 element itself is NULL.
2721 (find_slot): Change return type. Adjust.
2722 (hash_expand, , add_index_entry, uniquify_cu_indices)
2723 (write_hash_table): Adjust.
2724
2725 2017-06-12 Pedro Alves <palves@redhat.com>
2726
2727 * dwarf2read.c (recursively_count_psymbols): New function.
2728 (write_psymtabs_to_index): Call it to compute number of psyms and
2729 pass estimate size of psyms_seen to unordered_set's ctor.
2730
2731 2017-06-12 Pedro Alves <palves@redhat.com>
2732
2733 * dwarf2read.c (write_hash_table): Check if key already exists
2734 before emplacing.
2735
2736 2017-06-12 Pedro Alves <palves@redhat.com>
2737
2738 * dwarf2read.c (data_buf::append_space): Rename to...
2739 (data_buf::grow): ... this, and make private. Adjust all callers.
2740 (data_buf::append_uint): New method.
2741 (add_address_entry, write_one_signatured_type)
2742 (write_psymtabs_to_index): Use it.
2743
2744 2017-06-12 Pedro Alves <palves@redhat.com>
2745
2746 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
2747 (file_write (FILE *, const std::vector<Elem>&)): Delete.
2748 (data_buf::file_write): Call ::fwrite directly.
2749
2750 2017-06-12 Pedro Alves <palves@redhat.com>
2751
2752 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
2753 std::vector::erase.
2754
2755 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
2756
2757 Code cleanup: C++ify .gdb_index producer.
2758 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
2759 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
2760 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
2761 (create_strtab, add_string): Remove.
2762 (file_write, data_buf): New.
2763 (struct symtab_index_entry): Use std::vector for cu_indices.
2764 (struct mapped_symtab): Use std::vector for data.
2765 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
2766 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
2767 Remove.
2768 (find_slot): Change return type. Update it to the new data structures.
2769 (hash_expand, add_index_entry): Update it to the new data structures.
2770 (offset_type_compare): Remove.
2771 (uniquify_cu_indices): Update it to the new data structures.
2772 (c_str_view, c_str_view_hasher, vector_hasher): New.
2773 (add_indices_to_cpool): Remove.
2774 (write_hash_table): Update it to the new data structures.
2775 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
2776 (eq_psymtab_cu_index): Remove.
2777 (psym_index_map): New typedef.
2778 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
2779 reference and std::unordered_map for cu_index_htab.
2780 (add_address_entry, add_address_entry_worker, write_address_map)
2781 (write_psymbols): Update it to the new data structures.
2782 (write_obstack): Remove.
2783 (struct signatured_type_index_data): Change types_list to a data_buf
2784 reference and psyms_seen to a std::unordered_set reference.
2785 (write_one_signatured_type, recursively_write_psymbols)
2786 (write_psymtabs_to_index): Update it to the new data structures.
2787
2788 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
2789
2790 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
2791 separate-debug-file commands.
2792 * symfile.h (separate_debug_file_debug): New global.
2793 * symfile.c (separate_debug_file_debug): New global.
2794 (separate_debug_file_exists, find_separate_debug_file): Add
2795 debug output.
2796 (_initialize_symfile): Add "set debug separate-debug-file"
2797 command.
2798 * build-id.c (build_id_to_debug_bfd,
2799 find_separate_debug_file_by_buildid): Add debug output.
2800
2801 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2802
2803 * gdbarch.sh (displaced_step_free_closure): Remove.
2804 * gdbarch.h, gdbarch.c: Re-generate.
2805 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
2806 displaced_step_free_closure.
2807 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
2808 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
2809 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
2810 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
2811 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
2812 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
2813 * arch-utils.h (simple_displaced_step_free_closure): Remove.
2814 * arch-utils.c (simple_displaced_step_free_closure): Remove.
2815 * infrun.c (displaced_step_clear): Call xfree instead of
2816 gdbarch_displaced_step_free_closure.
2817
2818 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
2819
2820 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
2821 NULL".
2822
2823 2017-06-08 Alan Hayward <alan.hayward@arm.com>
2824
2825 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
2826 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
2827 (mn10300_push_dummy_call): Likewise.
2828
2829 2017-06-08 Alan Hayward <alan.hayward@arm.com>
2830
2831 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
2832
2833 2017-06-08 Alan Hayward <alan.hayward@arm.com>
2834
2835 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
2836
2837 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2838
2839 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
2840 able to start inferiors using a shell.
2841 (New remote packets): Announce new packet "QStartupWithShell".
2842 * remote.c: Add PACKET_QStartupWithShell.
2843 (extended_remote_create_inferior): Handle new
2844 PACKET_QStartupWithShell.
2845 (remote_protocol_features) <QStartupWithShell>: New entry for
2846 PACKET_QStartupWithShell.
2847 (_initialize_remote): Call "add_packet_config_cmd" for
2848 QStartupShell.
2849
2850 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2851 Pedro Alves <palves@redhat.com>
2852
2853 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
2854 and "nat/fork-inferior.h".
2855 * common/common-inferior.h: New file, with contents from
2856 "gdb/inferior.h".
2857 * commom/common-utils.c: Include "common-utils.h".
2858 (stringify_argv): New function.
2859 * common/common-utils.h (stringify_argv): New prototype.
2860 * configure.nat: Add "fork-inferior.o" as a dependency for
2861 "*linux*", "fbsd*" and "nbsd*" hosts.
2862 * corefile.c (get_exec_file): Update comment.
2863 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
2864 instead of "startup_inferior".
2865 (darwin_create_inferior): Call "add_thread_silent" after
2866 "fork_inferior".
2867 * fork-child.c: Cleanup unnecessary includes.
2868 (SHELL_FILE): Move to "common/common-fork-child.c".
2869 (environ): Likewise.
2870 (exec_wrapper): Initialize.
2871 (get_exec_wrapper): New function.
2872 (breakup_args): Move to "common/common-fork-child.c"; rename to
2873 "breakup_args_for_exec".
2874 (escape_bang_in_quoted_argument): Move to
2875 "common/common-fork-child.c".
2876 (saved_ui): New variable.
2877 (prefork_hook): New function.
2878 (postfork_hook): Likewise.
2879 (postfork_child_hook): Likewise.
2880 (gdb_startup_inferior): Likewise.
2881 (fork_inferior): Move to "common/common-fork-child.c". Update
2882 function to support gdbserver.
2883 (startup_inferior): Likewise.
2884 * gdbcore.h (get_exec_file): Remove declaration.
2885 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
2886 instead of "startup_inferior". Call "add_thread_silent" after
2887 "fork_inferior".
2888 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
2889 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
2890 instead of "startup_inferior". Call "add_thread_silent" after
2891 "fork_inferior".
2892 * inferior.h: Include "common-inferior.h".
2893 (trace_start_error): Move to "common/common-utils.h".
2894 (trace_start_error_with_name): Likewise.
2895 (fork_inferior): Move prototype to "nat/fork-inferior.h".
2896 (startup_inferior): Likewise.
2897 (gdb_startup_inferior): New prototype.
2898 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
2899 * nat/fork-inferior.h: New file.
2900 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
2901 instead of "startup_inferior". Call "add_thread_silent" after
2902 "fork_inferior".
2903 * target.h (target_terminal_init): Move prototype to
2904 "target/target.h".
2905 (target_terminal_inferior): Likewise.
2906 (target_terminal_ours): Likewise.
2907 * target/target.h (target_terminal_init): New prototype, moved
2908 from "target.h".
2909 (target_terminal_inferior): Likewise.
2910 (target_terminal_ours): Likewise.
2911 * utils.c (gdb_flush_out_err): New function.
2912
2913 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2914
2915 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
2916 * common/common-gdbthread.h: New file, with parts from
2917 "gdb/gdbthread.h".
2918 * gdbthread.h: Include "common-gdbthread.h".
2919 (switch_to_thread): Moved to "common/common-gdbthread.h".
2920
2921 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2922
2923 * Makefile.in (SFILES): Add "common/job-control.c".
2924 (HFILES_NO_SRCDIR): Add "common/job-control.h".
2925 (COMMON_OBS): Add "job-control.o".
2926 * common/job-control.c: New file, with contents from
2927 "gdb/inflow.c".
2928 * common/job-control.h: New file, with contents from "terminal.h".
2929 * fork-child.c: Include "job-control.h".
2930 * inflow.c: Include "job-control.h".
2931 (gdb_setpgid): Move to "common/common-inflow.c".
2932 (_initialize_inflow): Move setting of "job_control" to
2933 "handle_job_control".
2934 * terminal.h (job_control): Moved to "common/common-terminal.h".
2935 (gdb_setpgid): Likewise.
2936 * top.c: Include "job_control.h".
2937 * utils.c: Likewise.
2938 (job_control): Moved to "job-control.c".
2939
2940 2017-06-07 Pedro Alves <palves@redhat.com>
2941
2942 * Makefile.in (SFILES): Add gdb_regex.c.
2943 (COMMON_OBS): Add gdb_regex.o.
2944 * ada-lang.c (ada_add_standard_exceptions)
2945 (ada_add_exceptions_from_frame, name_matches_regex)
2946 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
2947 parameter type to compiled_regex. Adjust.
2948 (ada_exceptions_list): Use compiled_regex.
2949 * break-catch-throw.c (exception_catchpoint::pattern): Now a
2950 std::unique_ptr<compiled_regex>.
2951 (exception_catchpoint::~exception_catchpoint): Remove regfree
2952 call.
2953 (check_status_exception_catchpoint): Adjust to use compiled_regex.
2954 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
2955 * breakpoint.c (solib_catchpoint::compiled): Now a
2956 std::unique_ptr<compiled_regex>.
2957 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
2958 (check_status_catch_solib): Adjust to use compiled_regex.
2959 (add_solib_catchpoint): Adjust to use compiled_regex.
2960 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
2961 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
2962 compiled_regex reference. Adjust to use it.
2963 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
2964 declaration. Include "gdb_regex.h".
2965 (apropos_cmd): Change regex parameter to compiled_regex reference.
2966 * gdb_regex.c: New file.
2967 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
2968 declarations.
2969 (class compiled_regex): New.
2970 * linux-tdep.c: Include "common/gdb_optional.h".
2971 (struct mapping_regexes): New, factored out from
2972 mapping_is_anonymous_p, and adjusted to use compiled_regex.
2973 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
2974 gdb::optional and remove cleanups. Adjust to compiled_regex.
2975 * probe.c: Include "common/gdb_optional.h".
2976 (collect_probes): Use compiled_regex and gdb::optional and remove
2977 cleanups.
2978 * skip.c: Include "common/gdb_optional.h".
2979 (skiplist_entry::compiled_function_regexp): Now a
2980 gdb::optional<compiled_regex>.
2981 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
2982 (free_skiplist_entry): Remove regfree call.
2983 (compile_skip_regexp, skip_rfunction_p): Adjust to use
2984 compiled_regex and gdb::optional.
2985 * symtab.c: Include "common/gdb_optional.h".
2986 (search_symbols): Use compiled_regex and gdb::optional.
2987 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
2988 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
2989 to gdb_regex.c.
2990
2991 2017-06-07 Alan Hayward <alan.hayward@arm.com>
2992
2993 * regcache.c (regcache::save): Avoid buffer use.
2994 (regcache::dump): Likewise.
2995
2996 2017-06-07 Alan Hayward <alan.hayward@arm.com>
2997
2998 * sh-tdep.c (sh_pseudo_register_read): Remove
2999 MAX_REGISTER_SIZE.
3000 (sh_pseudo_register_write): Likewise.
3001 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
3002 (sh64_pseudo_register_write): Likewise
3003
3004 2017-06-07 Alan Hayward <alan.hayward@arm.com>
3005
3006 * aarch64-tdep.c (aarch64_store_return_value): Use
3007 V_REGISTER_SIZE.
3008 (aarch64_pseudo_read_value): Likewise.
3009 (aarch64_pseudo_write): Likewise.
3010
3011 2017-06-06 Yao Qi <yao.qi@linaro.org>
3012
3013 * regformats/regdef.h (set_register_cache): Remove the
3014 declaration.
3015
3016 2017-06-06 Alan Hayward <alan.hayward@arm.com>
3017
3018 * frame.c (frame_unwind_register_signed): Use
3019 frame_unwind_register_value.
3020
3021 2017-06-06 Pedro Alves <palves@redhat.com>
3022
3023 PR breakpoints/21553
3024 * breakpoint.c (create_breakpoints_sal_default)
3025 (init_breakpoint_sal, create_breakpoint_sal): Use
3026 gdb::unique_xmalloc_ptr for string parameters.
3027 (create_breakpoint): Constify 'extra_string' and 'cond_string'
3028 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
3029 (base_breakpoint_create_breakpoints_sal)
3030 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
3031 (strace_marker_create_breakpoints_sal)
3032 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
3033 string parameters.
3034 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
3035 gdb::unique_xmalloc_ptr for string parameters.
3036 (create_breakpoint): Constify 'extra_string' and 'cond_string'
3037 parameters.
3038
3039 2017-06-06 Alan Hayward <alan.hayward@arm.com>
3040
3041 * alpha-tdep.c (alpha_register_to_value): Use
3042 get_frame_register_value.
3043 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
3044
3045 2017-06-06 Alan Hayward <alan.hayward@arm.com>
3046
3047 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
3048 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
3049 (ia64_value_to_register): Likewise.
3050 (ia64_extract_return_value): Likewise.
3051 (ia64_store_return_value): Likewise.
3052 (ia64_push_dummy_call): Likewise.
3053
3054 2017-06-04 Joel Brobecker <brobecker@adacore.com>
3055
3056 GDB 8.0 released.
3057
3058 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
3059
3060 * x86-linux-nat.c (struct arch_lwp_info): Remove.
3061
3062 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
3063
3064 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
3065 parameter.
3066 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
3067
3068 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
3069
3070 * event-loop.c (poll_timers): Unallocate timer using delete
3071 instead of xfree.
3072
3073 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
3074
3075 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
3076 (struct breakpoint) <~breakpoint>: New.
3077 (struct watchpoint): Inherit from breakpoint.
3078 <~watchpoint>: New.
3079 <base>: Remove.
3080 (struct tracepoint): Inherit from breakpoint.
3081 <base>: Remove.
3082 * breakpoint.c (longjmp_breakpoint_ops): Remove.
3083 (struct longjmp_breakpoint): Inherit from breakpoint.
3084 <~longjmp_breakpoint>: New.
3085 <base>: Remove.
3086 (new_breakpoint_from_type): Remove casts.
3087 (watchpoint_in_thread_scope): Remove reference to base field.
3088 (watchpoint_del_at_next_stop): Likewise.
3089 (update_watchpoint): Likewise.
3090 (watchpoint_check): Likewise.
3091 (bpstat_check_watchpoint): Likewise.
3092 (set_longjmp_breakpoint): Likewise.
3093 (struct fork_catchpoint): Inherit from breakpoint.
3094 <base>: Remove.
3095 (struct solib_catchpoint): Inherit from breakpoint.
3096 <~solib_catchpoint>: New.
3097 <base>: Remove.
3098 (dtor_catch_solib): Change to ...
3099 (solib_catchpoint::~solib_catchpoint): ... this.
3100 (breakpoint_hit_catch_solib): Remove reference to base field.
3101 (add_solib_catchpoint): Likewise.
3102 (create_fork_vfork_event_catchpoint): Likewise.
3103 (struct exec_catchpoint): Inherit from breakpoint.
3104 <~exec_catchpoint>: New.
3105 <base>: Remove.
3106 (dtor_catch_exec): Change to ...
3107 (exec_catchpoint::~exec_catchpoint): ... this.
3108 (dtor_watchpoint): Change to ...
3109 (watchpoint::~watchpoint): ... this.
3110 (watch_command_1): Remove reference to base field.
3111 (catch_exec_command_1): Likewise.
3112 (base_breakpoint_dtor): Change to ...
3113 (breakpoint::~breakpoint): ... this.
3114 (base_breakpoint_ops): Remove dtor field value.
3115 (longjmp_bkpt_dtor): Change to ...
3116 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
3117 (strace_marker_create_breakpoints_sal): Remove reference to base
3118 field.
3119 (delete_breakpoint): Don't manually call breakpoint destructor.
3120 (create_tracepoint_from_upload): Remove reference to base field.
3121 (trace_pass_set_count): Likewise.
3122 (initialize_breakpoint_ops): Don't initialize
3123 momentary_breakpoint_ops, don't set dtors.
3124 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
3125 <~ada_catchpoint>: New.
3126 <base>: Remove.
3127 (create_excep_cond_exprs): Remove reference to base field.
3128 (dtor_exception): Change to ...
3129 (ada_catchpoint::~ada_catchpoint): ... this.
3130 (dtor_catch_exception): Remove.
3131 (dtor_catch_exception_unhandled): Remove.
3132 (dtor_catch_assert): Remove.
3133 (create_ada_exception_catchpoint): Remove reference to base
3134 field.
3135 (initialize_ada_catchpoint_ops): Don't set dtors.
3136 * break-catch-sig.c (struct signal_catchpoint): Inherit from
3137 breakpoint.
3138 <~signal_catchpoint>: New.
3139 <base>: Remove.
3140 (signal_catchpoint_dtor): Change to ...
3141 (signal_catchpoint::~signal_catchpoint): ... this.
3142 (create_signal_catchpoint): Remove reference to base field.
3143 (initialize_signal_catchpoint_ops): Don't set dtor.
3144 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
3145 from breakpoint.
3146 <~syscall_catchpoint>: New.
3147 <base>: Remove.
3148 (dtor_catch_syscall): Change to ...
3149 (syscall_catchpoint::~syscall_catchpoint): ... this.
3150 (create_syscall_event_catchpoint): Remove reference to base
3151 field.
3152 (initialize_syscall_catchpoint_ops): Don't set dtor.
3153 * break-catch-throw.c (struct exception_catchpoint): Inherit
3154 from breakpoint.
3155 <~exception_catchpoint>: New.
3156 <base>: Remove.
3157 (dtor_exception_catchpoint): Change to ...
3158 (exception_catchpoint::~exception_catchpoint): ... this.
3159 (handle_gnu_v3_exceptions): Remove reference to base field.
3160 (initialize_throw_catchpoint_ops): Don't set dtor.
3161 * ctf.c (ctf_get_traceframe_address): Remove reference to base
3162 field.
3163 * remote.c (remote_get_tracepoint_status): Likewise.
3164 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
3165 * tracefile.c (tracefile_fetch_registers): Likewise.
3166 * tracepoint.c (actions_command): Likewise.
3167 (validate_actionline): Likewise.
3168 (tfind_1): Likewise.
3169 (get_traceframe_location): Likewise.
3170 (find_matching_tracepoint_location): Likewise.
3171 (parse_tracepoint_status): Likewise.
3172 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
3173
3174 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
3175
3176 * breakpoint.c (struct longjmp_breakpoint): New struct.
3177 (is_tracepoint_type): Change return type to bool.
3178 (is_longjmp_type): New function.
3179 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
3180 (set_raw_breakpoint_without_location): Use
3181 new_breakpoint_from_type.
3182 (set_raw_breakpoint): Likewise.
3183
3184 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
3185
3186 * breakpoint.c (new_breakpoint_from_type): New function.
3187 (create_breakpoint_sal): Use new_breakpoint_from_type and
3188 unique_ptr.
3189 (create_breakpoint): Likewise.
3190
3191 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
3192
3193 * memattr.c (mem_info_command): Rename to ...
3194 (info_mem_command): ... this.
3195 (mem_enable_command): Rename to ...
3196 (enable_mem_command): ... this.
3197 (mem_disable_command): Rename to ...
3198 (disable_mem_command): ... this.
3199 (mem_delete_command): Rename to ...
3200 (delete_mem_command): ... this.
3201 (_initialize_mem): Adjust function names.
3202
3203 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
3204
3205 * btrace.c (handle_pt_insn_events): New.
3206 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
3207 STATUS. Split into this and ...
3208 (handle_pt_insn_event_flags): ... this.
3209
3210 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
3211
3212 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
3213 and struct pt_insn.resynced.
3214 * configure: Regenerated.
3215 * config.in: Regenerated.
3216
3217 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3218
3219 * btrace.c (ftrace_find_call_by_number): New function.
3220 (ftrace_new_function): Store objects, not pointers.
3221 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
3222 ftrace_new_gap, ftrace_update_function,
3223 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
3224 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
3225 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
3226 btrace_ends_with_single_insn, btrace_call_get): Account for
3227 btrace_thread_info::functions now storing objects.
3228 * btrace.h (struct btrace_thread_info): Add constructor.
3229 (struct btrace_thread_info) <functions>: Make std::vector.
3230 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
3231 Initialize with default values.
3232 * record-btrace.c (record_btrace_frame_sniffer): Account for
3233 btrace_thread_info::functions now storing objects.
3234
3235 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3236
3237 * btrace.c: Remove typedef bfun_s.
3238 (ftrace_new_gap): Directly add gaps to the list of gaps.
3239 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
3240 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
3241 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
3242 instead of gdb VEC.
3243
3244 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3245
3246 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
3247 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
3248 with btrace_thread_info::next_segment and
3249 btrace_thread_info::prev_segment.
3250 * btrace.h: Remove struct btrace_func_link.
3251 (struct btrace_function): Replace pair of function segment pointers
3252 with pair of indices.
3253 * python/py-record-btrace.c (btpy_call_prev_sibling,
3254 btpy_call_next_sibling): Replace references to
3255 btrace_thread_info::segment with btrace_thread_info::next_segment and
3256 btrace_thread_info::prev_segment.
3257 * record-btrace.c (record_btrace_frame_this_id): Use
3258 btrace_find_call_by_number.
3259
3260 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3261
3262 * btrace.c (ftrace_new_function, ftrace_fixup_level,
3263 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
3264 btrace_insn_next, btrace_insn_prev): Remove references to
3265 btrace_thread_info::flow.
3266 * btrace.h (struct btrace_function): Remove FLOW.
3267
3268 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3269
3270 * btrace.c (ftrace_find_call_by_number): New function.
3271 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
3272 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
3273 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
3274 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
3275 index.
3276 * btrace.h (struct btrace_function): Turn UP into an index.
3277 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
3278 as an index.
3279 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
3280 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
3281 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
3282
3283 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3284
3285 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
3286 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
3287 ftrace_update_function, ftrace_compute_global_level_offset,
3288 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
3289 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
3290 btrace_insn_end, btrace_is_empty): Remove references to
3291 btrace_thread_info::begin and btrace_thread_info::end.
3292 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
3293 (struct btrace_thread_info) <functions>: Adjust comment.
3294 * record-btrace.c (record_btrace_start_replaying): Remove reference to
3295 btrace_thread_info::begin.
3296
3297 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3298
3299 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
3300 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
3301 ftrace_update_function): Remove arguments that implicitly were always
3302 BTINFO->END.
3303 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
3304 Don't pass BTINFO->END.
3305
3306 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3307
3308 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
3309 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
3310 btrace_find_insn_by_number): Replace function segment pointer with
3311 index.
3312 (btrace_insn_cmp): Simplify.
3313 * btrace.h: (struct btrace_insn_iterator) Rename index to
3314 insn_index. Replace function segment pointer with index into function
3315 segment vector.
3316 * record-btrace.c (record_btrace_call_history): Replace function
3317 segment pointer use with index.
3318 (record_btrace_frame_sniffer): Retrieve function call segment through
3319 vector.
3320 (record_btrace_set_replay): Remove defunc't safety check.
3321
3322 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3323
3324 * btrace.c (btrace_ends_with_single_insn): New function.
3325 (btrace_call_get, btrace_call_number, btrace_call_begin,
3326 btrace_call_end, btrace_call_next, btrace_call_prev,
3327 btrace_find_call_by_number): Use index into call segment vector
3328 instead of pointer.
3329 (btrace_call_cmp): Simplify.
3330 * btrace.h (struct btrace_call_iterator): Replace function call segment
3331 pointer with index into vector.
3332 * record-btrace.c (record_btrace_call_history): Use index instead of
3333 pointer.
3334
3335 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3336
3337 * btrace.c (btrace_insn_begin, btrace_insn_end,
3338 btrace_find_insn_by_number): Add btinfo to iterator.
3339 * btrace.h (struct btrace_insn_iterator): Add btinfo.
3340
3341 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3342
3343 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
3344 and save pointers directly.
3345 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
3346 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
3347 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
3348 changed signature of functions.
3349 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
3350 (btrace_fetch): Remove code that adds btrace_function pointers to
3351 vector of btrace_functions.
3352 (btrace_clear): Simplify freeing vector of btrace_functions.
3353
3354 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3355
3356 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
3357 Replace VEC_* with std::vector functions.
3358 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
3359 (struct btrace_thread_info)<functions>: Change type to std::vector.
3360
3361 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
3362
3363 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
3364 "Removed targets and native configurations" up. Merge duplicate
3365 "New commands" sub-sections. Add "New options" sub-sections.
3366
3367 2017-05-26 Alan Hayward <alan.hayward@arm.com>
3368
3369 * defs.h (copy_integer_to_size): New declaration.
3370 * findvar.c (copy_integer_to_size): New function.
3371 (do_cint_test): New selftest function.
3372 (copy_integer_to_size_test): Likewise.
3373 (_initialize_findvar): Likewise.
3374 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
3375 (mips_fbsd_collect_reg): Use raw_collect_integer.
3376 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
3377 (mips64_fill_gregset): Use raw_collect_integer
3378 (mips64_fill_fpregset): Use raw_supply_integer.
3379 * regcache.c (regcache::raw_supply_integer): New function.
3380 (regcache::raw_collect_integer): Likewise.
3381 * regcache.h: (regcache::raw_supply_integer): New declaration.
3382 (regcache::raw_collect_integer): Likewise.
3383
3384 2017-05-24 Yao Qi <yao.qi@linaro.org>
3385
3386 * Makefile.in (SFILES): Add gdbarch-selftests.c.
3387 (COMMON_OBS): Add gdbarch-selftests.o.
3388 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
3389 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
3390 * gdbarch-selftests.c: New file.
3391 * regcache.h (regcache) <~regcache>: Mark it virtual if
3392 GDB_SELF_TEST.
3393 <raw_write>: Likewise.
3394
3395 2017-05-24 Yao Qi <yao.qi@linaro.org>
3396
3397 * regcache.c (current_regcache): Change it to
3398 regcache::current_regcache.
3399 (regcache_observer_target_changed): Update.
3400 (regcache_thread_ptid_changed): Make it a regcache static
3401 method.
3402 (regcache_thread_ptid_changed): Update.
3403 (class regcache_access): New.
3404 (current_regcache_test): Update.
3405 (_initialize_regcache): Update.
3406 * regcache.h: Include forward_list.
3407 (regcache): Declare regcache_thread_ptid_changed and declare
3408 registers_changed_ptid as friend.
3409
3410 2017-05-24 Yao Qi <yao.qi@linaro.org>
3411
3412 * i387-tdep.c (i387_register_to_value): Use register_size
3413 instead of TYPE_LENGTH.
3414 * m68k-tdep.c (m68k_register_to_value): Likewise.
3415
3416 2017-05-24 Yao Qi <yao.qi@linaro.org>
3417
3418 * i387-tdep.c (i387_convert_register_p): Return false if type
3419 code isn't TYPE_CODE_FLT.
3420
3421 2017-05-24 Yao Qi <yao.qi@linaro.org>
3422
3423 * alpha-tdep.c (alpha_convert_register_p): Return true if type
3424 length is 4.
3425 (alpha_register_to_value): Remove type length check.
3426 (alpha_value_to_register): Likewise.
3427
3428 2017-05-24 Yao Qi <yao.qi@linaro.org>
3429
3430 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
3431 TYPE_CODE_FLT.
3432
3433 2017-05-24 Yao Qi <yao.qi@linaro.org>
3434
3435 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
3436 TYPE_CODE_FLT or not.
3437
3438 2017-05-24 Yao Qi <yao.qi@linaro.org>
3439
3440 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
3441 * avr-tdep.c (avr_gdbarch_init): Likewise.
3442 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
3443 * cris-tdep.c (cris_gdbarch_init): Likewise.
3444 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3445 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
3446 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
3447 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
3448 * mep-tdep.c (mep_gdbarch_init): Likewise.
3449 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
3450 * mips-tdep.c (mips_gdbarch_init): Likewise.
3451 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
3452 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
3453 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
3454 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
3455 * v850-tdep.c (v850_gdbarch_init): Likewise.
3456
3457 2017-05-24 Yao Qi <yao.qi@linaro.org>
3458
3459 * selftest-arch.c (tests_with_arch): Call registers_changed
3460 and reinit_frame_cache.
3461 * selftest.c (run_self_tests): Likewise.
3462
3463 2017-05-24 Yao Qi <yao.qi@linaro.org>
3464
3465 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
3466 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
3467
3468 2017-05-24 Yao Qi <yao.qi@linaro.org>
3469
3470 * rl78-tdep.c (rl78_gdbarch_init): Don't call
3471 set_gdbarch_print_insn.
3472
3473 2017-05-24 Yao Qi <yao.qi@linaro.org>
3474
3475 * h8300-tdep.c (h8300_gdbarch_init): Don't call
3476 set_gdbarch_print_insn.
3477
3478 2017-05-24 Yao Qi <yao.qi@linaro.org>
3479
3480 * alpha-tdep.c (alpha_gdbarch_init): Don't call
3481 set_gdbarch_print_insn.
3482 * arc-tdep.c (arc_gdbarch_init): Likewise.
3483 * arch-utils.c: include dis-asm.h.
3484 (default_print_insn): New function.
3485 * arch-utils.h (default_print_insn): Declare.
3486 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
3487 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
3488 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
3489 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
3490 * frv-tdep.c (frv_gdbarch_init): Likewise.
3491 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3492 * gdbarch.sh (print_insn): Use default_print_insn.
3493 * gdbarch.c: Regenerated.
3494 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
3495 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
3496 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
3497 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
3498 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
3499 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
3500 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
3501 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
3502 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
3503 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
3504 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
3505 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
3506 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
3507 * mt-tdep.c (mt_gdbarch_init): Likewise.
3508 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3509 * nios2-tdep.c (nios2_print_insn): Remove.
3510 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
3511 * rx-tdep.c (rx_gdbarch_init): Likewise.
3512 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
3513 * score-tdep.c (score_print_insn): Remove.
3514 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
3515 * sh-tdep.c (sh_gdbarch_init): Likewise.
3516 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
3517 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3518 * tic6x-tdep.c (tic6x_print_insn): Remove.
3519 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
3520 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
3521 * v850-tdep.c (v850_gdbarch_init): Likewise.
3522 * vax-tdep.c (vax_gdbarch_init): Likewise.
3523 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
3524 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
3525
3526 2017-05-23 John Baldwin <jhb@FreeBSD.org>
3527
3528 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
3529 (MIPS_FP0_REGNUM): Remove.
3530 (MIPS_FSR_REGNUM): Remove.
3531 (mips_fbsd_supply_fpregs): Use mips_regnum.
3532 (mips_fbsd_supply_gregs): Likewise.
3533 (mips_fbsd_collect_fpregs): Likewise.
3534 (mips_fbsd_collect_gregs): Likewise.
3535
3536 2017-05-23 John Baldwin <jhb@FreeBSD.org>
3537
3538 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
3539 (getpfpregs_supplies): New function.
3540 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
3541 getfpregs_supplies.
3542 (mips_fbsd_store_inferior_registers): Likewise.
3543
3544 2017-05-22 Pedro Alves <palves@redhat.com>
3545
3546 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
3547 maintainer.
3548
3549 2017-05-22 Alan Hayward <alan.hayward@arm.com>
3550
3551 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
3552 (store_register): Likewise.
3553 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
3554 (get_decimal_float_return_value): Likewise.
3555 (do_ppc_sysv_return_value): Likewise.
3556 (ppc64_sysv_abi_push_integer): Likewise.
3557 (ppc64_sysv_abi_push_freg): Likewise.
3558 (ppc64_sysv_abi_return_value_base): Likewise.
3559 (ppc64_sysv_abi_return_value): Likewise.
3560 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
3561 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
3562 * rs6000-nat.c: Likewise.
3563 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
3564 (rs6000_value_to_register): Likewise.
3565 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
3566
3567 2017-05-21 Tom Tromey <tom@tromey.com>
3568
3569 PR rust/21466:
3570 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
3571 arrays as "[T]", not "[T; ]".
3572
3573 2017-05-19 Tom Tromey <tom@tromey.com>
3574
3575 PR rust/21484:
3576 * rust-lang.c (exp_descriptor_rust): New function.
3577 (rust_language_defn): Use it.
3578 * p-lang.c (pascal_language_defn): Update.
3579 * opencl-lang.c (opencl_language_defn): Update.
3580 * objc-lang.c (objc_language_defn): Update.
3581 * m2-lang.c (m2_language_defn): Update.
3582 * language.h (struct language_defn)
3583 <la_watch_location_expression>: New member.
3584 * language.c (unknown_language_defn, auto_language_defn)
3585 (local_language_defn): Update.
3586 * go-lang.c (go_language_defn): Update.
3587 * f-lang.c (f_language_defn): Update.
3588 * d-lang.c (d_language_defn): Update.
3589 * c-lang.h (c_watch_location_expression): Declare.
3590 * c-lang.c (c_watch_location_expression): New function.
3591 (c_language_defn, cplus_language_defn, asm_language_defn)
3592 (minimal_language_defn): Use it.
3593 * breakpoint.c (watch_command_1): Call
3594 la_watch_location_expression.
3595 * ada-lang.c (ada_language_defn): Update.
3596
3597 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3598
3599 PR tui/21482
3600 * gdb_curses.h (NOMACROS): Define.
3601 (NCURSES_NOMACROS): Define.
3602
3603 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3604
3605 PR tui/21482
3606 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
3607 arg to char *.
3608 * tui/tui-wingeneral.c (box_win): Likewise.
3609 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
3610 (tui_show_source_line): Likewise.
3611 (tui_show_exec_info_content): Likewise.
3612
3613 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
3614
3615 * sparc-tdep.c (sparc_structure_return_p)
3616 (sparc_arg_on_registers_p): New functions.
3617 (sparc32_store_arguments): Use them.
3618 * sparc64-tdep.c (sparc64_16_byte_align_p)
3619 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
3620 Handle TYPE_CODE_ARRAY.
3621
3622 2017-05-17 Yao Qi <yao.qi@linaro.org>
3623
3624 * cli/cli-decode.c (add_alias_cmd): New function.
3625 * command.h (add_alias_cmd): Declare.
3626 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
3627 instead call add_alias_cmd.
3628
3629 2017-05-17 Pedro Alves <palves@redhat.com>
3630
3631 * Makefile.in (nat_extra_makefile_frag): Rename to ...
3632 (nat_makefile_frag): ... this. All references updated.
3633 * configure.ac: Likewise.
3634 * configure.nat: Likewise. Enhance comments.
3635 * configure: Regenerate.
3636
3637 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3638
3639 * procfs.c (procfs_create_inferior): Change prototype to match
3640 definition.
3641
3642 2017-05-13 Eli Zaretskii <eliz@gnu.org>
3643
3644 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
3645 C++ compiler warning.
3646
3647 2017-05-12 Tom Tromey <tom@tromey.com>
3648
3649 PR rust/21483:
3650 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
3651 recurse, just call value_struct_elt directly.
3652
3653 2017-05-12 Tom Tromey <tom@tromey.com>
3654
3655 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
3656 OP_RUST_ARRAY>: Fix.
3657
3658 2017-05-12 Tom Tromey <tom@tromey.com>
3659
3660 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
3661
3662 2017-05-09 Yao Qi <yao.qi@linaro.org>
3663
3664 * regcache.c: Include <forward_list>.
3665 (struct regcache_list): Remove.
3666 (current_regcache): Update.
3667 (get_thread_arch_aspace_regcache): Update for std::forward_list.
3668 (regcache_thread_ptid_changed): Likewise.
3669 (registers_changed_ptid): Likewise.
3670 (current_regcache_size): Likewise.
3671
3672 2017-05-09 Yao Qi <yao.qi@linaro.org>
3673
3674 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
3675 (current_regcache_size): New function.
3676 (current_regcache_test): New function.
3677 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
3678
3679 2017-05-08 Alan Hayward <alan.hayward@arm.com>
3680
3681 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
3682 (print_gp_register_row): Use get_frame_register_value.
3683
3684 2017-05-08 Alan Hayward <alan.hayward@arm.com>
3685
3686 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
3687 (mips_supply_fpregset): Likewise.
3688 (mips64_supply_gregset): Likewise.
3689
3690 2017-05-08 Alan Hayward <alan.hayward@arm.com>
3691
3692 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
3693 regcache->raw_supply_zeroed.
3694
3695 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3696
3697 * configure.nat: Rearrange 'case' statements to match
3698 host before cpu.
3699
3700 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3701
3702 * Makefile.in: Remove "@host_makefile_frag@". Add variables
3703 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
3704 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
3705 "@nat_extra_makefile_frag@".
3706 (Makefile): Remove dependency on "@frags@".
3707 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
3708 (data-directory/Makefile): Likewise.
3709 * config/aarch64/linux.mh: Deleted; moved contents to
3710 "gdb/configure.nat".
3711 * config/alpha/alpha-linux.mh: Likewise.
3712 * config/alpha/nbsd.mh: Likewise.
3713 * config/arm/linux.mh: Likewise.
3714 * config/arm/nbsdelf.mh: Likewise.
3715 * config/i386/cygwin.mh: Likewise.
3716 * config/i386/cygwin64.mh: Likewise.
3717 * config/i386/darwin.mh: Likewise.
3718 * config/i386/fbsd.mh: Likewise.
3719 * config/i386/fbsd64.mh: Likewise.
3720 * config/i386/go32.mh: Likewise.
3721 * config/i386/i386gnu.mh: Likewise.
3722 * config/i386/i386sol2.mh: Likewise.
3723 * config/i386/linux.mh: Likewise.
3724 * config/i386/linux64.mh: Likewise.
3725 * config/i386/mingw.mh: Likewise.
3726 * config/i386/mingw64.mh: Likewise.
3727 * config/i386/nbsd64.mh: Likewise.
3728 * config/i386/nbsdelf.mh: Likewise.
3729 * config/i386/nto.mh: Likewise.
3730 * config/i386/obsd.mh: Likewise.
3731 * config/i386/obsd64.mh: Likewise.
3732 * config/i386/sol2-64.mh: Likewise.
3733 * config/ia64/linux.mh: Likewise.
3734 * config/m32r/linux.mh: Likewise.
3735 * config/m68k/linux.mh: Likewise.
3736 * config/m68k/nbsdelf.mh: Likewise.
3737 * config/m68k/obsd.mh: Likewise.
3738 * config/m88k/obsd.mh: Likewise.
3739 * config/mips/fbsd.mh: Likewise.
3740 * config/mips/linux.mh: Likewise.
3741 * config/mips/nbsd.mh: Likewise.
3742 * config/mips/obsd64.mh: Likewise.
3743 * config/pa/linux.mh: Likewise.
3744 * config/pa/nbsd.mh: Likewise.
3745 * config/pa/obsd.mh: Likewise.
3746 * config/powerpc/aix.mh: Likewise.
3747 * config/powerpc/fbsd.mh: Likewise.
3748 * config/powerpc/linux.mh: Likewise.
3749 * config/powerpc/nbsd.mh: Likewise.
3750 * config/powerpc/obsd.mh: Likewise.
3751 * config/powerpc/ppc64-linux.mh: Likewise.
3752 * config/powerpc/spu-linux.mh: Likewise.
3753 * config/s390/linux.mh: Likewise.
3754 * config/sh/nbsd.mh: Likewise.
3755 * config/sparc/fbsd.mh: Likewise.
3756 * config/sparc/linux.mh: Likewise.
3757 * config/sparc/linux64.mh: Likewise.
3758 * config/sparc/nbsd64.mh: Likewise.
3759 * config/sparc/nbsdelf.mh: Likewise.
3760 * config/sparc/obsd64.mh: Likewise.
3761 * config/sparc/sol2.mh: Likewise.
3762 * config/tilegx/linux.mh: Likewise.
3763 * config/vax/nbsdelf.mh: Likewise.
3764 * config/vax/obsd.mh: Likewise.
3765 * config/xtensa/linux.mh: Likewise.
3766 * config/i386/i386gnu.mn: New file, with excerpts from
3767 "config/i386/i386gnu.mh".
3768 * configure: Regenerate.
3769 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
3770 *.mh files under "gdb/config".
3771 * configure.nat: New file, with contents from the
3772 "gdb/config/*/*.mh" files.
3773
3774 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
3775
3776 * btrace.c (btrace_clear): Free insn vector.
3777
3778 2017-05-05 Pedro Alves <palves@redhat.com>
3779
3780 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
3781 * configure: Regenerate.
3782
3783 2017-05-04 Pedro Alves <palves@redhat.com>
3784
3785 * Makefile.in (SFILES): Add progspace-and-thread.c.
3786 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
3787 (COMMON_OBS): Add progspace-and-thread.o.
3788 * breakpoint.c: Include "progspace-and-thread.h".
3789 (update_inserted_breakpoint_locations)
3790 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
3791 Use scoped_restore_current_pspace_and_thread.
3792 (create_std_terminate_master_breakpoint): Use
3793 scoped_restore_current_program_space.
3794 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
3795 (print_breakpoint_location): Use
3796 scoped_restore_current_program_space.
3797 (bp_loc_is_permanent): Use
3798 scoped_restore_current_pspace_and_thread.
3799 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
3800 (download_tracepoint_locations): Use
3801 scoped_restore_current_pspace_and_thread.
3802 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
3803 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
3804 (enum step_over_calls_kind): Moved from inferior.h.
3805 (class scoped_restore_current_thread): New class.
3806 * gdbthread.h (make_cleanup_restore_current_thread): Delete
3807 declaration.
3808 (scoped_restore_current_thread): New class.
3809 * infcmd.c: Include "common/gdb_optional.h".
3810 (continue_1, proceed_after_attach): Use
3811 scoped_restore_current_thread.
3812 (notice_new_inferior): Use scoped_restore_current_thread.
3813 * inferior.c: Include "progspace-and-thread.h".
3814 (restore_inferior, save_current_inferior): Delete.
3815 (add_inferior_command, clone_inferior_command): Use
3816 scoped_restore_current_pspace_and_thread.
3817 * inferior.h (scoped_restore_current_inferior): New class.
3818 * infrun.c: Include "progspace-and-thread.h" and
3819 "common/gdb_optional.h".
3820 (follow_fork_inferior): Use
3821 scoped_restore_current_pspace_and_thread.
3822 (scoped_restore_exited_inferior): New class.
3823 (handle_vfork_child_exec_or_exit): Use
3824 scoped_restore_exited_inferior,
3825 scoped_restore_current_pspace_and_thread,
3826 scoped_restore_current_thread and scoped_restore.
3827 (fetch_inferior_event): Use scoped_restore_current_thread.
3828 * linespec.c (decode_line_full, decode_line_1): Use
3829 scoped_restore_current_program_space.
3830 * mi/mi-main.c: Include "progspace-and-thread.h".
3831 (exec_continue): Use scoped_restore_current_thread.
3832 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
3833 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
3834 * proc-service.c (ps_pglobal_lookup): Use
3835 scoped_restore_current_program_space.
3836 * progspace-and-thread.c: New file.
3837 * progspace-and-thread.h: New file.
3838 * progspace.c (release_program_space, clone_program_space): Use
3839 scoped_restore_current_program_space.
3840 (restore_program_space, save_current_program_space)
3841 (save_current_space_and_thread): Delete.
3842 (switch_to_program_space_and_thread): Moved to
3843 progspace-and-thread.c.
3844 * progspace.h (save_current_program_space)
3845 (save_current_space_and_thread): Delete declarations.
3846 (scoped_restore_current_program_space): New class.
3847 * remote.c (remote_btrace_maybe_reopen): Use
3848 scoped_restore_current_thread.
3849 * symtab.c: Include "progspace-and-thread.h".
3850 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
3851 * thread.c (print_thread_info_1): Use
3852 scoped_restore_current_thread.
3853 (struct current_thread_cleanup): Delete.
3854 (do_restore_current_thread_cleanup)
3855 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
3856 (scoped_restore_current_thread::~scoped_restore_current_thread):
3857 ... this new dtor.
3858 (make_cleanup_restore_current_thread): Rename/convert to ...
3859 (scoped_restore_current_thread::scoped_restore_current_thread):
3860 ... this new ctor.
3861 (thread_apply_all_command): Use scoped_restore_current_thread.
3862 (thread_apply_command): Use scoped_restore_current_thread.
3863 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
3864 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
3865
3866 2017-05-04 Pedro Alves <palves@redhat.com>
3867
3868 * thread.c (make_cleanup_restore_current_thread): Move
3869 find_thread_ptid call before the is_stopped call. Assert that the
3870 thread is found. Replace is_stopped call by checking the thread's
3871 state directly. Remove unnecessary NULL-thread check.
3872
3873 2017-05-04 Pedro Alves <palves@redhat.com>
3874
3875 * corelow.c (thread_section_name): New class.
3876 (get_core_register_section, get_core_siginfo): Use it.
3877
3878 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
3879
3880 * corelow.c (sniff_core_bfd): Remove extra semicolon.
3881 (get_core_register_section): Remove xfree of NULL pointer.
3882
3883 2017-05-03 Alan Hayward <alan.hayward@arm.com>
3884
3885 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
3886 * regcache.c (regcache::raw_supply_zeroed): New function.
3887 * regcache.h (regcache::raw_supply_zeroed): New declaration.
3888
3889 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
3890
3891 * gdbarch.sh: Remove commented out definition of
3892 TARGET_CHAR_BIT.
3893 * gdbarch.h: Re-generate.
3894
3895 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3896
3897 * configure: Regenerate.
3898
3899 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
3900
3901 * solib-target.c (solib_target_relocate_section_addresses):
3902 Remove num_section_bases, num_bases, segment_bases variables.
3903
3904 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3905
3906 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
3907
3908 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3909
3910 * solib-target.c: Include <vector>
3911 (struct lm_info_target) <~lm_info_target>: Remove.
3912 <segment_bases, section_bases>: Change type to
3913 std::vector<CORE_ADDR>.
3914 (library_list_start_segment, library_list_start_section,
3915 library_list_end_library,
3916 solib_target_relocate_section_addresses): Adjust.
3917
3918 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3919
3920 * gdbarch.sh (software_single_step): Change return type to
3921 std::vector<CORE_ADDR>.
3922 * gdbarch.c, gdbarch.h: Re-generate.
3923 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
3924 Adjust.
3925 (arm_deal_with_atomic_sequence_raw): Adjust.
3926 (thumb_get_next_pcs_raw): Adjust.
3927 (arm_get_next_pcs_raw): Adjust.
3928 (arm_get_next_pcs): Adjust.
3929 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
3930 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
3931 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
3932 (alpha_software_single_step): Adjust.
3933 * alpha-tdep.h (alpha_software_single_step): Adjust.
3934 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
3935 * arm-tdep.c (arm_software_single_step): Adjust.
3936 (arm_breakpoint_kind_from_current_state): Adjust.
3937 * arm-tdep.h (arm_software_single_step): Adjust.
3938 * breakpoint.c (insert_single_step_breakpoint): Adjust.
3939 * cris-tdep.c (cris_software_single_step): Adjust.
3940 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
3941 (micromips_deal_with_atomic_sequence): Adjust.
3942 (deal_with_atomic_sequence): Adjust.
3943 (mips_software_single_step): Adjust.
3944 * mips-tdep.h (mips_software_single_step): Adjust.
3945 * moxie-tdep.c (moxie_software_single_step): Adjust.
3946 * nios2-tdep.c (nios2_software_single_step): Adjust.
3947 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
3948 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
3949 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
3950 * s390-linux-tdep.c (s390_software_single_step): Adjust.
3951 * sparc-tdep.c (sparc_software_single_step): Adjust.
3952 * spu-tdep.c (spu_software_single_step): Adjust.
3953 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
3954
3955 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3956
3957 * gdbarch.sh: Use semi-colon as field separator instead of colon.
3958 * gdbarch.h: Re-generate.
3959
3960 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
3961
3962 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
3963 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
3964 * python/py-instruction.c, python/py-instruction.h: New file.
3965 * python/py-record.c: Add py-instruction.h include.
3966 (gdbpy_initialize_record): Make gdb.Instruction a super class of
3967 gdb.RecordInstruction.
3968 * python/python-internal.h: Add gdbpy_initialize_instruction
3969 declaration.
3970 * python/python.c (do_start_initialization): Add
3971 gdbpy_initialize_instruction.
3972
3973 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
3974
3975 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
3976 Remove.
3977 (btrace_func_from_recpy_func): New function.
3978 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
3979 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
3980 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
3981 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
3982 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
3983 Also, use new helper functions.
3984 (btpy_list_item): Use new helper functions.
3985 (recpy_bt_function_call_history): Use new type name.
3986 (btpy_call_getset): Remove.
3987 (gdbpy_initialize_btrace): Remove code to initialize
3988 gdb.BtraceFunctionCall.
3989 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
3990 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
3991 recpy_bt_func_prev, recpy_bt_func_next): New export.
3992 * python/py-record.c (recpy_func_type): New static object.
3993 (recpy_func_new, recpy_func_level, recpy_func_symbol,
3994 recpy_func_instructions, recpy_func_up, recpy_func_prev,
3995 recpy_func_next): New function.
3996 (recpy_element_hash, recpy_element_richcompare): Updated comment.
3997 (recpy_func_getset): New static object.
3998 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
3999 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
4000
4001 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4002
4003 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
4004 (btpy_object, btpy_insn_type, btpy_new): Remove.
4005 (btpy_list_object): Use gdb.RecordInstruction type instead of
4006 gdb.BtraceInstruction type.
4007 (btrace_insn_from_recpy_insn): New function.
4008 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
4009 btpy_new.
4010 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
4011 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
4012 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
4013 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
4014 instead of btpy_object.
4015 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
4016 btpy_insn_data, btpy_insn_decode): Rename to ...
4017 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
4018 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
4019 recpy_bt_insn_decode): This. Also, use new helper functions.
4020 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
4021 recpy_insn_type.
4022 (btpy_insn_getset): Remove.
4023 (gdbpy_initialize_btrace): Remove code to initialize
4024 gdb.BtraceInstruction. Use recpy_element_object.
4025 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
4026 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
4027 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
4028 * python/py-record.c (recpy_insn_type): New static object.
4029 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
4030 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
4031 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
4032 New function.
4033 (recpy_insn_getset): New static object.
4034 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
4035 * python/py-record.h (recpy_element_object): New typedef.
4036 (recpy_insn_type, recpy_insn_new): New export.
4037
4038 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4039
4040 * py-record-btrace.c (btpy_insn_new): Removed.
4041 (btpy_insn_or_gap_new): New function.
4042 (btpy_insn_error): Removed.
4043 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
4044 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
4045 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
4046 btpy_insn_or_gap_new instead of btpy_insn_new.
4047 (btpy_insn_getset): Remove btpy_insn_error.
4048 * py-record.c (recpy_gap_type): New static object.
4049 (recpy_gap_object): New typedef.
4050 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
4051 recpy_gap_reason_string): New function.
4052 (recpy_gap_getset): New static object.
4053 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
4054 * py-record.h (recpy_gap_new): New export.
4055
4056 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4057
4058 * python/py-record.c (recpy_ptid): Remove.
4059 (recpy_record_getset): Remove recpy_ptid.
4060
4061 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4062
4063 * btrace.c (btrace_fetch): Set inferior_ptid.
4064 * python/py-record-btrace.c: Add "py-record.h" include.
4065 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
4066 recpy_bt_end, recpy_bt_instruction_history,
4067 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
4068 in gdb.Record object instead of current ptid.
4069 * python/py-record.c: Include new "py-record.h" file.
4070 (recpy_record_object): Moved to py-record.h.
4071 * python/py-record.h: New file.
4072
4073 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4074
4075 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
4076 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
4077 indentation.
4078
4079 2017-05-01 Joel Brobecker <brobecker@adacore.com>
4080
4081 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
4082 the past maintainers section.
4083
4084 2017-04-28 Yao Qi <yao.qi@linaro.org>
4085
4086 * infcmd.c (get_return_value): Use regcache ctor, and remove
4087 cleanup.
4088
4089 2017-04-28 Yao Qi <yao.qi@linaro.org>
4090 Pedro Alves <palves@redhat.com>
4091
4092 * regcache.c (regcache::regcache): New tag dispatch ctor.
4093 (do_cooked_read): Moved above.
4094 (regcache_dup): Use the tag dispatch ctor..
4095 * regcache.h (regcache): Declare ctor, delete copy ctor and
4096 assignment operator, remove friend regcache_dup.
4097
4098 2017-04-28 Yao Qi <yao.qi@linaro.org>
4099
4100 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
4101 call method save instead of regcache_cpy.
4102 * regcache.h (struct regcache): Make regcache_dup a friend.
4103
4104 2017-04-28 Yao Qi <yao.qi@linaro.org>
4105
4106 * regcache.c (struct regcache): Move to regcache.h
4107 (regcache::arch): New method.
4108 (regcache_get_ptid): Update.
4109 (get_regcache_arch): Call arch method.
4110 (get_regcache_aspace): Call method aspace.
4111 (register_buffer): Change it to method.
4112 (regcache_save): Change it to regcache::save.
4113 (regcache_restore): Likewise.
4114 (regcache_cpy_no_passthrough): Remove the declaration.
4115 (regcache_cpy): Call methods restore and cpy_no_passthrough.
4116 (regcache_cpy_no_passthrough): Change it to method
4117 cpy_no_passthrough.
4118 (regcache_register_status): Change it to method
4119 get_register_status.
4120 (regcache_invalidate): Change it to method invalidate.
4121 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
4122 (regcache_raw_update): Change it to method raw_update.
4123 (regcache_raw_read): Likewise.
4124 (regcache_raw_read_signed): Likewise.
4125 (regcache_raw_read_unsigned): Likewise.
4126 (regcache_raw_write_signed): Likewise.
4127 (regcache_raw_write_unsigned): Likewise.
4128 (regcache_cooked_read): Likewise.
4129 (regcache_cooked_read_value): Likewise.
4130 (regcache_cooked_read_signed): Likewise.
4131 (regcache_cooked_read_unsigned): Likewise.
4132 (regcache_cooked_write_signed): Likewise.
4133 (regcache_cooked_write_unsigned): Likewise.
4134 (regcache_raw_set_cached_value): Likewise.
4135 (regcache_raw_write): Likewise.
4136 (regcache_cooked_write): Likewise.
4137 (regcache_xfer_part): Likewise.
4138 (regcache_raw_read_part): Likewise.
4139 (regcache_raw_write_part): Likewise.
4140 (regcache_cooked_read_part): Likewise.
4141 (regcache_cooked_write_part): Likewise.
4142 (regcache_raw_supply): Likewise.
4143 (regcache_raw_collect): Likewise.
4144 (regcache_transfer_regset): Likewise.
4145 (regcache_supply_regset): Likewise.
4146 (regcache_collect_regset): Likewise.
4147 (regcache_debug_print_register): Likewise.
4148 (enum regcache_dump_what): Move it to regcache.h.
4149 (regcache_dump): Change it to method dump.
4150 * regcache.h (enum regcache_dump_what): New.
4151 (class regcache): New.
4152 * target.c (target_fetch_registers): Call method
4153 debug_print_register.
4154 (target_store_registers): Likewise.
4155
4156 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4157
4158 * windows-nat.c (struct lm_info_windows): Initialize field.
4159 (windows_make_so): Allocate lm_info_windows with new.
4160 (windows_free_so): Free lm_info_windows with delete.
4161
4162 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4163
4164 * solib-darwin.c (struct lm_info_darwin): Initialize field.
4165 (darwin_current_sos): Allocate lm_info_darwin with new, remove
4166 cleanup.
4167 (darwin_free_so): Free lm_info_darwin with delete.
4168
4169 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4170
4171 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
4172 <l_addr_p>: Change type to bool.
4173 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
4174 (svr4_free_so): Free lm_info_svr4 with delete.
4175 (svr4_copy_library_list): Replace memcpy with call to copy
4176 constructor.
4177 (library_list_start_library, svr4_default_sos): Allocate
4178 lm_info_svr4 with new.
4179
4180 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4181
4182 * solib-target.c (struct lm_info_target): Add destructor,
4183 initialize fields.
4184 <name>: Change type to std::string.
4185 (library_list_start_library): Allocate lm_info_target with new.
4186 (solib_target_free_library_list): Free lm_info_target with
4187 delete.
4188 (solib_target_current_sos): Adapt to std::string.
4189 (solib_target_free_so): Free lm_info_target with delete.
4190
4191 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4192
4193 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
4194 fields.
4195 (frv_current_sos): Allocate lm_info_frv with new.
4196 (frv_relocate_main_executable): Free lm_info_frv with delete,
4197 allocate with new.
4198 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
4199
4200 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4201
4202 * solib-frv.c (struct lm_info_frv): Fix indentation.
4203
4204 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4205
4206 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
4207 map field.
4208 (dsbt_current_sos): Allocate lm_info_dsbt with new.
4209 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
4210 and allocate with new.
4211 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
4212
4213 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4214
4215 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
4216 <filename, member_name>: Change type to std::string.
4217 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
4218 (library_list_start_library): Allocate lm_info_aix with new.
4219 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
4220 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
4221 with copy constructor.
4222
4223 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4224
4225 * solist.h (struct lm_info): Remove.
4226 (struct lm_info_base): New class.
4227 (struct so_list) <lm_info>: Change type to lm_info_base *.
4228 * nto-tdep.c (struct lm_info): Remove.
4229 (lm_addr): Adjust.
4230 * solib-aix.c (struct lm_info): Rename to ...
4231 (struct lm_info_aix): ... this. Extend lm_info_base.
4232 (lm_info_p): Rename to ...
4233 (lm_info_aix_p): ... this, and adjust.
4234 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
4235 solib_aix_parse_libraries, library_list_start_library,
4236 solib_aix_free_library_list, solib_aix_parse_libraries,
4237 solib_aix_get_library_list,
4238 solib_aix_relocate_section_addresses, solib_aix_free_so,
4239 solib_aix_get_section_offsets,
4240 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
4241 Adjust.
4242 (struct solib_aix_inferior_data) <library_list>: Adjust.
4243 * solib-darwin.c (struct lm_info): Rename to ...
4244 (struct lm_info_darwin): ... this. Extend lm_info_base.
4245 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
4246 * solib-dsbt.c (struct lm_info): Rename to ...
4247 (struct lm_info_dsbt): ... this. Extend lm_info_base.
4248 (struct dsbt_info) <main_executable_lm_info): Adjust.
4249 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
4250 dsbt_relocate_section_addresses): Adjust.
4251 * solib-frv.c (struct lm_info): Rename to ...
4252 (struct lm_info_frv): ... this. Extend lm_info_base.
4253 (main_executable_lm_info): Adjust.
4254 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
4255 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
4256 find_canonical_descriptor_in_load_object,
4257 frv_fdpic_find_canonical_descriptor): Adjust.
4258 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
4259 to lm_info_svr4.
4260 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
4261 svr4_clear_so, svr4_copy_library_list,
4262 library_list_start_library, svr4_default_sos, svr4_read_so_list,
4263 svr4_current_sos, svr4_fetch_objfile_link_map,
4264 solist_update_incremental): Adjust.
4265 * solib-svr4.h (struct lm_info_svr4): Move here from
4266 solib-svr4.c.
4267 * solib-target.c (struct lm_info): Rename to ...
4268 (struct lm_info_target): ... this. Extend lm_info_base.
4269 (lm_info_p): Rename to ...
4270 (lm_info_target_p): ... this.
4271 (solib_target_parse_libraries, library_list_start_segment,
4272 library_list_start_section, library_list_start_library,
4273 library_list_end_library, solib_target_free_library_list,
4274 solib_target_current_sos, solib_target_free_so,
4275 solib_target_relocate_section_addresses): Adjust.
4276 * windows-nat.c (struct lm_info): Rename to ...
4277 (struct lm_info_windows): ... this. Extend lm_info_base.
4278 (windows_make_so, handle_load_dll, handle_unload_dll,
4279 windows_xfer_shared_libraries): Adjust.
4280
4281 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4282
4283 * solib-darwin.c (struct darwin_so_list): Remove.
4284 (darwin_current_sos): Allocate an so_list object instead of a
4285 darwin_so_list, separately allocate an lm_info object.
4286 (darwin_free_so): Free lm_info.
4287
4288 2017-04-28 John Baldwin <jhb@FreeBSD.org>
4289
4290 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
4291 with fprintf_filtered.
4292
4293 2017-04-28 Yao Qi <yao.qi@linaro.org>
4294
4295 * regcache.c (regcache::regcache): New function.
4296 (regcache::~regcache): New function.
4297 (regcache_xmalloc_1): Remove.
4298 (regcache_xmalloc): Call new regcache.
4299 (regcache_xfree): Call delete regcache.
4300 (get_thread_arch_aspace_regcache): Call new regcache.
4301
4302 2017-04-28 Yao Qi <yao.qi@linaro.org>
4303
4304 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
4305 lwp instead of ptid_get_lwp.
4306
4307 2017-04-28 Yao Qi <yao.qi@linaro.org>
4308
4309 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
4310 lwp_info instead of getting from inferior_ptid.
4311
4312 2017-04-27 Keith Seitz <keiths@redhat.com>
4313
4314 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
4315 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
4316 (CV_CONVERSION_BADNESS): Define.
4317 (rank_one_type): Remove overly restrictive rvalue reference
4318 rank checks.
4319 Add cv-qualifier checks and subranks for type equality.
4320 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
4321 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
4322 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
4323
4324 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
4325
4326 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
4327 count when creating the object.
4328
4329 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
4330 Ulrich Weigand <uweigand@de.ibm.com>
4331
4332 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
4333 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
4334 is used in AIX.
4335 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
4336 (process_xcoff_symbol): Likewise.
4337 (scan_xcoff_symtab): Likewise.
4338
4339 2017-04-26 Alan Hayward <alan.hayward@arm.com>
4340
4341 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
4342 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
4343 (ia64_access_reg): Use get_frame_register_unsigned.
4344 (ia64_access_rse_reg): Likewise.
4345 (ia64_libunwind_frame_prev_register): Likewise.
4346
4347 2017-04-26 Jiong Wang <jiong.wang@arm.com>
4348
4349 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
4350 * gdbarch.c: Regenerated.
4351 * gdbarch.h: Regenerated.
4352 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
4353 visibility external.
4354 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
4355 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
4356 (enum cfa_how_kind): Move to ...
4357 (struct dwarf2_frame_state_reg_info): Likewise.
4358 (struct dwarf2_frame_state): Likewise.
4359 * dwarf2-frame.h: ... here.
4360 (dwarf2_frame_state_alloc_regs): New declaration.
4361 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
4362 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
4363
4364 2017-04-26 Alan Hayward <alan.hayward@arm.com>
4365
4366 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
4367 regcache_raw_read_unsigned.
4368 (xtensa_pseudo_register_write): Likewise.
4369
4370 2017-04-26 Alan Hayward <alan.hayward@arm.com>
4371
4372 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
4373 (nds32_pseudo_register_write): Likewise.
4374
4375 2017-04-25 Yao Qi <yao.qi@linaro.org>
4376
4377 * regcache.c (struct regcache) <readonly_p>: Change its type
4378 to bool.
4379 (regcache_xmalloc_1): Update parameter type and callers update.
4380
4381 2017-04-25 Yao Qi <yao.qi@linaro.org>
4382
4383 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
4384 set_gdbarch_wchar_bit.
4385 * arm-tdep.c (arm_gdbarch_init): Likewise.
4386
4387 2017-04-25 Pedro Alves <palves@redhat.com>
4388
4389 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
4390 (BothAreRelocatable, memcopy, memmove): Don't define.
4391 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
4392 macros.
4393
4394 2017-04-25 Pedro Alves <palves@redhat.com>
4395
4396 * common/common-defs.h: Include "common/poison.h".
4397 * common/function-view.h: (Not, Or, Requires): Move to traits.h
4398 and adjust.
4399 * common/poison.h: New file.
4400 * common/traits.h: Include <type_traits>.
4401 (Not, Or, Requires): New, moved from common/function-view.h.
4402
4403 2017-04-25 Pedro Alves <palves@redhat.com>
4404
4405 * breakpoint.h (struct breakpoint): In-class initialize all
4406 fields. Make boolean fields "bool".
4407 * breakpoint.c (init_raw_breakpoint_without_location): Remove
4408 memset call and initializations no longer necessary.
4409
4410 2017-04-25 Pedro Alves <palves@redhat.com>
4411
4412 * btrace.c (pt_btrace_insn_flags): Change parameter type to
4413 reference.
4414 (pt_btrace_insn): New function.
4415 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
4416
4417 2017-04-25 Pedro Alves <palves@redhat.com>
4418
4419 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
4420 "base" field and inherit from "bp_location" instead. Add
4421 non-default ctor.
4422 (allocate_location_exception): Use new non-default ctor.
4423 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
4424 (init_bp_location): Convert to ...
4425 (bp_location::bp_location): ... this new ctor, and remove memset
4426 call.
4427 (base_breakpoint_allocate_location): Use the new non-default ctor.
4428 * breakpoint.h (bp_location): Now a class. Declare default and
4429 non-default ctors. In-class initialize all members.
4430 (init_bp_location): Remove declaration.
4431
4432 2017-04-25 Pedro Alves <palves@redhat.com>
4433
4434 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
4435 assignment operator.
4436
4437 2017-04-24 Yao Qi <yao.qi@linaro.org>
4438
4439 * doublest.c (convert_doublest_to_floatformat): Call
4440 floatformat_totalsize_bytes.
4441
4442 2017-04-22 Tom Tromey <tom@tromey.com>
4443
4444 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4445 ui_out_emit_list.
4446 * stack.c (print_frame): Use ui_out_emit_list.
4447 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
4448 ui_out_emit_list.
4449 * mi/mi-main.c (print_one_inferior)
4450 (mi_cmd_data_list_register_names)
4451 (mi_cmd_data_list_register_values, mi_cmd_list_features)
4452 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
4453 ui_out_emit_list.
4454 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
4455 (mi_output_solib_attribs): Use ui_out_emit_list,
4456 ui_out_emit_tuple.
4457 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
4458 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
4459 (mi_cmd_stack_list_args, list_args_or_locals): Use
4460 ui_out_emit_list.
4461 * disasm.c (do_assembly_only): Use ui_out_emit_list.
4462 * breakpoint.c (print_solib_event, output_thread_groups): Use
4463 ui_out_emit_list.
4464
4465 2017-04-22 Tom Tromey <tom@tromey.com>
4466
4467 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
4468 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
4469 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
4470
4471 2017-04-22 Tom Tromey <tom@tromey.com>
4472
4473 * tracepoint.c (tvariables_info_1)
4474 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
4475
4476 2017-04-22 Tom Tromey <tom@tromey.com>
4477
4478 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
4479 annotate_arg_emitter.
4480 * breakpoint.c (print_mention_watchpoint)
4481 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
4482 * annotate.h (struct annotate_arg_emitter): New.
4483
4484 2017-04-22 Tom Tromey <tom@tromey.com>
4485
4486 * record-btrace.c (record_btrace_insn_history)
4487 (record_btrace_insn_history_range, record_btrace_call_history)
4488 (record_btrace_call_history_range): Use ui_out_emit_tuple.
4489 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
4490 ui_out_emit_tuple.
4491 * stack.c (print_frame_info): Use ui_out_emit_tuple.
4492 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
4493 * skip.c (skip_info): Use ui_out_emit_tuple.
4494 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
4495 * progspace.c (print_program_space): Use ui_out_emit_tuple.
4496 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
4497 * osdata.c (info_osdata): Use ui_out_emit_tuple.
4498 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
4499 ui_out_emit_tuple.
4500 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
4501 (output_register, mi_cmd_data_read_memory)
4502 (mi_cmd_data_read_memory_bytes, mi_load_progress)
4503 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
4504 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
4505 Use ui_out_emit_tuple.
4506 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
4507 ui_out_emit_tuple.
4508 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
4509 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
4510 * linux-thread-db.c (info_auto_load_libthread_db): Use
4511 ui_out_emit_tuple.
4512 * inferior.c (print_inferior): Use ui_out_emit_tuple.
4513 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
4514 * disasm.c (do_mixed_source_and_assembly_deprecated)
4515 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
4516 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
4517 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
4518 * breakpoint.c (print_one_breakpoint_location)
4519 (print_one_breakpoint): Use ui_out_emit_tuple.
4520 * auto-load.c (print_script, info_auto_load_cmd): Use
4521 ui_out_emit_tuple.
4522 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
4523
4524 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
4525
4526 * thread.c (print_thread_info_1): Remove dead code.
4527
4528 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4529
4530 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
4531 GDB_SELF_TEST.
4532 * arm-tdep.c (selftests::arm_record_test): Likewise.
4533
4534 2017-04-21 Yao Qi <yao.qi@linaro.org>
4535
4536 * regcache.c (regcache_restore): Remove argument 2. Replace
4537 argument 3 with regcache. Get register status from
4538 src->register_status and get register contents from
4539 register_buffer (src, regnum).
4540 (regcache_cpy): Update.
4541
4542 2017-04-19 Pedro Alves <palves@redhat.com>
4543
4544 * gdbthread.h (thread): Add missing closing parenthesis in
4545 comment.
4546
4547 2017-04-19 Pedro Alves <palves@redhat.com>
4548
4549 * common/refcounted-object.h: New file.
4550 * gdbthread.h: Include "common/refcounted-object.h".
4551 (thread_info): Inherit from refcounted_object and add comments.
4552 (thread_info::incref, thread_info::decref)
4553 (thread_info::m_refcount): Delete.
4554 (thread_info::deletable): Use the refcounted_object::refcount()
4555 method.
4556 * inferior.c (current_inferior_): Add comment.
4557 (set_current_inferior): Increment/decrement refcounts.
4558 (prune_inferiors, remove_inferior_command): Skip inferiors marked
4559 not-deletable instead of comparing with the current inferior.
4560 (initialize_inferiors): Increment the initial inferior's refcount.
4561 * inferior.h (struct inferior): Forward declare.
4562 Include "common/refcounted-object.h".
4563 (current_inferior, set_current_inferior): Move declaration to
4564 before struct inferior's definition, and fix comment.
4565 (inferior): Inherit from refcounted_object. Add comments.
4566 * thread.c (switch_to_thread_no_regs): Reference the thread's
4567 inferior pointer directly instead of doing a ptid lookup.
4568 (switch_to_no_thread): New function.
4569 (switch_to_thread(thread_info *)): New function, factored out
4570 from ...
4571 (switch_to_thread(ptid_t)): ... this.
4572 (restore_current_thread): Delete.
4573 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
4574 fields, and add 'inf' field.
4575 (do_restore_current_thread_cleanup): Check whether old->inf is
4576 alive instead of looking up an inferior by ptid. Use
4577 switch_to_thread and switch_to_no_thread.
4578 (restore_current_thread_cleanup_dtor): Use old->inf directly
4579 instead of lookup up an inferior by id. Decref the inferior.
4580 Don't restore 'removable'.
4581 (make_cleanup_restore_current_thread): Same the inferior pointer
4582 in old, instead of the inferior number. Incref the inferior.
4583 Don't save/clear 'removable'.
4584
4585 2017-04-19 Pedro Alves <palves@redhat.com>
4586
4587 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4588 unittests/scoped_restore-selftests.c.
4589 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
4590 * common/scoped_restore.h (scoped_restore_base): Make "class".
4591 (scoped_restore_base::release): New public method.
4592 (scoped_restore_base::scoped_restore_base): New protected ctor.
4593 (scoped_restore_base::m_saved_var): New protected field.
4594 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
4595 scoped_restore_base base class instead of m_saved_var directly.
4596 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
4597 (scoped_restore_tmpl::scoped_restore_tmpl(const
4598 scoped_restore_tmpl<T>&)): Likewise.
4599 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
4600 method.
4601 (scoped_restore_tmpl::saved_var): New method.
4602 (scoped_restore_tmpl::m_saved_var): Delete.
4603 * inferior.h (inferior::detaching): Now a bool.
4604 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
4605 cleanup.
4606 * unittests/scoped_restore-selftests.c: New file.
4607
4608 2017-04-19 Pedro Alves <palves@redhat.com>
4609
4610 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
4611 Re-sort in alphabetic order.
4612
4613 2017-04-18 Pedro Alves <palves@redhat.com>
4614
4615 * xml-support.c (obstack_xml_printf): Delete.
4616 * xml-support.h (obstack_xml_printf): Delete.
4617
4618 2017-04-18 Pedro Alves <palves@redhat.com>
4619
4620 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
4621 vdebug, verror, body_text, start_element, end_element, name,
4622 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
4623 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
4624 is_xinclude>: Make private and add m_ prefix.
4625 (gdb_xml_parser::body_text): New method, based on ...
4626 (gdb_xml_body_text): ... this. Adjust.
4627 (gdb_xml_parser::vdebug): New method, based on ...
4628 (gdb_xml_debug): ... this. Adjust.
4629 (gdb_xml_parser::verror): New method, based on ...
4630 (gdb_xml_error): ... this. Adjust.
4631 (gdb_xml_parser::start_element): New method, based on ...
4632 (gdb_xml_start_element): ... this. Adjust.
4633 (gdb_xml_start_element_wrapper): Defer to
4634 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
4635 (gdb_xml_parser::end_element): New method, based on ...
4636 (gdb_xml_end_element_wrapper): ... this. Adjust.
4637 (gdb_xml_parser::~gdb_xml_parser): Adjust.
4638 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
4639 (gdb_xml_parser::use_dtd): New method, based on ...
4640 (gdb_xml_use_dtd): ... this. Adjust.
4641 (gdb_xml_parser::parse): New method, based on ...
4642 (gdb_xml_parse): ... this. Adjust.
4643 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
4644 (xinclude_start_include): Adjust to call the parser's name method.
4645 (xml_xinclude_default, xml_xinclude_start_doctype)
4646 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
4647 method.
4648 (xml_process_xincludes): Adjust to call parser methods.
4649 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
4650 declarations.
4651
4652 2017-04-18 Pedro Alves <palves@redhat.com>
4653
4654 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
4655 gdb::optional<std::string>.
4656 * xml-support.c: Include <string>.
4657 (scope_level::scope_level(scope_level &&))
4658 (scope_level::~scope_level): Delete.
4659 (scope_level::body): Now a std::string.
4660 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
4661 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
4662 parameter.
4663 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
4664 (xinclude_parsing_data::output): Now a std::string reference.
4665 (xinclude_start_include): Adjust.
4666 (xml_xinclude_default): Adjust.
4667 (xml_process_xincludes): Add 'output' parameter, and return bool.
4668 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
4669 and return bool.
4670 * xml-tdesc.c: Include <unordered_map> and <string>.
4671 (tdesc_xml_cache): Delete.
4672 (tdesc_xml_cache_s): Delete.
4673 (xml_cache): Now an std::unordered_map.
4674 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
4675 (target_fetch_description_xml): Change return type to
4676 gdb::optional<std::string>, and adjust.
4677 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
4678 (target_fetch_description_xml): Change return type to
4679 gdb::optional<std::string>.
4680
4681 2017-04-18 Pedro Alves <palves@redhat.com>
4682
4683 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4684 unittests/optional-selftests.c.
4685 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
4686 * unittests/optional-selftests.c: New file.
4687 * unittests/optional/assignment/1.cc: New file.
4688 * unittests/optional/assignment/2.cc: New file.
4689 * unittests/optional/assignment/3.cc: New file.
4690 * unittests/optional/assignment/4.cc: New file.
4691 * unittests/optional/assignment/5.cc: New file.
4692 * unittests/optional/assignment/6.cc: New file.
4693 * unittests/optional/assignment/7.cc: New file.
4694 * unittests/optional/cons/copy.cc: New file.
4695 * unittests/optional/cons/default.cc: New file.
4696 * unittests/optional/cons/move.cc: New file.
4697 * unittests/optional/cons/value.cc: New file.
4698 * unittests/optional/in_place.cc: New file.
4699 * unittests/optional/observers/1.cc: New file.
4700 * unittests/optional/observers/2.cc: New file.
4701
4702 2017-04-18 Pedro Alves <palves@redhat.com>
4703
4704 * common/gdb_optional.h: Include common/traits.h.
4705 (in_place_t): New type.
4706 (in_place): New constexpr variable.
4707 (optional::optional): Remove member initialization of
4708 m_instantiated.
4709 (optional::optional(in_place_t...)): New constructor.
4710 (optional::~optional): Use reset.
4711 (optional::optional(const optional&)): New.
4712 (optional::optional(const optional&&)): New.
4713 (optional::optional(T &)): New.
4714 (optional::optional(T &&)): New.
4715 (operator::operator=(const optional &)): New.
4716 (operator::operator=(optional &&)): New.
4717 (operator::operator= (const T &))
4718 (operator::operator= (T &&))
4719 (operator::emplace (Args &&... args)): Return a T&. Use reset.
4720 (operator::reset): New.
4721 (operator::m_instantiated):: Add in-class initializer.
4722 * common/traits.h: Include <type_traits>.
4723 (struct And): New types.
4724
4725 2017-04-18 Pedro Alves <palves@redhat.com>
4726
4727 * xml-support.c: Include <vector>.
4728 (scope_level::scope_level(const gdb_xml_element *))
4729 (scope_level::scope_level(scope_level&&)): New.
4730 (scope_level::~scope_level): New.
4731 (scope_level_s): Delete.
4732 (gdb_xml_parser::scopes): Now a std::vector.
4733 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
4734 Use std::vector.
4735 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
4736 scope cleanup code.
4737 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
4738 of the scopes member. Use std::vector::emplace_back.
4739
4740 2017-04-18 Pedro Alves <palves@redhat.com>
4741
4742 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
4743 a bool.
4744 (gdb_xml_end_element): Change type of first parameter.
4745 (gdb_xml_cleanup): Rename to ...
4746 (gdb_xml_parser::~gdb_xml_parser): ... this.
4747 (gdb_xml_create_parser_and_cleanup): Delete with ...
4748 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
4749 to this new ctor.
4750 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
4751 using gdb_xml_create_parser_and_cleanup.
4752 (xinclude_parsing_data): Add ctor/dtor.
4753 (xml_xinclude_cleanup): Delete.
4754 (xml_process_xincludes): Create a local xinclude_parsing_data
4755 instead of heap-allocating one. Create a local gdb_xml_parser
4756 instead of heap-allocating one with
4757 gdb_xml_create_parser_and_cleanup.
4758
4759 2017-04-18 John Baldwin <jhb@FreeBSD.org>
4760
4761 PR threads/20743
4762 * fbsd-nat.c (resume_one_thread_cb): Remove.
4763 (resume_all_threads_cb): Remove.
4764 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
4765 iterate_over_threads.
4766
4767 2017-04-17 Joel Brobecker <brobecker@adacore.com>
4768
4769 * NEWS: Create a new section for the next release branch.
4770 Rename the section of the current branch, now that it has
4771 been cut.
4772
4773 2017-04-17 Joel Brobecker <brobecker@adacore.com>
4774
4775 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
4776 * version.in: Bump version to 8.0.50.DATE-git.
4777
4778 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
4779
4780 PR gdb/21385
4781 * windows-nat.c (windows_create_inferior): Declare 'allargs'
4782 independently of the host, and fix build breakage on Cygwin.
4783
4784 2017-04-13 Pedro Alves <palves@redhat.com>
4785
4786 * inferior.c (free_inferior): Convert to ...
4787 (inferior::~inferior): ... this dtor.
4788 (inferior::inferior): New ctor, factored out from ...
4789 (add_inferior_silent): ... here. Allocate the inferior with a new
4790 expression.
4791 (delete_inferior): Call delete instead of free_inferior.
4792 * inferior.h (gdb_environ, continuation): Forward declare.
4793 (inferior): Now a class. Add in-class initialization to all
4794 members. Make boolean fields bool, except 'detaching'.
4795 (inferior::inferior): New explicit ctor.
4796 (inferior::~inferior): New.
4797
4798 2017-04-13 Pedro Alves <palves@redhat.com>
4799
4800 * inferior.c (init_inferior_list): Delete.
4801 * inferior.h (init_inferior_list): Delete.
4802
4803 2017-04-13 Pedro Alves <palves@redhat.com>
4804
4805 PR threads/13217
4806 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
4807 (top level): Call it twice, with different thread sets.
4808
4809 2017-04-13 Pedro Alves <palves@redhat.com>
4810
4811 * thread.c: Include <algorithm>.
4812 (thread_array_cleanup): Delete.
4813 (scoped_inc_dec_ref): New class.
4814 (live_threads_count): New function.
4815 (set_thread_refcount): Delete.
4816 (tp_array_compar_ascending): Now a bool.
4817 (tp_array_compar): Convert to a std::sort comparison function.
4818 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
4819 and live_threads_count.
4820
4821 2017-04-13 Pedro Alves <palves@redhat.com>
4822
4823 * infrun.c (follow_fork_inferior): Also switch the current
4824 inferior.
4825
4826 2017-04-13 Pedro Alves <palves@redhat.com>
4827
4828 * breakpoint.c (watch_command_1): Save watchpoint-frame info
4829 before calling create_internal_breakpoint.
4830
4831 2017-04-13 Pedro Alves <palves@redhat.com>
4832
4833 * fork-child.c (execv_argv): New class.
4834 (breakup_args): Refactored as ...
4835 (execv_argv::init_for_no_shell): .. this method of execv_argv.
4836 Copy arguments to storage and replace separators with NULL
4837 terminators in place.
4838 (escape_bang_in_quoted_argument): Adjust to return bool.
4839 (execv_argv::execv_argv): New ctor.
4840 (execv_argv::init_for_shell): New method, factored out from
4841 fork_inferior. Don't strdup strings into the vector.
4842 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
4843 Remove free_vector_argv call.
4844
4845 2017-04-13 Yao Qi <yao.qi@linaro.org>
4846
4847 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
4848 tdep->rx_psw_type.
4849
4850 2017-04-13 Yao Qi <yao.qi@linaro.org>
4851
4852 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
4853 * rx-tdep.c (rx_gdbarch_init): Likewise.
4854
4855 2017-04-13 Pedro Alves <palves@redhat.com>
4856
4857 * breakpoint.h (struct breakpoint): Reindent.
4858
4859 2017-04-13 Pedro Alves <palves@redhat.com>
4860
4861 * breakpoint.c (bp_location): Rename to ...
4862 (bp_locations): ... this. All references updated.
4863 (bp_location_count): Rename to ...
4864 (bp_locations_count): ... this. All references updated.
4865 (bp_location_placed_address_before_address_max): Rename to ...
4866 (bp_locations_placed_address_before_address_max): ... this. All
4867 references updated.
4868 (bp_location_shadow_len_after_address_max): Rename to ...
4869 (bp_locations_shadow_len_after_address_max): ... this. All
4870 references updated.
4871 (bp_location_compare_addrs): Rename to ...
4872 (bp_locations_compare_addrs): ... this. All references updated.
4873 (bp_location_compare):Rename to ...
4874 (bp_locations_compare): ... this. All references updated.
4875 (bp_location_target_extensions_update): Rename to ...
4876 (bp_locations_target_extensions_update): ... this. All references
4877 updated.
4878
4879 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4880
4881 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
4882 * common/common.m4: Check headers 'termios.h', 'termio.h' and
4883 'sgtty.h'.
4884 * common/gdb_termios.h: New file, with parts of "terminal.h".
4885 * inflow.c: Include "gdb_termios.h".
4886 * ser-unix.c: Include "gdb_termios.h".
4887 * terminal.h: Move terminal-related defines to
4888 "common/gdb_termios.h".
4889
4890 2017-04-12 Tom Tromey <tom@tromey.com>
4891
4892 * probe.c (parse_probes): Update.
4893 * location.h (delete_event_location): Don't declare.
4894 (event_location_deleter::operator()): Update.
4895 * location.c (event_location_deleter::operator()): Rename from
4896 delete_event_location.
4897 * linespec.h (linespec_result) <location>: Change type to
4898 event_location_up.
4899 * linespec.c (canonicalize_linespec, event_location_to_sals)
4900 (decode_objc): Update.
4901 (linespec_result): Don't call delete_event_location.
4902 * breakpoint.c (create_breakpoints_sal)
4903 (bkpt_probe_create_sals_from_location)
4904 (strace_marker_create_sals_from_location): Update.
4905
4906 2017-04-12 Tom Tromey <tom@tromey.com>
4907
4908 * linespec.h (struct linespec_result): Add constructor and
4909 destructor.
4910 (init_linespec_result, destroy_linespec_result)
4911 (make_cleanup_destroy_linespec_result): Don't declare.
4912 * linespec.c (init_linespec_result): Remove.
4913 (linespec_result::~linespec_result): Rename from
4914 destroy_linespec_result. Update.
4915 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
4916 Remove.
4917 * breakpoint.c (create_breakpoint, break_range_command)
4918 (decode_location_default): Update.
4919 * ax-gdb.c (agent_command_1): Update.
4920
4921 2017-04-12 Tom Tromey <tom@tromey.com>
4922
4923 * remote.c (remote_download_tracepoint): Update.
4924 * python/py-breakpoint.c (bppy_get_location): Update.
4925 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
4926 (gdbscm_breakpoint_location): Update.
4927 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
4928 * breakpoint.h (struct breakpoint) <location, location_range_end>:
4929 Change type to event_location_up.
4930 * breakpoint.c (create_overlay_event_breakpoint)
4931 (create_longjmp_master_breakpoint)
4932 (create_std_terminate_master_breakpoint)
4933 (create_exception_master_breakpoint)
4934 (breakpoint_event_location_empty_p, print_breakpoint_location)
4935 (print_one_breakpoint_location, create_thread_event_breakpoint)
4936 (init_breakpoint_sal, create_breakpoint)
4937 (print_recreate_ranged_breakpoint, break_range_command)
4938 (init_ada_exception_breakpoint, say_where): Update.
4939 (base_breakpoint_dtor): Don't call delete_event_location.
4940 (bkpt_print_recreate, tracepoint_print_recreate)
4941 (dprintf_print_recreate, update_static_tracepoint)
4942 (breakpoint_re_set_default): Update.
4943
4944 2017-04-12 Tom Tromey <tom@tromey.com>
4945
4946 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
4947 type of "to_do". Update.
4948 (compute_stack_depth): Use std::vector.
4949
4950 2017-04-12 Tom Tromey <tom@tromey.com>
4951
4952 * printcmd.c (find_instruction_backward): Use std::vector.
4953
4954 2017-04-12 Tom Tromey <tom@tromey.com>
4955
4956 * symfile.c (objfilep): Remove typedef.
4957 (reread_symbols): Use a std::vector.
4958
4959 2017-04-12 Tom Tromey <tom@tromey.com>
4960
4961 * mi/mi-main.c (exec_direction_forward): Remove.
4962 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
4963 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4964 scoped_restore.
4965 * guile/guile.c (guile_repl_command, guile_command)
4966 (gdbscm_execute_gdb_command): Use scoped_restore.
4967 * go-exp.y (go_parse): Use scoped_restore.
4968 * d-exp.y (d_parse): Use scoped_restore.
4969 * cli/cli-decode.c (cmd_func): Use scoped_restore.
4970 * c-exp.y (c_parse): Use scoped_restore.
4971
4972 2017-04-12 Tom Tromey <tom@tromey.com>
4973
4974 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
4975 (mi_parse): Update return type.
4976 (mi_parse_free): Remove.
4977 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
4978 (mi_parse::~mi_parse): Rename from mi_parse_free.
4979 (mi_parse_cleanup): Remove.
4980 (mi_parse): Return a unique_ptr. Use new.
4981 * mi/mi-main.c (mi_execute_command): Update.
4982
4983 2017-04-12 Tom Tromey <tom@tromey.com>
4984
4985 * location.c (explicit_location_lex_one): Return a
4986 unique_xmalloc_ptr.
4987 (string_to_explicit_location): Update. Remove cleanups.
4988
4989 2017-04-12 Tom Tromey <tom@tromey.com>
4990
4991 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
4992 (compare_value_and_voffset): Change type. Update.
4993 (compute_vtable_size): Change type of "offset_vec".
4994 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
4995 (gnuv3_get_typeid): Remove extraneous declaration.
4996
4997 2017-04-12 Tom Tromey <tom@tromey.com>
4998
4999 * charset.h (wchar_iterator): Fix comment.
5000
5001 2017-04-12 Tom Tromey <tom@tromey.com>
5002
5003 * charset.c (iconv_wrapper): New class.
5004 (cleanup_iconv): Remove.
5005 (convert_between_encodings): Use it.
5006
5007 2017-04-12 Tom Tromey <tom@tromey.com>
5008
5009 * symfile.h (increment_reading_symtab): Update type.
5010 * symfile.c (decrement_reading_symtab): Remove.
5011 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
5012 * psymtab.c (psymtab_to_symtab): Update.
5013 * dwarf2read.c (dw2_instantiate_symtab): Update.
5014
5015 2017-04-12 Tom Tromey <tom@tromey.com>
5016
5017 * jit.c (struct jit_reader): Declare separately. Add constructor
5018 and destructor. Change type of "handle".
5019 (loaded_jit_reader): Define separately.
5020 (jit_reader_load): Update. New "new".
5021 (jit_reader_unload_command): Use "delete".
5022 * gdb-dlfcn.h (struct dlclose_deleter): New.
5023 (gdb_dlhandle_up): New typedef.
5024 (gdb_dlopen, gdb_dlsym): Update types.
5025 (gdb_dlclose): Remove.
5026 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
5027 (gdb_dlsym): Change type of "handle".
5028 (make_cleanup_dlclose): Remove.
5029 (dlclose_deleter::operator()): Rename from gdb_dlclose.
5030 * compile/compile-c-support.c (load_libcc): Update.
5031
5032 2017-04-12 Tom Tromey <tom@tromey.com>
5033
5034 * symtab.h (find_pcs_for_symtab_line): Change return type.
5035 * symtab.c (find_pcs_for_symtab_line): Change return type.
5036 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
5037 type of "vec". Update.
5038 (ltpy_get_pcs_for_line): Update.
5039 * linespec.c (decode_digits_ordinary): Update.
5040
5041 2017-04-12 Tom Tromey <tom@tromey.com>
5042
5043 * tracepoint.c (actions_command): Update.
5044 * python/python.c (python_command, python_interactive_command):
5045 Update.
5046 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5047 * guile/guile.c (guile_command): Update.
5048 * defs.h (read_command_lines, read_command_lines_1): Return
5049 command_line_up.
5050 (command_lines_deleter): New struct.
5051 (command_line_up): New typedef.
5052 * compile/compile.c (compile_code_command)
5053 (compile_print_command): Update.
5054 * cli/cli-script.h (get_command_line, copy_command_lines): Return
5055 command_line_up.
5056 (make_cleanup_free_command_lines): Remove.
5057 * cli/cli-script.c (get_command_line, read_command_lines_1)
5058 (copy_command_lines): Return command_line_up.
5059 (while_command, if_command, read_command_lines, define_command)
5060 (document_command): Update.
5061 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
5062 Remove.
5063 * breakpoint.h (breakpoint_set_commands): Change type of
5064 "commands".
5065 * breakpoint.c (breakpoint_set_commands): Change type of
5066 "commands". Update.
5067 (do_map_commands_command, update_dprintf_command_list)
5068 (create_tracepoint_from_upload): Update.
5069
5070 2017-04-12 Tom Tromey <tom@tromey.com>
5071
5072 * tracepoint.c (scope_info): Update.
5073 * spu-tdep.c (spu_catch_start): Update.
5074 * python/python.c (gdbpy_decode_line): Update.
5075 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
5076 * python/py-breakpoint.c (bppy_init): Update.
5077 * probe.c (parse_probes): Update.
5078 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
5079 * location.h (event_location_deleter): New struct.
5080 (event_location_up): New typedef.
5081 (new_linespec_location, new_address_location, new_probe_location)
5082 (new_explicit_location, copy_event_location)
5083 (string_to_event_location, string_to_event_location_basic)
5084 (string_to_explicit_location): Update return type.
5085 (make_cleanup_delete_event_location): Remove.
5086 * location.c (new_linespec_location, new_address_location)
5087 (new_probe_location, new_explicit_location, copy_event_location):
5088 Return event_location_up.
5089 (delete_event_location_cleanup)
5090 (make_cleanup_delete_event_location): Remove.
5091 (string_to_explicit_location, string_to_event_location_basic)
5092 (string_to_event_location): Return event_location_up.
5093 * linespec.c (canonicalize_linespec, event_location_to_sals)
5094 (decode_line_with_current_source)
5095 (decode_line_with_last_displayed, decode_objc): Update.
5096 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
5097 * completer.c (location_completer): Update.
5098 * cli/cli-cmds.c (edit_command, list_command): Update.
5099 * breakpoint.c (create_overlay_event_breakpoint)
5100 (create_longjmp_master_breakpoint)
5101 (create_std_terminate_master_breakpoint)
5102 (create_exception_master_breakpoint)
5103 (create_thread_event_breakpoint): Update.
5104 (init_breakpoint_sal): Update. Remove some dead code.
5105 (create_breakpoint_sal): Change type of "location". Update.
5106 (create_breakpoints_sal, create_breakpoint, break_command_1)
5107 (dprintf_command, break_range_command, until_break_command)
5108 (init_ada_exception_breakpoint)
5109 (strace_marker_create_sals_from_location)
5110 (update_static_tracepoint, trace_command, ftrace_command)
5111 (strace_command, create_tracepoint_from_upload): Update.
5112 * break-catch-throw.c (re_set_exception_catchpoint): Update.
5113 * ax-gdb.c (agent_command_1): Update.
5114
5115 2017-04-12 Pedro Alves <palves@redhat.com>
5116
5117 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
5118 * configure.tgt: Handle i[34567]86-*-go32* and
5119 i[34567]86-*-msdosdjgpp*.
5120 * i386-tdep.c (i386_svr4_reg_to_regnum):
5121 Make extern.
5122 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
5123 i386-go32-tdep.c.
5124 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
5125 * i386-go32-tdep.c: New file.
5126 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
5127 declarations.
5128
5129 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
5130
5131 * aix-thread.c (pd_status2str): Change return type to const char *.
5132
5133 2017-04-12 Pedro Alves <palves@redhat.com>
5134
5135 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
5136 calls to set_gdbarch_gnu_triplet_regexp.
5137
5138 2017-04-12 Pedro Alves <palves@redhat.com>
5139
5140 PR gdb/21323
5141 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
5142 New enum value.
5143 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
5144 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
5145 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
5146 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
5147 * gdbarch.h, gdbarch.c: Regenerate.
5148 * aarch64-tdep.c (aarch64_gdbarch_init): Override
5149 gdbarch_wchar_bit and gdbarch_wchar_signed.
5150 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
5151 * arm-tdep.c (arm_gdbarch_init): Likewise.
5152 * avr-tdep.c (avr_gdbarch_init): Likewise.
5153 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
5154 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
5155 * i386-tdep.c (i386_go32_init_abi): Likewise.
5156 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5157 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5158 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5159 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5160 * sh-tdep.c (sh_gdbarch_init): Likewise.
5161 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5162 * sparc64-tdep.c (sparc64_init_abi): Likewise.
5163 * windows-tdep.c (windows_init_abi): Likewise.
5164 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5165
5166 2017-04-12 Pedro Alves <palves@redhat.com>
5167
5168 PR c++/21323
5169 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
5170 cplus_primitive_type_char32_t>: New enum values.
5171 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
5172 and cplus_primitive_type_char32_t.
5173 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
5174 32, use the archtecture's built-in type for char16_t and char32_t,
5175 respectively. Otherwise, fallback to init_integer_type as before,
5176 but make the type unsigned, and issue a complaint.
5177 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
5178
5179 2017-04-12 Alan Hayward <alan.hayward@arm.com>
5180
5181 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
5182 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
5183
5184 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
5185
5186 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
5187 'const char *'.
5188
5189 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
5190
5191 * common/common-utils.c (free_vector_argv): New function.
5192 * common/common-utils.h: Include <vector>.
5193 (free_vector_argv): New prototype.
5194 * darwin-nat.c (darwin_create_inferior): Rewrite function
5195 prototype in order to constify "exec_file" and accept a
5196 "std::string" for "allargs".
5197 * fork-child.c: Include <vector>.
5198 (breakup_args): Rewrite function, using C++.
5199 (fork_inferior): Rewrite function header, constify "exec_file_arg"
5200 and accept "std::string" for "allargs". Update the code to
5201 calculate "argv" based on "allargs". Update calls to "exec_fun"
5202 and "execvp".
5203 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
5204 order to constify "exec_file" and accept a "std::string" for
5205 "allargs".
5206 * go32-nat.c (go32_create_inferior): Likewise.
5207 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
5208 * infcmd.c (run_command_1): Constify "exec_file". Use
5209 "std::string" for inferior arguments.
5210 * inferior.h (fork_inferior): Update prototype.
5211 * linux-nat.c (linux_nat_create_inferior): Rewrite function
5212 prototype in order to constify "exec_file" and accept a
5213 "std::string" for "allargs".
5214 * nto-procfs.c (procfs_create_inferior): Likewise.
5215 * procfs.c (procfs_create_inferior): Likewise.
5216 * remote-sim.c (gdbsim_create_inferior): Likewise.
5217 * remote.c (extended_remote_run): Update code to accept
5218 "std::string" as argument.
5219 (extended_remote_create_inferior): Rewrite function prototype in
5220 order to constify "exec_file" and accept a "std::string" for
5221 "allargs".
5222 * rs6000-nat.c (super_create_inferior): Likewise.
5223 (rs6000_create_inferior): Likewise.
5224 * target.h (struct target_ops) <to_create_inferior>: Likewise.
5225 * windows-nat.c (windows_create_inferior): Likewise.
5226
5227 2017-04-11 Pedro Alves <palves@redhat.com>
5228
5229 * thread.c: Fix whitespace throughout.
5230
5231 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
5232
5233 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
5234
5235 2017-04-11 Alan Hayward <alan.hayward@arm.com>
5236
5237 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
5238
5239 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
5240
5241 PR gdb/21364
5242 * osdata.c (info_osdata): Check if 'type' is an empty string
5243 instead of NULL.
5244
5245 2017-04-10 Pedro Alves <palves@redhat.com>
5246
5247 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
5248 (ptid_to_global_thread_id, in_thread_list)
5249 (do_captured_list_thread_ids, set_resumed, set_running)
5250 (set_executing, set_stop_requested, finish_thread_state)
5251 (validate_registers_access, can_access_registers_ptid)
5252 (print_thread_info_1, switch_to_thread)
5253 (do_restore_current_thread_cleanup)
5254 (make_cleanup_restore_current_thread, thread_command)
5255 (thread_name_command): Use operator== instead of ptid_equal.
5256
5257 2017-04-10 Pedro Alves <palves@redhat.com>
5258
5259 * thread.c (struct current_thread_cleanup) <next>: Delete field.
5260 (current_thread_cleanup_chain): Delete.
5261 (restore_current_thread_cleanup_dtor)
5262 (make_cleanup_restore_current_thread): Remove references to
5263 current_thread_cleanup_chain.
5264
5265 2017-04-10 Alan Hayward <alan.hayward@arm.com>
5266
5267 * msp430-tdep.c (msp430_pseudo_register_read): Never return
5268 REG_UNKNOWN.
5269
5270 2017-04-10 Yao Qi <yao.qi@linaro.org>
5271
5272 PR gdb/19942
5273 * gdbthread.h (thread_info::deletable): New method.
5274 (thread_info::incref): New method.
5275 (thread_info::decref): New method.
5276 (thread_info::refcount): Move it to private.
5277 * infrun.c (save_stop_context): Call inc_refcount.
5278 (release_stop_context_cleanup): Likewise.
5279 * thread.c (set_thread_exited): New function.
5280 (init_thread_list): Delete "tp" only it is deletable, otherwise
5281 call set_thread_exited.
5282 (delete_thread_1): Call set_thread_exited.
5283 (current_thread_cleanup) <inferior_pid>: Remove.
5284 <thread>: New field.
5285 (restore_current_thread_ptid_changed): Removed.
5286 (do_restore_current_thread_cleanup): Adjust.
5287 (restore_current_thread_cleanup_dtor): Don't call
5288 find_thread_ptid.
5289 (set_thread_refcount): Use dec_refcount.
5290 (make_cleanup_restore_current_thread): Adjust.
5291 (thread_apply_all_command): Call inc_refcount.
5292 (_initialize_thread): Don't call
5293 observer_attach_thread_ptid_changed.
5294
5295 2017-04-10 Yao Qi <yao.qi@linaro.org>
5296
5297 * thread.c (delete_thread_1): Hoist code on marking thread as
5298 exited.
5299
5300 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5301
5302 * windows-nat.c (windows_detach): Initialize ptid with
5303 minus_one_ptid.
5304
5305 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
5306
5307 * unittests/ptid-selftests.c: Fix erroneous assert messages.
5308
5309 2017-04-07 Alan Hayward <alan.hayward@arm.com>
5310
5311 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
5312 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
5313 (bfin_pseudo_register_write): Likewise
5314
5315 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
5316
5317 * common/ptid.h (struct ptid): Change to...
5318 (class ptid_t): ... this.
5319 <ptid_t>: New constructors.
5320 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
5321 matches>: New methods.
5322 <make_null, make_minus_one>: New static methods.
5323 <pid>: Rename to...
5324 <m_pid>: ...this.
5325 <lwp>: Rename to...
5326 <m_lwp>: ...this.
5327 <tid>: Rename to...
5328 <m_tid>: ...this.
5329 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
5330 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
5331 as references, move comment to class ptid_t.
5332 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
5333 ptid_t static methods.
5334 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
5335 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
5336 Take ptid arguments as references, implement using ptid_t methods.
5337 * unittests/ptid-selftests.c: New file.
5338 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5339 unittests/ptid-selftests.c.
5340 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
5341
5342 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
5343
5344 * python/python.c (python_run_simple_file): Cast mode literal to
5345 non-const char pointer as expected by PyFile_FromString.
5346
5347 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
5348
5349 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
5350 minus_one_ptid and null_ptid.
5351
5352 2017-04-05 Pedro Alves <palves@redhat.com>
5353
5354 * warning.m4 (build_warnings): Remove -Wno-write-strings.
5355 * configure: Regenerate.
5356
5357 2017-04-05 Pedro Alves <palves@redhat.com>
5358
5359 * ada-exp.y (yyerror): Constify.
5360 * ada-lang.c (bound_name, get_selections)
5361 (ada_variant_discrim_type)
5362 (ada_variant_discrim_name, ada_value_struct_elt)
5363 (ada_lookup_struct_elt_type, is_unchecked_variant)
5364 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
5365 (catch_ada_exception_command_split)
5366 (catch_ada_assert_command_split, catch_assert_command)
5367 (ada_op_name): Constify.
5368 * ada-lang.h (ada_yyerror, get_selections)
5369 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
5370 * arc-tdep.c (arc_print_frame_cache): Constify.
5371 * arm-tdep.c (arm_skip_stub): Constify.
5372 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
5373 (gen_aggregate_elt_ref): Constify.
5374 * bcache.c (print_bcache_statistics): Constify.
5375 * bcache.h (print_bcache_statistics): Constify.
5376 * break-catch-throw.c (catch_exception_command_1):
5377 * breakpoint.c (struct ep_type_description::description):
5378 Constify.
5379 (add_solib_catchpoint): Constify.
5380 (catch_fork_command_1): Add cast.
5381 (add_catch_command): Constify.
5382 * breakpoint.h (add_catch_command, add_solib_catchpoint):
5383 Constify.
5384 * bsd-uthread.c (bsd_uthread_state): Constify.
5385 * buildsym.c (patch_subfile_names): Constify.
5386 * buildsym.h (next_symbol_text_func, patch_subfile_names):
5387 Constify.
5388 * c-exp.y (yyerror): Constify.
5389 (token::oper): Constify.
5390 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
5391 * c-varobj.c (cplus_describe_child): Constify.
5392 * charset.c (find_charset_names): Add cast.
5393 (find_charset_names): Constify array and add const_cast.
5394 * cli/cli-cmds.c (complete_command, cd_command): Constify.
5395 (edit_command): Constify.
5396 * cli/cli-decode.c (lookup_cmd): Constify.
5397 * cli/cli-dump.c (dump_memory_command, dump_value_command):
5398 Constify.
5399 (struct dump_context): Constify.
5400 (add_dump_command, restore_command): Constify.
5401 * cli/cli-script.c (get_command_line): Constify.
5402 * cli/cli-script.h (get_command_line): Constify.
5403 * cli/cli-utils.c (check_for_argument): Constify.
5404 * cli/cli-utils.h (check_for_argument): Constify.
5405 * coff-pe-read.c (struct read_pe_section_data): Constify.
5406 * command.h (lookup_cmd): Constify.
5407 * common/print-utils.c (decimal2str): Constify.
5408 * completer.c (gdb_print_filename): Constify.
5409 * corefile.c (set_gnutarget): Constify.
5410 * cp-name-parser.y (yyerror): Constify.
5411 * cp-valprint.c (cp_print_class_member): Constify.
5412 * cris-tdep.c (cris_register_name, crisv32_register_name):
5413 Constify.
5414 * d-exp.y (yyerror): Constify.
5415 (struct token::oper): Constify.
5416 * d-lang.h (d_yyerror): Constify.
5417 * dbxread.c (struct header_file_location::name): Constify.
5418 (add_old_header_file, add_new_header_file, last_function_name)
5419 (dbx_next_symbol_text, add_bincl_to_list)
5420 (find_corresponding_bincl_psymtab, set_namestring)
5421 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
5422 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
5423 * defs.h (command_line_input, print_address_symbolic)
5424 (deprecated_readline_begin_hook): Constify.
5425 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
5426 Constify.
5427 * event-top.c (handle_line_of_input): Constify and add cast.
5428 * exceptions.c (catch_errors): Constify.
5429 * exceptions.h (catch_errors): Constify.
5430 * expprint.c (print_subexp_standard, op_string, op_name)
5431 (op_name_standard, dump_raw_expression, dump_raw_expression):
5432 * expression.h (op_name, op_string, dump_raw_expression):
5433 Constify.
5434 * f-exp.y (yyerror): Constify.
5435 (struct token::oper): Constify.
5436 (struct f77_boolean_val::name): Constify.
5437 * f-lang.c (f_word_break_characters): Constify.
5438 * f-lang.h (f_yyerror): Constify.
5439 * fork-child.c (fork_inferior): Add cast.
5440 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
5441 (new_variant): Constify.
5442 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
5443 * gdbarch.c: Regenerate.
5444 * gdbcore.h (set_gnutarget): Constify.
5445 * go-exp.y (yyerror): Constify.
5446 (token::oper): Constify.
5447 * go-lang.h (go_yyerror): Constify.
5448 * go32-nat.c (go32_sysinfo): Constify.
5449 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
5450 * guile/scm-cmd.c (cmdscm_function): Constify.
5451 * guile/scm-param.c (pascm_param_value): Constify.
5452 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
5453 (h8300sx_register_name): Constify.
5454 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
5455 Constify.
5456 * ia64-tdep.c (ia64_register_names): Constify.
5457 * infcmd.c (construct_inferior_arguments): Constify.
5458 (path_command, attach_post_wait): Constify.
5459 * language.c (show_range_command, show_case_command)
5460 (unk_lang_error): Constify.
5461 * language.h (language_defn::la_error)
5462 (language_defn::la_name_of_this): Constify.
5463 * linespec.c (decode_line_2): Constify.
5464 * linux-thread-db.c (thread_db_err_str): Constify.
5465 * lm32-tdep.c (lm32_register_name): Constify.
5466 * m2-exp.y (yyerror): Constify.
5467 * m2-lang.h (m2_yyerror): Constify.
5468 * m32r-tdep.c (m32r_register_names): Constify and make static.
5469 * m68hc11-tdep.c (m68hc11_register_names): Constify.
5470 * m88k-tdep.c (m88k_register_name): Constify.
5471 * macroexp.c (appendmem): Constify.
5472 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
5473 (upgrade_type, parse_external, parse_partial_symbols)
5474 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
5475 (new_symbol): Constify.
5476 * memattr.c (mem_info_command): Constify.
5477 * mep-tdep.c (register_name_from_keyword): Constify.
5478 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
5479 Constify.
5480 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
5481 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
5482 * mi/mi-main.c (captured_mi_execute_command): Constify and add
5483 cast.
5484 (mi_execute_async_cli_command): Constify.
5485 * mips-tdep.c (mips_register_name): Constify.
5486 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
5487 (am33_register_name, am33_2_register_name)
5488 * moxie-tdep.c (moxie_register_names): Constify.
5489 * nat/linux-osdata.c (osdata_type): Constify fields.
5490 * nto-tdep.c (nto_parse_redirection): Constify.
5491 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
5492 (lookup_child_selector): Constify.
5493 (objc_methcall::name): Constify.
5494 * objc-lang.h (lookup_objc_class, lookup_child_selector)
5495 (lookup_struct_typedef): Constify.
5496 * objfiles.c (pc_in_section): Constify.
5497 * objfiles.h (pc_in_section): Constify.
5498 * p-exp.y (struct token::oper): Constify.
5499 (yyerror): Constify.
5500 * p-lang.h (pascal_yyerror): Constify.
5501 * parser-defs.h (op_name_standard): Constify.
5502 (op_print::string): Constify.
5503 (exp_descriptor::op_name): Constify.
5504 * printcmd.c (print_address_symbolic): Constify.
5505 * psymtab.c (print_partial_symbols): Constify.
5506 * python/py-breakpoint.c (stop_func): Constify.
5507 (bppy_get_expression): Constify.
5508 * python/py-cmd.c (cmdpy_completer::name): Constify.
5509 (cmdpy_function): Constify.
5510 * python/py-event.c (evpy_add_attribute)
5511 (gdbpy_initialize_event_generic): Constify.
5512 * python/py-event.h (evpy_add_attribute)
5513 (gdbpy_initialize_event_generic): Constify.
5514 * python/py-evts.c (add_new_registry): Constify.
5515 * python/py-finishbreakpoint.c (outofscope_func): Constify.
5516 * python/py-framefilter.c (get_py_iter_from_func): Constify.
5517 * python/py-inferior.c (get_buffer): Add cast.
5518 * python/py-param.c (parm_constant::name): Constify.
5519 * python/py-unwind.c (fprint_frame_id): Constify.
5520 * python/python.c (gdbpy_parameter_value): Constify.
5521 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
5522 * remote.c (memory_packet_config::name): Constify.
5523 (show_packet_config_cmd, remote_write_bytes)
5524 (remote_buffer_add_string):
5525 * reverse.c (exec_reverse_once): Constify.
5526 * rs6000-tdep.c (variant::name, variant::description): Constify.
5527 * rust-exp.y (rustyyerror): Constify.
5528 * rust-lang.c (rust_op_name): Constify.
5529 * rust-lang.h (rustyyerror): Constify.
5530 * serial.h (serial_ops::name): Constify.
5531 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
5532 (sh_sh3e_register_name, sh_sh2e_register_name)
5533 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
5534 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
5535 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
5536 (sh_sh4al_dsp_register_name): Constify.
5537 * sh64-tdep.c (sh64_register_name): Constify.
5538 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
5539 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
5540 * stabsread.c (patch_block_stabs, read_type_number)
5541 (ref_map::stabs, ref_add, process_reference)
5542 (symbol_reference_defined, define_symbol, define_symbol)
5543 (error_type, read_type, read_member_functions, read_cpp_abbrev)
5544 (read_one_struct_field, read_struct_fields, read_baseclasses)
5545 (read_tilde_fields, read_struct_type, read_array_type)
5546 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
5547 (read_huge_number, read_range_type, read_args, common_block_start)
5548 (find_name_end): Constify.
5549 * stabsread.h (common_block_start, define_symbol)
5550 (process_one_symbol, symbol_reference_defined, ref_add):
5551 * symfile.c (get_section_index, add_symbol_file_command):
5552 * symfile.h (get_section_index): Constify.
5553 * target-descriptions.c (tdesc_type::name): Constify.
5554 (tdesc_free_type): Add cast.
5555 * target.c (find_default_run_target):
5556 (add_deprecated_target_alias, find_default_run_target)
5557 (target_announce_detach): Constify.
5558 (do_option): Constify.
5559 * target.h (add_deprecated_target_alias): Constify.
5560 * thread.c (print_thread_info_1): Constify.
5561 * top.c (deprecated_readline_begin_hook, command_line_input):
5562 Constify.
5563 (init_main): Add casts.
5564 * top.h (handle_line_of_input): Constify.
5565 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
5566 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
5567 (tfind_command): Rename to ...
5568 (tfind_command_1): ... this and constify.
5569 (tfind_command): New function.
5570 (tfind_end_command, tfind_start_command): Adjust.
5571 (encode_source_string): Constify.
5572 * tracepoint.h (encode_source_string): Constify.
5573 * tui/tui-data.c (tui_partial_win_by_name): Constify.
5574 * tui/tui-data.h (tui_partial_win_by_name): Constify.
5575 * tui/tui-source.c (tui_set_source_content_nil): Constify.
5576 * tui/tui-source.h (tui_set_source_content_nil): Constify.
5577 * tui/tui-win.c (parse_scrolling_args): Constify.
5578 * tui/tui-windata.c (tui_erase_data_content): Constify.
5579 * tui/tui-windata.h (tui_erase_data_content): Constify.
5580 * tui/tui-winsource.c (tui_erase_source_content): Constify.
5581 * tui/tui.c (tui_enable): Add cast.
5582 * utils.c (defaulted_query): Constify.
5583 (init_page_info): Add cast.
5584 (puts_debug, subset_compare): Constify.
5585 * utils.h (subset_compare): Constify.
5586 * varobj.c (varobj_format_string): Constify.
5587 * varobj.h (varobj_format_string): Constify.
5588 * vax-tdep.c (vax_register_name): Constify.
5589 * windows-nat.c (windows_detach): Constify.
5590 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
5591 * xml-support.c (gdb_xml_end_element): Constify.
5592 * xml-tdesc.c (tdesc_start_reg): Constify.
5593 * xstormy16-tdep.c (xstormy16_register_name): Constify.
5594 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
5595 * xtensa-tdep.h (xtensa_register_t::name): Constify.
5596
5597 2017-04-05 Pedro Alves <palves@redhat.com>
5598
5599 * proc-api.c (struct trans): Constify.
5600 (procfs_note): Constify.
5601 * proc-events.c (struct trans, syscall_table):
5602 * proc-flags.c (struct trans): Constify.
5603 * proc-utils.h (procfs_note): Constify.
5604 * proc-why.c (struct trans): Constify.
5605 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
5606 (procfs_detach): Constify.
5607 * sol-thread.c (struct string_map): Constify.
5608 (td_err_string, td_state_string): Constify.
5609
5610 2017-04-05 Pedro Alves <palves@redhat.com>
5611
5612 * proc-api.c (procfs_filename): Don't initialize
5613 procfs_filename.
5614 (prepare_to_trace): Assume procfs_filename is non-NULL.
5615 (_initialize_proc_api): Give procfs_filename a default value here.
5616
5617 2017-04-05 Pedro Alves <palves@redhat.com>
5618
5619 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
5620 'cond_string' parameter.
5621 (extract_exception_regexp): Constify 'string' parameter.
5622 (catch_exception_command_1): Constify.
5623 * breakpoint.c (init_catchpoint)
5624 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
5625 parameter.
5626 (ep_parse_optional_if_clause, catch_fork_command_1)
5627 (catch_exec_command_1): Constify.
5628 * breakpoint.h (init_catchpoint): Constify 'cond_string'
5629 parameter.
5630 (ep_parse_optional_if_clause): Constify.
5631 * cli/cli-utils.c (remove_trailing_whitespace)
5632 (check_for_argument): Constify.
5633 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
5634 non-const overload.
5635 (check_for_argument): Likewise.
5636
5637 2017-04-05 Pedro Alves <palves@redhat.com>
5638
5639 * event-top.c (command_line_handler): Add cast to execute_command
5640 call.
5641 * record-btrace.c (cmd_record_btrace_bts_start)
5642 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
5643 (cmd_record_btrace_start): Add cast to execute_command call.
5644 * record-full.c (record_full_goto_insn):
5645 * record.c (record_start, record_stop): Add cast to
5646 execute_command_to_string calls.
5647 (cmd_record_start): Add cast to execute_command calls.
5648
5649 2017-04-05 Pedro Alves <palves@redhat.com>
5650
5651 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
5652 static inline function.
5653 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
5654 array and use gdb_PyArg_ParseTupleAndKeywords.
5655 * python/py-cmd.c (cmdpy_init): Likewise.
5656 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
5657 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
5658 (infpy_search_memory): Likewise.
5659 * python/py-objfile.c (objfpy_add_separate_debug_file)
5660 (gdbpy_lookup_objfile): Likewise.
5661 * python/py-symbol.c (gdbpy_lookup_symbol)
5662 (gdbpy_lookup_global_symbol): Likewise.
5663 * python/py-type.c (gdbpy_lookup_type): Likewise.
5664 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
5665 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
5666 Likewise.
5667
5668 2017-04-05 Pedro Alves <palves@redhat.com>
5669
5670 * python/python-internal.h (gdb_PyGetSetDef): New type.
5671 * python/py-block.c (block_object_getset)
5672 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
5673 * python/py-event.c (event_object_getset)
5674 (finish_breakpoint_object_getset): Likewise.
5675 * python/py-inferior.c (inferior_object_getset): Likewise.
5676 * python/py-infthread.c (thread_object_getset): Likewise.
5677 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
5678 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
5679 * python/py-objfile.c (objfile_getset): Likewise.
5680 * python/py-progspace.c (pspace_getset): Likewise.
5681 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
5682 Likewise.
5683 * python/py-record.c (recpy_record_getset): Likewise.
5684 * python/py-symbol.c (symbol_object_getset): Likewise.
5685 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
5686 Likewise.
5687 * python/py-type.c (type_object_getset, field_object_getset):
5688 Likewise.
5689 * python/py-value.c (value_object_getset): Likewise.
5690
5691 2017-04-05 Pedro Alves <palves@redhat.com>
5692
5693 * python/python-internal.h (gdb_PyObject_CallMethod)
5694 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
5695 New functions.
5696 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
5697 (PySys_GetObject, PySys_SetPath): New macros.
5698
5699 2017-04-05 Pedro Alves <palves@redhat.com>
5700
5701 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
5702 info_osdata_command.
5703 * osdata.c (info_osdata_command): Rename to ...
5704 (info_osdata): ... this. Constify 'type' parameter, and remove
5705 the 'from_tty' parameter. Accept NULL TYPE.
5706 (info_osdata_command): New function.
5707 * osdata.h (info_osdata_command): Remove declaration.
5708 (info_osdata): New declaration.
5709
5710 2017-04-05 Pedro Alves <palves@redhat.com>
5711
5712 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
5713 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
5714 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
5715 parameter.
5716 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
5717 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
5718 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
5719 parameter.
5720 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
5721 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
5722 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
5723 (mi_cmd_file_list_exec_source_files)
5724 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
5725 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
5726 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
5727 parameter.
5728 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
5729 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
5730 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
5731 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
5732 (mi_cmd_stack_info_frame): Constify 'command' parameter.
5733 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
5734 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
5735 'command' parameter.
5736 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
5737 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
5738 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
5739 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
5740 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
5741 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
5742 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
5743 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
5744 (mi_cmd_var_set_update_range): Constify 'command' parameter.
5745 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
5746 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
5747 parameter.
5748 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
5749 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
5750 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
5751 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
5752 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
5753 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
5754 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
5755 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
5756 (mi_cmd_data_list_changed_registers)
5757 (mi_cmd_data_write_register_values)
5758 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
5759 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
5760 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
5761 (mi_cmd_list_features, mi_cmd_list_target_features)
5762 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
5763 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
5764 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
5765 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
5766 (mi_cmd_trace_frame_collected): Constify 'command'
5767 parameter.
5768 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
5769 'command' parameter.
5770
5771 2017-04-05 Pedro Alves <palves@redhat.com>
5772
5773 * ada-lang.c (ada_completer_word_break_characters): Now a const
5774 array.
5775 (ada_get_gdb_completer_word_break_characters): Constify.
5776 * completer.c (gdb_completer_command_word_break_characters)
5777 (gdb_completer_file_name_break_characters)
5778 (gdb_completer_quote_characters): Now const arrays.
5779 (get_gdb_completer_quote_characters): Constify.
5780 (set_rl_completer_word_break_characters): New function.
5781 (set_gdb_completion_word_break_characters)
5782 (complete_line_internal): Use it.
5783 * completer.h (get_gdb_completer_quote_characters): Constify.
5784 (set_rl_completer_word_break_characters): Declare.
5785 * f-lang.c (f_word_break_characters): Constify.
5786 * language.c (default_word_break_characters): Constify.
5787 * language.h (language_defn::la_word_break_characters): Constify.
5788 (default_word_break_characters): Constify.
5789 * top.c (init_main): Use set_rl_completer_word_break_characters.
5790
5791 2017-04-05 Pedro Alves <palves@redhat.com>
5792
5793 * aix-thread.c (aix_thread_pid_to_str)
5794 (aix_thread_extra_thread_info): Constify.
5795 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
5796 * bsd-uthread.c (bsd_uthread_extra_thread_info)
5797 (bsd_uthread_pid_to_str): Constify.
5798 * corelow.c (core_pid_to_str): Constify.
5799 * darwin-nat.c (darwin_pid_to_str): Constify.
5800 * fbsd-nat.c (fbsd_pid_to_str): Constify.
5801 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
5802 Constify.
5803 * gnu-nat.c (gnu_pid_to_str): Constify.
5804 * go32-nat.c (go32_pid_to_str): Constify.
5805 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
5806 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
5807 * inferior.c (inferior_pid_to_str): Constify.
5808 * linux-nat.c (linux_nat_pid_to_str): Constify.
5809 * linux-tdep.c (linux_core_pid_to_str): Constify.
5810 * linux-thread-db.c (thread_db_pid_to_str)
5811 (thread_db_extra_thread_info): Constify.
5812 * nto-tdep.c (nto_extra_thread_info): Constify.
5813 * nto-tdep.h (nto_extra_thread_info): Constify.
5814 * obsd-nat.c (obsd_pid_to_str): Constify.
5815 * procfs.c (procfs_pid_to_str): Constify.
5816 * ravenscar-thread.c (ravenscar_extra_thread_info)
5817 (ravenscar_pid_to_str): Constify.
5818 * remote-sim.c (gdbsim_pid_to_str): Constify.
5819 * remote.c (remote_threads_extra_info, remote_pid_to_str):
5820 Constify.
5821 * sol-thread.c (solaris_pid_to_str): Constify.
5822 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
5823 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
5824 * target.c (default_pid_to_str, target_pid_to_str)
5825 (normal_pid_to_str, default_pid_to_str): Constify.
5826 * target.h (target_ops::to_pid_to_str)
5827 (target_ops::to_extra_thread_info): Constify.
5828 (target_pid_to_str, normal_pid_to_str): Constify.
5829 * windows-nat.c (windows_pid_to_str): Constify.
5830 * gdbarch.sh (core_pid_to_str): Constify.
5831 * target-delegates.c: Regenerate.
5832 * gdbarch.h, gdbarch.c: Regenerate.
5833
5834 2017-04-05 Pedro Alves <palves@redhat.com>
5835
5836 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
5837 the memory of the temporary warning_pre_print override.
5838 * utils.c (warning_pre_print): Constify.
5839 * utils.h (warning_pre_print): Constify.
5840
5841 2017-04-05 Pedro Alves <palves@redhat.com>
5842
5843 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
5844 (shell_command): New function.
5845 (make_command): Use std::string.
5846 (init_cli_cmds): Register shell_command instead of shell_escape.
5847
5848 2017-04-05 Pedro Alves <palves@redhat.com>
5849
5850 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
5851 * tracepoint.c (default_collect): Don't initialize.
5852
5853 2017-04-05 Pedro Alves <palves@redhat.com>
5854
5855 * macroexp.c (macro_buffer::shared): Now a bool.
5856 (init_buffer): Update.
5857 (init_shared_buffer): Constify 'addr' parameter.
5858 (substitute_args, expand, macro_expand, macro_expand_next): Remove
5859 casts.
5860
5861 2017-04-05 Pedro Alves <palves@redhat.com>
5862
5863 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
5864 * disasm.c (set_disassembler_options): Constify local.
5865 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
5866
5867 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
5868
5869 PR gdb/21352
5870 * tracefile.c (tsave_command): Fix argument parsing for '-r'
5871 option.
5872
5873 2017-04-05 Yao Qi <yao.qi@linaro.org>
5874
5875 * frame.c (frame_unwind_register_unsigned): Call
5876 frame_unwind_register_value.
5877
5878 2017-04-05 Yao Qi <yao.qi@linaro.org>
5879
5880 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
5881 Use gdb_test_multiple, and don't match anchor.
5882
5883 2017-04-05 Pedro Alves <palves@redhat.com>
5884
5885 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
5886 (Write After Approval): Remove Simon Marchi.
5887
5888 2017-04-05 Pedro Alves <palves@redhat.com>
5889
5890 * common/gdb_optional.h (optional::optional): Make constexpr and
5891 initialize m_dummy.
5892
5893 2017-04-04 John Baldwin <jhb@FreeBSD.org>
5894
5895 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
5896 (amd64fbsd_jmp_buf_reg_offset): Remove.
5897 (amd64fbsd_supply_uthread): Remove function.
5898 (amd64fbsd_collect_uthread): Remove function.
5899 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
5900 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
5901 (x86_64-*-freebsd*): Remove bsd-uthread.o.
5902 (fbsd-nat.c): Update comment.
5903 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
5904 (i386fbsd_jmp_buf_reg_offset): Remove.
5905 (i386fbsd_supply_uthread): Remove function.
5906 (i386fbsd_collect_uthread): Remove function.
5907 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
5908
5909 2017-04-04 John Baldwin <jhb@FreeBSD.org>
5910
5911 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
5912 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
5913 * NEWS: Mention that support for FreeBSD/alpha was removed.
5914 * alpha-fbsd-tdep.c: Delete file.
5915 * config/alpha/fbsd.mh: Delete file.
5916 * configure.host: Delete alpha*-*-freebsd* and
5917 alpha*-*-kfreebsd*-gnu.
5918 * configure.tgt: Delete alpha*-*-freebsd* and
5919 alpha*-*-kfreebsd*-gnu.
5920
5921 2017-04-04 John Baldwin <jhb@FreeBSD.org>
5922
5923 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
5924 amd64bsd_store_inferior_registers): Use ptid from regcache.
5925
5926 2017-04-04 Pedro Alves <palves@redhat.com>
5927
5928 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
5929 data fields, make them private and add "m_" prefixes.
5930 (lnp_state_machine::lnp_state_machine): New ctor.
5931 (record_line, check_line_address, handle_set_discriminator)
5932 (handle_set_address, handle_advance_pc, handle_special_opcode)
5933 (handle_advance_line, handle_set_file, handle_negate_stmt)
5934 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
5935 (end_sequence, advance_line): New methods.
5936 (m_gdbarch, m_record_lines_p): New fields.
5937 (lnp_reader_state): Delete.
5938 (dwarf_record_line): Rename to ...
5939 (lnp_state_machine::record_line): ... adjust.
5940 (init_lnp_state_machine): Delete.
5941 (lnp_state_machine::lnp_state_machine): New.
5942 (check_line_address): Rename to ...
5943 (lnp_state_machine::check_line_address): This.
5944 (dwarf_decode_lines_1): Remove reference to "reader_state".
5945 Adjust lnp_state_machine having a non-default ctor. Use bool.
5946 State machine internal state manipulation moved to
5947 lnp_state_machine methods.
5948
5949 2017-04-04 Pedro Alves <palves@redhat.com>
5950
5951 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5952 unittests/offset-type-selftests.c.
5953 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
5954 * common/offset-type.h: New file.
5955 * common/preprocessor.h: New file.
5956 * common/traits.h: New file.
5957 * common/valid-expr.h: New file.
5958 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
5959 sect_offset and cu_offset strong typedefs throughout.
5960 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
5961 typedefs throughout.
5962 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
5963 sect_offset and cu_offset strong typedefs throughout.
5964 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
5965 typedefs throughout.
5966 * gdbtypes.h: Include "common/offset-type.h".
5967 (cu_offset): Now an offset type (strong typedef) instead of a
5968 struct.
5969 (sect_offset): Likewise.
5970 (union call_site_parameter_u): Rename "param_offset" field to
5971 "param_cu_off".
5972 * unittests/offset-type-selftests.c: New file.
5973
5974 2017-04-04 Pedro Alves <palves@redhat.com>
5975
5976 * common/underlying.h: New file.
5977 * dwarf2read.c: Include "common/gdb_optional.h" and
5978 "common/underlying.h".
5979 (dir_index, file_name_index): New types.
5980 (file_entry): Use them.
5981 (file_entry::include): Use to_underlying.
5982 (line_header::add_file_name): Use dir_index.
5983 (read_formatted_entries): Use gdb::optional. Read form before
5984 writting to file_entry.
5985 (dwarf_decode_line_header): Use dir_index.
5986 (lnp_state_machine::current_file): Use to_underlying.
5987 (lnp_state_machine::file): Change type to file_name_index.
5988 (dwarf_record_line): Use to_underlying.
5989 (init_lnp_state_machine): Use file_name_index.
5990 (dwarf_decode_lines_1): Use dir_index and file_name_index.
5991
5992 2017-04-04 Pedro Alves <palves@redhat.com>
5993
5994 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
5995 operator bool, has_value and get methods.
5996
5997 2017-04-04 Pedro Alves <palves@redhat.com>
5998
5999 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
6000 fields.
6001 (line_header): Initialize all data fields. Change type of
6002 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
6003 Change type of include_dirs to std::vector<const char *>. Remove
6004 num_include_dirs, include_dirs_size. Change type of file_names to
6005 std::vector<file_entry>. Remove num_file_names, file_names_size.
6006 (line_header::line_header): New.
6007 (line_header::add_include_dir, line_header::add_file_name): New
6008 methods.
6009 (line_header::include_dir_at): Remove NULL check.
6010 (line_header::file_name_at): Add const overload.
6011 (line_header_up): New unique_ptr typedef.
6012 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
6013 std::vector. Remove free_line_header call.
6014 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
6015 free_line_header call.
6016 (free_cu_line_header): Delete.
6017 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
6018 (setup_type_unit_groups): Use line_header_up instead of cleanups.
6019 Adjust to use std::vector.
6020 (free_line_header): Delete.
6021 (free_line_header_voidp): Use delete.
6022 (add_include_dir): Replace with ...
6023 (line_header::add_include_dir): ... this method. Use std::vector.
6024 (add_file_name): Replace with ...
6025 (line_header::add_file_name): ... this method. Use std::vector.
6026 (add_include_dir_stub): Delete.
6027 (read_formatted_entries): Remove memset.
6028 (dwarf_decode_line_header): Return a line_header_up instead of a
6029 raw pointer. Remove cleanup handling. Pass lambdas to
6030 read_formatted_entries. Adjust to use line_header methods.
6031 (dwarf_decode_lines_1): Adjust to use line_header methods.
6032 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
6033 use std::vector.
6034
6035 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
6036
6037 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
6038 instead of struct ptid.
6039
6040 2017-05-04 Alan Hayward <alan.hayward@arm.com>
6041
6042 * frame.c (get_frame_register_bytes): Unwind using value.
6043 (put_frame_register_bytes): Likewise.
6044
6045 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
6046
6047 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
6048 aggregate-like.
6049
6050 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
6051
6052 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
6053
6054 2017-03-29 Yao Qi <yao.qi@linaro.org>
6055
6056 * gdbthread.h (struct thread_info): Declare constructor and
6057 destructor. Add some in-class member initializers.
6058 * thread.c (free_thread): Remove.
6059 (init_thread_list): Call delete instead of free_thread.
6060 (new_thread): Call thread_info constructor.
6061 (thread_info::thread_info): New function.
6062 (thread_info::~thread_info): New function.
6063 (delete_thread_1): Call delete instead of free_thread.
6064 (make_cleanup_restore_current_thread): Move tp and frame to
6065 inner block.
6066
6067 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6068
6069 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
6070 (arc_skip_prologue): Likewise.
6071 (arc_make_frame_cache): Likewise.
6072 (arc_pv_get_operand): New function.
6073 (arc_is_in_prologue): Likewise.
6074 (arc_analyze_prologue): Likewise.
6075 (arc_print_frame_cache): Likewise.
6076 (MAX_PROLOGUE_LENGTH): New constant.
6077
6078 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6079
6080 * configure.tgt: Add arc-insn.o.
6081 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
6082 (dump_arc_instruction_command): New function.
6083 (arc_fprintf_disasm): Likewise.
6084 (arc_disassemble_info): Likewise.
6085 (arc_insn_get_operand_value): Likewise.
6086 (arc_insn_get_operand_value_signed): Likewise.
6087 (arc_insn_get_memory_base_reg): Likewise.
6088 (arc_insn_get_memory_offset): Likewise.
6089 (arc_insn_get_branch_target): Likewise.
6090 (arc_insn_dump): Likewise.
6091 (arc_insn_get_linear_next_pc): Likewise.
6092 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
6093 (arc_disassemble_info): Likewise.
6094 (arc_insn_get_branch_target): Likewise.
6095 (arc_insn_get_linear_next_pc): Likewise.
6096 * NEWS: Mention new "maint print arc arc-instruction".
6097
6098 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6099
6100 * arc-tdep (maintenance_print_arc_list): New variable.
6101 (maintenance_print_arc_command): New function.
6102
6103 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6104
6105 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
6106 Add "limm" and "reserved".
6107 (arc_cannot_fetch_register, arc_cannot_store_register): Add
6108 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
6109 * arc-tdep.h (arc_regnum): Likewise.
6110
6111 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6112
6113 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
6114 for THREADPTR register.
6115 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
6116 register.
6117 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
6118 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
6119 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
6120
6121 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6122
6123 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
6124 registers above gdbarch_num_regs (gdbarch) as privileged in
6125 call0 ABI.
6126
6127 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6128
6129 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
6130 for a single specified register or for all registers in
6131 a0_base..a0_base + C0_NREGS range.
6132 (supply_gregset_reg): Call regcache_raw_supply for a single
6133 specified register or for all registers in a0_base..a0_base +
6134 C0_NREGS range.
6135
6136 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6137
6138 * arch/xtensa.h (C0_NREGS): Add definition.
6139 * xtensa-tdep.c (C0_NREGS): Remove definition.
6140
6141 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6142
6143 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
6144 Drop xtensa_default_isa initialization.
6145 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
6146
6147 2017-03-27 Pedro Alves <palves@redhat.com>
6148
6149 * dwarf2read.c (file_entry) <dir_index>: Add comment.
6150 (file_entry::include_dir): New method.
6151 (line_header::include_dir_at, line_header::file_name_at): New
6152 methods.
6153 (setup_type_unit_groups, setup_type_unit_groups)
6154 (psymtab_include_file_name): Simplify using the new methods.
6155 (lnp_state_machine) <the_line_header>: New field.
6156 <file>: Add comment.
6157 (lnp_state_machine::current_file): New method.
6158 (dwarf_record_line): Simplify using the new methods.
6159 (init_lnp_state_machine): Initialize the "the_line_header" field.
6160 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
6161 Simplify using the new methods.
6162
6163 2017-03-27 Pedro Alves <palves@redhat.com>
6164
6165 * cp-name-parser.y (make_empty): Delete.
6166 (demangler_special, nested_name, ptr_operator, array_indicator)
6167 (direct_declarator, declarator_1): Use fill_comp instead of
6168 make_empty.
6169
6170 2017-03-27 Pedro Alves <palves@redhat.com>
6171
6172 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
6173 to ATTRIBUTE_PRINTF.
6174 * solib-target.c (library_list_start_list): Print "string" not
6175 "version".
6176 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
6177 gdb_xml_error call.
6178
6179 2017-03-27 Pedro Alves <palves@redhat.com>
6180
6181 * dwarf2read.c (struct file_and_directory): New.
6182 (dwarf2_get_dwz_file): Adjust to use std::string.
6183 (dw2_get_file_names_reader): Adjust to use file_and_directory.
6184 (find_file_and_directory): Adjust to return a file_and_directory
6185 object.
6186 (read_file_scope): Adjust to use file_and_directory. Remove
6187 make_cleanup/do_cleanups calls.
6188 (open_and_init_dwp_file): Adjust to use std::string. Remove
6189 make_cleanup/do_cleanups calls.
6190 * python/python.c (do_start_initialization): Adjust to ldirname
6191 returning a std::string.
6192 * utils.c (ldirname): Now returns a std::string.
6193 * utils.h (ldirname): Change return type to std::string.
6194 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
6195 returning a std::string.
6196 * xml-tdesc.c (file_read_description_xml): Likewise.
6197
6198 2017-03-24 Alan Hayward <alan.hayward@arm.com>
6199
6200 * regcache.c (regcache_debug_print_register): New function.
6201 * regcache.h (regcache_debug_print_register): New declaration.
6202 * target.c (debug_print_register): Remove.
6203 (target_fetch_registers): Call regcache_debug_print_register.
6204 (target_store_registers): Likewise.
6205
6206 2017-03-24 Pádraig Brady <pbrady@fb.com>
6207
6208 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
6209 reference beyond the 'lh->include_dirs' array before accessing to
6210 it.
6211 (psymtab_include_file_name): Likewise.
6212 (dwarf_decode_lines_1): Likewise.
6213 (dwarf_decode_lines): Likewise.
6214 (file_file_name): Likewise.
6215
6216 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
6217
6218 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
6219 inferior_ptid.
6220 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
6221 ps_lsetfpregs): Likewise.
6222 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
6223 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
6224 ps_lsetfpregs): Likewise.
6225 * target.c (target_fetch_registers, target_store_registers):
6226 Remove asserts.
6227
6228 2017-03-23 Alan Hayward <alan.hayward@arm.com>
6229
6230 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
6231
6232 2017-03-23 Yao Qi <yao.qi@linaro.org>
6233
6234 * aarch64-tdep.c (aarch64_process_record_test): Declare.
6235 (_initialize_aarch64_tdep): Register it.
6236 (aarch64_record_load_store): Handle PRFM instruction.
6237 (aarch64_process_record_test): New function.
6238
6239 2017-03-23 Yao Qi <yao.qi@linaro.org>
6240
6241 * aarch64-tdep.c (aarch64_record_load_store): Fix code
6242 indentation.
6243
6244 2017-03-23 Yao Qi <yao.qi@linaro.org>
6245
6246 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
6247
6248 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6249
6250 python/python.c (do_start_initialization): Fix memory leak.
6251
6252 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6253
6254 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
6255 using get_ptrace_pid.
6256 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
6257 inferior_ptid.
6258 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
6259 inferior_ptid instead of pid.
6260
6261 2017-03-22 Yao Qi <yao.qi@linaro.org>
6262
6263 * aarch64-tdep.c: Wrap locally used classes in anonymous
6264 namespace.
6265 * arm-tdep.c: Likewise.
6266 * linespec.c: Likewise.
6267 * ui-out.c: Likewise.
6268
6269 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
6270
6271 PR gdb/19637
6272 * python/lib/gdb/printer/bound_registers.py: Import sys.
6273
6274 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
6275
6276 * windows-nat.c (do_windows_fetch_inferior_registers): Add
6277 windows_thread_info parameter and use it instead of
6278 current_thread.
6279 (windows_fetch_inferior_registers): Don't set current_thread,
6280 pass the thread to do_windows_fetch_inferior_registers. Use
6281 ptid from regcache instead of inferior_ptid.
6282 (do_windows_store_inferior_registers): Add windows_thread_info
6283 parameter and use it instead of current_thread.
6284 (windows_store_inferior_registers): Don't set current_thread,
6285 pass the thread to do_windows_store_inferior_registers. Use
6286 ptid from regcache instead of inferior_ptid.
6287
6288 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
6289
6290 * ser-mingw.c (ser_windows_raw): Remove reference to
6291 struct serial::current_timeout.
6292
6293 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
6294
6295 PR tdep/20928
6296 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
6297 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
6298 (sparc64_fsr_type): Fix %fsr decoding.
6299
6300 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
6301
6302 * python/py-record-btrace.c (btpy_insn_data): Change return type
6303 for Python 2.
6304
6305 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
6306
6307 * spu-linux-nat.c (spu_fetch_inferior_registers,
6308 spu_store_inferior_registers): Use ptid from regcache, set and
6309 restore inferior_ptid.
6310 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
6311 Likewise.
6312
6313 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
6314
6315 * i386-linux-nat.c (fetch_register, store_register,
6316 i386_linux_fetch_inferior_registers,
6317 i386_linux_store_inferior_registers): Use ptid from regcache.
6318 * ia64-linux-nat.c (ia64_linux_fetch_register,
6319 ia64_linux_store_register): Likewise.
6320 * inf-ptrace.c (inf_ptrace_fetch_register,
6321 inf_ptrace_store_register): Likewise.
6322 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
6323 m32r_linux_store_inferior_registers): Likewise.
6324 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
6325 m68kbsd_store_inferior_registers): Likewise.
6326 * m68k-linux-nat.c (fetch_register, store_register,
6327 m68k_linux_fetch_inferior_registers,
6328 m68k_linux_store_inferior_registers): Likewise.
6329 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
6330 m88kbsd_store_inferior_registers): Likewise.
6331 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
6332 mips_fbsd_store_inferior_registers): Likewise.
6333 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
6334 mips64_linux_regsets_store_registers): Likewise.
6335 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
6336 mipsnbsd_store_inferior_registers): Likewise.
6337 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
6338 mips64obsd_store_inferior_registers): Likewise.
6339 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
6340 Likewise.
6341 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
6342 ppcfbsd_store_inferior_registers): Likewise.
6343 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
6344 ppc_linux_store_inferior_registers): Likewise.
6345 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
6346 ppcnbsd_store_inferior_registers): Likewise.
6347 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
6348 ppcobsd_store_registers): Likewise.
6349 * procfs.c (procfs_fetch_registers, procfs_store_registers):
6350 Likewise.
6351 * ravenscar-thread.c (ravenscar_fetch_registers,
6352 ravenscar_store_registers, ravenscar_prepare_to_store):
6353 Likewise.
6354 * record-btrace.c (record_btrace_fetch_registers,
6355 record_btrace_store_registers, record_btrace_prepare_to_store):
6356 Likewise.
6357 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
6358 Lookup inferior using ptid from regcache, instead of
6359 current_inferior.
6360 * remote.c (remote_fetch_registers, remote_store_registers): Use
6361 ptid from regcache.
6362 * rs6000-nat.c (fetch_register, store_register): Likewise.
6363 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
6364 s390_linux_store_inferior_registers): Likewise.
6365 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
6366 shnbsd_store_inferior_registers): Likewise.
6367 * sol-thread.c (sol_thread_fetch_registers,
6368 sol_thread_store_registers): Likewise.
6369 * sparc-nat.c (sparc_fetch_inferior_registers,
6370 sparc_store_inferior_registers): Likewise.
6371 * tilegx-linux-nat.c (fetch_inferior_registers,
6372 store_inferior_registers): Likewise.
6373 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
6374 vaxbsd_store_inferior_registers): Likewise.
6375 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
6376 store_xtregs): Likewise.
6377
6378 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
6379
6380 PR gdb/14441
6381 * NEWS: Mention support for rvalue references in GDB and python.
6382 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
6383 supports both lvalue and rvalue references.
6384
6385 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
6386
6387 PR gdb/14441
6388 * gdbtypes.c (rank_one_type): Implement overloading
6389 resolution rules regarding rvalue references.
6390
6391 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
6392
6393 PR gdb/14441
6394 * aarch64-tdep.c (aarch64_type_align)
6395 (aarch64_extract_return_value, aarch64_store_return_value): Change
6396 lvalue reference type checks to general reference type checks.
6397 * amd64-tdep.c (amd64_classify): Likewise.
6398 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
6399 Likewise.
6400 * arm-tdep.c (arm_type_align, arm_extract_return_value)
6401 (arm_store_return_value): Likewise.
6402 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
6403 * c-typeprint.c (c_print_type): Likewise.
6404 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
6405 (cplus_number_of_children, cplus_describe_child): Likewise.
6406 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
6407 * completer.c (expression_completer): Likewise.
6408 * cp-support.c (make_symbol_overload_list_adl_namespace):
6409 Likewise.
6410 * darwin-nat-info.c (info_mach_region_command): Likewise.
6411 * dwarf2loc.c (entry_data_value_coerce_ref)
6412 (value_of_dwarf_reg_entry): Likewise.
6413 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
6414 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
6415 Likewise.
6416 * findvar.c (extract_typed_address, store_typed_address):
6417 Likewise.
6418 * gdbtypes.c (rank_one_type): Likewise.
6419 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
6420 * infcall.c (value_arg_coerce): Likewise.
6421 * language.c (pointer_type): Likewise.
6422 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
6423 Likewise.
6424 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
6425 * mn10300-tdep.c (mn10300_type_align): Likewise.
6426 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
6427 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
6428 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
6429 Likewise.
6430 * printcmd.c (print_formatted, x_command): Likewise.
6431 * python/py-type.c (typy_get_composite, typy_template_argument):
6432 Likewise.
6433 * python/py-value.c (valpy_referenced_value)
6434 (valpy_get_dynamic_type, value_has_field): Likewise.
6435 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
6436 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
6437 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
6438 * spu-tdep.c (spu_scalar_value_p): Likewise.
6439 * symtab.c (lookup_symbol_aux): Likewise.
6440 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
6441 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
6442 Likewise.
6443 * valops.c (value_cast_pointers, value_cast)
6444 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
6445 (value_struct_elt, value_struct_elt_bitpos)
6446 (value_find_oload_method_list, find_overload_match)
6447 (value_rtti_indirect_type): Likewise.
6448 * valprint.c (val_print_scalar_type_p, generic_val_print):
6449 Likewise.
6450 * value.c (value_actual_type, value_as_address, unpack_long)
6451 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
6452 (coerce_ref): Likewise.
6453 * varobj.c (varobj_get_value_type): Likewise.
6454
6455 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
6456
6457 PR gdb/14441
6458 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
6459 table of constants.
6460 * python/lib/gdb/command/explore.py: Support exploring values
6461 of rvalue reference types.
6462 * python/lib/gdb/types.py: Implement get_basic_type() for
6463 rvalue reference types.
6464 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
6465 constant.
6466 * python/py-value.c (valpy_getitem): Add an rvalue reference
6467 check.
6468 (valpy_reference_value): Add new parameter "refcode".
6469 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
6470 New wrappers for valpy_reference_value().
6471 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
6472 (gdbpy_invoke_xmethod): Likewise.
6473
6474 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
6475
6476 PR gdb/14441
6477 * dwarf2read.c (process_die, read_type_die_1): Handle the
6478 DW_TAG_rvalue_reference_type DIE.
6479 (read_tag_reference_type): Add new parameter "refcode".
6480
6481 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
6482
6483 PR gdb/14441
6484 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
6485 (c_type_print_modifier, c_type_print_varspec_suffix)
6486 (c_type_print_base): Support printing rvalue reference types.
6487 * c-valprint.c (c_val_print, c_value_print): Support printing
6488 rvalue reference values.
6489
6490 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
6491
6492 PR gdb/14441
6493 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
6494 typename.
6495 * cp-support.c (replace_typedefs): Handle
6496 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
6497 * python/py-type.c (typy_lookup_type): Likewise.
6498
6499 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
6500
6501 PR gdb/14441
6502 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
6503 * parse.c (insert_type): Change assert statement.
6504 (follow_types): Handle rvalue reference types.
6505 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
6506 constant.
6507
6508 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
6509
6510 PR gdb/14441
6511 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
6512 value_ref() interface.
6513 * c-valprint.c (c_value_print): Likewise.
6514 * infcall.c (value_arg_coerce): Likewise.
6515 * python/py-value.c (valpy_reference_value): Likewise.
6516 * valops.c (value_cast, value_reinterpret_cast)
6517 (value_dynamic_cast, typecmp): Likewise.
6518 (value_ref): Parameterize by kind of return value reference type.
6519 * value.h (value_ref): Add new parameter "refcode".
6520
6521 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
6522
6523 PR gdb/14441
6524 * dwarf2read.c (read_tag_reference_type): Use
6525 lookup_lvalue_reference_type() instead of lookup_reference_type().
6526 * eval.c (evaluate_subexp_standard): Likewise.
6527 * f-exp.y: Likewise.
6528 * gdbtypes.c (make_reference_type, lookup_reference_type):
6529 Generalize with rvalue reference types.
6530 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
6531 convenience wrappers for lookup_reference_type().
6532 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
6533 reference kind parameter.
6534 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
6535 wrappers for lookup_reference_type().
6536 * guile/scm-type.c (gdbscm_type_reference): Use
6537 lookup_lvalue_reference_type() instead of lookup_reference_type().
6538 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
6539 * parse.c (follow_types): Likewise.
6540 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
6541 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
6542 Likewise.
6543 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
6544 (gdbpy_invoke_xmethod): Likewise.
6545 * stabsread.c: Provide extra argument to make_reference_type()
6546 call.
6547 * valops.c (value_ref, value_rtti_indirect_type): Use
6548 lookup_lvalue_reference_type() instead of lookup_reference_type().
6549
6550 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
6551
6552 PR gdb/14441
6553 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
6554 (TYPE_IS_REFERENCE): New macro.
6555 (struct type): Add rvalue_reference_type field.
6556 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
6557
6558 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
6559
6560 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
6561 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
6562 New function definition.
6563 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
6564 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
6565 New function declaration.
6566 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
6567 * mi/mi-interp.h: New file.
6568 * solib.c (info_sharedlibrary_command): Replace for loop with
6569 ALL_SO_LIBS macro
6570 * solib.h (update_solib_list): New function declaration.
6571 (so_list_head): Move macro.
6572 * solist.h (ALL_SO_LIBS): New macro.
6573
6574 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
6575
6576 * infcmd.c (post_create_inferior): Remove unused argument in
6577 call to solib_add.
6578 * remote.c (remote_start_remote): Likewise.
6579 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
6580 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
6581 (enable_break): Likewise.
6582 * solib.c (update_solib_list): Remove unused target argument
6583 and its documentation.
6584 (solib_add): Remove unused target argument. Remove unused
6585 argument in call to update_solib_list.
6586 (info_sharedlibrary_command): Remove unused argument in call
6587 to update_solib_list.
6588 (sharedlibrary_command): Remove unused argument in call to
6589 solib_add.
6590 (handle_solib_event): Likewise.
6591 (reload_shared_libraries): Likewise.
6592 * solib.h (solib_add): Remove unused target argument.
6593
6594 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
6595
6596 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
6597 (s390_displaced_step_fixup): Cover relative branches with the
6598 default fixup handling. This fixes lack of support for some
6599 relative branch instructions.
6600
6601 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6602
6603 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
6604 ptid from regcache.
6605
6606 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6607
6608 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
6609 i386_darwin_store_inferior_registers): Use ptid from regcache.
6610
6611 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6612
6613 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
6614 i386bsd_store_inferior_registers): Use ptid from regcache.
6615
6616 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6617
6618 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
6619 hppaobsd_store_registers): Use ptid from regcache.
6620
6621 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6622
6623 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
6624 hppanbsd_store_registers): Use ptid from regcache.
6625
6626 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6627
6628 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
6629 from regcache. Use get_ptrace_pid.
6630
6631 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6632
6633 * corelow.c (get_core_register_section): Use ptid from regcache,
6634 update doc.
6635
6636 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6637
6638 * bsd-uthread.c (bsd_uthread_fetch_registers,
6639 bsd_uthread_store_registers): Use ptid from regcache, set and
6640 restore inferior_ptid.
6641
6642 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6643
6644 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
6645 fetch_fp_regs, store_register, store_regs, store_fp_register,
6646 store_fp_regs): Use ptid from regcache.
6647
6648 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6649
6650 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
6651 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
6652 store_vfp_regs): Use ptid from regcache.
6653
6654 2017-03-17 Pedro Alves <palves@redhat.com>
6655
6656 PR remote/21188
6657 * ser-base.c (ser_base_wait_for): Add comment.
6658 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
6659 version.
6660 * ser-unix.c (hardwire_raw): Remove reference to
6661 scb->current_timeout.
6662 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
6663 (hardwire_ops): Install ser_base_readchar instead of
6664 hardwire_readchar.
6665 * serial.h (struct serial) <current_timeout, timeout_remaining>:
6666 Remove fields.
6667
6668 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
6669
6670 PR gdb/19637
6671 * python/lib/gdb/printer/bound_registers.py: Add support for
6672 Python 3.
6673
6674 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
6675
6676 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
6677 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
6678 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
6679 byte_offset to subobj_byte_offset. Fix the handling of
6680 DWARF_VALUE_STACK on big-endian targets when coming via an
6681 implicit pointer.
6682 (dwarf2_evaluate_loc_desc): Adjust call to
6683 dwarf2_evaluate_loc_desc_full.
6684 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
6685 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
6686
6687 2017-03-16 Yao Qi <yao.qi@linaro.org>
6688
6689 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
6690 and REVSH instructions.
6691
6692 2017-03-16 Yao Qi <yao.qi@linaro.org>
6693
6694 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
6695 (arm_record_test): Declare.
6696 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
6697 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
6698 align with the manual.
6699 (thumb_record_misc): Adjust the code order to align with the
6700 manual.
6701 (thumb2_record_decode_insn_handler): Fix instruction matching.
6702 (instruction_reader_thumb): New class.
6703 (arm_record_test): New function.
6704
6705 2017-03-16 Yao Qi <yao.qi@linaro.org>
6706
6707 * arm-tdep.c (abstract_memory_reader): New class.
6708 (instruction_reader): New class.
6709 (extract_arm_insn): Add argument 'reader'. Callers updated.
6710 (decode_insn): Likewise.
6711
6712 2017-03-16 Doug Evans <dje@google.com>
6713
6714 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
6715 member. Change type of TYPE member to SCM. All uses updated.
6716 (lsscm_make_lazy_string_smob): Add assert.
6717 (lsscm_make_lazy_string): Flag bad length values.
6718 (lsscm_elt_type): New function.
6719 (gdbscm_lazy_string_to_value): Rewrite to use
6720 lsscm_safe_lazy_string_to_value.
6721 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
6722 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
6723 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
6724 in incoming type.
6725 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
6726 * guile/scm-type.c (tyscm_scm_to_type): New function.
6727
6728 2017-03-15 Doug Evans <dje@google.com>
6729
6730 PR python/17728, python/18439, python/18779
6731 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
6732 member. Change type of TYPE member to PyObject *. All uses updated.
6733 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
6734 (gdbpy_create_lazy_string_object): Flag bad length values.
6735 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
6736 Handle typedefs in incoming type.
6737 (stpy_lazy_string_elt_type): New function.
6738 (gdbpy_extract_lazy_string): Call it.
6739 * python/py-value.c (valpy_lazy_string): Flag bad length values.
6740 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
6741 typedefs in incoming type.
6742
6743 2017-03-16 Doug Evans <dje@google.com>
6744
6745 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
6746 * guile/scm-type.c (tyscm_scm_to_type): New function.
6747
6748 2017-03-16 Jiong Wang <jiong.wang@arm.com>
6749
6750 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
6751 "ULONGEST" for "skip".
6752
6753 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
6754
6755 PR gdb/21220
6756 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
6757 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
6758 (inf_ptrace_peek_poke): ...here. New function. Now also loop
6759 over ptrace peek/poke until end of buffer or error.
6760
6761 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
6762
6763 * parse.c (length_of_subexp): Make static.
6764 * parser-defs.h (length_of_subexp): Remove.
6765
6766 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
6767
6768 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
6769 as well.
6770
6771 2017-03-14 Pedro Alves <palves@redhat.com>
6772
6773 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
6774 (main): Use std::unique_ptr. Remove calls to
6775 cp_demangled_name_parse_free.
6776
6777 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6778
6779 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
6780 alphabsd_store_inferior_registers): Use regcache->ptid instead
6781 of inferior_ptid.
6782
6783 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6784
6785 * aix-thread.c (aix_thread_fetch_registers,
6786 aix_thread_store_registers): Use regcache->ptid instead of
6787 inferior_ptid.
6788
6789 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6790
6791 * aarch64-linux-nat.c (fetch_gregs_from_thread,
6792 store_gregs_to_thread, fetch_fpregs_from_thread,
6793 store_fpregs_to_thread): Use regcache->ptid instead of
6794 inferior_ptid.
6795
6796 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6797
6798 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
6799 amd64_linux_fetch_inferior_registers): Use regcache->ptid
6800 instead of inferior_ptid.
6801
6802 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6803
6804 * target.c (target_fetch_registers, target_store_registers): Add
6805 assert.
6806
6807 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6808
6809 * regcache.h (regcache_get_ptid): New function.
6810 * regcache.c (regcache_get_ptid): New function.
6811
6812 2017-03-13 Mark Wielaard <mark@klomp.org>
6813
6814 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
6815
6816 2017-03-10 Keith Seitz <keiths@redhat.com>
6817
6818 PR c++/8218
6819 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
6820
6821 2017-03-08 Pedro Alves <palves@redhat.com>
6822
6823 PR gdb/18360
6824 * infrun.c (start_step_over, do_target_resume, resume)
6825 (restart_threads): Assert we're not resuming a thread that is
6826 meant to be stopped.
6827 (infrun_thread_stop_requested_callback): Delete.
6828 (infrun_thread_stop_requested): If the thread is internally
6829 stopped, queue a pending stop event and clear the thread's
6830 inline-frame state.
6831 (handle_stop_requested): New function.
6832 (handle_syscall_event, handle_inferior_event_1): Use
6833 handle_stop_requested.
6834 (handle_stop_requested): New function.
6835 (handle_signal_stop): Set the thread's stop_signal here instead of
6836 at caller.
6837 (finish_step_over): Clear step over info unconditionally.
6838 (handle_signal_stop): If the user had interrupted the event
6839 thread, consider the stop a random signal.
6840 (handle_signal_stop) <signal arrived while stepping over
6841 breakpoint>: Don't restart threads here.
6842 (stop_waiting): Don't clear step-over info here.
6843
6844 2017-03-08 Pedro Alves <palves@redhat.com>
6845
6846 PR 21206
6847 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
6848 goes to argument 2, not 1.
6849
6850 2017-03-08 Pedro Alves <palves@redhat.com>
6851
6852 PR cli/21218
6853 * top.c (gdb_readline_wrapper): Avoid passing NULL to
6854 display_gdb_prompt.
6855 (command_line_input): Add comment.
6856
6857 2017-03-08 Pedro Alves <palves@redhat.com>
6858
6859 PR tui/21216
6860 * tui/tui-file.c (tui_file::write): New.
6861 * tui/tui-file.h (tui_file): Override "write".
6862 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
6863 factored out from ...
6864 (tui_puts): ... here.
6865 (tui_putc): Use them.
6866 (tui_write): New function.
6867 * tui/tui-io.h (tui_write): Declare.
6868
6869 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
6870
6871 * Makefile.in (SFILES): Replace "environ.c" with
6872 "common/environ.c".
6873 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
6874 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
6875 to...
6876 * common/environ.c: ... here.
6877 * environ.h: Moved to...
6878 * common/environ.h: ... here.
6879
6880 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
6881
6882 * gdbarch.sh (pstring_ptr): New static function.
6883 (gdbarch_disassembler_options): Use it.
6884 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
6885 not valid_disassembler_option->name.
6886 * gdbarch.c: Regenerate.
6887
6888 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
6889
6890 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
6891
6892 2017-03-07 Pedro Alves <palves@redhat.com>
6893
6894 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
6895
6896 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
6897
6898 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
6899 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
6900 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6901 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
6902
6903 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
6904
6905 * xtensa-linux-nat.c (fetch_gregs): Remove const.
6906
6907 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
6908
6909 * remote.c (remote_add_target_side_commands): Use range-based
6910 for loop.
6911
6912 2017-03-03 Yao Qi <yao.qi@linaro.org>
6913
6914 PR gdb/21165
6915 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
6916 value is lazy.
6917 * valprint.c (common_val_print): Likewise.
6918
6919 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
6920
6921 * NEWS: Mention new set/show disassembler-options commands.
6922 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
6923 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
6924 (prospective_options): New static variable.
6925 (gdb_disassembler::gdb_disassembler): Initialize
6926 m_di.disassembler_options.
6927 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
6928 (get_disassembler_options): New function.
6929 (set_disassembler_options): Likewise.
6930 (set_disassembler_options_sfunc): Likewise.
6931 (show_disassembler_options_sfunc): Likewise.
6932 (disassembler_options_completer): Likewise.
6933 (_initialize_disasm): Likewise.
6934 * disasm.h (get_disassembler_options): New prototype.
6935 (set_disassembler_options): Likewise.
6936 * gdbarch.sh (gdbarch_disassembler_options): New variable.
6937 (gdbarch_verify_disassembler_options): Likewise.
6938 * gdbarch.c: Regenerate.
6939 * gdbarch.h: Likewise.
6940 * arm-tdep.c (num_disassembly_options): Delete.
6941 (set_disassembly_style): Likewise.
6942 (arm_disassembler_options): New static variable.
6943 (set_disassembly_style_sfunc): Convert short style name into long
6944 option name. Call set_disassembler_options.
6945 (show_disassembly_style_sfunc): New function.
6946 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
6947 set_gdbarch_verify_disassembler_options.
6948 (_initialize_arm_tdep): Delete regnames variable and update callers.
6949 (arm_disassembler_options): Initialize.
6950 (disasm_options): New variable.
6951 (num_disassembly_options): Rename from this...
6952 (num_disassembly_styles): ...to this. Compute by scanning through
6953 disasm_options.
6954 (valid_disassembly_styles): Initialize using disasm_options.
6955 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
6956 set_arm_regname_option.
6957 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
6958 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
6959 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
6960 set_gdbarch_verify_disassembler_options.
6961 * s390-tdep.c (s390_disassembler_options): New static variable.
6962 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
6963 set_gdbarch_verify_disassembler_options.
6964
6965 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
6966
6967 * remote.c (remote_add_target_side_condition): Remove "struct"
6968 keyword from range-based for loop.
6969
6970 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
6971
6972 * remote.c (remote_add_target_side_condition): Use range-based
6973 for loop. Update comment.
6974
6975 2017-02-27 Yao Qi <yao.qi@linaro.org>
6976
6977 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
6978
6979 2017-02-26 Alan Hayward <alan.hayward@arm.com>
6980
6981 * regcache.c (regcache_raw_update): New function.
6982 (regcache_raw_read): Move code to regcache_raw_update.
6983 * regcache.h (regcache_raw_update): New declaration.
6984 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
6985
6986 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
6987
6988 * dwarf2read.c (create_debug_type_hash_table): Initialize
6989 header.signature and header.type_offset_in_tu.
6990
6991 2017-02-24 Pedro Alves <palves@redhat.com>
6992
6993 * symtab.c (make_file_symbol_completion_list_1): Use
6994 add_symtab_completions.
6995
6996 2017-02-24 Alan Hayward <alan.hayward@arm.com>
6997
6998 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
6999
7000 2017-02-24 Alan Hayward <alan.hayward@arm.com>
7001
7002 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
7003 I386_MAX_REGISTER_SIZE.
7004 (i386_pseudo_register_write): Likewise.
7005 (i386_process_record): Likewise.
7006 * i387-tdep.c (i387_supply_xsave): Likewise.
7007 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
7008 (store_register): Likewise.
7009
7010 2017-02-23 Pedro Alves <palves@redhat.com>
7011
7012 * ada-lang.c: Include "common/function-view.h".
7013 (ada_iterate_over_symbols): Adjust to use function_view as
7014 callback type.
7015 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
7016 (ada_make_symbol_completion_list): Use a lambda.
7017 (ada_exc_search_name_matches): Delete.
7018 (name_matches_regex): New.
7019 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
7020 * compile/compile-c-support.c: Include "common/function-view.h".
7021 (print_one_macro): Change prototype to accept a ui_file pointer.
7022 (write_macro_definitions): Use a lambda.
7023 * dwarf2read.c: Include "common/function-view.h".
7024 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
7025 (dw2_expand_symtabs_matching): Adjust to use function_view as
7026 callback type.
7027 * language.h: Include "common/function-view.h".
7028 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
7029 function_view as callback type.
7030 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
7031 * linespec.c: Include "common/function-view.h".
7032 (collect_info::add_symbol): New method.
7033 (struct symbol_and_data_callback, iterate_inline_only, struct
7034 symbol_matcher_data, iterate_name_matcher): Delete.
7035 (iterate_over_all_matching_symtabs): Adjust to use function_view
7036 as callback type and lambdas.
7037 (iterate_over_file_blocks): Adjust to use function_view as
7038 callback type.
7039 (decode_compound_collector): Now a class with private fields.
7040 (decode_compound_collector::release_symbols): New method.
7041 (collect_one_symbol): Rename to...
7042 (decode_compound_collector::operator()): ... this and adjust.
7043 (lookup_prefix_sym): decode_compound_collector construction bits
7044 move to decode_compound_collector ctor. Pass the
7045 decode_compound_collector object directly as callback. Remove
7046 cleanups and use decode_compound_collector::release_symbols
7047 instead.
7048 (symtab_collector): Now a class with private fields.
7049 (symtab_collector::release_symtabs): New method.
7050 (add_symtabs_to_list): Rename to...
7051 (symtab_collector::operator()): ... this and adjust.
7052 (collect_symtabs_from_filename): symtab_collector construction
7053 bits move to symtab_collector ctor. Pass the symtab_collector
7054 object directly as callback. Remove cleanups and use
7055 symtab_collector::release_symtabs instead.
7056 (collect_symbols): Delete.
7057 (add_matching_symbols_to_info): Use lambdas.
7058 * macrocmd.c (print_macro_callback): Delete.
7059 (info_macro_command): Use a lambda.
7060 (info_macros_command): Pass print_macro_definition as callable
7061 directly.
7062 (print_one_macro): Remove 'ignore' parameter.
7063 (macro_list_command): Adjust.
7064 * macrotab.c (macro_for_each_data::fn): Now a function_view.
7065 (macro_for_each_data::user_data): Delete field.
7066 (foreach_macro): Adjust to call the function_view.
7067 (macro_for_each): Adjust to use function_view as callback type.
7068 (foreach_macro_in_scope): Adjust to call the function_view.
7069 (macro_for_each_in_scope): Adjust to use function_view as callback
7070 type.
7071 * macrotab.h: Include "common/function-view.h".
7072 (macro_callback_fn): Declare a prototype instead of a pointer.
7073 Remove "user_data" parameter.
7074 (macro_for_each, macro_for_each_in_scope): Adjust to use
7075 function_view as callback type.
7076 * psymtab.c (partial_map_expand_apply)
7077 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
7078 Adjust to use function_view as callback type and to return bool.
7079 (psym_expand_symtabs_matching): Adjust to use function_view as
7080 callback types.
7081 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
7082 to use function_view as callback type and to return bool.
7083 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
7084 callback types.
7085 * symfile.c (expand_symtabs_matching): Adjust to use function_view
7086 as callback types.
7087 * symfile.h: Include "common/function-view.h".
7088 (expand_symtabs_file_matcher_ftype)
7089 (expand_symtabs_symbol_matcher_ftype)
7090 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
7091 return bool.
7092 (quick_symbol_functions::map_symtabs_matching_filename)
7093 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
7094 function_view as callback type and return bool.
7095 (expand_symtabs_matching): Adjust to use function_view as callback
7096 type.
7097 (maintenance_expand_name_matcher)
7098 (maintenance_expand_file_matcher): Delete.
7099 (maintenance_expand_symtabs): Use lambdas.
7100 * symtab.c (iterate_over_some_symtabs): Adjust to use
7101 function_view as callback types and return bool.
7102 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
7103 of a cleanup.
7104 (lookup_symtab_callback): Delete.
7105 (lookup_symtab): Use a lambda.
7106 (iterate_over_symbols): Adjust to use function_view as callback
7107 type.
7108 (struct search_symbols_data, search_symbols_file_matches)
7109 (search_symbols_name_matches): Delete.
7110 (search_symbols): Use a pair of lambdas.
7111 (struct add_name_data, add_macro_name, symbol_completion_matcher)
7112 (symtab_expansion_callback): Delete.
7113 (default_make_symbol_completion_list_break_on_1): Use lambdas.
7114 * symtab.h: Include "common/function-view.h".
7115 (iterate_over_some_symtabs): Adjust to use function_view as
7116 callback type and return bool.
7117 (iterate_over_symtabs): Adjust to use function_view as callback
7118 type.
7119 (symbol_found_callback_ftype): Remove 'data' parameter and return
7120 bool.
7121 (iterate_over_symbols): Adjust to use function_view as callback
7122 type.
7123
7124 2017-02-23 Pedro Alves <palves@redhat.com>
7125
7126 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
7127 (%.o) <unittests/%.c>: New pattern.
7128 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
7129 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
7130 * common/function-view.h: New file.
7131 * unittests/function-view-selftests.c: New file.
7132 * configure: Regenerate.
7133
7134 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
7135
7136 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
7137 inferior_ptid.
7138 * go32-nat.c (go32_thread_alive): Likewise.
7139
7140 2017-02-23 Yao Qi <yao.qi@linaro.org>
7141
7142 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
7143 delete.
7144
7145 2017-02-23 Yao Qi <yao.qi@linaro.org>
7146
7147 * varobj.c (varobj_clear_saved_item): Use delete instead of
7148 xfree.
7149 (update_dynamic_varobj_children): Likewise.
7150
7151 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7152
7153 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
7154
7155 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
7156
7157 * common/enum-flags.h (enum_flags::enum_flags): Initialize
7158 m_enum_value to 0 in default constructor.
7159
7160 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7161
7162 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
7163 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
7164 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
7165 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
7166 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
7167 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
7168 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
7169 IS_STORE_CONDITIONAL_INSN.
7170
7171 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7172
7173 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
7174
7175 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7176
7177 * NEWS (Changes since GDB 7.12): Add DWARF-5.
7178
7179 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7180
7181 * dwarf2read.c (skip_one_die, read_attribute_value)
7182 (dwarf2_const_value_attr, dump_die_shallow)
7183 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7184 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
7185
7186 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7187
7188 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
7189 (dwarf_parse_macro_header): Accept DWARF version 5.
7190 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
7191
7192 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7193
7194 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
7195 DW_AT_GNU_*.
7196 * common/common-exceptions.h (enum errors): Likewise.
7197 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
7198 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
7199 (dwarf_expr_context::execute_stack_op): Likewise.
7200 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
7201 Likewise.
7202 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
7203 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
7204 (show_entry_values_debug, call_site_to_target_addr)
7205 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
7206 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
7207 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
7208 (value_of_dwarf_block_entry, indirect_pieced_value)
7209 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
7210 (disassemble_dwarf_expression): Likewise.
7211 * dwarf2read.c (process_die, inherit_abstract_dies)
7212 (read_call_site_scope): Likewise.
7213 * gdbtypes.h (struct func_type, struct call_site_parameter)
7214 (struct call_site): Likewise.
7215 * stack.c (read_frame_arg): Likewise.
7216 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
7217
7218 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7219
7220 * defs.h (read_unsigned_leb128): New declaration.
7221 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
7222 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
7223 (dwarf2_find_location_expression): Call also
7224 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
7225 * dwarf2loc.h (dwarf2_version): New declaration.
7226 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
7227 rnglists.
7228 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
7229 .debug_rnglists.
7230 (struct dwop_section_names): Add loclists_dwo.
7231 (dwop_section_names): Add .debug_loclists.dwo.
7232 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
7233 (struct dwarf2_per_cu_data): Add dwarf_version.
7234 (struct dwo_sections): Add loclists.
7235 (struct attr_abbrev): Add implicit_const.
7236 (read_indirect_line_string): New declaration.
7237 (read_unsigned_leb128): Delete declaration.
7238 (rcuh_kind): New definition.
7239 (read_and_check_comp_unit_head): Change parameter
7240 is_debug_types_section to section_kind.
7241 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
7242 (read_comp_unit_head): Change parameter abfd to section, add parameter
7243 section_kind. Handle DWARF-5.
7244 (error_check_comp_unit_head): Accept also DWARF version 5.
7245 (read_and_check_comp_unit_head): Change parameter
7246 is_debug_types_section to section_kind.
7247 (read_and_check_type_unit_head): Delete function.
7248 (read_abbrev_offset): Handle DWARF-5.
7249 (create_debug_type_hash_table): Add parameter section_kind. Process
7250 only DW_UT_type. Use signature and type_offset_in_tu from struct
7251 comp_unit_head.
7252 (create_debug_types_hash_table): Update create_debug_type_hash_table
7253 caller.
7254 (create_all_type_units): Call create_debug_type_hash_table.
7255 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
7256 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
7257 caller.
7258 (skip_one_die): Handle DW_FORM_implicit_const.
7259 (dwarf2_rnglists_process): New function.
7260 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
7261 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
7262 (read_attribute_value): Handle DW_FORM_implicit_const,
7263 DW_FORM_line_strp.
7264 (read_attribute): Handle DW_FORM_implicit_const.
7265 (read_indirect_string_at_offset_from): New function from
7266 read_indirect_string_at_offset.
7267 (read_indirect_string_at_offset): Call
7268 read_indirect_string_at_offset_from.
7269 (read_indirect_line_string_at_offset): New function.
7270 (read_indirect_string): New function comment.
7271 (read_indirect_line_string): New function.
7272 (read_unsigned_leb128): Make it global.
7273 (dwarf2_string_attr): Handle DWARF-5.
7274 (add_include_dir_stub, read_formatted_entries): New functions.
7275 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
7276 Handle DWARF-5.
7277 (per_cu_header_read_in): Update read_comp_unit_head caller.
7278 (dwarf2_version): New function.
7279 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
7280 rnglists.
7281 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
7282 fields.
7283
7284 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7285
7286 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
7287
7288 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7289
7290 * dwarf2read.c (dwarf2_ranges_process): New function from
7291 dwarf2_ranges_read.
7292 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
7293 dwarf2_ranges_process.
7294
7295 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7296
7297 * dwarf2read.c (create_debug_type_hash_table): New function from
7298 create_debug_types_hash_table.
7299 (create_debug_types_hash_table): Call create_debug_type_hash_table.
7300 (create_all_type_units, open_and_init_dwo_file): Update
7301 create_debug_types_hash_table callers.
7302
7303 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
7304
7305 PR gdb/16188
7306 * fork-child.c (trace_start_error): Fix thinko. va_end should
7307 refer to 'ap', not 'args'.
7308
7309 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
7310 Pedro Alves <palves@redhat.com>
7311
7312 PR gdb/16188
7313 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
7314 calls succeeded.
7315 * fork-child.c (trace_start_error): New function.
7316 (trace_start_error_with_name): Likewise.
7317 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
7318 * inf-ptrace.c (inf_ptrace_me): Likewise.
7319 * inferior.h (trace_start_error): New prototype.
7320 (trace_start_error_with_name): Likewise.
7321
7322 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
7323
7324 PR gdb/21164
7325 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
7326 NULL before using it.
7327 * symmisc.c (maintenance_print_symbols): Likewise.
7328 (maintenance_print_msymbols): Likewise.
7329
7330 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7331
7332 * NEWS: Add record Python bindings entry.
7333
7334 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7335
7336 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
7337 py-record-full.o.
7338 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
7339 * python/py-record-btrace.c, python/py-record-btrace.h,
7340 python/py-record-full.c, python/py-record-full.h: New file.
7341 * python/py-record.c: Add include for py-record-btrace.h and
7342 py-record-full.h.
7343 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
7344 recpy_instruction_history, recpy_function_call_history, recpy_begin,
7345 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
7346 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
7347 New definition.
7348 (gdbpy_initialize_btrace): New export.
7349 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
7350
7351 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7352
7353 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
7354 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
7355 * python/py-record.c: New file.
7356 * python/python-internal.h (gdbpy_start_recording,
7357 gdbpy_current_recording, gdpy_stop_recording,
7358 gdbpy_initialize_record): New export.
7359 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
7360 (python_GdbMethods): Add gdbpy_start_recording,
7361 gdbpy_current_recording and gdbpy_stop_recording.
7362
7363 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7364
7365 * record-btrace.c (record_btrace_record_method): New function.
7366 (init_record_btrace_ops): Initialize to_record_method.
7367 * record-full.c (record_full_record_method): New function.
7368 (init_record_full_ops, init_record_full_core_ops): Add
7369 record_full_record_method.
7370 * record.h (enum record_method): New enum.
7371 * target-debug.h (target_debug_print_enum_record_method: New define.
7372 * target-delegates.c: Regenerate.
7373 * target.c (target_record_method): New function.
7374 * target.h: Include record.h.
7375 (struct target_ops) <to_record_method>: New field.
7376 (target_record_method): New export.
7377
7378 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7379
7380 * record.h (record_start, record_stop): New export.
7381 * record.c (record_start, record_stop): New function.
7382
7383 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7384
7385 * btrace.c (btrace_fetch): Copy function call segments pointer
7386 into a vector.
7387 (btrace_clear): Clear the vector.
7388 (btrace_find_insn_by_number): Use binary search to find the correct
7389 function call segment.
7390 * btrace.h (brace_fun_p): New typedef.
7391 (struct btrace_thread_info) <functions>: New field.
7392
7393 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7394
7395 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
7396 * btrace.c (btrace_decode_error): ... here. New function.
7397 * btrace.h (btrace_decode_error): New export.
7398
7399 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7400
7401 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
7402 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
7403 btrace_find_insn_by_number): Remove special case for gaps.
7404 * btrace.h (btrace_insn_get_error): New export.
7405 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
7406 * record-btrace.c (btrace_insn_history): Print number for gaps.
7407 (record_btrace_info, record_btrace_goto): Handle gaps.
7408
7409 2017-02-14 Tom Tromey <tom@tromey.com>
7410
7411 PR python/13598:
7412 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
7413 event.
7414 * python/py-evts.c (gdbpy_initialize_py_events): Add
7415 before_prompt registry.
7416 * python/py-events.h (events_object) <before_prompt>: New field.
7417
7418 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
7419
7420 * btrace.c (ftrace_new_switch): Preserve up link and flags.
7421
7422 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
7423
7424 * symfile (_initialize_symfile): Add usage text to the load command's
7425 help text.
7426
7427 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
7428
7429 * utils.c (defaulted_query): Don't query on secondary UIs.
7430
7431 2017-02-10 Tom Tromey <tom@tromey.com>
7432
7433 * rust-lang.c (rust_get_disr_info): Remove unused variable.
7434
7435 2017-02-10 Tom Tromey <tom@tromey.com>
7436
7437 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
7438 "cleanup" local.
7439 * python/py-type.c (typy_legacy_template_argument): Remove
7440 unnecessary "cleanup" local.
7441
7442 2017-02-10 Tom Tromey <tom@tromey.com>
7443
7444 * python/python.c (do_start_initialization): New function, from
7445 _initialize_python.
7446 (_initialize_python): Call do_start_initialization.
7447 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
7448 goto.
7449
7450 2017-02-10 Tom Tromey <tom@tromey.com>
7451
7452 * python/py-prettyprint.c (pretty_print_one_value): Use
7453 gdbpy_ref.
7454
7455 2017-02-10 Tom Tromey <tom@tromey.com>
7456
7457 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
7458 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
7459 gdbpy_ref.
7460 * python/py-type.c (field_new): Use gdbpy_ref.
7461 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
7462 gdbpy_ref.
7463 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
7464 (py_free_pspace): Likewise.
7465 (pspace_to_pspace_object): Likewise.
7466 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
7467 (py_free_objfile): Likewise.
7468 (objfile_to_objfile_object): Likewise.
7469 * python/py-inferior.c (delete_thread_object): Use
7470 gdbpy_ref.
7471 (infpy_read_memory): Likewise.
7472 (py_free_inferior): Likewise.
7473 * python/py-evtregistry.c (create_eventregistry_object): Use
7474 gdbpy_ref.
7475 * python/py-event.c (create_event_object): Use gdbpy_ref.
7476
7477 2017-02-10 Tom Tromey <tom@tromey.com>
7478
7479 * python/py-ref.h (gdbpy_ref_policy): Now a template.
7480 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
7481 used.
7482 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
7483 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
7484 python/py-exitedevent.c, python/py-finishbreakpoint.c,
7485 python/py-framefilter.c, python/py-function.c,
7486 python/py-inferior.c, python/py-infevents.c,
7487 python/py-linetable.c, python/py-newobjfileevent.c,
7488 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
7489 python/py-signalevent.c, python/py-stopevent.c,
7490 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
7491 python/py-unwind.c, python/py-utils.c, python/py-value.c,
7492 python/py-varobj.c, python/py-xmethods.c, python/python.c,
7493 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
7494
7495 2017-02-10 Tom Tromey <tom@tromey.com>
7496
7497 * ui-out.h (ui_out_emit_type): New class.
7498 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
7499 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
7500 and ui_out_emit_tuple.
7501 (enumerate_locals): Likewise.
7502 (py_mi_print_variables, py_print_locals, py_print_args): Use
7503 ui_out_emit_list.
7504 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
7505 ui_out_emit_list.
7506 * common/gdb_optional.h: New file.
7507
7508 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
7509
7510 * MAINTAINERS (Write After Approval): Update my e-mail address.
7511
7512 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
7513
7514 PR gdb/21122
7515 * breakpoint.c (_initialize_breakpoint): Update the help description
7516 of the 'commands' command to indicate that it takes a list argument.
7517
7518 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
7519
7520 * interps.c (current_interp_set_logging): Remove "return".
7521
7522 2017-02-09 Gary Benson <gbenson@redhat.com>
7523
7524 * symtab.c (add_symtab_completions): Prevent NULL pointer
7525 dereference.
7526
7527 2017-02-08 Pedro Alves <palves@redhat.com>
7528
7529 * interps.c (interp::interp): Remove reference to quiet_p.
7530 (interp_set): Make static. Remove dead "Switching to" output
7531 code.
7532 (interp_quiet_p, interp_set_quiet): Delete.
7533 (interpreter_exec_cmd): Don't set the interpreter quiet.
7534 * interps.h (interp_quiet_p): Make static.
7535 (class interp) <quiet_p>: Remove field
7536
7537 2017-02-08 Jerome Guitton <guitton@adacore.com>
7538
7539 * cli/cli-decode.c (find_command_name_length): Make it extern.
7540 * cli/cli-decode.h (find_command_name_length): Declare.
7541 * cli/cli-script.c (command_name_equals, line_first_arg):
7542 New functions.
7543 (process_next_line): Use cli-decode to parse command names.
7544 (build_command_line): Make args a constant pointer.
7545
7546 2017-02-08 Jerome Guitton <guitton@adacore.com>
7547
7548 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
7549 Remove case-insensitive search.
7550
7551 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
7552
7553 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
7554 at the end of the line. Avoids an ARI warning.
7555
7556 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
7557
7558 * NEWS: Mention support for record/replay of Intel 64 rdrand and
7559 rdseed instructions.
7560 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
7561
7562 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
7563
7564 PR tdep/20936
7565 Provide and use sparc32 and sparc64 target description XML files.
7566 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
7567 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
7568 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
7569 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
7570 * features/sparc/sparc32-solaris.xml: New file.
7571 * features/sparc/sparc64-solaris.xml: New file.
7572 * features/sparc/sparc32-solaris.c: Generated.
7573 * features/sparc/sparc64-solaris.c: Generated.
7574 * sparc-tdep.h: Account for differences in target descriptions.
7575 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
7576 (sparc32_register_type): Use target provided registers.
7577 (validate_tdesc_registers): New function.
7578 (sparc32_gdbarch_init): Use tdesc_has_registers.
7579 Set pseudoregister functions.
7580 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
7581 (sparc64_register_type): Use target provided registers.
7582 (sparc64_init_abi): Set pseudoregister functions.
7583
7584 2017-02-03 Tom Tromey <tom@tromey.com>
7585
7586 PR rust/21097:
7587 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
7588 with a single member.
7589
7590 2017-02-03 Pedro Alves <palves@redhat.com>
7591
7592 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
7593 (cli_interp_base::~cli_interp_base): New.
7594 (cli_interp): New struct.
7595 (as_cli_interp): Cast the interp itself to cli_interp.
7596 (cli_interpreter_pre_command_loop): Rename to ...
7597 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
7598 parameter.
7599 (cli_interpreter_init): Rename to ...
7600 (cli_interp::init): ... this. Remove 'self' parameter. Use
7601 boolean. Make extern.
7602 (cli_interpreter_resume): Rename to ...
7603 (cli_interp::resume): ... this. Remove 'data' parameter. Make
7604 extern.
7605 (cli_interpreter_suspend): Rename to ...
7606 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
7607 extern.
7608 (cli_interpreter_exec): Rename to ...
7609 (cli_interp::exec): ... this. Remove 'data' parameter. Make
7610 extern.
7611 (cli_interpreter_supports_command_editing): Rename to ...
7612 (cli_interp_base::supports_command_editing): ... this. Remove
7613 'interp' parameter. Make extern.
7614 (cli_ui_out): Rename to ...
7615 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
7616 Make extern.
7617 (cli_set_logging): Rename to ...
7618 (cli_interp_base::set_logging): ... this. Remove 'interp'
7619 parameter. Make extern.
7620 (cli_interp_procs): Delete.
7621 (cli_interp_factory): Adjust to use "new".
7622 * cli/cli-interp.h: Include "interps.h".
7623 (struct cli_interp_base): New struct.
7624 * interps.c (struct interp): Delete. Fields moved to interps.h.
7625 (interp_new): Delete.
7626 (interp::interp, interp::~interp): New.
7627 (interp_set): Use bool, and return void. Assume the interpreter
7628 has suspend, init and resume methods, and that the all return
7629 void.
7630 (set_top_level_interpreter): interp_set returns void.
7631 (interp_ui_out): Adapt.
7632 (current_interp_set_logging): Adapt.
7633 (interp_data): Delete.
7634 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
7635 (interp_exec): Adapt.
7636 (top_level_interpreter_data): Delete.
7637 * interps.h (interp_init_ftype, interp_resume_ftype)
7638 (interp_suspend_ftype, interp_exec_ftype)
7639 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
7640 (class interp): New.
7641 (interp_new): Delete.
7642 (interp_set): Now returns void. Use bool.
7643 (interp_data, top_level_interpreter_data): Delete.
7644 * mi/mi-common.h: Include interps.h.
7645 (class mi_interp): Inherit from interp. Define a ctor. Declare
7646 init, resume, suspect, exec, interp_ui_out, set_logging and
7647 pre_command_loop methods.
7648 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
7649 (mi_interpreter_init): Rename to ...
7650 (mi_interp::init): ... this. Remove the 'interp' parameter, use
7651 bool, return void and make extern. Adjust.
7652 (mi_interpreter_resume): ... Rename to ...
7653 (mi_interp::resume): ... this. Remove the 'data' parameter,
7654 return void and make extern. Adjust.
7655 (mi_interpreter_suspend): ... Rename to ...
7656 (mi_interp::suspend): ... this. Remove the 'data' parameter,
7657 return void and make extern. Adjust.
7658 (mi_interpreter_exec): ... Rename to ...
7659 (mi_interp::exec): ... this. Remove the 'data' parameter and make
7660 extern. Adjust.
7661 (mi_interpreter_pre_command_loop): ... Rename to ...
7662 (mi_interp::pre_command_loop): ... this. Remove the 'self'
7663 parameter and make extern.
7664 (mi_on_normal_stop_1): Adjust.
7665 (mi_ui_out): Rename to ...
7666 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
7667 parameter and make extern. Adjust.
7668 (mi_set_logging): Rename to ...
7669 (mi_interp::set_logging): ... this. Remove the 'interp'
7670 parameter and make extern. Adjust.
7671 (mi_interp_procs): Delete.
7672 (mi_interp_factory): Adjust to use 'new'.
7673 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
7674 (mi_print_exception, mi_execute_command, mi_load_progress):
7675 Adjust.
7676 * tui/tui-interp.c (tui_interp): New class.
7677 (as_tui_interp): Return a tui_interp pointer.
7678 (tui_on_normal_stop, tui_on_signal_received)
7679 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
7680 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
7681 to use interp::interp_ui_out.
7682 (tui_init): Rename to ...
7683 (tui_interp::init): ... this. Remove the 'self' parameter, use
7684 bool, return void and make extern. Adjust.
7685 (tui_resume): Rename to ...
7686 (tui_interp::resume): ... this. Remove the 'data' parameter,
7687 return void and make extern. Adjust.
7688 (tui_suspend): Rename to ...
7689 (tui_interp::suspend): ... this. Remove the 'data' parameter,
7690 return void and make extern. Adjust.
7691 (tui_ui_out): Rename to ...
7692 (tui_interp::interp_ui_out): ... this. Remove the 'self'
7693 parameter, and make extern. Adjust.
7694 (tui_exec): Rename to ...
7695 (tui_interp::exec): ... this. Remove the 'data' parameter and
7696 make extern.
7697 (tui_interp_procs): Delete.
7698 (tui_interp_factory): Use "new".
7699
7700 2017-02-02 Tom Tromey <tom@tromey.com>
7701
7702 * rust-exp.y (ends_raw_string, space_then_number)
7703 (rust_identifier_start_p): Return bool.
7704 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
7705 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
7706 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
7707 (rust_chartype_p): Return bool.
7708 (val_print_struct, rust_print_struct_def, rust_print_type):
7709 Update.
7710 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
7711 Return bool.
7712
7713 2017-02-02 Tom Tromey <tom@tromey.com>
7714
7715 * rust-lang.c: Reindent.
7716
7717 2017-02-02 Tom Tromey <tom@tromey.com>
7718
7719 * rust-lang.h (rust_crate_for_block): Update.
7720 * rust-lang.c (rust_crate_for_block): Return std::string.
7721 (rust_get_disr_info): Use std:;string, not
7722 gdb::unique_xmalloc_ptr.
7723 * rust-exp.y (crate_name): Update.
7724
7725 2017-02-02 Pedro Alves <palves@redhat.com>
7726
7727 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
7728 field out of gdb_disassembler_test and make it static.
7729
7730 2017-02-02 Pedro Alves <palves@redhat.com>
7731
7732 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
7733 mi1_interp and mi_interp fields.
7734
7735 2017-02-02 Pedro Alves <palves@redhat.com>
7736
7737 * cli/cli-interp.c (struct saved_output_files, saved_output):
7738 Moved from cli/cli-logging.c.
7739 (cli_set_logging): New function.
7740 (cli_interp_procs): Install cli_set_logging.
7741 * cli/cli-interp.h (make_logging_output, cli_set_logging):
7742 Declare.
7743 * cli/cli-logging.c (struct saved_output_files, saved_output):
7744 Moved to cli/cli-interp.c.
7745 (pop_output_files): Don't save outputs here.
7746 (make_logging_output): New function.
7747 (handle_redirections): Don't build tee nor save previous outputs
7748 here.
7749 * interps.c (current_interp_set_logging): Change prototype.
7750 Assume there's always a set_logging_proc method installed.
7751 * interps.h (interp_set_logging_ftype): Change prototype.
7752 (current_interp_set_logging): Change prototype and adjust comment.
7753 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
7754 use make_logging_output.
7755 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
7756 2017-02-02 Pedro Alves <palves@redhat.com>
7757
7758 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
7759 from ...
7760 (set_logging_overwrite): ... here.
7761 (logging_no_redirect_file): Delete.
7762 (set_logging_redirect): Don't handle redirection on the fly.
7763 Instead warn that "logging off" / "logging on" is necessary.
7764 (pop_output_files): Delete references to logging_no_redirect_file.
7765 (show_logging_command): Always speak in terms of what will happen
7766 once logging is reenabled.
7767
7768 2017-02-02 Pedro Alves <palves@redhat.com>
7769
7770 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
7771
7772 2017-02-02 Pedro Alves <palves@redhat.com>
7773
7774 * disasm.c (gdb_pretty_print_insn): Rename to ...
7775 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
7776 Remove gdbarch parameter. Adapt to clear the object's buffers
7777 instead of allocating new buffers, and to print using the object's
7778 gdb_disassembler instead of calling gdb_print_insn.
7779 (dump_insns): Use gdb_pretty_print_disassembler.
7780 * disasm.h (gdb_pretty_print_insn): Delete declaration.
7781 (gdb_pretty_print_disassembler): New class.
7782 * record-btrace.c (btrace_insn_history): Use
7783 gdb_pretty_print_disassembler.
7784
7785 2017-02-02 Pedro Alves <palves@redhat.com>
7786
7787 * ada-lang.c (type_as_string): Use string_file.
7788 * ada-valprint.c (ada_print_floating): Use string_file.
7789 * ada-varobj.c (ada_varobj_scalar_image)
7790 (ada_varobj_get_value_image): Use string_file.
7791 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
7792 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
7793 * breakpoint.c (update_inserted_breakpoint_locations)
7794 (insert_breakpoint_locations, reattach_breakpoints)
7795 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
7796 (print_it_watchpoint): Use string_file.
7797 (save_breakpoints): Use stdio_file.
7798 * c-exp.y (oper): Use string_file.
7799 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
7800 tee_file.
7801 (pop_output_files): Use delete.
7802 (handle_redirections): Use stdio_file and tee_file.
7803 * cli/cli-setshow.c (do_show_command): Use string_file.
7804 * compile/compile-c-support.c (c_compute_program): Use
7805 string_file.
7806 * compile/compile-c-symbols.c (generate_vla_size): Take a
7807 'string_file &' instead of a 'ui_file *'.
7808 (generate_c_for_for_one_variable): Take a 'string_file &' instead
7809 of a 'ui_file *'. Use string_file.
7810 (generate_c_for_variable_locations): Take a 'string_file &'
7811 instead of a 'ui_file *'.
7812 * compile/compile-internal.h (generate_c_for_for_one_variable):
7813 Take a 'string_file &' instead of a 'ui_file *'.
7814 * compile/compile-loc2c.c (push, pushf, unary, binary)
7815 (print_label, pushf_register_address, pushf_register)
7816 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
7817 'ui_file *'. Adjust.
7818 * compile/compile.c (compile_to_object): Use string_file.
7819 * compile/compile.h (compile_dwarf_expr_to_c)
7820 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
7821 'ui_file *'.
7822 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
7823 (replace_typedefs_qualified_name): Use string_file and
7824 obstack_copy0.
7825 * disasm.c (gdb_pretty_print_insn): Use string_file.
7826 (gdb_disassembly): Adjust reference the null_stream global.
7827 (do_ui_file_delete): Delete.
7828 (gdb_insn_length): Use null_stream.
7829 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
7830 * dwarf2loc.c (dwarf2_compile_property_to_c)
7831 (locexpr_generate_c_location, loclist_generate_c_location): Take a
7832 'string_file &' instead of a 'ui_file *'.
7833 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
7834 * dwarf2read.c (do_ui_file_peek_last): Delete.
7835 (dwarf2_compute_name): Use string_file.
7836 * event-top.c (gdb_setup_readline): Use stdio_file.
7837 * gdbarch.sh (verify_gdbarch): Use string_file.
7838 * gdbtypes.c (safe_parse_type): Use null_stream.
7839 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
7840 string_file.
7841 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
7842 'string_file *' instead of a 'ui_file *'.
7843 (gdbscm_arch_disassemble): Use string_file.
7844 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
7845 * guile/scm-ports.c (class ioscm_file_port): Now a class that
7846 inherits from ui_file.
7847 (ioscm_file_port_delete, ioscm_file_port_rewind)
7848 (ioscm_file_port_put): Delete.
7849 (ioscm_file_port_write): Rename to ...
7850 (ioscm_file_port::write): ... this. Remove file_port_magic
7851 checks.
7852 (ioscm_file_port_new): Delete.
7853 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
7854 ui_file_up.
7855 * guile/scm-type.c (tyscm_type_name): Use string_file.
7856 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
7857 Use string_file.
7858 * infcmd.c (print_return_value_1): Use string_file.
7859 * infrun.c (print_target_wait_results): Use string_file.
7860 * language.c (add_language): Use string_file.
7861 * location.c (explicit_to_string_internal): Use string_file.
7862 * main.c (captured_main_1): Use null_file.
7863 * maint.c (maintenance_print_architecture): Use stdio_file.
7864 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
7865 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
7866 event_channel>: Change type to mi_console_file pointer.
7867 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
7868 (mi_console_file_delete): Delete.
7869 (struct mi_console_file): Delete.
7870 (mi_console_file_magic): Delete.
7871 (mi_console_file_new): Delete.
7872 (mi_console_file::mi_console_file): New.
7873 (mi_console_file_delete): Delete.
7874 (mi_console_file_fputs): Delete.
7875 (mi_console_file::write): New.
7876 (mi_console_raw_packet): Delete.
7877 (mi_console_file::flush): New.
7878 (mi_console_file_flush): Delete.
7879 (mi_console_set_raw): Rename to ...
7880 (mi_console_file::set_raw): ... this.
7881 * mi/mi-console.h (class mi_console_file): New class.
7882 (mi_console_file_new, mi_console_set_raw): Delete.
7883 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
7884 (mi_set_logging): Use delete and tee_file. Adjust.
7885 * mi/mi-main.c (output_register): Use string_file.
7886 (mi_cmd_data_evaluate_expression): Use string_file.
7887 (mi_cmd_data_read_memory): Use string_file.
7888 (mi_cmd_execute, print_variable_or_computed): Use string_file.
7889 * mi/mi-out.c (mi_ui_out::main_stream): New.
7890 (mi_ui_out::rewind): Use main_stream and
7891 string_file.
7892 (mi_ui_out::put): Use main_stream and string_file.
7893 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
7894 Allocate a 'string_file' instead.
7895 (mi_out_new): Don't allocate a mem_fileopen stream here.
7896 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
7897 (mi_ui_out::main_stream): Declare method.
7898 * printcmd.c (eval_command): Use string_file.
7899 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
7900 * python/py-arch.c (archpy_disassemble): Use string_file.
7901 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
7902 * python/py-frame.c (frapy_str): Use string_file.
7903 * python/py-framefilter.c (py_print_type, py_print_single_arg):
7904 Use string_file.
7905 * python/py-type.c (typy_str): Use string_file.
7906 * python/py-unwind.c (unwind_infopy_str): Use string_file.
7907 * python/py-value.c (valpy_str): Use string_file.
7908 * record-btrace.c (btrace_insn_history): Use string_file.
7909 * regcache.c (regcache_print): Use stdio_file.
7910 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
7911 * remote.c (escape_buffer): Use string_file.
7912 * rust-lang.c (rust_get_disr_info): Use string_file.
7913 * serial.c (serial_open_ops_1): Use stdio_file.
7914 (do_serial_close): Use delete.
7915 * stack.c (print_frame_arg): Use string_file.
7916 (print_frame_args): Remove local mem_fileopen stream, not used.
7917 (print_frame): Use string_file.
7918 * symmisc.c (maintenance_print_symbols): Use stdio_file.
7919 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
7920 Take a 'string_file *' instead of a 'ui_file *'.
7921 * top.c (new_ui): Use stdio_file and stderr_file.
7922 (free_ui): Use delete.
7923 (execute_command_to_string): Use string_file.
7924 (quit_confirm): Use string_file.
7925 * tracepoint.c (collection_list::append_exp): Use string_file.
7926 * tui/tui-disasm.c (tui_disassemble): Use string_file.
7927 * tui/tui-file.c: Don't include "ui-file.h".
7928 (enum streamtype, struct tui_stream): Delete.
7929 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
7930 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
7931 (tui_file::tui_file): New method.
7932 (tui_file_fputs): Delete.
7933 (tui_file_get_strbuf): Delete.
7934 (tui_file::puts): New method.
7935 (tui_file_adjust_strbuf): Delete.
7936 (tui_file_flush): Delete.
7937 (tui_file::flush): New method.
7938 * tui/tui-file.h: Tweak intro comment.
7939 Include ui-file.h.
7940 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
7941 (tui_file_adjust_strbuf): Delete declarations.
7942 (class tui_file): New class.
7943 * tui/tui-io.c (tui_initialize_io): Use tui_file.
7944 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
7945 (tui_register_format): Use string_stream.
7946 * tui/tui-stack.c (tui_make_status_line): Use string_file.
7947 (tui_get_function_from_frame): Use string_file.
7948 * typeprint.c (type_to_string): Use string_file.
7949 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
7950 (null_stream): New global.
7951 (ui_file_delete): Delete.
7952 (ui_file::ui_file): New.
7953 (null_file_isatty): Delete.
7954 (ui_file::~ui_file): New.
7955 (null_file_rewind): Delete.
7956 (ui_file::printf): New.
7957 (null_file_put): Delete.
7958 (null_file_flush): Delete.
7959 (ui_file::putstr): New.
7960 (null_file_write): Delete.
7961 (ui_file::putstrn): New.
7962 (null_file_read): Delete.
7963 (ui_file::putc): New.
7964 (null_file_fputs): Delete.
7965 (null_file_write_async_safe): Delete.
7966 (ui_file::vprintf): New.
7967 (null_file_delete): Delete.
7968 (null_file::write): New.
7969 (null_file_fseek): Delete.
7970 (null_file::puts): New.
7971 (ui_file_data): Delete.
7972 (null_file::write_async_safe): New.
7973 (gdb_flush, ui_file_isatty): Adjust.
7974 (ui_file_put, ui_file_rewind): Delete.
7975 (ui_file_write): Adjust.
7976 (ui_file_write_for_put): Delete.
7977 (ui_file_write_async_safe, ui_file_read): Adjust.
7978 (ui_file_fseek): Delete.
7979 (fputs_unfiltered): Adjust.
7980 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
7981 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
7982 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
7983 (set_ui_file_data): Delete.
7984 (string_file::~string_file, string_file::write)
7985 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
7986 (do_ui_file_as_string, ui_file_as_string): Delete.
7987 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
7988 (struct mem_file): Delete.
7989 (mem_file_new): Delete.
7990 (stdio_file::stdio_file): New.
7991 (mem_file_delete): Delete.
7992 (stdio_file::stdio_file): New.
7993 (mem_fileopen): Delete.
7994 (stdio_file::~stdio_file): New.
7995 (mem_file_rewind): Delete.
7996 (stdio_file::set_stream): New.
7997 (mem_file_put): Delete.
7998 (stdio_file::open): New.
7999 (mem_file_write): Delete.
8000 (stdio_file_magic, struct stdio_file): Delete.
8001 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
8002 (stdio_file::flush): New.
8003 (stdio_file_read): Rename to ...
8004 (stdio_file::read): ... this. Adjust.
8005 (stdio_file_write): Rename to ...
8006 (stdio_file::write): ... this. Adjust.
8007 (stdio_file_write_async_safe): Rename to ...
8008 (stdio_file::write_async_safe) ... this. Adjust.
8009 (stdio_file_fputs): Rename to ...
8010 (stdio_file::puts) ... this. Adjust.
8011 (stdio_file_isatty): Delete.
8012 (stdio_file_fseek): Delete.
8013 (stdio_file::isatty): New.
8014 (stderr_file_write): Rename to ...
8015 (stderr_file::write) ... this. Adjust.
8016 (stderr_file_fputs): Rename to ...
8017 (stderr_file::puts) ... this. Adjust.
8018 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
8019 (stderr_file::stderr_file): New.
8020 (tee_file_magic): Delete.
8021 (struct tee_file): Delete.
8022 (tee_file::tee_file): New.
8023 (tee_file_new): Delete.
8024 (tee_file::~tee_file): New.
8025 (tee_file_delete): Delete.
8026 (tee_file_flush): Rename to ...
8027 (tee_file::flush): ... this. Adjust.
8028 (tee_file_write): Rename to ...
8029 (tee_file::write): ... this. Adjust.
8030 (tee_file::write_async_safe): New.
8031 (tee_file_fputs): Rename to ...
8032 (tee_file::puts): ... this. Adjust.
8033 (tee_file_isatty): Rename to ...
8034 (tee_file::isatty): ... this. Adjust.
8035 * ui-file.h (struct obstack, struct ui_file): Don't
8036 forward-declare.
8037 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
8038 (ui_file_write_ftype)
8039 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
8040 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
8041 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
8042 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
8043 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
8044 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
8045 (set_ui_file_fseek): Delete.
8046 (ui_file_data, ui_file_delete, ui_file_rewind)
8047 (struct ui_file): New.
8048 (ui_file_up): New.
8049 (class null_file): New.
8050 (null_stream): Declare.
8051 (ui_file_write_for_put, ui_file_put): Delete.
8052 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
8053 Delete.
8054 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
8055 (gdb_fopen, tee_file_new): Delete.
8056 (struct string_file): New.
8057 (struct stdio_file): New.
8058 (stdio_file_up): New.
8059 (struct stderr_file): New.
8060 (class tee_file): New.
8061 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
8062 of a 'ui_file *'. Adjust.
8063 * ui-out.h (class ui_out) <field_stream>: Likewise.
8064 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
8065 (null_stream): Delete.
8066 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
8067 Adjust.
8068 * utils.h (struct ui_file): Delete forward declaration..
8069 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
8070 (error_stream): Take a 'string_file &' instead of a
8071 'ui_file *'.
8072 * varobj.c (varobj_value_get_print_value): Use string_file.
8073 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
8074 * gdbarch.c: Regenerate.
8075
8076 2017-02-02 Pedro Alves <palves@redhat.com>
8077
8078 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
8079 (gdb_pretty_print_insn): ... this. Now a free function. Add back
8080 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
8081 Adjust to call gdb_print_insn instead of
8082 gdb_disassembler::print_insn.
8083 (dump_insns, do_mixed_source_and_assembly_deprecated)
8084 (do_mixed_source_and_assembly, do_assembly_only): Add back a
8085 'gdbarch' parameter. Remove gdb_disassembler parameter.
8086 (gdb_disassembly): Don't allocate a gdb_disassembler here.
8087 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
8088 declaration.
8089 (gdb_pretty_print_insn): Re-add declaration.
8090 * record-btrace.c (btrace_insn_history): Don't allocate a
8091 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
8092
8093 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
8094
8095 * disasm.h (gdb_disassembly): Remove file_string parameter.
8096 * disasm.c (gdb_disassembly): Likewise.
8097 * cli/cli-cmds.c (print_disassembly): Adapt.
8098 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
8099 * stack.c (do_gdb_disassembly): Likewise.
8100
8101 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
8102
8103 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
8104 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
8105 targets. And if the implicit value is longer than needed, extract
8106 the first bytes instead of the "least significant" ones.
8107
8108 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
8109
8110 * btrace.c (btrace_enable): Do not call btrace_add_pc for
8111 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
8112 (btrace_fetch): Assert can_access_registers_ptid.
8113 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
8114 validate_registers_access.
8115
8116 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
8117
8118 * gdbthread.h (can_access_registers_ptid): New.
8119 * thread.c (can_access_registers_ptid): New.
8120
8121 2017-02-01 Pedro Alves <palves@redhat.com>
8122
8123 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
8124
8125 2017-01-31 Pedro Alves <palves@redhat.com>
8126
8127 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
8128 Fix typos.
8129
8130 2017-01-31 Pedro Alves <palves@redhat.com>
8131
8132 * stack.c (print_frame_args): Remove local mem_fileopen stream,
8133 not used.
8134
8135 2017-01-31 Pedro Alves <palves@redhat.com>
8136
8137 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
8138
8139 2017-01-31 Pedro Alves <palves@redhat.com>
8140
8141 * common/scoped_restore.h
8142 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
8143 change the value's parameter type to T2.
8144 (make_scoped_restore): Likewise.
8145
8146 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
8147 Richard Henderson <rth@redhat.com>
8148
8149 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
8150 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
8151 GS_BASE for older kernels.
8152 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
8153 GS_BASE for older kernels.
8154 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
8155 and GS_BASE to the offset table.
8156 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
8157 system register group.
8158 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
8159 for older kernels.
8160 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
8161 amd64 ABI.
8162 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
8163 AMD64_GSBASE_REGNUM.
8164 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
8165 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
8166 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
8167 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
8168 i386/64bit-segments.xml in those rules.
8169 * features/i386/64bit-segments.xml: New file.
8170 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
8171 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
8172 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
8173 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
8174 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
8175 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
8176 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
8177 * features/i386/amd64-avx-linux.c: Regenerated.
8178 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
8179 * features/i386/amd64-avx-mpx.c: Regenerated.
8180 * features/i386/amd64-avx512-linux.c: Regenerated.
8181 * features/i386/amd64-linux.c: Regenerated.
8182 * features/i386/amd64-mpx-linux.c: Regenerated.
8183 * features/i386/i386-avx-mpx-linux.c: Regenerated.
8184 * features/i386/i386-avx-mpx.c: Regenerated.
8185 * features/i386/x32-avx-linux.c: Regenerated.
8186 * features/i386/x32-avx512-linux.c: Regenerated.
8187 * regformats/i386/amd64-avx-linux.dat: Regenerated.
8188 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
8189 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
8190 * regformats/i386/amd64-linux.dat: Regenerated.
8191 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
8192 * regformats/i386/x32-avx-linux.dat: Regenerated.
8193 * regformats/i386/x32-avx512-linux.dat: Regenerated.
8194 * regformats/i386/x32-linux.dat: Regenerated.
8195
8196 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
8197
8198 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
8199 Set to AMD64_NUM_REGS.
8200
8201 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
8202
8203 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
8204 that checks validity of a register number.
8205
8206 2017-01-27 Kees Cook <keescook@google.com>
8207
8208 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
8209 fetch_fpregs if target has fpa registers.
8210 (arm_linux_store_inferior_registers): Call store_fpregs if target
8211 has fpa registers.
8212
8213 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
8214
8215 * cris-tdep.c (cris_gdbarch_init): Remove check for
8216 info.byte_order and force it to BFD_ENDIAN_LITTLE.
8217
8218 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
8219
8220 * corelow.c (get_core_register_section): Check for regset
8221 existence before checking for REGSET_VARIABLE_SIZE.
8222
8223 2017-01-26 Yao Qi <yao.qi@linaro.org>
8224 Pedro Alves <palves@redhat.com>
8225
8226 PR gdb/20939
8227 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
8228 call memory_error, save memaddr instead.
8229 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
8230 negative, cal memory_error.
8231 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
8232
8233 2017-01-26 Yao Qi <yao.qi@linaro.org>
8234
8235 * disasm-selftests.c (memory_error_test): New function.
8236 (_initialize_disasm_selftests): Register memory_error_test.
8237
8238 2017-01-26 Yao Qi <yao.qi@linaro.org>
8239
8240 * Makefile.in (SFILES): Add disasm-selftests.c and
8241 selftest-arch.c.
8242 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
8243 * disasm-selftests.c: New file.
8244 * selftest-arch.c: New file.
8245 * selftest-arch.h: New file.
8246
8247 2017-01-26 Yao Qi <yao.qi@linaro.org>
8248
8249 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
8250 to bfd_arch_mep. Don't return 0 if section is not
8251 found. Call print_insn_mep.
8252
8253 2017-01-26 Pedro Alves <palves@redhat.com>
8254 Yao Qi <yao.qi@linaro.org>
8255
8256 * arm-tdep.c: Include "disasm.h".
8257 (gdb_print_insn_arm): Update code to get gdbarch.
8258 * disasm.c (dis_asm_read_memory): Change it to
8259 gdb_disassembler::dis_asm_read_memory.
8260 (dis_asm_memory_error): Likewise.
8261 (dis_asm_print_address): Likewise.
8262 (gdb_pretty_print_insn): Change it to
8263 gdb_disassembler::pretty_print_insn.
8264 (dump_insns): Add one argument gdb_disassemlber. All
8265 callers updated.
8266 (do_mixed_source_and_assembly_deprecated): Likewise.
8267 (do_mixed_source_and_assembly): Likewise.
8268 (do_assembly_only): Likewise.
8269 (gdb_disassembler::gdb_disassembler): New.
8270 (gdb_disassembler::print_insn): New.
8271 * disasm.h (class gdb_disassembler): New.
8272 (gdb_pretty_print_insn): Remove declaration.
8273 (gdb_disassemble_info): Likewise.
8274 * guile/scm-disasm.c (class gdbscm_disassembler): New.
8275 (gdbscm_disasm_read_memory_worker): Update.
8276 (gdbscm_disasm_read_memory): Update.
8277 (gdbscm_disasm_memory_error): Remove.
8278 (gdbscm_disasm_print_address): Remove.
8279 (gdbscm_disassembler::gdbscm_disassembler): New.
8280 (gdbscm_print_insn_from_port): Update.
8281 * mips-tdep.c: Include disasm.h.
8282 (gdb_print_insn_mips): Update code to get gdbarch.
8283 * record-btrace.c (btrace_insn_history): Update.
8284 * spu-tdep.c: Include disasm.h.
8285 (struct spu_dis_asm_data): Remove.
8286 (struct spu_dis_asm_info): New.
8287 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
8288 SPU id.
8289 (gdb_print_insn_spu): Cast disassemble_info to
8290 spu_dis_asm_info.
8291
8292 2017-01-26 Yao Qi <yao.qi@linaro.org>
8293
8294 * disasm.c (do_ui_file_delete): Delete.
8295 (gdb_insn_length): Move code creating stream to ...
8296 * utils.c (null_stream): ... here. New function.
8297 * utils.h (null_stream): Declare.
8298
8299 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
8300
8301 * python/py-inferior.c (find_thread_object): Return directly
8302 from the loop. Remove "found" variable.
8303
8304 2017-01-21 Joel Brobecker <brobecker@adacore.com>
8305
8306 GDB 7.12.1 released.
8307
8308 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
8309
8310 * python/py-function.c (fnpy_call): Reorder declarations to have
8311 the gdbpy_enter object declared first.
8312 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
8313
8314 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
8315
8316 PR python/21068
8317 * python/python-internal.h (PyMem_RawMalloc): Define for
8318 Python < 3.4.
8319 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
8320 PyMem_RawMalloc instead of PyMem_Malloc.
8321
8322 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
8323 Luis Machado <lgustavo@codesourcery.com>
8324
8325 * NEWS (New commands): Mention flash-erase.
8326 (New MI commands): Mention target-flash-erase.
8327 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
8328 command.
8329 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
8330 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
8331 * target.c (flash_erase_command): New function.
8332 (initialize_targets): Add new flash-erase command.
8333 * target.h (flash_erase_command): New declaration.
8334
8335 2017-01-20 Joel Brobecker <brobecker@adacore.com>
8336
8337 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
8338 HAVE_SYS_PROCFS_H is defined.
8339
8340 2017-01-18 Alan Hayward <alan.hayward@arm.com>
8341
8342 * remote.c (struct cached_reg): Change data into a pointer.
8343 * (stop_reply_dtr): Free data pointers before deleting vector.
8344 (process_stop_reply): Likewise.
8345 (remote_parse_stop_reply): Allocate space for data
8346
8347 2017-01-18 Alan Hayward <alan.hayward@arm.com>
8348
8349 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
8350 MAX_REGISTER_SIZE.
8351 (amd64_pseudo_register_read_value): Likewise.
8352 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
8353 (store_register_using_P): Likewise.
8354 * regcache.c (regcache_xfer_part): Likewise.
8355
8356 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
8357
8358 Split real and pseudo registers.
8359 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
8360 (sparc32_pseudo_regnum): New enum.
8361 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
8362 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
8363 (SPARC32_CP0_REGISTERS): New macro.
8364 (sparc32_pseudo_register_name): New function.
8365 (sparc32_register_name): Use sparc32_pseudo_register_name.
8366 (sparc32_pseudo_register_type): New function.
8367 (sparc32_register_type): Use sparc32_pseudo_register_type.
8368 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
8369 pseudo register numbers.
8370 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
8371 (SPARC64_CP0_REGISTERS): New macro.
8372 (sparc64_pseudo_register_name): New function.
8373 (sparc64_register_name): Use sparc64_pseudo_register_name.
8374 (sparc64_pseudo_register_type): New function.
8375 (sparc64_register_type): Use sparc64_pseudo_register_type.
8376 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
8377 pseudo register numbers.
8378 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
8379 sparc64_store_arguments): Handle pseudo register numbers.
8380
8381 2017-01-13 Yao Qi <yao.qi@linaro.org>
8382
8383 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
8384 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
8385 output.
8386 (getpkt_or_notif_sane_1): Likewise.
8387
8388 2017-01-13 Yao Qi <yao.qi@linaro.org>
8389
8390 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
8391 of CC. Pass "-x c++-header" instead of "-x c".
8392
8393 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
8394
8395 * remote.c (remote_can_async_p): Update comment.
8396
8397 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
8398
8399 * linux-nat.c (linux_nat_can_async_p): Update comment.
8400
8401 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
8402
8403 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
8404
8405 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
8406
8407 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
8408
8409 2017-01-10 Tom Tromey <tom@tromey.com>
8410
8411 * python/py-type.c (typy_legacy_template_argument): Update.
8412 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
8413 ~demangle_parse_info): Declare new members.
8414 (cp_demangled_name_to_comp): Return unique_ptr.
8415 (cp_demangled_name_parse_free)
8416 (make_cleanup_cp_demangled_name_parse_free)
8417 (cp_new_demangle_parse_info): Remove.
8418 * cp-support.c (do_demangled_name_parse_free_cleanup)
8419 (make_cleanup_cp_demangled_name_parse_free): Remove.
8420 (inspect_type, cp_canonicalize_string_full)
8421 (cp_canonicalize_string): Update.
8422 (mangled_name_to_comp): Change return type.
8423 (cp_class_name_from_physname, method_name_from_physname)
8424 (cp_func_name, cp_remove_params): Update.
8425 * cp-name-parser.y (demangle_parse_info): New constructor, from
8426 cp_new_demangle_parse_info.
8427 (~demangle_parse_info): New destructor, from
8428 cp_demangled_name_parse_free.
8429 (cp_merge_demangle_parse_infos): Update.
8430 (cp_demangled_name_to_comp): Change return type.
8431
8432 2017-01-10 Tom Tromey <tom@tromey.com>
8433
8434 * top.c (prevent_dont_repeat): Change return type.
8435 * python/python.c (execute_gdb_command): Use std::string.
8436 Update.
8437 * guile/guile.c (gdbscm_execute_gdb_command): Update.
8438 * command.h (prevent_dont_repeat): Change return type.
8439 * breakpoint.c (bpstat_do_actions_1): Update.
8440
8441 2017-01-10 Tom Tromey <tom@tromey.com>
8442
8443 * value.h (scoped_value_mark::~scoped_value_mark): Call
8444 free_to_mark.
8445 (scoped_value_mark::free_to_mark): New method.
8446 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
8447 scoped_value_mark.
8448
8449 2017-01-10 Tom Tromey <tom@tromey.com>
8450
8451 * python/py-value.c (valpy_dereference, valpy_referenced_value)
8452 (valpy_reference_value, valpy_const_value, valpy_get_address)
8453 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
8454 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
8455 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
8456 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
8457 scoped_value_mark.
8458 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
8459 * value.h (scoped_value_mark): New class.
8460
8461 2017-01-10 Tom Tromey <tom@tromey.com>
8462
8463 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
8464 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
8465 * psymtab.c (discard_psymtabs_upto): Remove.
8466 (make_cleanup_discard_psymtabs): Remove.
8467 (struct psymtab_state): Remove.
8468
8469 2017-01-10 Tom Tromey <tom@tromey.com>
8470
8471 * record-full.c (record_full_save_cleanups): Remove.
8472 (record_full_save): Use gdb::unlinker.
8473 * gcore.c (do_bfd_delete_cleanup): Remove.
8474 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
8475 cleanups.
8476 * dwarf2read.c (unlink_if_set): Remove.
8477 (write_psymtabs_to_index): Use gdb::unlinker.
8478 * common/gdb_unlinker.h: New file.
8479
8480 2017-01-10 Tom Tromey <tom@tromey.com>
8481
8482 * windows-tdep.c (windows_xfer_shared_library): Update.
8483 * windows-nat.c (windows_make_so): Update.
8484 * utils.h (make_cleanup_bfd_unref): Remove.
8485 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
8486 * symfile.h (symfile_bfd_open)
8487 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
8488 * symfile.c (read_symbols, symbol_file_add)
8489 (separate_debug_file_exists): Update.
8490 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
8491 (generic_load, reread_symbols): Update.
8492 * symfile-mem.c (symbol_file_add_from_memory): Update.
8493 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
8494 (spu_symbol_file_add_from_memory): Update.
8495 * solist.h (struct target_so_ops) <bfd_open>: Return
8496 gdb_bfd_ref_ptr.
8497 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
8498 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
8499 gdb_bfd_ref_ptr.
8500 (solib_map_sections, reload_shared_libraries_1): Update.
8501 * solib-svr4.c (enable_break): Update.
8502 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
8503 * solib-frv.c (enable_break2): Update.
8504 * solib-dsbt.c (enable_break): Update.
8505 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
8506 gdb_bfd_ref_ptr.
8507 (darwin_solib_get_all_image_info_addr_at_init): Update.
8508 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
8509 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
8510 * record-full.c (record_full_save): Update.
8511 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
8512 * procfs.c (insert_dbx_link_bpt_in_file): Update.
8513 * minidebug.c (find_separate_debug_file_in_section): Return
8514 gdb_bfd_ref_ptr.
8515 * machoread.c (macho_add_oso_symfile): Change abfd to
8516 gdb_bfd_ref_ptr.
8517 (macho_symfile_read_all_oso): Update.
8518 (macho_check_dsym): Return gdb_bfd_ref_ptr.
8519 (macho_symfile_read): Update.
8520 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
8521 (jit_bfd_try_read_symtab): Update.
8522 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8523 (gdb_bfd_openw, gdb_bfd_openr_iovec)
8524 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
8525 gdb_bfd_ref_ptr.
8526 (gdb_bfd_ref_policy): New struct.
8527 (gdb_bfd_ref_ptr): New typedef.
8528 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8529 (gdb_bfd_openw, gdb_bfd_openr_iovec)
8530 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
8531 gdb_bfd_ref_ptr.
8532 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
8533 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
8534 (gcore_command): Update.
8535 * exec.c (exec_file_attach): Update.
8536 * elfread.c (elf_symfile_read): Update.
8537 * dwarf2read.c (dwarf2_get_dwz_file): Update.
8538 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
8539 (open_and_init_dwo_file): Update.
8540 (open_dwp_file): Return gdb_bfd_ref_ptr.
8541 (open_and_init_dwp_file): Update.
8542 * corelow.c (core_open): Update.
8543 * compile/compile-object-load.c (compile_object_load): Update.
8544 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
8545 * coffread.c (coff_symfile_read): Update.
8546 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
8547 gdb_bfd_ref_ptr. Rename.
8548 (dump_bfd_file, restore_command): Update.
8549 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
8550 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
8551 (find_separate_debug_file_by_buildid): Update.
8552
8553 2017-01-10 Tom Tromey <tom@tromey.com>
8554
8555 * common/gdb_ref_ptr.h: New file.
8556 * python/py-ref.h (struct gdbpy_ref_policy): New.
8557 (gdbpy_ref): Now a typedef.
8558
8559 2017-01-10 Tom Tromey <tom@tromey.com>
8560
8561 * utils.h (make_cleanup_htab_delete): Don't declare.
8562 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
8563 Remove.
8564 * linespec.c (decode_compound_collector): Add constructor,
8565 destructor.
8566 (lookup_prefix_sym): Remove cleanup.
8567 (symtab_collector): Add constructor, destructor.
8568 (collect_symtabs_from_filename): Remove cleanup.
8569 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
8570 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
8571 Use htab_up.
8572 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
8573 * dwarf2read.c (dw2_expand_symtabs_matching)
8574 (dw2_map_symbol_filenames, dwarf_decode_macros)
8575 (write_psymtabs_to_index): Use htab_up.
8576 * dwarf2loc.c (func_verify_no_selftailcall)
8577 (call_site_find_chain_1, func_verify_no_selftailcall)
8578 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
8579 std::vector, gdb::unique_xmalloc_ptr.
8580 (call_sitep): Remove typedef.
8581 (dwarf2_locexpr_baton_eval): Remove unused variable.
8582
8583 2017-01-10 Tom Tromey <tom@tromey.com>
8584
8585 * python/python-internal.h (make_cleanup_py_decref)
8586 (make_cleanup_py_xdecref): Don't declare.
8587 * python/py-utils.c (py_decref, make_cleanup_py_decref)
8588 (py_xdecref, make_cleanup_py_xdecref): Remove.
8589
8590 2017-01-10 Tom Tromey <tom@tromey.com>
8591
8592 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
8593 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
8594
8595 2017-01-10 Tom Tromey <tom@tromey.com>
8596
8597 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
8598
8599 2017-01-10 Tom Tromey <tom@tromey.com>
8600
8601 * python/py-utils.c (unicode_to_encoded_string)
8602 (python_string_to_target_string)
8603 (python_string_to_target_python_string)
8604 (python_string_to_host_string, gdbpy_obj_to_string)
8605 (get_addr_from_python): Use gdbpy_ref.
8606
8607 2017-01-10 Tom Tromey <tom@tromey.com>
8608
8609 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
8610 gdbpy_ref.
8611
8612 2017-01-10 Tom Tromey <tom@tromey.com>
8613
8614 * python/python.c (eval_python_command, gdbpy_decode_line)
8615 (gdbpy_run_events, gdbpy_start_type_printers)
8616 (gdbpy_apply_type_printers): Use gdbpy_ref.
8617
8618 2017-01-10 Tom Tromey <tom@tromey.com>
8619
8620 * python/py-param.c (get_doc_string, compute_enum_values): Use
8621 gdbpy_ref.
8622
8623 2017-01-10 Tom Tromey <tom@tromey.com>
8624
8625 * python/py-inferior.c (find_thread_object, build_inferior_list):
8626 Use gdbpy_ref.
8627
8628 2017-01-10 Tom Tromey <tom@tromey.com>
8629
8630 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
8631
8632 2017-01-10 Tom Tromey <tom@tromey.com>
8633
8634 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
8635 gdbpy_ref.
8636
8637 2017-01-10 Tom Tromey <tom@tromey.com>
8638
8639 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
8640 extra incref.
8641 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
8642 Use gdbpy_ref.
8643
8644 2017-01-10 Tom Tromey <tom@tromey.com>
8645
8646 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
8647 gdbpy_ref.
8648
8649 2017-01-10 Tom Tromey <tom@tromey.com>
8650
8651 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
8652 decref results of PyArg_ParseTupleAndKeywords.
8653
8654 2017-01-10 Tom Tromey <tom@tromey.com>
8655
8656 * python/python.c (python_run_simple_file): Use
8657 unique_xmalloc_ptr, gdbpy_ref.
8658
8659 2017-01-10 Tom Tromey <tom@tromey.com>
8660
8661 * python/py-prettyprint.c (print_stack_unless_memory_error)
8662 (print_string_repr, print_children): Use gdbpy_ref.
8663 (dummy_python_frame): New class.
8664 (dummy_python_frame::dummy_python_frame): Rename from
8665 push_dummy_python_frame.
8666 (py_restore_tstate): Remove.
8667
8668 2017-01-10 Tom Tromey <tom@tromey.com>
8669
8670 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
8671
8672 2017-01-10 Tom Tromey <tom@tromey.com>
8673
8674 * python/python.c (ensure_python_env, restore_python_env):
8675 Remove.
8676 * python/python-internal.h (ensure_python_env): Don't declare.
8677 * varobj.h (varobj_ensure_python_env): Don't declare.
8678 * varobj.c (varobj_ensure_python_env): Remove.
8679
8680 2017-01-10 Tom Tromey <tom@tromey.com>
8681
8682 * varobj.c (varobj_value_get_print_value): Use
8683 gdbpy_enter_varobj.
8684
8685 2017-01-10 Tom Tromey <tom@tromey.com>
8686
8687 * python/py-prettyprint.c (print_string_repr, print_children):
8688 Update.
8689 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
8690 of "encoding".
8691 * varobj.c (varobj_value_get_print_value): Update.
8692 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
8693
8694 2017-01-10 Tom Tromey <tom@tromey.com>
8695
8696 * varobj.c (varobj_get_display_hint)
8697 (dynamic_varobj_has_child_method, install_new_value_visualizer)
8698 (varobj_set_visualizer, free_variable): Use
8699 gdbpy_enter_varobj.
8700
8701 2017-01-10 Tom Tromey <tom@tromey.com>
8702
8703 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
8704 (do_finish_initialization): New function. Use gdbpy_ref.
8705 (gdbpy_finish_initialization): Use gdbpy_enter. Call
8706 do_finish_initialization.
8707
8708 2017-01-10 Tom Tromey <tom@tromey.com>
8709
8710 * python/py-param.c (get_set_value, get_show_value): Use
8711 gdbpy_enter, gdbpy_ref.
8712
8713 2017-01-10 Tom Tromey <tom@tromey.com>
8714
8715 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
8716
8717 2017-01-10 Tom Tromey <tom@tromey.com>
8718
8719 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
8720
8721 2017-01-10 Tom Tromey <tom@tromey.com>
8722
8723 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
8724 Use gdbpy_enter_varobj.
8725
8726 2017-01-10 Tom Tromey <tom@tromey.com>
8727
8728 * varobj.c (gdbpy_enter_varobj): New constructor.
8729 * python/python-internal.h (gdbpy_enter_varobj): New class.
8730 * python/py-varobj.c (py_varobj_get_iterator): Use
8731 gdbpy_enter_varobj.
8732
8733 2017-01-10 Tom Tromey <tom@tromey.com>
8734
8735 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
8736 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
8737 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
8738 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
8739 unique_xmalloc_ptr.
8740 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
8741
8742 2017-01-10 Tom Tromey <tom@tromey.com>
8743
8744 * python/py-xmethods.c (invoke_match_method): Use
8745 gdbpy_ref.
8746
8747 2017-01-10 Tom Tromey <tom@tromey.com>
8748
8749 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
8750 gdbpy_enter, gdbpy_ref.
8751
8752 2017-01-10 Tom Tromey <tom@tromey.com>
8753
8754 * python/python.c (python_interactive_command): Use gdbpy_enter.
8755
8756 2017-01-10 Tom Tromey <tom@tromey.com>
8757
8758 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
8759 gdbpy_ref.
8760
8761 2017-01-10 Tom Tromey <tom@tromey.com>
8762
8763 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
8764 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
8765
8766 2017-01-10 Tom Tromey <tom@tromey.com>
8767
8768 * utils.h (htab_deleter): New struct.
8769 (htab_up): New typedef.
8770 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
8771 gdbpy_enter, gdbpy_ref, htab_up.
8772
8773 2017-01-10 Tom Tromey <tom@tromey.com>
8774
8775 * python/py-unwind.c (pending_frame_invalidate): Remove.
8776 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
8777
8778 2017-01-10 Tom Tromey <tom@tromey.com>
8779
8780 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
8781 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
8782
8783 2017-01-10 Tom Tromey <tom@tromey.com>
8784
8785 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
8786
8787 2017-01-10 Tom Tromey <tom@tromey.com>
8788
8789 * python/python.c (gdbpy_eval_from_control_command)
8790 (gdbpy_source_script, gdbpy_run_events)
8791 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
8792 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
8793 gdbpy_enter.
8794
8795 2017-01-10 Tom Tromey <tom@tromey.com>
8796
8797 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
8798
8799 2017-01-10 Tom Tromey <tom@tromey.com>
8800
8801 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
8802
8803 2017-01-10 Tom Tromey <tom@tromey.com>
8804
8805 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
8806 (python_on_inferior_call_pre, python_on_inferior_call_post)
8807 (python_on_memory_change, python_on_register_change)
8808 (python_inferior_exit, python_new_objfile, add_thread_object)
8809 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
8810
8811 2017-01-10 Tom Tromey <tom@tromey.com>
8812
8813 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
8814 (bpfinishpy_handle_exit): Use gdbpy_enter.
8815
8816 2017-01-10 Tom Tromey <tom@tromey.com>
8817
8818 * python/py-cmd.c (cmdpy_destroyer)
8819 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
8820 gdbpy_enter.
8821
8822 2017-01-10 Tom Tromey <tom@tromey.com>
8823
8824 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
8825 gdbpy_enter.
8826 (gdbpy_breakpoint_has_cond): Likewise.
8827
8828 2017-01-10 Tom Tromey <tom@tromey.com>
8829
8830 * python/python.c (gdbpy_enter): New constructor.
8831 (~gdbpy_enter): New destructor.
8832 (restore_python_env, ensure_python_env): Rewrite.
8833 * python/python-internal.h (gdbpy_enter): New class.
8834
8835 2017-01-10 Tom Tromey <tom@tromey.com>
8836
8837 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
8838
8839 2017-01-10 Tom Tromey <tom@tromey.com>
8840
8841 * python/py-value.c (value_has_field, get_field_flag)
8842 (get_field_type, valpy_getitem, convert_value_from_python): Use
8843 gdbpy_ref.
8844
8845 2017-01-10 Tom Tromey <tom@tromey.com>
8846
8847 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
8848 gdbpy_ref.
8849
8850 2017-01-10 Tom Tromey <tom@tromey.com>
8851
8852 * python/py-prettyprint.c (search_pp_list)
8853 (find_pretty_printer_from_objfiles)
8854 (find_pretty_printer_from_progspace)
8855 (find_pretty_printer_from_gdb, find_pretty_printer)
8856 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
8857 gdbpy_ref.
8858
8859 2017-01-10 Tom Tromey <tom@tromey.com>
8860
8861 * python/py-param.c (call_doc_function): Use gdbpy_ref.
8862
8863 2017-01-10 Tom Tromey <tom@tromey.com>
8864
8865 * python/py-linetable.c (build_line_table_tuple_from_pcs)
8866 (ltpy_get_all_source_lines): Use gdbpy_ref.
8867
8868 2017-01-10 Tom Tromey <tom@tromey.com>
8869
8870 * python/py-framefilter.c (extract_sym, extract_value)
8871 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
8872 gdbpy_ref.
8873
8874 2017-01-10 Tom Tromey <tom@tromey.com>
8875
8876 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
8877
8878 2017-01-10 Tom Tromey <tom@tromey.com>
8879
8880 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
8881
8882 2017-01-10 Tom Tromey <tom@tromey.com>
8883
8884 * python/py-function.c (convert_values_to_python, fnpy_init): Use
8885 gdbpy_ref.
8886
8887 2017-01-10 Tom Tromey <tom@tromey.com>
8888
8889 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
8890
8891 2017-01-10 Tom Tromey <tom@tromey.com>
8892
8893 * python/py-type.c (convert_field, make_fielditem, typy_fields)
8894 (typy_range): Use gdbpy_ref.
8895
8896 2017-01-10 Tom Tromey <tom@tromey.com>
8897
8898 * python/py-threadevent.c (create_thread_event_object): Use
8899 gdbpy_ref.
8900 * python/py-stopevent.c (create_stop_event_object): Simplify.
8901 (emit_stop_event): Use gdbpy_ref.
8902 * python/py-signalevent.c (create_signal_event_object): Use
8903 gdbpy_ref.
8904 * python/py-newobjfileevent.c (create_new_objfile_event_object)
8905 (emit_new_objfile_event, create_clear_objfiles_event_object)
8906 (emit_clear_objfiles_event): Use gdbpy_ref.
8907 * python/py-infevents.c (create_inferior_call_event_object)
8908 (create_register_changed_event_object)
8909 (create_memory_changed_event_object, emit_inferior_call_event)
8910 (emit_memory_changed_event, emit_register_changed_event): Use
8911 gdbpy_ref.
8912 * python/py-exitedevent.c (create_exited_event_object)
8913 (emit_exited_event): Use gdbpy_ref.
8914 * python/py-event.h (evpy_emit_event): Remove
8915 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
8916 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
8917 * python/py-continueevent.c (emit_continue_event): Use
8918 gdbpy_ref.
8919 * python/py-breakpoint.c (gdbpy_breakpoint_created)
8920 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
8921 gdbpy_ref.
8922 * python/py-bpevent.c (create_breakpoint_event_object): Use
8923 gdbpy_ref.
8924
8925 2017-01-10 Tom Tromey <tom@tromey.com>
8926
8927 * python/py-ref.h: New file.
8928
8929 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
8930
8931 * cli-out.c (cli_ui_out::do_redirect): Change return type to
8932 void.
8933 * cli-out.h (cli_ui_out::do_redirect): Likewise.
8934 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
8935 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
8936 * ui-out.c (ui_out::redirect): Likewise.
8937 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
8938 * cli/cli-logging.c (set_logging_redirect): Update call site of
8939 ui_out::redirect.
8940 (handle_redirections): Likewise.
8941 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
8942 * top.c (execute_command_to_string): Likewise.
8943 * utils.c (do_ui_out_redirect_pop): Likewise.
8944
8945 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
8946
8947 * stack.c (_initialize_stack): Update "frame" command help message.
8948
8949 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
8950
8951 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
8952
8953 2017-01-06 Yao Qi <yao.qi@linaro.org>
8954
8955 * x86-linux-nat.h: Include gdb_proc_service.h.
8956
8957 2017-01-06 Yao Qi <yao.qi@linaro.org>
8958
8959 * ser-base.h: Include serial.h.
8960
8961 2017-01-06 Yao Qi <yao.qi@linaro.org>
8962
8963 * ppc-linux-tdep.h: Include ppc-tdep.h.
8964
8965 2017-01-06 Yao Qi <yao.qi@linaro.org>
8966
8967 * nat/amd64-linux-siginfo.h: Include signal.h.
8968
8969 2017-01-06 Yao Qi <yao.qi@linaro.org>
8970
8971 * nat/aarch64-linux-hw-point.h: Include break-common.h.
8972
8973 2017-01-06 Yao Qi <yao.qi@linaro.org>
8974
8975 * mi/mi-parse.h: Include mi-cmds.h.
8976
8977 2017-01-06 Yao Qi <yao.qi@linaro.org>
8978
8979 * inf-loop.c: Don't include "target.h".
8980 * inf-loop.h: Include it here.
8981
8982 2017-01-06 Yao Qi <yao.qi@linaro.org>
8983
8984 * dfp.h: Include "dboulest.h" and "expression.h".
8985
8986 2017-01-06 Yao Qi <yao.qi@linaro.org>
8987
8988 * ax-gdb.h: Include "ax.h".
8989
8990 2017-01-06 Yao Qi <yao.qi@linaro.org>
8991
8992 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
8993 with nat/gdb_ptrace.h.
8994
8995 2017-01-05 Yao Qi <yao.qi@linaro.org>
8996
8997 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
8998 new line.
8999 (mips64_fbsd_sigframe_init): Likewise.
9000
9001 2017-01-04 John Baldwin <jhb@FreeBSD.org>
9002
9003 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
9004 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
9005
9006 2017-01-04 John Baldwin <jhb@FreeBSD.org>
9007
9008 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
9009 * NEWS: Mention new FreeBSD/mips native configuration.
9010 * config/mips/fbsd.mh: New file.
9011 * configure.host: Add mips*-*-freebsd*.
9012 * mips-fbsd-nat.c: New file.
9013
9014 2017-01-04 John Baldwin <jhb@FreeBSD.org>
9015
9016 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
9017 (ALLDEPFILES): Add mips-fbsd-tdep.c.
9018 * NEWS: Mention new FreeBSD/mips target.
9019 * configure.tgt: Add mips*-*-freebsd*.
9020 * mips-fbsd-tdep.c: New file.
9021 * mips-fbsd-tdep.h: New file.
9022
9023 2017-01-04 Yao Qi <yao.qi@linaro.org>
9024
9025 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
9026 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
9027
9028 2017-01-01 Joel Brobecker <brobecker@adacore.com>
9029
9030 Update copyright year range in all GDB files.
9031
9032 2017-01-01 Joel Brobecker <brobecker@adacore.com>
9033
9034 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
9035
9036 For older changes see ChangeLog-2016.
9037 \f
9038 Local Variables:
9039 mode: change-log
9040 left-margin: 8
9041 fill-column: 74
9042 version-control: never
9043 coding: utf-8
9044 End:
This page took 0.233124 seconds and 4 git commands to generate.