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