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