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