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