]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
PowerPC64 ELFv2 symbols not needed in get_synthetic_symtab
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
db8dd160
MR
12017-10-03 Maciej W. Rozycki <macro@imgtec.com>
2
3 * gdbarch.sh (objfile): Remove duplicate declaration.
4 * gdbarch.h: Regenerate.
5
f8bfbf22
TT
62017-10-03 Tom Tromey <tom@tromey.com>
7
8 * utils.c (internal_vproblem): Use string_vprintf.
9
5178ed48
TT
102017-10-03 Tom Tromey <tom@tromey.com>
11
12 * printcmd.c (info_symbol_command): Use std::string.
13
8cff8730
TT
142017-10-03 Tom Tromey <tom@tromey.com>
15
16 * top.c (gdb_safe_append_history): Use std::string.
17
895b8f30
TT
182017-10-03 Tom Tromey <tom@tromey.com>
19
20 * event-top.c (stdin_event_handler): Update.
21 * main.c (captured_main_1): Update.
22 * top.h (make_delete_ui_cleanup): Remove.
23 (struct ui): Add constructor and destructor.
24 (new_ui, delete_ui): Remove.
25 * top.c (make_delete_ui_cleanup): Remove.
26 (new_ui_command): Use std::unique_ptr.
27 (delete_ui_cleanup): Remove.
28 (ui::ui): Rename from new_ui. Update.
29 (free_ui): Remove.
30 (ui::~ui): Rename from delete_ui. Update.
31
0efef640
TT
322017-10-03 Tom Tromey <tom@tromey.com>
33
34 * symfile.c (load_progress): Use gdb::byte_vector.
35
245ad7d3
TT
362017-10-03 Tom Tromey <tom@tromey.com>
37
38 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
39 declaration.
40 * printcmd.c (x_command): Remove unused declaration.
41 * symfile.c (symbol_file_command): Remove unused declaration.
42
e05550d7
TT
432017-10-03 Tom Tromey <tom@tromey.com>
44
45 * utils.c (internal_vproblem): Use std::string.
46 (defaulted_query): Likewise.
47
b95de2b7
TT
482017-10-03 Tom Tromey <tom@tromey.com>
49
50 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
51 * top.c (execute_command_to_string): Update.
52 * utils.c (make_cleanup_restore_page_info): Remove.
53 (do_restore_page_info_cleanup): Remove.
54 (set_batch_flag_and_restore_page_info):
55 New.
56 (make_cleanup_restore_page_info): Remove.
57 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
58 (~set_batch_flag_and_restore_page_info): New
59 (make_cleanup_restore_uinteger): Remove.
60 (make_cleanup_restore_integer): Remove.
61 (struct restore_integer_closure): Remove.
62 (restore_integer): Remove.
63 * utils.h (struct set_batch_flag_and_restore_page_info): New
64 class.
65 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
66 (make_cleanup_restore_page_info): Remove.
67 (make_cleanup_restore_uinteger) Remove.
68 (make_cleanup_restore_integer) Remove.
69
07036511
TT
702017-10-03 Tom Tromey <tom@tromey.com>
71
72 * record-full.h (record_full_gdb_operation_disable_set): Return
73 scoped_restore_tmpl<int>.
74 * infrun.c (adjust_pc_after_break): Update.
75 (handle_signal_stop): Update.
76 * record-full.c (record_full_gdb_operation_disable_set): Return
77 scoped_restore_tmpl<int>.
78 (record_full_wait_1, record_full_insert_breakpoint)
79 (record_full_remove_breakpoint, record_full_save)
80 (record_full_goto_insn): Update.
81
45320ffa
TT
822017-10-02 Tom Tromey <tom@tromey.com>
83
84 PR rust/22236:
85 * rust-lang.c (rust_val_print_str): New function.
86 (val_print_struct): Call it.
87 (rust_subscript): Preserve name of slice type.
88
b3e3859b
TT
892017-10-02 Tom Tromey <tom@tromey.com>
90
91 * rust-lang.c (rust_subscript): Handle slices in
92 EVAL_AVOID_SIDE_EFFECTS case.
93
01af5e0d
TT
942017-10-02 Tom Tromey <tom@tromey.com>
95
96 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
97
888e3ddb
TT
982017-10-02 Tom Tromey <tom@tromey.com>
99
100 * rust-lang.h (rust_slice_type): Add "extern".
101
cc536b21
PA
1022017-10-02 Tom Tromey <tom@tromey.com>
103 Pedro Alves <palves@redhat.com>
104
105 * ada-lang.h (ada_exc_info::operator<): Make const.
106 (ada_exc_info::operator==): Make const.
107 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
108 Make const.
109
386c8614
TT
1102017-09-29 Tom Tromey <tom@tromey.com>
111
112 * target.c (read_whatever_is_readable): Change type of "result".
113 Update.
114 (free_memory_read_result_vector): Remove.
115 (read_memory_robust): Change return type. Update.
116 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
117 bin2hex, std::string.
118 * target.h (memory_read_result_s): Remove typedef.
119 (free_memory_read_result_vector): Remove.
120 (read_memory_robust): Return std::vector.
121
789c4b5e
TT
1222017-09-29 Tom Tromey <tom@tromey.com>
123
124 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
125
ab816a27
TT
1262017-09-29 Tom Tromey <tom@tromey.com>
127
128 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
129 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
130 operator< and operator==.
131 (ada_exceptions_list): Return a std::vector.
132 * ada-lang.c (ada_exc_info::operator<): Rename from
133 compare_ada_exception_info.
134 (ada_exc_info::operator==): New.
135 (sort_remove_dups_ada_exceptions_list): Change type of
136 "exceptions".
137 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
138 (ada_add_global_exceptions): Likewise.
139 (ada_exceptions_list_1): Return a std::vector.
140 (ada_exceptions_list): Likewise.
141
52f9abe4
TT
1422017-09-29 Tom Tromey <tom@tromey.com>
143
144 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
145 'std::set *'.
146 (print_one_inferior): Update.
147 (free_vector_of_ints): Remove.
148 (list_available_thread_groups): Change "ids" to std::set.
149 (mi_cmd_list_thread_groups): Update.
150 (struct collect_cores_data) <core>: Now a std::set.
151 (collect_cores): Update.
152 (unique): Remove.
153 (print_one_inferior): Update.
154
dcd5ddcc
TT
1552017-09-29 Tom Tromey <tom@tromey.com>
156
157 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
158 (mi_execute_async_cli_command): Likewise.
159 (mi_cmd_trace_frame_collected): Use field_fmt.
160
45d288cc
TT
1612017-09-29 Tom Tromey <tom@tromey.com>
162
163 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
164 gdb::byte_vector.
165
6afe2f4a
TT
1662017-09-29 Tom Tromey <tom@tromey.com>
167
168 * mi/mi-parse.c (mi_parse): Remove unused declaration.
169
9813429a
TT
1702017-09-29 Tom Tromey <tom@tromey.com>
171
172 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
173
2d6960b4
TT
1742017-09-29 Tom Tromey <tom@tromey.com>
175
176 * varobj.h (varobj_gen_name): Return std::string.
177 * varobj.c (varobj_gen_name): Return std::string.
178 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
179 (mi_cmd_var_delete): Don't copy "name".
180
784c453a
TT
1812017-09-29 Tom Tromey <tom@tromey.com>
182
183 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
184 (mi_cmd_break_insert_1): Update.
185
a9bc57b9
TT
1862017-09-29 Tom Tromey <tom@tromey.com>
187
188 * target.h (make_scoped_defer_target_commit_resume): Update.
189 * target.c (make_scoped_defer_target_commit_resume): Rename from
190 make_cleanup_defer_target_commit_resume. Return a
191 scoped_restore.
192 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
193
9754d8c4
TT
1942017-09-29 Tom Tromey <tom@tromey.com>
195
196 * main.c (captured_main_1): Remove unused declaration.
197 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
198
99ef965c
TT
1992017-09-29 Tom Tromey <tom@tromey.com>
200
201 * symtab.c (search_symbols): Remove unused outer cleanup.
202 (make_source_files_completion_list): Remove unused declaration.
203
42518ba7
TT
2042017-09-29 Tom Tromey <tom@tromey.com>
205
206 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
207
726b2169
TT
2082017-09-29 Tom Tromey <tom@tromey.com>
209
210 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
211 gdb::byte_vector.
212
55b06432
TT
2132017-09-29 Tom Tromey <tom@tromey.com>
214
215 * complaints.c (vcomplaint): Use std::string.
216
8abcee91
TT
2172017-09-29 Tom Tromey <tom@tromey.com>
218
219 * tracepoint.c (trace_variable_command): Use std::string.
220 (encode_actions_1): Remove unused declarations.
221 (create_tsv_from_upload): Use std::string.
222
6ad94bc7
TT
2232017-09-29 Tom Tromey <tom@tromey.com>
224
225 * cp-support.c (gdb_demangle): Use std::string.
226
2003f3d8
TT
2272017-09-29 Tom Tromey <tom@tromey.com>
228
229 * stack.c (parse_frame_specification): Use std::string
230 (info_frame_command): Use gdb::unique_xmalloc_ptr.
231
8f8accb5
TT
2322017-09-29 Tom Tromey <tom@tromey.com>
233
234 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
235
200aa7b1
TT
2362017-09-29 Tom Tromey <tom@tromey.com>
237
238 * utils.c (vfprintf_maybe_filtered): Use std::string.
239 (vfprintf_unfiltered): Likewise.
240
606aae8a
TT
2412017-09-29 Tom Tromey <tom@tromey.com>
242
243 * event-top.c (top_level_prompt): Return std::string.
244 (display_gdb_prompt): Update.
245
bd413795
TT
2462017-09-29 Tom Tromey <tom@tromey.com>
247
248 * unittests/common-utils-selftests.c (format): New function.
249 (string_vprintf_tests): New function.
250 (_initialize_common_utils_selftests): Register new tests.
251 * common/common-utils.c (string_vprintf): New function.
252 * common/common-utils.h (string_vprintf): Declare.
253
256642e8
PA
2542017-09-29 Pedro Alves <palves@redhat.com>
255
256 * common/rsp-low.c (unpack_varlen_hex): Constify.
257 * common/rsp-low.h (unpack_varlen_hex): Constify.
258 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
259 Constify.
260 * remote.c (remote_set_permissions, read_ptid)
261 (remote_current_thread, remote_get_threads_with_qthreadinfo)
262 (remote_static_tracepoint_marker_at)
263 (remote_static_tracepoint_markers_by_strid)
264 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
265 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
266 (parse_tracepoint_definition, parse_tsv_definition)
267 (parse_static_tracepoint_marker_definition): Constify.
268 * tracepoint.h (parse_static_tracepoint_marker_definition)
269 (parse_trace_status, parse_tracepoint_status)
270 (parse_tracepoint_definition, parse_tsv_definition): Constify.
271
b6bb3468
PA
2722017-09-29 Pedro Alves <palves@redhat.com>
273
274 * remote.c (target_buf, target_buf_size): Delete.
275 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
276 Use the connection's packet buffer instead.
277 All callers adjusted.
278 (_initialize_remote): Remove references to target_buf and
279 target_buf_size.
280
b2f8eb7a
PA
2812017-09-28 Pedro Alves <palves@redhat.com>
282
283 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
284 unittests/common-utils-selftests.c.
285 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
286 (COMMON_OBS): Remove utils-selftests.o.
287 * utils-selftests.c: Move to ...
288 * unittests/common-utils-selftests.c: ... here and rename self
289 test to "string_printf".
290
08302ed2
DE
2912017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
292
293 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
294 having NULL cus or tus.
295
96a5a1d3
UW
2962017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
297
298 * arm-tdep.c: (convert_from_extended): Remove.
299 (convert_to_extended): Likewise.
300 (arm_extract_return_value): Use convert_typed_floating.
301 (arm_store_return_value): Likewise.
302
303 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
304 * sh-tdep.c: Do not include "floatformat.h".
305 (sh_littlebyte_bigword_type): New function.
306 (sh_register_convert_to_virtual): Use convert_typed_floating.
307 (sh_register_convert_to_raw): Likewise.
308 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
309 (sh64_littlebyte_bigword_type): New function.
310 (sh64_extract_return_value): Use convert_typed_floating.
311 (sh64_register_convert_to_virtual): Likewise.
312 (sh64_register_convert_to_raw): Likewise.
313
0db7851f
UW
3142017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
315
316 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
317 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
318
319 * gdbtypes.h (union type_specific): Make field floatformat hold
320 just a single struct floatformat, not an array.
321 (floatformat_from_type): Move here.
322 * gdbtypes.c (floatformat_from_type): Move here. Update to
323 changed TYPE_FLOATFORMAT definition.
324 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
325 (recursive_dump_type): Likewise.
326 (init_float_type): Install correct floatformat for byte order.
327 (arch_float_type): Likewise.
328
77b7c781
UW
3292017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
330
331 * gdbtypes.c (init_type): Change incoming argument from
332 length-in-bytes to length-in-bits. Assert length is a
333 multiple of TARGET_CHAR_BITS.
334 (arch_type, arch_flags_type): Likewise.
335 (init_integer_type): Update call to init_type.
336 (init_character_type): Likewise.
337 (init_boolean_type): Likewise.
338 (init_float_type): Likewise.
339 (init_decfloat_type): Likewise.
340 (init_complex_type): Likewise.
341 (init_pointer_type): Likewise.
342 (objfile_type): Likewise.
343 (arch_integer_type): Update call to arch_type.
344 (arch_character_type): Likewise.
345 (arch_boolean_type): Likewise.
346 (arch_float_type): Likewise.
347 (arch_decfloat_type): Likewise.
348 (arch_complex_type): Likewise.
349 (arch_pointer_type): Likewise.
350 (gdbtypes_post_init): Likewise.
351
352 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
353 (read_base_type): Likewise.
354 * mdebugread.c (basic_type): Likewise.
355 * stabsread.c (dbx_init_float_type): Likewise.
356 (rs6000_builtin_type): Likewise.
357 (read_range_type): Likewise. Also, fix call to init_integer_type
358 with erroneous length argument.
359
360 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
361 * d-lang.c (build_d_types): Likewise.
362 * f-lang.c (build_fortran_types): Likewise.
363 * go-lang.c (build_go_types): Likewise.
364 * opencl-lang.c (build_opencl_types): Likewise.
365 * jit.c (finalize_symtab): Likewise.
366 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
367 (build_std_type_info_type): Likewise.
368 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
369 update call to arch_flags_type.
370
371 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
372 arch_type.
373 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
374 * windows-tdep.c (windows_get_tlb_type): Likewise.
375
376 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
377 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
378 * m32c-tdep.c (make_types): Likewise.
379 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
380 (rl78_psw_type): Update call to arch_flags_type.
381 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
382 * rx-tdep.c (rx_psw_type): Likewise.
383 (rx_fpsw_type): Likewise.
384 * sparc-tdep.c (sparc_psr_type): Likewise.
385 (sparc_fsr_type): Likewise.
386 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
387 (sparc64_ccr_type): Likewise.
388 (sparc64_fsr_type): Likewise.
389 (sparc64_fprs_type): Likewise.
390
f21b4d5c
TT
3912017-09-27 Tom Tromey <tom@tromey.com>
392
393 * findcmd.c (find_command): Constify.
394
643c2ffa
TT
3952017-09-27 Tom Tromey <tom@tromey.com>
396
397 * ada-tasks.c (task_command_1, task_command): Constify.
398
510e5e56
TT
3992017-09-27 Tom Tromey <tom@tromey.com>
400
401 * symtab.c (maintenance_print_symbol_cache)
402 (maintenance_flush_symbol_cache)
403 (maintenance_print_symbol_cache_statistics): Constify.
404
e503b191
TT
4052017-09-27 Tom Tromey <tom@tromey.com>
406
407 * inferior.c (detach_inferior_command, kill_inferior_command)
408 (inferior_command): Constify.
409
4e001312
TT
4102017-09-27 Tom Tromey <tom@tromey.com>
411
412 * regcache.c (regcache_print, maintenance_print_registers)
413 (maintenance_print_raw_registers)
414 (maintenance_print_cooked_registers)
415 (maintenance_print_register_groups)
416 (maintenance_print_remote_registers): Constify.
417
77763700
TT
4182017-09-27 Tom Tromey <tom@tromey.com>
419
420 * printcmd.c (map_display_numbers, undisplay_command)
421 (enable_disable_display_command, enable_display_command)
422 (disable_display_command): Constify.
423
4495129a
TT
4242017-09-27 Tom Tromey <tom@tromey.com>
425
426 * breakpoint.h (delete_command): Don't declare.
427 * breakpoint.c (delete_command, enable_once_command)
428 (enable_count_command, enable_delete_command, breakpoint_1)
429 (maintenance_info_breakpoints, stopin_command, stopat_command)
430 (delete_command, delete_trace_command, save_breakpoints)
431 (save_breakpoints_command, save_tracepoints_command): Constify.
432
3088cf40
TT
4332017-09-27 Tom Tromey <tom@tromey.com>
434
435 * macrocmd.c (macro_expand_command, macro_expand_once_command)
436 (skip_ws, extract_identifier, macro_define_command)
437 (macro_undef_command, macro_list_command): Constify.
438
69f476a3
TT
4392017-09-27 Tom Tromey <tom@tromey.com>
440
441 * infcmd.c (environment_info, set_environment_command)
442 (unset_environment_command, path_info, info_proc_cmd_1)
443 (info_proc_cmd_mappings, info_proc_cmd_stat)
444 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
445 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
446
c4a3e68e
TT
4472017-09-27 Tom Tromey <tom@tromey.com>
448
449 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
450 Constify.
451
c9d31bd6
TT
4522017-09-27 Tom Tromey <tom@tromey.com>
453
454 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
455
1f3f85eb
TT
4562017-09-27 Tom Tromey <tom@tromey.com>
457
458 * demangle.c (demangle_command): Constify.
459
9c504b5d
TT
4602017-09-27 Tom Tromey <tom@tromey.com>
461
462 * progspace.c (maintenance_info_program_spaces_command):
463 Constify.
464
6663cf91
TT
4652017-09-27 Tom Tromey <tom@tromey.com>
466
467 * compile/compile.c (check_raw_argument, compile_file_command)
468 (compile_code_command, compile_print_command): Constify.
469
34e5fa26
TT
4702017-09-27 Tom Tromey <tom@tromey.com>
471
472 * reggroups.c (maintenance_print_reggroups): Constify.
473
8384c356
TT
4742017-09-27 Tom Tromey <tom@tromey.com>
475
476 * dwarf2read.c (save_gdb_index_command): Constify.
477
884beb0c
TT
4782017-09-27 Tom Tromey <tom@tromey.com>
479
480 * stap-probe.c (info_probes_stap_command): Constify.
481
e0b2930c
TT
4822017-09-27 Tom Tromey <tom@tromey.com>
483
484 * fork-child.c (unset_exec_wrapper_command): Constify.
485
f938677d
TT
4862017-09-27 Tom Tromey <tom@tromey.com>
487
488 * btrace.c (get_uint, get_context_size, no_chunk)
489 (maint_btrace_packet_history_cmd)
490 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
491 (maint_info_btrace_cmd): Constify.
492
8949cb87
TT
4932017-09-27 Tom Tromey <tom@tromey.com>
494
495 * reverse.c (delete_bookmark_command): Constify.
496
ac88e2de
TT
4972017-09-27 Tom Tromey <tom@tromey.com>
498
499 * remote.c (set_memory_packet_size)
500 (set_memory_write_packet_size, show_memory_write_packet_size)
501 (set_memory_read_packet_size, show_memory_read_packet_size)
502 (compare_sections_command, packet_command, remote_put_command)
503 (remote_get_command, remote_delete_command): Constify.
504
bd4c9dfe
TT
5052017-09-27 Tom Tromey <tom@tromey.com>
506
507 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
508 (set_mipsfpu_double_command, set_mipsfpu_none_command)
509 (set_mipsfpu_auto_command): Constify.
510
5e93d4c6
TT
5112017-09-27 Tom Tromey <tom@tromey.com>
512
513 * cli/cli-cmds.h (cd_command): Constify.
514 * cli/cli-cmds.c (cd_command): Constify.
515
fc41a75b
TT
5162017-09-27 Tom Tromey <tom@tromey.com>
517
518 * thread.c (thread_name_command, thread_find_command): Constify.
519
67810076
TT
5202017-09-27 Tom Tromey <tom@tromey.com>
521
522 * probe.c (enable_probes_command, disable_probes_command):
523 Constify.
524
1d8b34a7
TT
5252017-09-27 Tom Tromey <tom@tromey.com>
526
527 * symfile.c (symbol_file_command): Constify.
528 * gdbcore.h (deprecated_file_changed_hook): Constify.
529 * exec.c (deprecated_file_changed_hook, exec_file_command)
530 (file_command): Constify.
531 * defs.h (symbol_file_command): Constify.
532
442019e1
TT
5332017-09-27 Tom Tromey <tom@tromey.com>
534
535 * remote-fileio.c (set_system_call_allowed)
536 (show_system_call_allowed): Constify.
537
2983f7cb
TT
5382017-09-27 Tom Tromey <tom@tromey.com>
539
540 * tracepoint.c (delete_trace_variable_command)
541 (tfind_end_command, tfind_start_command, tfind_pc_command)
542 (tfind_tracepoint_command, tfind_line_command)
543 (tfind_range_command, tfind_outside_command): Constify.
544
4fd41b24
TT
5452017-09-27 Tom Tromey <tom@tromey.com>
546
547 * ax-gdb.c (maint_agent_printf_command, agent_command)
548 (agent_eval_command): Constify.
549
f2fc3015
TT
5502017-09-27 Tom Tromey <tom@tromey.com>
551
552 * tracepoint.c (info_scope_command): Constify.
553 * python/python.c (gdbpy_decode_line): Constify.
554 * python/py-breakpoint.c (bppy_init): Constify.
555 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
556 * location.h: (new_linespec_location)
557 (string_to_event_location_basic, string_to_event_location):
558 Constify.
559 * location.c (new_linespec_location)
560 (string_to_event_location_basic, string_to_event_location):
561 Constify.
562 * linespec.h (decode_line_with_current_source)
563 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
564 * linespec.c (linespec_lex_to_end)
565 (decode_line_with_current_source)
566 (decode_line_with_last_displayed): Constify.
567 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
568 Constify.
569 * cli/cli-cmds.c (edit_command, list_command): Constify.
570 * breakpoint.h (until_break_command, watch_command_wrapper)
571 (awatch_command_wrapper, rwatch_command_wrapper)
572 (init_ada_exception_breakpoint): Constify.
573 * breakpoint.c (break_command_1, dprintf_command)
574 (break_range_command, watch_command_wrapper)
575 (rwatch_command_wrapper, awatch_command_wrapper)
576 (until_break_command, init_ada_exception_breakpoint)
577 (strace_marker_create_sals_from_location, trace_command)
578 (ftrace_command, strace_command, struct tracepoint): Constify.
579 * ax-gdb.c (agent_command_1): Constify.
580 * ada-lang.c (ada_exception_sal): Constify.
581
8c2f95f4
TT
5822017-09-27 Tom Tromey <tom@tromey.com>
583
584 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
585 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
586 (get_context_size, no_chunk, get_insn_history_modifiers)
587 (cmd_record_insn_history, get_call_history_modifiers)
588 (cmd_record_call_history): Constify.
589
a0d65762
TT
5902017-09-27 Tom Tromey <tom@tromey.com>
591
592 * source.c (show_substitute_path_command)
593 (unset_substitute_path_command, set_substitute_path_command):
594 Constify.
595
58971144
TT
5962017-09-27 Tom Tromey <tom@tromey.com>
597
598 * typeprint.c (maintenance_print_type): Constify.
599 * maint.c (maintenance_dump_me, maintenance_demangle)
600 (maintenance_time_display, maintenance_info_sections)
601 (maintenance_print_statistics, maintenance_deprecate)
602 (maintenance_undeprecate): Constify.
603 (maintenance_do_deprecate): Constify. Use std::string.
604 (maintenance_selftest): Constify.
605 * gdbtypes.h (maintenance_print_type): Constify.
606
c482f52c
TT
6072017-09-27 Tom Tromey <tom@tromey.com>
608
609 * hppa-tdep.c (unwind_command): Constify.
610
e100df1a
TT
6112017-09-27 Tom Tromey <tom@tromey.com>
612
613 * target-descriptions.c (unset_tdesc_filename_cmd)
614 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
615 Constify.
616
31d56ade
TT
6172017-09-27 Tom Tromey <tom@tromey.com>
618
619 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
620
b961da0b
TT
6212017-09-27 Tom Tromey <tom@tromey.com>
622
623 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
624
e2d8ae16
TT
6252017-09-27 Tom Tromey <tom@tromey.com>
626
627 * tui/tui-regs.c (tui_reg_command): Constify.
628
863779b0
TT
6292017-09-27 Tom Tromey <tom@tromey.com>
630
631 * skip.c (skip_file_command, skip_function_command)
632 (skip_enable_command, skip_disable_command, skip_delete_command):
633 Constify.
634
cdb34d4a
TT
6352017-09-27 Tom Tromey <tom@tromey.com>
636
637 * record-btrace.c (cmd_record_btrace_bts_start)
638 (cmd_record_btrace_pt_start): Constify.
639
e99c83e7
TT
6402017-09-27 Tom Tromey <tom@tromey.com>
641
642 * symmisc.c (maintenance_print_symbols)
643 (maintenance_print_msymbols, maintenance_print_objfiles)
644 (maintenance_info_symtabs, maintenance_check_symtabs)
645 (maintenance_expand_symtabs, maintenance_info_line_tables):
646 Constify.
647
32faf971
TT
6482017-09-27 Tom Tromey <tom@tromey.com>
649
650 * top.c (new_ui_command): Constify.
651
2cf311eb
TT
6522017-09-27 Tom Tromey <tom@tromey.com>
653
654 * symfile.c (add_symbol_file_command)
655 (remove_symbol_file_command, list_overlays_command)
656 (map_overlay_command, unmap_overlay_command)
657 (overlay_auto_command, overlay_manual_command)
658 (overlay_off_command, overlay_load_command): Constify.
659
e6738699
TT
6602017-09-27 Tom Tromey <tom@tromey.com>
661
662 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
663 (info_spu_mailbox_command, info_spu_dma_command)
664 (info_spu_proxydma_command): Constify.
665
aa360cd5
TT
6662017-09-27 Tom Tromey <tom@tromey.com>
667
668 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
669
898241a5
TT
6702017-09-27 Tom Tromey <tom@tromey.com>
671
672 * cli/cli-script.c (user_defined_command): Constify.
673
2d0ac106
TT
6742017-09-27 Tom Tromey <tom@tromey.com>
675
676 * cli/cli-dump.c (dump_memory_command, dump_value_command)
677 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
678 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
679 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
680 (dump_binary_value, append_binary_memory, append_binary_value):
681 Constify.
682 (struct dump_context) <func>: Constify.
683 (add_dump_command): Update.
684
dede02ce
TT
6852017-09-27 Tom Tromey <tom@tromey.com>
686
687 * cli/cli-cmds.c (show_version, show_configuration)
688 (source_command, show_user): Constify.
689
d3cb6b99
TT
6902017-09-27 Tom Tromey <tom@tromey.com>
691
692 * target.c (maintenance_print_target_stack): Constify.
693
1970a12f
TT
6942017-09-27 Tom Tromey <tom@tromey.com>
695
696 * interps.c (interpreter_exec_cmd): Constify.
697
41243651
TT
6982017-09-27 Tom Tromey <tom@tromey.com>
699
700 * record-full.c (cmd_record_full_restore): Constify.
701
4465d9db
TT
7022017-09-27 Tom Tromey <tom@tromey.com>
703
704 * memattr.c (enable_mem_command, disable_mem_command)
705 (delete_mem_command): Constify.
706
ad25e423
TT
7072017-09-27 Tom Tromey <tom@tromey.com>
708
709 * value.c (show_convenience): Constify.
710
d64097b1
TT
7112017-09-27 Tom Tromey <tom@tromey.com>
712
713 * gdbcore.h (core_file_command): Update.
714 * corefile.c (core_file_command): Constify.
715
4d4589ef
TT
7162017-09-27 Tom Tromey <tom@tromey.com>
717
718 * user-regs.c (maintenance_print_user_registers): Constify.
719
32a7bf17
TT
7202017-09-27 Tom Tromey <tom@tromey.com>
721
722 * cp-namespace.c (maintenance_cplus_namespace): Constify.
723
4a475551
TT
7242017-09-27 Tom Tromey <tom@tromey.com>
725
726 * cp-support.c (first_component_command): Constify.
727
990b9f9f
TT
7282017-09-27 Tom Tromey <tom@tromey.com>
729
730 * psymtab.c (maintenance_print_psymbols)
731 (maintenance_info_psymtabs, maintenance_check_psymtabs):
732 Constify.
733
c281872e
TT
7342017-09-27 Tom Tromey <tom@tromey.com>
735
736 * windows-tdep.c (display_tib): Constify.
737
5b64bf74
TT
7382017-09-27 Tom Tromey <tom@tromey.com>
739
740 * linux-fork.c (delete_checkpoint_command)
741 (detach_checkpoint_command): Constify.
742
4ada038f
TT
7432017-09-27 Tom Tromey <tom@tromey.com>
744
745 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
746
57f5a81b
TT
7472017-09-27 Tom Tromey <tom@tromey.com>
748
749 * arc-tdep.c (dump_arc_instruction_command): Constify.
750
b0a8e6c4
TT
7512017-09-27 Tom Tromey <tom@tromey.com>
752
753 * valprint.c (set_radix, show_radix): Constify.
754
8d97dc1c
TT
7552017-09-27 Tom Tromey <tom@tromey.com>
756
757 * dtrace-probe.c (info_probes_dtrace_command): Constify.
758
eb7c454d
TT
7592017-09-27 Tom Tromey <tom@tromey.com>
760
761 * command.h (not_just_help_class_command): Update.
762 * cli/cli-decode.h (not_just_help_class_command): Update.
763 * cli/cli-decode.c (not_just_help_class_command): Constify.
764
e4e33335
TT
7652017-09-27 Tom Tromey <tom@tromey.com>
766
767 * gdb_bfd.c (maintenance_info_bfds): Constify.
768
0450cc4c
TT
7692017-09-27 Tom Tromey <tom@tromey.com>
770
771 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
772 overloads.
773 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
774 (do_const_cfunc): New function.
775 (cmd_cfunc_eq): New overload.
776 (cli_user_command_p): Check do_const_cfunc.
777 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
778 const_cfunc.
779 * command.h (add_cmd): Add const overload and no-function
780 overload.
781 (set_cmd_cfunc): Add const overload.
782 (cmd_const_cfunc_ftype): Declare.
783 (cmd_cfunc_eq): Add const overload.
784 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
785 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
786 overload.
787
a9bbfbd8
TT
7882017-09-27 Tom Tromey <tom@tromey.com>
789
790 * macroexp.c (get_next_token_for_substitution): New function.
791 (substitute_args): Call it. Check for __VA_OPT__.
792
5230b05a
WT
7932017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
794 Pedro Alves <palves@redhat.com>
795
796 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
797 producer_is_icc_lt_14.
798 (producer_is_icc_lt_14): New function.
799 (check_producer): Add code for checking version of ICC.
800 (producer_is_icc): Move to producer.c.
801 (read_structure_type): Restrict ICC workaround to ICC<14.
802 * producer.c: Include selftest.h.
803 (producer_is_icc, producer_parsing_tests, _initialize_producer):
804 New functions.
805 * producer.h (producer_is_icc): New declaration.
806
b32b108a
WT
8072017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
808
809 * Makefile.in (SFILES): Add producer.c.
810 (COMMON_OBS): Add producer.o
811 * amd64-tdep.c (producer.h): Add new include.
812 * dwarf2read.c (producer.h): Add new include.
813 * producer.c: New file.
814 * producer.h: New file.
815 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
816 producer.c.
817 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
818 producer.h.
819
5007d765
MK
8202017-09-26 Matthias Klose <doko@ubuntu.com>
821
822 * configure.ac: Search ncursesw before ncurses.
823 Check ncursesw/ncurses.h before ncurses/ncurses.h.
824 * gdb_curses.h: Include <ncursesw/ncurses.h>
825 * config.in, configure: Regenerate.
826
281c4447
RO
8272017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
828
829 PR gdb/22185
830 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
831 obsolete.
832 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
833 Remove i386sol2 support.
834 * configure.nat <i386sol2>: Remove.
835 <sol2-64>: Fold into ...
836 <sol2>: ... this.
837 Move common settings to default section.
838 Add sol-thread.o.
839 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
840 x86_64-*-solaris2.1[0-9]*>: Rename to ...
841 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
842 <i[34567]86-*-solaris*>: Remove.
843 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
844
845 * configure.ac: Remove wctype in libw check.
846 (_MSE_INT_H): Don't define on Solaris 7-9.
847 <solaris*>: Remove libthread_db.so.1 check.
848 * configure: Regenerate.
849 * config.in: Regenerate.
850
851 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
852 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
853 (gdb_ps_size_t): Remove.
854 Use base types in users.
855 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
856
857 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
858
39b06c20
RO
8592017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
860
861 PR build/22206
862 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
863 (adi_is_addr_mapped): Likewise.
864 (PSR_ICC): Don't redefine.
865 (PSR_IMPL): Likewise.
866
6c3e20f1
TT
8672017-09-25 Tom Tromey <tom@tromey.com>
868
869 * regcache.c (regcache::dump): Use string_printf.
870
b292235f
TT
8712017-09-25 Tom Tromey <tom@tromey.com>
872
873 * regcache.c (class regcache_invalidator): New.
874 (struct register_to_invalidate): Remove.
875 (make_cleanup_regcache_invalidate): Remove.
876 (regcache::raw_write): Use regcache_invalidator.
877
9ac86b52
TT
8782017-09-25 Tom Tromey <tom@tromey.com>
879
880 * spu-tdep.c (spu2ppu_sniffer): Update.
881 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
882 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
883 Remove.
884 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
885 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
886 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
887 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
888 (frame_pop): Update.
889
c0e383c6
TT
8902017-09-25 Tom Tromey <tom@tromey.com>
891
892 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
893 * regcache.h (regcache_xfree): Don't declare.
894 * regcache.c (regcache_xfree): Remove.
895 (do_regcache_xfree): Use delete.
896 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
897 * linux-fork.c (free_fork): Use delete.
898 (fork_save_infrun_state): Likewise.
899 * jit.c (jit_dealloc_cache): Use delete.
900 * infrun.c (discard_infcall_suspend_state): Use delete.
901
791199cc
TT
9022017-09-25 Tom Tromey <tom@tromey.com>
903
904 * regcache.h (regcache_xmalloc): Don't declare.
905 (regcache_raw_set_cached_value): Update comment.
906 * regcache.c (regcache_xmalloc): Remove.
907 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
908 * jit.c (jit_frame_sniffer): Use new.
909 * frame.c (frame_save_as_regcache): Use new.
910
289e23aa
AA
9112017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
912
913 * NEWS: Advertise support for guarded-storage registers on IBM z.
914
1b63490c
AA
9152017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
916
917 * s390-linux-nat.c (have_regset_gs): New static variable.
918 (s390_linux_fetch_inferior_registers): Handle guarded-storage
919 control block and guarded-storage broadcast control regsets.
920 (s390_read_description): Detect whether the target has
921 guarded-storage support, return appropriate tdesc.
922 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
923 (features/s390x-gs-linux64.c): Likewise.
924 (struct gdbarch_tdep) <have_gs>: New field.
925 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
926 (s390_gsbc_regset): New variables.
927 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
928 and s390_gsbc_regset, if applicable.
929 (s390_core_read_description): Check whether core file was from a
930 target with guarded-storage support; include appropriate regsets.
931 (s390_gdbarch_init): Add registers for guarded-storage support.
932 (_initialize_s390_tdep): Initialize new target descriptions that
933 include registers for guarded-storage support.
934 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
935 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
936 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
937 (S390_NUM_REGS): Adjust macro definition.
938 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
939 (tdesc_s390x_gs_linux64): New declarations.
940
96235dc1
AA
9412017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
942
943 * features/s390-gs-linux64.xml: New file.
944 * features/s390-gs.xml: New file.
945 * features/s390-gsbc.xml: New file.
946 * features/s390x-gs-linux64.xml: New file.
947 * features/Makefile (WHICH): Add s390-gs-linux64 and
948 s390x-gs-linux64.
949 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
950 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
951 * features/s390-gs-linux64.c: New generated file.
952 * features/s390x-gs-linux64.c: New file.
953 * regformats/s390-gs-linux64.dat: New file.
954 * regformats/s390x-gs-linux64.dat: New file.
955
b4a7c699
TT
9562017-09-23 Tom Tromey <tom@tromey.com>
957
958 * defs.h (make_cleanup_override_quit_handler): Don't declare.
959
c2f97536
TT
9602017-09-22 Tom Tromey <tom@tromey.com>
961
962 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
963 type to scoped_restore_tmpl.
964 <scoped_input_handler>: Initialize m_quit_handler directly.
965
43573013
SDJ
9662017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
967
968 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
969 (cd_command): Likewise. Free "current_directory" before
970 assigning to it.
971 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
972 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
973 * top.c (gdb_dirbuf): Remove global declaration.
974 * top.h (gdb_dirbuf): Likewise.
975
6ec2e0f5
SDJ
9762017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
977
978 * gnulib/aclocal.m4: Regenerate.
979 * gnulib/config.in: Regenerate.
980 * gnulib/configure: Regenerate.
981 * gnulib/import/Makefile.am: Regenerate.
982 * gnulib/import/Makefile.in: Regenerate.
983 * gnulib/import/assure.h: New file.
984 * gnulib/import/at-func.c: Likewise
985 * gnulib/import/chdir-long.c: New file.
986 * gnulib/import/chdir-long.h: New file.
987 * gnulib/import/cloexec.c: New file.
988 * gnulib/import/cloexec.h: New file.
989 * gnulib/import/close.c: New file.
990 * gnulib/import/closedir.c: New file.
991 * gnulib/import/dirent-private.h: New file.
992 * gnulib/import/dup-safer.c: New file.
993 * gnulib/import/dup.c: New file.
994 * gnulib/import/dup2.c: New file.
995 * gnulib/import/error.c: New file.
996 * gnulib/import/error.h: New file.
997 * gnulib/import/exitfail.c: New file.
998 * gnulib/import/exitfail.h: New file.
999 * gnulib/import/fchdir.c: New file.
1000 * gnulib/import/fcntl.c: New file.
1001 * gnulib/import/fcntl.in.h: New file.
1002 * gnulib/import/fd-hook.c: New file.
1003 * gnulib/import/fd-hook.h: New file.
1004 * gnulib/import/fd-safer.c: New file.
1005 * gnulib/import/fdopendir.c: New file.
1006 * gnulib/import/filename.h: New file.
1007 * gnulib/import/filenamecat-lgpl.c: New file.
1008 * gnulib/import/filenamecat.h: New file.
1009 * gnulib/import/fstat.c: New file.
1010 * gnulib/import/fstatat.c: New file.
1011 * gnulib/import/getcwd-lgpl.c: New file.
1012 * gnulib/import/getcwd.c: New file.
1013 * gnulib/import/getdtablesize.c: New file.
1014 * gnulib/import/getlogin_r.c: New file.
1015 * gnulib/import/getprogname.c: New file.
1016 * gnulib/import/getprogname.h: New file.
1017 * gnulib/import/gettext.h: New file.
1018 * gnulib/import/glob-libc.h: New file.
1019 * gnulib/import/glob.c: New file.
1020 * gnulib/import/glob.in.h: New file.
1021 * gnulib/import/intprops.h: New file.
1022 * gnulib/import/m4/chdir-long.m4: New file.
1023 * gnulib/import/m4/close.m4: New file.
1024 * gnulib/import/m4/closedir.m4: New file.
1025 * gnulib/import/m4/d-ino.m4: New file.
1026 * gnulib/import/m4/d-type.m4: New file.
1027 * gnulib/import/m4/dup.m4: New file.
1028 * gnulib/import/m4/dup2.m4: New file.
1029 * gnulib/import/m4/error.m4: New file.
1030 * gnulib/import/m4/fchdir.m4: New file.
1031 * gnulib/import/m4/fcntl.m4: New file.
1032 * gnulib/import/m4/fcntl_h.m4: New file.
1033 * gnulib/import/m4/fdopendir.m4: New file.
1034 * gnulib/import/m4/filenamecat.m4: New file.
1035 * gnulib/import/m4/fstat.m4: New file.
1036 * gnulib/import/m4/fstatat.m4: New file.
1037 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1038 * gnulib/import/m4/getcwd-path-max.m4: New file.
1039 * gnulib/import/m4/getcwd.m4: New file.
1040 * gnulib/import/m4/getdtablesize.m4: New file.
1041 * gnulib/import/m4/getlogin_r.m4: New file.
1042 * gnulib/import/m4/getprogname.m4: New file.
1043 * gnulib/import/m4/glob.m4: New file.
1044 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1045 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1046 * gnulib/import/m4/mempcpy.m4: New file.
1047 * gnulib/import/m4/memrchr.m4: New file.
1048 * gnulib/import/m4/mode_t.m4: New file.
1049 * gnulib/import/m4/msvc-inval.m4: New file.
1050 * gnulib/import/m4/msvc-nothrow.m4: New file.
1051 * gnulib/import/m4/open.m4: New file.
1052 * gnulib/import/m4/openat.m4: New file.
1053 * gnulib/import/m4/opendir.m4: New file.
1054 * gnulib/import/m4/readdir.m4: New file.
1055 * gnulib/import/m4/realloc.m4: New file.
1056 * gnulib/import/m4/rewinddir.m4: New file.
1057 * gnulib/import/m4/save-cwd.m4: New file.
1058 * gnulib/import/m4/strdup.m4: New file.
1059 * gnulib/import/m4/strerror.m4: New file.
1060 * gnulib/import/m4/unistd-safer.m4: New file.
1061 * gnulib/import/mempcpy.c: New file.
1062 * gnulib/import/memrchr.c: New file.
1063 * gnulib/import/msvc-inval.c: New file.
1064 * gnulib/import/msvc-inval.h: New file.
1065 * gnulib/import/msvc-nothrow.c: New file.
1066 * gnulib/import/msvc-nothrow.h: New file.
1067 * gnulib/import/open.c: New file.
1068 * gnulib/import/openat-die.c: New file.
1069 * gnulib/import/openat-priv.h: New file.
1070 * gnulib/import/openat-proc.c: New file.
1071 * gnulib/import/openat.c: New file.
1072 * gnulib/import/openat.h: New file.
1073 * gnulib/import/opendir.c: New file.
1074 * gnulib/import/pipe-safer.c: New file.
1075 * gnulib/import/readdir.c: New file.
1076 * gnulib/import/realloc.c: New file.
1077 * gnulib/import/rewinddir.c: New file.
1078 * gnulib/import/save-cwd.c: New file.
1079 * gnulib/import/save-cwd.h: New file.
1080 * gnulib/import/strdup.c: New file.
1081 * gnulib/import/strerror-override.c: New file.
1082 * gnulib/import/strerror-override.h: New file.
1083 * gnulib/import/strerror.c: New file.
1084 * gnulib/import/unistd--.h: New file.
1085 * gnulib/import/unistd-safer.h: New file.
1086 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1087 "getcwd" and "glob".
1088 * ser-tcp.c: Undefine "close" before redefining it.
1089
432ae719
SM
10902017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1091
1092 * guile/scm-value.c (gdbscm_value_address): Initialize address,
1093 get rid of res_val.
1094
4fa7574e
RO
10952017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1096
1097 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1098 <sol2,sparc>: Likewise.
1099 <sol2-64,i386>: Likewise.
1100
1101 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1102 -Wdeprecated-declarations on *-*-solaris*.
1103 * configure: Regenerate.
1104
1105 * procfs.c: Include "nat/inferior.h".
1106 (procfs_info_proc): Fix typo.
1107
f6327dcb
KB
11082017-09-21 Kevin Buettner <kevinb@redhat.com>
1109
1110 * remote.c (vector): Include.
1111 (struct private_thread_info): Add field, thread_handle.
1112 (free_private_thread_info): Deallocate storage associated with
1113 thread handle.
1114 (get_private_info_thread): Initialize `thread_handle' field.
1115 (struct thread_item): Add field, thread_handle.
1116 (clear_threads_listing_context): Deallocate storage associated
1117 with thread handle.
1118 (start_thread): Add support for "handle" attribute.
1119 (thread_attributes): Add "handle".
1120 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1121 field.
1122 (remote_update_thread_list): Update thread_handle.
1123 (remote_thread_handle_to_thread_info): New function.
1124 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1125
fbbe5337
KB
11262017-09-21 Kevin Buettner <kevinb@redhat.com>
1127
1128 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1129 function.
1130 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1131 * python/python-internal.h (thread_object_type): Declare.
1132
e04ee09e
KB
11332017-09-21 Kevin Buettner <kevinb@redhat.com>
1134
1135 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1136 (target_thread_handle_to_thread_info): Declare.
1137 * target.c (target_thread_handle_to_thread_info): New function.
1138 * target-delegates.c: Regenerate.
1139 * gdbthread.h (find_thread_by_handle): Declare.
1140 * thread.c (find_thread_by_handle): New function.
1141 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1142 function.
1143 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1144
1e5b66ed
SM
11452017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1146
1147 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1148
ebe48ba0
SM
11492017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1150
1151 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1152
0a0bf5dc
YQ
11532017-09-21 Yao Qi <yao.qi@linaro.org>
1154
1155 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1156 to gdb_target_obs.
1157
d1b0a7bf
TT
11582017-09-20 Tom Tromey <tom@tromey.com>
1159
1160 * breakpoint.c (struct counted_command_line): Remove.
1161 (breakpoint_commands): Update.
1162 (alloc_counted_command_line, incref_counted_command_line)
1163 (decref_counted_command_line, do_cleanup_counted_command_line)
1164 (make_cleanup_decref_counted_command_line): Remove.
1165 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1166 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1167 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1168 (save_breakpoints): Update.
1169 * breakpoint.h (counted_command_line): Now a typedef to
1170 shared_ptr.
1171 (struct breakpoint) <commands>: Now a counted_command_line.
1172 (struct bpstats) <command>: Likewise.
1173
48649e1b
TT
11742017-09-20 Tom Tromey <tom@tromey.com>
1175
1176 * breakpoint.c (struct commands_info, do_map_commands_command):
1177 Remove.
1178 (commands_command_1): Update.
1179 (iterate_over_related_breakpoints): Take a function_view.
1180 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1181 (delete_command): Update.
1182 (map_breakpoint_numbers): Take a function_view.
1183 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1184 (disable_command): Update.
1185 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1186 (enable_command): Update.
1187 (struct disp_data, do_enable_breakpoint_disp)
1188 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1189 (do_map_enable_delete_breakpoint): Remove.
1190 (enable_once_command, enable_count_command, enable_delete_command)
1191 (delete_trace_variable_command): Update.
1192
04afa70c
TT
11932017-09-20 Tom Tromey <tom@tromey.com>
1194
1195 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
1196 (bpstat_clear): Use delete.
1197 (bpstats): New constructors.
1198 (bpstat_copy, bpstat_stop_status): Use new.
1199 (dprintf_after_condition_true): Update.
1200 * breakpoint.h (bpstats::bpstats): Add constructors.
1201 (bpstats::~bpstats): Add destructor.
1202
c83833f4
PA
12032017-09-20 Pedro Alves <palves@redhat.com>
1204
1205 * eval.c (make_params): Delete, refactored as ...
1206 (class fake_method): ... this new type's ctor.
1207 (fake_method::~fake_method): New.
1208 (evaluate_subexp_standard): Use 'fake_method'.
1209
223ffa71
TT
12102017-09-20 Tom Tromey <tom@tromey.com>
1211
1212 * windows-nat.c (get_windows_debug_event, windows_wait)
1213 (do_initial_windows_stuff, windows_attach): Update.
1214 * utils.c (vwarning, internal_vproblem): Update.
1215 (ui_unregister_input_event_handler_cleanup)
1216 (prepare_to_handle_input): Remove.
1217 (class scoped_input_handler): New.
1218 (defaulted_query, prompt_for_continue): Update.
1219 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1220 Update.
1221 * top.c (undo_terminal_modifications_before_exit): Update.
1222 * target/target.h (target_terminal_init, target_terminal_inferior)
1223 (target_terminal_ours): Don't declare.
1224 (class target_terminal): New.
1225 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1226 (target_terminal_ours_for_output)
1227 (make_cleanup_restore_target_terminal): Don't declare.
1228 (target_terminal_info): Remove.
1229 * target.c (enum terminal_state, terminal_state): Remove.
1230 (target_terminal::terminal_state): Define.
1231 (target_terminal::init): Rename from target_terminal_init.
1232 (target_terminal::inferior): Rename from
1233 target_terminal_inferior.
1234 (target_terminal::ours): Rename from target_terminal_ours.
1235 (target_terminal::ours_for_output): Rename from
1236 target_terminal_ours_for_output.
1237 (target_terminal::info): New method.
1238 (cleanup_restore_target_terminal)
1239 (make_cleanup_restore_target_terminal): Remove.
1240 * solib.c (handle_solib_event): Update.
1241 * remote.c (remote_serial_quit_handler): Update.
1242 (remote_terminal_inferior, remote_wait_as): Update.
1243 * record-full.c (record_full_wait_1): Update.
1244 * nto-procfs.c (procfs_create_inferior): Update.
1245 * nat/fork-inferior.c (startup_inferior): Update.
1246 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1247 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1248 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1249 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1250 (mi_breakpoint_created, mi_breakpoint_deleted)
1251 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1252 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1253 (mi_user_selected_context_changed, report_initial_inferior):
1254 Update.
1255 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1256 (linux_nat_terminal_inferior): Update.
1257 * infrun.c (follow_fork_inferior)
1258 (handle_vfork_child_exec_or_exit, do_target_resume)
1259 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1260 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1261 Update.
1262 * inflow.c (child_terminal_init, info_terminal_command): Update.
1263 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1264 (attach_command): Update.
1265 * infcall.c (call_thread_fsm_should_stop): Update.
1266 * gnu-nat.c (gnu_attach): Update.
1267 * extension.c (struct active_ext_lang_state)
1268 (restore_active_ext_lang): Update.
1269 * exceptions.c (print_flush): Update.
1270 * event-top.c (async_enable_stdin, default_quit_handler): Update.
1271 (struct quit_handler_cleanup_data, restore_quit_handler)
1272 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1273 Remove.
1274 * cp-support.c (gdb_demangle): Update.
1275 * breakpoint.c (update_inserted_breakpoint_locations)
1276 (insert_breakpoint_locations, handle_jit_event)
1277 (disable_breakpoints_in_unloaded_shlib): Update.
1278 * annotate.c (annotate_breakpoints_invalid)
1279 (annotate_frames_invalid): Update.
1280
013af3fc
TT
12812017-09-20 Tom Tromey <tom@tromey.com>
1282
1283 * main.c (catch_command_errors): Rename from
1284 catch_command_errors_const.
1285 (captured_main_1): Update.
1286
06871ae8
PA
12872017-09-20 Pedro Alves <palves@redhat.com>
1288
1289 * cli/cli-cmds.c (list_command): Use print_sal_location.
1290 (print_sal_location): New function.
1291 (ambiguous_line_spec): Use print_sal_location.
1292 * linespec.c (symbol_to_sal): Record the symbol in the sal.
1293 * symtab.c (find_function_start_sal): Likewise.
1294 * symtab.h (symtab_and_line::symbol): New field.
1295
e5f25bc5
PA
12962017-09-20 Pedro Alves <palves@redhat.com>
1297
1298 * linespec.c (minsym_found): Handle non-text minsyms.
1299 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1300
1b7fa39e
WT
13012017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1302
1303 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1304 backslash.
1305
37dd0825
WT
13062017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1307
1308 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1309 vmovups instead vmovaps.
1310 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1311
4e5a4f58
JB
13122017-09-19 John Baldwin <jhb@FreeBSD.org>
1313
1314 * NEWS (Changes since GDB 8.0): Add starti.
1315 * infcmd.c (enum run_break): New.
1316 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1317 case.
1318 (run_command): Use enum run_how.
1319 (start_command): Likewise.
1320 (starti_command): New function.
1321 (RUN_ARGS_HELP): New macro.
1322 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1323 commands. Add starti command.
1324
aa70c9f1
YQ
13252017-09-19 Yao Qi <yao.qi@linaro.org>
1326
1327 * Makefile.in (monitor.o): Remove the rule.
1328
d6541620
YQ
13292017-09-19 Yao Qi <yao.qi@linaro.org>
1330
1331 * annotate.h (struct annotate_arg_emitter): Use
1332 DISABLE_COPY_AND_ASSIGN.
1333 * common/refcounted-object.h (refcounted_object): Likewise.
1334 * completer.h (struct completion_result): Likewise.
1335 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1336 * filename-seen-cache.h (filename_seen_cache): Likewise.
1337 * gdbcore.h (thread_section_name): Likewise.
1338 * gdb_regex.h (compiled_regex): Likewise.
1339 * gdbthread.h (scoped_restore_current_thread): Likewise.
1340 * inferior.h (scoped_restore_current_inferior): Likewise.
1341 * jit.c (jit_reader): Likewise.
1342 * linespec.h (struct linespec_result): Likewise.
1343 * mi/mi-parse.h (struct mi_parse): Likewise.
1344 * nat/fork-inferior.c (execv_argv): Likewise.
1345 * progspace.h (scoped_restore_current_program_space): Likewise.
1346 * python/python-internal.h (class gdbpy_enter): Likewise.
1347 * regcache.h (regcache): Likewise.
1348 * target-descriptions.c (struct tdesc_reg): Likewise.
1349 (struct tdesc_type): Likewise.
1350 (struct tdesc_feature): Likewise.
1351 * ui-out.h (ui_out_emit_type): Likewise.
1352
0615127c
SM
13532017-09-18 Simon Marchi <simon.marchi@ericsson.com>
1354
1355 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1356 label abort_expression.
1357
5e187554
SM
13582017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1359
1360 * common/buffer.c (buffer_xml_printf): Adjust.
1361 * common/xml-utils.c (xml_escape_text): Change return type to
1362 std::string, update code accordingly.
1363 * common/xml-utils.h (xml_escape_text): Change return type to
1364 std::string.
1365 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1366 * windows-tdep.c (windows_xfer_shared_library): Adjust.
1367 * unittests/xml-utils-selftests.c (test_xml_escape_text):
1368 Adjust.
1369
c3d7b541
SM
13702017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1371
1372 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1373 (SUBDIR_UNITTESTS_OBS): Add new object file.
1374 * unittests/xml-utils-selftests.c: New file.
1375
1526853e
SM
13762017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1377
1378 * common/selftest.h (selftest): New struct/interface.
1379 (register_test): Add name parameter, add new overload.
1380 (run_tests): Add filter parameter.
1381 (for_each_selftest_ftype): New typedef.
1382 (for_each_selftest): New declaration.
1383 * common/selftest.c (tests): Change type to
1384 map<string, unique_ptr<selftest>>.
1385 (simple_selftest): New struct.
1386 (register_test): New function.
1387 (register_test): Add name parameter and use it.
1388 (run_tests): Add filter parameter and use it. Add prints.
1389 Adjust to vector -> map change.
1390 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1391 registering selftests.
1392 * arm-tdep.c (_initialize_arm_tdep): Likewise.
1393 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1394 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1395 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1396 * findvar.c (_initialize_findvar): Likewise.
1397 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1398 * maint.c (maintenance_selftest): Update call to run_tests.
1399 (maintenance_info_selftests): New function.
1400 (_initialize_maint_cmds): Register "maintenance info selftests"
1401 command. Update "maintenance selftest" doc.
1402 * regcache.c (_initialize_regcache): Add names when registering
1403 selftests.
1404 * rust-exp.y (_initialize_rust_exp): Likewise.
1405 * selftest-arch.c (gdbarch_selftest): New struct.
1406 (gdbarch_tests): Remove.
1407 (register_test_foreach_arch): Add name parameter. Call
1408 register_test.
1409 (tests_with_arch): Remove, move most content to
1410 gdbarch_selftest::operator().
1411 (_initialize_selftests_foreach_arch): Remove.
1412 * selftest-arch.h (register_test_foreach_arch): Add name
1413 parameter.
1414 (run_tests_with_arch): New declaration.
1415 * utils-selftests.c (_initialize_utils_selftests): Add names
1416 when registering selftests.
1417 * utils.c (_initialize_utils): Likewise.
1418 * unittests/array-view-selftests.c
1419 (_initialize_array_view_selftests): Likewise.
1420 * unittests/environ-selftests.c (_initialize_environ_selftests):
1421 Likewise.
1422 * unittests/function-view-selftests.c
1423 (_initialize_function_view_selftests): Likewise.
1424 * unittests/offset-type-selftests.c
1425 (_initialize_offset_type_selftests): Likewise.
1426 * unittests/optional-selftests.c
1427 (_initialize_optional_selftests): Likewise.
1428 * unittests/scoped_restore-selftests.c
1429 (_initialize_scoped_restore_selftests): Likewise.
1430 * NEWS: Document "maintenance selftest" and "maint info
1431 selftests".
1432
5846367a
SM
14332017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1434
1435 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1436 scoped_restore.
1437
bd77e8ff
SM
14382017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1439
1440 * mi/mi-main.c (mi_load_progress): Make uiout variable
1441 a unique_ptr.
1442
26a67918
PA
14432017-09-15 Pedro Alves <palves@redhat.com>
1444
1445 * compile/compile-c-types.c (convert_enum, convert_int)
1446 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1447
3f8a7804
SM
14482017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1449
1450 * dwarf2read.c (copy_string): Remove.
1451 (parse_macro_definition): Replace copy_string with savestring.
1452
8d200706
YQ
14532017-09-15 Yao Qi <yao.qi@linaro.org>
1454
1455 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1456 gdb_target_obs.
1457 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1458 Likewise.
1459 (i[34567]86-*-linux*): Likewise.
1460
d185219d
SM
14612017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1462
1463 * dwarf2expr.h (dwarf_stack_value): Add constructor.
1464 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1465 <stack>: Change type to std::vector.
1466 <stack_len, stack_allocated>: Remove.
1467 <grow_stack>: Remove.
1468 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1469 (dwarf_expr_context::~dwarf_expr_context): Remove.
1470 (dwarf_expr_context::grow_stack): Remove.
1471 (dwarf_expr_context::push): Adjust.
1472 (dwarf_expr_context::pop): Adjust.
1473 (dwarf_expr_context::fetch): Adjust.
1474 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1475 (dwarf_expr_context::stack_empty_p): Adjust.
1476 (dwarf_expr_context::execute_stack_op): Adjust.
1477
eccd80d6
SM
14782017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1479
1480 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1481 return type to bool.
1482 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1483
69009882
SM
14842017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1485
1486 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1487 Change type to bool.
1488 (dwarf_stack_value) <in_stack_memory>: Likewise.
1489 (dwarf_expr_context) <push_address>: Change parameter type to
1490 bool.
1491 <fetch_in_stack_memory>: Change return type to bool.
1492 <push>: Change parameter type to bool.
1493 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1494 to bool.
1495 (dwarf_expr_context::push_address): Likewise.
1496 (dwarf_expr_context::fetch_in_stack_memory): Change return type
1497 to bool.
1498 (dwarf_expr_context::execute_stack_op): Adjust.
1499 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1500
1e467161
SM
15012017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1502
1503 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1504 (struct dwarf_expr_context) <n_pieces>: Remove.
1505 <pieces>: Change type to std::vector.
1506 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1507 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1508 pieces.
1509 (dwarf_expr_context::add_piece): Adjust.
1510 * dwarf2loc.c (struct piece_closure): Initialize fields.
1511 <n_pieces>: Remove.
1512 <pieces>: Change type to std::vector.
1513 (allocate_piece_closure): Adjust, change parameter to
1514 std::vector rvalue and std::move it to piece_closure.
1515 (rw_pieced_value): Adjust.
1516 (check_pieced_synthetic_pointer): Adjust.
1517 (indirect_synthetic_pointer): Adjust.
1518 (coerce_pieced_ref): Adjust.
1519 (free_pieced_value_closure): Adjust. Use delete to free
1520 piece_closure.
1521 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
1522 to allocate_piece_closure.
1523 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1524
0782db84
SM
15252017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1526
1527 * probe.h (probe_ops_cp): Remove typedef.
1528 (DEF_VEC_P (probe_ops_cp)): Remove.
1529 (all_probe_ops): Change type to std::vector.
1530 * probe.c (info_probes_for_ops): Adjust to vector change.
1531 (probe_linespec_to_ops): Likewise.
1532 (all_probe_ops): Change type to std::vector.
1533 (_initialize_probe): Adjust to vector change.
1534 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1535 * elfread.c (elf_get_probes): Likewise.
1536 * stap-probe.c (_initialize_stap_probe): Likewise.
1537
1eac6bea
SM
15382017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1539
1540 * probe.h (struct bound_probe): Define constructors.
1541 * probe.c (bound_probe_s): Remove typedef.
1542 (DEF_VEC_O (bound_probe_s)): Remove VEC.
1543 (collect_probes): Change return type to std::vector, remove
1544 cleanup.
1545 (compare_probes): Return bool, change parameter type. Change
1546 semantic to "less than".
1547 (gen_ui_out_table_header_info): Change parameter to std::vector
1548 and update.
1549 (exists_probe_with_pops): Likewise.
1550 (info_probes_for_ops): Update to std::vector change.
1551 (enable_probes_command): Likewise.
1552 (disable_probes_command): Likewise.
1553
aaa63a31
SM
15542017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1555
1556 * probe.h (struct probe_ops) <get_probes>: Change parameter from
1557 vec to std::vector.
1558 * probe.c (parse_probes_in_pspace): Update.
1559 (find_probes_in_objfile): Update.
1560 (find_probe_by_pc): Update.
1561 (collect_probes): Update.
1562 (probe_any_get_probes): Update.
1563 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1564 return type to reference to std::vector.
1565 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1566 std::vector and update.
1567 (dtrace_process_dof): Likewise.
1568 (dtrace_get_probes): Likewise.
1569 * elfread.c (elf_get_probes): Change return type to std::vector,
1570 store an std::vector in bfd_data.
1571 (probe_key_free): Update to std::vector.
1572 * stap-probe.c (handle_stap_probe): Change parameter to
1573 std::vector and update.
1574 (stap_get_probes): Likewise.
1575 * symfile-debug.c (debug_sym_get_probes): Change return type to
1576 std::vector and update.
1577
cb85b21b
TT
15782017-09-11 Tom Tromey <tom@tromey.com>
1579
1580 * breakpoint.c (program_breakpoint_here_p): Update.
1581 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1582 from make_show_memory_breakpoints_cleanup. Return a
1583 scoped_restore_tmpl<int>.
1584 (restore_show_memory_breakpoints): Remove.
1585 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1586 * mem-break.c (memory_validate_breakpoint): Update.
1587 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1588 (ia64_memory_remove_breakpoint): Update.
1589 (ia64_breakpoint_from_pc): Update.
1590 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1591 from make_show_memory_breakpoints_cleanup.
1592
8fbc99ef
TT
15932017-09-11 Tom Tromey <tom@tromey.com>
1594
1595 * d-namespace.c (d_lookup_symbol): Use std::string.
1596 (find_symbol_in_baseclass): Likewise.
1597
50feb4bd
TT
15982017-09-11 Tom Tromey <tom@tromey.com>
1599
1600 * ctf.c (ctf_start): Use std::string.
1601
c6dc63a1
TT
16022017-09-11 Tom Tromey <tom@tromey.com>
1603
1604 * ada-lang.c (is_known_support_routine): Update.
1605 (ada_unhandled_exception_name_addr_from_raise): Update.
1606 * guile/scm-frame.c (gdbscm_frame_name): Update.
1607 * python/py-frame.c (frapy_name): Update.
1608 (frapy_function): Update.
1609 * stack.h (find_frame_funname): Update.
1610 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1611 (print_frame): Update.
1612
d6b9b80f
TT
16132017-09-11 Tom Tromey <tom@tromey.com>
1614
1615 * findcmd.c (put_bits): Take a gdb::byte_vector.
1616 (parse_find_args): Return gdb::byte_vector. "args" now const.
1617 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
1618 cleanups.
1619 (find_command): Update.
1620
a9921622
TT
16212017-09-11 Tom Tromey <tom@tromey.com>
1622
1623 * cli/cli-script.c (class scoped_restore_hook_in): New.
1624 (clear_hook_in_cleanup): Remove.
1625 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1626 scoped_restore_hook_in.
1627
be0d7abb
TT
16282017-09-11 Tom Tromey <tom@tromey.com>
1629
1630 * cli/cli-script.c (restore_interp): Remove.
1631 (read_command_lines): Use scoped_restore_interp.
1632 * interps.c (scoped_restore_interp::set_temp): Rename from
1633 interp_set_temp.
1634 * interps.h (class scoped_restore_interp): New.
1635 (interp_set_temp): Remove.
1636
00f675ff
TT
16372017-09-11 Tom Tromey <tom@tromey.com>
1638
1639 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1640 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1641 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1642 scoped_restore.
1643 (mi_cmd_break_insert_1): Update.
1644 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1645 scoped_restore.
1646
cb791d59
TT
16472017-09-11 Tom Tromey <tom@tromey.com>
1648
1649 * demangle.c (demangle_command): Update.
1650 * breakpoint.c (disable_command): Update.
1651 (enable_command): Update.
1652 (find_location_by_number): Make "number" const. Use
1653 get_number_trailer.
1654 * cli/cli-utils.c (extract_arg): Return std::string.
1655 * probe.c (parse_probe_linespec): Update. Change types.
1656 (collect_probes): Take string arguments.
1657 (parse_probe_linespec): Likewise.
1658 (info_probes_for_ops): Update.
1659 (enable_probes_command): Update.
1660 (disable_probes_command): Update.
1661 * break-catch-sig.c (catch_signal_split_args): Update.
1662 * mi/mi-parse.c (mi_parse): Update.
1663
2039bd9f
TT
16642017-09-11 Tom Tromey <tom@tromey.com>
1665
1666 * language.h (language_enum): Make argument const.
1667 * language.c (language_enum): Make argument const.
1668
f1735a53
TT
16692017-09-11 Tom Tromey <tom@tromey.com>
1670
1671 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1672 as function.
1673 (skip_to_space): Rename from skip_to_space_const.
1674 * common/common-utils.c (skip_to_space): New function.
1675 (skip_to_space): Rename from skip_to_space_const.
1676 * cli/cli-utils.h (get_number): Rename from get_number_const.
1677 (extract_arg): Rename from extract_arg_const.
1678 * cli/cli-utils.c (get_number): Rename from get_number_const.
1679 (extract_arg): Rename from extract_arg_const.
1680 (number_or_range_parser::get_number): Use ::get_number.
1681 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1682 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1683 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1684 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1685 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1686 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1687 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1688 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1689
7d221d74
TT
16902017-09-11 Tom Tromey <tom@tromey.com>
1691
1692 * python/python.c (do_start_initialization): Use
1693 py-event-types.def to initialize types.
1694 Define all object type structures.
1695 * python/python-internal.h: Don't declare event initialization
1696 functions.
1697 * python/py-threadevent.c (thread_event_object_type): Don't
1698 define.
1699 * python/py-stopevent.c (stop_event_object_type): Don't define.
1700 * python/py-signalevent.c (signal_event_object_type): Don't
1701 declare or define.
1702 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1703 (clear_objfiles_event_object_type): Don't declare or define.
1704 * python/py-infevents.c (inferior_call_pre_event_object_type)
1705 (inferior_call_post_event_object_type)
1706 (register_changed_event_object_type)
1707 (memory_changed_event_object_type): Don't declare or define.
1708 * python/py-inferior.c (new_thread_event_object_type)
1709 (new_inferior_event_object_type)
1710 (inferior_deleted_event_object_type): Don't declare or define.
1711 * python/py-exitedevent.c (exited_event_object_type): Don't
1712 declare or define.
1713 * python/py-evts.c (gdbpy_initialize_py_events): Use
1714 py-all-events.def.
1715 * python/py-events.h (thread_event_object_type): Don't declare.
1716 (events_object): Use py-all-events.def.
1717 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1718 py-event-types.def.
1719 * python/py-event-types.def: New file.
1720 * python/py-continueevent.c (create_continue_event_object): Don't
1721 declare or define.
1722 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1723 declare or define.
1724 * python/py-all-events.def: New file.
1725
35c61a1d
TT
17262017-09-11 Tom Tromey <tom@tromey.com>
1727
1728 * python/py-threadevent.c (create_thread_event_object): Return
1729 gdbpy_ref.
1730 * python/py-stopevent.h (create_stop_event_object)
1731 (create_breakpoint_event_object, create_signal_event_object):
1732 Update.
1733 * python/py-stopevent.c (create_stop_event_object): Return
1734 gdbpy_ref.
1735 (emit_stop_event): Update.
1736 * python/py-signalevent.c (create_signal_event_object): Return
1737 gdbpy_ref.
1738 * python/py-infevents.c (create_inferior_call_event_object):
1739 Update.
1740 * python/py-event.h (create_event_object)
1741 (create_thread_event_object): Update.
1742 * python/py-event.c (create_event_object): Return gdbpy_ref.
1743 * python/py-continueevent.c: Return gdbpy_ref.
1744 * python/py-bpevent.c (create_breakpoint_event_object): Return
1745 gdbpy_ref.
1746
7c96f8c1
TT
17472017-09-11 Tom Tromey <tom@tromey.com>
1748
1749 PR python/15622:
1750 * NEWS: Add entry.
1751 * python/python.c (do_start_initialization): Initialize new event
1752 types.
1753 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1754 (gdbpy_initialize_inferior_deleted_event)
1755 (gdbpy_initialize_new_thread_event): Declare.
1756 * python/py-threadevent.c (create_thread_event_object): Add option
1757 "thread" parameter.
1758 * python/py-inferior.c (new_thread_event_object_type)
1759 (new_inferior_event_object_type)
1760 (inferior_deleted_event_object_type): Declare.
1761 (python_new_inferior, python_inferior_deleted): New functions.
1762 (add_thread_object): Emit new_thread event.
1763 (gdbpy_initialize_inferior): Attach new functions to corresponding
1764 observers.
1765 (new_thread, new_inferior, inferior_deleted): Define new event
1766 types.
1767 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1768 registries.
1769 * python/py-events.h (events_object) <new_inferior,
1770 inferior_deleted, new_thread>: New fields.
1771 * python/py-event.h (create_thread_event_breakpoint): Add optional
1772 "thread" parameter.
1773
72542b8e
AB
17742017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1775
1776 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1777 check current_ui instead.
1778 (internal_vproblem): Likewise.
1779
0d64823e
SM
17802017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1781
1782 * thread.c (print_thread_info_1): Remove unnecessary calls to
1783 uiout->is_mi_like_p.
1784
eb1e02fd
TT
17852017-09-09 Tom Tromey <tom@tromey.com>
1786
1787 * namespace.h (add_using_directive): Update.
1788 * namespace.c (add_using_directive): Change type of excludes to
1789 std::vector.
1790 * dwarf2read.c (read_import_statement): Use std::vector.
1791 (read_namespace): Update.
1792 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1793
0fc21fd8
TT
17942017-09-09 Tom Tromey <tom@tromey.com>
1795
1796 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1797
49663d05
TT
17982017-09-09 Tom Tromey <tom@tromey.com>
1799
1800 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1801
0b868b60
TT
18022017-09-09 Tom Tromey <tom@tromey.com>
1803
1804 * stack.c (func_command): Use gdb::def_vector.
1805
c0470d48
TT
18062017-09-09 Tom Tromey <tom@tromey.com>
1807
1808 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1809 ui_out_emit_list, ui_out_emit_tuple.
1810 (mi_cmd_var_update): Likewise.
1811
ca5909c7
TT
18122017-09-09 Tom Tromey <tom@tromey.com>
1813
1814 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1815 ui_out_redirect_pop.
1816 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1817 ui_out_redirect_pop.
1818 * utils.c (do_ui_out_redirect_pop)
1819 (make_cleanup_ui_out_redirect_pop): Remove.
1820 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1821 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1822 * ui-out.h (ui_out_redirect_pop): New class.
1823
e6a2252a
TT
18242017-09-09 Tom Tromey <tom@tromey.com>
1825
1826 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1827 (list_available_thread_groups, mi_cmd_list_thread_groups)
1828 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1829 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1830 Likewise.
1831
393702cd
TT
18322017-09-09 Tom Tromey <tom@tromey.com>
1833
1834 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1835 ui_out_emit_tuple.
1836
76f9c9cf
TT
18372017-09-09 Tom Tromey <tom@tromey.com>
1838
1839 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1840 * stack.c (print_frame): Use ui_out_emit_tuple.
1841 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1842 (info_spu_mailbox_command, info_spu_dma_command)
1843 (info_spu_proxydma_command): Likewise.
1844 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1845 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1846 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1847 ui_out_emit_tuple.
1848 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1849
dc9fe180
TT
18502017-09-09 Tom Tromey <tom@tromey.com>
1851
1852 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1853 (class ui_out_emit_table): Update comment.
1854 * ui-out.c (do_cleanup_table_end)
1855 (make_cleanup_ui_out_table_begin_end): Remove.
1856 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1857 (info_spu_dma_cmdlist): Likewise.
1858 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1859 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1860 ui_out_emit_table.
1861
f8cc3da6
TT
18622017-09-09 Tom Tromey <tom@tromey.com>
1863
1864 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1865 ui_out_emit_list, gdb::optional.
1866
481695ed
JB
18672017-09-09 John Baldwin <jhb@FreeBSD.org>
1868
1869 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1870 prototype.
1871 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1872 prototype.
1873 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1874 prototype.
1875 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1876 * ada-exp.y: Remove _initialize_ada_exp prototype.
1877 * ada-lang.c: Remove _initialize_ada_language prototype.
1878 * ada-tasks.c: Remove _initialize_tasks prototype.
1879 * addrmap.c: Remove _initialize_addrmap prototype.
1880 * agent.c: Remove _initialize_agent prototype.
1881 * aix-thread.c: Remove _initialize_aix_thread prototype.
1882 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1883 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1884 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1885 prototype.
1886 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1887 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1888 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1889 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1890 prototype.
1891 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1892 prototype.
1893 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1894 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1895 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1896 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1897 prototype.
1898 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1899 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1900 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1901 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1902 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1903 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1904 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1905 prototype.
1906 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1907 prototype.
1908 * annotate.c: Remove _initialize_annotate prototype.
1909 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1910 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1911 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1912 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1913 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1914 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1915 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1916 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1917 prototype.
1918 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1919 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1920 * auto-load.c: Remove _initialize_auto_load prototype.
1921 * auxv.c: Remove _initialize_auxv prototype.
1922 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1923 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1924 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1925 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1926 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1927 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1928 prototype.
1929 * break-catch-throw.c: Remove _initialize_break_catch_throw
1930 prototype.
1931 * breakpoint.c: Remove _initialize_breakpoint prototype.
1932 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1933 * btrace.c: Remove _initialize_btrace prototype.
1934 * charset.c: Remove _initialize_charset prototype.
1935 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1936 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1937 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1938 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1939 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1940 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1941 * coffread.c: Remove _initialize_coffread prototype.
1942 * compile/compile.c: Remove _initialize_compile prototype.
1943 * complaints.c: Remove _initialize_complaints prototype.
1944 * completer.c: Remove _initialize_completer prototype.
1945 * copying.awk: Remove _initialize_copying prototype.
1946 * copying.c: Regenerate.
1947 * core-regset.c: Remove _initialize_core_regset prototype.
1948 * corefile.c: Remove _initialize_core prototype.
1949 * corelow.c: Remove _initialize_corelow prototype.
1950 * cp-abi.c: Remove _initialize_cp_abi prototype.
1951 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1952 * cp-support.c: Remove _initialize_cp_support prototype.
1953 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1954 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1955 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1956 * ctf.c: Remove _initialize_ctf prototype.
1957 * d-lang.c: Remove _initialize_d_language prototype.
1958 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1959 prototype.
1960 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1961 * dbxread.c: Remove _initialize_dbxread prototype.
1962 * dcache.c: Remove _initialize_dcache prototype.
1963 * demangle.c: Remove _initialize_demangler prototype.
1964 * disasm-selftests.c: Remove _initialize_disasm_selftests
1965 prototype.
1966 * disasm.c: Remove _initialize_disasm prototype.
1967 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1968 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1969 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1970 prototype.
1971 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1972 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1973 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1974 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1975 * elfread.c: Remove _initialize_elfread prototype.
1976 * exec.c: Remove _initialize_exec prototype.
1977 * extension.c: Remove _initialize_extension prototype.
1978 * f-lang.c: Remove _initialize_f_language prototype.
1979 * f-valprint.c: Remove _initialize_f_valprint prototype.
1980 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1981 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1982 * filesystem.c: Remove _initialize_filesystem prototype.
1983 * findcmd.c: Remove _initialize_mem_search prototype.
1984 * fork-child.c: Remove _initialize_fork_child prototype.
1985 * frame-base.c: Remove _initialize_frame_base prototype.
1986 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1987 * frame.c: Remove _initialize_frame prototype.
1988 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1989 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1990 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1991 * gcore.c: Remove _initialize_gcore prototype.
1992 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1993 * gdbarch.c: Regenerate.
1994 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1995 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1996 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1997 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1998 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1999 * go-lang.c: Remove _initialize_go_language prototype.
2000 * go32-nat.c: Remove _initialize_go32_nat prototype.
2001 * guile/guile.c: Remove _initialize_guile prototype.
2002 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2003 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2004 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2005 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2006 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2007 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2008 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2009 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2010 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2011 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2012 prototype.
2013 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2014 prototype.
2015 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2016 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2017 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2018 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2019 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2020 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2021 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2022 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2023 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2024 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2025 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2026 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2027 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2028 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2029 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2030 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2031 prototype.
2032 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2033 prototype.
2034 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2035 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2036 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2037 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2038 * infcall.c: Remove _initialize_infcall prototype.
2039 * infcmd.c: Remove _initialize_infcmd prototype.
2040 * inferior.c: Remove _initialize_inferiors prototype.
2041 * inflow.c: Remove _initialize_inflow prototype.
2042 * infrun.c: Remove _initialize_infrun prototype.
2043 * interps.c: Remove _initialize_interpreter prototype.
2044 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2045 * jit.c: Remove _initialize_jit prototype.
2046 * language.c: Remove _initialize_language prototype.
2047 * linux-fork.c: Remove _initialize_linux_fork prototype.
2048 * linux-nat.c: Remove _initialize_linux_nat prototype.
2049 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2050 * linux-thread-db.c: Remove _initialize_thread_db prototype.
2051 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2052 * m2-lang.c: Remove _initialize_m2_language prototype.
2053 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2054 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2055 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2056 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2057 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2058 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2059 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2060 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2061 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2062 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2063 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2064 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2065 * machoread.c: Remove _initialize_machoread prototype.
2066 * macrocmd.c: Remove _initialize_macrocmd prototype.
2067 * macroscope.c: Remove _initialize_macroscope prototype.
2068 * maint.c: Remove _initialize_maint_cmds prototype.
2069 * mdebugread.c: Remove _initialize_mdebugread prototype.
2070 * memattr.c: Remove _initialize_mem prototype.
2071 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2072 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2073 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2074 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2075 * mi/mi-main.c: Remove _initialize_mi_main prototype.
2076 * microblaze-linux-tdep.c: Remove
2077 _initialize_microblaze_linux_tdep prototype.
2078 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2079 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2080 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2081 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2082 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2083 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2084 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2085 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2086 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2087 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2088 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2089 prototype.
2090 * mipsread.c: Remove _initialize_mipsread prototype.
2091 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2092 prototype.
2093 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2094 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2095 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2096 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2097 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2098 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2099 prototype.
2100 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2101 * nto-procfs.c: Remove _initialize_procfs prototype.
2102 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2103 * objc-lang.c: Remove _initialize_objc_language prototype.
2104 * objfiles.c: Remove _initialize_objfiles prototype.
2105 * observer.c: Remove observer_test_first_notification_function,
2106 observer_test_second_notification_function,
2107 observer_test_third_notification_function, and
2108 _initialize_observer prototypes.
2109 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2110 * osabi.c: Remove _initialize_gdb_osabi prototype.
2111 * osdata.c: Remove _initialize_osdata prototype.
2112 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2113 * parse.c: Remove _initialize_parse prototype.
2114 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2115 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2116 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2117 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2118 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2119 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2120 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2121 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2122 * printcmd.c: Remove _initialize_printcmd prototype.
2123 * probe.c: Remove _initialize_probe prototype.
2124 * proc-api.c: Remove _initialize_proc_api prototype.
2125 * proc-events.c: Remove _initialize_proc_events prototype.
2126 * proc-service.c: Remove _initialize_proc_service prototype.
2127 * procfs.c: Remove _initialize_procfs prototype.
2128 * psymtab.c: Remove _initialize_psymtab prototype.
2129 * python/python.c: Remove _initialize_python prototype.
2130 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2131 * record-btrace.c: Remove _initialize_record_btrace prototype.
2132 * record-full.c: Remove _initialize_record_full prototype.
2133 * record.c: Remove _initialize_record prototype.
2134 * regcache.c: Remove _initialize_regcache prototype.
2135 * reggroups.c: Remove _initialize_reggroup prototype.
2136 * remote-notif.c: Remove _initialize_notif prototype.
2137 * remote-sim.c: Remove _initialize_remote_sim prototype.
2138 * remote.c: Remove _initialize_remote prototype.
2139 * reverse.c: Remove _initialize_reverse prototype.
2140 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2141 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2142 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2143 prototype.
2144 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2145 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2146 * rust-exp.y: Remove _initialize_rust_exp prototype.
2147 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2148 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2149 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2150 * score-tdep.c: Remove _initialize_score_tdep prototype.
2151 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2152 prototype.
2153 * ser-go32.c: Remove _initialize_ser_dos prototype.
2154 * ser-mingw.c: Remove _initialize_ser_windows prototype.
2155 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2156 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2157 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2158 * serial.c: Remove _initialize_serial prototype.
2159 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2160 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2161 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2162 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2163 * skip.c: Remove _initialize_step_skip prototype.
2164 * sol-thread.c: Remove _initialize_sol_thread prototype.
2165 * solib-aix.c: Remove _initialize_solib_aix prototype.
2166 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2167 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2168 * solib-frv.c: Remove _initialize_frv_solib prototype.
2169 * solib-spu.c: Remove _initialize_spu_solib prototype.
2170 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2171 * solib-target.c: Remove _initialize_solib_target prototype.
2172 * solib.c: Remove _initialize_solib prototype.
2173 * source.c: Remove _initialize_source prototype.
2174 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2175 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2176 prototype.
2177 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2178 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2179 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2180 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2181 prototype.
2182 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2183 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2184 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2185 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2186 prototype.
2187 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2188 prototype.
2189 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2190 prototype.
2191 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2192 prototype.
2193 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2194 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2195 prototype.
2196 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2197 prototype.
2198 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2199 prototype.
2200 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2201 prototype.
2202 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2203 prototype.
2204 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2205 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2206 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2207 * stabsread.c: Remove _initialize_stabsread prototype.
2208 * stack.c: Remove _initialize_stack prototype.
2209 * stap-probe.c: Remove _initialize_stap_probe prototype.
2210 * std-regs.c: Remove _initialize_frame_reg prototype.
2211 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2212 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2213 * symfile.c: Remove _initialize_symfile prototype.
2214 * symmisc.c: Remove _initialize_symmisc prototype.
2215 * symtab.c: Remove _initialize_symtab prototype.
2216 * target-dcache.c: Remove _initialize_target_dcache prototype.
2217 * target-descriptions.c: Remove _initialize_target_descriptions
2218 prototype.
2219 * thread.c: Remove _initialize_thread prototype.
2220 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2221 prototype.
2222 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2223 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2224 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2225 prototype.
2226 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2227 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2228 * tracefile.c: Remove _initialize_tracefile prototype.
2229 * tracepoint.c: Remove _initialize_tracepoint prototype.
2230 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2231 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2232 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2233 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2234 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2235 * tui/tui-win.c: Remove _initialize_tui_win prototype.
2236 * tui/tui.c: Remove _initialize_tui prototype.
2237 * typeprint.c: Remove _initialize_typeprint prototype.
2238 * user-regs.c: Remove _initialize_user_regs prototype.
2239 * utils.c: Remove _initialize_utils prototype.
2240 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2241 * valarith.c: Remove _initialize_valarith prototype.
2242 * valops.c: Remove _initialize_valops prototype.
2243 * valprint.c: Remove _initialize_valprint prototype.
2244 * value.c: Remove _initialize_values prototype.
2245 * varobj.c: Remove _initialize_varobj prototype.
2246 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2247 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2248 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2249 * windows-nat.c: Remove _initialize_windows_nat,
2250 _initialize_check_for_gdb_ini, and _initialize_loadable
2251 prototypes.
2252 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2253 * xcoffread.c: Remove _initialize_xcoffread prototype.
2254 * xml-support.c: Remove _initialize_xml_support prototype.
2255 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2256 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2257 prototype.
2258 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2259 prototype.
2260 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2261
a611b5cb
KS
22622017-09-08 Keith Seitz <keiths@redhat.com>
2263
2264 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2265 field.
2266
469412dd
CW
22672017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
2268
2269 * f-valprint.c (f_val_print): Remove check for one byte
2270 sized integers. Remove printing of character type.
2271
a5ad232b
FP
22722017-09-08 Frank Penczek <frank.penczek@intel.com>
2273 Christoph Weinmann <christoph.t.weinmann@intel.com>
2274 Bernhard Heckel <bernhard.heckel@intel.com>
2275
2276 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2277 to maintain proper indentation when printing pointers/refs.
2278
e5014227
JB
22792017-09-07 Joel Brobecker <brobecker@adacore.com>
2280
2281 GDB 8.0.1 released.
2282
63c99141
JB
22832017-09-07 Joel Brobecker <brobecker@adacore.com>
2284
2285 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2286
69c1e056
TT
22872017-09-05 Tom Tromey <tom@tromey.com>
2288
2289 * parse.c (funcall_chain): Now a std::vector.
2290 (start_arglist, end_arglist): Simplify.
2291 (free_funcalls): Remove.
2292 (parse_exp_in_context_1): Remove cleanup.
2293
fef704bf
TT
22942017-09-05 Tom Tromey <tom@tromey.com>
2295
2296 * go-exp.y (go_parse): Don't create a cleanup.
2297
5613c585
TT
22982017-09-05 Tom Tromey <tom@tromey.com>
2299
2300 * d-exp.y (PrimaryExpression): Use std::string.
2301 (d_parse): Don't create a cleanup.
2302
eae49211
TT
23032017-09-05 Tom Tromey <tom@tromey.com>
2304
2305 * utils.c (do_clear_parser_state): Remove.
2306 (make_cleanup_clear_parser_state): Remove.
2307 * p-exp.y (pascal_parse): Use scoped_restore.
2308 * m2-exp.y (m2_parse): Use scoped_restore.
2309 * f-exp.y (f_parse): Use scoped_restore.
2310 * d-exp.y (d_parse): Use scoped_restore.
2311 * c-exp.y (c_parse): Use scoped_restore.
2312 * ada-exp.y (ada_parse): Use scoped_restore.
2313 * utils.h (make_cleanup_clear_parser_state): Remove.
2314
73b9be8b
KS
23152017-09-06 Keith Seitz <keiths@redhat.com>
2316
2317 * dwarf2read.c (dw2_linkage_name_attr): New function.
2318 (dw2_linkage_name): New function.
2319 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2320 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2321 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2322
a102602b
KR
23232017-09-06 Kamil Rytarowski <n54@gmx.com>
2324
2325 * config/djgpp/djconfig.sh: Correct shell portability issue.
2326
28ad437d
KR
23272017-09-06 Kamil Rytarowski <n54@gmx.com>
2328
2329 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2330
351787dd
JB
23312017-09-06 John Baldwin <jhb@FreeBSD.org>
2332
2333 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2334 * NEWS: Mention new FreeBSD/mips native configuration.
2335 * configure.host: Add aarch64*-*-freebsd*.
2336 * configure.nat: Likewise.
2337 * aarch64-fbsd-nat.c: New file.
2338
c0f84956
JB
23392017-09-06 John Baldwin <jhb@FreeBSD.org>
2340
2341 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2342 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2343 * NEWS: Mention new FreeBSD/aarch64 target.
2344 * configure.tgt: Add aarch64*-*-freebsd*.
2345 * aarch64-fbsd-tdep.c: New file.
2346 * aarch64-fbsd-tdep.h: New file.
2347
7610297a
KR
23482017-09-06 Kamil Rytarowski <n54@gmx.com>
2349
2350 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2351
fbd1b771
JK
23522017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2353
2354 * parse.c (find_minsym_type_and_address): Don't relocate addresses
2355 of TLS symbols.
2356
5ca79eae
PW
23572017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2358
2359 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2360 call.
2361
bf93d7ba
SM
23622017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2363
2364 * infrun.c (follow_exec): Call add_thread after
2365 target_find_description.
2366
1bb7c059
SM
23672017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2368
2369 * infrun.c (handle_inferior_event_1): When exec'ing, read
2370 stop_pc after follow_exec.
2371
fc809827
SM
23722017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2373
2374 * remote.c (process_g_packet): Update error message.
2375
d2fcdd85
YQ
23762017-09-05 Yao Qi <yao.qi@linaro.org>
2377
2378 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2379 targets.
2380
e69570ee
PA
23812017-09-05 Pedro Alves <palves@redhat.com>
2382
2383 * eval.c (eval_call, evaluate_funcall): New functions, factored
2384 out from ...
2385 (evaluate_subexp_standard): ... this.
2386
22916b07
YQ
23872017-09-05 Yao Qi <yao.qi@linaro.org>
2388
2389 * amd64-tdep.c (amd64_target_description): Create target
2390 descriptions.
2391 (_initialize_amd64_tdep): Don't call functions
2392 initialize_tdesc_amd64_*. Add self tests.
2393 * arch/amd64.c (amd64_create_target_description): Add parameter
2394 is_linux. Call set_tdesc_osabi if is_linux is true.
2395 * arch/amd64.h (amd64_create_target_description): Update the
2396 declaration.
2397 * arch/i386.c (i386_create_target_description): Add parameter
2398 is_linux. Call set_tdesc_osabi if is_linux is true.
2399 * arch/i386.h (i386_create_target_description): Update
2400 declaration.
2401 * configure.tgt: Add i386.o to gdb_target_obs.
2402 * features/Makefile (XMLTOC): Remove i386/*.xml.
2403 * features/i386/amd64-avx-avx512.c: Remove.
2404 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2405 * features/i386/amd64-avx-mpx.c: Remove.
2406 * features/i386/amd64-avx.c: Remove.
2407 * features/i386/amd64-mpx.c: Remove.
2408 * features/i386/amd64.c: Remove.
2409 * features/i386/i386-avx-avx512.c: Remove.
2410 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2411 * features/i386/i386-avx-mpx.c: Remove.
2412 * features/i386/i386-avx.c: Remove.
2413 * features/i386/i386-mmx.c: Remove.
2414 * features/i386/i386-mpx.c: Remove.
2415 * features/i386/i386.c: Remove.
2416 * i386-tdep.c: Don't include features/i386/i386*.c., include
2417 target-descriptions.h and arch/i386.h.
2418 (i386_target_description): Create target descriptions.
2419 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2420 functions. Do self tests.
2421
0854b7b1
YQ
24222017-09-05 Yao Qi <yao.qi@linaro.org>
2423
2424 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2425 * features/i386/amd64-avx-avx512-linux.c: Removed.
2426 * features/i386/amd64-avx-linux.c: Removed.
2427 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2428 * features/i386/amd64-avx-mpx-linux.c: Removed.
2429 * features/i386/amd64-linux.c: Removed.
2430 * features/i386/amd64-mpx-linux.c: Removed.
2431 * features/i386/x32-avx-avx512-linux.c: Removed.
2432 * features/i386/x32-avx-linux.c: Removed.
2433 * features/i386/x32-linux.c: Removed.
2434
b4570e4b
YQ
24352017-09-05 Yao Qi <yao.qi@linaro.org>
2436
2437 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
2438 features/i386/*.c.
2439 (amd64_linux_read_description): Call
2440 amd64_create_target_description.
2441 * arch/amd64.c: New file.
2442 * arch/amd64.h: New file.
2443 * configure.tgt (x86_64-*-linux*): Append amd64.o.
2444 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2445
6c73f67f
YQ
24462017-09-05 Yao Qi <yao.qi@linaro.org>
2447
2448 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2449 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
2450 (amd64_linux_read_description): Create target descriptions.
2451 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2452 functions. Add unit tests.
2453 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2454 x32-core.xml.
2455 * features/i386/64bit-avx.c: Generated.
2456 * features/i386/64bit-avx512.c: Generated.
2457 * features/i386/64bit-core.c: Generated.
2458 * features/i386/64bit-linux.c: Generated.
2459 * features/i386/64bit-mpx.c: Generated.
2460 * features/i386/64bit-pkeys.c: Generated.
2461 * features/i386/64bit-segments.c: Generated.
2462 * features/i386/64bit-sse.c: Generated.
2463 * features/i386/x32-core.c: Generated.
2464 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2465 c files for amd64-linux and x32-linux.
2466
9d3d478b
YQ
24672017-09-05 Yao Qi <yao.qi@linaro.org>
2468
2469 * amd64-linux-tdep.c (amd64_linux_read_description): New
2470 function.
2471 (amd64_linux_core_read_description): Call
2472 amd64_linux_read_description.
2473 (amd64_linux_init_abi): Likewise.
2474 (amd64_x32_linux_init_abi): Likewise.
2475 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2476 * x86-linux-nat.c (x86_linux_read_description): Call
2477 amd64_linux_read_description.
2478
b9f1d50f
YQ
24792017-09-05 Yao Qi <yao.qi@linaro.org>
2480
2481 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2482 comments.
2483
188c9e6d
YQ
24842017-09-05 Yao Qi <yao.qi@linaro.org>
2485
2486 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2487 * features/i386/i386-avx-avx512-linux.c: Remove.
2488 * features/i386/i386-avx-linux.c: Remove.
2489 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2490 * features/i386/i386-avx-mpx-linux.c: Remove.
2491 * features/i386/i386-linux.c: Remove.
2492 * features/i386/i386-mmx-linux.c: Remove.
2493 * features/i386/i386-mpx-linux.c: Remove.
2494
5f035c07
YQ
24952017-09-05 Yao Qi <yao.qi@linaro.org>
2496
2497 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2498 (SFILES): Add arch/i386.c.
2499 (HFILES_NO_SRCDIR): Add arch/i386.h.
2500 * arch/i386.c: New file.
2501 * arch/i386.h: New file.
2502 * arch/tdesc.h (allocate_target_description): Declare.
2503 (set_tdesc_architecture): Declare.
2504 (set_tdesc_osabi): Declare.
2505 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2506 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2507 include arch/i386.h.
2508 (i386_linux_read_description): Remove code and call
2509 i386_create_target_description.
2510 (set_tdesc_architecture): New function.
2511 (set_tdesc_osabi): New function.
2512 * target-descriptions.h (allocate_target_description): Remove.
2513
0abe8a89
YQ
25142017-09-05 Yao Qi <yao.qi@linaro.org>
2515
2516 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2517 * target-descriptions.c (tdesc_create_feature): Likewise, and
2518 adjust code.
2519 * features/i386/32bit-avx.c: Re-generated.
2520 * features/i386/32bit-avx512.c: Re-generated.
2521 * features/i386/32bit-core.c: Re-generated.
2522 * features/i386/32bit-linux.c: Re-generated.
2523 * features/i386/32bit-mpx.c: Re-generated.
2524 * features/i386/32bit-pkeys.c: Re-generated.
2525 * features/i386/32bit-sse.c: Re-generated.
2526
0a188386
YQ
25272017-09-05 Yao Qi <yao.qi@linaro.org>
2528
2529 * regformats/regdef.h (struct reg): Override operator == and !=.
2530
f49ff000
YQ
25312017-09-05 Yao Qi <yao.qi@linaro.org>
2532
2533 * arch/tdesc.h: New file.
2534 * regformats/regdat.sh: Generate code using tdesc_create_reg.
2535 * target-descriptions.c: Update comments.
2536 * target-descriptions.h: Include "arch/tdesc.h". Remove the
2537 declarations.
2538 * features/i386/32bit-avx.c: Re-generated.
2539 * features/i386/32bit-avx512.c: Re-generated.
2540 * features/i386/32bit-core.c: Re-generated.
2541 * features/i386/32bit-linux.c: Re-generated.
2542 * features/i386/32bit-mpx.c: Re-generated.
2543 * features/i386/32bit-pkeys.c: Re-generated.
2544 * features/i386/32bit-sse.c: Re-generated.
2545
f7000548
YQ
25462017-09-05 Yao Qi <yao.qi@linaro.org>
2547
2548 * regformats/regdat.sh: Update generated code.
2549
c9a5e2a5
YQ
25502017-09-05 Yao Qi <yao.qi@linaro.org>
2551
2552 * regformats/regdat.sh: Adjust code order.
2553
d6b687ac
SM
25542017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2555
2556 * expprint.c (dump_subexp_body_standard): Use constant format
2557 string in fprintf_filtered call.
2558
a379bfd0
JB
25592017-09-04 John Baldwin <jhb@FreeBSD.org>
2560
2561 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2562 NetBSD/i386.
2563 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2564
f7efc967
JB
25652017-09-04 John Baldwin <jhb@FreeBSD.org>
2566
2567 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2568
c49fbc6c
JB
25692017-09-04 John Baldwin <jhb@FreeBSD.org>
2570
2571 * bsd-kvm.o: Define _KMEMUSER.
2572 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2573 * configure: Regenerate.
2574
26562e73
JB
25752017-09-04 John Baldwin <jhb@FreeBSD.org>
2576
2577 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2578 * i386-fbsd-nat.c: Likewise.
2579
31cf1487
JB
25802017-09-04 John Baldwin <jhb@FreeBSD.org>
2581
2582 * unittests/array-view-selftests.c: Add include of <array>.
2583
5b9f8a7c
JB
25842017-09-04 John Baldwin <jhb@FreeBSD.org>
2585
2586 * spu-tdep.c (flush_ea_cache): Add missing argument to
2587 call_function_by_hand.
2588
d69cf9b2
PA
25892017-09-04 Pedro Alves <palves@redhat.com>
2590
2591 * NEWS (Safer support for debugging with no debug info): New.
2592
3693fdb3
PA
25932017-09-04 Pedro Alves <palves@redhat.com>
2594
2595 * c-exp.y (function_method, function_method_void): Add current
2596 instance flags to TYPE_INSTANCE.
2597 * dwarf2read.c (check_modifier): New.
2598 (compute_delayed_physnames): Assert that only C++ adds delayed
2599 physnames. Mark fn_fields as const/volatile depending on
2600 physname.
2601 * eval.c (make_params): New type_instance_flags parameter. Use
2602 it as the new type's instance flags.
2603 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2604 flags element and pass it to make_params.
2605 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2606 instance flags element.
2607 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2608 * gdbtypes.h: Include "enum-flags.h".
2609 (type_instance_flags): New enum-flags type.
2610 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2611 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2612 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2613 (follow_type_instance_flags): New function.
2614 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2615 * parser-defs.h (follow_type_instance_flags): Declare.
2616 * valops.c (value_struct_elt_for_reference): const/volatile must
2617 match too.
2618
e68cb8e0
PA
26192017-09-04 Pedro Alves <palves@redhat.com>
2620
2621 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2622 function/method scopes; lookup the nested name as a function local
2623 static variable.
2624
858be34c
PA
26252017-09-04 Pedro Alves <palves@redhat.com>
2626
2627 (%type <voidval>): Add function_method.
2628 * c-exp.y (exp): New production for calls with no arguments.
2629 (function_method, function_method_void_or_typelist): New
2630 productions.
2631 (exp): New production for "method()::static_var".
2632 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2633 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2634 Handle OP_FUNC_STATIC_VAR.
2635 * parse.c (operator_length_standard):
2636 Handle OP_FUNC_STATIC_VAR.
2637
dd5901a6
PA
26382017-09-04 Pedro Alves <palves@redhat.com>
2639
2640 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2641 handling.
2642 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2643 Ditto.
2644 * parse.c (operator_length_standard, operator_check_standard):
2645 Ditto.
2646 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2647
46a4882b
PA
26482017-09-04 Pedro Alves <palves@redhat.com>
2649
2650 * ax-gdb.c: Include "typeprint.h".
2651 (gen_expr_for_cast): New function.
2652 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2653 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2654 type is unknown.
2655 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2656 nodebug_data_symbol.
2657 * eval.c: Include "typeprint.h".
2658 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2659 Error out if symbol has unknown type.
2660 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2661 evaluate_subexp_for_cast.
2662 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2663 OP_VAR_MSYM_VALUE.
2664 (evaluate_subexp_for_cast): New function.
2665 * gdbtypes.c (init_nodebug_var_type): New function.
2666 (objfile_type): Use it to initialize types of variables with no
2667 debug info.
2668 * typeprint.c (error_unknown_type): New.
2669 * typeprint.h (error_unknown_type): New declaration.
2670 * compile/compile-c-types.c (convert_type_basic): Handle
2671 TYPE_CODE_ERROR; warn and fallback to int for variables with
2672 unknown type.
2673
fe13dfec
PA
26742017-09-04 Pedro Alves <palves@redhat.com>
2675
2676 * eval.c (evaluate_var_value): New function, factored out from ...
2677 (evaluate_subexp_standard): ... here.
2678
d008ee21
PA
26792017-09-04 Pedro Alves <palves@redhat.com>
2680
2681 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2682 Remove useless assignments to 'op'.
2683
827d0c51
PA
26842017-09-04 Pedro Alves <palves@redhat.com>
2685
2686 * eval.c (eval_skip_value): New function.
2687 (evaluate_subexp_standard): Use it.
2688
2c5a2be1
PA
26892017-09-04 Pedro Alves <palves@redhat.com>
2690
2691 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2692 function name from symbol/minsym and pass it to
2693 error_call_unknown_return_type.
2694
74ea4be4
PA
26952017-09-04 Pedro Alves <palves@redhat.com>
2696
2697 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2698 * ax-gdb.c (gen_msym_var_ref): New function.
2699 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2700 * eval.c (evaluate_var_msym_value): New function.
2701 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2702 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2703 to call_function_by_hand.
2704 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2705 Handle OP_VAR_MSYM_VALUE.
2706 (union exp_element) <msymbol>: New field.
2707 * minsyms.h (struct type): Forward declare.
2708 (find_minsym_type_and_address): Declare.
2709 * parse.c (write_exp_elt_msym): New function.
2710 (write_exp_msymbol): Delete, refactored as ...
2711 (find_minsym_type_and_address): ... this new function.
2712 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2713 (operator_length_standard, operator_check_standard): Handle
2714 OP_VAR_MSYM_VALUE.
2715 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2716
7022349d
PA
27172017-09-04 Pedro Alves <palves@redhat.com>
2718
2719 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2720 TYPE_GNU_IFUNC specially here. Throw error if return type is
2721 unknown.
2722 * ada-typeprint.c (print_func_type): Handle functions with unknown
2723 return type.
2724 * c-typeprint.c (c_type_print_base): Handle functions and methods
2725 with unknown return type.
2726 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2727 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2728 * compile/compile-c-types.c: Include "objfiles.h".
2729 (convert_func): For functions with unknown return type, warn and
2730 default to int.
2731 * compile/compile-object-run.c (compile_object_run): Adjust call
2732 to call_function_by_hand_dummy.
2733 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2734 call_function_by_hand.
2735 * eval.c (evaluate_subexp_standard): Adjust calls to
2736 call_function_by_hand. Handle functions and methods with unknown
2737 return type. Pass expect_type to call_function_by_hand.
2738 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2739 return type.
2740 * gcore.c (call_target_sbrk): Adjust call to
2741 call_function_by_hand.
2742 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2743 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2744 an integer address type instead of nodebug.
2745 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2746 call_function_by_hand.
2747 * infcall.c (error_call_unknown_return_type): New function.
2748 (call_function_by_hand): New "default_return_type" parameter.
2749 Pass it down.
2750 (call_function_by_hand_dummy): New "default_return_type"
2751 parameter. Use it instead of defaulting to int. If there's no
2752 default and the return type is unknown, throw an error. If
2753 there's a default return type, and the called function has no
2754 debug info, then assume the function is prototyped.
2755 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2756 New "default_return_type" parameter.
2757 (error_call_unknown_return_type): New declaration.
2758 * linux-fork.c (call_lseek): Cast return type of lseek.
2759 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2760 call_function_by_hand.
2761 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2762 calls to call_function_by_hand.
2763 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2764 return type.
2765 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2766 (value_nsstring, print_object_command): Adjust calls to
2767 call_function_by_hand.
2768 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2769 functions with unknown return type.
2770 (pascal_type_print_func_varspec_suffix): New function.
2771 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2772 TYPE_CODE_METHOD>: Use it.
2773 * python/py-value.c (valpy_call): Adjust call to
2774 call_function_by_hand.
2775 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2776 call_function_by_hand.
2777 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2778 call_function_by_hand.
2779 * valops.c (value_allocate_space_in_inferior): Adjust call to
2780 call_function_by_hand.
2781 * typeprint.c (type_print_unknown_return_type): New function.
2782 * typeprint.h (type_print_unknown_return_type): New declaration.
2783
54990598
PA
27842017-09-04 Pedro Alves <palves@redhat.com>
2785
2786 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2787 types with more than one parameter as prototyped.
2788
9a24775b
PA
27892017-09-04 Pedro Alves <palves@redhat.com>
2790
2791 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2792 (disassemble_command): Use gdb_disassembly_flags instead of bare
2793 int.
2794 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2795 (dump_insns, do_mixed_source_and_assembly_deprecated)
2796 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2797 Use gdb_disassembly_flags instead of bare int.
2798 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2799 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2800 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2801 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2802 (enum gdb_disassembly_flag): ... values of this new enumeration.
2803 (gdb_disassembly_flags): Define.
2804 (gdb_disassembly)
2805 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2806 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2807 gdb_disassembly_flags instead of bare int.
2808 * record-btrace.c (btrace_insn_history)
2809 (record_btrace_insn_history, record_btrace_insn_history_range)
2810 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2811 instead of bare int.
2812 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2813 Use gdb_disassembly_flags instead of bare int.
2814 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2815 Define.
2816 * target-delegates.c: Regenerate.
2817 * target.c (target_insn_history, target_insn_history_from)
2818 (target_insn_history_range): Use gdb_disassembly_flags instead of
2819 bare int.
2820 * target.h: Include "disasm.h".
2821 (struct target_ops) <to_insn_history, to_insn_history_from,
2822 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2823 int.
2824 (target_insn_history, target_insn_history_from)
2825 (target_insn_history_range): Use gdb_disassembly_flags instead of
2826 bare int.
2827
80a65e9b
SM
28282017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2829
2830 * cli/cli-script.c (build_command_line): For if/while commands,
2831 check whether args is empty.
2832
6b66338c
SM
28332017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2834
2835 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2836 (enum command_control_type): Likewise.
2837 (struct command_line): Likewise.
2838 (free_command_lines): Likewise.
2839 (struct command_lines_deleter): Likewise.
2840 (command_line_up): Likewise.
2841 (read_command_lines): Likewise.
2842 (read_command_lines_1): Likewise.
2843 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2844 (enum command_control_type): Likewise.
2845 (struct command_line): Likewise.
2846 (free_command_lines): Likewise.
2847 (struct command_lines_deleter): Likewise.
2848 (command_line_up): Likewise.
2849 (read_command_lines): Likewise.
2850 (read_command_lines_1): Likewise.
2851 * breakpoint.h: Include cli/cli-script.h.
2852 * extension-priv.h: Likewise.
2853 * gdbcmd.h: Likewise.
2854
51abb421
PA
28552017-09-04 Pedro Alves <palves@redhat.com>
2856
2857 * ada-lang.c (is_known_support_routine): Move sal declaration to
2858 where it is initialized.
2859 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2860 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2861 (clear_command, update_static_tracepoint): Remove init_sal
2862 references. Move declarations closer to initializations.
2863 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2864 initializations.
2865 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2866 references. Move sal declarations closer to initializations.
2867 * frame.c (find_frame_sal): Return a symtab_and_line via function
2868 return instead of output parameter. Remove init_sal references.
2869 * frame.h (find_frame_sal): Return a symtab_and_line via function
2870 return instead of output parameter.
2871 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2872 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2873 instead of memset.
2874 (gdbscm_find_pc_line): Remove init_sal reference.
2875 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2876 references. Move declarations closer to initializations.
2877 * infcmd.c (set_step_frame): Update. Move declarations closer to
2878 initializations.
2879 (finish_backward): Remove init_sal references. Move declarations
2880 closer to initializations.
2881 * infrun.c (process_event_stop_test, handle_step_into_function)
2882 (insert_hp_step_resume_breakpoint_at_frame)
2883 (insert_step_resume_breakpoint_at_caller): Likewise.
2884 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2885 (symbol_to_sal): Likewise.
2886 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2887 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2888 to its initialization.
2889 * reverse.c (save_bookmark_command): Use new/delete. Remove
2890 init_sal references. Move declarations closer to initializations.
2891 * source.c (get_current_source_symtab_and_line): Remove brace
2892 initialization.
2893 (set_current_source_symtab_and_line): Now takes the sal by const
2894 reference. Remove brace initialization.
2895 (line_info): Remove init_sal reference.
2896 * source.h (set_current_source_symtab_and_line): Now takes a
2897 symtab_and_line via const reference.
2898 * stack.c (set_current_sal_from_frame): Adjust.
2899 (print_frame_info): Adjust.
2900 (get_last_displayed_sal): Return the sal via function return
2901 instead of via output parameter. Simplify.
2902 (frame_info): Adjust.
2903 * stack.h (get_last_displayed_sal): Return the sal via function
2904 return instead of via output parameter.
2905 * symtab.c (init_sal): Delete.
2906 (find_pc_sect_line): Remove init_sal references. Move
2907 declarations closer to initializations.
2908 (find_function_start_sal): Remove init_sal references. Move
2909 declarations closer to initializations.
2910 * symtab.h (struct symtab_and_line): In-class initialize all
2911 fields.
2912 * tracepoint.c (set_traceframe_context)
2913 (print_one_static_tracepoint_marker): Remove init_sal references.
2914 Move declarations closer to initializations.
2915 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2916 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2917 declarations closer to initializations.
2918 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2919 init_sal references. Adjust.
2920
6c5b2ebe
PA
29212017-09-04 Pedro Alves <palves@redhat.com>
2922
2923 * ax-gdb.c (agent_command_1): Use range-for.
2924 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2925 * breakpoint.c: Include "common/array-view.h".
2926 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2927 parameter from struct symtabs_and_lines to
2928 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2929 (breakpoint_sals_to_pc): Change sals parameter from struct
2930 symtabs_and_lines to std::vector reference.
2931 (check_fast_tracepoint_sals): Change sals parameter from struct
2932 symtabs_and_lines to std::array_view. Use range-for.
2933 (decode_static_tracepoint_spec): Return a std::vector instead of
2934 symtabs_and_lines. Update.
2935 (create_breakpoint): Update.
2936 (break_range_command, until_break_command, clear_command): Update.
2937 (base_breakpoint_decode_location, bkpt_decode_location)
2938 (bkpt_probe_create_sals_from_location)
2939 (bkpt_probe_decode_location, tracepoint_decode_location)
2940 (tracepoint_probe_decode_location)
2941 (strace_marker_create_sals_from_location): Return a std::vector
2942 instead of symtabs_and_lines.
2943 (strace_marker_create_breakpoints_sal): Update.
2944 (strace_marker_decode_location): Return a std::vector instead of
2945 symtabs_and_lines. Update.
2946 (update_breakpoint_locations): Change struct symtabs_and_lines
2947 parameters to gdb::array_view. Adjust.
2948 (location_to_sals): Return a std::vector instead of
2949 symtabs_and_lines. Update.
2950 (breakpoint_re_set_default): Use std::vector instead of struct
2951 symtabs_and_lines.
2952 (decode_location_default): Return a std::vector instead of
2953 symtabs_and_lines. Update.
2954 * breakpoint.h: Include "common/array-view.h".
2955 (struct breakpoint_ops) <decode_location>: Now returns a
2956 std::vector instead of returning a symtabs_and_lines via output
2957 parameter.
2958 (update_breakpoint_locations): Change sals parameters to use
2959 gdb::array_view.
2960 * cli/cli-cmds.c (edit_command, list_command): Update to use
2961 std::vector and gdb::array_view.
2962 (ambiguous_line_spec): Adjust to use gdb::array_view and
2963 range-for.
2964 (compare_symtabs): Rename to ...
2965 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2966 const reference and adjust.
2967 (filter_sals): Rewrite using std::vector and standard algorithms.
2968 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2969 (jump_command): Update to use std::vector.
2970 * linespec.c (struct linespec_state) <canonical_names>: Update
2971 comment.
2972 (add_sal_to_sals_basic): Delete.
2973 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2974 (decode_line_2, create_sals_line_offset)
2975 (convert_address_location_to_sals, convert_linespec_to_sals)
2976 (convert_explicit_location_to_sals, parse_linespec)
2977 (event_location_to_sals, decode_line_full, decode_line_1)
2978 (decode_line_with_current_source)
2979 (decode_line_with_last_displayed, decode_objc)
2980 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2981 (linespec_result::~linespec_result): Adjust to use std::vector
2982 instead of symtabs_and_lines.
2983 * linespec.h (linespec_sals::sals): Now a std::vector.
2984 (struct linespec_result): Use std::vector, bool, and in-class
2985 initialization.
2986 (decode_line_1, decode_line_with_current_source)
2987 (decode_line_with_last_displayed): Return std::vector.
2988 * macrocmd.c (info_macros_command): Use std::vector.
2989 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2990 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2991 std::vector.
2992 * probe.h (parse_probes): Return a std::vector.
2993 * python/python.c (gdbpy_decode_line): Use std::vector and
2994 gdb::array_view.
2995 * source.c (select_source_symtab, line_info): Use std::vector.
2996 * stack.c (func_command): Use std::vector.
2997 * symtab.h (struct symtabs_and_lines): Delete.
2998 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2999
7c44b49c
PA
30002017-09-04 Pedro Alves <palves@redhat.com>
3001
3002 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3003 unittests/array-view-selftests.c.
3004 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3005 * common/array-view.h: New file.
3006 * unittests/array-view-selftests.c: New file.
3007
e439fa14
PA
30082017-09-04 Pedro Alves <palves@redhat.com>
3009
3010 * cli/cli-cmds.c (edit_command): Pass message to
3011 ambiguous_line_spec.
3012 (list_command): Pass message to ambiguous_line_spec. Say
3013 "first"/"last" instead of "start" and "end" to be consistent with
3014 the manual.
3015 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
3016 them to print formatted message.
3017
7525b645
PA
30182017-09-04 Pedro Alves <palves@redhat.com>
3019
3020 * btrace.c (ftrace_add_pt): Pass btrace_insn to
3021 ftrace_update_insns by reference instead of pointer.
3022
badc0020
YQ
30232017-09-04 Yao Qi <yao.qi@linaro.org>
3024
3025 * i386-go32-tdep.c: Include x86-xstate.h.
3026 (i386_go32_init_abi): Call i386_target_description.
3027 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3028 if xcr0 is X86_XSTATE_X87_MASK.
3029 * i386-tdep.h (tdesc_i386): Remove the declaration.
3030 (tdesc_i386_mmx): Likewise.
3031
d78bdb54
YQ
30322017-09-04 Yao Qi <yao.qi@linaro.org>
3033
3034 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3035 X86_XSTATE_SSE_MASK instead of 0.
3036
ca1fa5ee
YQ
30372017-09-04 Yao Qi <yao.qi@linaro.org>
3038
3039 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3040 i386_target_description.
3041 * i386-fbsd-nat.c (i386fbsd_read_description): Call
3042 i386_target_description.
3043 * i386-tdep.c (i386_gdbarch_init): Likewise.
3044
2434b019
YQ
30452017-09-04 Yao Qi <yao.qi@linaro.org>
3046
3047 * amd64-darwin-tdep.c: Include "x86-xstate.h".
3048 (x86_darwin_init_abi_64): Call amd64_target_description.
3049 * amd64-dicos-tdep.c: Likewise.
3050 * amd64-fbsd-nat.c: Likewise.
3051 * amd64-fbsd-tdep.c: Likewise.
3052 * amd64-nbsd-tdep.c: Likewise.
3053 * amd64-obsd-tdep.c: Likewise.
3054 * amd64-sol2-tdep.c: Likewise.
3055 * amd64-windows-tdep.c: Likewise.
3056 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3057
0860c437
SM
30582017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3059
3060 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3061 (btrace_function) <insn>: Change type to use std::vector.
3062 * btrace.c (ftrace_debug, ftrace_call_num_insn,
3063 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3064 ftrace_update_insns, ftrace_compute_global_level_offset,
3065 btrace_stitch_bts, btrace_clear, btrace_insn_get,
3066 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3067 change to std::vector.
3068 (ftrace_update_insns): Adjust to change to std::vector, change
3069 type of INSN parameter.
3070 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3071 * record-btrace.c (btrace_call_history_insn_range,
3072 btrace_compute_src_line_range,
3073 record_btrace_frame_prev_register): Adjust to change to
3074 std::vector.
3075 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3076 to change to std::vector.
3077
0638b7f9
TT
30782017-09-03 Tom Tromey <tom@tromey.com>
3079
3080 * corefile.c (reopen_exec_file): Use std::string.
3081
8f84fb0e
TT
30822017-09-03 Tom Tromey <tom@tromey.com>
3083
3084 * compile/compile.c (compile_register_name_mangled): Return
3085 std::string.
3086 * compile/compile-loc2c.c (pushf_register_address): Update.
3087 (pushf_register): Update.
3088 * compile/compile-c-types.c (convert_array): Update.
3089 * compile/compile-c-symbols.c (generate_vla_size): Update.
3090 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3091 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3092 (convert_one_symbol): Update.
3093 (generate_c_for_for_one_variable): Update.
3094 * compile/compile-c-support.c (c_get_range_decl_name): Return a
3095 std::string.
3096 (generate_register_struct): Update.
3097 * compile/compile-internal.h (c_get_range_decl_name): Return a
3098 std::string.
3099 (compile_register_name_mangled): Return std::string.
3100
18e9961f
TT
31012017-09-03 Tom Tromey <tom@tromey.com>
3102
3103 * utils.c (perror_string): Return a std::string.
3104 (throw_perror_with_name, perror_warning_with_name): Update.
3105
45343786
TT
31062017-09-03 Tom Tromey <tom@tromey.com>
3107
3108 * demangle.c (demangle_command): Use std::string,
3109 unique_xmalloc_ptr.
3110
b57af503
TT
31112017-09-03 Tom Tromey <tom@tromey.com>
3112
3113 * cli/cli-setshow.c (do_set_command): Use std::string.
3114
6eecf35f
TT
31152017-09-03 Tom Tromey <tom@tromey.com>
3116
3117 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3118
56496dd4
TT
31192017-09-03 Tom Tromey <tom@tromey.com>
3120
3121 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3122
e91a1fa7
TT
31232017-09-03 Tom Tromey <tom@tromey.com>
3124
3125 * mi/mi-cmd-env.c (env_execute_cli_command): Use
3126 gdb::unique_xmalloc_ptr.
3127
7ffd83d7
TT
31282017-09-03 Tom Tromey <tom@tromey.com>
3129
3130 * thread.c (print_thread_info_1): Use string_printf.
3131 (thread_apply_command, thread_apply_all_command): Use
3132 std::string.
3133
1ccbe998
TT
31342017-09-03 Tom Tromey <tom@tromey.com>
3135
3136 * valprint.c (val_print_string): Update.
3137 * gdbcore.h (memory_error_message): Return std::string.
3138 * corefile.c (memory_error_message): Return std::string.
3139 (memory_error): Update.
3140 * breakpoint.c (insert_bp_location): Update.
3141
23fdd69e
SM
31422017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3143
3144 * target/waitstatus.h (target_waitstatus_to_string): Change
3145 return type to std::string.
3146 * target/waitstatus.c (target_waitstatus_to_string): Return
3147 std::string.
3148 * target.h (target_waitstatus_to_string): Remove declaration.
3149 * infrun.c (resume, clear_proceed_status_thread,
3150 print_target_wait_results, do_target_wait, save_waitstatus,
3151 stop_all_threads): Adjust.
3152 * record-btrace.c (record_btrace_wait): Adjust.
3153 * target-debug.h
3154 (target_debug_print_struct_target_waitstatus_p): Adjust.
3155
5c811d30
JK
31562017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3157
3158 PR gdb/22046
3159 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3160 detection.
3161
0a2dde4a
SDJ
31622017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3163
3164 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3165 for setting/unsetting environment variables on the remote target.
3166 (New remote packets): Add entries for QEnvironmentHexEncoded,
3167 QEnvironmentUnset and QEnvironmentReset.
3168 * common/environ.c (gdb_environ::operator=): Extend method to
3169 handle m_user_set_env_list and m_user_unset_env_list.
3170 (gdb_environ::clear): Likewise.
3171 (match_var_in_string): Change type of first parameter from 'char
3172 *' to 'const char *'.
3173 (gdb_environ::set): Extend method to handle
3174 m_user_set_env_list and m_user_unset_env_list.
3175 (gdb_environ::unset): Likewise.
3176 (gdb_environ::clear_user_set_env): New method.
3177 (gdb_environ::user_set_envp): Likewise.
3178 (gdb_environ::user_unset_envp): Likewise.
3179 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3180 m_user_unset_env_list on move constructor/assignment.
3181 (unset): Add new default parameter 'update_unset_list = true'.
3182 (clear_user_set_env): New method.
3183 (user_set_envp): Likewise.
3184 (user_unset_envp): Likewise.
3185 (m_user_set_env_list): New std::set.
3186 (m_user_unset_env_list): Likewise.
3187 * common/rsp-low.c (hex2str): New function.
3188 (bin2hex): New overload for bin2hex function.
3189 * common/rsp-low.c (hex2str): New prototype.
3190 (str2hex): New overload prototype.
3191 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3192 QEnvironmentUnset and QEnvironmentReset.
3193 (remote_protocol_features): Add QEnvironmentHexEncoded,
3194 QEnvironmentUnset and QEnvironmentReset packets.
3195 (send_environment_packet): New function.
3196 (extended_remote_environment_support): Likewise.
3197 (extended_remote_create_inferior): Call
3198 extended_remote_environment_support.
3199 (_initialize_remote): Add QEnvironmentHexEncoded,
3200 QEnvironmentUnset and QEnvironmentReset packet configs.
3201 * unittests/environ-selftests.c (gdb_selftest_env_var):
3202 New variable.
3203 (test_vector_initialization): New function.
3204 (test_init_from_host_environ): Likewise.
3205 (test_reinit_from_host_environ): Likewise.
3206 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3207 Likewise.
3208 (test_unset_set_empty_vector): Likewise.
3209 (test_vector_clear): Likewise.
3210 (test_std_move): Likewise.
3211 (test_move_constructor):
3212 (test_self_move): Likewise.
3213 (test_set_unset_reset): Likewise.
3214 (run_tests): Rewrite in terms of the functions above.
3215
654670a4
WP
32162017-08-31 Weimin Pan <weimin.pan@oracle.com>
3217
3218 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3219 (adi_available): Use a temp variable of type CORE_ADDR as argument
3220 3 when calling target_auxv_search.
3221 (adi_normalize_address): Use masks and xor operators to calculate
3222 normalized address.
3223 (adi_read_versions, adi_write_versions, adi_print_versions)
3224 (do_examine, do_assign): Use paddress.
3225
7755ddb7
JB
32262017-08-29 John Baldwin <jhb@FreeBSD.org>
3227
3228 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3229 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3230 out of loop and add supply of FIR.
3231 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3232 add collect of FIR.
3233
fd437cbc
SM
32342017-08-28 Simon Marchi <simon.marchi@ericsson.com>
3235
3804a343 3236 PR gdb/21827
fd437cbc
SM
3237 * cli/cli-script.c (define_command): Don't convert command name
3238 to lower case.
3239
988f6b3d
JB
32402017-08-25 Joel Brobecker <brobecker@adacore.com>
3241
3242 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3243 Update all callers accordingly. Remove all code blocks handling
3244 the case where DISPP is not NULL.
3245
663c44ac
JK
32462017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3247
3248 PR symtab/22003
3249 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3250 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3251 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3252
f1902523
JK
32532017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3254
3255 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3256 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3257 (read_comp_units_from_section): New parameter abbrev_section, use
3258 read_and_check_comp_unit_head, allocate signatured_type if needed.
3259 (create_all_comp_units): Update read_comp_units_from_section caller.
3260
87215ad1
SDJ
32612017-08-23 Pedro Alves <palves@redhat.com>
3262
3263 PR remote/21852
3264 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3265 to null_ptid and switch to thread without reading the registers
3266 after adding the inferior.
3267
6e41ddec
JK
32682017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3269
3270 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3271 compile-gcc.
3272 * compile/compile.c (compile_gcc, show_compile_gcc): New.
3273 (compile_to_object): Implement compile_gcc.
3274 (_initialize_compile): Install "set compile-gcc". Initialize
3275 compile_gcc.
3276
e68c32d5
JK
32772017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3278
3279 * compile/compile.c (compile_to_object): Conditionally call
3280 set_verbose. Conditionally call compile or compile_v0.
3281
58afddc6
WP
32822017-08-07 Weimin Pan <weimin.pan@oracle.com>
3283
3284 * sparc64-tdep.h: (adi_normalize_address): New export.
3285 * sparc-nat.h: (open_adi_tag_fd): New export.
3286 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3287 * sparc64-linux-tdep.c:
3288 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3289 (sparc64_linux_handle_segmentation_fault): New function.
3290 (sparc64_linux_init_abi): Register
3291 sparc64_linux_handle_segmentation_fault
3292 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3293 (sparc64_addr_bits_remove): New function.
3294 (sparc64_init_abi): Register sparc64_addr_bits_remove.
3295 (MAX_PROC_NAME_SIZE): New macro.
3296 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3297 (sparc64adilist): New variable.
3298 (adi_proc_list): New variable.
3299 (find_adi_info): New function.
3300 (add_adi_info): New function.
3301 (get_adi_info_proc): New function.
3302 (get_adi_info): New function.
3303 (info_adi_command): New function.
3304 (read_maps_entry): New function.
3305 (adi_available): New function.
3306 (adi_normalize_address): New function.
3307 (adi_align_address): New function.
3308 (adi_convert_byte_count): New function.
3309 (adi_tag_fd): New function.
3310 (adi_is_addr_mapped): New function.
3311 (adi_read_versions): New function.
3312 (adi_write_versions): New function.
3313 (adi_print_versions): New function.
3314 (do_examine): New function.
3315 (do_assign): New function.
3316 (adi_examine_command): New function.
3317 (adi_assign_command): New function.
3318 (_initialize_sparc64_adi_tdep): New function.
3319
11db9430
SM
33202017-08-22 Simon Marchi <simon.marchi@ericsson.com>
3321
3322 * breakpoint.c (breakpoints_info): Rename to ...
3323 (info_breakpoints_command): ... this.
3324 (watchpoints_info): Rename to ...
3325 (info_watchpoints_command): ... this.
3326 (tracepoints_info): Rename to ...
3327 (info_tracepoints_command): ... this.
3328 (_initialize_breakpoint): Adjust.
3329 * dcache.c (dcache_info): Rename to ...
3330 (info_display_command): ... this.
3331 (_initialize_dcache): Adjust.
3332 * frame.h (args_info): Rename to ...
3333 (info_args_command): ... this.
3334 (locals_info): Rename to ...
3335 (info_locals_command): ... this.
3336 * infcmd.c (nofp_registers_info): Rename to ...
3337 (info_registers_command): ... this.
3338 (float_info): Rename to ...
3339 (info_float_command): ... this.
3340 (program_info): Rename to ...
3341 (info_program_command): ... this.
3342 (all_registers_info): Rename to ...
3343 (info_all_registers_command): ... this.
3344 (vector_info): Rename to ...
3345 (info_vector_command): ... this.
3346 (float_info): Rename to ...
3347 (info_float_command): ... this.
3348 (_initialize_infcmd): Adjust.
3349 * inferior.h (term_info): Rename to ...
3350 (info_terminal_command): ... this.
3351 * inflow.c (term_info): Rename to ...
3352 (info_terminal_command): ... this.
3353 (_initialize_inflow): Adjust.
3354 * infrun.c (signals_info): Rename to ...
3355 (info_signals_command): ... this.
3356 (_initialize_infrun): Adjust.
3357 * objc-lang.c (classes_info): Rename to ...
3358 (info_classes_command): ... this.
3359 (selectors_info): Rename to ...
3360 (info_selectors_command): ... this.
3361 (_initialize_objc_language): Adjust.
3362 * printcmd.c (sym_info): Rename to ...
3363 (info_symbol_command): ... this.
3364 (address_info): Rename to ...
3365 (info_address_command): ... this.
3366 (display_info): Rename to ...
3367 (info_display_command): ... this.
3368 (_initialize_printcmd): Adjust.
3369 * reverse.c (bookmarks_info): Rename to ...
3370 (info_breakpoints_command): ... this.
3371 (_initialize_reverse): Adjust.
3372 * ser-go32.c (dos_info): Rename to ...
3373 (info_serial_command): ... this.
3374 (_initialize_ser_dos): Adjust.
3375 * skip.c (skip_info): Rename to ...
3376 (info_skip_command): ... this.
3377 (_initialize_step_skip): Adjust.
3378 * source.c (line_info): Rename to ...
3379 (info_line_command): ... this.
3380 (source_info): Rename to ...
3381 (info_source_command)
3382 * stack.c (frame_info): Rename to ...
3383 (info_frame_command): ... this.
3384 (locals_info): Rename to ...
3385 (info_locals_command): ... this.
3386 (args_info): Rename to ...
3387 (info_args_command): ... this.
3388 (_initialize_stack): Adjust.
3389 * symtab.c (sources_info): Rename to ...
3390 (info_sources_command): ... this.
3391 (variables_info): Rename to ...
3392 (info_variables_command): ... this.
3393 (functions_info): Rename to ...
3394 (info_functions_command): ... this.
3395 (types_info): Rename to ...
3396 (info_types_command): ... this.
3397 (_initialize_symtab): Adjust.
3398 * target.c (target_info): Rename to ...
3399 (info_target_command): ... this.
3400 (initialize_targets): Adjust.
3401 * tracepoint.c (tvariables_info): Rename to ...
3402 (info_tvariables_command): ... this.
3403 (scope_info): Rename to ...
3404 (info_scope_command): ... this.
3405 (trace_dump_actions): Adjust.
3406 (_initialize_tracepoint): Adjust.
3407
b270e6f9
TT
34082017-08-22 Tom Tromey <tom@tromey.com>
3409
3410 * breakpoint.h (install_breakpoint): Update.
3411 * breakpoint.c (add_solib_catchpoint): Update.
3412 (install_breakpoint): Change argument to a std::unique_ptr.
3413 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3414 (create_breakpoint_sal, create_breakpoint): Update.
3415 (watch_command_1, catch_exec_command_1)
3416 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3417 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3418 Return the breakpoint.
3419 (set_raw_breakpoint_without_location, set_raw_breakpoint)
3420 (new_single_step_breakpoint): Update.
3421 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3422 std::unique_ptr.
3423 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3424 std::unique_ptr.
3425 * break-catch-sig.c (create_signal_catchpoint): Use
3426 std::unique_ptr.
3427 * ada-lang.c (create_ada_exception_catchpoint): Use
3428 std::unique_ptr.
3429
36bd8eaa
TT
34302017-08-22 Tom Tromey <tom@tromey.com>
3431
3432 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3433
56f37645
TT
34342017-08-22 Tom Tromey <tom@tromey.com>
3435
3436 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3437 (lookup_partial_symbol): Update.
3438
0b581c69
TT
34392017-08-22 Tom Tromey <tom@tromey.com>
3440
3441 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3442 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3443 (find_and_open_source, symtab_to_fullname): Update.
3444 * psymtab.c (psymtab_to_fullname): Update.
3445
14278e1f
TT
34462017-08-22 Tom Tromey <tom@tromey.com>
3447
3448 * exec.c (exec_file_attach): Update.
3449 * linux-thread-db.c (try_thread_db_load): Update.
3450 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3451 * utils.c (gdb_realpath): Change return type.
3452 (gdb_realpath_keepfile): Update.
3453 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3454 (_initialize_utils): Register the new self test.
3455 * source.c (openp): Update.
3456 (find_and_open_source): Update.
3457 * nto-tdep.c (nto_find_and_open_solib): Update.
3458 * main.c (set_gdb_data_directory): Update.
3459 (captured_main_1): Update.
3460 * dwarf2read.c (dwarf2_get_dwz_file): Update
3461 (dw2_map_symbol_filenames): Update.
3462 * auto-load.c (auto_load_safe_path_vec_update): Update.
3463 (filename_is_in_auto_load_safe_path_vec): Change type of
3464 "filename_realp".
3465 (auto_load_objfile_script): Update.
3466 (file_is_auto_load_safe): Update. Use std::string.
3467 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3468
4971c9a7
TT
34692017-08-22 Tom Tromey <tom@tromey.com>
3470
3471 * utils.c (gdb_realpath_keepfile): Return a
3472 gdb::unique_xmalloc_ptr.
3473 * exec.c (exec_file_attach): Update.
3474 * utils.h (gdb_realpath_keepfile): Return a
3475 gdb::unique_xmalloc_ptr.
3476
e3e41d58
TT
34772017-08-22 Tom Tromey <tom@tromey.com>
3478
3479 * compile/compile.c (compile_file_command): Use
3480 gdb::unique_xmalloc_ptr, std::string.
3481 * utils.c (gdb_abspath): Change return type.
3482 * source.c (openp): Update.
3483 * objfiles.c (allocate_objfile): Update.
3484 * main.c (set_gdb_data_directory): Update.
3485 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3486
0d999a6e
ZZ
34872017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
3488
3489 * cli-cmds.c (list_commands): List actual code around more than
3490 one location.
3491
329d5e7e
JB
34922017-08-21 John Baldwin <jhb@FreeBSD.org>
3493
3494 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3495
bf223d3e
PA
34962017-08-21 Pedro Alves <palves@redhat.com>
3497
3498 PR gdb/19487
3499 * c-exp.y (variable production): Handle function aliases.
3500 * minsyms.c (msymbol_is_text): New function.
3501 * minsyms.h (msymbol_is_text): Declare.
3502 * symtab.c (find_function_alias_target): New function.
3503 * symtab.h (find_function_alias_target): Declare.
3504
c973d0aa
PA
35052017-08-21 Pedro Alves <palves@redhat.com>
3506
3507 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3508 typedefs.
3509 * typeprint.c (whatis_exp): If handling "whatis", and expression
3510 is OP_TYPE, strip one typedef level. Otherwise don't strip
3511 typedefs here.
3512 * valops.c (value_cast): Save "to" type before resolving
3513 stubs/typedefs. Use that type as resulting value's type.
3514
2989a365
TT
35152017-08-18 Tom Tromey <tom@tromey.com>
3516 Pedro Alves <palves@redhat.com>
3517
3518 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3519 * sol-thread.c (sol_thread_resume, sol_thread_wait)
3520 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3521 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3522 * proc-service.c (ps_xfer_memory): Use scoped_restore.
3523 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3524 (linux_get_siginfo_data): Add "thread" argument. Use
3525 scoped_restore.
3526 * linux-nat.c (linux_child_follow_fork)
3527 (check_stopped_by_watchpoint): Use scoped_restore.
3528 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3529 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3530 (restore_inferior_ptid, save_inferior_ptid): Remove.
3531 * btrace.c (btrace_fetch): Use scoped_restore.
3532 * bsd-uthread.c (bsd_uthread_fetch_registers)
3533 (bsd_uthread_store_registers): Use scoped_restore.
3534 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3535 scoped_restore.
3536 * aix-thread.c (aix_thread_resume, aix_thread_wait)
3537 (aix_thread_xfer_partial): Use scoped_restore.
3538 * inferior.h (save_inferior_ptid): Remove.
3539
e60eb288
YQ
35402017-08-18 Yao Qi <yao.qi@linaro.org>
3541
3542 PR tdep/21818
3543 * arm-tdep.c (gdb_print_insn_arm): Mark
3544 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3545
6d580b63
YQ
35462017-08-18 Yao Qi <yao.qi@linaro.org>
3547
3548 * NEWS: Mention GDBserver's new option "--selftest".
3549 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3550 * selftest.c: Move it to common/selftest.c.
3551 * selftest.h: Move it to common/selftest.h.
3552 * selftest-arch.c (reset): New function.
3553 (tests_with_arch): Call reset.
3554
86dcbf50
YQ
35552017-08-18 Yao Qi <yao.qi@linaro.org>
3556
3557 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
3558 instead of exception_fprintf and printf_filtered.
3559
7649770c
YQ
35602017-08-18 Yao Qi <yao.qi@linaro.org>
3561
3562 * selftest.c (register_self_test): Rename it to
3563 selftests::register_test.
3564 (run_self_tests): selftest::run_tests.
3565 * selftest.h: Update declarations.
3566 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3567 selftests::register_test_foreach_arch.
3568 * selftest-arch.h: Update declaration.
3569 * aarch64-tdep.c: Update.
3570 * arm-tdep.c: Likewise.
3571 * disasm-selftests.c: Likewise.
3572 * dwarf2loc.c: Likewise.
3573 * dwarf2-frame.c: Likewise.
3574 * findvar.c: Likewise.
3575 * gdbarch-selftests.c: Likewise.
3576 * maint.c (maintenance_selftest): Likewise.
3577 * regcache.c: Likewise.
3578 * rust-exp.y: Likewise.
3579 * selftest-arch.c: Likewise.
3580 * unittests/environ-selftests.c: Likewise.
3581 * unittests/function-view-selftests.c: Likewise.
3582 * unittests/offset-type-selftests.c: Likewise.
3583 * unittests/optional-selftests.c: Likewise.
3584 * unittests/scoped_restore-selftests.c: Likewise.
3585 * utils-selftests.c: Likewise.
3586
b0cba12e
PA
35872017-08-17 Pedro Alves <palves@redhat.com>
3588
3589 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3590 local.
3591
4c8aa72d
PA
35922017-08-17 Pedro Alves <palves@redhat.com>
3593
3594 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3595 field.
3596 (reset_die_in_process): Delete, replaced by ...
3597 (process_die_scope): ... this new class. Make it responsible for
3598 freeing cu->line_header too.
3599 (process_die): Use process_die_scope.
3600 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3601 cu->line_header_die_owner. Don't release the line header if it's
3602 owned by the CU.
3603 (setup_type_unit_groups): Make the CU/DIE own the line header.
3604 Don't release the line header here.
3605
ba713918
AL
36062017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
3607
3608 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3609
44d0fb3a
RK
36102017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
3611
3612 * NEWS: Mention new shortcuts for nexti and stepi in TUI
3613 Single-Key mode
3614
a5afdb16
RK
36152017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
3616
3617 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3618 mode command list.
3619
47613aeb
SH
36202017-08-15 Stafford Horne <shorne@gmail.com>
3621
3622 * MAINTAINERS (Write After Approval): Add Stafford Horne.
3623
9c3cc999
SH
36242017-08-15 Stafford Horne <shorne@gmail.com>
3625
3626 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3627
206726fb
SDJ
36282017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
3629
3630 PR gdb/21954
3631 * infcmd.c (unset_environment_command): Use the 'clear' method on
3632 the environment instead of resetting it.
3633
0335ac6d
JB
36342017-08-15 John Baldwin <jhb@FreeBSD.org>
3635
3636 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3637 platforms.
3638
d3abe1c8
TT
36392017-08-14 Tom Tromey <tom@tromey.com>
3640
3641 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3642 (print_binary_chars): Likewise.
3643 (BITS_IN_BYTES): Remove.
3644
d6382fff
TT
36452017-08-14 Tom Tromey <tom@tromey.com>
3646
3647 PR gdb/21675
3648 * valprint.c (LOW_ZERO): Change value to 034.
3649 (print_octal_chars): Add static_asserts for octal constants.
3650 * printcmd.c (print_scalar_formatted): Add 'd' case.
3651
f978cb06
TT
36522017-08-11 Tom Tromey <tom@tromey.com>
3653
3654 * symfile.c (add_symbol_file_command): Use std::vector.
3655
2f5404b3
TT
36562017-08-14 Tom Tromey <tom@tromey.com>
3657
3658 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3659 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3660 std::move.
3661 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3662
de7985c3
PA
36632017-08-11 Pedro Alves <palves@redhat.com>
3664
3665 * infrun.c (process_event_stop_test): Adjust
3666 function_name_is_marked_for_skip call.
3667 * skip.c: Include <list>.
3668 (skiplist_entry): Make it a class with private fields, and
3669 getters/setters.
3670 (skiplist_entry_chain): Delete.
3671 (skiplist_entries): New.
3672 (skiplist_entry_count): Delete.
3673 (highest_skiplist_entry_num): New.
3674 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3675 (add_skiplist_entry): Delete.
3676 (skiplist_entry::skiplist_entry): New.
3677 (skiplist_entry::add_entry): New.
3678 (skip_file_command, skip_function): Adjust.
3679 (compile_skip_regexp): Delete.
3680 (skip_command): Don't compile regexp here. Adjust to use
3681 skiplist_entry::add_entry.
3682 (skip_info): Adjust to use range-for and getters.
3683 (skip_enable_command, skip_disable_command): Adjust to use
3684 range-for and setters.
3685 (skip_delete_command): Adjust to use std::list.
3686 (add_skiplist_entry): Delete.
3687 (skip_file_p): Delete, refactored as ...
3688 (skiplist_entry::do_skip_file_p): ... this new method.
3689 (skip_gfile_p): Delete, refactored as ...
3690 (skiplist_entry::do_gskip_file_p): ... this new method.
3691 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3692 (skiplist_entry::skip_function_p): ... this new method.
3693 (function_name_is_marked_for_skip): Now returns bool, and takes
3694 the function sal by const reference. Adjust to use range-for and
3695 skiplist_entry methods.
3696 (_initialize_step_skip): Remove references to
3697 skiplist_entry_chain, skiplist_entry_count.
3698 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3699 takes the function sal by const reference.
3700
be7d3cd5
YQ
37012017-08-11 Yao Qi <yao.qi@linaro.org>
3702
3703 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3704 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3705 (dwarf2_frame_cache):
3706 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3707 RETURN_MASK_ALL and set *this_case to NULL.
3708 * frame-unwind.h: Update comments.
3709
1c90d9f0
YQ
37102017-08-11 Yao Qi <yao.qi@linaro.org>
3711
3712 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3713 (dwarf2_frame_state_copy_regs): Remove.
3714 (dwarf2_frame_state_free_regs): Remove.
3715 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3716 (dwarf2_restore_rule): Call method .alloc_regs instead of
3717 dwarf2_frame_state_alloc_regs.
3718 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3719 constructor. Call std::move.
3720 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3721 (dwarf2_frame_cache): Likewise.
3722
3723 [GDB_SELF_TEST]: Include selftest.h and
3724 selftest-arch.h.
3725 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3726 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3727 execute_cfa_program_test.
3728
3729 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3730 copy ctor, assignment operator, move assignment.
3731 <alloc_regs>: New method.
3732 <swap>: New method.
3733 (struct dwarf2_frame_state): Delete dtor.
3734 (dwarf2_frame_state_alloc_regs): Remove declaration.
3735 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3736 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3737
afe37d6b
YQ
37382017-08-11 Yao Qi <yao.qi@linaro.org>
3739
3740 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3741 (dwarf2_frame_state::dwarf2_frame_state): New.
3742 (dwarf2_frame_state::~dwarf2_frame_state): New.
3743 (dwarf2_fetch_cfa_info): Update.
3744 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3745 rather than a pointer. Update code.
3746 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3747 dtor.
3748 <data_align, code_align, retaddr_column>: Change them to const.
3749 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3750 to bool.
3751
b348037f
YQ
37522017-08-11 Yao Qi <yao.qi@linaro.org>
3753
3754 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3755 <loc.exp>: New field.
3756 * dwarf2-frame.c (execute_cfa_program): Update.
3757 (dwarf2_frame_prev_register): Update.
3758
e7c9de26
PA
37592017-08-10 Pedro Alves <palves@redhat.com>
3760
3761 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3762
e8c6b620
JB
37632017-08-09 John Baldwin <jhb@FreeBSD.org>
3764
3765 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3766 (fbsd_pending_children): Use std::list.
3767 (fbsd_remember_child): Likewise.
3768 (fbsd_is_child_pending): Likewise.
3769 (fbsd_pending_vfork_done): Use std::forward_list.
3770 (fbsd_add_vfork_done): Likewise.
3771 (fbsd_is_vfork_done_pending): Likewise.
3772 (fbsd_next_vfork_done): Likewise.
3773
e4a26669
JB
37742017-08-09 John Baldwin <jhb@FreeBSD.org>
3775
3776 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3777 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3778 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3779 for `mapfilename'.
3780 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 3781 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 3782
142311d3
JB
37832017-08-09 John Baldwin <jhb@FreeBSD.org>
3784
3785 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3786 "filestuff.h".
3787 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3788
42fa2e0e
TT
37892017-08-09 Tom Tromey <tom@tromey.com>
3790
3791 * skip.c (skiplist_entry): New constructor.
3792 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3793 (skiplist_entry::file_is_glob): Now bool.
3794 (skiplist_entry::file, skiplist_entry::function): Now
3795 std::string.
3796 (make_skip_entry): Return a unique_ptr. Use new.
3797 (free_skiplist_entry, free_skiplist_entry_cleanup)
3798 (make_free_skiplist_entry_cleanup): Remove.
3799 (skip_command, skip_disable_command, add_skiplist_entry)
3800 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3801 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3802 (function_name_is_marked_for_skip): Update.
3803 (skip_delete_command): Update. Use delete.
3804
cd3af38d
JW
38052017-08-09 Jiong Wang <jiong.wang@arm.com>
3806
3807 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3808 (aarch64_linux_core_read_description): New function.
3809 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3810
29592bde
PA
38112017-08-09 Pedro Alves <palves@redhat.com>
3812
3813 * cp-name-parser.y (cp_comp_to_string): Return a
3814 gdb::unique_xmalloc_ptr<char>.
3815 * cp-support.c (replace_typedefs_qualified_name)
3816 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3817 (cp_canonicalize_string_full): Use op= instead of explicit
3818 convertion.
3819 (cp_class_name_from_physname, method_name_from_physname)
3820 (cp_func_name, cp_remove_params): Adjust to use
3821 gdb::unique_xmalloc_ptr<char>.
3822 * cp-support.h (cp_comp_to_string): Return a
3823 gdb::unique_xmalloc_ptr<char>.
3824 * python/py-type.c (typy_lookup_type): Adjust to use
3825 gdb::unique_xmalloc_ptr<char>.
3826
b3340438
L
38272017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3828
3829 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3830
e88e8651
YQ
38312017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3832 Yao Qi <yao.qi@linaro.org>
3833
3834 * cp-support.c (cp_canonicalize_string_full): Use
3835 gdb::unique_xmalloc_ptr<char>.
3836 (cp_canonicalize_string): Likewise.
3837
f5a29eb0
YQ
38382017-08-09 Yao Qi <yao.qi@linaro.org>
3839
3840 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3841 * regformats/i386/amd64-avx-avx512.dat: Remove.
3842 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3843 * regformats/i386/amd64-avx-mpx.dat:Remove.
3844 * regformats/i386/amd64-avx.dat: Remove.
3845 * regformats/i386/amd64-mpx.dat: Remove.
3846 * regformats/i386/i386-avx-avx512.dat: Remove.
3847 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3848 * regformats/i386/i386-avx-mpx.dat: Remove.
3849 * regformats/i386/i386-mmx.dat: Remove.
3850 * regformats/i386/i386-mpx.dat: Remove.
3851
57757c2f
YQ
38522017-08-09 Yao Qi <yao.qi@linaro.org>
3853
3854 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3855 * amd64-tdep.c: Don't include features/i386/x32*.c.
3856 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3857 functions.
3858 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3859 and i386/x32-avx-avx512.
3860 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3861 and i386/x32.xml.
3862 * features/i386/x32-avx-avx512.c: Removed.
3863 * features/i386/x32-avx-avx512.xml: Removed.
3864 * features/i386/x32-avx.c: Removed.
3865 * features/i386/x32-avx.xml: Removed.
3866 * features/i386/x32.c: Removed.
3867 * features/i386/x32.xml: Removed.
3868 * regformats/i386/x32-avx-avx512.dat: Removed.
3869 * regformats/i386/x32-avx.dat: Removed.
3870 * regformats/i386/x32.dat: Removed.
3871
ba7b109b
MR
38722017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3873
3874 PR breakpoints/21886
3875 * mem-break.c (default_memory_insert_breakpoint): Use
3876 `->placed_address' rather than `->reqstd_address' for the
3877 breakpoint location.
3878
e347efc3
MR
38792017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3880
3881 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3882 assertions.
3883
0dba2a6c
MR
38842017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3885
3886 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3887 a union of `tdep_info', `tdesc_data' and `id'.
3888 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3889 rather than `info.tdep_info'.
3890 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3891 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3892 * i386-tdep.c (i386_gdbarch_init): Likewise.
3893 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3894 * mips-tdep.c (mips_gdbarch_init): Likewise.
3895 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3896 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3897 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3898 `info.tdep_info'.
3899 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3900 `info.tdep_info'.
3901 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3902 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3903 `info.tdep_info'.
3904 * spu-tdep.c (spu_gdbarch_init): Likewise.
3905 * gdbarch.h: Regenerate.
3906
16eb6b2d
LS
39072017-08-07 Leszek Swirski <leszeks@google.com>
3908
7b005726 3909 PR symtab/20899
16eb6b2d
LS
3910 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3911
74cbb09e
SM
39122017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3913
3914 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3915 (gdbsim_open): Rename gdb_argv args object to argv.
3916
ee0c3293
TT
39172017-08-05 Tom Tromey <tom@tromey.com>
3918
3919 * compile/compile-object-load.c (compile_object_load): Use
3920 gdb::unique_xmalloc_ptr.
3921 * cli/cli-dump.c (scan_filename): Rename from
3922 scan_filename_with_cleanup. Change return type.
3923 (scan_expression): Rename from scan_expression_with_cleanup.
3924 Change return type.
3925 (dump_memory_to_file, dump_value_to_file, restore_command):
3926 Use gdb::unique_xmalloc_ptr. Update.
3927 * cli/cli-cmds.c (find_and_open_script): Use
3928 gdb::unique_xmalloc_ptr.
3929 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3930 * symmisc.c (maintenance_print_symbols)
3931 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3932 * symfile.c (symfile_bfd_open, generic_load)
3933 (add_symbol_file_command, remove_symbol_file_command): Use
3934 gdb::unique_xmalloc_ptr.
3935 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3936 * psymtab.c (maintenance_print_psymbols): Use
3937 gdb::unique_xmalloc_ptr.
3938 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3939 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3940 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3941 (reload_shared_libraries_1): Likewise.
3942
3232fabd
TT
39432017-08-05 Tom Tromey <tom@tromey.com>
3944
3945 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3946 (rust_op_vector, rust_set_vector): New typedefs.
3947 (current_parser): New global.
3948 (work_obstack): Change to pointer type. Update all users.
3949 (rust_ast, pstate): Remove globals.
3950 (struct rust_parser): New.
3951 (%union) <params, field_inits>: Change type.
3952 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3953 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3954 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3955 (convert_params_to_types, convert_params_to_expression): Change
3956 type of "params".
3957 (ast_string): Change type of "fields".
3958 (rust_parse): Make a rust_parser. Remove cleanups.
3959 (rust_lex_tests): Make and install an auto_obstack.
3960
f02fd774
YQ
39612017-08-04 Yao Qi <yao.qi@linaro.org>
3962
3963 * configure.srv (ipa_x32_linux_regobj): New.
3964 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3965 instead of X86_TDESC_AVX512.
3966 (initialize_low_tracepoint): Call
3967 init_registers_x32_avx_avx512_linux.
3968
91975afd
YQ
39692017-08-04 Yao Qi <yao.qi@linaro.org>
3970
3971 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3972
2331fa3a
RK
39732017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3974
3975 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3976
744e4fe1
TT
39772017-08-03 Tom Tromey <tom@tromey.com>
3978
3979 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3980 Remove.
3981 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3982
1c034b67
TT
39832017-08-03 Tom Tromey <tom@tromey.com>
3984
3985 * python/py-param.c (compute_enum_values): Use gdb_argv.
3986
773a1edc
TT
39872017-08-03 Tom Tromey <tom@tromey.com>
3988
3989 * utils.h (struct gdb_argv_deleter): New.
3990 (gdb_argv): New class.
3991 * utils.c (gdb_argv::reset): New method.
3992 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3993 * tracefile.c (tsave_command): Use gdb_argv.
3994 * top.c (new_ui_command): Use gdb_argv.
3995 * symmisc.c (maintenance_print_symbols)
3996 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3997 * symfile.c (symbol_file_command, generic_load)
3998 (remove_symbol_file_command): Use gdb_argv.
3999 * stack.c (backtrace_command): Use gdb_argv.
4000 * source.c (add_path, show_substitute_path_command)
4001 (unset_substitute_path_command, set_substitute_path_command):
4002 Use gdb_argv.
4003 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
4004 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4005 * remote.c (extended_remote_run, remote_put_command)
4006 (remote_get_command, remote_delete_command): Use gdb_argv.
4007 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4008 (gdbsim_open): Use gdb_argv.
4009 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4010 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4011 * procfs.c (procfs_info_proc): Use gdb_argv.
4012 * interps.c (interpreter_exec_cmd): Use gdb_argv.
4013 * infrun.c (handle_command): Use gdb_argv.
4014 * inferior.c (add_inferior_command, clone_inferior_command):
4015 Use gdb_argv.
4016 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4017 * exec.c (exec_file_command): Use gdb_argv.
4018 * cli/cli-cmds.c (alias_command): Use gdb_argv.
4019 * compile/compile.c (build_argc_argv): Use gdb_argv.
4020
0d50bde3
TT
40212017-08-03 Tom Tromey <tom@tromey.com>
4022
4023 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4024
7f968c89
TT
40252017-08-03 Tom Tromey <tom@tromey.com>
4026
4027 * python/python.c (compute_python_string): Return std::string.
4028 (gdbpy_eval_from_control_command): Update.
4029 (do_start_initialization): Use std::string.
4030 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4031 xstrprintf.
4032 * python/py-breakpoint.c (local_setattro): Use string_printf, not
4033 xstrprintf.
4034
3c9ebddd
TT
40352017-08-03 Tom Tromey <tom@tromey.com>
4036
4037 * top.h (do_restore_instream_cleanup): Remove.
4038 * top.c (do_restore_instream_cleanup): Remove.
4039 (read_command_file): Use scoped_restore.
4040 * cli/cli-script.c (execute_user_command): Use scoped_restore.
4041
b51b225e
TT
40422017-08-03 Tom Tromey <tom@tromey.com>
4043
4044 * cli/cli-script.c (execute_user_command)
4045 (execute_control_command): Use scoped_restore.
4046
ac991630
TT
40472017-08-03 Tom Tromey <tom@tromey.com>
4048
4049 * cli/cli-script.c (do_restore_user_call_depth): Remove.
4050 (execute_user_command): Remove user_call_depth; use
4051 user_args_stack's size instead.
4052
898e0c8e
TT
40532017-08-03 Tom Tromey <tom@tromey.com>
4054
4055 * top.h (in_user_command): Remove.
4056 * top.c (in_user_command): Remove.
4057 * cli/cli-script.c (do_restore_user_call_depth)
4058 (execute_user_command): Update.
4059
26fcd5d7
TT
40602017-08-03 Tom Tromey <tom@tromey.com>
4061
4062 * valops.c (search_struct_method): Use gdb::byte_vector.
4063 * valarith.c (value_concat): Use std::vector.
4064 * target.c (memory_xfer_partial): Use gdb::byte_vector.
4065 (simple_search_memory): Likewise.
4066 * printcmd.c (find_string_backward): Use gdb::byte_vector.
4067 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4068 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4069 * elfread.c (elf_rel_plt_read): Use std::string.
4070 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4071 * cli/cli-dump.c (restore_section_callback): Use
4072 gdb::byte_vector.
4073
7c218e6c
TT
40742017-08-03 Tom Tromey <tom@tromey.com>
4075
4076 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4077
31b68d4a
TT
40782017-08-03 Tom Tromey <tom@tromey.com>
4079
4080 * tui/tui-regs.c (tui_restore_gdbout): Remove.
4081 (tui_register_format): Use scoped_restore.
4082
2ec845e7
TT
40832017-08-03 Tom Tromey <tom@tromey.com>
4084
4085 * reverse.c (exec_direction_default): Remove.
4086 (exec_reverse_once): Use scoped_restore.
4087 * remote.c (restore_remote_timeout): Remove.
4088 (remote_flash_erase, remote_flash_write, remote_flash_done)
4089 (readchar, remote_serial_write): Use scoped_restore.
4090 * cli/cli-script.c (struct source_cleanup_lines_args)
4091 (source_cleanup_lines): Remove.
4092 (script_from_file): Use scoped_restore.
4093 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4094 (source_command): Use scoped_restore.
4095
b3bc8453
TT
40962017-08-03 Tom Tromey <tom@tromey.com>
4097
4098 * utils.h (make_cleanup_free_so): Remove.
4099 * utils.c (do_free_so, make_cleanup_free_so): Remove.
4100 * solist.h (struct so_deleter): New.
4101 (so_list_up): New typedef.
4102 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4103
e3ad2841
TT
41042017-08-03 Tom Tromey <tom@tromey.com>
4105
4106 * utils.h (make_cleanup_restore_current_language): Remove.
4107 * utils.c (do_restore_current_language)
4108 (make_cleanup_restore_current_language): Remove.
4109 * parse.c (parse_exp_in_context_1)
4110 (parse_expression_with_language): Use
4111 scoped_restore_current_language.
4112 * mi/mi-main.c (mi_cmd_execute): Use
4113 scoped_restore_current_language.
4114 * language.h (scoped_restore_current_language): New class.
4115
b80cf838
TT
41162017-08-03 Tom Tromey <tom@tromey.com>
4117
4118 * compile/compile.c (cleanup_unlink_file): Remove.
4119 (compile_to_object): Use gdb::unlinker.
4120 (eval_compile_command): Likewise.
4121
fad0444a
TT
41222017-08-03 Tom Tromey <tom@tromey.com>
4123
4124 * utils.h (make_cleanup_fclose): Remove.
4125 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4126
6e7bc05c
TT
41272017-08-03 Tom Tromey <tom@tromey.com>
4128
4129 * top.c (open_terminal_stream): Return gdb_file_up.
4130 (new_ui_command): Update.
4131
4a45905b
TT
41322017-08-03 Tom Tromey <tom@tromey.com>
4133
4134 * source.c (print_source_lines_base, forward_search_command)
4135 (reverse_search_command): Use gdb_file_up.
4136
7cd06d6e
TT
41372017-08-03 Tom Tromey <tom@tromey.com>
4138
4139 * fbsd-nat.c (fbsd_find_memory_regions): Update.
4140
ed166945
TT
41412017-08-03 Tom Tromey <tom@tromey.com>
4142
4143 * cli/cli-cmds.c (find_and_open_script): Change return type.
4144 Remove "streamp" and "full_path" parameters.
4145 (source_script_with_search): Update.
4146 * auto-load.c (source_script_file): Update.
4147 * cli/cli-cmds.h (find_and_open_script): Change type.
4148 (open_script): New struct.
4149
d419f42d
TT
41502017-08-03 Tom Tromey <tom@tromey.com>
4151
4152 * xml-support.c (xml_fetch_content_from_file): Update.
4153 * ui-file.c (stdio_file::open): Update.
4154 * tracefile-tfile.c (tfile_start): Update.
4155 * remote.c (remote_file_put, remote_file_get): Update.
4156 * nat/linux-procfs.c (linux_proc_get_int)
4157 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4158 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4159 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4160 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4161 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4162 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4163 * linux-nat.c (linux_proc_pending_signals): Update.
4164 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4165 (file_closer): Remove.
4166 * compile/compile.c (compile_to_object): Update.
4167 * common/filestuff.h (struct gdb_file_deleter): New.
4168 (gdb_file_up): New typedef.
4169 (gdb_fopen_cloexec): Change return type.
4170 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4171 * cli/cli-dump.c (fopen_with_cleanup): Remove.
4172 (dump_binary_file, restore_binary_file): Update.
4173 * auto-load.c (auto_load_objfile_script_1): Update.
4174
4a2b031d
TT
41752017-08-03 Tom Tromey <tom@tromey.com>
4176
4177 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4178 (info_static_tracepoint_markers_command): Likewise.
4179 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4180 * skip.c (skip_info): Use ui_out_emit_table.
4181 * progspace.c (print_program_space): Use ui_out_emit_table.
4182 * osdata.c (info_osdata): Use ui_out_emit_table.
4183 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4184 ui_out_emit_table.
4185 * linux-thread-db.c (info_auto_load_libthread_db): Use
4186 ui_out_emit_table.
4187 * inferior.c (print_inferior): Use ui_out_emit_table.
4188 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4189 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4190 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4191 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4192 * ui-out.h (class ui_out_emit_table): New.
4193
a4f320fd
MR
41942017-08-02 Maciej W. Rozycki <macro@imgtec.com>
4195
4196 * mips-tdep.c (mips_fpu_type_str): New function.
4197 (mips_dump_tdep): Call it.
4198
a2f1f308
MR
41992017-08-01 Maciej W. Rozycki <macro@imgtec.com>
4200
4201 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4202 `->mips_fpu_type'.
4203
7e5ed83b
XR
42042017-07-31 Xavier Roirand <roirand@adacore.com>
4205
4206 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4207
4c9dc811
XR
42082017-07-27 Xavier Roirand <roirand@adacore.com>
4209
4210 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4211
27d41eac
YQ
42122017-07-26 Yao Qi <yao.qi@linaro.org>
4213
4214 * cli/cli-cmds.c (maintenancechecklist): New variable.
4215 * gdbcmd.h (maintenancechecklist): Declare it.
4216 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4217 Call i386_linux_read_description with different masks.
4218 * maint.c (maintenance_check_command): New function.
4219 (_initialize_maint_cmds): Call add_prefix_cmd.
4220 * target-descriptions.c (tdesc_reg): override operator != and ==.
4221 (tdesc_type): Likewise.
4222 (tdesc_feature): Likewise.
4223 (target_desc): Likewise.
4224 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4225 (maintenance_check_xml_descriptions): New function.
4226 (_initialize_target_descriptions) Add command "xml-descriptions".
4227 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4228
ea03d0d3
YQ
42292017-07-26 Yao Qi <yao.qi@linaro.org>
4230
4231 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4232 Include features/i386/32bit-*.c.
4233 (i386_linux_read_description): Generate target description if it
4234 doesn't exist.
4235 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4236 functions.
4237 * features/i386/32bit-linux.c: Re-generated.
4238 * features/i386/32bit-sse.c: Likewise.
4239 * target-descriptions.c (print_c_feature::visit): Print code to
4240 set register number if needed.
4241 (print_c_feature) <m_next_regnum>: New field.
4242
25aa13e5
YQ
42432017-07-26 Yao Qi <yao.qi@linaro.org>
4244
4245 * features/Makefile (CFILES): Rename with TDESC_CFILES.
4246 (FEATURE_XMLFILES): New.
4247 (FEATURE_CFILES): New.
4248 New rules.
4249 (clean-cfiles): Remove generated c files.
4250 * features/i386/32bit-avx.c: Generated.
4251 * features/i386/32bit-avx512.c: Generated.
4252 * features/i386/32bit-core.c: Generated.
4253 * features/i386/32bit-linux.c: Generated.
4254 * features/i386/32bit-mpx.c: Generated.
4255 * features/i386/32bit-pkeys.c: Generated.
4256 * features/i386/32bit-sse.c: Generated.
4257 * target-descriptions.c: Include algorithm.
4258 (tdesc_element_visitor): Add method visit_end.
4259 (print_c_tdesc): Implement visit_end.
4260 (print_c_tdesc:: m_filename_after_features): Move it to
4261 protected.
4262 (print_c_feature): New class.
4263 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4264 name starts with "i386/32bit-".
4265
6eb1e6a8
YQ
42662017-07-26 Yao Qi <yao.qi@linaro.org>
4267
4268 * target-descriptions.c (tdesc_element_visitor): New class.
4269 (tdesc_element): New class.
4270 (tdesc_reg): Inherit from tdesc_element.
4271 (tdesc_reg::accept): New function.
4272 (tdesc_type): Inherit from tdesc_element.
4273 (tdesc_type::accept): New function.
4274 (tdesc_feature): Inherit from tdesc_element.
4275 (tdesc_feature::accept): New function.
4276 (target_desc): Inherit from tdesc_element.
4277 (target_desc::target_desc): New.
4278 (target_desc::~target_desc): New.
4279 (target_desc::accept): New.
4280 (allocate_target_description): Use new.
4281 (free_target_description): Use delete.
4282 (print_c_tdesc): New class.
4283 (maint_print_c_tdesc_cmd): Adjust.
4284
4285 * features/aarch64.c: Re-generated.
4286 * features/arc-arcompact.c: Re-generated.
4287 * features/arc-v2.c: Re-generated.
4288 * features/arm/arm-with-iwmmxt.c: Re-generated.
4289 * features/arm/arm-with-m.c: Re-generated.
4290 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4291 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4292 * features/arm/arm-with-neon.c: Re-generated.
4293 * features/arm/arm-with-vfpv2.c: Re-generated.
4294 * features/arm/arm-with-vfpv3.c: Re-generated.
4295 * features/i386/amd64-avx-avx512.c: Re-generated.
4296 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4297 * features/i386/amd64-avx.c: Re-generated.
4298 * features/i386/amd64-avx-linux.c: Re-generated.
4299 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4300 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4301 * features/i386/amd64-avx-mpx.c: Re-generated.
4302 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4303 * features/i386/amd64.c: Re-generated.
4304 * features/i386/amd64-linux.c: Re-generated.
4305 * features/i386/amd64-mpx.c: Re-generated.
4306 * features/i386/amd64-mpx-linux.c: Re-generated.
4307 * features/i386/i386-avx-avx512.c: Re-generated.
4308 * features/i386/i386-avx-avx512-linux.c: Re-generated.
4309 * features/i386/i386-avx.c: Re-generated.
4310 * features/i386/i386-avx-linux.c: Re-generated.
4311 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4312 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4313 * features/i386/i386-avx-mpx.c: Re-generated.
4314 * features/i386/i386-avx-mpx-linux.c: Re-generated.
4315 * features/i386/i386.c: Re-generated.
4316 * features/i386/i386-linux.c: Re-generated.
4317 * features/i386/i386-mmx.c: Re-generated.
4318 * features/i386/i386-mmx-linux.c: Re-generated.
4319 * features/i386/i386-mpx.c: Re-generated.
4320 * features/i386/i386-mpx-linux.c: Re-generated.
4321 * features/i386/x32-avx-avx512.c: Re-generated.
4322 * features/i386/x32-avx-avx512-linux.c: Re-generated.
4323 * features/i386/x32-avx.c: Re-generated.
4324 * features/i386/x32-avx-linux.c: Re-generated.
4325 * features/i386/x32.c: Re-generated.
4326 * features/i386/x32-linux.c: Re-generated.
4327 * features/microblaze.c: Re-generated.
4328 * features/microblaze-with-stack-protect.c: Re-generated.
4329 * features/mips64-dsp-linux.c: Re-generated.
4330 * features/mips64-linux.c: Re-generated.
4331 * features/mips-dsp-linux.c: Re-generated.
4332 * features/mips-linux.c: Re-generated.
4333 * features/nds32.c: Re-generated.
4334 * features/nios2.c: Re-generated.
4335 * features/nios2-linux.c: Re-generated.
4336 * features/rs6000/powerpc-32.c: Re-generated.
4337 * features/rs6000/powerpc-32l.c: Re-generated.
4338 * features/rs6000/powerpc-403.c: Re-generated.
4339 * features/rs6000/powerpc-403gc.c : Re-generated.
4340 * features/rs6000/powerpc-405.c: Re-generated.
4341 * features/rs6000/powerpc-505.c: Re-generated.
4342 * features/rs6000/powerpc-601.c: Re-generated.
4343 * features/rs6000/powerpc-602.c: Re-generated.
4344 * features/rs6000/powerpc-603.c: Re-generated.
4345 * features/rs6000/powerpc-604.c: Re-generated.
4346 * features/rs6000/powerpc-64.c: Re-generated.
4347 * features/rs6000/powerpc-64l.c: Re-generated.
4348 * features/rs6000/powerpc-7400.c: Re-generated.
4349 * features/rs6000/powerpc-750.c: Re-generated.
4350 * features/rs6000/powerpc-860.c: Re-generated.
4351 * features/rs6000/powerpc-altivec32.c: Re-generated.
4352 * features/rs6000/powerpc-altivec32l.c: Re-generated.
4353 * features/rs6000/powerpc-altivec64.c: Re-generated.
4354 * features/rs6000/powerpc-altivec64l.c: Re-generated.
4355 * features/rs6000/powerpc-cell32l.c: Re-generated.
4356 * features/rs6000/powerpc-cell64l.c: Re-generated.
4357 * features/rs6000/powerpc-e500.c: Re-generated.
4358 * features/rs6000/powerpc-e500l.c: Re-generated.
4359 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4360 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4361 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4362 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4363 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4364 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4365 * features/rs6000/powerpc-vsx32.c: Re-generated.
4366 * features/rs6000/powerpc-vsx32l.c: Re-generated.
4367 * features/rs6000/powerpc-vsx64.c: Re-generated.
4368 * features/rs6000/powerpc-vsx64l.c: Re-generated.
4369 * features/rs6000/rs6000.c: Re-generated.
4370 * features/s390-linux32.c: Re-generated.
4371 * features/s390-linux32v1.c: Re-generated.
4372 * features/s390-linux32v2.c: Re-generated.
4373 * features/s390-linux64.c: Re-generated.
4374 * features/s390-linux64v1.c: Re-generated.
4375 * features/s390-linux64v2.c: Re-generated.
4376 * features/s390-te-linux64.c: Re-generated.
4377 * features/s390-tevx-linux64.c: Re-generated.
4378 * features/s390-vx-linux64.c: Re-generated.
4379 * features/s390x-linux64.c: Re-generated.
4380 * features/s390x-linux64v1.c: Re-generated.
4381 * features/s390x-linux64v2.c: Re-generated.
4382 * features/s390x-te-linux64.c: Re-generated.
4383 * features/s390x-tevx-linux64.c: Re-generated.
4384 * features/s390x-vx-linux64.c: Re-generated.
4385 * features/sparc/sparc32-solaris.c: Re-generated.
4386 * features/sparc/sparc64-solaris.c: Re-generated.
4387 * features/tic6x-c62x.c: Re-generated.
4388 * features/tic6x-c62x-linux.c: Re-generated.
4389 * features/tic6x-c64x.c: Re-generated.
4390 * features/tic6x-c64x-linux.c: Re-generated.
4391 * features/tic6x-c64xp.c: Re-generated.
4392 * features/tic6x-c64xp-linux.c: Re-generated.
4393
35b4818d
YQ
43942017-07-26 Yao Qi <yao.qi@linaro.org>
4395
4396 * i386-linux-tdep.c (i386_linux_read_description): New function.
4397 (i386_linux_core_read_description): Call
4398 i386_linux_read_description.
4399 * i386-linux-tdep.h (i386_linux_read_description): Declare.
4400 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4401 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4402 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4403 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4404 * x86-linux-nat.c (x86_linux_read_description): Call
4405 i386_linux_read_description.
4406
8e2141c6
YQ
44072017-07-26 Yao Qi <yao.qi@linaro.org>
4408
4409 * NEWS: Mention it.
4410 * features/Makefile (%.c: %.xml): Pass the xml file name to
4411 command "maint print c-tdesc".
4412 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4413 name from 'arg'.
4414
b468ff4c
YQ
44152017-07-26 Yao Qi <yao.qi@linaro.org>
4416
4417 * target-descriptions.c (target_desc): Add ctor and dtor. Do
4418 in-class initialization.
4419 (tdesc_create_feature): Call new instead of XCNEW.
4420 (free_target_description): Ue delete.
4421
b9c0e1b4
JB
44222017-07-25 John Baldwin <jhb@FreeBSD.org>
4423
4424 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4425
a04b5337
YQ
44262017-07-25 Yao Qi <yao.qi@linaro.org>
4427
4428 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4429 constant.
4430 (amd64_x32_init_abi): Likewise.
4431 * amd64-tdep.h (amd64_init_abi): Update declaration.
4432 (amd64_x32_init_abi): Likewise.
4433
02ad7fc2
YQ
44342017-07-25 Yao Qi <yao.qi@linaro.org>
4435
4436 PR tdep/21717
4437 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4438 condition for FPSCR.
4439 (arm_linux_store_inferior_registers): Likewise.
4440
b6f48cb0
TT
44412017-07-22 Tom Tromey <tom@tromey.com>
4442
4443 * break-catch-syscall.c (struct catch_syscall_inferior_data)
4444 <syscalls_counts>: Now a std::vector.
4445 (get_catch_syscall_inferior_data): Use "new".
4446 (catch_syscall_inferior_data_cleanup): Use "delete".
4447 (insert_catch_syscall, remove_catch_syscall)
4448 (clear_syscall_counts): Update.
4449
e12c9b7a
TT
44502017-07-22 Tom Tromey <tom@tromey.com>
4451
4452 * break-catch-syscall.c (syscall_catchpoint)
4453 <syscalls_to_be_caught>: Now a std::vector<int>
4454 (~syscall_catchpoint): Remove.
4455 (insert_catch_syscall, remove_catch_syscall)
4456 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4457 (print_mention_catch_syscall, print_recreate_catch_syscall):
4458 Update.
4459 (create_syscall_event_catchpoint): Change type of "filter"
4460 parameter.
4461 (catch_syscall_split_args): Return a std::vector.
4462 (catch_syscall_command_1, catching_syscall_number_1): Update.
4463
4fa8aeac
TT
44642017-07-22 Tom Tromey <tom@tromey.com>
4465
4466 * break-catch-throw.c (struct exception_catchpoint)
4467 <exception_rx>: Now a std::string.
4468 (~exception_catchpoint): Remove.
4469 (print_one_detail_exception_catchpoint): Update.
4470 (handle_gnu_v3_exceptions): Change type of except_rx.
4471 (extract_exception_regexp): Return a std::string.
4472 (catch_exception_command_1): Update.
4473
f746a154
TT
44742017-07-22 Tom Tromey <tom@tromey.com>
4475
4476 * break-catch-sig.c (gdb_signal_type): Remove typedef.
4477 (struct signal_catchpoint) <signals_to_be_caught>: Now a
4478 std::vector.
4479 <catch_all>: Now a bool.
4480 (~signal_catchpoint): Remove.
4481 (signal_catchpoint_insert_location)
4482 (signal_catchpoint_remove_location)
4483 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4484 (signal_catchpoint_print_mention)
4485 (signal_catchpoint_print_recreate)
4486 (signal_catchpoint_explains_signal): Update.
4487 (create_signal_catchpoint): Change type of "filter" and
4488 "catch_all".
4489 (catch_signal_split_args): Return a std::vector. Change type of
4490 "catch_all".
4491 (catch_signal_command): Update.
4492
47e77640
PA
44932017-07-20 Pedro Alves <palves@redhat.com>
4494
4495 * ada-lang.c (ada_language_defn): Make extern.
4496 (_initialize_ada_language): Remove add_language call.
4497 * c-lang.c (c_language_defn, cplus_language_defn)
4498 (asm_language_defn, minimal_language_defn): Make extern.
4499 (_initialize_c_language): Delete.
4500 * completer.c (compare_cstrings): Delete, moved to utils.h.
4501 * d-lang.c (d_language_defn): Make extern.
4502 (_initialize_d_language): Remove add_language calls.
4503 * defs.h (enum language): Add comment.
4504 * f-lang.c (f_language_defn): Make extern.
4505 (_initialize_f_language): Remove add_language call.
4506 * go-lang.c (go_language_defn): Make extern.
4507 (_initialize_go_language): Remove add_language call.
4508 * language.c: Include <algorithm>.
4509 (languages): Redefine as const array.
4510 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4511 (set_language_command): Handle "local". Use for-range loop.
4512 (set_language): Remove loop.
4513 (language_enum): Rewrite.
4514 (language_def, language_str): Remove loops.
4515 (add_language): Delete.
4516 (add_set_language_command): New, based on add_languages.
4517 (skip_language_trampoline): Adjust.
4518 (local_language_defn): Delete.
4519 (language_gdbarch_post_init): Adjust.
4520 (_initialize_language): Remove add_language calls. Call
4521 add_set_language_command.
4522 * language.h (add_language): Delete.
4523 (auto_language_defn)
4524 (unknown_language_defn, minimal_language_defn, ada_language_defn)
4525 (asm_language_defn, c_language_defn, cplus_language_defn)
4526 (d_language_defn, f_language_defn, go_language_defn)
4527 (m2_language_defn, objc_language_defn, opencl_language_defn)
4528 (pascal_language_defn, rust_language_defn): Declare.
4529 * m2-lang.c (m2_language_defn): Make extern.
4530 (_initialize_m2_language): Remove add_language call.
4531 * objc-lang.c (objc_language_defn): Make extern.
4532 (_initialize_objc_language): Remove add_language call.
4533 * opencl-lang.c (opencl_language_defn): Make extern.
4534 (_initialize_opencl_language): Remove add_language call.
4535 * p-lang.c (pascal_language_defn): Make extern.
4536 (_initialize_pascal_language): Delete.
4537 * rust-lang.c (rust_language_defn): Make extern.
4538 (_initialize_rust_language): Delete.
4539 * utils.h (compare_cstrings): New static inline function.
4540
edb0c9cb
PA
45412017-07-20 Pedro Alves <palves@redhat.com>
4542
4543 * ada-lang.c (ada_to_fixed_type_1): Adjust.
4544 (get_var_value): Constify parameters.
4545 (get_int_var_value): Change prototype.
4546 (to_fixed_range_type): Adjust.
4547 * ada-lang.h (get_int_var_value): Change prototype.
4548
a778f165
PA
45492017-07-20 Pedro Alves <palves@redhat.com>
4550
4551 * dwarf2read.c (dw2_lookup_symbol): Use
4552 SYMBOL_MATCHES_SEARCH_NAME.
4553 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4554
42edd901
PA
45552017-07-20 Pedro Alves <palves@redhat.com>
4556
4557 * block.c (block_iter_name_step, block_iter_name_first)
4558 (block_iter_name_next): Delete.
4559 (block_lookup_symbol_primary): Adjust to use
4560 dict_iter_match_first/dict_iter_match_next.
4561 * block.h (block_iter_name_first, block_iter_name_next): Delete
4562 declarations.
4563 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4564 dict_iter_match_first/dict_iter_match_next.
4565
cf325299
PA
45662017-07-20 Pedro Alves <palves@redhat.com>
4567
4568 * cp-support.c (cp_find_first_component_aux): Add missing case for
4569 end of string.
4570
c5ed0576
DB
45712017-07-18 David Blaikie <dblaikie@gmail.com>
4572
4573 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4574 of dwo_cu's dwo_file.
4575
27841e76
YQ
45762017-07-18 Yao Qi <yao.qi@linaro.org>
4577
4578 * remote.c (store_registers_using_G): Remove one line comment.
4579
cfb7e58b
YQ
45802017-07-18 Yao Qi <yao.qi@linaro.org>
4581
4582 * regcache.c (regcache_cpy): Simplify it.
4583 (regcache::cpy_no_passthrough): Remove it.
4584 * regcache.h (cpy_no_passthrough): Remove it.
4585 (regcache_dup, regcache_cpy): Update comments.
4586
386535dd
PA
45872017-07-18 Pedro Alves <palves@redhat.com>
4588
4589 * remote-sim.c (sim_command_completer): Adjust to work with a
4590 completion_tracker instead of a VEC.
4591
c45ec17c
PA
45922017-07-17 Pedro Alves <palves@redhat.com>
4593
4594 * completer.c (complete_source_filenames): New function.
4595 (complete_address_and_linespec_locations): New function.
4596 (location_completer): Use complete_address_and_linespec_locations.
4597 (completion_tracker::build_completion_result): Honor the tracker's
4598 request to suppress append.
4599 * completer.h (completion_tracker::suppress_append_ws)
4600 (completion_tracker::set_suppress_append_ws): New methods.
4601 (completion_tracker::m_suppress_append_ws): New field.
4602 (complete_source_filenames): New declaration.
4603 * linespec.c (linespec_complete_what): New.
4604 (struct ls_parser) <complete_what, completion_word,
4605 completion_quote_char, completion_quote_end, completion_tracker>:
4606 New fields.
4607 (string_find_incomplete_keyword_at_end): New.
4608 (linespec_lexer_lex_string): Record quote char. If in completion
4609 mode, don't throw.
4610 (linespec_lexer_consume_token): Advance the completion word point.
4611 (linespec_lexer_peek_token): Save/restore completion info.
4612 (save_stream_and_consume_token): New.
4613 (set_completion_after_number): New.
4614 (linespec_parse_basic): Set what to complete next depending on
4615 token. Handle function and label completions specially.
4616 (parse_linespec): Disable objc shortcut in completion mode. Set
4617 what to complete next depending on token type. Skip keyword if in
4618 completion mode.
4619 (complete_linespec_component, linespec_complete): New.
4620 * linespec.h (linespec_complete): Declare.
4621
be966d42
PA
46222017-07-17 Pedro Alves <palves@redhat.com>
4623
4624 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4625 Handle 'operator<' / 'operator<<'.
4626
a2459270
PA
46272017-07-17 Pedro Alves <palves@redhat.com>
4628
4629 * completer.c (collect_explicit_location_matches): Handle
4630 MATCH_LABEL.
4631 (convert_explicit_location_to_linespec): New, factored out from
4632 ...
4633 (convert_explicit_location_to_sals): ... this.
4634 (complete_label): New.
4635 (linespec_complete_label, find_label_symbols_in_block): New.
4636 (find_label_symbols): Add completion_mode parameter and adjust to
4637 call find_label_symbols_in_block.
4638 * linespec.h (linespec_complete_label): Declare.
4639
c6756f62
PA
46402017-07-17 Pedro Alves <palves@redhat.com>
4641
4642 * ada-lang.c (ada_collect_symbol_completion_matches): Add
4643 complete_symbol_mode parameter.
4644 * cli/cli-cmds.c (complete_command): Get the completion result out
4645 of the handle_brkchars tracker if used a custom word point.
4646 * completer.c: Include "linespec.h".
4647 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4648 (advance_to_expression_complete_word_point): New.
4649 (completion_tracker::completes_to_completion_word): New.
4650 (complete_files_symbols): Pass down
4651 complete_symbol_mode::EXPRESSION.
4652 (explicit_options, probe_options): New.
4653 (collect_explicit_location_matches): Complete on the
4654 explictit_loc->foo instead of word. Use
4655 linespec_complete_function. Handle MATCH_LINE. Handle offering
4656 keyword and options completions.
4657 (backup_text_ptr): Delete.
4658 (skip_keyword): New.
4659 (complete_explicit_location): Remove 'word' parameter. Add
4660 language, quoted_arg_start and quoted_arg_end parameters.
4661 Rewrite, parsing left to right.
4662 (location_completer): Rewrite.
4663 (location_completer_handle_brkchars): New function.
4664 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4665 (enum complete_line_internal_reason): Adjust comments.
4666 (completion_tracker::discard_completions): New.
4667 (completer_handle_brkchars_func_for_completer): Handle
4668 location_completer.
4669 (gdb_custom_word_point_brkchars)
4670 (gdb_org_rl_basic_quote_characters): New.
4671 (gdb_completion_word_break_characters_throw)
4672 (completion_find_completion_word): Handle trackers that use a
4673 custom word point.
4674 (completion_tracker::advance_custom_word_point_by): New.
4675 (completion_tracker::build_completion_result): Don't rely on
4676 readline appending the quote char.
4677 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4678 use a custom word point.
4679 (gdb_rl_attempted_completion_function): Restore
4680 rl_basic_quote_characters.
4681 * completer.h (class completion_tracker): Extend intro comment.
4682 (completion_tracker::set_quote_char)
4683 (completion_tracker::quote_char)
4684 (completion_tracker::set_use_custom_word_point)
4685 (completion_tracker::use_custom_word_point)
4686 (completion_tracker::custom_word_point)
4687 (completion_tracker::set_custom_word_point)
4688 (completion_tracker::advance_custom_word_point_by)
4689 (completion_tracker::completes_to_completion_word)
4690 (completion_tracker::discard_completions): New methods.
4691 (completion_tracker::m_quote_char)
4692 (completion_tracker::m_use_custom_word_point)
4693 (completion_tracker::m_custom_word_point): New fields.
4694 (advance_to_expression_complete_word_point): Declare.
4695 * f-lang.c (f_collect_symbol_completion_matches): Add
4696 complete_symbol_mode parameter.
4697 * language.h (struct language_defn)
4698 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4699 parameter.
4700 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4701 (linespec_complete_function): New function.
4702 (linespec_lexer_lex_keyword): Adjust.
4703 * linespec.h (linespec_keywords, linespec_complete_function): New
4704 declarations.
4705 * location.c (find_end_quote): New function.
4706 (explicit_location_lex_one): Add explicit_completion_info
4707 parameter. Save quoting info. Don't throw if being called for
4708 completion. Don't handle Ada operators here.
4709 (is_cp_operator, skip_op_false_positives, first_of)
4710 (explicit_location_lex_one_function): New function.
4711 (string_to_explicit_location): Replace 'dont_throw' parameter with
4712 an explicit_completion_info pointer parameter. Handle it. Don't
4713 use explicit_location_lex_one to lex function names. Use
4714 explicit_location_lex_one_function instead.
4715 * location.h (struct explicit_completion_info): New.
4716 (string_to_explicit_location): Replace 'dont_throw' parameter with
4717 an explicit_completion_info pointer parameter.
4718 * symtab.c (default_collect_symbol_completion_matches_break_on):
4719 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4720 (default_collect_symbol_completion_matches)
4721 (collect_symbol_completion_matches): Add complete_symbol_mode
4722 parameter.
4723 (collect_symbol_completion_matches_type): Pass down
4724 complete_symbol_mode::EXPRESSION.
4725 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4726 parameter. Handle LINESPEC mode.
4727 * symtab.h (complete_symbol_mode): New.
4728 (default_collect_symbol_completion_matches_break_on)
4729 (default_collect_symbol_completion_matches)
4730 (collect_symbol_completion_matches)
4731 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4732 parameter.
4733
1d550c82
PA
47342017-07-17 Pedro Alves <palves@redhat.com>
4735
4736 * utils.c (enum class strncmp_iw_mode): New.
4737 (strcmp_iw): Rename to ...
4738 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4739 parameters. Handle them.
4740 (strncmp_iw): New.
4741 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4742 * utils.h (strncmp_iw): Declare.
4743 (strcmp_iw): Move describing comments here.
4744
8090b426
PA
47452017-07-17 Pedro Alves <palves@redhat.com>
4746
4747 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4748 CP_OPERATOR_STR.
4749 * c-typeprint.c (is_type_conversion_operator): Use
4750 CP_OPERATOR_STR.
4751 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4752 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4753 CP_OPERATOR_LEN.
4754 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4755 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4756 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4757 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4758 CP_OPERATOR_STR.
4759 * location.c: Include "cp-support.h".
4760 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4761 CP_OPERATOR_STR.
4762 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4763 CP_OPERATOR_LEN.
4764
6a2c1b87
PA
47652017-07-17 Pedro Alves <palves@redhat.com>
4766
4767 * cli/cli-cmds.c (complete_command): Use a completion tracker
4768 along with completion_find_completion_word for handle_brkchars
4769 phase.
4770 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4771 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4772 (struct gdb_rl_completion_word_info): New.
4773 (gdb_rl_find_completion_word): New.
4774 (completion_find_completion_word): New.
4775 * completer.h (completion_find_completion_word): Declare.
4776
eb3ff9a5
PA
47772017-07-17 Pedro Alves <palves@redhat.com>
4778
4779 * ada-lang.c (symbol_completion_match): Adjust comments.
4780 (symbol_completion_add): Replace vector parameter with
4781 completion_tracker parameter. Use it.
4782 (ada_make_symbol_completion_list): Rename to...
4783 (ada_collect_symbol_completion_matches): ... this. Add
4784 completion_tracker parameter and use it.
4785 (ada_language_defn): Adjust.
4786 * break-catch-syscall.c (catch_syscall_completer): Adjust
4787 prototype and work with completion_tracker instead of VEC.
4788 * breakpoint.c (condition_completer): Adjust prototype and work
4789 with completion_tracker instead of VEC.
4790 * c-lang.c (c_language_defn, cplus_language_defn)
4791 (asm_language_defn, minimal_language_defn): Adjust to renames.
4792 * cli/cli-cmds.c (complete_command): Rework using
4793 completion_tracker. Catch exceptions when completing.
4794 * cli/cli-decode.c (integer_unlimited_completer)
4795 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4796 with completion_tracker instead of VEC.
4797 * command.h (struct completion_tracker): Forward declare.
4798 (completer_ftype, completer_handle_brkchars_ftype): Change
4799 types.
4800 (complete_on_cmdlist, complete_on_enum): Adjust.
4801 * completer.c: Include <algorithm>.
4802 (struct gdb_completer_state): New.
4803 (current_completion): New global.
4804 (readline_line_completion_function): Delete.
4805 (noop_completer, filename_completer)
4806 (filename_completer_handle_brkchars, complete_files_symbols)
4807 (linespec_location_completer): Adjust to work with a
4808 completion_tracker instead of a VEC.
4809 (string_or_empty): New.
4810 (collect_explicit_location_matches): Adjust to work with a
4811 completion_tracker instead of a VEC.
4812 (explicit_location_completer): Rename to ...
4813 (complete_explicit_location): ... this and adjust to work with a
4814 completion_tracker instead of a VEC.
4815 (location_completer): Adjust to work with a completion_tracker
4816 instead of a VEC.
4817 (add_struct_fields): Adjust to work with a completion_list instead
4818 of VEC.
4819 (expression_completer): Rename to ...
4820 (complete_expression): ... this and adjust to work with a
4821 completion_tracker instead of a VEC. Use complete_files_symbols.
4822 (expression_completer): Reimplement on top of complete_expression.
4823 (symbol_completer): Adjust to work with a completion_tracker
4824 instead of a VEC.
4825 (enum complete_line_internal_reason): Add describing comments.
4826 (complete_line_internal_normal_command): Adjust to work with a
4827 completion_tracker instead of a VEC.
4828 (complete_line_internal): Rename to ...
4829 (complete_line_internal_1): ... this and adjust to work with a
4830 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4831 handle_brkchars phase.
4832 (new_completion_tracker): Delete.
4833 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4834 complete_line_internal_1.
4835 (free_completion_tracker): Delete.
4836 (INITIAL_COMPLETION_HTAB_SIZE): New.
4837 (completion_tracker::completion_tracker)
4838 (completion_tracker::~completion_tracker): New.
4839 (maybe_add_completion): Delete.
4840 (completion_tracker::maybe_add_completion)
4841 (completion_tracker::add_completion)
4842 (completion_tracker::add_completions): New.
4843 (throw_max_completions_reached_error): Delete.
4844 (complete_line): Adjust to work with a completion_tracker instead
4845 of a VEC. Don't create a completion_tracker_t or check for max
4846 completions here.
4847 (command_completer, command_completer_handle_brkchars)
4848 (signal_completer, reg_or_group_completer_1)
4849 (reg_or_group_completer, default_completer_handle_brkchars):
4850 Adjust to work with a completion_tracker.
4851 (gdb_completion_word_break_characters_throw): New.
4852 (gdb_completion_word_break_characters): Reimplement.
4853 (line_completion_function): Delete.
4854 (completion_tracker::recompute_lowest_common_denominator)
4855 (expand_preserving_ws)
4856 (completion_tracker::build_completion_result)
4857 (completion_result::completion_result)
4858 (completion_result::completion_result)
4859 (completion_result::~completion_result)
4860 (completion_result::completion_result)
4861 (completion_result::release_match_list, compare_cstrings)
4862 (completion_result::sort_match_list)
4863 (completion_result::reset_match_list)
4864 (gdb_rl_attempted_completion_function_throw)
4865 (gdb_rl_attempted_completion_function): New.
4866 * completer.h (completion_list, struct completion_result)
4867 (class completion_tracker): New.
4868 (complete_line): Add completion_tracker parameter.
4869 (readline_line_completion_function): Delete.
4870 (gdb_rl_attempted_completion_function): New.
4871 (noop_completer, filename_completer, expression_completer)
4872 (location_completer, symbol_completer, command_completer)
4873 (signal_completer, reg_or_group_completer): Update prototypes.
4874 (completion_tracker_t, new_completion_tracker)
4875 (make_cleanup_free_completion_tracker): Delete.
4876 (enum maybe_add_completion_enum): Delete.
4877 (maybe_add_completion): Delete.
4878 (throw_max_completions_reached_error): Delete.
4879 * corefile.c (complete_set_gnutarget): Adjust to work with a
4880 completion_tracker instead of a VEC.
4881 * cp-abi.c (cp_abi_completer): Adjust to work with a
4882 completion_tracker instead of a VEC.
4883 * d-lang.c (d_language_defn): Adjust.
4884 * disasm.c (disassembler_options_completer): Adjust to work with a
4885 completion_tracker instead of a VEC.
4886 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4887 (f_collect_symbol_completion_matches): ... this. Adjust to work
4888 with a completion_tracker instead of a VEC.
4889 (f_language_defn): Adjust.
4890 * go-lang.c (go_language_defn): Adjust.
4891 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4892 Adjust to work with a completion_tracker instead of a VEC.
4893 * infrun.c (handle_completer): Likewise.
4894 * interps.c (interpreter_completer): Likewise.
4895 * interps.h (interpreter_completer): Likewise.
4896 * language.c (unknown_language_defn, auto_language_defn)
4897 (local_language_defn): Adjust.
4898 * language.h (language_defn::la_make_symbol_completion_list):
4899 Rename to ...
4900 (language_defn::la_collect_symbol_completion_matches): ... this
4901 and adjust to work with a completion_tracker instead of a VEC.
4902 * m2-lang.c (m2_language_defn): Adjust.
4903 * objc-lang.c (objc_language_defn): Adjust.
4904 * opencl-lang.c (opencl_language_defn): Adjust.
4905 * p-lang.c (pascal_language_defn): Adjust.
4906 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4907 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4908 with a completion_tracker.
4909 * rust-lang.c (rust_language_defn): Adjust.
4910 * symtab.c (free_completion_list, do_free_completion_list)
4911 (return_val, completion_tracker): Delete.
4912 (completion_list_add_name, completion_list_add_symbol)
4913 (completion_list_add_msymbol, completion_list_objc_symbol)
4914 (completion_list_add_fields, add_symtab_completions): Add
4915 completion_tracker parameter and use it.
4916 (default_make_symbol_completion_list_break_on_1): Rename to...
4917 (default_collect_symbol_completion_matches_break_on): ... this.
4918 Add completion_tracker parameter and use it instead of allocating
4919 a completion tracker here.
4920 (default_make_symbol_completion_list_break_on): Delete old
4921 implementation.
4922 (default_make_symbol_completion_list): Delete.
4923 (default_collect_symbol_completion_matches): New.
4924 (make_symbol_completion_list): Delete.
4925 (collect_symbol_completion_matches): New.
4926 (make_symbol_completion_type): Rename to ...
4927 (collect_symbol_completion_matches_type): ... this. Add
4928 completion_tracker parameter and use it instead of VEC.
4929 (make_file_symbol_completion_list_1): Rename to...
4930 (collect_file_symbol_completion_matches): ... this. Add
4931 completion_tracker parameter and use it instead of VEC.
4932 (make_file_symbol_completion_list): Delete.
4933 (add_filename_to_list): Use completion_list instead of a VEC.
4934 (add_partial_filename_data::list): Now a completion_list.
4935 (make_source_files_completion_list): Work with a completion_list
4936 instead of a VEC.
4937 * symtab.h: Include "completer.h".
4938 (default_make_symbol_completion_list_break_on)
4939 (default_make_symbol_completion_list, make_symbol_completion_list)
4940 (make_symbol_completion_type, make_file_symbol_completion_list)
4941 (make_source_files_completion_list): Delete.
4942 (default_collect_symbol_completion_matches_break_on)
4943 (default_collect_symbol_completion_matches)
4944 (collect_symbol_completion_matches)
4945 (collect_symbol_completion_matches_type)
4946 (collect_file_symbol_completion_matches)
4947 (make_source_files_completion_list): New.
4948 * top.c (init_main): Don't install a rl_completion_entry_function
4949 hook. Install a rl_attempted_completion_function hook instead.
4950 * tui/tui-layout.c (layout_completer): Adjust to work with a
4951 completion_tracker.
4952 * tui/tui-regs.c (tui_reggroup_completer):
4953 * tui/tui-win.c (window_name_completer, focus_completer)
4954 (winheight_completer): Adjust to work with a completion_tracker.
4955 * value.c: Include "completer.h".
4956 (complete_internalvar): Adjust to work with a completion_tracker.
4957 * value.h (complete_internalvar): Likewise.
4958
6e1dbf8c
PA
49592017-07-17 Pedro Alves <palves@redhat.com>
4960
4961 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4962 renames.
4963 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4964 comments to completer_ftype's declaration.
4965 <completer_handle_brkchars>: Change type to
4966 completer_handle_brkchars_ftype.
4967 * command.h (completer_ftype): Add describing comment and give
4968 names to parameters.
4969 (completer_ftype_void): Rename to ...
4970 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4971 (set_cmd_completer_handle_brkchars): Adjust.
4972 * completer.c (filename_completer_handle_brkchars): New function.
4973 (complete_line_internal_normal_command): New function, factored
4974 out from ...
4975 (complete_line_internal): ... here.
4976 (command_completer_handle_brkchars)
4977 (default_completer_handle_brkchars)
4978 (completer_handle_brkchars_func_for_completer): New functions.
4979 * completer.h (set_gdb_completion_word_break_characters): Delete
4980 declaration.
4981 (completer_handle_brkchars_func_for_completer): New declaration.
4982 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4983 completer_handle_brkchars_func_for_completer.
4984
78b13106
PA
49852017-07-17 Pedro Alves <palves@redhat.com>
4986
4987 * completer.c (symbol_completer): New function, based on
4988 make_symbol_completion_list_fn.
4989 * completer.h (symbol_completer): New declaration.
4990 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4991 * python/py-cmd.c (completers): Adjust.
4992 * symtab.c (make_symbol_completion_list_fn): Delete.
4993 * symtab.h (make_symbol_completion_list_fn): Delete.
4994 * cli/cli-decode.c (add_cmd): Adjust.
4995
bbf2f4df
PA
49962017-07-17 Pedro Alves <palves@redhat.com>
4997
4998 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4999 * dwarf2read.c: Include "filename-seen-cache.h".
5000 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5001 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5002 * filename-seen-cache.c: New file.
5003 * filename-seen-cache.h: New file.
5004 * symtab.c: Include "filename-seen-cache.h".
5005 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5006 (create_filename_seen_cache, clear_filename_seen_cache)
5007 (delete_filename_seen_cache, filename_seen): Delete, parts moved
5008 to filename-seen-cache.h/filename-seen-cache.c.
5009 (output_source_filename, sources_info)
5010 (maybe_add_partial_symtab_filename)
5011 (make_source_files_completion_list): Adjust to use
5012 filename_seen_cache.
5013
330cdd98
PA
50142017-07-17 Pedro Alves <palves@redhat.com>
5015
5016 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5017 fields.
5018 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5019 dwarf2_debug_sections*)): New.
5020 (dwarf2_per_objfile::dwarf2_per_objfile(const
5021 dwarf2_per_objfile&)): Declare as deleted.
5022 (dwarf2_per_objfile::operator=): Declare as deleted.
5023 (dwarf2_per_objfile::dwarf2_per_objfile)
5024 (dwarf2_per_objfile::~dwarf2_per_objfile)
5025 (dwarf2_per_objfile::free_cached_comp_units): New.
5026 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5027 ctor. Call dwarf2_per_objfile's ctor manually.
5028 (dwarf2_locate_sections): Deleted/refactored as ...
5029 (dwarf2_per_objfile::locate_sections): ... this new method.
5030 (free_cached_comp_units): Defer to
5031 dwarf2_per_objfile::free_cached_comp_units.
5032 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5033
8880f2a9
TT
50342017-07-14 Tom Tromey <tom@tromey.com>
5035
5036 PR rust/21764:
5037 * rust-exp.y (convert_ast_to_expression): Add "want_type"
5038 parameter.
5039 <UNOP_SIZEOF>: Split into separate case.
5040 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
5041
65547233
TT
50422017-07-14 Tom Tromey <tom@tromey.com>
5043
5044 PR rust/21763:
5045 * symtab.c (symbol_matches_domain): Add language_rust to special
5046 case.
5047 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5048 treat LOC_TYPEDEF symbols as variables.
5049
8f14146e
PA
50502017-07-14 Pedro Alves <palves@redhat.com>
5051
5052 * symtab.c (make_file_symbol_completion_list_1): Iterate over
5053 symtabs matching all symtabs with SRCFILE as file name instead of
5054 only considering the first hit, with lookup_symtab.
5055
2347965c
SM
50562017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5057
5058 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5059 operator_name parameters.
5060 (gen_expr): Update function call.
5061
40f4af28
SM
50622017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5063
5064 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5065 parameter.
5066 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5067 Likewise.
5068 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5069 parameter, use agent_expr::gdbarch instead, update function
5070 calls.
5071 (locexpr_tracepoint_var_ref): Likewise.
5072 (loclist_tracepoint_var_ref): Likewise.
5073 * ax-gdb.c (gen_trace_static_fields): Likewise.
5074 (gen_traced_pop): Likewise.
5075 (gen_frame_args_address): Likewise.
5076 (gen_frame_locals_address): Likewise.
5077 (gen_var_ref): Likewise.
5078 (gen_struct_ref_recursive): Likewise.
5079 (gen_static_field): Likewise.
5080 (gen_maybe_namespace_elt): Likewise.
5081 (gen_expr): Likewise.
5082 (gen_trace_for_var): Likewise.
5083 (gen_trace_for_expr): Likewise.
5084 (gen_trace_for_return_address): Likewise.
5085
053f8057
SM
50862017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5087
5088 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5089 parameter.
5090 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5091
6661ad48
SM
50922017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5093
5094 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5095 from ax, update calls.
5096 (gen_usual_arithmetic): Likewise.
5097 (gen_integral_promotions): Likewise.
5098 (gen_bitfield_ref): Likewise.
5099 (gen_primitive_field): Likewise.
5100 (gen_struct_ref_recursive): Likewise.
5101 (gen_struct_ref): Likewise.
5102 (gen_maybe_namespace_elt): Likewise.
5103 (gen_struct_elt_for_reference): Likewise.
5104 (gen_namespace_elt): Likewise.
5105 (gen_aggregate_elt_ref): Likewise.
5106 (gen_expr): Get gdbarch from ax, update calls.
5107 (gen_expr_binop_rest): Likewise.
5108
c55a47e7
PA
51092017-07-13 Pedro Alves <palves@redhat.com>
5110
5111 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5112 as default tdesc.
5113 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5114 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5115 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5116 tdesc_amd64_linux as default tdesc. Get final tdesc from the
5117 tdep.
5118 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5119 Get final tdesc from the tdep.
5120 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5121 default tdesc.
5122 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5123 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5124 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5125 Use it as default tdesc.
5126 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5127 down to amd_init_abi. No longer handle fallback tdesc here.
5128 * amd64-tdep.h (tdesc_x32): Declare.
5129 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5130 parameter.
5131 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5132 as default tdesc.
5133
55efceab
AA
51342017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5135
5136 * s390-linux-tdep.c (s390_process_record): Add support for
5137 instructions new in arch12.
5138
0aa37b65
JB
51392017-07-11 John Baldwin <jhb@FreeBSD.org>
5140
5141 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5142 PT_GETFSBASE and PT_GETGSBASE.
5143 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5144 PT_SETGSBASE.
5145
48aeef91
JB
51462017-07-11 John Baldwin <jhb@FreeBSD.org>
5147
5148 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5149 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5150 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5151 those rules.
5152 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5153 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5154 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5155 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5156 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5157 * features/i386/amd64.xml: Add 64bit-segments.xml.
5158 * features/i386/amd64-avx-avx512.c: Regenerated.
5159 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5160 * features/i386/amd64-avx-mpx.c: Regenerated.
5161 * features/i386/amd64-avx.c: Regenerated.
5162 * features/i386/amd64-mpx.c: Regenerated.
5163 * features/i386/amd64.c: Regenerated.
5164 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5165 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5166 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5167 * regformats/i386/amd64-avx.dat: Regenerated.
5168 * regformats/i386/amd64-mpx.dat: Regenerated.
5169 * regformats/i386/amd64.dat: Regenerated.
5170
77c501bc
YQ
51712017-07-10 Yao Qi <yao.qi@linaro.org>
5172
5173 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5174 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5175
6dc8d757
AK
51762017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
5177
5178 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5179 unsetenv.
5180 * gnulib/aclocal.m4: Regenerate.
5181 * gnulib/config.in: Regenerate.
5182 * gnulib/configure: Regenerate.
5183 * gnulib/import/Makefile.am: Regenerate.
5184 * gnulib/import/Makefile.in: Regenerate.
5185 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5186 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5187 * gnulib/import/m4/environ.m4: New file.
5188 * gnulib/import/m4/setenv.m4: New file.
5189 * gnulib/import/setenv.c: New file.
5190 * gnulib/import/unsetenv.c: New file.
5191
266934d1
SM
51922017-07-09 Simon Marchi <simon.marchi@ericsson.com>
5193
5194 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5195 address when op is DW_OP_addr.
5196
03278692
TT
51972017-07-09 Tom Tromey <tom@tromey.com>
5198
5199 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5200 check and apply to outer type.
5201
4b654465
JB
52022017-07-07 John Baldwin <jhb@FreeBSD.org>
5203
5204 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5205 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5206 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5207 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5208
2af9fc44
JB
52092017-07-07 John Baldwin <jhb@FreeBSD.org>
5210
5211 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5212
382b69bb
JB
52132017-07-07 John Baldwin <jhb@FreeBSD.org>
5214
5215 * corelow.c (get_core_siginfo): Remove.
5216 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5217 instead of get_core_siginfo.
5218 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5219 * gdbarch.h: Re-generate.
5220 * gdbarch.c: Re-generate.
5221 * linux-tdep.c (linux_core_xfer_siginfo): New.
5222 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5223
6e5eab33
JB
52242017-07-07 John Baldwin <jhb@FreeBSD.org>
5225
5226 * corelow.c (thread_section_name): Move to ...
5227 * gdbcore.h (thread_section_name): ... here.
5228
929edea9
JB
52292017-07-07 John Baldwin <jhb@FreeBSD.org>
5230
5231 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5232 (struct siginfo32): New.
5233 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5234 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5235 via ptrace(PT_LWPINFO).
5236
762c974a
JB
52372017-07-07 John Baldwin <jhb@FreeBSD.org>
5238
5239 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5240 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5241 (fbsd_get_siginfo_type): New.
5242 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5243 (_initialize_fbsd_tdep): New.
5244
33c5cd75
DB
52452017-07-06 David Blaikie <dblaikie@gmail.com>
5246
5247 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5248 a singular dwo_unit*) to support multiple CUs in the same way that
5249 multiple TUs are supported.
5250 (create_cus_hash_table): Replace create_dwo_cu with a function for
5251 parsing multiple CUs from a DWO file.
5252 (open_and_init_dwo_file): Use create_cus_hash_table rather than
5253 create_dwo_cu.
5254 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5255 htab_find, rather than comparing the signature to a singleton CU in
5256 the dwo_file.
5257
8455d262
PA
52582017-07-06 Pedro Alves <palves@redhat.com>
5259
5260 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5261
4da3eb35
PA
52622017-07-04 Pedro Alves <palves@redhat.com>
5263
5264 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5265 * gdbtypes.h (TYPE_STATIC): Delete.
5266 (struct fn_field) <is_public, is_abstract, is_static, is_final,
5267 is_synchronized, is_native>: Delete.
5268 <dummy>: Bump.
5269 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5270 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5271 (TYPE_FN_FIELD_ABSTRACT): Delete.
5272
5bfd255c
SM
52732017-07-03 Simon Marchi <simon.marchi@ericsson.com>
5274
5275 * buffer.h (buffer_finish): Fix spelling mistakes.
5276
25c54127
EZ
52772017-07-01 Eli Zaretskii <eliz@gnu.org>
5278
5279 * .dir-locals.el: Automatically switch to C-style comments in
5280 versions of Emacs that support the feature.
5281
dc4bde35
SDJ
52822017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5283 Pedro Alves <palves@redhat.com>
5284
5285 PR cli/21688
5286 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5287 (process_next_line): New variable 'inline_cmd'.
5288 Adjust 'if' clauses for "python", "compile" and "guile" to use
5289 'command_name_equals' and check for '!inline_cmd'.
5290
51ed89aa
SDJ
52912017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5292
5293 PR cli/21688
5294 * cli/cli-script.c (command_name_equals_not_inline): New function.
5295 (process_next_line): Adjust 'if' clauses for "python", "compile"
5296 and "guile" to use command_name_equals_not_inline.
5297
eb17d413
PA
52982017-06-29 Pedro Alves <palves@redhat.com>
5299
5300 * completer.c (expression_completer): Call
5301 linespec_location_completer instead of location_completer.
5302
195bcdd5
PA
53032017-06-29 Pedro Alves <palves@redhat.com>
5304
5305 * completer.c (expression_completer): Remove code that recomputes
5306 'text' from 'word'.
5307
adc764e7
YQ
53082017-06-29 Yao Qi <yao.qi@linaro.org>
5309
5310 * regformats/regdat.sh: Generate code with
5311 "ifndef IN_PROCESS_AGENT".
5312
6e75794e
PA
53132017-06-28 Pedro Alves <palves@redhat.com>
5314
5315 * command.h: Include "common/scoped_restore.h".
5316
bc491f2e
YQ
53172017-06-28 Yao Qi <yao.qi@linaro.org>
5318
5319 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5320 instead of obstack_grow.
5321
41664b45
DG
53222017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
5323
5324 PR gdb/21337
5325 * symfile.c (reread_symbols): Call objfiles_changed just before
5326 read_symbols.
5327
6da67eb1
PA
53282017-06-27 Pedro Alves <palves@redhat.com>
5329
5330 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5331 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5332 (completion_list_add_symbol, completion_list_add_msymbol):
5333 ... these new functions.
5334 (add_symtab_completions)
5335 (default_make_symbol_completion_list_break_on_1): Adjust.
5336
23732b1e
PA
53372017-06-27 Pedro Alves <palves@redhat.com>
5338
5339 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5340 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
5341 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5342 dtor.
5343 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
5344 'storage_obstack' field an auto_obstack. In-class initialize all
5345 non-bitfield fields. Make minsyms_read bool.
5346 * symfile.c (read_symbols): Adjust.
5347
a4d1e79a
AH
53482017-06-27 Alan Hayward <alan.hayward@arm.com>
5349
5350 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5351 (gdbsim_store_register): Likewise.
5352
8268c778
PA
53532017-06-27 Pedro Alves <palves@redhat.com>
5354
5355 * c-exp.y (name_obstack): Now an auto_obstack.
5356 (yylex): Use auto_obstack::clear.
5357 (c_parse): Use auto_obstack::clear instead of reinitializing and
5358 freeing the obstack.
5359 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5360 * d-exp.y (name_obstack): Now an auto_obstack.
5361 (yylex): Use auto_obstack::clear.
5362 (d_parse): Use auto_obstack::clear instead of reinitializing and
5363 freeing the obstack.
5364 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5365 auto_obstack.
5366 * dwarf2read.c (create_addrmap_from_index)
5367 (dwarf2_build_psymtabs_hard)
5368 (update_enumeration_type_from_children): Likewise.
5369 * gdb_obstack.h (auto_obstack): New type.
5370 * go-exp.y (name_obstack): Now an auto_obstack.
5371 (build_packaged_name): Use auto_obstack::clear.
5372 (go_parse): Use auto_obstack::clear instead of reinitializing and
5373 freeing the obstack.
5374 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5375 auto_obstack.
5376 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5377 * rust-exp.y (work_obstack): Now an auto_obstack.
5378 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5379 reinitializing and freeing the obstack.
5380 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5381 (host_char_to_target): Use auto_obstack.
5382 * utils.h (make_cleanup_obstack_free): Delete declaration.
5383 * valprint.c (generic_emit_char, generic_printstr): Use
5384 auto_obstack.
5385
db665f42
SM
53862017-06-27 Simon Marchi <simon.marchi@ericsson.com>
5387
5388 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5389 thread.
5390 (darwin_init_thread_list): Don't update dummy thread.
5391 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5392
873c0814
SM
53932017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5394
5395 * record-full.c (netorder16): Remove.
5396
8b5a7a6e
SM
53972017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5398
5399 * common/diagnostics.h: Define macros for GCC.
5400 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5401 * common/vec.h: Include diagnostics.h.
5402 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5403 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5404 warning.
5405
d1435379
SM
54062017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5407
5408 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5409 New macro.
5410 * ada-lex.l: Ignore deprecated register warnings.
5411
cc75e0fd
SM
54122017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5413
5414 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5415 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5416
07809eaf
SM
54172017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5418
5419 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5420 its own line.
5421
f076f034
SM
54222017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5423
5424 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5425
0dd5cbc5
AH
54262017-06-23 Alan Hayward <alan.hayward@arm.com>
5427
5428 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5429 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5430 (xtensa_register_read_masked): Likewise.
5431
d4c6ce5b
SDJ
54322017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
5433
5434 * common/environ.c (gdb_environ::unset): Update comment.
5435
16892a03
AH
54362017-06-22 Alan Hayward <alan.hayward@arm.com>
5437
5438 * python/py-unwind.c (pyuw_sniffer): Allocate space for
5439 registers.
5440
d7dcbefc
AH
54412017-06-22 Alan Hayward <alan.hayward@arm.com>
5442
5443 * record-full.c (record_full_exec_insn): Use byte_vector.
5444
b30ff123
YQ
54452017-06-22 Yao Qi <yao.qi@linaro.org>
5446
5447 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5448 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5449
4fa847d7
AH
54502017-06-22 Alan Hayward <alan.hayward@arm.com>
5451
5452 * remote.c (cached_reg): Move from here...
5453 * regcache.h (cached_reg): ...to here.
5454 * python/py-unwind.c (struct reg_info): Remove.
5455 (cached_frame_info): Use cached_reg_t.
5456 (pyuw_prev_register): Likewise.
5457 (pyuw_sniffer): Use cached_reg_t and allocate registers.
5458 (pyuw_dealloc_cache): Free all registers.
5459
f4906a9a
PA
54602017-06-22 Pedro Alves <palves@redhat.com>
5461 Simon Marchi <simon.marchi@ericsson.com>
5462
5463 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5464 warning.
5465 * common/diagnostics.h: New file.
5466
b45a1208
PA
54672017-06-22 Pedro Alves <palves@redhat.com>
5468
5469 * common/agent.h: Add include guards.
5470
e4da2c61
SM
54712017-06-21 Simon Marchi <simon.marchi@ericsson.com>
5472
5473 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5474 talk about addressable units instead of bytes.
5475
96160d60
SDJ
54762017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5477
5478 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5479 of '::const_iterator'.
5480
9a6c7d9c
SDJ
54812017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5482
5483 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5484 'unittests/environ-selftests.c'.
5485 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5486 * charset.c (find_charset_names): Declare object 'iconv_env'.
5487 Update code to use 'iconv_env' object. Remove call to
5488 'free_environ'.
5489 * common/environ.c: Include <utility>.
5490 (make_environ): Delete function.
5491 (free_environ): Delete function.
5492 (gdb_environ::clear): New function.
5493 (gdb_environ::operator=): New function.
5494 (gdb_environ::get): Likewise.
5495 (environ_vector): Delete function.
5496 (set_in_environ): Delete function.
5497 (gdb_environ::set): New function.
5498 (unset_in_environ): Delete function.
5499 (gdb_environ::unset): New function.
5500 (gdb_environ::envp): Likewise.
5501 * common/environ.h: Include <vector>.
5502 (struct gdb_environ): Delete; transform into...
5503 (class gdb_environ): ... this class.
5504 (free_environ): Delete prototype.
5505 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5506 environ_vector): Likewise.
5507 * infcmd.c (run_command_1): Update code to call
5508 'envp' from 'gdb_environ' class.
5509 (environment_info): Update code to call methods from 'gdb_environ'
5510 class.
5511 (unset_environment_command): Likewise.
5512 (path_info): Likewise.
5513 (path_command): Likewise.
5514 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5515 (inferior::inferior): Initialize 'environment' using the host's
5516 information.
5517 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5518 Include "environ.h".
5519 (class inferior) <environment>: Change type from 'struct
5520 gdb_environ' to 'gdb_environ'.
5521 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5522 methods from 'gdb_environ' class.
5523 * solib.c (solib_find_1): Likewise
5524 * unittests/environ-selftests.c: New file.
5525
75c554cf
YQ
55262017-06-20 Yao Qi <yao.qi@linaro.org>
5527
5528 * features/i386/i386-linux.xml: Exchange the order of including
5529 32bit-linux.xml and 32bit-sse.xml.
5530 * features/i386/i386-linux.c: Regenerated.
5531
72ddacb7
YQ
55322017-06-20 Yao Qi <yao.qi@linaro.org>
5533
5534 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5535 Delete copy ctor and assignment operator.
5536 (tdesc_type): Likewise.
5537 (tdesc_feature): Likewise.
5538 (tdesc_free_reg): Remove.
5539 (tdesc_create_reg): Use new.
5540 (tdesc_free_type): Remove.
5541 (tdesc_create_vector): Use new.
5542 (tdesc_create_union): Likewise.
5543 (tdesc_create_flags): Likewise.
5544 (tdesc_create_enum): Likewise.
5545 (tdesc_free_feature): Delete.
5546 (free_target_description): Use delete.
5547
325c9fd4
JB
55482017-06-19 John Baldwin <jhb@FreeBSD.org>
5549
5550 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5551 registers.
5552
16b7a719
PA
55532017-06-19 Pedro Alves <palves@redhat.com>
5554
5555 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5556 after gdb::unlinker.
5557
1c8e01c9
SDJ
55582017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
5559
5560 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5561 gdb_environ to access an environment variable.
5562
ffce45d2
TP
55632017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5564
5565 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5566 gdb_byte*.
5567
1d4fbac9
SM
55682017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5569
5570 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5571
8465943a
SM
55722017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5573
5574 * configure: Re-generate.
5575 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5576
3e019bdc
SM
55772017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5578
5579 * configure: Re-generate.
5580 * warning.m4: Pass -Werror to compiler when checking for
5581 supported warning flags.
5582
cf0dd6f0
SM
55832017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5584
5585 * Makefile.in (COMPILE.pre): Add "-x c++".
5586
6f98355c
YQ
55872017-06-16 Alan Hayward <alan.hayward@arm.com>
5588 Pedro Alves <palves@redhat.com>
5589 Yao Qi <yao.qi@linaro.org>
5590
5591 * defs.h (RequireLongest): New.
5592 (extract_integer): Declare function template.
5593 (extract_signed_integer): Remove the declaration, but define it
5594 static inline.
5595 (extract_unsigned_integer): Likewise.
5596 (store_integer): Declare function template.
5597 (store_signed_integer): Remove the declaration, but define it
5598 static inline.
5599 (store_unsigned_integer): Likewise.
5600 * findvar.c (extract_integer): New function template.
5601 (extract_signed_integer): Remove.
5602 (extract_unsigned_integer): Remove.
5603 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5604 instantiations.
5605 (store_integer): New function template.
5606 (store_signed_integer): Remove.
5607 (store_unsigned_integer): Remove.
5608 (store_integer): Explicit instantiations.
5609 * regcache.c (regcache_raw_read_signed): Update.
5610 (regcache::raw_read): New function.
5611 (regcache::raw_read_signed): Remove.
5612 (regcache::raw_read_unsigned): Remove.
5613 (regcache_raw_read_unsigned): Update.
5614 (regcache_raw_write_unsigned): Update.
5615 (regcache::raw_write_signed): Remove.
5616 (regcache::raw_write): New function.
5617 (regcache_cooked_read_signed): Update.
5618 (regcache::raw_write_unsigned): Remove.
5619 (regcache::cooked_read_signed): Remove.
5620 (regcache_cooked_read_unsigned): Update.
5621 (regcache::cooked_read_unsigned): Remove.
5622 (regcache_cooked_write_signed): Update.
5623 (regcache_cooked_write_unsigned): Update.
5624 * regcache.h (regcache) <raw_read_signed>: Remove.
5625 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5626 <raw_read, raw_write>: New.
5627 <cooked_read_signed, cooked_write_signed>: Remove.
5628 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5629 <cooked_read, cooked_write>: New.
5630 * sh64-tdep.c (sh64_pseudo_register_read): Update.
5631 (sh64_pseudo_register_write): Update.
5632
a87dc45a
AK
56332017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
5634
5635 * arc-tdep.c (arc_disassembler_options): New variable.
5636 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5637 of default_print_insn.
5638 (arc_delayed_print_insn): Set info->section when needed,
5639 use default_print_insn to retrieve a disassembler.
5640
45159d6a
SDJ
56412017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
5642
5643 PR gdb/21574
5644 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5645 to mention $SHELL and startup-with-shell.
5646
b46c4cf0
MF
56472017-06-14 Max Filippov <jcmvbkbc@gmail.com>
5648
5649 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5650
6394c606
YQ
56512017-06-14 Yao Qi <yao.qi@linaro.org>
5652
5653 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5654 default_print_insn instead of print_insn_aarch64.
5655 * arm-tdep.c (gdb_print_insn_arm): Call
5656 default_print_insn instead of print_insn_big_arm
5657 and print_insn_little_arm.
5658 * i386-tdep.c (i386_print_insn): Call default_print_insn
5659 instead of print_insn_i386.
5660 * ia64-tdep.c (ia64_print_insn): Call
5661 default_print_insn instead of print_insn_ia64.
5662 * mips-tdep.c (gdb_print_insn_mips): Call
5663 default_print_insn instead of print_insn_big_mips
5664 and print_insn_little_mips.
5665 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5666 instead of print_insn_spu.
5667
d5722aa2
PA
56682017-06-14 Pedro Alves <palves@redhat.com>
5669
5670 * ada-lang.c: Include "common/byte-vector.h".
5671 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5672 * charset.c (wchar_iterator::iterate): Resize the vector instead
5673 of reserving it.
5674 * common/byte-vector.h: Include "common/def-vector.h".
5675 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5676 * cli/cli-dump.c: Include "common/byte-vector.h".
5677 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5678 * common/byte-vector.h: New file.
5679 * common/def-vector.h: New file.
5680 * common/default-init-alloc.h: New file.
5681 * dwarf2loc.c: Include "common/byte-vector.h".
5682 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5683 instead of reserving it.
5684 * dwarf2read.c: Include "common/byte-vector.h".
5685 (data_buf::m_vec): Now a gdb::byte_vector.
5686 * gdb_regex.c: Include "common/def-vector.h".
5687 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5688 * mi/mi-main.c: Include "common/byte-vector.h".
5689 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5690 * printcmd.c: Include "common/byte-vector.h".
5691 (print_scalar_formatted): Use gdb::byte_vector.
5692 * valprint.c: Include "common/byte-vector.h".
5693 (maybe_negate_by_bytes, print_decimal_chars): Use
5694 gdb::byte_vector.
5695
01ec7a27
SM
56962017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5697
5698 * darwin-nat.c: Include "nat/fork-inferior.h".
5699
848d9074
SM
57002017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5701
5702 * configure.nat: Factor out Darwin bits that are not
5703 architecture-specific. Add fork-inferior.o.
5704
3b912944
SM
57052017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5706
5707 * configure.nat: Factor out AIX bits that are not
5708 architecture-specific. Add fork-inferior.o.
5709
55acdf22
AA
57102017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5711
5712 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5713 (read_pieced_value, write_pieced_value): ...here. Reduce to
5714 wrappers that just call rw_pieced_value.
5715
f65e2044
AA
57162017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5717
5718 * dwarf2loc.c (write_pieced_value): When writing the data for a
5719 memory piece, use write_memory_with_notification instead of
5720 write_memory.
5721
23f945bf
AA
57222017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5723
5724 * valops.c (read_value_memory): Change embedded_offset to
5725 represent a bit offset instead of a byte offset.
5726 * value.h (read_value_memory): Adjust comment.
5727
f236533e
AA
57282017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5729
5730 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5731 dest_offset_bits and source_offset_bits.
5732 (write_pieced_value): Likewise.
5733
65d84b76
AA
57342017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5735
5736 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5737 given by DW_OP_bit_piece.
5738 (write_pieced_value): Likewise.
5739
242d31ab
AA
57402017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5741
5742 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5743 some other preparations to the places where sufficient information
5744 is available.
5745 (write_pieced_value): Likewise.
5746
03c8af18
AA
57472017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5748
5749 * dwarf2loc.c (bits_to_bytes): New function.
5750 (read_pieced_value): Fix offset calculations for register pieces
5751 on big-endian targets.
5752 (write_pieced_value): Likewise.
5753
840989c1
AA
57542017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5755
5756 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5757 (write_pieced_value): Likewise.
5758
359b19bb
AA
57592017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5760
5761 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5762 transfer the source value's least significant bits, instead of its
5763 lowest-addressed ones. Rename type_len to max_offset.
5764 (read_pieced_value): Mirror above changes to write_pieced_value as
5765 applicable.
5766
07c9ca3b
AA
57672017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5768
5769 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5770 truncate full bytes from dest_offset_bits before using it as an
5771 offset into the buffer.
5772
f1cc9874
AA
57732017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5774
5775 * dwarf2loc.c (write_pieced_value): Include transfer size in
5776 byte-wise check.
5777
cdaac320
AA
57782017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5779
5780 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5781 calculation of this_size.
5782
af547a96
AA
57832017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5784
5785 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5786 when targeting a bit-field.
5787 (write_pieced_value): Likewise.
5788
ddd7882a
AA
57892017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5790
5791 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5792 (allocate_piece_closure): Drop addr_size parameter.
5793 (dwarf2_evaluate_loc_desc_full): Adjust call to
5794 allocate_piece_closure.
5795
e9352324
AA
57962017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5797
5798 PR gdb/21226
5799 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5800 the LSB end, independent of endianness.
5801
d5d1163e
AA
58022017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5803
5804 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5805 size capping.
5806
032bb6ea
YQ
58072017-06-13 Yao Qi <yao.qi@linaro.org>
5808
5809 * mips-linux-nat.c: Move include features/mips*-linux.c to
5810 mips-linux-tdep.c.
5811 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5812 to mips-linux-tdep.c.
5813 * mips-linux-tdep.c: Include features/mips*-linux.c
5814 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5815 functions.
5816 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5817 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5818 (tdesc_mips64_dsp_linux): Declare.
5819
f12f6bad
TT
58202017-06-12 Tom Tromey <tom@tromey.com>
5821
5822 * valprint.h (val_print_type_code_int): Remove.
5823 * valprint.c (generic_val_print_int): Always call
5824 val_print_scalar_formatted.
5825 (val_print_type_code_int): Remove.
5826 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5827 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5828 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5829 * ada-valprint.c (ada_val_print_num): Use
5830 val_print_scalar_formatted.
5831
d9109c80
TT
58322017-06-12 Tom Tromey <tom@tromey.com>
5833
5834 * printcmd.c (print_scalar_formatted): Unify the two switches.
5835 Don't convert scalars to LONGEST.
5836
4ac0cb1c
TT
58372017-06-12 Tom Tromey <tom@tromey.com>
5838
5839 PR exp/16225:
5840 * valprint.h (print_decimal_chars): Update.
5841 * valprint.c (maybe_negate_by_bytes): New function.
5842 (print_decimal_chars): Add "is_signed" argument.
5843 * printcmd.c (print_scalar_formatted): Update.
5844
30a25466
TT
58452017-06-12 Tom Tromey <tom@tromey.com>
5846
5847 PR exp/16225:
5848 * valprint.h (print_binary_chars, print_hex_chars): Update.
5849 * valprint.c (val_print_type_code_int): Update.
5850 (print_binary_chars): Add "zero_pad" argument.
5851 (emit_octal_digit): New function.
5852 (print_octal_chars): Don't zero-pad.
5853 (print_decimal_chars): Likewise.
5854 (print_hex_chars): Add "zero_pad" argument.
5855 * sh64-tdep.c (sh64_do_fp_register): Update.
5856 * regcache.c (regcache::dump): Update.
5857 * printcmd.c (print_scalar_formatted): Update.
5858 * infcmd.c (default_print_one_register_info): Update.
5859
b3464d03
PA
58602017-06-12 Pedro Alves <palves@redhat.com>
5861 Alan Hayward <alan.hayward@arm.com>
5862
5863 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5864 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5865 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5866 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5867 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5868
4b76cda9
PA
58692017-06-12 Pedro Alves <palves@redhat.com>
5870
5871 * dwarf2read.c (mapped_symtab::data): Now a vector of
5872 symtab_index_entry instead of vector of
5873 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5874 whether an element's name is NULL instead of checking whether the
5875 element itself is NULL.
5876 (find_slot): Change return type. Adjust.
5877 (hash_expand, , add_index_entry, uniquify_cu_indices)
5878 (write_hash_table): Adjust.
5879
e8f8bcb3
PA
58802017-06-12 Pedro Alves <palves@redhat.com>
5881
5882 * dwarf2read.c (recursively_count_psymbols): New function.
5883 (write_psymtabs_to_index): Call it to compute number of psyms and
5884 pass estimate size of psyms_seen to unordered_set's ctor.
5885
70a1152b
PA
58862017-06-12 Pedro Alves <palves@redhat.com>
5887
5888 * dwarf2read.c (write_hash_table): Check if key already exists
5889 before emplacing.
5890
c2f134ac
PA
58912017-06-12 Pedro Alves <palves@redhat.com>
5892
5893 * dwarf2read.c (data_buf::append_space): Rename to...
5894 (data_buf::grow): ... this, and make private. Adjust all callers.
5895 (data_buf::append_uint): New method.
5896 (add_address_entry, write_one_signatured_type)
5897 (write_psymtabs_to_index): Use it.
5898
a81e6d4d
PA
58992017-06-12 Pedro Alves <palves@redhat.com>
5900
5901 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5902 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5903 (data_buf::file_write): Call ::fwrite directly.
5904
6fd931f2
PA
59052017-06-12 Pedro Alves <palves@redhat.com>
5906
5907 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5908 std::vector::erase.
5909
bc8f2430
JK
59102017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5911
5912 Code cleanup: C++ify .gdb_index producer.
5913 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5914 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5915 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5916 (create_strtab, add_string): Remove.
5917 (file_write, data_buf): New.
5918 (struct symtab_index_entry): Use std::vector for cu_indices.
5919 (struct mapped_symtab): Use std::vector for data.
5920 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5921 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5922 Remove.
5923 (find_slot): Change return type. Update it to the new data structures.
5924 (hash_expand, add_index_entry): Update it to the new data structures.
5925 (offset_type_compare): Remove.
5926 (uniquify_cu_indices): Update it to the new data structures.
5927 (c_str_view, c_str_view_hasher, vector_hasher): New.
5928 (add_indices_to_cpool): Remove.
5929 (write_hash_table): Update it to the new data structures.
5930 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5931 (eq_psymtab_cu_index): Remove.
5932 (psym_index_map): New typedef.
5933 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5934 reference and std::unordered_map for cu_index_htab.
5935 (add_address_entry, add_address_entry_worker, write_address_map)
5936 (write_psymbols): Update it to the new data structures.
5937 (write_obstack): Remove.
5938 (struct signatured_type_index_data): Change types_list to a data_buf
5939 reference and psyms_seen to a std::unordered_set reference.
5940 (write_one_signatured_type, recursively_write_psymbols)
5941 (write_psymtabs_to_index): Update it to the new data structures.
5942
c4dcb155
SM
59432017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5944
5945 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5946 separate-debug-file commands.
5947 * symfile.h (separate_debug_file_debug): New global.
5948 * symfile.c (separate_debug_file_debug): New global.
5949 (separate_debug_file_exists, find_separate_debug_file): Add
5950 debug output.
5951 (_initialize_symfile): Add "set debug separate-debug-file"
5952 command.
5953 * build-id.c (build_id_to_debug_bfd,
5954 find_separate_debug_file_by_buildid): Add debug output.
5955
6d45d4b4
SM
59562017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5957
5958 * gdbarch.sh (displaced_step_free_closure): Remove.
5959 * gdbarch.h, gdbarch.c: Re-generate.
5960 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5961 displaced_step_free_closure.
5962 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5963 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5964 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5965 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5966 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5967 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5968 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5969 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5970 * infrun.c (displaced_step_clear): Call xfree instead of
5971 gdbarch_displaced_step_free_closure.
5972
2f91880f
SDJ
59732017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5974
5975 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5976 NULL".
5977
b8b6e72f
AH
59782017-06-08 Alan Hayward <alan.hayward@arm.com>
5979
5980 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5981 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5982 (mn10300_push_dummy_call): Likewise.
5983
5369082e
AH
59842017-06-08 Alan Hayward <alan.hayward@arm.com>
5985
5986 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5987
ff4ca5ac
AH
59882017-06-08 Alan Hayward <alan.hayward@arm.com>
5989
5990 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5991
aefd8b33
SDJ
59922017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5993
5994 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5995 able to start inferiors using a shell.
5996 (New remote packets): Announce new packet "QStartupWithShell".
5997 * remote.c: Add PACKET_QStartupWithShell.
5998 (extended_remote_create_inferior): Handle new
5999 PACKET_QStartupWithShell.
6000 (remote_protocol_features) <QStartupWithShell>: New entry for
6001 PACKET_QStartupWithShell.
6002 (_initialize_remote): Call "add_packet_config_cmd" for
6003 QStartupShell.
6004
2090129c
SDJ
60052017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6006 Pedro Alves <palves@redhat.com>
6007
6008 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6009 and "nat/fork-inferior.h".
6010 * common/common-inferior.h: New file, with contents from
6011 "gdb/inferior.h".
6012 * commom/common-utils.c: Include "common-utils.h".
6013 (stringify_argv): New function.
6014 * common/common-utils.h (stringify_argv): New prototype.
6015 * configure.nat: Add "fork-inferior.o" as a dependency for
6016 "*linux*", "fbsd*" and "nbsd*" hosts.
6017 * corefile.c (get_exec_file): Update comment.
6018 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6019 instead of "startup_inferior".
6020 (darwin_create_inferior): Call "add_thread_silent" after
6021 "fork_inferior".
6022 * fork-child.c: Cleanup unnecessary includes.
6023 (SHELL_FILE): Move to "common/common-fork-child.c".
6024 (environ): Likewise.
6025 (exec_wrapper): Initialize.
6026 (get_exec_wrapper): New function.
6027 (breakup_args): Move to "common/common-fork-child.c"; rename to
6028 "breakup_args_for_exec".
6029 (escape_bang_in_quoted_argument): Move to
6030 "common/common-fork-child.c".
6031 (saved_ui): New variable.
6032 (prefork_hook): New function.
6033 (postfork_hook): Likewise.
6034 (postfork_child_hook): Likewise.
6035 (gdb_startup_inferior): Likewise.
6036 (fork_inferior): Move to "common/common-fork-child.c". Update
6037 function to support gdbserver.
6038 (startup_inferior): Likewise.
6039 * gdbcore.h (get_exec_file): Remove declaration.
6040 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6041 instead of "startup_inferior". Call "add_thread_silent" after
6042 "fork_inferior".
6043 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6044 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6045 instead of "startup_inferior". Call "add_thread_silent" after
6046 "fork_inferior".
6047 * inferior.h: Include "common-inferior.h".
6048 (trace_start_error): Move to "common/common-utils.h".
6049 (trace_start_error_with_name): Likewise.
6050 (fork_inferior): Move prototype to "nat/fork-inferior.h".
6051 (startup_inferior): Likewise.
6052 (gdb_startup_inferior): New prototype.
6053 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6054 * nat/fork-inferior.h: New file.
6055 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6056 instead of "startup_inferior". Call "add_thread_silent" after
6057 "fork_inferior".
6058 * target.h (target_terminal_init): Move prototype to
6059 "target/target.h".
6060 (target_terminal_inferior): Likewise.
6061 (target_terminal_ours): Likewise.
6062 * target/target.h (target_terminal_init): New prototype, moved
6063 from "target.h".
6064 (target_terminal_inferior): Likewise.
6065 (target_terminal_ours): Likewise.
6066 * utils.c (gdb_flush_out_err): New function.
6067
043a4934
SDJ
60682017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6069
6070 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6071 * common/common-gdbthread.h: New file, with parts from
6072 "gdb/gdbthread.h".
6073 * gdbthread.h: Include "common-gdbthread.h".
6074 (switch_to_thread): Moved to "common/common-gdbthread.h".
6075
15652511
SDJ
60762017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6077
6078 * Makefile.in (SFILES): Add "common/job-control.c".
6079 (HFILES_NO_SRCDIR): Add "common/job-control.h".
6080 (COMMON_OBS): Add "job-control.o".
6081 * common/job-control.c: New file, with contents from
6082 "gdb/inflow.c".
6083 * common/job-control.h: New file, with contents from "terminal.h".
6084 * fork-child.c: Include "job-control.h".
6085 * inflow.c: Include "job-control.h".
6086 (gdb_setpgid): Move to "common/common-inflow.c".
6087 (_initialize_inflow): Move setting of "job_control" to
6088 "handle_job_control".
6089 * terminal.h (job_control): Moved to "common/common-terminal.h".
6090 (gdb_setpgid): Likewise.
6091 * top.c: Include "job_control.h".
6092 * utils.c: Likewise.
6093 (job_control): Moved to "job-control.c".
6094
2d7cc5c7
PA
60952017-06-07 Pedro Alves <palves@redhat.com>
6096
6097 * Makefile.in (SFILES): Add gdb_regex.c.
6098 (COMMON_OBS): Add gdb_regex.o.
6099 * ada-lang.c (ada_add_standard_exceptions)
6100 (ada_add_exceptions_from_frame, name_matches_regex)
6101 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6102 parameter type to compiled_regex. Adjust.
6103 (ada_exceptions_list): Use compiled_regex.
6104 * break-catch-throw.c (exception_catchpoint::pattern): Now a
6105 std::unique_ptr<compiled_regex>.
6106 (exception_catchpoint::~exception_catchpoint): Remove regfree
6107 call.
6108 (check_status_exception_catchpoint): Adjust to use compiled_regex.
6109 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6110 * breakpoint.c (solib_catchpoint::compiled): Now a
6111 std::unique_ptr<compiled_regex>.
6112 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6113 (check_status_catch_solib): Adjust to use compiled_regex.
6114 (add_solib_catchpoint): Adjust to use compiled_regex.
6115 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6116 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6117 compiled_regex reference. Adjust to use it.
6118 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6119 declaration. Include "gdb_regex.h".
6120 (apropos_cmd): Change regex parameter to compiled_regex reference.
6121 * gdb_regex.c: New file.
6122 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6123 declarations.
6124 (class compiled_regex): New.
6125 * linux-tdep.c: Include "common/gdb_optional.h".
6126 (struct mapping_regexes): New, factored out from
6127 mapping_is_anonymous_p, and adjusted to use compiled_regex.
6128 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6129 gdb::optional and remove cleanups. Adjust to compiled_regex.
6130 * probe.c: Include "common/gdb_optional.h".
6131 (collect_probes): Use compiled_regex and gdb::optional and remove
6132 cleanups.
6133 * skip.c: Include "common/gdb_optional.h".
6134 (skiplist_entry::compiled_function_regexp): Now a
6135 gdb::optional<compiled_regex>.
6136 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6137 (free_skiplist_entry): Remove regfree call.
6138 (compile_skip_regexp, skip_rfunction_p): Adjust to use
6139 compiled_regex and gdb::optional.
6140 * symtab.c: Include "common/gdb_optional.h".
6141 (search_symbols): Use compiled_regex and gdb::optional.
6142 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6143 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
6144 to gdb_regex.c.
6145
50d6adef
AH
61462017-06-07 Alan Hayward <alan.hayward@arm.com>
6147
6148 * regcache.c (regcache::save): Avoid buffer use.
6149 (regcache::dump): Likewise.
6150
4a8a33c8
AH
61512017-06-07 Alan Hayward <alan.hayward@arm.com>
6152
6153 * sh-tdep.c (sh_pseudo_register_read): Remove
6154 MAX_REGISTER_SIZE.
6155 (sh_pseudo_register_write): Likewise.
6156 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6157 (sh64_pseudo_register_write): Likewise
6158
d1be909e
AH
61592017-06-07 Alan Hayward <alan.hayward@arm.com>
6160
6161 * aarch64-tdep.c (aarch64_store_return_value): Use
6162 V_REGISTER_SIZE.
6163 (aarch64_pseudo_read_value): Likewise.
6164 (aarch64_pseudo_write): Likewise.
6165
f4a65042
YQ
61662017-06-06 Yao Qi <yao.qi@linaro.org>
6167
6168 * regformats/regdef.h (set_register_cache): Remove the
6169 declaration.
6170
9f7fb0aa
AH
61712017-06-06 Alan Hayward <alan.hayward@arm.com>
6172
6173 * frame.c (frame_unwind_register_signed): Use
6174 frame_unwind_register_value.
6175
e1e01040
PA
61762017-06-06 Pedro Alves <palves@redhat.com>
6177
6178 PR breakpoints/21553
6179 * breakpoint.c (create_breakpoints_sal_default)
6180 (init_breakpoint_sal, create_breakpoint_sal): Use
6181 gdb::unique_xmalloc_ptr for string parameters.
6182 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6183 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
6184 (base_breakpoint_create_breakpoints_sal)
6185 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6186 (strace_marker_create_breakpoints_sal)
6187 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6188 string parameters.
6189 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6190 gdb::unique_xmalloc_ptr for string parameters.
6191 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6192 parameters.
6193
fbe654c8
AH
61942017-06-06 Alan Hayward <alan.hayward@arm.com>
6195
6196 * alpha-tdep.c (alpha_register_to_value): Use
6197 get_frame_register_value.
6198 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6199
ae0d01d6
AH
62002017-06-06 Alan Hayward <alan.hayward@arm.com>
6201
6202 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6203 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6204 (ia64_value_to_register): Likewise.
6205 (ia64_extract_return_value): Likewise.
6206 (ia64_store_return_value): Likewise.
6207 (ia64_push_dummy_call): Likewise.
6208
49cf576c
JB
62092017-06-04 Joel Brobecker <brobecker@adacore.com>
6210
6211 GDB 8.0 released.
6212
26b6a6ab
SM
62132017-06-03 Simon Marchi <simon.marchi@ericsson.com>
6214
6215 * x86-linux-nat.c (struct arch_lwp_info): Remove.
6216
22827c51
SM
62172017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
6218
6219 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6220 parameter.
6221 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6222
0e05cf3a
SM
62232017-06-02 Simon Marchi <simon.marchi@ericsson.com>
6224
6225 * event-loop.c (poll_timers): Unallocate timer using delete
6226 instead of xfree.
6227
c1fc2657
SM
62282017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6229
6230 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6231 (struct breakpoint) <~breakpoint>: New.
6232 (struct watchpoint): Inherit from breakpoint.
6233 <~watchpoint>: New.
6234 <base>: Remove.
6235 (struct tracepoint): Inherit from breakpoint.
6236 <base>: Remove.
6237 * breakpoint.c (longjmp_breakpoint_ops): Remove.
6238 (struct longjmp_breakpoint): Inherit from breakpoint.
6239 <~longjmp_breakpoint>: New.
6240 <base>: Remove.
6241 (new_breakpoint_from_type): Remove casts.
6242 (watchpoint_in_thread_scope): Remove reference to base field.
6243 (watchpoint_del_at_next_stop): Likewise.
6244 (update_watchpoint): Likewise.
6245 (watchpoint_check): Likewise.
6246 (bpstat_check_watchpoint): Likewise.
6247 (set_longjmp_breakpoint): Likewise.
6248 (struct fork_catchpoint): Inherit from breakpoint.
6249 <base>: Remove.
6250 (struct solib_catchpoint): Inherit from breakpoint.
6251 <~solib_catchpoint>: New.
6252 <base>: Remove.
6253 (dtor_catch_solib): Change to ...
6254 (solib_catchpoint::~solib_catchpoint): ... this.
6255 (breakpoint_hit_catch_solib): Remove reference to base field.
6256 (add_solib_catchpoint): Likewise.
6257 (create_fork_vfork_event_catchpoint): Likewise.
6258 (struct exec_catchpoint): Inherit from breakpoint.
6259 <~exec_catchpoint>: New.
6260 <base>: Remove.
6261 (dtor_catch_exec): Change to ...
6262 (exec_catchpoint::~exec_catchpoint): ... this.
6263 (dtor_watchpoint): Change to ...
6264 (watchpoint::~watchpoint): ... this.
6265 (watch_command_1): Remove reference to base field.
6266 (catch_exec_command_1): Likewise.
6267 (base_breakpoint_dtor): Change to ...
6268 (breakpoint::~breakpoint): ... this.
6269 (base_breakpoint_ops): Remove dtor field value.
6270 (longjmp_bkpt_dtor): Change to ...
6271 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6272 (strace_marker_create_breakpoints_sal): Remove reference to base
6273 field.
6274 (delete_breakpoint): Don't manually call breakpoint destructor.
6275 (create_tracepoint_from_upload): Remove reference to base field.
6276 (trace_pass_set_count): Likewise.
6277 (initialize_breakpoint_ops): Don't initialize
6278 momentary_breakpoint_ops, don't set dtors.
6279 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6280 <~ada_catchpoint>: New.
6281 <base>: Remove.
6282 (create_excep_cond_exprs): Remove reference to base field.
6283 (dtor_exception): Change to ...
6284 (ada_catchpoint::~ada_catchpoint): ... this.
6285 (dtor_catch_exception): Remove.
6286 (dtor_catch_exception_unhandled): Remove.
6287 (dtor_catch_assert): Remove.
6288 (create_ada_exception_catchpoint): Remove reference to base
6289 field.
6290 (initialize_ada_catchpoint_ops): Don't set dtors.
6291 * break-catch-sig.c (struct signal_catchpoint): Inherit from
6292 breakpoint.
6293 <~signal_catchpoint>: New.
6294 <base>: Remove.
6295 (signal_catchpoint_dtor): Change to ...
6296 (signal_catchpoint::~signal_catchpoint): ... this.
6297 (create_signal_catchpoint): Remove reference to base field.
6298 (initialize_signal_catchpoint_ops): Don't set dtor.
6299 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6300 from breakpoint.
6301 <~syscall_catchpoint>: New.
6302 <base>: Remove.
6303 (dtor_catch_syscall): Change to ...
6304 (syscall_catchpoint::~syscall_catchpoint): ... this.
6305 (create_syscall_event_catchpoint): Remove reference to base
6306 field.
6307 (initialize_syscall_catchpoint_ops): Don't set dtor.
6308 * break-catch-throw.c (struct exception_catchpoint): Inherit
6309 from breakpoint.
6310 <~exception_catchpoint>: New.
6311 <base>: Remove.
6312 (dtor_exception_catchpoint): Change to ...
6313 (exception_catchpoint::~exception_catchpoint): ... this.
6314 (handle_gnu_v3_exceptions): Remove reference to base field.
6315 (initialize_throw_catchpoint_ops): Don't set dtor.
6316 * ctf.c (ctf_get_traceframe_address): Remove reference to base
6317 field.
6318 * remote.c (remote_get_tracepoint_status): Likewise.
6319 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6320 * tracefile.c (tracefile_fetch_registers): Likewise.
6321 * tracepoint.c (actions_command): Likewise.
6322 (validate_actionline): Likewise.
6323 (tfind_1): Likewise.
6324 (get_traceframe_location): Likewise.
6325 (find_matching_tracepoint_location): Likewise.
6326 (parse_tracepoint_status): Likewise.
6327 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6328
3b0871f4
SM
63292017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6330
6331 * breakpoint.c (struct longjmp_breakpoint): New struct.
6332 (is_tracepoint_type): Change return type to bool.
6333 (is_longjmp_type): New function.
6334 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6335 (set_raw_breakpoint_without_location): Use
6336 new_breakpoint_from_type.
6337 (set_raw_breakpoint): Likewise.
6338
a5e364af
SM
63392017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6340
6341 * breakpoint.c (new_breakpoint_from_type): New function.
6342 (create_breakpoint_sal): Use new_breakpoint_from_type and
6343 unique_ptr.
6344 (create_breakpoint): Likewise.
6345
ae3b3f34
SM
63462017-05-31 Simon Marchi <simon.marchi@ericsson.com>
6347
6348 * memattr.c (mem_info_command): Rename to ...
6349 (info_mem_command): ... this.
6350 (mem_enable_command): Rename to ...
6351 (enable_mem_command): ... this.
6352 (mem_disable_command): Rename to ...
6353 (disable_mem_command): ... this.
6354 (mem_delete_command): Rename to ...
6355 (delete_mem_command): ... this.
6356 (_initialize_mem): Adjust function names.
6357
13ace077
MM
63582017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6359
6360 * btrace.c (handle_pt_insn_events): New.
6361 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
6362 STATUS. Split into this and ...
6363 (handle_pt_insn_event_flags): ... this.
6364
c56ccc05
MM
63652017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6366
6367 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6368 and struct pt_insn.resynced.
6369 * configure: Regenerated.
6370 * config.in: Regenerated.
6371
08c3f6d2
TW
63722017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6373
6374 * btrace.c (ftrace_find_call_by_number): New function.
6375 (ftrace_new_function): Store objects, not pointers.
6376 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6377 ftrace_new_gap, ftrace_update_function,
6378 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6379 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6380 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6381 btrace_ends_with_single_insn, btrace_call_get): Account for
6382 btrace_thread_info::functions now storing objects.
6383 * btrace.h (struct btrace_thread_info): Add constructor.
6384 (struct btrace_thread_info) <functions>: Make std::vector.
6385 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6386 Initialize with default values.
6387 * record-btrace.c (record_btrace_frame_sniffer): Account for
6388 btrace_thread_info::functions now storing objects.
6389
8ffd39f2
TW
63902017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6391
6392 * btrace.c: Remove typedef bfun_s.
6393 (ftrace_new_gap): Directly add gaps to the list of gaps.
6394 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6395 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6396 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6397 instead of gdb VEC.
6398
4aeb0dfc
TW
63992017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6400
6401 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6402 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6403 with btrace_thread_info::next_segment and
6404 btrace_thread_info::prev_segment.
6405 * btrace.h: Remove struct btrace_func_link.
6406 (struct btrace_function): Replace pair of function segment pointers
6407 with pair of indices.
6408 * python/py-record-btrace.c (btpy_call_prev_sibling,
6409 btpy_call_next_sibling): Replace references to
6410 btrace_thread_info::segment with btrace_thread_info::next_segment and
6411 btrace_thread_info::prev_segment.
6412 * record-btrace.c (record_btrace_frame_this_id): Use
6413 btrace_find_call_by_number.
6414
eb8f2b9c
TW
64152017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6416
6417 * btrace.c (ftrace_new_function, ftrace_fixup_level,
6418 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6419 btrace_insn_next, btrace_insn_prev): Remove references to
6420 btrace_thread_info::flow.
6421 * btrace.h (struct btrace_function): Remove FLOW.
6422
42bfe59e
TW
64232017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6424
6425 * btrace.c (ftrace_find_call_by_number): New function.
6426 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6427 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6428 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6429 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6430 index.
6431 * btrace.h (struct btrace_function): Turn UP into an index.
6432 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6433 as an index.
6434 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6435 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6436 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6437
b54b03bd
TW
64382017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6439
6440 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6441 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6442 ftrace_update_function, ftrace_compute_global_level_offset,
6443 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6444 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6445 btrace_insn_end, btrace_is_empty): Remove references to
6446 btrace_thread_info::begin and btrace_thread_info::end.
6447 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6448 (struct btrace_thread_info) <functions>: Adjust comment.
6449 * record-btrace.c (record_btrace_start_replaying): Remove reference to
6450 btrace_thread_info::begin.
6451
8286623c
TW
64522017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6453
6454 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6455 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6456 ftrace_update_function): Remove arguments that implicitly were always
6457 BTINFO->END.
6458 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6459 Don't pass BTINFO->END.
6460
a0f1b963
TW
64612017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6462
6463 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6464 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6465 btrace_find_insn_by_number): Replace function segment pointer with
6466 index.
6467 (btrace_insn_cmp): Simplify.
6468 * btrace.h: (struct btrace_insn_iterator) Rename index to
6469 insn_index. Replace function segment pointer with index into function
6470 segment vector.
6471 * record-btrace.c (record_btrace_call_history): Replace function
6472 segment pointer use with index.
6473 (record_btrace_frame_sniffer): Retrieve function call segment through
6474 vector.
6475 (record_btrace_set_replay): Remove defunc't safety check.
6476
f158f208
TW
64772017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6478
6479 * btrace.c (btrace_ends_with_single_insn): New function.
6480 (btrace_call_get, btrace_call_number, btrace_call_begin,
6481 btrace_call_end, btrace_call_next, btrace_call_prev,
6482 btrace_find_call_by_number): Use index into call segment vector
6483 instead of pointer.
6484 (btrace_call_cmp): Simplify.
6485 * btrace.h (struct btrace_call_iterator): Replace function call segment
6486 pointer with index into vector.
6487 * record-btrace.c (record_btrace_call_history): Use index instead of
6488 pointer.
6489
521103fd
TW
64902017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6491
6492 * btrace.c (btrace_insn_begin, btrace_insn_end,
6493 btrace_find_insn_by_number): Add btinfo to iterator.
6494 * btrace.h (struct btrace_insn_iterator): Add btinfo.
6495
17b89b34
TW
64962017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6497
6498 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6499 and save pointers directly.
6500 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6501 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6502 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
6503 changed signature of functions.
6504 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6505 (btrace_fetch): Remove code that adds btrace_function pointers to
6506 vector of btrace_functions.
6507 (btrace_clear): Simplify freeing vector of btrace_functions.
6508
2b51eddc
TW
65092017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6510
6511 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6512 Replace VEC_* with std::vector functions.
6513 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6514 (struct btrace_thread_info)<functions>: Change type to std::vector.
6515
db6be0d5
SM
65162017-05-30 Simon Marchi <simon.marchi@ericsson.com>
6517
6518 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
6519 "Removed targets and native configurations" up. Merge duplicate
6520 "New commands" sub-sections. Add "New options" sub-sections.
6521
b057297a
AH
65222017-05-26 Alan Hayward <alan.hayward@arm.com>
6523
6524 * defs.h (copy_integer_to_size): New declaration.
6525 * findvar.c (copy_integer_to_size): New function.
6526 (do_cint_test): New selftest function.
6527 (copy_integer_to_size_test): Likewise.
6528 (_initialize_findvar): Likewise.
6529 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6530 (mips_fbsd_collect_reg): Use raw_collect_integer.
6531 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6532 (mips64_fill_gregset): Use raw_collect_integer
6533 (mips64_fill_fpregset): Use raw_supply_integer.
6534 * regcache.c (regcache::raw_supply_integer): New function.
6535 (regcache::raw_collect_integer): Likewise.
6536 * regcache.h: (regcache::raw_supply_integer): New declaration.
6537 (regcache::raw_collect_integer): Likewise.
6538
b77b02a5
YQ
65392017-05-24 Yao Qi <yao.qi@linaro.org>
6540
6541 * Makefile.in (SFILES): Add gdbarch-selftests.c.
6542 (COMMON_OBS): Add gdbarch-selftests.o.
6543 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6544 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6545 * gdbarch-selftests.c: New file.
6546 * regcache.h (regcache) <~regcache>: Mark it virtual if
6547 GDB_SELF_TEST.
6548 <raw_write>: Likewise.
6549
e521e87e
YQ
65502017-05-24 Yao Qi <yao.qi@linaro.org>
6551
6552 * regcache.c (current_regcache): Change it to
6553 regcache::current_regcache.
6554 (regcache_observer_target_changed): Update.
6555 (regcache_thread_ptid_changed): Make it a regcache static
6556 method.
6557 (regcache_thread_ptid_changed): Update.
6558 (class regcache_access): New.
6559 (current_regcache_test): Update.
6560 (_initialize_regcache): Update.
6561 * regcache.h: Include forward_list.
6562 (regcache): Declare regcache_thread_ptid_changed and declare
6563 registers_changed_ptid as friend.
6564
d8e07dda
YQ
65652017-05-24 Yao Qi <yao.qi@linaro.org>
6566
6567 * i387-tdep.c (i387_register_to_value): Use register_size
6568 instead of TYPE_LENGTH.
6569 * m68k-tdep.c (m68k_register_to_value): Likewise.
6570
8c8f9122
YQ
65712017-05-24 Yao Qi <yao.qi@linaro.org>
6572
6573 * i387-tdep.c (i387_convert_register_p): Return false if type
6574 code isn't TYPE_CODE_FLT.
6575
68fce50f
YQ
65762017-05-24 Yao Qi <yao.qi@linaro.org>
6577
6578 * alpha-tdep.c (alpha_convert_register_p): Return true if type
6579 length is 4.
6580 (alpha_register_to_value): Remove type length check.
6581 (alpha_value_to_register): Likewise.
6582
88954b49
YQ
65832017-05-24 Yao Qi <yao.qi@linaro.org>
6584
6585 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6586 TYPE_CODE_FLT.
6587
e3ec9b69
YQ
65882017-05-24 Yao Qi <yao.qi@linaro.org>
6589
6590 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6591 TYPE_CODE_FLT or not.
6592
cdd238da
YQ
65932017-05-24 Yao Qi <yao.qi@linaro.org>
6594
6595 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6596 * avr-tdep.c (avr_gdbarch_init): Likewise.
6597 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6598 * cris-tdep.c (cris_gdbarch_init): Likewise.
6599 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6600 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6601 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6602 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6603 * mep-tdep.c (mep_gdbarch_init): Likewise.
6604 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6605 * mips-tdep.c (mips_gdbarch_init): Likewise.
6606 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6607 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6608 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6609 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6610 * v850-tdep.c (v850_gdbarch_init): Likewise.
6611
7a3929c4
YQ
66122017-05-24 Yao Qi <yao.qi@linaro.org>
6613
6614 * selftest-arch.c (tests_with_arch): Call registers_changed
6615 and reinit_frame_cache.
6616 * selftest.c (run_self_tests): Likewise.
6617
f4985dba
YQ
66182017-05-24 Yao Qi <yao.qi@linaro.org>
6619
6620 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6621 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6622
ab20fa4a
YQ
66232017-05-24 Yao Qi <yao.qi@linaro.org>
6624
6625 * rl78-tdep.c (rl78_gdbarch_init): Don't call
6626 set_gdbarch_print_insn.
6627
f532ab94
YQ
66282017-05-24 Yao Qi <yao.qi@linaro.org>
6629
6630 * h8300-tdep.c (h8300_gdbarch_init): Don't call
6631 set_gdbarch_print_insn.
6632
39503f82
YQ
66332017-05-24 Yao Qi <yao.qi@linaro.org>
6634
6635 * alpha-tdep.c (alpha_gdbarch_init): Don't call
6636 set_gdbarch_print_insn.
6637 * arc-tdep.c (arc_gdbarch_init): Likewise.
6638 * arch-utils.c: include dis-asm.h.
6639 (default_print_insn): New function.
6640 * arch-utils.h (default_print_insn): Declare.
6641 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6642 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6643 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6644 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6645 * frv-tdep.c (frv_gdbarch_init): Likewise.
6646 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6647 * gdbarch.sh (print_insn): Use default_print_insn.
6648 * gdbarch.c: Regenerated.
6649 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6650 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6651 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6652 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6653 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6654 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6655 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6656 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6657 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6658 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6659 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6660 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6661 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6662 * mt-tdep.c (mt_gdbarch_init): Likewise.
6663 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6664 * nios2-tdep.c (nios2_print_insn): Remove.
6665 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6666 * rx-tdep.c (rx_gdbarch_init): Likewise.
6667 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6668 * score-tdep.c (score_print_insn): Remove.
6669 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6670 * sh-tdep.c (sh_gdbarch_init): Likewise.
6671 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6672 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6673 * tic6x-tdep.c (tic6x_print_insn): Remove.
6674 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6675 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6676 * v850-tdep.c (v850_gdbarch_init): Likewise.
6677 * vax-tdep.c (vax_gdbarch_init): Likewise.
6678 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6679 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6680
f7241d4f
JB
66812017-05-23 John Baldwin <jhb@FreeBSD.org>
6682
6683 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6684 (MIPS_FP0_REGNUM): Remove.
6685 (MIPS_FSR_REGNUM): Remove.
6686 (mips_fbsd_supply_fpregs): Use mips_regnum.
6687 (mips_fbsd_supply_gregs): Likewise.
6688 (mips_fbsd_collect_fpregs): Likewise.
6689 (mips_fbsd_collect_gregs): Likewise.
6690
d489d81d
JB
66912017-05-23 John Baldwin <jhb@FreeBSD.org>
6692
6693 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6694 (getpfpregs_supplies): New function.
6695 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6696 getfpregs_supplies.
6697 (mips_fbsd_store_inferior_registers): Likewise.
6698
e11b3cdc
PA
66992017-05-22 Pedro Alves <palves@redhat.com>
6700
6701 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6702 maintainer.
6703
0f068fb5
AH
67042017-05-22 Alan Hayward <alan.hayward@arm.com>
6705
6706 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6707 (store_register): Likewise.
6708 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6709 (get_decimal_float_return_value): Likewise.
6710 (do_ppc_sysv_return_value): Likewise.
6711 (ppc64_sysv_abi_push_integer): Likewise.
6712 (ppc64_sysv_abi_push_freg): Likewise.
6713 (ppc64_sysv_abi_return_value_base): Likewise.
6714 (ppc64_sysv_abi_return_value): Likewise.
6715 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6716 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6717 * rs6000-nat.c: Likewise.
6718 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6719 (rs6000_value_to_register): Likewise.
6720 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6721
e6cf65f2
TT
67222017-05-21 Tom Tromey <tom@tromey.com>
6723
6724 PR rust/21466:
6725 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6726 arrays as "[T]", not "[T; ]".
6727
43cc5389
TT
67282017-05-19 Tom Tromey <tom@tromey.com>
6729
6730 PR rust/21484:
6731 * rust-lang.c (exp_descriptor_rust): New function.
6732 (rust_language_defn): Use it.
6733 * p-lang.c (pascal_language_defn): Update.
6734 * opencl-lang.c (opencl_language_defn): Update.
6735 * objc-lang.c (objc_language_defn): Update.
6736 * m2-lang.c (m2_language_defn): Update.
6737 * language.h (struct language_defn)
6738 <la_watch_location_expression>: New member.
6739 * language.c (unknown_language_defn, auto_language_defn)
6740 (local_language_defn): Update.
6741 * go-lang.c (go_language_defn): Update.
6742 * f-lang.c (f_language_defn): Update.
6743 * d-lang.c (d_language_defn): Update.
6744 * c-lang.h (c_watch_location_expression): Declare.
6745 * c-lang.c (c_watch_location_expression): New function.
6746 (c_language_defn, cplus_language_defn, asm_language_defn)
6747 (minimal_language_defn): Use it.
6748 * breakpoint.c (watch_command_1): Call
6749 la_watch_location_expression.
6750 * ada-lang.c (ada_language_defn): Update.
6751
7a6e7fcc
RO
67522017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6753
6e7e1744
RO
6754 PR tui/21482
6755 * gdb_curses.h (NOMACROS): Define.
6756 (NCURSES_NOMACROS): Define.
6757
67582017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6759
6760 PR tui/21482
7a6e7fcc
RO
6761 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6762 arg to char *.
6763 * tui/tui-wingeneral.c (box_win): Likewise.
6764 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6765 (tui_show_source_line): Likewise.
6766 (tui_show_exec_info_content): Likewise.
6767
1933fd8e
VM
67682017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6769
6770 * sparc-tdep.c (sparc_structure_return_p)
6771 (sparc_arg_on_registers_p): New functions.
6772 (sparc32_store_arguments): Use them.
6773 * sparc64-tdep.c (sparc64_16_byte_align_p)
6774 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6775 Handle TYPE_CODE_ARRAY.
6776
21873064
YQ
67772017-05-17 Yao Qi <yao.qi@linaro.org>
6778
6779 * cli/cli-decode.c (add_alias_cmd): New function.
6780 * command.h (add_alias_cmd): Declare.
6781 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6782 instead call add_alias_cmd.
6783
2b351b19
PA
67842017-05-17 Pedro Alves <palves@redhat.com>
6785
6786 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6787 (nat_makefile_frag): ... this. All references updated.
6788 * configure.ac: Likewise.
6789 * configure.nat: Likewise. Enhance comments.
6790 * configure: Regenerate.
6791
5f2ad7a3
RO
67922017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6793
6794 * procfs.c (procfs_create_inferior): Change prototype to match
6795 definition.
6796
adf3dde5
EZ
67972017-05-13 Eli Zaretskii <eliz@gnu.org>
6798
6799 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6800 C++ compiler warning.
6801
6830f270
TT
68022017-05-12 Tom Tromey <tom@tromey.com>
6803
6804 PR rust/21483:
6805 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6806 recurse, just call value_struct_elt directly.
6807
68f2f2e3
TT
68082017-05-12 Tom Tromey <tom@tromey.com>
6809
6810 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6811 OP_RUST_ARRAY>: Fix.
6812
256afbc2
TT
68132017-05-12 Tom Tromey <tom@tromey.com>
6814
6815 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6816
94bb8dfe
YQ
68172017-05-09 Yao Qi <yao.qi@linaro.org>
6818
6819 * regcache.c: Include <forward_list>.
6820 (struct regcache_list): Remove.
6821 (current_regcache): Update.
6822 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6823 (regcache_thread_ptid_changed): Likewise.
6824 (registers_changed_ptid): Likewise.
6825 (current_regcache_size): Likewise.
6826
8248946c
YQ
68272017-05-09 Yao Qi <yao.qi@linaro.org>
6828
6829 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6830 (current_regcache_size): New function.
6831 (current_regcache_test): New function.
6832 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6833
313c5961
AH
68342017-05-08 Alan Hayward <alan.hayward@arm.com>
6835
6836 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6837 (print_gp_register_row): Use get_frame_register_value.
6838
27bfc1d1
AH
68392017-05-08 Alan Hayward <alan.hayward@arm.com>
6840
6841 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6842 (mips_supply_fpregset): Likewise.
6843 (mips64_supply_gregset): Likewise.
6844
146e6c5c
AH
68452017-05-08 Alan Hayward <alan.hayward@arm.com>
6846
6847 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6848 regcache->raw_supply_zeroed.
6849
e50f25ec
SDJ
68502017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6851
6852 * configure.nat: Rearrange 'case' statements to match
6853 host before cpu.
6854
21ea5acd
SDJ
68552017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6856
6857 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6858 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6859 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6860 "@nat_extra_makefile_frag@".
6861 (Makefile): Remove dependency on "@frags@".
6862 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6863 (data-directory/Makefile): Likewise.
6864 * config/aarch64/linux.mh: Deleted; moved contents to
6865 "gdb/configure.nat".
6866 * config/alpha/alpha-linux.mh: Likewise.
6867 * config/alpha/nbsd.mh: Likewise.
6868 * config/arm/linux.mh: Likewise.
6869 * config/arm/nbsdelf.mh: Likewise.
6870 * config/i386/cygwin.mh: Likewise.
6871 * config/i386/cygwin64.mh: Likewise.
6872 * config/i386/darwin.mh: Likewise.
6873 * config/i386/fbsd.mh: Likewise.
6874 * config/i386/fbsd64.mh: Likewise.
6875 * config/i386/go32.mh: Likewise.
6876 * config/i386/i386gnu.mh: Likewise.
6877 * config/i386/i386sol2.mh: Likewise.
6878 * config/i386/linux.mh: Likewise.
6879 * config/i386/linux64.mh: Likewise.
6880 * config/i386/mingw.mh: Likewise.
6881 * config/i386/mingw64.mh: Likewise.
6882 * config/i386/nbsd64.mh: Likewise.
6883 * config/i386/nbsdelf.mh: Likewise.
6884 * config/i386/nto.mh: Likewise.
6885 * config/i386/obsd.mh: Likewise.
6886 * config/i386/obsd64.mh: Likewise.
6887 * config/i386/sol2-64.mh: Likewise.
6888 * config/ia64/linux.mh: Likewise.
6889 * config/m32r/linux.mh: Likewise.
6890 * config/m68k/linux.mh: Likewise.
6891 * config/m68k/nbsdelf.mh: Likewise.
6892 * config/m68k/obsd.mh: Likewise.
6893 * config/m88k/obsd.mh: Likewise.
6894 * config/mips/fbsd.mh: Likewise.
6895 * config/mips/linux.mh: Likewise.
6896 * config/mips/nbsd.mh: Likewise.
6897 * config/mips/obsd64.mh: Likewise.
6898 * config/pa/linux.mh: Likewise.
6899 * config/pa/nbsd.mh: Likewise.
6900 * config/pa/obsd.mh: Likewise.
6901 * config/powerpc/aix.mh: Likewise.
6902 * config/powerpc/fbsd.mh: Likewise.
6903 * config/powerpc/linux.mh: Likewise.
6904 * config/powerpc/nbsd.mh: Likewise.
6905 * config/powerpc/obsd.mh: Likewise.
6906 * config/powerpc/ppc64-linux.mh: Likewise.
6907 * config/powerpc/spu-linux.mh: Likewise.
6908 * config/s390/linux.mh: Likewise.
6909 * config/sh/nbsd.mh: Likewise.
6910 * config/sparc/fbsd.mh: Likewise.
6911 * config/sparc/linux.mh: Likewise.
6912 * config/sparc/linux64.mh: Likewise.
6913 * config/sparc/nbsd64.mh: Likewise.
6914 * config/sparc/nbsdelf.mh: Likewise.
6915 * config/sparc/obsd64.mh: Likewise.
6916 * config/sparc/sol2.mh: Likewise.
6917 * config/tilegx/linux.mh: Likewise.
6918 * config/vax/nbsdelf.mh: Likewise.
6919 * config/vax/obsd.mh: Likewise.
6920 * config/xtensa/linux.mh: Likewise.
6921 * config/i386/i386gnu.mn: New file, with excerpts from
6922 "config/i386/i386gnu.mh".
6923 * configure: Regenerate.
6924 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6925 *.mh files under "gdb/config".
6926 * configure.nat: New file, with contents from the
6927 "gdb/config/*/*.mh" files.
6928
7ed1acaf
TW
69292017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6930
6931 * btrace.c (btrace_clear): Free insn vector.
6932
e13cb306
PA
69332017-05-05 Pedro Alves <palves@redhat.com>
6934
6935 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6936 * configure: Regenerate.
6937
5ed8105e
PA
69382017-05-04 Pedro Alves <palves@redhat.com>
6939
6940 * Makefile.in (SFILES): Add progspace-and-thread.c.
6941 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6942 (COMMON_OBS): Add progspace-and-thread.o.
6943 * breakpoint.c: Include "progspace-and-thread.h".
6944 (update_inserted_breakpoint_locations)
6945 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6946 Use scoped_restore_current_pspace_and_thread.
6947 (create_std_terminate_master_breakpoint): Use
6948 scoped_restore_current_program_space.
6949 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6950 (print_breakpoint_location): Use
6951 scoped_restore_current_program_space.
6952 (bp_loc_is_permanent): Use
6953 scoped_restore_current_pspace_and_thread.
6954 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6955 (download_tracepoint_locations): Use
6956 scoped_restore_current_pspace_and_thread.
6957 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6958 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6959 (enum step_over_calls_kind): Moved from inferior.h.
6960 (class scoped_restore_current_thread): New class.
6961 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6962 declaration.
6963 (scoped_restore_current_thread): New class.
6964 * infcmd.c: Include "common/gdb_optional.h".
6965 (continue_1, proceed_after_attach): Use
6966 scoped_restore_current_thread.
6967 (notice_new_inferior): Use scoped_restore_current_thread.
6968 * inferior.c: Include "progspace-and-thread.h".
6969 (restore_inferior, save_current_inferior): Delete.
6970 (add_inferior_command, clone_inferior_command): Use
6971 scoped_restore_current_pspace_and_thread.
6972 * inferior.h (scoped_restore_current_inferior): New class.
6973 * infrun.c: Include "progspace-and-thread.h" and
6974 "common/gdb_optional.h".
6975 (follow_fork_inferior): Use
6976 scoped_restore_current_pspace_and_thread.
6977 (scoped_restore_exited_inferior): New class.
6978 (handle_vfork_child_exec_or_exit): Use
6979 scoped_restore_exited_inferior,
6980 scoped_restore_current_pspace_and_thread,
6981 scoped_restore_current_thread and scoped_restore.
6982 (fetch_inferior_event): Use scoped_restore_current_thread.
6983 * linespec.c (decode_line_full, decode_line_1): Use
6984 scoped_restore_current_program_space.
6985 * mi/mi-main.c: Include "progspace-and-thread.h".
6986 (exec_continue): Use scoped_restore_current_thread.
6987 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6988 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6989 * proc-service.c (ps_pglobal_lookup): Use
6990 scoped_restore_current_program_space.
6991 * progspace-and-thread.c: New file.
6992 * progspace-and-thread.h: New file.
6993 * progspace.c (release_program_space, clone_program_space): Use
6994 scoped_restore_current_program_space.
6995 (restore_program_space, save_current_program_space)
6996 (save_current_space_and_thread): Delete.
6997 (switch_to_program_space_and_thread): Moved to
6998 progspace-and-thread.c.
6999 * progspace.h (save_current_program_space)
7000 (save_current_space_and_thread): Delete declarations.
7001 (scoped_restore_current_program_space): New class.
7002 * remote.c (remote_btrace_maybe_reopen): Use
7003 scoped_restore_current_thread.
7004 * symtab.c: Include "progspace-and-thread.h".
7005 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7006 * thread.c (print_thread_info_1): Use
7007 scoped_restore_current_thread.
7008 (struct current_thread_cleanup): Delete.
7009 (do_restore_current_thread_cleanup)
7010 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7011 (scoped_restore_current_thread::~scoped_restore_current_thread):
7012 ... this new dtor.
7013 (make_cleanup_restore_current_thread): Rename/convert to ...
7014 (scoped_restore_current_thread::scoped_restore_current_thread):
7015 ... this new ctor.
7016 (thread_apply_all_command): Use scoped_restore_current_thread.
7017 (thread_apply_command): Use scoped_restore_current_thread.
7018 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7019 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7020
f6223dbb
PA
70212017-05-04 Pedro Alves <palves@redhat.com>
7022
7023 * thread.c (make_cleanup_restore_current_thread): Move
7024 find_thread_ptid call before the is_stopped call. Assert that the
7025 thread is found. Replace is_stopped call by checking the thread's
7026 state directly. Remove unnecessary NULL-thread check.
7027
3c3ae77e
PA
70282017-05-04 Pedro Alves <palves@redhat.com>
7029
7030 * corelow.c (thread_section_name): New class.
7031 (get_core_register_section, get_core_siginfo): Use it.
7032
45eba0ab
AA
70332017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
7034
7035 * corelow.c (sniff_core_bfd): Remove extra semicolon.
7036 (get_core_register_section): Remove xfree of NULL pointer.
7037
f81fdd35
AH
70382017-05-03 Alan Hayward <alan.hayward@arm.com>
7039
7040 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7041 * regcache.c (regcache::raw_supply_zeroed): New function.
7042 * regcache.h (regcache::raw_supply_zeroed): New declaration.
7043
35837774
SM
70442017-05-03 Simon Marchi <simon.marchi@ericsson.com>
7045
7046 * gdbarch.sh: Remove commented out definition of
7047 TARGET_CHAR_BIT.
7048 * gdbarch.h: Re-generate.
7049
c94fee56
SDJ
70502017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7051
7052 * configure: Regenerate.
7053
d17f7b36
SM
70542017-05-02 Simon Marchi <simon.marchi@ericsson.com>
7055
7056 * solib-target.c (solib_target_relocate_section_addresses):
7057 Remove num_section_bases, num_bases, segment_bases variables.
7058
b560ebd6
SM
70592017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7060
7061 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7062
f2f46dfc
SM
70632017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7064
7065 * solib-target.c: Include <vector>
7066 (struct lm_info_target) <~lm_info_target>: Remove.
7067 <segment_bases, section_bases>: Change type to
7068 std::vector<CORE_ADDR>.
7069 (library_list_start_segment, library_list_start_section,
7070 library_list_end_library,
7071 solib_target_relocate_section_addresses): Adjust.
7072
a0ff9e1a
SM
70732017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7074
7075 * gdbarch.sh (software_single_step): Change return type to
7076 std::vector<CORE_ADDR>.
7077 * gdbarch.c, gdbarch.h: Re-generate.
7078 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7079 Adjust.
7080 (arm_deal_with_atomic_sequence_raw): Adjust.
7081 (thumb_get_next_pcs_raw): Adjust.
7082 (arm_get_next_pcs_raw): Adjust.
7083 (arm_get_next_pcs): Adjust.
7084 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7085 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7086 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7087 (alpha_software_single_step): Adjust.
7088 * alpha-tdep.h (alpha_software_single_step): Adjust.
7089 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7090 * arm-tdep.c (arm_software_single_step): Adjust.
7091 (arm_breakpoint_kind_from_current_state): Adjust.
7092 * arm-tdep.h (arm_software_single_step): Adjust.
7093 * breakpoint.c (insert_single_step_breakpoint): Adjust.
7094 * cris-tdep.c (cris_software_single_step): Adjust.
7095 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7096 (micromips_deal_with_atomic_sequence): Adjust.
7097 (deal_with_atomic_sequence): Adjust.
7098 (mips_software_single_step): Adjust.
7099 * mips-tdep.h (mips_software_single_step): Adjust.
7100 * moxie-tdep.c (moxie_software_single_step): Adjust.
7101 * nios2-tdep.c (nios2_software_single_step): Adjust.
7102 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7103 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7104 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7105 * s390-linux-tdep.c (s390_software_single_step): Adjust.
7106 * sparc-tdep.c (sparc_software_single_step): Adjust.
7107 * spu-tdep.c (spu_software_single_step): Adjust.
7108 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7109
ea480a30
SM
71102017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7111
7112 * gdbarch.sh: Use semi-colon as field separator instead of colon.
7113 * gdbarch.h: Re-generate.
7114
d050f7d7
TW
71152017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7116
7117 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7118 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7119 * python/py-instruction.c, python/py-instruction.h: New file.
7120 * python/py-record.c: Add py-instruction.h include.
7121 (gdbpy_initialize_record): Make gdb.Instruction a super class of
7122 gdb.RecordInstruction.
7123 * python/python-internal.h: Add gdbpy_initialize_instruction
7124 declaration.
7125 * python/python.c (do_start_initialization): Add
7126 gdbpy_initialize_instruction.
7127
14f819c8
TW
71282017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7129
7130 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7131 Remove.
7132 (btrace_func_from_recpy_func): New function.
7133 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7134 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7135 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7136 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7137 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7138 Also, use new helper functions.
7139 (btpy_list_item): Use new helper functions.
7140 (recpy_bt_function_call_history): Use new type name.
7141 (btpy_call_getset): Remove.
7142 (gdbpy_initialize_btrace): Remove code to initialize
7143 gdb.BtraceFunctionCall.
7144 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7145 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7146 recpy_bt_func_prev, recpy_bt_func_next): New export.
7147 * python/py-record.c (recpy_func_type): New static object.
7148 (recpy_func_new, recpy_func_level, recpy_func_symbol,
7149 recpy_func_instructions, recpy_func_up, recpy_func_prev,
7150 recpy_func_next): New function.
7151 (recpy_element_hash, recpy_element_richcompare): Updated comment.
7152 (recpy_func_getset): New static object.
7153 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7154 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7155
0ed5da75
TW
71562017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7157
7158 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7159 (btpy_object, btpy_insn_type, btpy_new): Remove.
7160 (btpy_list_object): Use gdb.RecordInstruction type instead of
7161 gdb.BtraceInstruction type.
7162 (btrace_insn_from_recpy_insn): New function.
7163 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7164 btpy_new.
7165 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7166 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7167 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7168 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7169 instead of btpy_object.
7170 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7171 btpy_insn_data, btpy_insn_decode): Rename to ...
7172 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7173 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7174 recpy_bt_insn_decode): This. Also, use new helper functions.
7175 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7176 recpy_insn_type.
7177 (btpy_insn_getset): Remove.
7178 (gdbpy_initialize_btrace): Remove code to initialize
7179 gdb.BtraceInstruction. Use recpy_element_object.
7180 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7181 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7182 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7183 * python/py-record.c (recpy_insn_type): New static object.
7184 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7185 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7186 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7187 New function.
7188 (recpy_insn_getset): New static object.
7189 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7190 * python/py-record.h (recpy_element_object): New typedef.
7191 (recpy_insn_type, recpy_insn_new): New export.
7192
913aeadd
TW
71932017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7194
7195 * py-record-btrace.c (btpy_insn_new): Removed.
7196 (btpy_insn_or_gap_new): New function.
7197 (btpy_insn_error): Removed.
7198 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7199 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7200 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7201 btpy_insn_or_gap_new instead of btpy_insn_new.
7202 (btpy_insn_getset): Remove btpy_insn_error.
7203 * py-record.c (recpy_gap_type): New static object.
7204 (recpy_gap_object): New typedef.
7205 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7206 recpy_gap_reason_string): New function.
7207 (recpy_gap_getset): New static object.
7208 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7209 * py-record.h (recpy_gap_new): New export.
7210
a3be24ad
TW
72112017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7212
7213 * python/py-record.c (recpy_ptid): Remove.
7214 (recpy_record_getset): Remove recpy_ptid.
7215
ae20e79a
TW
72162017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7217
7218 * btrace.c (btrace_fetch): Set inferior_ptid.
7219 * python/py-record-btrace.c: Add "py-record.h" include.
7220 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7221 recpy_bt_end, recpy_bt_instruction_history,
7222 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7223 in gdb.Record object instead of current ptid.
7224 * python/py-record.c: Include new "py-record.h" file.
7225 (recpy_record_object): Moved to py-record.h.
7226 * python/py-record.h: New file.
7227
8d0050ea
TW
72282017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7229
7230 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7231 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7232 indentation.
7233
3f380b50
JB
72342017-05-01 Joel Brobecker <brobecker@adacore.com>
7235
7236 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7237 the past maintainers section.
7238
07495424
YQ
72392017-04-28 Yao Qi <yao.qi@linaro.org>
7240
7241 * infcmd.c (get_return_value): Use regcache ctor, and remove
7242 cleanup.
7243
deb1fa3e
YQ
72442017-04-28 Yao Qi <yao.qi@linaro.org>
7245 Pedro Alves <palves@redhat.com>
7246
7247 * regcache.c (regcache::regcache): New tag dispatch ctor.
7248 (do_cooked_read): Moved above.
7249 (regcache_dup): Use the tag dispatch ctor..
7250 * regcache.h (regcache): Declare ctor, delete copy ctor and
7251 assignment operator, remove friend regcache_dup.
7252
b421c83c
YQ
72532017-04-28 Yao Qi <yao.qi@linaro.org>
7254
7255 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7256 call method save instead of regcache_cpy.
7257 * regcache.h (struct regcache): Make regcache_dup a friend.
7258
ef79d9a3
YQ
72592017-04-28 Yao Qi <yao.qi@linaro.org>
7260
7261 * regcache.c (struct regcache): Move to regcache.h
7262 (regcache::arch): New method.
7263 (regcache_get_ptid): Update.
7264 (get_regcache_arch): Call arch method.
7265 (get_regcache_aspace): Call method aspace.
7266 (register_buffer): Change it to method.
7267 (regcache_save): Change it to regcache::save.
7268 (regcache_restore): Likewise.
7269 (regcache_cpy_no_passthrough): Remove the declaration.
7270 (regcache_cpy): Call methods restore and cpy_no_passthrough.
7271 (regcache_cpy_no_passthrough): Change it to method
7272 cpy_no_passthrough.
7273 (regcache_register_status): Change it to method
7274 get_register_status.
7275 (regcache_invalidate): Change it to method invalidate.
7276 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7277 (regcache_raw_update): Change it to method raw_update.
7278 (regcache_raw_read): Likewise.
7279 (regcache_raw_read_signed): Likewise.
7280 (regcache_raw_read_unsigned): Likewise.
7281 (regcache_raw_write_signed): Likewise.
7282 (regcache_raw_write_unsigned): Likewise.
7283 (regcache_cooked_read): Likewise.
7284 (regcache_cooked_read_value): Likewise.
7285 (regcache_cooked_read_signed): Likewise.
7286 (regcache_cooked_read_unsigned): Likewise.
7287 (regcache_cooked_write_signed): Likewise.
7288 (regcache_cooked_write_unsigned): Likewise.
7289 (regcache_raw_set_cached_value): Likewise.
7290 (regcache_raw_write): Likewise.
7291 (regcache_cooked_write): Likewise.
7292 (regcache_xfer_part): Likewise.
7293 (regcache_raw_read_part): Likewise.
7294 (regcache_raw_write_part): Likewise.
7295 (regcache_cooked_read_part): Likewise.
7296 (regcache_cooked_write_part): Likewise.
7297 (regcache_raw_supply): Likewise.
7298 (regcache_raw_collect): Likewise.
7299 (regcache_transfer_regset): Likewise.
7300 (regcache_supply_regset): Likewise.
7301 (regcache_collect_regset): Likewise.
7302 (regcache_debug_print_register): Likewise.
7303 (enum regcache_dump_what): Move it to regcache.h.
7304 (regcache_dump): Change it to method dump.
7305 * regcache.h (enum regcache_dump_what): New.
7306 (class regcache): New.
7307 * target.c (target_fetch_registers): Call method
7308 debug_print_register.
7309 (target_store_registers): Likewise.
7310
f8fdb78e
SM
73112017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7312
7313 * windows-nat.c (struct lm_info_windows): Initialize field.
7314 (windows_make_so): Allocate lm_info_windows with new.
7315 (windows_free_so): Free lm_info_windows with delete.
7316
9ccbfd7b
SM
73172017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7318
7319 * solib-darwin.c (struct lm_info_darwin): Initialize field.
7320 (darwin_current_sos): Allocate lm_info_darwin with new, remove
7321 cleanup.
7322 (darwin_free_so): Free lm_info_darwin with delete.
7323
76e75227
SM
73242017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7325
7326 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7327 <l_addr_p>: Change type to bool.
7328 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7329 (svr4_free_so): Free lm_info_svr4 with delete.
7330 (svr4_copy_library_list): Replace memcpy with call to copy
7331 constructor.
7332 (library_list_start_library, svr4_default_sos): Allocate
7333 lm_info_svr4 with new.
7334
51046d9e
SM
73352017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7336
7337 * solib-target.c (struct lm_info_target): Add destructor,
7338 initialize fields.
7339 <name>: Change type to std::string.
7340 (library_list_start_library): Allocate lm_info_target with new.
7341 (solib_target_free_library_list): Free lm_info_target with
7342 delete.
7343 (solib_target_current_sos): Adapt to std::string.
7344 (solib_target_free_so): Free lm_info_target with delete.
7345
4023ae76
SM
73462017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7347
7348 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7349 fields.
7350 (frv_current_sos): Allocate lm_info_frv with new.
7351 (frv_relocate_main_executable): Free lm_info_frv with delete,
7352 allocate with new.
7353 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7354
af43057b
SM
73552017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7356
7357 * solib-frv.c (struct lm_info_frv): Fix indentation.
7358
b0911207
SM
73592017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7360
7361 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7362 map field.
7363 (dsbt_current_sos): Allocate lm_info_dsbt with new.
7364 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7365 and allocate with new.
7366 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7367
6c401f72
SM
73682017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7369
7370 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7371 <filename, member_name>: Change type to std::string.
7372 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7373 (library_list_start_library): Allocate lm_info_aix with new.
7374 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7375 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7376 with copy constructor.
7377
d0e449a1
SM
73782017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7379
7380 * solist.h (struct lm_info): Remove.
7381 (struct lm_info_base): New class.
7382 (struct so_list) <lm_info>: Change type to lm_info_base *.
7383 * nto-tdep.c (struct lm_info): Remove.
7384 (lm_addr): Adjust.
7385 * solib-aix.c (struct lm_info): Rename to ...
7386 (struct lm_info_aix): ... this. Extend lm_info_base.
7387 (lm_info_p): Rename to ...
7388 (lm_info_aix_p): ... this, and adjust.
7389 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7390 solib_aix_parse_libraries, library_list_start_library,
7391 solib_aix_free_library_list, solib_aix_parse_libraries,
7392 solib_aix_get_library_list,
7393 solib_aix_relocate_section_addresses, solib_aix_free_so,
7394 solib_aix_get_section_offsets,
7395 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7396 Adjust.
7397 (struct solib_aix_inferior_data) <library_list>: Adjust.
7398 * solib-darwin.c (struct lm_info): Rename to ...
7399 (struct lm_info_darwin): ... this. Extend lm_info_base.
7400 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7401 * solib-dsbt.c (struct lm_info): Rename to ...
7402 (struct lm_info_dsbt): ... this. Extend lm_info_base.
7403 (struct dsbt_info) <main_executable_lm_info): Adjust.
7404 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7405 dsbt_relocate_section_addresses): Adjust.
7406 * solib-frv.c (struct lm_info): Rename to ...
7407 (struct lm_info_frv): ... this. Extend lm_info_base.
7408 (main_executable_lm_info): Adjust.
7409 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7410 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7411 find_canonical_descriptor_in_load_object,
7412 frv_fdpic_find_canonical_descriptor): Adjust.
7413 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7414 to lm_info_svr4.
7415 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7416 svr4_clear_so, svr4_copy_library_list,
7417 library_list_start_library, svr4_default_sos, svr4_read_so_list,
7418 svr4_current_sos, svr4_fetch_objfile_link_map,
7419 solist_update_incremental): Adjust.
7420 * solib-svr4.h (struct lm_info_svr4): Move here from
7421 solib-svr4.c.
7422 * solib-target.c (struct lm_info): Rename to ...
7423 (struct lm_info_target): ... this. Extend lm_info_base.
7424 (lm_info_p): Rename to ...
7425 (lm_info_target_p): ... this.
7426 (solib_target_parse_libraries, library_list_start_segment,
7427 library_list_start_section, library_list_start_library,
7428 library_list_end_library, solib_target_free_library_list,
7429 solib_target_current_sos, solib_target_free_so,
7430 solib_target_relocate_section_addresses): Adjust.
7431 * windows-nat.c (struct lm_info): Rename to ...
7432 (struct lm_info_windows): ... this. Extend lm_info_base.
7433 (windows_make_so, handle_load_dll, handle_unload_dll,
7434 windows_xfer_shared_libraries): Adjust.
7435
434a4023
SM
74362017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7437
7438 * solib-darwin.c (struct darwin_so_list): Remove.
7439 (darwin_current_sos): Allocate an so_list object instead of a
7440 darwin_so_list, separately allocate an lm_info object.
7441 (darwin_free_so): Free lm_info.
7442
428544e8
JB
74432017-04-28 John Baldwin <jhb@FreeBSD.org>
7444
7445 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7446 with fprintf_filtered.
7447
4621115f
YQ
74482017-04-28 Yao Qi <yao.qi@linaro.org>
7449
7450 * regcache.c (regcache::regcache): New function.
7451 (regcache::~regcache): New function.
7452 (regcache_xmalloc_1): Remove.
7453 (regcache_xmalloc): Call new regcache.
7454 (regcache_xfree): Call delete regcache.
7455 (get_thread_arch_aspace_regcache): Call new regcache.
7456
339053c2
YQ
74572017-04-28 Yao Qi <yao.qi@linaro.org>
7458
7459 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7460 lwp instead of ptid_get_lwp.
7461
7974a605
YQ
74622017-04-28 Yao Qi <yao.qi@linaro.org>
7463
7464 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7465 lwp_info instead of getting from inferior_ptid.
7466
e15c3eb4
KS
74672017-04-27 Keith Seitz <keiths@redhat.com>
7468
7469 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7470 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7471 (CV_CONVERSION_BADNESS): Define.
7472 (rank_one_type): Remove overly restrictive rvalue reference
7473 rank checks.
7474 Add cv-qualifier checks and subranks for type equality.
7475 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7476 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7477 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7478
72bc1d24
SM
74792017-04-27 Simon Marchi <simon.marchi@ericsson.com>
7480
7481 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7482 count when creating the object.
7483
55bcecda
UW
74842017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
7485 Ulrich Weigand <uweigand@de.ibm.com>
7486
7487 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7488 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7489 is used in AIX.
7490 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7491 (process_xcoff_symbol): Likewise.
7492 (scan_xcoff_symtab): Likewise.
7493
5c99fcf8
AH
74942017-04-26 Alan Hayward <alan.hayward@arm.com>
7495
7496 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7497 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7498 (ia64_access_reg): Use get_frame_register_unsigned.
7499 (ia64_access_rse_reg): Likewise.
7500 (ia64_libunwind_frame_prev_register): Likewise.
7501
b41c5a85
JW
75022017-04-26 Jiong Wang <jiong.wang@arm.com>
7503
7504 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7505 * gdbarch.c: Regenerated.
7506 * gdbarch.h: Regenerated.
7507 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7508 visibility external.
7509 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7510 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7511 (enum cfa_how_kind): Move to ...
7512 (struct dwarf2_frame_state_reg_info): Likewise.
7513 (struct dwarf2_frame_state): Likewise.
7514 * dwarf2-frame.h: ... here.
7515 (dwarf2_frame_state_alloc_regs): New declaration.
7516 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7517 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7518
c185f580
AH
75192017-04-26 Alan Hayward <alan.hayward@arm.com>
7520
7521 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7522 regcache_raw_read_unsigned.
7523 (xtensa_pseudo_register_write): Likewise.
7524
19c45594
AH
75252017-04-26 Alan Hayward <alan.hayward@arm.com>
7526
7527 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7528 (nds32_pseudo_register_write): Likewise.
7529
4658f12e
YQ
75302017-04-25 Yao Qi <yao.qi@linaro.org>
7531
7532 * regcache.c (struct regcache) <readonly_p>: Change its type
7533 to bool.
7534 (regcache_xmalloc_1): Update parameter type and callers update.
7535
d581dda8
YQ
75362017-04-25 Yao Qi <yao.qi@linaro.org>
7537
7538 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7539 set_gdbarch_wchar_bit.
7540 * arm-tdep.c (arm_gdbarch_init): Likewise.
7541
debed3db
PA
75422017-04-25 Pedro Alves <palves@redhat.com>
7543
7544 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7545 (BothAreRelocatable, memcopy, memmove): Don't define.
7546 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7547 macros.
7548
b0b92aeb
PA
75492017-04-25 Pedro Alves <palves@redhat.com>
7550
7551 * common/common-defs.h: Include "common/poison.h".
7552 * common/function-view.h: (Not, Or, Requires): Move to traits.h
7553 and adjust.
7554 * common/poison.h: New file.
7555 * common/traits.h: Include <type_traits>.
7556 (Not, Or, Requires): New, moved from common/function-view.h.
7557
16c4d54a
PA
75582017-04-25 Pedro Alves <palves@redhat.com>
7559
7560 * breakpoint.h (struct breakpoint): In-class initialize all
7561 fields. Make boolean fields "bool".
7562 * breakpoint.c (init_raw_breakpoint_without_location): Remove
7563 memset call and initializations no longer necessary.
7564
b5c36682
PA
75652017-04-25 Pedro Alves <palves@redhat.com>
7566
7567 * btrace.c (pt_btrace_insn_flags): Change parameter type to
7568 reference.
7569 (pt_btrace_insn): New function.
7570 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7571
5625a286
PA
75722017-04-25 Pedro Alves <palves@redhat.com>
7573
7574 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
7575 "base" field and inherit from "bp_location" instead. Add
7576 non-default ctor.
7577 (allocate_location_exception): Use new non-default ctor.
7578 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7579 (init_bp_location): Convert to ...
7580 (bp_location::bp_location): ... this new ctor, and remove memset
7581 call.
7582 (base_breakpoint_allocate_location): Use the new non-default ctor.
7583 * breakpoint.h (bp_location): Now a class. Declare default and
7584 non-default ctors. In-class initialize all members.
7585 (init_bp_location): Remove declaration.
7586
23bcc18f
PA
75872017-04-25 Pedro Alves <palves@redhat.com>
7588
7589 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7590 assignment operator.
7591
e1ba3053
YQ
75922017-04-24 Yao Qi <yao.qi@linaro.org>
7593
7594 * doublest.c (convert_doublest_to_floatformat): Call
7595 floatformat_totalsize_bytes.
7596
10f489e5
TT
75972017-04-22 Tom Tromey <tom@tromey.com>
7598
7599 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7600 ui_out_emit_list.
7601 * stack.c (print_frame): Use ui_out_emit_list.
7602 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7603 ui_out_emit_list.
7604 * mi/mi-main.c (print_one_inferior)
7605 (mi_cmd_data_list_register_names)
7606 (mi_cmd_data_list_register_values, mi_cmd_list_features)
7607 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7608 ui_out_emit_list.
7609 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7610 (mi_output_solib_attribs): Use ui_out_emit_list,
7611 ui_out_emit_tuple.
7612 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7613 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7614 (mi_cmd_stack_list_args, list_args_or_locals): Use
7615 ui_out_emit_list.
7616 * disasm.c (do_assembly_only): Use ui_out_emit_list.
7617 * breakpoint.c (print_solib_event, output_thread_groups): Use
7618 ui_out_emit_list.
7619
0092b74d
TT
76202017-04-22 Tom Tromey <tom@tromey.com>
7621
7622 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7623 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7624 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7625
a14a62dd
TT
76262017-04-22 Tom Tromey <tom@tromey.com>
7627
7628 * tracepoint.c (tvariables_info_1)
7629 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7630
46b9c129
TT
76312017-04-22 Tom Tromey <tom@tromey.com>
7632
7633 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7634 annotate_arg_emitter.
7635 * breakpoint.c (print_mention_watchpoint)
7636 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7637 * annotate.h (struct annotate_arg_emitter): New.
7638
2e783024
TT
76392017-04-22 Tom Tromey <tom@tromey.com>
7640
7641 * record-btrace.c (record_btrace_insn_history)
7642 (record_btrace_insn_history_range, record_btrace_call_history)
7643 (record_btrace_call_history_range): Use ui_out_emit_tuple.
7644 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7645 ui_out_emit_tuple.
7646 * stack.c (print_frame_info): Use ui_out_emit_tuple.
7647 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7648 * skip.c (skip_info): Use ui_out_emit_tuple.
7649 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7650 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7651 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7652 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7653 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7654 ui_out_emit_tuple.
7655 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7656 (output_register, mi_cmd_data_read_memory)
7657 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7658 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7659 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7660 Use ui_out_emit_tuple.
7661 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7662 ui_out_emit_tuple.
7663 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7664 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7665 * linux-thread-db.c (info_auto_load_libthread_db): Use
7666 ui_out_emit_tuple.
7667 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7668 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7669 * disasm.c (do_mixed_source_and_assembly_deprecated)
7670 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7671 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7672 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7673 * breakpoint.c (print_one_breakpoint_location)
7674 (print_one_breakpoint): Use ui_out_emit_tuple.
7675 * auto-load.c (print_script, info_auto_load_cmd): Use
7676 ui_out_emit_tuple.
7677 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7678
9be21bb4
SM
76792017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7680
7681 * thread.c (print_thread_info_1): Remove dead code.
7682
0d4c07af
JK
76832017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7684
7685 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7686 GDB_SELF_TEST.
7687 * arm-tdep.c (selftests::arm_record_test): Likewise.
7688
4daf993d
YQ
76892017-04-21 Yao Qi <yao.qi@linaro.org>
7690
7691 * regcache.c (regcache_restore): Remove argument 2. Replace
7692 argument 3 with regcache. Get register status from
7693 src->register_status and get register contents from
7694 register_buffer (src, regnum).
7695 (regcache_cpy): Update.
7696
a6c21d4a
PA
76972017-04-19 Pedro Alves <palves@redhat.com>
7698
7699 * gdbthread.h (thread): Add missing closing parenthesis in
7700 comment.
7701
3a3fd0fd
PA
77022017-04-19 Pedro Alves <palves@redhat.com>
7703
7704 * common/refcounted-object.h: New file.
7705 * gdbthread.h: Include "common/refcounted-object.h".
7706 (thread_info): Inherit from refcounted_object and add comments.
7707 (thread_info::incref, thread_info::decref)
7708 (thread_info::m_refcount): Delete.
7709 (thread_info::deletable): Use the refcounted_object::refcount()
7710 method.
7711 * inferior.c (current_inferior_): Add comment.
7712 (set_current_inferior): Increment/decrement refcounts.
7713 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7714 not-deletable instead of comparing with the current inferior.
7715 (initialize_inferiors): Increment the initial inferior's refcount.
7716 * inferior.h (struct inferior): Forward declare.
7717 Include "common/refcounted-object.h".
7718 (current_inferior, set_current_inferior): Move declaration to
7719 before struct inferior's definition, and fix comment.
7720 (inferior): Inherit from refcounted_object. Add comments.
7721 * thread.c (switch_to_thread_no_regs): Reference the thread's
7722 inferior pointer directly instead of doing a ptid lookup.
7723 (switch_to_no_thread): New function.
7724 (switch_to_thread(thread_info *)): New function, factored out
7725 from ...
7726 (switch_to_thread(ptid_t)): ... this.
7727 (restore_current_thread): Delete.
7728 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7729 fields, and add 'inf' field.
7730 (do_restore_current_thread_cleanup): Check whether old->inf is
7731 alive instead of looking up an inferior by ptid. Use
7732 switch_to_thread and switch_to_no_thread.
7733 (restore_current_thread_cleanup_dtor): Use old->inf directly
7734 instead of lookup up an inferior by id. Decref the inferior.
7735 Don't restore 'removable'.
7736 (make_cleanup_restore_current_thread): Same the inferior pointer
7737 in old, instead of the inferior number. Incref the inferior.
7738 Don't save/clear 'removable'.
7739
9bcb1f16
PA
77402017-04-19 Pedro Alves <palves@redhat.com>
7741
7742 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7743 unittests/scoped_restore-selftests.c.
7744 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7745 * common/scoped_restore.h (scoped_restore_base): Make "class".
7746 (scoped_restore_base::release): New public method.
7747 (scoped_restore_base::scoped_restore_base): New protected ctor.
7748 (scoped_restore_base::m_saved_var): New protected field.
7749 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7750 scoped_restore_base base class instead of m_saved_var directly.
7751 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7752 (scoped_restore_tmpl::scoped_restore_tmpl(const
7753 scoped_restore_tmpl<T>&)): Likewise.
7754 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7755 method.
7756 (scoped_restore_tmpl::saved_var): New method.
7757 (scoped_restore_tmpl::m_saved_var): Delete.
7758 * inferior.h (inferior::detaching): Now a bool.
7759 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7760 cleanup.
7761 * unittests/scoped_restore-selftests.c: New file.
7762
26fcd539
PA
77632017-04-19 Pedro Alves <palves@redhat.com>
7764
7765 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7766 Re-sort in alphabetic order.
7767
fdd243b0
PA
77682017-04-18 Pedro Alves <palves@redhat.com>
7769
7770 * xml-support.c (obstack_xml_printf): Delete.
7771 * xml-support.h (obstack_xml_printf): Delete.
7772
4895cde2
PA
77732017-04-18 Pedro Alves <palves@redhat.com>
7774
7775 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7776 vdebug, verror, body_text, start_element, end_element, name,
7777 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7778 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7779 is_xinclude>: Make private and add m_ prefix.
7780 (gdb_xml_parser::body_text): New method, based on ...
7781 (gdb_xml_body_text): ... this. Adjust.
7782 (gdb_xml_parser::vdebug): New method, based on ...
7783 (gdb_xml_debug): ... this. Adjust.
7784 (gdb_xml_parser::verror): New method, based on ...
7785 (gdb_xml_error): ... this. Adjust.
7786 (gdb_xml_parser::start_element): New method, based on ...
7787 (gdb_xml_start_element): ... this. Adjust.
7788 (gdb_xml_start_element_wrapper): Defer to
7789 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7790 (gdb_xml_parser::end_element): New method, based on ...
7791 (gdb_xml_end_element_wrapper): ... this. Adjust.
7792 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7793 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7794 (gdb_xml_parser::use_dtd): New method, based on ...
7795 (gdb_xml_use_dtd): ... this. Adjust.
7796 (gdb_xml_parser::parse): New method, based on ...
7797 (gdb_xml_parse): ... this. Adjust.
7798 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7799 (xinclude_start_include): Adjust to call the parser's name method.
7800 (xml_xinclude_default, xml_xinclude_start_doctype)
7801 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7802 method.
7803 (xml_process_xincludes): Adjust to call parser methods.
7804 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7805 declarations.
7806
bd8a901f
PA
78072017-04-18 Pedro Alves <palves@redhat.com>
7808
7809 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7810 gdb::optional<std::string>.
7811 * xml-support.c: Include <string>.
7812 (scope_level::scope_level(scope_level &&))
7813 (scope_level::~scope_level): Delete.
7814 (scope_level::body): Now a std::string.
7815 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7816 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7817 parameter.
7818 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7819 (xinclude_parsing_data::output): Now a std::string reference.
7820 (xinclude_start_include): Adjust.
7821 (xml_xinclude_default): Adjust.
7822 (xml_process_xincludes): Add 'output' parameter, and return bool.
7823 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7824 and return bool.
7825 * xml-tdesc.c: Include <unordered_map> and <string>.
7826 (tdesc_xml_cache): Delete.
7827 (tdesc_xml_cache_s): Delete.
7828 (xml_cache): Now an std::unordered_map.
7829 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7830 (target_fetch_description_xml): Change return type to
7831 gdb::optional<std::string>, and adjust.
7832 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7833 (target_fetch_description_xml): Change return type to
7834 gdb::optional<std::string>.
7835
d35d1958
PA
78362017-04-18 Pedro Alves <palves@redhat.com>
7837
7838 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7839 unittests/optional-selftests.c.
7840 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7841 * unittests/optional-selftests.c: New file.
7842 * unittests/optional/assignment/1.cc: New file.
7843 * unittests/optional/assignment/2.cc: New file.
7844 * unittests/optional/assignment/3.cc: New file.
7845 * unittests/optional/assignment/4.cc: New file.
7846 * unittests/optional/assignment/5.cc: New file.
7847 * unittests/optional/assignment/6.cc: New file.
7848 * unittests/optional/assignment/7.cc: New file.
7849 * unittests/optional/cons/copy.cc: New file.
7850 * unittests/optional/cons/default.cc: New file.
7851 * unittests/optional/cons/move.cc: New file.
7852 * unittests/optional/cons/value.cc: New file.
7853 * unittests/optional/in_place.cc: New file.
7854 * unittests/optional/observers/1.cc: New file.
7855 * unittests/optional/observers/2.cc: New file.
7856
22796e97
PA
78572017-04-18 Pedro Alves <palves@redhat.com>
7858
7859 * common/gdb_optional.h: Include common/traits.h.
7860 (in_place_t): New type.
7861 (in_place): New constexpr variable.
7862 (optional::optional): Remove member initialization of
7863 m_instantiated.
7864 (optional::optional(in_place_t...)): New constructor.
7865 (optional::~optional): Use reset.
7866 (optional::optional(const optional&)): New.
7867 (optional::optional(const optional&&)): New.
7868 (optional::optional(T &)): New.
7869 (optional::optional(T &&)): New.
7870 (operator::operator=(const optional &)): New.
7871 (operator::operator=(optional &&)): New.
7872 (operator::operator= (const T &))
7873 (operator::operator= (T &&))
7874 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7875 (operator::reset): New.
7876 (operator::m_instantiated):: Add in-class initializer.
7877 * common/traits.h: Include <type_traits>.
7878 (struct And): New types.
7879
a7fc9b61
PA
78802017-04-18 Pedro Alves <palves@redhat.com>
7881
7882 * xml-support.c: Include <vector>.
7883 (scope_level::scope_level(const gdb_xml_element *))
7884 (scope_level::scope_level(scope_level&&)): New.
7885 (scope_level::~scope_level): New.
7886 (scope_level_s): Delete.
7887 (gdb_xml_parser::scopes): Now a std::vector.
7888 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7889 Use std::vector.
7890 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7891 scope cleanup code.
7892 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7893 of the scopes member. Use std::vector::emplace_back.
7894
010151c9
PA
78952017-04-18 Pedro Alves <palves@redhat.com>
7896
7897 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7898 a bool.
7899 (gdb_xml_end_element): Change type of first parameter.
7900 (gdb_xml_cleanup): Rename to ...
7901 (gdb_xml_parser::~gdb_xml_parser): ... this.
7902 (gdb_xml_create_parser_and_cleanup): Delete with ...
7903 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7904 to this new ctor.
7905 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7906 using gdb_xml_create_parser_and_cleanup.
7907 (xinclude_parsing_data): Add ctor/dtor.
7908 (xml_xinclude_cleanup): Delete.
7909 (xml_process_xincludes): Create a local xinclude_parsing_data
7910 instead of heap-allocating one. Create a local gdb_xml_parser
7911 instead of heap-allocating one with
7912 gdb_xml_create_parser_and_cleanup.
7913
d56060f0
JB
79142017-04-18 John Baldwin <jhb@FreeBSD.org>
7915
7916 PR threads/20743
7917 * fbsd-nat.c (resume_one_thread_cb): Remove.
7918 (resume_all_threads_cb): Remove.
7919 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7920 iterate_over_threads.
7921
305d16a9
JB
79222017-04-17 Joel Brobecker <brobecker@adacore.com>
7923
7924 * NEWS: Create a new section for the next release branch.
7925 Rename the section of the current branch, now that it has
7926 been cut.
7927
8bb57231
JB
79282017-04-17 Joel Brobecker <brobecker@adacore.com>
7929
7930 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7931 * version.in: Bump version to 8.0.50.DATE-git.
7932
096c92dd
SDJ
79332017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7934
7935 PR gdb/21385
7936 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7937 independently of the host, and fix build breakage on Cygwin.
7938
0550c955
PA
79392017-04-13 Pedro Alves <palves@redhat.com>
7940
7941 * inferior.c (free_inferior): Convert to ...
7942 (inferior::~inferior): ... this dtor.
7943 (inferior::inferior): New ctor, factored out from ...
7944 (add_inferior_silent): ... here. Allocate the inferior with a new
7945 expression.
7946 (delete_inferior): Call delete instead of free_inferior.
7947 * inferior.h (gdb_environ, continuation): Forward declare.
7948 (inferior): Now a class. Add in-class initialization to all
7949 members. Make boolean fields bool, except 'detaching'.
7950 (inferior::inferior): New explicit ctor.
7951 (inferior::~inferior): New.
7952
e3d60dfc
PA
79532017-04-13 Pedro Alves <palves@redhat.com>
7954
7955 * inferior.c (init_inferior_list): Delete.
7956 * inferior.h (init_inferior_list): Delete.
7957
5fd69d0a
PA
79582017-04-13 Pedro Alves <palves@redhat.com>
7959
7960 PR threads/13217
7961 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7962 (top level): Call it twice, with different thread sets.
7963
c6609450
PA
79642017-04-13 Pedro Alves <palves@redhat.com>
7965
7966 * thread.c: Include <algorithm>.
7967 (thread_array_cleanup): Delete.
7968 (scoped_inc_dec_ref): New class.
7969 (live_threads_count): New function.
7970 (set_thread_refcount): Delete.
7971 (tp_array_compar_ascending): Now a bool.
7972 (tp_array_compar): Convert to a std::sort comparison function.
7973 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7974 and live_threads_count.
7975
2a00d7ce
PA
79762017-04-13 Pedro Alves <palves@redhat.com>
7977
7978 * infrun.c (follow_fork_inferior): Also switch the current
7979 inferior.
7980
441d7c93
PA
79812017-04-13 Pedro Alves <palves@redhat.com>
7982
7983 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7984 before calling create_internal_breakpoint.
7985
808480f6
PA
79862017-04-13 Pedro Alves <palves@redhat.com>
7987
7988 * fork-child.c (execv_argv): New class.
7989 (breakup_args): Refactored as ...
7990 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7991 Copy arguments to storage and replace separators with NULL
7992 terminators in place.
7993 (escape_bang_in_quoted_argument): Adjust to return bool.
7994 (execv_argv::execv_argv): New ctor.
7995 (execv_argv::init_for_shell): New method, factored out from
7996 fork_inferior. Don't strdup strings into the vector.
7997 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7998 Remove free_vector_argv call.
7999
ad3d022a
YQ
80002017-04-13 Yao Qi <yao.qi@linaro.org>
8001
8002 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8003 tdep->rx_psw_type.
8004
e6ddc3bf
YQ
80052017-04-13 Yao Qi <yao.qi@linaro.org>
8006
8007 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8008 * rx-tdep.c (rx_gdbarch_init): Likewise.
8009
bfb8cf90
PA
80102017-04-13 Pedro Alves <palves@redhat.com>
8011
8012 * breakpoint.h (struct breakpoint): Reindent.
8013
f5336ca5
PA
80142017-04-13 Pedro Alves <palves@redhat.com>
8015
8016 * breakpoint.c (bp_location): Rename to ...
8017 (bp_locations): ... this. All references updated.
8018 (bp_location_count): Rename to ...
8019 (bp_locations_count): ... this. All references updated.
8020 (bp_location_placed_address_before_address_max): Rename to ...
8021 (bp_locations_placed_address_before_address_max): ... this. All
8022 references updated.
8023 (bp_location_shadow_len_after_address_max): Rename to ...
8024 (bp_locations_shadow_len_after_address_max): ... this. All
8025 references updated.
8026 (bp_location_compare_addrs): Rename to ...
8027 (bp_locations_compare_addrs): ... this. All references updated.
8028 (bp_location_compare):Rename to ...
8029 (bp_locations_compare): ... this. All references updated.
8030 (bp_location_target_extensions_update): Rename to ...
8031 (bp_locations_target_extensions_update): ... this. All references
8032 updated.
8033
be628ab8
SDJ
80342017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8035
8036 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8037 * common/common.m4: Check headers 'termios.h', 'termio.h' and
8038 'sgtty.h'.
8039 * common/gdb_termios.h: New file, with parts of "terminal.h".
8040 * inflow.c: Include "gdb_termios.h".
8041 * ser-unix.c: Include "gdb_termios.h".
8042 * terminal.h: Move terminal-related defines to
8043 "common/gdb_termios.h".
8044
8e9e35b1
TT
80452017-04-12 Tom Tromey <tom@tromey.com>
8046
8047 * probe.c (parse_probes): Update.
8048 * location.h (delete_event_location): Don't declare.
8049 (event_location_deleter::operator()): Update.
8050 * location.c (event_location_deleter::operator()): Rename from
8051 delete_event_location.
8052 * linespec.h (linespec_result) <location>: Change type to
8053 event_location_up.
8054 * linespec.c (canonicalize_linespec, event_location_to_sals)
8055 (decode_objc): Update.
8056 (linespec_result): Don't call delete_event_location.
8057 * breakpoint.c (create_breakpoints_sal)
8058 (bkpt_probe_create_sals_from_location)
8059 (strace_marker_create_sals_from_location): Update.
8060
16e802b9
TT
80612017-04-12 Tom Tromey <tom@tromey.com>
8062
8063 * linespec.h (struct linespec_result): Add constructor and
8064 destructor.
8065 (init_linespec_result, destroy_linespec_result)
8066 (make_cleanup_destroy_linespec_result): Don't declare.
8067 * linespec.c (init_linespec_result): Remove.
8068 (linespec_result::~linespec_result): Rename from
8069 destroy_linespec_result. Update.
8070 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8071 Remove.
8072 * breakpoint.c (create_breakpoint, break_range_command)
8073 (decode_location_default): Update.
8074 * ax-gdb.c (agent_command_1): Update.
8075
d28cd78a
TT
80762017-04-12 Tom Tromey <tom@tromey.com>
8077
8078 * remote.c (remote_download_tracepoint): Update.
8079 * python/py-breakpoint.c (bppy_get_location): Update.
8080 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8081 (gdbscm_breakpoint_location): Update.
8082 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8083 * breakpoint.h (struct breakpoint) <location, location_range_end>:
8084 Change type to event_location_up.
8085 * breakpoint.c (create_overlay_event_breakpoint)
8086 (create_longjmp_master_breakpoint)
8087 (create_std_terminate_master_breakpoint)
8088 (create_exception_master_breakpoint)
8089 (breakpoint_event_location_empty_p, print_breakpoint_location)
8090 (print_one_breakpoint_location, create_thread_event_breakpoint)
8091 (init_breakpoint_sal, create_breakpoint)
8092 (print_recreate_ranged_breakpoint, break_range_command)
8093 (init_ada_exception_breakpoint, say_where): Update.
8094 (base_breakpoint_dtor): Don't call delete_event_location.
8095 (bkpt_print_recreate, tracepoint_print_recreate)
8096 (dprintf_print_recreate, update_static_tracepoint)
8097 (breakpoint_re_set_default): Update.
8098
711799d5
TT
80992017-04-12 Tom Tromey <tom@tromey.com>
8100
8101 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8102 type of "to_do". Update.
8103 (compute_stack_depth): Use std::vector.
8104
52d214d3
TT
81052017-04-12 Tom Tromey <tom@tromey.com>
8106
8107 * printcmd.c (find_instruction_backward): Use std::vector.
8108
4c404b8b
TT
81092017-04-12 Tom Tromey <tom@tromey.com>
8110
8111 * symfile.c (objfilep): Remove typedef.
8112 (reread_symbols): Use a std::vector.
8113
156d9eab
TT
81142017-04-12 Tom Tromey <tom@tromey.com>
8115
8116 * mi/mi-main.c (exec_direction_forward): Remove.
8117 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8118 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8119 scoped_restore.
8120 * guile/guile.c (guile_repl_command, guile_command)
8121 (gdbscm_execute_gdb_command): Use scoped_restore.
8122 * go-exp.y (go_parse): Use scoped_restore.
8123 * d-exp.y (d_parse): Use scoped_restore.
8124 * cli/cli-decode.c (cmd_func): Use scoped_restore.
8125 * c-exp.y (c_parse): Use scoped_restore.
8126
4d89769a
TT
81272017-04-12 Tom Tromey <tom@tromey.com>
8128
8129 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8130 (mi_parse): Update return type.
8131 (mi_parse_free): Remove.
8132 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8133 (mi_parse::~mi_parse): Rename from mi_parse_free.
8134 (mi_parse_cleanup): Remove.
8135 (mi_parse): Return a unique_ptr. Use new.
8136 * mi/mi-main.c (mi_execute_command): Update.
8137
4b217cc7
TT
81382017-04-12 Tom Tromey <tom@tromey.com>
8139
8140 * location.c (explicit_location_lex_one): Return a
8141 unique_xmalloc_ptr.
8142 (string_to_explicit_location): Update. Remove cleanups.
8143
59d3651b
TT
81442017-04-12 Tom Tromey <tom@tromey.com>
8145
8146 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8147 (compare_value_and_voffset): Change type. Update.
8148 (compute_vtable_size): Change type of "offset_vec".
8149 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
8150 (gnuv3_get_typeid): Remove extraneous declaration.
8151
b24b0d6c
TT
81522017-04-12 Tom Tromey <tom@tromey.com>
8153
8154 * charset.h (wchar_iterator): Fix comment.
8155
80a3b8c5
TT
81562017-04-12 Tom Tromey <tom@tromey.com>
8157
8158 * charset.c (iconv_wrapper): New class.
8159 (cleanup_iconv): Remove.
8160 (convert_between_encodings): Use it.
8161
c83dd867
TT
81622017-04-12 Tom Tromey <tom@tromey.com>
8163
8164 * symfile.h (increment_reading_symtab): Update type.
8165 * symfile.c (decrement_reading_symtab): Remove.
8166 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8167 * psymtab.c (psymtab_to_symtab): Update.
8168 * dwarf2read.c (dw2_instantiate_symtab): Update.
8169
0e8621a0
TT
81702017-04-12 Tom Tromey <tom@tromey.com>
8171
8172 * jit.c (struct jit_reader): Declare separately. Add constructor
8173 and destructor. Change type of "handle".
8174 (loaded_jit_reader): Define separately.
8175 (jit_reader_load): Update. New "new".
8176 (jit_reader_unload_command): Use "delete".
8177 * gdb-dlfcn.h (struct dlclose_deleter): New.
8178 (gdb_dlhandle_up): New typedef.
8179 (gdb_dlopen, gdb_dlsym): Update types.
8180 (gdb_dlclose): Remove.
8181 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8182 (gdb_dlsym): Change type of "handle".
8183 (make_cleanup_dlclose): Remove.
8184 (dlclose_deleter::operator()): Rename from gdb_dlclose.
8185 * compile/compile-c-support.c (load_libcc): Update.
8186
67d89901
TT
81872017-04-12 Tom Tromey <tom@tromey.com>
8188
8189 * symtab.h (find_pcs_for_symtab_line): Change return type.
8190 * symtab.c (find_pcs_for_symtab_line): Change return type.
8191 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8192 type of "vec". Update.
8193 (ltpy_get_pcs_for_line): Update.
8194 * linespec.c (decode_digits_ordinary): Update.
8195
93921405
TT
81962017-04-12 Tom Tromey <tom@tromey.com>
8197
8198 * tracepoint.c (actions_command): Update.
8199 * python/python.c (python_command, python_interactive_command):
8200 Update.
8201 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8202 * guile/guile.c (guile_command): Update.
8203 * defs.h (read_command_lines, read_command_lines_1): Return
8204 command_line_up.
8205 (command_lines_deleter): New struct.
8206 (command_line_up): New typedef.
8207 * compile/compile.c (compile_code_command)
8208 (compile_print_command): Update.
8209 * cli/cli-script.h (get_command_line, copy_command_lines): Return
8210 command_line_up.
8211 (make_cleanup_free_command_lines): Remove.
8212 * cli/cli-script.c (get_command_line, read_command_lines_1)
8213 (copy_command_lines): Return command_line_up.
8214 (while_command, if_command, read_command_lines, define_command)
8215 (document_command): Update.
8216 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8217 Remove.
8218 * breakpoint.h (breakpoint_set_commands): Change type of
8219 "commands".
8220 * breakpoint.c (breakpoint_set_commands): Change type of
8221 "commands". Update.
8222 (do_map_commands_command, update_dprintf_command_list)
8223 (create_tracepoint_from_upload): Update.
8224
ffc2605c
TT
82252017-04-12 Tom Tromey <tom@tromey.com>
8226
8227 * tracepoint.c (scope_info): Update.
8228 * spu-tdep.c (spu_catch_start): Update.
8229 * python/python.c (gdbpy_decode_line): Update.
8230 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8231 * python/py-breakpoint.c (bppy_init): Update.
8232 * probe.c (parse_probes): Update.
8233 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8234 * location.h (event_location_deleter): New struct.
8235 (event_location_up): New typedef.
8236 (new_linespec_location, new_address_location, new_probe_location)
8237 (new_explicit_location, copy_event_location)
8238 (string_to_event_location, string_to_event_location_basic)
8239 (string_to_explicit_location): Update return type.
8240 (make_cleanup_delete_event_location): Remove.
8241 * location.c (new_linespec_location, new_address_location)
8242 (new_probe_location, new_explicit_location, copy_event_location):
8243 Return event_location_up.
8244 (delete_event_location_cleanup)
8245 (make_cleanup_delete_event_location): Remove.
8246 (string_to_explicit_location, string_to_event_location_basic)
8247 (string_to_event_location): Return event_location_up.
8248 * linespec.c (canonicalize_linespec, event_location_to_sals)
8249 (decode_line_with_current_source)
8250 (decode_line_with_last_displayed, decode_objc): Update.
8251 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8252 * completer.c (location_completer): Update.
8253 * cli/cli-cmds.c (edit_command, list_command): Update.
8254 * breakpoint.c (create_overlay_event_breakpoint)
8255 (create_longjmp_master_breakpoint)
8256 (create_std_terminate_master_breakpoint)
8257 (create_exception_master_breakpoint)
8258 (create_thread_event_breakpoint): Update.
8259 (init_breakpoint_sal): Update. Remove some dead code.
8260 (create_breakpoint_sal): Change type of "location". Update.
8261 (create_breakpoints_sal, create_breakpoint, break_command_1)
8262 (dprintf_command, break_range_command, until_break_command)
8263 (init_ada_exception_breakpoint)
8264 (strace_marker_create_sals_from_location)
8265 (update_static_tracepoint, trace_command, ftrace_command)
8266 (strace_command, create_tracepoint_from_upload): Update.
8267 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8268 * ax-gdb.c (agent_command_1): Update.
8269
8f10c932
PA
82702017-04-12 Pedro Alves <palves@redhat.com>
8271
8272 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8273 * configure.tgt: Handle i[34567]86-*-go32* and
8274 i[34567]86-*-msdosdjgpp*.
8275 * i386-tdep.c (i386_svr4_reg_to_regnum):
8276 Make extern.
8277 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8278 i386-go32-tdep.c.
8279 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8280 * i386-go32-tdep.c: New file.
8281 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8282 declarations.
8283
0a31ccfb
SM
82842017-04-12 Simon Marchi <simon.marchi@ericsson.com>
8285
8286 * aix-thread.c (pd_status2str): Change return type to const char *.
8287
e9bb3fbb
PA
82882017-04-12 Pedro Alves <palves@redhat.com>
8289
8290 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8291 calls to set_gdbarch_gnu_triplet_regexp.
8292
53375380
PA
82932017-04-12 Pedro Alves <palves@redhat.com>
8294
8295 PR gdb/21323
8296 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8297 New enum value.
8298 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8299 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8300 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8301 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8302 * gdbarch.h, gdbarch.c: Regenerate.
8303 * aarch64-tdep.c (aarch64_gdbarch_init): Override
8304 gdbarch_wchar_bit and gdbarch_wchar_signed.
8305 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8306 * arm-tdep.c (arm_gdbarch_init): Likewise.
8307 * avr-tdep.c (avr_gdbarch_init): Likewise.
8308 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8309 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8310 * i386-tdep.c (i386_go32_init_abi): Likewise.
8311 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8312 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8313 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8314 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8315 * sh-tdep.c (sh_gdbarch_init): Likewise.
8316 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8317 * sparc64-tdep.c (sparc64_init_abi): Likewise.
8318 * windows-tdep.c (windows_init_abi): Likewise.
8319 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8320
53e710ac
PA
83212017-04-12 Pedro Alves <palves@redhat.com>
8322
8323 PR c++/21323
8324 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8325 cplus_primitive_type_char32_t>: New enum values.
8326 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8327 and cplus_primitive_type_char32_t.
8328 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8329 32, use the archtecture's built-in type for char16_t and char32_t,
8330 respectively. Otherwise, fallback to init_integer_type as before,
8331 but make the type unsigned, and issue a complaint.
8332 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8333
ab0538b8
AH
83342017-04-12 Alan Hayward <alan.hayward@arm.com>
8335
5e0e0422 8336 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
8337 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8338
5430098f
SDJ
83392017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8340
8341 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8342 'const char *'.
8343
7c5ded6a
SDJ
83442017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8345
8346 * common/common-utils.c (free_vector_argv): New function.
8347 * common/common-utils.h: Include <vector>.
8348 (free_vector_argv): New prototype.
8349 * darwin-nat.c (darwin_create_inferior): Rewrite function
8350 prototype in order to constify "exec_file" and accept a
8351 "std::string" for "allargs".
8352 * fork-child.c: Include <vector>.
8353 (breakup_args): Rewrite function, using C++.
8354 (fork_inferior): Rewrite function header, constify "exec_file_arg"
8355 and accept "std::string" for "allargs". Update the code to
8356 calculate "argv" based on "allargs". Update calls to "exec_fun"
8357 and "execvp".
8358 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8359 order to constify "exec_file" and accept a "std::string" for
8360 "allargs".
8361 * go32-nat.c (go32_create_inferior): Likewise.
8362 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8363 * infcmd.c (run_command_1): Constify "exec_file". Use
8364 "std::string" for inferior arguments.
8365 * inferior.h (fork_inferior): Update prototype.
8366 * linux-nat.c (linux_nat_create_inferior): Rewrite function
8367 prototype in order to constify "exec_file" and accept a
8368 "std::string" for "allargs".
8369 * nto-procfs.c (procfs_create_inferior): Likewise.
8370 * procfs.c (procfs_create_inferior): Likewise.
8371 * remote-sim.c (gdbsim_create_inferior): Likewise.
8372 * remote.c (extended_remote_run): Update code to accept
8373 "std::string" as argument.
8374 (extended_remote_create_inferior): Rewrite function prototype in
8375 order to constify "exec_file" and accept a "std::string" for
8376 "allargs".
8377 * rs6000-nat.c (super_create_inferior): Likewise.
8378 (rs6000_create_inferior): Likewise.
8379 * target.h (struct target_ops) <to_create_inferior>: Likewise.
8380 * windows-nat.c (windows_create_inferior): Likewise.
8381
ae0eee42
PA
83822017-04-11 Pedro Alves <palves@redhat.com>
8383
8384 * thread.c: Fix whitespace throughout.
8385
a6acac06
PR
83862017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
8387
8388 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8389
64403bd1
AH
83902017-04-11 Alan Hayward <alan.hayward@arm.com>
8391
8392 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8393
a5bef50f
SDJ
83942017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
8395
8396 PR gdb/21364
8397 * osdata.c (info_osdata): Check if 'type' is an empty string
8398 instead of NULL.
8399
9295a5a9
PA
84002017-04-10 Pedro Alves <palves@redhat.com>
8401
8402 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8403 (ptid_to_global_thread_id, in_thread_list)
8404 (do_captured_list_thread_ids, set_resumed, set_running)
8405 (set_executing, set_stop_requested, finish_thread_state)
8406 (validate_registers_access, can_access_registers_ptid)
8407 (print_thread_info_1, switch_to_thread)
8408 (do_restore_current_thread_cleanup)
8409 (make_cleanup_restore_current_thread, thread_command)
8410 (thread_name_command): Use operator== instead of ptid_equal.
8411
996812e3
PA
84122017-04-10 Pedro Alves <palves@redhat.com>
8413
8414 * thread.c (struct current_thread_cleanup) <next>: Delete field.
8415 (current_thread_cleanup_chain): Delete.
8416 (restore_current_thread_cleanup_dtor)
8417 (make_cleanup_restore_current_thread): Remove references to
8418 current_thread_cleanup_chain.
8419
845b344f
AH
84202017-04-10 Alan Hayward <alan.hayward@arm.com>
8421
8422 * msp430-tdep.c (msp430_pseudo_register_read): Never return
8423 REG_UNKNOWN.
8424
803bdfe4
YQ
84252017-04-10 Yao Qi <yao.qi@linaro.org>
8426
8427 PR gdb/19942
8428 * gdbthread.h (thread_info::deletable): New method.
8429 (thread_info::incref): New method.
8430 (thread_info::decref): New method.
8431 (thread_info::refcount): Move it to private.
8432 * infrun.c (save_stop_context): Call inc_refcount.
8433 (release_stop_context_cleanup): Likewise.
8434 * thread.c (set_thread_exited): New function.
8435 (init_thread_list): Delete "tp" only it is deletable, otherwise
8436 call set_thread_exited.
8437 (delete_thread_1): Call set_thread_exited.
8438 (current_thread_cleanup) <inferior_pid>: Remove.
8439 <thread>: New field.
8440 (restore_current_thread_ptid_changed): Removed.
8441 (do_restore_current_thread_cleanup): Adjust.
8442 (restore_current_thread_cleanup_dtor): Don't call
8443 find_thread_ptid.
8444 (set_thread_refcount): Use dec_refcount.
8445 (make_cleanup_restore_current_thread): Adjust.
8446 (thread_apply_all_command): Call inc_refcount.
8447 (_initialize_thread): Don't call
8448 observer_attach_thread_ptid_changed.
8449
8c25b497
YQ
84502017-04-10 Yao Qi <yao.qi@linaro.org>
8451
8452 * thread.c (delete_thread_1): Hoist code on marking thread as
8453 exited.
8454
8473b447
SM
84552017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8456
8457 * windows-nat.c (windows_detach): Initialize ptid with
8458 minus_one_ptid.
8459
6670ec13
SM
84602017-04-07 Simon Marchi <simon.marchi@ericsson.com>
8461
8462 * unittests/ptid-selftests.c: Fix erroneous assert messages.
8463
ba2f91bb
AH
84642017-04-07 Alan Hayward <alan.hayward@arm.com>
8465
8466 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8467 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8468 (bfin_pseudo_register_write): Likewise
8469
436252de
SM
84702017-04-06 Simon Marchi <simon.marchi@ericsson.com>
8471
8472 * common/ptid.h (struct ptid): Change to...
8473 (class ptid_t): ... this.
8474 <ptid_t>: New constructors.
8475 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8476 matches>: New methods.
8477 <make_null, make_minus_one>: New static methods.
8478 <pid>: Rename to...
8479 <m_pid>: ...this.
8480 <lwp>: Rename to...
8481 <m_lwp>: ...this.
8482 <tid>: Rename to...
8483 <m_tid>: ...this.
8484 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8485 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8486 as references, move comment to class ptid_t.
8487 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8488 ptid_t static methods.
8489 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8490 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8491 Take ptid arguments as references, implement using ptid_t methods.
8492 * unittests/ptid-selftests.c: New file.
8493 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8494 unittests/ptid-selftests.c.
8495 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8496
0dedf377
TP
84972017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
8498
8499 * python/python.c (python_run_simple_file): Cast mode literal to
8500 non-const char pointer as expected by PyFile_FromString.
8501
4e9868d4
SM
85022017-04-05 Simon Marchi <simon.marchi@ericsson.com>
8503
8504 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8505 minus_one_ptid and null_ptid.
8506
9bf2a700
PA
85072017-04-05 Pedro Alves <palves@redhat.com>
8508
8509 * warning.m4 (build_warnings): Remove -Wno-write-strings.
8510 * configure: Regenerate.
8511
a121b7c1
PA
85122017-04-05 Pedro Alves <palves@redhat.com>
8513
8514 * ada-exp.y (yyerror): Constify.
8515 * ada-lang.c (bound_name, get_selections)
8516 (ada_variant_discrim_type)
8517 (ada_variant_discrim_name, ada_value_struct_elt)
8518 (ada_lookup_struct_elt_type, is_unchecked_variant)
8519 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8520 (catch_ada_exception_command_split)
8521 (catch_ada_assert_command_split, catch_assert_command)
8522 (ada_op_name): Constify.
8523 * ada-lang.h (ada_yyerror, get_selections)
8524 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8525 * arc-tdep.c (arc_print_frame_cache): Constify.
8526 * arm-tdep.c (arm_skip_stub): Constify.
8527 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8528 (gen_aggregate_elt_ref): Constify.
8529 * bcache.c (print_bcache_statistics): Constify.
8530 * bcache.h (print_bcache_statistics): Constify.
8531 * break-catch-throw.c (catch_exception_command_1):
8532 * breakpoint.c (struct ep_type_description::description):
8533 Constify.
8534 (add_solib_catchpoint): Constify.
8535 (catch_fork_command_1): Add cast.
8536 (add_catch_command): Constify.
8537 * breakpoint.h (add_catch_command, add_solib_catchpoint):
8538 Constify.
8539 * bsd-uthread.c (bsd_uthread_state): Constify.
8540 * buildsym.c (patch_subfile_names): Constify.
8541 * buildsym.h (next_symbol_text_func, patch_subfile_names):
8542 Constify.
8543 * c-exp.y (yyerror): Constify.
8544 (token::oper): Constify.
8545 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8546 * c-varobj.c (cplus_describe_child): Constify.
8547 * charset.c (find_charset_names): Add cast.
8548 (find_charset_names): Constify array and add const_cast.
8549 * cli/cli-cmds.c (complete_command, cd_command): Constify.
8550 (edit_command): Constify.
8551 * cli/cli-decode.c (lookup_cmd): Constify.
8552 * cli/cli-dump.c (dump_memory_command, dump_value_command):
8553 Constify.
8554 (struct dump_context): Constify.
8555 (add_dump_command, restore_command): Constify.
8556 * cli/cli-script.c (get_command_line): Constify.
8557 * cli/cli-script.h (get_command_line): Constify.
8558 * cli/cli-utils.c (check_for_argument): Constify.
8559 * cli/cli-utils.h (check_for_argument): Constify.
8560 * coff-pe-read.c (struct read_pe_section_data): Constify.
8561 * command.h (lookup_cmd): Constify.
8562 * common/print-utils.c (decimal2str): Constify.
8563 * completer.c (gdb_print_filename): Constify.
8564 * corefile.c (set_gnutarget): Constify.
8565 * cp-name-parser.y (yyerror): Constify.
8566 * cp-valprint.c (cp_print_class_member): Constify.
8567 * cris-tdep.c (cris_register_name, crisv32_register_name):
8568 Constify.
8569 * d-exp.y (yyerror): Constify.
8570 (struct token::oper): Constify.
8571 * d-lang.h (d_yyerror): Constify.
8572 * dbxread.c (struct header_file_location::name): Constify.
8573 (add_old_header_file, add_new_header_file, last_function_name)
8574 (dbx_next_symbol_text, add_bincl_to_list)
8575 (find_corresponding_bincl_psymtab, set_namestring)
8576 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8577 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8578 * defs.h (command_line_input, print_address_symbolic)
8579 (deprecated_readline_begin_hook): Constify.
8580 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8581 Constify.
8582 * event-top.c (handle_line_of_input): Constify and add cast.
8583 * exceptions.c (catch_errors): Constify.
8584 * exceptions.h (catch_errors): Constify.
8585 * expprint.c (print_subexp_standard, op_string, op_name)
8586 (op_name_standard, dump_raw_expression, dump_raw_expression):
8587 * expression.h (op_name, op_string, dump_raw_expression):
8588 Constify.
8589 * f-exp.y (yyerror): Constify.
8590 (struct token::oper): Constify.
8591 (struct f77_boolean_val::name): Constify.
8592 * f-lang.c (f_word_break_characters): Constify.
8593 * f-lang.h (f_yyerror): Constify.
8594 * fork-child.c (fork_inferior): Add cast.
8595 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8596 (new_variant): Constify.
8597 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8598 * gdbarch.c: Regenerate.
8599 * gdbcore.h (set_gnutarget): Constify.
8600 * go-exp.y (yyerror): Constify.
8601 (token::oper): Constify.
8602 * go-lang.h (go_yyerror): Constify.
8603 * go32-nat.c (go32_sysinfo): Constify.
8604 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8605 * guile/scm-cmd.c (cmdscm_function): Constify.
8606 * guile/scm-param.c (pascm_param_value): Constify.
8607 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8608 (h8300sx_register_name): Constify.
8609 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8610 Constify.
8611 * ia64-tdep.c (ia64_register_names): Constify.
8612 * infcmd.c (construct_inferior_arguments): Constify.
8613 (path_command, attach_post_wait): Constify.
8614 * language.c (show_range_command, show_case_command)
8615 (unk_lang_error): Constify.
8616 * language.h (language_defn::la_error)
8617 (language_defn::la_name_of_this): Constify.
8618 * linespec.c (decode_line_2): Constify.
8619 * linux-thread-db.c (thread_db_err_str): Constify.
8620 * lm32-tdep.c (lm32_register_name): Constify.
8621 * m2-exp.y (yyerror): Constify.
8622 * m2-lang.h (m2_yyerror): Constify.
8623 * m32r-tdep.c (m32r_register_names): Constify and make static.
8624 * m68hc11-tdep.c (m68hc11_register_names): Constify.
8625 * m88k-tdep.c (m88k_register_name): Constify.
8626 * macroexp.c (appendmem): Constify.
8627 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8628 (upgrade_type, parse_external, parse_partial_symbols)
8629 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8630 (new_symbol): Constify.
8631 * memattr.c (mem_info_command): Constify.
8632 * mep-tdep.c (register_name_from_keyword): Constify.
8633 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8634 Constify.
8635 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8636 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8637 * mi/mi-main.c (captured_mi_execute_command): Constify and add
8638 cast.
8639 (mi_execute_async_cli_command): Constify.
8640 * mips-tdep.c (mips_register_name): Constify.
8641 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8642 (am33_register_name, am33_2_register_name)
8643 * moxie-tdep.c (moxie_register_names): Constify.
8644 * nat/linux-osdata.c (osdata_type): Constify fields.
8645 * nto-tdep.c (nto_parse_redirection): Constify.
8646 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8647 (lookup_child_selector): Constify.
8648 (objc_methcall::name): Constify.
8649 * objc-lang.h (lookup_objc_class, lookup_child_selector)
8650 (lookup_struct_typedef): Constify.
8651 * objfiles.c (pc_in_section): Constify.
8652 * objfiles.h (pc_in_section): Constify.
8653 * p-exp.y (struct token::oper): Constify.
8654 (yyerror): Constify.
8655 * p-lang.h (pascal_yyerror): Constify.
8656 * parser-defs.h (op_name_standard): Constify.
8657 (op_print::string): Constify.
8658 (exp_descriptor::op_name): Constify.
8659 * printcmd.c (print_address_symbolic): Constify.
8660 * psymtab.c (print_partial_symbols): Constify.
8661 * python/py-breakpoint.c (stop_func): Constify.
8662 (bppy_get_expression): Constify.
8663 * python/py-cmd.c (cmdpy_completer::name): Constify.
8664 (cmdpy_function): Constify.
8665 * python/py-event.c (evpy_add_attribute)
8666 (gdbpy_initialize_event_generic): Constify.
8667 * python/py-event.h (evpy_add_attribute)
8668 (gdbpy_initialize_event_generic): Constify.
8669 * python/py-evts.c (add_new_registry): Constify.
8670 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8671 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8672 * python/py-inferior.c (get_buffer): Add cast.
8673 * python/py-param.c (parm_constant::name): Constify.
8674 * python/py-unwind.c (fprint_frame_id): Constify.
8675 * python/python.c (gdbpy_parameter_value): Constify.
8676 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8677 * remote.c (memory_packet_config::name): Constify.
8678 (show_packet_config_cmd, remote_write_bytes)
8679 (remote_buffer_add_string):
8680 * reverse.c (exec_reverse_once): Constify.
8681 * rs6000-tdep.c (variant::name, variant::description): Constify.
8682 * rust-exp.y (rustyyerror): Constify.
8683 * rust-lang.c (rust_op_name): Constify.
8684 * rust-lang.h (rustyyerror): Constify.
8685 * serial.h (serial_ops::name): Constify.
8686 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8687 (sh_sh3e_register_name, sh_sh2e_register_name)
8688 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8689 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8690 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8691 (sh_sh4al_dsp_register_name): Constify.
8692 * sh64-tdep.c (sh64_register_name): Constify.
8693 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8694 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8695 * stabsread.c (patch_block_stabs, read_type_number)
8696 (ref_map::stabs, ref_add, process_reference)
8697 (symbol_reference_defined, define_symbol, define_symbol)
8698 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8699 (read_one_struct_field, read_struct_fields, read_baseclasses)
8700 (read_tilde_fields, read_struct_type, read_array_type)
8701 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8702 (read_huge_number, read_range_type, read_args, common_block_start)
8703 (find_name_end): Constify.
8704 * stabsread.h (common_block_start, define_symbol)
8705 (process_one_symbol, symbol_reference_defined, ref_add):
8706 * symfile.c (get_section_index, add_symbol_file_command):
8707 * symfile.h (get_section_index): Constify.
8708 * target-descriptions.c (tdesc_type::name): Constify.
8709 (tdesc_free_type): Add cast.
8710 * target.c (find_default_run_target):
8711 (add_deprecated_target_alias, find_default_run_target)
8712 (target_announce_detach): Constify.
8713 (do_option): Constify.
8714 * target.h (add_deprecated_target_alias): Constify.
8715 * thread.c (print_thread_info_1): Constify.
8716 * top.c (deprecated_readline_begin_hook, command_line_input):
8717 Constify.
8718 (init_main): Add casts.
8719 * top.h (handle_line_of_input): Constify.
8720 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8721 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8722 (tfind_command): Rename to ...
8723 (tfind_command_1): ... this and constify.
8724 (tfind_command): New function.
8725 (tfind_end_command, tfind_start_command): Adjust.
8726 (encode_source_string): Constify.
8727 * tracepoint.h (encode_source_string): Constify.
8728 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8729 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8730 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8731 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8732 * tui/tui-win.c (parse_scrolling_args): Constify.
8733 * tui/tui-windata.c (tui_erase_data_content): Constify.
8734 * tui/tui-windata.h (tui_erase_data_content): Constify.
8735 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8736 * tui/tui.c (tui_enable): Add cast.
8737 * utils.c (defaulted_query): Constify.
8738 (init_page_info): Add cast.
8739 (puts_debug, subset_compare): Constify.
8740 * utils.h (subset_compare): Constify.
8741 * varobj.c (varobj_format_string): Constify.
8742 * varobj.h (varobj_format_string): Constify.
8743 * vax-tdep.c (vax_register_name): Constify.
8744 * windows-nat.c (windows_detach): Constify.
8745 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8746 * xml-support.c (gdb_xml_end_element): Constify.
8747 * xml-tdesc.c (tdesc_start_reg): Constify.
8748 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8749 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8750 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8751
995816ba
PA
87522017-04-05 Pedro Alves <palves@redhat.com>
8753
8754 * proc-api.c (struct trans): Constify.
8755 (procfs_note): Constify.
8756 * proc-events.c (struct trans, syscall_table):
8757 * proc-flags.c (struct trans): Constify.
8758 * proc-utils.h (procfs_note): Constify.
8759 * proc-why.c (struct trans): Constify.
8760 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8761 (procfs_detach): Constify.
8762 * sol-thread.c (struct string_map): Constify.
8763 (td_err_string, td_state_string): Constify.
8764
3e83a920
PA
87652017-04-05 Pedro Alves <palves@redhat.com>
8766
8767 * proc-api.c (procfs_filename): Don't initialize
8768 procfs_filename.
8769 (prepare_to_trace): Assume procfs_filename is non-NULL.
8770 (_initialize_proc_api): Give procfs_filename a default value here.
8771
63160a43
PA
87722017-04-05 Pedro Alves <palves@redhat.com>
8773
8774 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8775 'cond_string' parameter.
8776 (extract_exception_regexp): Constify 'string' parameter.
8777 (catch_exception_command_1): Constify.
8778 * breakpoint.c (init_catchpoint)
8779 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8780 parameter.
8781 (ep_parse_optional_if_clause, catch_fork_command_1)
8782 (catch_exec_command_1): Constify.
8783 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8784 parameter.
8785 (ep_parse_optional_if_clause): Constify.
8786 * cli/cli-utils.c (remove_trailing_whitespace)
8787 (check_for_argument): Constify.
8788 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8789 non-const overload.
8790 (check_for_argument): Likewise.
8791
9b2eba3d
PA
87922017-04-05 Pedro Alves <palves@redhat.com>
8793
8794 * event-top.c (command_line_handler): Add cast to execute_command
8795 call.
8796 * record-btrace.c (cmd_record_btrace_bts_start)
8797 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8798 (cmd_record_btrace_start): Add cast to execute_command call.
8799 * record-full.c (record_full_goto_insn):
8800 * record.c (record_start, record_stop): Add cast to
8801 execute_command_to_string calls.
8802 (cmd_record_start): Add cast to execute_command calls.
8803
2adadf51
PA
88042017-04-05 Pedro Alves <palves@redhat.com>
8805
8806 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8807 static inline function.
8808 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8809 array and use gdb_PyArg_ParseTupleAndKeywords.
8810 * python/py-cmd.c (cmdpy_init): Likewise.
8811 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8812 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8813 (infpy_search_memory): Likewise.
8814 * python/py-objfile.c (objfpy_add_separate_debug_file)
8815 (gdbpy_lookup_objfile): Likewise.
8816 * python/py-symbol.c (gdbpy_lookup_symbol)
8817 (gdbpy_lookup_global_symbol): Likewise.
8818 * python/py-type.c (gdbpy_lookup_type): Likewise.
8819 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8820 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8821 Likewise.
8822
0d1f4ceb
PA
88232017-04-05 Pedro Alves <palves@redhat.com>
8824
8825 * python/python-internal.h (gdb_PyGetSetDef): New type.
8826 * python/py-block.c (block_object_getset)
8827 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8828 * python/py-event.c (event_object_getset)
8829 (finish_breakpoint_object_getset): Likewise.
8830 * python/py-inferior.c (inferior_object_getset): Likewise.
8831 * python/py-infthread.c (thread_object_getset): Likewise.
8832 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8833 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8834 * python/py-objfile.c (objfile_getset): Likewise.
8835 * python/py-progspace.c (pspace_getset): Likewise.
8836 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8837 Likewise.
8838 * python/py-record.c (recpy_record_getset): Likewise.
8839 * python/py-symbol.c (symbol_object_getset): Likewise.
8840 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8841 Likewise.
8842 * python/py-type.c (type_object_getset, field_object_getset):
8843 Likewise.
8844 * python/py-value.c (value_object_getset): Likewise.
8845
4d759979
PA
88462017-04-05 Pedro Alves <palves@redhat.com>
8847
8848 * python/python-internal.h (gdb_PyObject_CallMethod)
8849 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8850 New functions.
8851 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8852 (PySys_GetObject, PySys_SetPath): New macros.
8853
fdf9e36f
PA
88542017-04-05 Pedro Alves <palves@redhat.com>
8855
8856 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8857 info_osdata_command.
8858 * osdata.c (info_osdata_command): Rename to ...
8859 (info_osdata): ... this. Constify 'type' parameter, and remove
8860 the 'from_tty' parameter. Accept NULL TYPE.
8861 (info_osdata_command): New function.
8862 * osdata.h (info_osdata_command): Remove declaration.
8863 (info_osdata): New declaration.
8864
9f33b8b7
PA
88652017-04-05 Pedro Alves <palves@redhat.com>
8866
8867 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8868 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8869 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8870 parameter.
8871 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8872 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8873 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8874 parameter.
8875 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8876 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8877 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8878 (mi_cmd_file_list_exec_source_files)
8879 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8880 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8881 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8882 parameter.
8883 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8884 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8885 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8886 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8887 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8888 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8889 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8890 'command' parameter.
8891 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8892 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8893 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8894 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8895 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8896 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8897 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8898 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8899 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8900 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8901 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8902 parameter.
8903 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8904 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8905 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8906 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8907 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8908 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8909 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8910 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8911 (mi_cmd_data_list_changed_registers)
8912 (mi_cmd_data_write_register_values)
8913 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8914 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8915 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8916 (mi_cmd_list_features, mi_cmd_list_target_features)
8917 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8918 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8919 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8920 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8921 (mi_cmd_trace_frame_collected): Constify 'command'
8922 parameter.
8923 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8924 'command' parameter.
8925
67cb5b2d
PA
89262017-04-05 Pedro Alves <palves@redhat.com>
8927
8928 * ada-lang.c (ada_completer_word_break_characters): Now a const
8929 array.
8930 (ada_get_gdb_completer_word_break_characters): Constify.
8931 * completer.c (gdb_completer_command_word_break_characters)
8932 (gdb_completer_file_name_break_characters)
8933 (gdb_completer_quote_characters): Now const arrays.
8934 (get_gdb_completer_quote_characters): Constify.
8935 (set_rl_completer_word_break_characters): New function.
8936 (set_gdb_completion_word_break_characters)
8937 (complete_line_internal): Use it.
8938 * completer.h (get_gdb_completer_quote_characters): Constify.
8939 (set_rl_completer_word_break_characters): Declare.
8940 * f-lang.c (f_word_break_characters): Constify.
8941 * language.c (default_word_break_characters): Constify.
8942 * language.h (language_defn::la_word_break_characters): Constify.
8943 (default_word_break_characters): Constify.
8944 * top.c (init_main): Use set_rl_completer_word_break_characters.
8945
7a114964
PA
89462017-04-05 Pedro Alves <palves@redhat.com>
8947
8948 * aix-thread.c (aix_thread_pid_to_str)
8949 (aix_thread_extra_thread_info): Constify.
8950 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8951 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8952 (bsd_uthread_pid_to_str): Constify.
8953 * corelow.c (core_pid_to_str): Constify.
8954 * darwin-nat.c (darwin_pid_to_str): Constify.
8955 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8956 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8957 Constify.
8958 * gnu-nat.c (gnu_pid_to_str): Constify.
8959 * go32-nat.c (go32_pid_to_str): Constify.
8960 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8961 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8962 * inferior.c (inferior_pid_to_str): Constify.
8963 * linux-nat.c (linux_nat_pid_to_str): Constify.
8964 * linux-tdep.c (linux_core_pid_to_str): Constify.
8965 * linux-thread-db.c (thread_db_pid_to_str)
8966 (thread_db_extra_thread_info): Constify.
8967 * nto-tdep.c (nto_extra_thread_info): Constify.
8968 * nto-tdep.h (nto_extra_thread_info): Constify.
8969 * obsd-nat.c (obsd_pid_to_str): Constify.
8970 * procfs.c (procfs_pid_to_str): Constify.
8971 * ravenscar-thread.c (ravenscar_extra_thread_info)
8972 (ravenscar_pid_to_str): Constify.
8973 * remote-sim.c (gdbsim_pid_to_str): Constify.
8974 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8975 Constify.
8976 * sol-thread.c (solaris_pid_to_str): Constify.
8977 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8978 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8979 * target.c (default_pid_to_str, target_pid_to_str)
8980 (normal_pid_to_str, default_pid_to_str): Constify.
8981 * target.h (target_ops::to_pid_to_str)
8982 (target_ops::to_extra_thread_info): Constify.
8983 (target_pid_to_str, normal_pid_to_str): Constify.
8984 * windows-nat.c (windows_pid_to_str): Constify.
8985 * gdbarch.sh (core_pid_to_str): Constify.
8986 * target-delegates.c: Regenerate.
8987 * gdbarch.h, gdbarch.c: Regenerate.
8988
69bbf465
PA
89892017-04-05 Pedro Alves <palves@redhat.com>
8990
8991 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8992 the memory of the temporary warning_pre_print override.
8993 * utils.c (warning_pre_print): Constify.
8994 * utils.h (warning_pre_print): Constify.
8995
be47f9e8
PA
89962017-04-05 Pedro Alves <palves@redhat.com>
8997
8998 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8999 (shell_command): New function.
9000 (make_command): Use std::string.
9001 (init_cli_cmds): Register shell_command instead of shell_escape.
9002
bde6261a
PA
90032017-04-05 Pedro Alves <palves@redhat.com>
9004
9005 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9006 * tracepoint.c (default_collect): Don't initialize.
9007
b38ef47f
PA
90082017-04-05 Pedro Alves <palves@redhat.com>
9009
9010 * macroexp.c (macro_buffer::shared): Now a bool.
9011 (init_buffer): Update.
9012 (init_shared_buffer): Constify 'addr' parameter.
9013 (substitute_args, expand, macro_expand, macro_expand_next): Remove
9014 casts.
9015
f995bbe8
PA
90162017-04-05 Pedro Alves <palves@redhat.com>
9017
9018 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9019 * disasm.c (set_disassembler_options): Constify local.
9020 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9021
4a596fe2
SDJ
90222017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
9023
9024 PR gdb/21352
9025 * tracefile.c (tsave_command): Fix argument parsing for '-r'
9026 option.
9027
2cad08ea
YQ
90282017-04-05 Yao Qi <yao.qi@linaro.org>
9029
9030 * frame.c (frame_unwind_register_unsigned): Call
9031 frame_unwind_register_value.
9032
55a98976
YQ
90332017-04-05 Yao Qi <yao.qi@linaro.org>
9034
9035 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9036 Use gdb_test_multiple, and don't match anchor.
9037
4ac40124
PA
90382017-04-05 Pedro Alves <palves@redhat.com>
9039
9040 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9041 (Write After Approval): Remove Simon Marchi.
9042
c053b654
PA
90432017-04-05 Pedro Alves <palves@redhat.com>
9044
9045 * common/gdb_optional.h (optional::optional): Make constexpr and
9046 initialize m_dummy.
9047
4c7bf4f9
JB
90482017-04-04 John Baldwin <jhb@FreeBSD.org>
9049
9050 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9051 (amd64fbsd_jmp_buf_reg_offset): Remove.
9052 (amd64fbsd_supply_uthread): Remove function.
9053 (amd64fbsd_collect_uthread): Remove function.
9054 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9055 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9056 (x86_64-*-freebsd*): Remove bsd-uthread.o.
9057 (fbsd-nat.c): Update comment.
9058 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9059 (i386fbsd_jmp_buf_reg_offset): Remove.
9060 (i386fbsd_supply_uthread): Remove function.
9061 (i386fbsd_collect_uthread): Remove function.
9062 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9063
1e1a8bef
JB
90642017-04-04 John Baldwin <jhb@FreeBSD.org>
9065
9066 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9067 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9068 * NEWS: Mention that support for FreeBSD/alpha was removed.
9069 * alpha-fbsd-tdep.c: Delete file.
9070 * config/alpha/fbsd.mh: Delete file.
9071 * configure.host: Delete alpha*-*-freebsd* and
9072 alpha*-*-kfreebsd*-gnu.
9073 * configure.tgt: Delete alpha*-*-freebsd* and
9074 alpha*-*-kfreebsd*-gnu.
9075
49907934
JB
90762017-04-04 John Baldwin <jhb@FreeBSD.org>
9077
9078 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9079 amd64bsd_store_inferior_registers): Use ptid from regcache.
9080
6f77053d
PA
90812017-04-04 Pedro Alves <palves@redhat.com>
9082
9083 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
9084 data fields, make them private and add "m_" prefixes.
9085 (lnp_state_machine::lnp_state_machine): New ctor.
9086 (record_line, check_line_address, handle_set_discriminator)
9087 (handle_set_address, handle_advance_pc, handle_special_opcode)
9088 (handle_advance_line, handle_set_file, handle_negate_stmt)
9089 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9090 (end_sequence, advance_line): New methods.
9091 (m_gdbarch, m_record_lines_p): New fields.
9092 (lnp_reader_state): Delete.
9093 (dwarf_record_line): Rename to ...
9094 (lnp_state_machine::record_line): ... adjust.
9095 (init_lnp_state_machine): Delete.
9096 (lnp_state_machine::lnp_state_machine): New.
9097 (check_line_address): Rename to ...
9098 (lnp_state_machine::check_line_address): This.
9099 (dwarf_decode_lines_1): Remove reference to "reader_state".
9100 Adjust lnp_state_machine having a non-default ctor. Use bool.
9101 State machine internal state manipulation moved to
9102 lnp_state_machine methods.
9103
9c541725
PA
91042017-04-04 Pedro Alves <palves@redhat.com>
9105
9106 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9107 unittests/offset-type-selftests.c.
9108 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9109 * common/offset-type.h: New file.
9110 * common/preprocessor.h: New file.
9111 * common/traits.h: New file.
9112 * common/valid-expr.h: New file.
9113 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
9114 sect_offset and cu_offset strong typedefs throughout.
9115 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9116 typedefs throughout.
9117 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
9118 sect_offset and cu_offset strong typedefs throughout.
9119 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9120 typedefs throughout.
9121 * gdbtypes.h: Include "common/offset-type.h".
9122 (cu_offset): Now an offset type (strong typedef) instead of a
9123 struct.
9124 (sect_offset): Likewise.
9125 (union call_site_parameter_u): Rename "param_offset" field to
9126 "param_cu_off".
9127 * unittests/offset-type-selftests.c: New file.
9128
ecfb656c
PA
91292017-04-04 Pedro Alves <palves@redhat.com>
9130
9131 * common/underlying.h: New file.
9132 * dwarf2read.c: Include "common/gdb_optional.h" and
9133 "common/underlying.h".
9134 (dir_index, file_name_index): New types.
9135 (file_entry): Use them.
9136 (file_entry::include): Use to_underlying.
9137 (line_header::add_file_name): Use dir_index.
9138 (read_formatted_entries): Use gdb::optional. Read form before
9139 writting to file_entry.
9140 (dwarf_decode_line_header): Use dir_index.
9141 (lnp_state_machine::current_file): Use to_underlying.
9142 (lnp_state_machine::file): Change type to file_name_index.
9143 (dwarf_record_line): Use to_underlying.
9144 (init_lnp_state_machine): Use file_name_index.
9145 (dwarf_decode_lines_1): Use dir_index and file_name_index.
9146
d194f1fe
PA
91472017-04-04 Pedro Alves <palves@redhat.com>
9148
9149 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9150 operator bool, has_value and get methods.
9151
fff8551c
PA
91522017-04-04 Pedro Alves <palves@redhat.com>
9153
9154 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9155 fields.
9156 (line_header): Initialize all data fields. Change type of
9157 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9158 Change type of include_dirs to std::vector<const char *>. Remove
9159 num_include_dirs, include_dirs_size. Change type of file_names to
9160 std::vector<file_entry>. Remove num_file_names, file_names_size.
9161 (line_header::line_header): New.
9162 (line_header::add_include_dir, line_header::add_file_name): New
9163 methods.
9164 (line_header::include_dir_at): Remove NULL check.
9165 (line_header::file_name_at): Add const overload.
9166 (line_header_up): New unique_ptr typedef.
9167 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
9168 std::vector. Remove free_line_header call.
9169 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
9170 free_line_header call.
9171 (free_cu_line_header): Delete.
9172 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9173 (setup_type_unit_groups): Use line_header_up instead of cleanups.
9174 Adjust to use std::vector.
9175 (free_line_header): Delete.
9176 (free_line_header_voidp): Use delete.
9177 (add_include_dir): Replace with ...
9178 (line_header::add_include_dir): ... this method. Use std::vector.
9179 (add_file_name): Replace with ...
9180 (line_header::add_file_name): ... this method. Use std::vector.
9181 (add_include_dir_stub): Delete.
9182 (read_formatted_entries): Remove memset.
9183 (dwarf_decode_line_header): Return a line_header_up instead of a
9184 raw pointer. Remove cleanup handling. Pass lambdas to
9185 read_formatted_entries. Adjust to use line_header methods.
9186 (dwarf_decode_lines_1): Adjust to use line_header methods.
9187 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9188 use std::vector.
9189
d62a8ae2
SM
91902017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
9191
9192 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9193 instead of struct ptid.
9194
db3a1dc7
AH
91952017-05-04 Alan Hayward <alan.hayward@arm.com>
9196
9197 * frame.c (get_frame_register_bytes): Unwind using value.
9198 (put_frame_register_bytes): Likewise.
9199
b1b45502
IB
92002017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
9201
9202 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9203 aggregate-like.
9204
ec13808e
JK
92052017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
9206
9207 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9208
12316564
YQ
92092017-03-29 Yao Qi <yao.qi@linaro.org>
9210
9211 * gdbthread.h (struct thread_info): Declare constructor and
9212 destructor. Add some in-class member initializers.
9213 * thread.c (free_thread): Remove.
9214 (init_thread_list): Call delete instead of free_thread.
9215 (new_thread): Call thread_info constructor.
9216 (thread_info::thread_info): New function.
9217 (thread_info::~thread_info): New function.
9218 (delete_thread_1): Call delete instead of free_thread.
9219 (make_cleanup_restore_current_thread): Move tp and frame to
9220 inner block.
9221
fe5f7374
AK
92222017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9223
9224 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9225 (arc_skip_prologue): Likewise.
9226 (arc_make_frame_cache): Likewise.
9227 (arc_pv_get_operand): New function.
9228 (arc_is_in_prologue): Likewise.
9229 (arc_analyze_prologue): Likewise.
9230 (arc_print_frame_cache): Likewise.
9231 (MAX_PROLOGUE_LENGTH): New constant.
9232
eea78757
AK
92332017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9234
9235 * configure.tgt: Add arc-insn.o.
9236 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9237 (dump_arc_instruction_command): New function.
9238 (arc_fprintf_disasm): Likewise.
9239 (arc_disassemble_info): Likewise.
9240 (arc_insn_get_operand_value): Likewise.
9241 (arc_insn_get_operand_value_signed): Likewise.
9242 (arc_insn_get_memory_base_reg): Likewise.
9243 (arc_insn_get_memory_offset): Likewise.
9244 (arc_insn_get_branch_target): Likewise.
9245 (arc_insn_dump): Likewise.
9246 (arc_insn_get_linear_next_pc): Likewise.
9247 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9248 (arc_disassemble_info): Likewise.
9249 (arc_insn_get_branch_target): Likewise.
9250 (arc_insn_get_linear_next_pc): Likewise.
9251 * NEWS: Mention new "maint print arc arc-instruction".
9252
3be78afd
AK
92532017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9254
9255 * arc-tdep (maintenance_print_arc_list): New variable.
9256 (maintenance_print_arc_command): New function.
9257
296ec4fa
AK
92582017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9259
9260 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9261 Add "limm" and "reserved".
9262 (arc_cannot_fetch_register, arc_cannot_store_register): Add
9263 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9264 * arc-tdep.h (arc_regnum): Likewise.
9265
f74f865e
MF
92662017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9267
9268 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9269 for THREADPTR register.
9270 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9271 register.
9272 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9273 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9274 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9275
0d0bf81a
MF
92762017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9277
9278 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9279 registers above gdbarch_num_regs (gdbarch) as privileged in
9280 call0 ABI.
9281
0ce4291e
MF
92822017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9283
9284 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9285 for a single specified register or for all registers in
9286 a0_base..a0_base + C0_NREGS range.
9287 (supply_gregset_reg): Call regcache_raw_supply for a single
9288 specified register or for all registers in a0_base..a0_base +
9289 C0_NREGS range.
9290
c56054f9
MF
92912017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9292
9293 * arch/xtensa.h (C0_NREGS): Add definition.
9294 * xtensa-tdep.c (C0_NREGS): Remove definition.
9295
a4398628
MF
92962017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9297
9298 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9299 Drop xtensa_default_isa initialization.
9300 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9301
8c43009f
PA
93022017-03-27 Pedro Alves <palves@redhat.com>
9303
9304 * dwarf2read.c (file_entry) <dir_index>: Add comment.
9305 (file_entry::include_dir): New method.
9306 (line_header::include_dir_at, line_header::file_name_at): New
9307 methods.
9308 (setup_type_unit_groups, setup_type_unit_groups)
9309 (psymtab_include_file_name): Simplify using the new methods.
9310 (lnp_state_machine) <the_line_header>: New field.
9311 <file>: Add comment.
9312 (lnp_state_machine::current_file): New method.
9313 (dwarf_record_line): Simplify using the new methods.
9314 (init_lnp_state_machine): Initialize the "the_line_header" field.
9315 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9316 Simplify using the new methods.
9317
a7e80b9e
PA
93182017-03-27 Pedro Alves <palves@redhat.com>
9319
9320 * cp-name-parser.y (make_empty): Delete.
9321 (demangler_special, nested_name, ptr_operator, array_indicator)
9322 (direct_declarator, declarator_1): Use fill_comp instead of
9323 make_empty.
9324
21047726
PA
93252017-03-27 Pedro Alves <palves@redhat.com>
9326
9327 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9328 to ATTRIBUTE_PRINTF.
9329 * solib-target.c (library_list_start_list): Print "string" not
9330 "version".
9331 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9332 gdb_xml_error call.
9333
d721ba37
PA
93342017-03-27 Pedro Alves <palves@redhat.com>
9335
9336 * dwarf2read.c (struct file_and_directory): New.
9337 (dwarf2_get_dwz_file): Adjust to use std::string.
9338 (dw2_get_file_names_reader): Adjust to use file_and_directory.
9339 (find_file_and_directory): Adjust to return a file_and_directory
9340 object.
9341 (read_file_scope): Adjust to use file_and_directory. Remove
9342 make_cleanup/do_cleanups calls.
9343 (open_and_init_dwp_file): Adjust to use std::string. Remove
9344 make_cleanup/do_cleanups calls.
9345 * python/python.c (do_start_initialization): Adjust to ldirname
9346 returning a std::string.
9347 * utils.c (ldirname): Now returns a std::string.
9348 * utils.h (ldirname): Change return type to std::string.
9349 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9350 returning a std::string.
9351 * xml-tdesc.c (file_read_description_xml): Likewise.
9352
ed771251
AH
93532017-03-24 Alan Hayward <alan.hayward@arm.com>
9354
9355 * regcache.c (regcache_debug_print_register): New function.
9356 * regcache.h (regcache_debug_print_register): New declaration.
9357 * target.c (debug_print_register): Remove.
9358 (target_fetch_registers): Call regcache_debug_print_register.
9359 (target_store_registers): Likewise.
9360
568c1b9f
PB
93612017-03-24 Pádraig Brady <pbrady@fb.com>
9362
9363 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9364 reference beyond the 'lh->include_dirs' array before accessing to
9365 it.
9366 (psymtab_include_file_name): Likewise.
9367 (dwarf_decode_lines_1): Likewise.
9368 (dwarf_decode_lines): Likewise.
9369 (file_file_name): Likewise.
9370
3e00d44f
SM
93712017-03-23 Simon Marchi <simon.marchi@ericsson.com>
9372
9373 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9374 inferior_ptid.
9375 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9376 ps_lsetfpregs): Likewise.
9377 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9378 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9379 ps_lsetfpregs): Likewise.
9380 * target.c (target_fetch_registers, target_store_registers):
9381 Remove asserts.
9382
077ae656
AH
93832017-03-23 Alan Hayward <alan.hayward@arm.com>
9384
9385 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9386
1e2b521d
YQ
93872017-03-23 Yao Qi <yao.qi@linaro.org>
9388
9389 * aarch64-tdep.c (aarch64_process_record_test): Declare.
9390 (_initialize_aarch64_tdep): Register it.
9391 (aarch64_record_load_store): Handle PRFM instruction.
9392 (aarch64_process_record_test): New function.
9393
33877125
YQ
93942017-03-23 Yao Qi <yao.qi@linaro.org>
9395
9396 * aarch64-tdep.c (aarch64_record_load_store): Fix code
9397 indentation.
9398
a0eef940
YQ
93992017-03-23 Yao Qi <yao.qi@linaro.org>
9400
9401 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9402
3f2a3564
PR
94032017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9404
9405 python/python.c (do_start_initialization): Fix memory leak.
9406
b67aeab0
SM
94072017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9408
9409 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9410 using get_ptrace_pid.
9411 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9412 inferior_ptid.
9413 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9414 inferior_ptid instead of pid.
9415
ffdbe864
YQ
94162017-03-22 Yao Qi <yao.qi@linaro.org>
9417
9418 * aarch64-tdep.c: Wrap locally used classes in anonymous
9419 namespace.
9420 * arm-tdep.c: Likewise.
9421 * linespec.c: Likewise.
9422 * ui-out.c: Likewise.
9423
9d736fbf
JG
94242017-03-22 Jonah Graham <jonah@kichwacoders.com>
9425
9426 PR gdb/19637
9427 * python/lib/gdb/printer/bound_registers.py: Import sys.
9428
3de88e9a
SM
94292017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9430
9431 * windows-nat.c (do_windows_fetch_inferior_registers): Add
9432 windows_thread_info parameter and use it instead of
9433 current_thread.
9434 (windows_fetch_inferior_registers): Don't set current_thread,
9435 pass the thread to do_windows_fetch_inferior_registers. Use
9436 ptid from regcache instead of inferior_ptid.
9437 (do_windows_store_inferior_registers): Add windows_thread_info
9438 parameter and use it instead of current_thread.
9439 (windows_store_inferior_registers): Don't set current_thread,
9440 pass the thread to do_windows_store_inferior_registers. Use
9441 ptid from regcache instead of inferior_ptid.
9442
0e7b8f61
SM
94432017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9444
9445 * ser-mingw.c (ser_windows_raw): Remove reference to
9446 struct serial::current_timeout.
9447
5badf10a
IR
94482017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
9449
9450 PR tdep/20928
9451 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9452 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9453 (sparc64_fsr_type): Fix %fsr decoding.
9454
cee59b3f
TW
94552017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
9456
9457 * python/py-record-btrace.c (btpy_insn_data): Change return type
9458 for Python 2.
9459
639a9038
SM
94602017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9461
9462 * spu-linux-nat.c (spu_fetch_inferior_registers,
9463 spu_store_inferior_registers): Use ptid from regcache, set and
9464 restore inferior_ptid.
9465 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9466 Likewise.
9467
bcc0c096
SM
94682017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9469
9470 * i386-linux-nat.c (fetch_register, store_register,
9471 i386_linux_fetch_inferior_registers,
9472 i386_linux_store_inferior_registers): Use ptid from regcache.
9473 * ia64-linux-nat.c (ia64_linux_fetch_register,
9474 ia64_linux_store_register): Likewise.
9475 * inf-ptrace.c (inf_ptrace_fetch_register,
9476 inf_ptrace_store_register): Likewise.
9477 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9478 m32r_linux_store_inferior_registers): Likewise.
9479 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9480 m68kbsd_store_inferior_registers): Likewise.
9481 * m68k-linux-nat.c (fetch_register, store_register,
9482 m68k_linux_fetch_inferior_registers,
9483 m68k_linux_store_inferior_registers): Likewise.
9484 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9485 m88kbsd_store_inferior_registers): Likewise.
9486 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9487 mips_fbsd_store_inferior_registers): Likewise.
9488 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9489 mips64_linux_regsets_store_registers): Likewise.
9490 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9491 mipsnbsd_store_inferior_registers): Likewise.
9492 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9493 mips64obsd_store_inferior_registers): Likewise.
9494 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9495 Likewise.
9496 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9497 ppcfbsd_store_inferior_registers): Likewise.
9498 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9499 ppc_linux_store_inferior_registers): Likewise.
9500 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9501 ppcnbsd_store_inferior_registers): Likewise.
9502 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9503 ppcobsd_store_registers): Likewise.
9504 * procfs.c (procfs_fetch_registers, procfs_store_registers):
9505 Likewise.
9506 * ravenscar-thread.c (ravenscar_fetch_registers,
9507 ravenscar_store_registers, ravenscar_prepare_to_store):
9508 Likewise.
9509 * record-btrace.c (record_btrace_fetch_registers,
9510 record_btrace_store_registers, record_btrace_prepare_to_store):
9511 Likewise.
9512 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9513 Lookup inferior using ptid from regcache, instead of
9514 current_inferior.
9515 * remote.c (remote_fetch_registers, remote_store_registers): Use
9516 ptid from regcache.
9517 * rs6000-nat.c (fetch_register, store_register): Likewise.
9518 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9519 s390_linux_store_inferior_registers): Likewise.
9520 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9521 shnbsd_store_inferior_registers): Likewise.
9522 * sol-thread.c (sol_thread_fetch_registers,
9523 sol_thread_store_registers): Likewise.
9524 * sparc-nat.c (sparc_fetch_inferior_registers,
9525 sparc_store_inferior_registers): Likewise.
9526 * tilegx-linux-nat.c (fetch_inferior_registers,
9527 store_inferior_registers): Likewise.
9528 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9529 vaxbsd_store_inferior_registers): Likewise.
9530 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9531 store_xtregs): Likewise.
9532
c0f55cc6
AV
95332017-03-20 Artemiy Volkov <artemiyv@acm.org>
9534
9535 PR gdb/14441
9536 * NEWS: Mention support for rvalue references in GDB and python.
9537 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9538 supports both lvalue and rvalue references.
9539
15c0a2a9
AV
95402017-03-20 Artemiy Volkov <artemiyv@acm.org>
9541
9542 PR gdb/14441
9543 * gdbtypes.c (rank_one_type): Implement overloading
9544 resolution rules regarding rvalue references.
9545
aa006118
AV
95462017-03-20 Artemiy Volkov <artemiyv@acm.org>
9547
9548 PR gdb/14441
9549 * aarch64-tdep.c (aarch64_type_align)
9550 (aarch64_extract_return_value, aarch64_store_return_value): Change
9551 lvalue reference type checks to general reference type checks.
9552 * amd64-tdep.c (amd64_classify): Likewise.
9553 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9554 Likewise.
9555 * arm-tdep.c (arm_type_align, arm_extract_return_value)
9556 (arm_store_return_value): Likewise.
9557 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9558 * c-typeprint.c (c_print_type): Likewise.
9559 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9560 (cplus_number_of_children, cplus_describe_child): Likewise.
9561 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9562 * completer.c (expression_completer): Likewise.
9563 * cp-support.c (make_symbol_overload_list_adl_namespace):
9564 Likewise.
9565 * darwin-nat-info.c (info_mach_region_command): Likewise.
9566 * dwarf2loc.c (entry_data_value_coerce_ref)
9567 (value_of_dwarf_reg_entry): Likewise.
9568 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9569 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9570 Likewise.
9571 * findvar.c (extract_typed_address, store_typed_address):
9572 Likewise.
9573 * gdbtypes.c (rank_one_type): Likewise.
9574 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9575 * infcall.c (value_arg_coerce): Likewise.
9576 * language.c (pointer_type): Likewise.
9577 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9578 Likewise.
9579 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9580 * mn10300-tdep.c (mn10300_type_align): Likewise.
9581 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9582 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9583 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9584 Likewise.
9585 * printcmd.c (print_formatted, x_command): Likewise.
9586 * python/py-type.c (typy_get_composite, typy_template_argument):
9587 Likewise.
9588 * python/py-value.c (valpy_referenced_value)
9589 (valpy_get_dynamic_type, value_has_field): Likewise.
9590 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9591 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9592 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9593 * spu-tdep.c (spu_scalar_value_p): Likewise.
9594 * symtab.c (lookup_symbol_aux): Likewise.
9595 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9596 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9597 Likewise.
9598 * valops.c (value_cast_pointers, value_cast)
9599 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9600 (value_struct_elt, value_struct_elt_bitpos)
9601 (value_find_oload_method_list, find_overload_match)
9602 (value_rtti_indirect_type): Likewise.
9603 * valprint.c (val_print_scalar_type_p, generic_val_print):
9604 Likewise.
9605 * value.c (value_actual_type, value_as_address, unpack_long)
9606 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9607 (coerce_ref): Likewise.
9608 * varobj.c (varobj_get_value_type): Likewise.
9609
3fcf899d
AV
96102017-03-20 Artemiy Volkov <artemiyv@acm.org>
9611
9612 PR gdb/14441
9613 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9614 table of constants.
9615 * python/lib/gdb/command/explore.py: Support exploring values
9616 of rvalue reference types.
9617 * python/lib/gdb/types.py: Implement get_basic_type() for
9618 rvalue reference types.
9619 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9620 constant.
9621 * python/py-value.c (valpy_getitem): Add an rvalue reference
9622 check.
9623 (valpy_reference_value): Add new parameter "refcode".
9624 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9625 New wrappers for valpy_reference_value().
9626 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9627 (gdbpy_invoke_xmethod): Likewise.
9628
4297a3f0
AV
96292017-03-20 Artemiy Volkov <artemiyv@acm.org>
9630
9631 PR gdb/14441
9632 * dwarf2read.c (process_die, read_type_die_1): Handle the
9633 DW_TAG_rvalue_reference_type DIE.
9634 (read_tag_reference_type): Add new parameter "refcode".
9635
e1cb3213
AV
96362017-03-20 Artemiy Volkov <artemiyv@acm.org>
9637
9638 PR gdb/14441
9639 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9640 (c_type_print_modifier, c_type_print_varspec_suffix)
9641 (c_type_print_base): Support printing rvalue reference types.
9642 * c-valprint.c (c_val_print, c_value_print): Support printing
9643 rvalue reference values.
9644
e4347c89
AV
96452017-03-20 Artemiy Volkov <artemiyv@acm.org>
9646
9647 PR gdb/14441
9648 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9649 typename.
9650 * cp-support.c (replace_typedefs): Handle
9651 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9652 * python/py-type.c (typy_lookup_type): Likewise.
9653
53cc15f5
AV
96542017-03-20 Artemiy Volkov <artemiyv@acm.org>
9655
9656 PR gdb/14441
9657 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9658 * parse.c (insert_type): Change assert statement.
9659 (follow_types): Handle rvalue reference types.
9660 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9661 constant.
9662
a65cfae5
AV
96632017-03-20 Artemiy Volkov <artemiyv@acm.org>
9664
9665 PR gdb/14441
9666 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9667 value_ref() interface.
9668 * c-valprint.c (c_value_print): Likewise.
9669 * infcall.c (value_arg_coerce): Likewise.
9670 * python/py-value.c (valpy_reference_value): Likewise.
9671 * valops.c (value_cast, value_reinterpret_cast)
9672 (value_dynamic_cast, typecmp): Likewise.
9673 (value_ref): Parameterize by kind of return value reference type.
9674 * value.h (value_ref): Add new parameter "refcode".
9675
3b224330
AV
96762017-03-20 Artemiy Volkov <artemiyv@acm.org>
9677
9678 PR gdb/14441
9679 * dwarf2read.c (read_tag_reference_type): Use
9680 lookup_lvalue_reference_type() instead of lookup_reference_type().
9681 * eval.c (evaluate_subexp_standard): Likewise.
9682 * f-exp.y: Likewise.
9683 * gdbtypes.c (make_reference_type, lookup_reference_type):
9684 Generalize with rvalue reference types.
9685 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9686 convenience wrappers for lookup_reference_type().
9687 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9688 reference kind parameter.
9689 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9690 wrappers for lookup_reference_type().
9691 * guile/scm-type.c (gdbscm_type_reference): Use
9692 lookup_lvalue_reference_type() instead of lookup_reference_type().
9693 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9694 * parse.c (follow_types): Likewise.
9695 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9696 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9697 Likewise.
9698 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9699 (gdbpy_invoke_xmethod): Likewise.
9700 * stabsread.c: Provide extra argument to make_reference_type()
9701 call.
9702 * valops.c (value_ref, value_rtti_indirect_type): Use
9703 lookup_lvalue_reference_type() instead of lookup_reference_type().
9704
f9aeb8d4
AV
97052017-03-20 Artemiy Volkov <artemiyv@acm.org>
9706
9707 PR gdb/14441
9708 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9709 (TYPE_IS_REFERENCE): New macro.
9710 (struct type): Add rvalue_reference_type field.
9711 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9712
51457a05
MAL
97132017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9714
9715 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9716 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9717 New function definition.
9718 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9719 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9720 New function declaration.
9721 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9722 * mi/mi-interp.h: New file.
9723 * solib.c (info_sharedlibrary_command): Replace for loop with
9724 ALL_SO_LIBS macro
9725 * solib.h (update_solib_list): New function declaration.
9726 (so_list_head): Move macro.
9727 * solist.h (ALL_SO_LIBS): New macro.
9728
e696b3ad
MAL
97292017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9730
9731 * infcmd.c (post_create_inferior): Remove unused argument in
9732 call to solib_add.
9733 * remote.c (remote_start_remote): Likewise.
9734 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9735 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9736 (enable_break): Likewise.
9737 * solib.c (update_solib_list): Remove unused target argument
9738 and its documentation.
9739 (solib_add): Remove unused target argument. Remove unused
9740 argument in call to update_solib_list.
9741 (info_sharedlibrary_command): Remove unused argument in call
9742 to update_solib_list.
9743 (sharedlibrary_command): Remove unused argument in call to
9744 solib_add.
9745 (handle_solib_event): Likewise.
9746 (reload_shared_libraries): Likewise.
9747 * solib.h (solib_add): Remove unused target argument.
9748
dcb84eda
AA
97492017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9750
9751 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9752 (s390_displaced_step_fixup): Cover relative branches with the
9753 default fixup handling. This fixes lack of support for some
9754 relative branch instructions.
9755
d9cb6cdc
SM
97562017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9757
9758 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9759 ptid from regcache.
9760
1afaf9f4
SM
97612017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9762
9763 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9764 i386_darwin_store_inferior_registers): Use ptid from regcache.
9765
aac12e24
SM
97662017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9767
9768 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9769 i386bsd_store_inferior_registers): Use ptid from regcache.
9770
bbe1eef1
SM
97712017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9772
9773 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9774 hppaobsd_store_registers): Use ptid from regcache.
9775
10799020
SM
97762017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9777
9778 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9779 hppanbsd_store_registers): Use ptid from regcache.
9780
00204cf7
SM
97812017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9782
9783 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9784 from regcache. Use get_ptrace_pid.
9785
11a33714
SM
97862017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9787
9788 * corelow.c (get_core_register_section): Use ptid from regcache,
9789 update doc.
9790
317cd492
SM
97912017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9792
9793 * bsd-uthread.c (bsd_uthread_fetch_registers,
9794 bsd_uthread_store_registers): Use ptid from regcache, set and
9795 restore inferior_ptid.
9796
9ac8a7c2
SM
97972017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9798
9799 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9800 fetch_fp_regs, store_register, store_regs, store_fp_register,
9801 store_fp_regs): Use ptid from regcache.
9802
4ac4bb6a
SM
98032017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9804
9805 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9806 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9807 store_vfp_regs): Use ptid from regcache.
9808
9bcbdca8
PA
98092017-03-17 Pedro Alves <palves@redhat.com>
9810
9811 PR remote/21188
9812 * ser-base.c (ser_base_wait_for): Add comment.
9813 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9814 version.
9815 * ser-unix.c (hardwire_raw): Remove reference to
9816 scb->current_timeout.
9817 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9818 (hardwire_ops): Install ser_base_readchar instead of
9819 hardwire_readchar.
9820 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9821 Remove fields.
9822
7503099f
JG
98232017-03-17 Jonah Graham <jonah@kichwacoders.com>
9824
9825 PR gdb/19637
9826 * python/lib/gdb/printer/bound_registers.py: Add support for
9827 Python 3.
9828
7942e96e
AA
98292017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9830
9831 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9832 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9833 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9834 byte_offset to subobj_byte_offset. Fix the handling of
9835 DWARF_VALUE_STACK on big-endian targets when coming via an
9836 implicit pointer.
9837 (dwarf2_evaluate_loc_desc): Adjust call to
9838 dwarf2_evaluate_loc_desc_full.
9839 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9840 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9841
ba14f379
YQ
98422017-03-16 Yao Qi <yao.qi@linaro.org>
9843
9844 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9845 and REVSH instructions.
9846
b121eeb9
YQ
98472017-03-16 Yao Qi <yao.qi@linaro.org>
9848
9849 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9850 (arm_record_test): Declare.
9851 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9852 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9853 align with the manual.
9854 (thumb_record_misc): Adjust the code order to align with the
9855 manual.
9856 (thumb2_record_decode_insn_handler): Fix instruction matching.
9857 (instruction_reader_thumb): New class.
9858 (arm_record_test): New function.
9859
728a7913
YQ
98602017-03-16 Yao Qi <yao.qi@linaro.org>
9861
9862 * arm-tdep.c (abstract_memory_reader): New class.
9863 (instruction_reader): New class.
9864 (extract_arm_insn): Add argument 'reader'. Callers updated.
9865 (decode_insn): Likewise.
9866
34b43320
DE
98672017-03-16 Doug Evans <dje@google.com>
9868
a7c0469f
DE
9869 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9870 member. Change type of TYPE member to SCM. All uses updated.
9871 (lsscm_make_lazy_string_smob): Add assert.
9872 (lsscm_make_lazy_string): Flag bad length values.
9873 (lsscm_elt_type): New function.
9874 (gdbscm_lazy_string_to_value): Rewrite to use
9875 lsscm_safe_lazy_string_to_value.
9876 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9877 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9878 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9879 in incoming type.
9880 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9881 * guile/scm-type.c (tyscm_scm_to_type): New function.
9882
98832017-03-15 Doug Evans <dje@google.com>
9884
34b43320
DE
9885 PR python/17728, python/18439, python/18779
9886 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9887 member. Change type of TYPE member to PyObject *. All uses updated.
9888 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9889 (gdbpy_create_lazy_string_object): Flag bad length values.
9890 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9891 Handle typedefs in incoming type.
9892 (stpy_lazy_string_elt_type): New function.
9893 (gdbpy_extract_lazy_string): Call it.
9894 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9895 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9896 typedefs in incoming type.
9897
a3a5fecc
DE
98982017-03-16 Doug Evans <dje@google.com>
9899
9900 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9901 * guile/scm-type.c (tyscm_scm_to_type): New function.
9902
28f1c605
JW
99032017-03-16 Jiong Wang <jiong.wang@arm.com>
9904
9905 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9906 "ULONGEST" for "skip".
9907
87c336f6
AA
99082017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9909
9910 PR gdb/21220
9911 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9912 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9913 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9914 over ptrace peek/poke until end of buffer or error.
9915
cf81cf60
SM
99162017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9917
9918 * parse.c (length_of_subexp): Make static.
9919 * parser-defs.h (length_of_subexp): Remove.
9920
a379284a
AA
99212017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9922
9923 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9924 as well.
9925
8a6200ba
PA
99262017-03-14 Pedro Alves <palves@redhat.com>
9927
9928 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9929 (main): Use std::unique_ptr. Remove calls to
9930 cp_demangled_name_parse_free.
9931
f79ec206
SM
99322017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9933
9934 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9935 alphabsd_store_inferior_registers): Use regcache->ptid instead
9936 of inferior_ptid.
9937
edb5fb00
SM
99382017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9939
9940 * aix-thread.c (aix_thread_fetch_registers,
9941 aix_thread_store_registers): Use regcache->ptid instead of
9942 inferior_ptid.
9943
55119686
SM
99442017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9945
9946 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9947 store_gregs_to_thread, fetch_fpregs_from_thread,
9948 store_fpregs_to_thread): Use regcache->ptid instead of
9949 inferior_ptid.
9950
6a06fbb7
SM
99512017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9952
9953 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9954 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9955 instead of inferior_ptid.
9956
c6386875
SM
99572017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9958
9959 * target.c (target_fetch_registers, target_store_registers): Add
9960 assert.
9961
ddaaf0fb
SM
99622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9963
9964 * regcache.h (regcache_get_ptid): New function.
9965 * regcache.c (regcache_get_ptid): New function.
9966
b9da89d1 99672017-03-13 Mark Wielaard <mark@klomp.org>
9968
9969 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9970
5f4d1085
KS
99712017-03-10 Keith Seitz <keiths@redhat.com>
9972
9973 PR c++/8218
9974 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9975
c65d6b55
PA
99762017-03-08 Pedro Alves <palves@redhat.com>
9977
9978 PR gdb/18360
9979 * infrun.c (start_step_over, do_target_resume, resume)
9980 (restart_threads): Assert we're not resuming a thread that is
9981 meant to be stopped.
9982 (infrun_thread_stop_requested_callback): Delete.
9983 (infrun_thread_stop_requested): If the thread is internally
9984 stopped, queue a pending stop event and clear the thread's
9985 inline-frame state.
9986 (handle_stop_requested): New function.
9987 (handle_syscall_event, handle_inferior_event_1): Use
9988 handle_stop_requested.
9989 (handle_stop_requested): New function.
9990 (handle_signal_stop): Set the thread's stop_signal here instead of
9991 at caller.
9992 (finish_step_over): Clear step over info unconditionally.
9993 (handle_signal_stop): If the user had interrupted the event
9994 thread, consider the stop a random signal.
9995 (handle_signal_stop) <signal arrived while stepping over
9996 breakpoint>: Don't restart threads here.
9997 (stop_waiting): Don't clear step-over info here.
9998
15c22686
PA
99992017-03-08 Pedro Alves <palves@redhat.com>
10000
10001 PR 21206
10002 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10003 goes to argument 2, not 1.
10004
6e5d74e7
PA
100052017-03-08 Pedro Alves <palves@redhat.com>
10006
10007 PR cli/21218
10008 * top.c (gdb_readline_wrapper): Avoid passing NULL to
10009 display_gdb_prompt.
10010 (command_line_input): Add comment.
10011
9753a2f6
PA
100122017-03-08 Pedro Alves <palves@redhat.com>
10013
10014 PR tui/21216
10015 * tui/tui-file.c (tui_file::write): New.
10016 * tui/tui-file.h (tui_file): Override "write".
10017 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10018 factored out from ...
10019 (tui_puts): ... here.
10020 (tui_putc): Use them.
10021 (tui_write): New function.
10022 * tui/tui-io.h (tui_write): Declare.
10023
1672e0d9
SDJ
100242017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
10025
10026 * Makefile.in (SFILES): Replace "environ.c" with
10027 "common/environ.c".
10028 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10029 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
10030 to...
10031 * common/environ.c: ... here.
10032 * environ.h: Moved to...
10033 * common/environ.h: ... here.
10034
f7bb4e3a
PB
100352017-03-07 Peter Bergner <bergner@vnet.ibm.com>
10036
10037 * gdbarch.sh (pstring_ptr): New static function.
10038 (gdbarch_disassembler_options): Use it.
10039 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10040 not valid_disassembler_option->name.
10041 * gdbarch.c: Regenerate.
10042
e45ced6c
PB
100432017-03-07 Peter Bergner <bergner@vnet.ibm.com>
10044
10045 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10046
5f6fd321
PA
100472017-03-07 Pedro Alves <palves@redhat.com>
10048
10049 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10050
6dbb839a 100512017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
10052
10053 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10054 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10055 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 10056 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 10057
d274ecf4
SM
100582017-03-06 Simon Marchi <simon.marchi@ericsson.com>
10059
10060 * xtensa-linux-nat.c (fetch_gregs): Remove const.
10061
df97be55
SM
100622017-03-03 Simon Marchi <simon.marchi@ericsson.com>
10063
10064 * remote.c (remote_add_target_side_commands): Use range-based
10065 for loop.
10066
7d45f3df
YQ
100672017-03-03 Yao Qi <yao.qi@linaro.org>
10068
10069 PR gdb/21165
10070 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10071 value is lazy.
10072 * valprint.c (common_val_print): Likewise.
10073
65b48a81
PB
100742017-02-28 Peter Bergner <bergner@vnet.ibm.com>
10075
10076 * NEWS: Mention new set/show disassembler-options commands.
10077 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10078 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10079 (prospective_options): New static variable.
10080 (gdb_disassembler::gdb_disassembler): Initialize
10081 m_di.disassembler_options.
10082 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10083 (get_disassembler_options): New function.
10084 (set_disassembler_options): Likewise.
10085 (set_disassembler_options_sfunc): Likewise.
10086 (show_disassembler_options_sfunc): Likewise.
10087 (disassembler_options_completer): Likewise.
10088 (_initialize_disasm): Likewise.
10089 * disasm.h (get_disassembler_options): New prototype.
10090 (set_disassembler_options): Likewise.
10091 * gdbarch.sh (gdbarch_disassembler_options): New variable.
10092 (gdbarch_verify_disassembler_options): Likewise.
10093 * gdbarch.c: Regenerate.
10094 * gdbarch.h: Likewise.
10095 * arm-tdep.c (num_disassembly_options): Delete.
10096 (set_disassembly_style): Likewise.
10097 (arm_disassembler_options): New static variable.
10098 (set_disassembly_style_sfunc): Convert short style name into long
10099 option name. Call set_disassembler_options.
10100 (show_disassembly_style_sfunc): New function.
10101 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10102 set_gdbarch_verify_disassembler_options.
10103 (_initialize_arm_tdep): Delete regnames variable and update callers.
10104 (arm_disassembler_options): Initialize.
10105 (disasm_options): New variable.
10106 (num_disassembly_options): Rename from this...
10107 (num_disassembly_styles): ...to this. Compute by scanning through
10108 disasm_options.
10109 (valid_disassembly_styles): Initialize using disasm_options.
10110 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10111 set_arm_regname_option.
10112 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10113 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10114 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10115 set_gdbarch_verify_disassembler_options.
10116 * s390-tdep.c (s390_disassembler_options): New static variable.
10117 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10118 set_gdbarch_verify_disassembler_options.
10119
d538e36d
SM
101202017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10121
10122 * remote.c (remote_add_target_side_condition): Remove "struct"
10123 keyword from range-based for loop.
10124
83621223
SM
101252017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10126
10127 * remote.c (remote_add_target_side_condition): Use range-based
10128 for loop. Update comment.
10129
2123df0e
YQ
101302017-02-27 Yao Qi <yao.qi@linaro.org>
10131
10132 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10133
8e368124
AH
101342017-02-26 Alan Hayward <alan.hayward@arm.com>
10135
10136 * regcache.c (regcache_raw_update): New function.
10137 (regcache_raw_read): Move code to regcache_raw_update.
10138 * regcache.h (regcache_raw_update): New declaration.
10139 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10140
a49dd8dd
JK
101412017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
10142
10143 * dwarf2read.c (create_debug_type_hash_table): Initialize
10144 header.signature and header.type_offset_in_tu.
10145
34e4bae9
PA
101462017-02-24 Pedro Alves <palves@redhat.com>
10147
10148 * symtab.c (make_file_symbol_completion_list_1): Use
10149 add_symtab_completions.
10150
b0e4b369
AH
101512017-02-24 Alan Hayward <alan.hayward@arm.com>
10152
10153 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10154
975c21ab
AH
101552017-02-24 Alan Hayward <alan.hayward@arm.com>
10156
10157 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10158 I386_MAX_REGISTER_SIZE.
10159 (i386_pseudo_register_write): Likewise.
10160 (i386_process_record): Likewise.
10161 * i387-tdep.c (i387_supply_xsave): Likewise.
10162 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10163 (store_register): Likewise.
10164
14bc53a8
PA
101652017-02-23 Pedro Alves <palves@redhat.com>
10166
10167 * ada-lang.c: Include "common/function-view.h".
10168 (ada_iterate_over_symbols): Adjust to use function_view as
10169 callback type.
10170 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10171 (ada_make_symbol_completion_list): Use a lambda.
10172 (ada_exc_search_name_matches): Delete.
10173 (name_matches_regex): New.
10174 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10175 * compile/compile-c-support.c: Include "common/function-view.h".
10176 (print_one_macro): Change prototype to accept a ui_file pointer.
10177 (write_macro_definitions): Use a lambda.
10178 * dwarf2read.c: Include "common/function-view.h".
10179 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10180 (dw2_expand_symtabs_matching): Adjust to use function_view as
10181 callback type.
10182 * language.h: Include "common/function-view.h".
10183 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10184 function_view as callback type.
10185 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10186 * linespec.c: Include "common/function-view.h".
10187 (collect_info::add_symbol): New method.
10188 (struct symbol_and_data_callback, iterate_inline_only, struct
10189 symbol_matcher_data, iterate_name_matcher): Delete.
10190 (iterate_over_all_matching_symtabs): Adjust to use function_view
10191 as callback type and lambdas.
10192 (iterate_over_file_blocks): Adjust to use function_view as
10193 callback type.
10194 (decode_compound_collector): Now a class with private fields.
10195 (decode_compound_collector::release_symbols): New method.
10196 (collect_one_symbol): Rename to...
10197 (decode_compound_collector::operator()): ... this and adjust.
10198 (lookup_prefix_sym): decode_compound_collector construction bits
10199 move to decode_compound_collector ctor. Pass the
10200 decode_compound_collector object directly as callback. Remove
10201 cleanups and use decode_compound_collector::release_symbols
10202 instead.
10203 (symtab_collector): Now a class with private fields.
10204 (symtab_collector::release_symtabs): New method.
10205 (add_symtabs_to_list): Rename to...
10206 (symtab_collector::operator()): ... this and adjust.
10207 (collect_symtabs_from_filename): symtab_collector construction
10208 bits move to symtab_collector ctor. Pass the symtab_collector
10209 object directly as callback. Remove cleanups and use
10210 symtab_collector::release_symtabs instead.
10211 (collect_symbols): Delete.
10212 (add_matching_symbols_to_info): Use lambdas.
10213 * macrocmd.c (print_macro_callback): Delete.
10214 (info_macro_command): Use a lambda.
10215 (info_macros_command): Pass print_macro_definition as callable
10216 directly.
10217 (print_one_macro): Remove 'ignore' parameter.
10218 (macro_list_command): Adjust.
10219 * macrotab.c (macro_for_each_data::fn): Now a function_view.
10220 (macro_for_each_data::user_data): Delete field.
10221 (foreach_macro): Adjust to call the function_view.
10222 (macro_for_each): Adjust to use function_view as callback type.
10223 (foreach_macro_in_scope): Adjust to call the function_view.
10224 (macro_for_each_in_scope): Adjust to use function_view as callback
10225 type.
10226 * macrotab.h: Include "common/function-view.h".
10227 (macro_callback_fn): Declare a prototype instead of a pointer.
10228 Remove "user_data" parameter.
10229 (macro_for_each, macro_for_each_in_scope): Adjust to use
10230 function_view as callback type.
10231 * psymtab.c (partial_map_expand_apply)
10232 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10233 Adjust to use function_view as callback type and to return bool.
10234 (psym_expand_symtabs_matching): Adjust to use function_view as
10235 callback types.
10236 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10237 to use function_view as callback type and to return bool.
10238 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10239 callback types.
10240 * symfile.c (expand_symtabs_matching): Adjust to use function_view
10241 as callback types.
10242 * symfile.h: Include "common/function-view.h".
10243 (expand_symtabs_file_matcher_ftype)
10244 (expand_symtabs_symbol_matcher_ftype)
10245 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10246 return bool.
10247 (quick_symbol_functions::map_symtabs_matching_filename)
10248 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10249 function_view as callback type and return bool.
10250 (expand_symtabs_matching): Adjust to use function_view as callback
10251 type.
10252 (maintenance_expand_name_matcher)
10253 (maintenance_expand_file_matcher): Delete.
10254 (maintenance_expand_symtabs): Use lambdas.
10255 * symtab.c (iterate_over_some_symtabs): Adjust to use
10256 function_view as callback types and return bool.
10257 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
10258 of a cleanup.
10259 (lookup_symtab_callback): Delete.
10260 (lookup_symtab): Use a lambda.
10261 (iterate_over_symbols): Adjust to use function_view as callback
10262 type.
10263 (struct search_symbols_data, search_symbols_file_matches)
10264 (search_symbols_name_matches): Delete.
10265 (search_symbols): Use a pair of lambdas.
10266 (struct add_name_data, add_macro_name, symbol_completion_matcher)
10267 (symtab_expansion_callback): Delete.
10268 (default_make_symbol_completion_list_break_on_1): Use lambdas.
10269 * symtab.h: Include "common/function-view.h".
10270 (iterate_over_some_symtabs): Adjust to use function_view as
10271 callback type and return bool.
10272 (iterate_over_symtabs): Adjust to use function_view as callback
10273 type.
10274 (symbol_found_callback_ftype): Remove 'data' parameter and return
10275 bool.
10276 (iterate_over_symbols): Adjust to use function_view as callback
10277 type.
10278
07e253aa
PA
102792017-02-23 Pedro Alves <palves@redhat.com>
10280
10281 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10282 (%.o) <unittests/%.c>: New pattern.
10283 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10284 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10285 * common/function-view.h: New file.
10286 * unittests/function-view-selftests.c: New file.
10287 * configure: Regenerate.
10288
8eaf5320
SM
102892017-02-23 Simon Marchi <simon.marchi@ericsson.com>
10290
10291 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10292 inferior_ptid.
10293 * go32-nat.c (go32_thread_alive): Likewise.
10294
38768751
YQ
102952017-02-23 Yao Qi <yao.qi@linaro.org>
10296
10297 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10298 delete.
10299
0a8beaba
YQ
103002017-02-23 Yao Qi <yao.qi@linaro.org>
10301
10302 * varobj.c (varobj_clear_saved_item): Use delete instead of
10303 xfree.
10304 (update_dynamic_varobj_children): Likewise.
10305
58fdfd2c
JK
103062017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10307
10308 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10309
1b90b139
SM
103102017-02-21 Simon Marchi <simon.marchi@ericsson.com>
10311
10312 * common/enum-flags.h (enum_flags::enum_flags): Initialize
10313 m_enum_value to 0 in default constructor.
10314
2039d74e
EBM
103152017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10316
10317 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10318 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10319 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10320 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10321 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10322 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10323 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10324 IS_STORE_CONDITIONAL_INSN.
10325
7814882a
JK
103262017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10327
10328 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10329
0ae60b63
JK
103302017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10331
10332 * NEWS (Changes since GDB 7.12): Add DWARF-5.
10333
0224619f
JK
103342017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10335
10336 * dwarf2read.c (skip_one_die, read_attribute_value)
10337 (dwarf2_const_value_attr, dump_die_shallow)
10338 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10339 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10340
0af92d60
JK
103412017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10342
10343 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10344 (dwarf_parse_macro_header): Accept DWARF version 5.
10345 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10346
216f72a1
JK
103472017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10348
10349 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10350 DW_AT_GNU_*.
10351 * common/common-exceptions.h (enum errors): Likewise.
10352 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10353 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10354 (dwarf_expr_context::execute_stack_op): Likewise.
10355 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10356 Likewise.
10357 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10358 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10359 (show_entry_values_debug, call_site_to_target_addr)
10360 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10361 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10362 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10363 (value_of_dwarf_block_entry, indirect_pieced_value)
10364 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10365 (disassemble_dwarf_expression): Likewise.
10366 * dwarf2read.c (process_die, inherit_abstract_dies)
10367 (read_call_site_scope): Likewise.
10368 * gdbtypes.h (struct func_type, struct call_site_parameter)
10369 (struct call_site): Likewise.
10370 * stack.c (read_frame_arg): Likewise.
10371 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10372
43988095
JK
103732017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10374
10375 * defs.h (read_unsigned_leb128): New declaration.
10376 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10377 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10378 (dwarf2_find_location_expression): Call also
10379 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
10380 * dwarf2loc.h (dwarf2_version): New declaration.
10381 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10382 rnglists.
10383 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10384 .debug_rnglists.
10385 (struct dwop_section_names): Add loclists_dwo.
10386 (dwop_section_names): Add .debug_loclists.dwo.
10387 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10388 (struct dwarf2_per_cu_data): Add dwarf_version.
10389 (struct dwo_sections): Add loclists.
10390 (struct attr_abbrev): Add implicit_const.
10391 (read_indirect_line_string): New declaration.
10392 (read_unsigned_leb128): Delete declaration.
10393 (rcuh_kind): New definition.
10394 (read_and_check_comp_unit_head): Change parameter
10395 is_debug_types_section to section_kind.
10396 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10397 (read_comp_unit_head): Change parameter abfd to section, add parameter
10398 section_kind. Handle DWARF-5.
10399 (error_check_comp_unit_head): Accept also DWARF version 5.
10400 (read_and_check_comp_unit_head): Change parameter
10401 is_debug_types_section to section_kind.
10402 (read_and_check_type_unit_head): Delete function.
10403 (read_abbrev_offset): Handle DWARF-5.
10404 (create_debug_type_hash_table): Add parameter section_kind. Process
10405 only DW_UT_type. Use signature and type_offset_in_tu from struct
10406 comp_unit_head.
10407 (create_debug_types_hash_table): Update create_debug_type_hash_table
10408 caller.
10409 (create_all_type_units): Call create_debug_type_hash_table.
10410 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10411 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10412 caller.
10413 (skip_one_die): Handle DW_FORM_implicit_const.
10414 (dwarf2_rnglists_process): New function.
10415 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10416 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10417 (read_attribute_value): Handle DW_FORM_implicit_const,
10418 DW_FORM_line_strp.
10419 (read_attribute): Handle DW_FORM_implicit_const.
10420 (read_indirect_string_at_offset_from): New function from
10421 read_indirect_string_at_offset.
10422 (read_indirect_string_at_offset): Call
10423 read_indirect_string_at_offset_from.
10424 (read_indirect_line_string_at_offset): New function.
10425 (read_indirect_string): New function comment.
10426 (read_indirect_line_string): New function.
10427 (read_unsigned_leb128): Make it global.
10428 (dwarf2_string_attr): Handle DWARF-5.
10429 (add_include_dir_stub, read_formatted_entries): New functions.
10430 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10431 Handle DWARF-5.
10432 (per_cu_header_read_in): Update read_comp_unit_head caller.
10433 (dwarf2_version): New function.
10434 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10435 rnglists.
10436 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10437 fields.
10438
22d2f3ab
JK
104392017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10440
10441 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10442
5f46c5a5
JK
104432017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10444
10445 * dwarf2read.c (dwarf2_ranges_process): New function from
10446 dwarf2_ranges_read.
10447 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10448 dwarf2_ranges_process.
10449
78d4d2c5
JK
104502017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10451
10452 * dwarf2read.c (create_debug_type_hash_table): New function from
10453 create_debug_types_hash_table.
10454 (create_debug_types_hash_table): Call create_debug_type_hash_table.
10455 (create_all_type_units, open_and_init_dwo_file): Update
10456 create_debug_types_hash_table callers.
10457
1b076f25
SDJ
104582017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10459
10460 PR gdb/16188
10461 * fork-child.c (trace_start_error): Fix thinko. va_end should
10462 refer to 'ap', not 'args'.
10463
0db8980c
SDJ
104642017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10465 Pedro Alves <palves@redhat.com>
10466
10467 PR gdb/16188
10468 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10469 calls succeeded.
10470 * fork-child.c (trace_start_error): New function.
10471 (trace_start_error_with_name): Likewise.
10472 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10473 * inf-ptrace.c (inf_ptrace_me): Likewise.
10474 * inferior.h (trace_start_error): New prototype.
10475 (trace_start_error_with_name): Likewise.
10476
99e8a4f9
SDJ
104772017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
10478
10479 PR gdb/21164
10480 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10481 NULL before using it.
10482 * symmisc.c (maintenance_print_symbols): Likewise.
10483 (maintenance_print_msymbols): Likewise.
10484
4e746bb6
TW
104852017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10486
10487 * NEWS: Add record Python bindings entry.
10488
104892017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10490
10491 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10492 py-record-full.o.
10493 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10494 * python/py-record-btrace.c, python/py-record-btrace.h,
10495 python/py-record-full.c, python/py-record-full.h: New file.
10496 * python/py-record.c: Add include for py-record-btrace.h and
10497 py-record-full.h.
10498 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10499 recpy_instruction_history, recpy_function_call_history, recpy_begin,
10500 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10501 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10502 New definition.
10503 (gdbpy_initialize_btrace): New export.
10504 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10505
105062017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10507
10508 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10509 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10510 * python/py-record.c: New file.
10511 * python/python-internal.h (gdbpy_start_recording,
10512 gdbpy_current_recording, gdpy_stop_recording,
10513 gdbpy_initialize_record): New export.
10514 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10515 (python_GdbMethods): Add gdbpy_start_recording,
10516 gdbpy_current_recording and gdbpy_stop_recording.
10517
105182017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10519
10520 * record-btrace.c (record_btrace_record_method): New function.
10521 (init_record_btrace_ops): Initialize to_record_method.
10522 * record-full.c (record_full_record_method): New function.
10523 (init_record_full_ops, init_record_full_core_ops): Add
10524 record_full_record_method.
10525 * record.h (enum record_method): New enum.
10526 * target-debug.h (target_debug_print_enum_record_method: New define.
10527 * target-delegates.c: Regenerate.
10528 * target.c (target_record_method): New function.
10529 * target.h: Include record.h.
10530 (struct target_ops) <to_record_method>: New field.
10531 (target_record_method): New export.
10532
105332017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10534
10535 * record.h (record_start, record_stop): New export.
10536 * record.c (record_start, record_stop): New function.
10537
105382017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10539
10540 * btrace.c (btrace_fetch): Copy function call segments pointer
10541 into a vector.
10542 (btrace_clear): Clear the vector.
10543 (btrace_find_insn_by_number): Use binary search to find the correct
10544 function call segment.
10545 * btrace.h (brace_fun_p): New typedef.
10546 (struct btrace_thread_info) <functions>: New field.
10547
105482017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10549
10550 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10551 * btrace.c (btrace_decode_error): ... here. New function.
10552 * btrace.h (btrace_decode_error): New export.
10553
105542017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10555
10556 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10557 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10558 btrace_find_insn_by_number): Remove special case for gaps.
10559 * btrace.h (btrace_insn_get_error): New export.
10560 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10561 * record-btrace.c (btrace_insn_history): Print number for gaps.
10562 (record_btrace_info, record_btrace_goto): Handle gaps.
10563
3f77c769
TT
105642017-02-14 Tom Tromey <tom@tromey.com>
10565
10566 PR python/13598:
10567 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10568 event.
10569 * python/py-evts.c (gdbpy_initialize_py_events): Add
10570 before_prompt registry.
10571 * python/py-events.h (events_object) <before_prompt>: New field.
10572
4c2c7ac6
MM
105732017-02-14 Markus Metzger <markus.t.metzger@intel.com>
10574
10575 * btrace.c (ftrace_new_switch): Preserve up link and flags.
10576
5cf30ebf
LM
105772017-02-13 Luis Machado <lgustavo@codesourcery.com>
10578
10579 * symfile (_initialize_symfile): Add usage text to the load command's
10580 help text.
10581
26a06916
SM
105822017-02-10 Simon Marchi <simon.marchi@ericsson.com>
10583
10584 * utils.c (defaulted_query): Don't query on secondary UIs.
10585
0b145e37
TT
105862017-02-10 Tom Tromey <tom@tromey.com>
10587
10588 * rust-lang.c (rust_get_disr_info): Remove unused variable.
10589
2d8365c4
TT
105902017-02-10 Tom Tromey <tom@tromey.com>
10591
10592 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10593 "cleanup" local.
10594 * python/py-type.c (typy_legacy_template_argument): Remove
10595 unnecessary "cleanup" local.
10596
2bb8f231
TT
105972017-02-10 Tom Tromey <tom@tromey.com>
10598
10599 * python/python.c (do_start_initialization): New function, from
10600 _initialize_python.
10601 (_initialize_python): Call do_start_initialization.
10602 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10603 goto.
10604
1bdfaf42
TT
106052017-02-10 Tom Tromey <tom@tromey.com>
10606
10607 * python/py-prettyprint.c (pretty_print_one_value): Use
10608 gdbpy_ref.
10609
88b6faea
TT
106102017-02-10 Tom Tromey <tom@tromey.com>
10611
10612 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10613 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10614 gdbpy_ref.
10615 * python/py-type.c (field_new): Use gdbpy_ref.
10616 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10617 gdbpy_ref.
10618 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10619 (py_free_pspace): Likewise.
10620 (pspace_to_pspace_object): Likewise.
10621 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10622 (py_free_objfile): Likewise.
10623 (objfile_to_objfile_object): Likewise.
10624 * python/py-inferior.c (delete_thread_object): Use
10625 gdbpy_ref.
10626 (infpy_read_memory): Likewise.
10627 (py_free_inferior): Likewise.
10628 * python/py-evtregistry.c (create_eventregistry_object): Use
10629 gdbpy_ref.
10630 * python/py-event.c (create_event_object): Use gdbpy_ref.
10631
7780f186
TT
106322017-02-10 Tom Tromey <tom@tromey.com>
10633
10634 * python/py-ref.h (gdbpy_ref_policy): Now a template.
10635 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10636 used.
10637 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10638 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10639 python/py-exitedevent.c, python/py-finishbreakpoint.c,
10640 python/py-framefilter.c, python/py-function.c,
10641 python/py-inferior.c, python/py-infevents.c,
10642 python/py-linetable.c, python/py-newobjfileevent.c,
10643 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10644 python/py-signalevent.c, python/py-stopevent.c,
10645 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10646 python/py-unwind.c, python/py-utils.c, python/py-value.c,
10647 python/py-varobj.c, python/py-xmethods.c, python/python.c,
10648 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10649
d4b0bb18
TT
106502017-02-10 Tom Tromey <tom@tromey.com>
10651
10652 * ui-out.h (ui_out_emit_type): New class.
10653 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10654 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10655 and ui_out_emit_tuple.
10656 (enumerate_locals): Likewise.
10657 (py_mi_print_variables, py_print_locals, py_print_args): Use
10658 ui_out_emit_list.
10659 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10660 ui_out_emit_list.
10661 * common/gdb_optional.h: New file.
10662
f67f945c
MG
106632017-02-10 Martin Galvan <martingalvan@sourceware.org>
10664
10665 * MAINTAINERS (Write After Approval): Update my e-mail address.
10666
18da0c51
MG
106672017-02-10 Martin Galvan <martingalvan@sourceware.org>
10668
10669 PR gdb/21122
10670 * breakpoint.c (_initialize_breakpoint): Update the help description
10671 of the 'commands' command to indicate that it takes a list argument.
10672
62c14536
SM
106732017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10674
10675 * interps.c (current_interp_set_logging): Remove "return".
10676
ff6fa247
GB
106772017-02-09 Gary Benson <gbenson@redhat.com>
10678
10679 * symtab.c (add_symtab_completions): Prevent NULL pointer
10680 dereference.
10681
a474bd8e
PA
106822017-02-08 Pedro Alves <palves@redhat.com>
10683
10684 * interps.c (interp::interp): Remove reference to quiet_p.
10685 (interp_set): Make static. Remove dead "Switching to" output
10686 code.
10687 (interp_quiet_p, interp_set_quiet): Delete.
10688 (interpreter_exec_cmd): Don't set the interpreter quiet.
10689 * interps.h (interp_quiet_p): Make static.
10690 (class interp) <quiet_p>: Remove field
10691
3d7b173c
JG
106922017-02-08 Jerome Guitton <guitton@adacore.com>
10693
604c4576
JG
10694 * cli/cli-decode.c (find_command_name_length): Make it extern.
10695 * cli/cli-decode.h (find_command_name_length): Declare.
10696 * cli/cli-script.c (command_name_equals, line_first_arg):
10697 New functions.
10698 (process_next_line): Use cli-decode to parse command names.
10699 (build_command_line): Make args a constant pointer.
10700
107012017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 10702
3d7b173c
JG
10703 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10704 Remove case-insensitive search.
10705
1291063d
JM
107062017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10707
10708 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10709 at the end of the line. Avoids an ARI warning.
10710
20b477a7
LM
107112017-02-06 Luis Machado <lgustavo@codesourcery.com>
10712
10713 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10714 rdseed instructions.
10715 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10716
3f7b46f2
IR
107172017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10718
10719 PR tdep/20936
10720 Provide and use sparc32 and sparc64 target description XML files.
10721 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10722 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10723 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10724 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10725 * features/sparc/sparc32-solaris.xml: New file.
10726 * features/sparc/sparc64-solaris.xml: New file.
10727 * features/sparc/sparc32-solaris.c: Generated.
10728 * features/sparc/sparc64-solaris.c: Generated.
10729 * sparc-tdep.h: Account for differences in target descriptions.
10730 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10731 (sparc32_register_type): Use target provided registers.
10732 (validate_tdesc_registers): New function.
10733 (sparc32_gdbarch_init): Use tdesc_has_registers.
10734 Set pseudoregister functions.
10735 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10736 (sparc64_register_type): Use target provided registers.
10737 (sparc64_init_abi): Set pseudoregister functions.
10738
f0fd41c1
TT
107392017-02-03 Tom Tromey <tom@tromey.com>
10740
10741 PR rust/21097:
10742 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10743 with a single member.
10744
d6f9b0fb
PA
107452017-02-03 Pedro Alves <palves@redhat.com>
10746
10747 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10748 (cli_interp_base::~cli_interp_base): New.
10749 (cli_interp): New struct.
10750 (as_cli_interp): Cast the interp itself to cli_interp.
10751 (cli_interpreter_pre_command_loop): Rename to ...
10752 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10753 parameter.
10754 (cli_interpreter_init): Rename to ...
10755 (cli_interp::init): ... this. Remove 'self' parameter. Use
10756 boolean. Make extern.
10757 (cli_interpreter_resume): Rename to ...
10758 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10759 extern.
10760 (cli_interpreter_suspend): Rename to ...
10761 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10762 extern.
10763 (cli_interpreter_exec): Rename to ...
10764 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10765 extern.
10766 (cli_interpreter_supports_command_editing): Rename to ...
10767 (cli_interp_base::supports_command_editing): ... this. Remove
10768 'interp' parameter. Make extern.
10769 (cli_ui_out): Rename to ...
10770 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10771 Make extern.
10772 (cli_set_logging): Rename to ...
10773 (cli_interp_base::set_logging): ... this. Remove 'interp'
10774 parameter. Make extern.
10775 (cli_interp_procs): Delete.
10776 (cli_interp_factory): Adjust to use "new".
10777 * cli/cli-interp.h: Include "interps.h".
10778 (struct cli_interp_base): New struct.
10779 * interps.c (struct interp): Delete. Fields moved to interps.h.
10780 (interp_new): Delete.
10781 (interp::interp, interp::~interp): New.
10782 (interp_set): Use bool, and return void. Assume the interpreter
10783 has suspend, init and resume methods, and that the all return
10784 void.
10785 (set_top_level_interpreter): interp_set returns void.
10786 (interp_ui_out): Adapt.
10787 (current_interp_set_logging): Adapt.
10788 (interp_data): Delete.
10789 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10790 (interp_exec): Adapt.
10791 (top_level_interpreter_data): Delete.
10792 * interps.h (interp_init_ftype, interp_resume_ftype)
10793 (interp_suspend_ftype, interp_exec_ftype)
10794 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10795 (class interp): New.
10796 (interp_new): Delete.
10797 (interp_set): Now returns void. Use bool.
10798 (interp_data, top_level_interpreter_data): Delete.
10799 * mi/mi-common.h: Include interps.h.
10800 (class mi_interp): Inherit from interp. Define a ctor. Declare
10801 init, resume, suspect, exec, interp_ui_out, set_logging and
10802 pre_command_loop methods.
10803 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10804 (mi_interpreter_init): Rename to ...
10805 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10806 bool, return void and make extern. Adjust.
10807 (mi_interpreter_resume): ... Rename to ...
10808 (mi_interp::resume): ... this. Remove the 'data' parameter,
10809 return void and make extern. Adjust.
10810 (mi_interpreter_suspend): ... Rename to ...
10811 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10812 return void and make extern. Adjust.
10813 (mi_interpreter_exec): ... Rename to ...
10814 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10815 extern. Adjust.
10816 (mi_interpreter_pre_command_loop): ... Rename to ...
10817 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10818 parameter and make extern.
10819 (mi_on_normal_stop_1): Adjust.
10820 (mi_ui_out): Rename to ...
10821 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10822 parameter and make extern. Adjust.
10823 (mi_set_logging): Rename to ...
10824 (mi_interp::set_logging): ... this. Remove the 'interp'
10825 parameter and make extern. Adjust.
10826 (mi_interp_procs): Delete.
10827 (mi_interp_factory): Adjust to use 'new'.
10828 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10829 (mi_print_exception, mi_execute_command, mi_load_progress):
10830 Adjust.
10831 * tui/tui-interp.c (tui_interp): New class.
10832 (as_tui_interp): Return a tui_interp pointer.
10833 (tui_on_normal_stop, tui_on_signal_received)
10834 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10835 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10836 to use interp::interp_ui_out.
10837 (tui_init): Rename to ...
10838 (tui_interp::init): ... this. Remove the 'self' parameter, use
10839 bool, return void and make extern. Adjust.
10840 (tui_resume): Rename to ...
10841 (tui_interp::resume): ... this. Remove the 'data' parameter,
10842 return void and make extern. Adjust.
10843 (tui_suspend): Rename to ...
10844 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10845 return void and make extern. Adjust.
10846 (tui_ui_out): Rename to ...
10847 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10848 parameter, and make extern. Adjust.
10849 (tui_exec): Rename to ...
10850 (tui_interp::exec): ... this. Remove the 'data' parameter and
10851 make extern.
10852 (tui_interp_procs): Delete.
10853 (tui_interp_factory): Use "new".
10854
65c40c95
TT
108552017-02-02 Tom Tromey <tom@tromey.com>
10856
10857 * rust-exp.y (ends_raw_string, space_then_number)
10858 (rust_identifier_start_p): Return bool.
10859 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10860 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10861 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10862 (rust_chartype_p): Return bool.
10863 (val_print_struct, rust_print_struct_def, rust_print_type):
10864 Update.
10865 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10866 Return bool.
10867
b50f188d
TT
108682017-02-02 Tom Tromey <tom@tromey.com>
10869
10870 * rust-lang.c: Reindent.
10871
03c85b11
TT
108722017-02-02 Tom Tromey <tom@tromey.com>
10873
10874 * rust-lang.h (rust_crate_for_block): Update.
10875 * rust-lang.c (rust_crate_for_block): Return std::string.
10876 (rust_get_disr_info): Use std:;string, not
10877 gdb::unique_xmalloc_ptr.
10878 * rust-exp.y (crate_name): Update.
10879
9b6da501
PA
108802017-02-02 Pedro Alves <palves@redhat.com>
10881
10882 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10883 field out of gdb_disassembler_test and make it static.
10884
ec4cb20b
PA
108852017-02-02 Pedro Alves <palves@redhat.com>
10886
10887 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10888 mi1_interp and mi_interp fields.
10889
5be5dbf0
PA
108902017-02-02 Pedro Alves <palves@redhat.com>
10891
616268b6
PA
10892 * cli/cli-interp.c (struct saved_output_files, saved_output):
10893 Moved from cli/cli-logging.c.
10894 (cli_set_logging): New function.
10895 (cli_interp_procs): Install cli_set_logging.
10896 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10897 Declare.
10898 * cli/cli-logging.c (struct saved_output_files, saved_output):
10899 Moved to cli/cli-interp.c.
10900 (pop_output_files): Don't save outputs here.
10901 (make_logging_output): New function.
10902 (handle_redirections): Don't build tee nor save previous outputs
10903 here.
10904 * interps.c (current_interp_set_logging): Change prototype.
10905 Assume there's always a set_logging_proc method installed.
10906 * interps.h (interp_set_logging_ftype): Change prototype.
10907 (current_interp_set_logging): Change prototype and adjust comment.
10908 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10909 use make_logging_output.
10910 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
109112017-02-02 Pedro Alves <palves@redhat.com>
10912
5be5dbf0
PA
10913 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10914 from ...
10915 (set_logging_overwrite): ... here.
10916 (logging_no_redirect_file): Delete.
10917 (set_logging_redirect): Don't handle redirection on the fly.
10918 Instead warn that "logging off" / "logging on" is necessary.
10919 (pop_output_files): Delete references to logging_no_redirect_file.
10920 (show_logging_command): Always speak in terms of what will happen
10921 once logging is reenabled.
10922
c99cc448
PA
109232017-02-02 Pedro Alves <palves@redhat.com>
10924
10925 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10926
8b172ce7
PA
109272017-02-02 Pedro Alves <palves@redhat.com>
10928
10929 * disasm.c (gdb_pretty_print_insn): Rename to ...
10930 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10931 Remove gdbarch parameter. Adapt to clear the object's buffers
10932 instead of allocating new buffers, and to print using the object's
10933 gdb_disassembler instead of calling gdb_print_insn.
10934 (dump_insns): Use gdb_pretty_print_disassembler.
10935 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10936 (gdb_pretty_print_disassembler): New class.
10937 * record-btrace.c (btrace_insn_history): Use
10938 gdb_pretty_print_disassembler.
10939
d7e74731
PA
109402017-02-02 Pedro Alves <palves@redhat.com>
10941
10942 * ada-lang.c (type_as_string): Use string_file.
10943 * ada-valprint.c (ada_print_floating): Use string_file.
10944 * ada-varobj.c (ada_varobj_scalar_image)
10945 (ada_varobj_get_value_image): Use string_file.
10946 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10947 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10948 * breakpoint.c (update_inserted_breakpoint_locations)
10949 (insert_breakpoint_locations, reattach_breakpoints)
10950 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10951 (print_it_watchpoint): Use string_file.
10952 (save_breakpoints): Use stdio_file.
10953 * c-exp.y (oper): Use string_file.
10954 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10955 tee_file.
10956 (pop_output_files): Use delete.
10957 (handle_redirections): Use stdio_file and tee_file.
10958 * cli/cli-setshow.c (do_show_command): Use string_file.
10959 * compile/compile-c-support.c (c_compute_program): Use
10960 string_file.
10961 * compile/compile-c-symbols.c (generate_vla_size): Take a
10962 'string_file &' instead of a 'ui_file *'.
10963 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10964 of a 'ui_file *'. Use string_file.
10965 (generate_c_for_variable_locations): Take a 'string_file &'
10966 instead of a 'ui_file *'.
10967 * compile/compile-internal.h (generate_c_for_for_one_variable):
10968 Take a 'string_file &' instead of a 'ui_file *'.
10969 * compile/compile-loc2c.c (push, pushf, unary, binary)
10970 (print_label, pushf_register_address, pushf_register)
10971 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10972 'ui_file *'. Adjust.
10973 * compile/compile.c (compile_to_object): Use string_file.
10974 * compile/compile.h (compile_dwarf_expr_to_c)
10975 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10976 'ui_file *'.
10977 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10978 (replace_typedefs_qualified_name): Use string_file and
10979 obstack_copy0.
10980 * disasm.c (gdb_pretty_print_insn): Use string_file.
10981 (gdb_disassembly): Adjust reference the null_stream global.
10982 (do_ui_file_delete): Delete.
10983 (gdb_insn_length): Use null_stream.
10984 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10985 * dwarf2loc.c (dwarf2_compile_property_to_c)
10986 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10987 'string_file &' instead of a 'ui_file *'.
10988 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10989 * dwarf2read.c (do_ui_file_peek_last): Delete.
10990 (dwarf2_compute_name): Use string_file.
10991 * event-top.c (gdb_setup_readline): Use stdio_file.
10992 * gdbarch.sh (verify_gdbarch): Use string_file.
10993 * gdbtypes.c (safe_parse_type): Use null_stream.
10994 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10995 string_file.
10996 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10997 'string_file *' instead of a 'ui_file *'.
10998 (gdbscm_arch_disassemble): Use string_file.
10999 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11000 * guile/scm-ports.c (class ioscm_file_port): Now a class that
11001 inherits from ui_file.
11002 (ioscm_file_port_delete, ioscm_file_port_rewind)
11003 (ioscm_file_port_put): Delete.
11004 (ioscm_file_port_write): Rename to ...
11005 (ioscm_file_port::write): ... this. Remove file_port_magic
11006 checks.
11007 (ioscm_file_port_new): Delete.
11008 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11009 ui_file_up.
11010 * guile/scm-type.c (tyscm_type_name): Use string_file.
11011 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11012 Use string_file.
11013 * infcmd.c (print_return_value_1): Use string_file.
11014 * infrun.c (print_target_wait_results): Use string_file.
11015 * language.c (add_language): Use string_file.
11016 * location.c (explicit_to_string_internal): Use string_file.
11017 * main.c (captured_main_1): Use null_file.
11018 * maint.c (maintenance_print_architecture): Use stdio_file.
11019 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11020 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11021 event_channel>: Change type to mi_console_file pointer.
11022 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11023 (mi_console_file_delete): Delete.
11024 (struct mi_console_file): Delete.
11025 (mi_console_file_magic): Delete.
11026 (mi_console_file_new): Delete.
11027 (mi_console_file::mi_console_file): New.
11028 (mi_console_file_delete): Delete.
11029 (mi_console_file_fputs): Delete.
11030 (mi_console_file::write): New.
11031 (mi_console_raw_packet): Delete.
11032 (mi_console_file::flush): New.
11033 (mi_console_file_flush): Delete.
11034 (mi_console_set_raw): Rename to ...
11035 (mi_console_file::set_raw): ... this.
11036 * mi/mi-console.h (class mi_console_file): New class.
11037 (mi_console_file_new, mi_console_set_raw): Delete.
11038 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11039 (mi_set_logging): Use delete and tee_file. Adjust.
11040 * mi/mi-main.c (output_register): Use string_file.
11041 (mi_cmd_data_evaluate_expression): Use string_file.
11042 (mi_cmd_data_read_memory): Use string_file.
11043 (mi_cmd_execute, print_variable_or_computed): Use string_file.
11044 * mi/mi-out.c (mi_ui_out::main_stream): New.
11045 (mi_ui_out::rewind): Use main_stream and
11046 string_file.
11047 (mi_ui_out::put): Use main_stream and string_file.
11048 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11049 Allocate a 'string_file' instead.
11050 (mi_out_new): Don't allocate a mem_fileopen stream here.
11051 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11052 (mi_ui_out::main_stream): Declare method.
11053 * printcmd.c (eval_command): Use string_file.
11054 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11055 * python/py-arch.c (archpy_disassemble): Use string_file.
11056 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11057 * python/py-frame.c (frapy_str): Use string_file.
11058 * python/py-framefilter.c (py_print_type, py_print_single_arg):
11059 Use string_file.
11060 * python/py-type.c (typy_str): Use string_file.
11061 * python/py-unwind.c (unwind_infopy_str): Use string_file.
11062 * python/py-value.c (valpy_str): Use string_file.
11063 * record-btrace.c (btrace_insn_history): Use string_file.
11064 * regcache.c (regcache_print): Use stdio_file.
11065 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11066 * remote.c (escape_buffer): Use string_file.
11067 * rust-lang.c (rust_get_disr_info): Use string_file.
11068 * serial.c (serial_open_ops_1): Use stdio_file.
11069 (do_serial_close): Use delete.
11070 * stack.c (print_frame_arg): Use string_file.
11071 (print_frame_args): Remove local mem_fileopen stream, not used.
11072 (print_frame): Use string_file.
11073 * symmisc.c (maintenance_print_symbols): Use stdio_file.
11074 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11075 Take a 'string_file *' instead of a 'ui_file *'.
11076 * top.c (new_ui): Use stdio_file and stderr_file.
11077 (free_ui): Use delete.
11078 (execute_command_to_string): Use string_file.
11079 (quit_confirm): Use string_file.
11080 * tracepoint.c (collection_list::append_exp): Use string_file.
11081 * tui/tui-disasm.c (tui_disassemble): Use string_file.
11082 * tui/tui-file.c: Don't include "ui-file.h".
11083 (enum streamtype, struct tui_stream): Delete.
11084 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11085 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11086 (tui_file::tui_file): New method.
11087 (tui_file_fputs): Delete.
11088 (tui_file_get_strbuf): Delete.
11089 (tui_file::puts): New method.
11090 (tui_file_adjust_strbuf): Delete.
11091 (tui_file_flush): Delete.
11092 (tui_file::flush): New method.
11093 * tui/tui-file.h: Tweak intro comment.
11094 Include ui-file.h.
11095 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11096 (tui_file_adjust_strbuf): Delete declarations.
11097 (class tui_file): New class.
11098 * tui/tui-io.c (tui_initialize_io): Use tui_file.
11099 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11100 (tui_register_format): Use string_stream.
11101 * tui/tui-stack.c (tui_make_status_line): Use string_file.
11102 (tui_get_function_from_frame): Use string_file.
11103 * typeprint.c (type_to_string): Use string_file.
11104 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11105 (null_stream): New global.
11106 (ui_file_delete): Delete.
11107 (ui_file::ui_file): New.
11108 (null_file_isatty): Delete.
11109 (ui_file::~ui_file): New.
11110 (null_file_rewind): Delete.
11111 (ui_file::printf): New.
11112 (null_file_put): Delete.
11113 (null_file_flush): Delete.
11114 (ui_file::putstr): New.
11115 (null_file_write): Delete.
11116 (ui_file::putstrn): New.
11117 (null_file_read): Delete.
11118 (ui_file::putc): New.
11119 (null_file_fputs): Delete.
11120 (null_file_write_async_safe): Delete.
11121 (ui_file::vprintf): New.
11122 (null_file_delete): Delete.
11123 (null_file::write): New.
11124 (null_file_fseek): Delete.
11125 (null_file::puts): New.
11126 (ui_file_data): Delete.
11127 (null_file::write_async_safe): New.
11128 (gdb_flush, ui_file_isatty): Adjust.
11129 (ui_file_put, ui_file_rewind): Delete.
11130 (ui_file_write): Adjust.
11131 (ui_file_write_for_put): Delete.
11132 (ui_file_write_async_safe, ui_file_read): Adjust.
11133 (ui_file_fseek): Delete.
11134 (fputs_unfiltered): Adjust.
11135 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11136 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11137 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11138 (set_ui_file_data): Delete.
11139 (string_file::~string_file, string_file::write)
11140 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11141 (do_ui_file_as_string, ui_file_as_string): Delete.
11142 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11143 (struct mem_file): Delete.
11144 (mem_file_new): Delete.
11145 (stdio_file::stdio_file): New.
11146 (mem_file_delete): Delete.
11147 (stdio_file::stdio_file): New.
11148 (mem_fileopen): Delete.
11149 (stdio_file::~stdio_file): New.
11150 (mem_file_rewind): Delete.
11151 (stdio_file::set_stream): New.
11152 (mem_file_put): Delete.
11153 (stdio_file::open): New.
11154 (mem_file_write): Delete.
11155 (stdio_file_magic, struct stdio_file): Delete.
11156 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11157 (stdio_file::flush): New.
11158 (stdio_file_read): Rename to ...
11159 (stdio_file::read): ... this. Adjust.
11160 (stdio_file_write): Rename to ...
11161 (stdio_file::write): ... this. Adjust.
11162 (stdio_file_write_async_safe): Rename to ...
11163 (stdio_file::write_async_safe) ... this. Adjust.
11164 (stdio_file_fputs): Rename to ...
11165 (stdio_file::puts) ... this. Adjust.
11166 (stdio_file_isatty): Delete.
11167 (stdio_file_fseek): Delete.
11168 (stdio_file::isatty): New.
11169 (stderr_file_write): Rename to ...
11170 (stderr_file::write) ... this. Adjust.
11171 (stderr_file_fputs): Rename to ...
11172 (stderr_file::puts) ... this. Adjust.
11173 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11174 (stderr_file::stderr_file): New.
11175 (tee_file_magic): Delete.
11176 (struct tee_file): Delete.
11177 (tee_file::tee_file): New.
11178 (tee_file_new): Delete.
11179 (tee_file::~tee_file): New.
11180 (tee_file_delete): Delete.
11181 (tee_file_flush): Rename to ...
11182 (tee_file::flush): ... this. Adjust.
11183 (tee_file_write): Rename to ...
11184 (tee_file::write): ... this. Adjust.
11185 (tee_file::write_async_safe): New.
11186 (tee_file_fputs): Rename to ...
11187 (tee_file::puts): ... this. Adjust.
11188 (tee_file_isatty): Rename to ...
11189 (tee_file::isatty): ... this. Adjust.
11190 * ui-file.h (struct obstack, struct ui_file): Don't
11191 forward-declare.
11192 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11193 (ui_file_write_ftype)
11194 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11195 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11196 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11197 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11198 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11199 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11200 (set_ui_file_fseek): Delete.
11201 (ui_file_data, ui_file_delete, ui_file_rewind)
11202 (struct ui_file): New.
11203 (ui_file_up): New.
11204 (class null_file): New.
11205 (null_stream): Declare.
11206 (ui_file_write_for_put, ui_file_put): Delete.
11207 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11208 Delete.
11209 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11210 (gdb_fopen, tee_file_new): Delete.
11211 (struct string_file): New.
11212 (struct stdio_file): New.
11213 (stdio_file_up): New.
11214 (struct stderr_file): New.
11215 (class tee_file): New.
11216 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11217 of a 'ui_file *'. Adjust.
11218 * ui-out.h (class ui_out) <field_stream>: Likewise.
11219 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11220 (null_stream): Delete.
11221 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11222 Adjust.
11223 * utils.h (struct ui_file): Delete forward declaration..
11224 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11225 (error_stream): Take a 'string_file &' instead of a
11226 'ui_file *'.
11227 * varobj.c (varobj_value_get_print_value): Use string_file.
11228 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11229 * gdbarch.c: Regenerate.
11230
187808b0
PA
112312017-02-02 Pedro Alves <palves@redhat.com>
11232
11233 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11234 (gdb_pretty_print_insn): ... this. Now a free function. Add back
11235 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
11236 Adjust to call gdb_print_insn instead of
11237 gdb_disassembler::print_insn.
11238 (dump_insns, do_mixed_source_and_assembly_deprecated)
11239 (do_mixed_source_and_assembly, do_assembly_only): Add back a
11240 'gdbarch' parameter. Remove gdb_disassembler parameter.
11241 (gdb_disassembly): Don't allocate a gdb_disassembler here.
11242 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11243 declaration.
11244 (gdb_pretty_print_insn): Re-add declaration.
11245 * record-btrace.c (btrace_insn_history): Don't allocate a
11246 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
11247
7a8eb317
SM
112482017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
11249
11250 * disasm.h (gdb_disassembly): Remove file_string parameter.
11251 * disasm.c (gdb_disassembly): Likewise.
11252 * cli/cli-cmds.c (print_disassembly): Adapt.
11253 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11254 * stack.c (do_gdb_disassembly): Likewise.
11255
7346ef59
AA
112562017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
11257
11258 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11259 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11260 targets. And if the implicit value is longer than needed, extract
11261 the first bytes instead of the "least significant" ones.
11262
cd4007e4
MM
112632017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11264
11265 * btrace.c (btrace_enable): Do not call btrace_add_pc for
11266 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11267 (btrace_fetch): Assert can_access_registers_ptid.
11268 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11269 validate_registers_access.
11270
cf77c34e
MM
112712017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11272
11273 * gdbthread.h (can_access_registers_ptid): New.
11274 * thread.c (can_access_registers_ptid): New.
11275
be85ce7d
PA
112762017-02-01 Pedro Alves <palves@redhat.com>
11277
11278 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11279
29b0b251
PA
112802017-01-31 Pedro Alves <palves@redhat.com>
11281
11282 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11283 Fix typos.
11284
289b5b24
PA
112852017-01-31 Pedro Alves <palves@redhat.com>
11286
11287 * stack.c (print_frame_args): Remove local mem_fileopen stream,
11288 not used.
11289
b47413b4
PA
112902017-01-31 Pedro Alves <palves@redhat.com>
11291
11292 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11293
60adb36c
PA
112942017-01-31 Pedro Alves <palves@redhat.com>
11295
11296 * common/scoped_restore.h
11297 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11298 change the value's parameter type to T2.
11299 (make_scoped_restore): Likewise.
11300
2735833d
WT
113012017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11302 Richard Henderson <rth@redhat.com>
11303
11304 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11305 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11306 GS_BASE for older kernels.
11307 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11308 GS_BASE for older kernels.
11309 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11310 and GS_BASE to the offset table.
11311 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11312 system register group.
11313 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11314 for older kernels.
11315 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11316 amd64 ABI.
11317 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11318 AMD64_GSBASE_REGNUM.
11319 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11320 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11321 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11322 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11323 i386/64bit-segments.xml in those rules.
11324 * features/i386/64bit-segments.xml: New file.
11325 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11326 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11327 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11328 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11329 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11330 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11331 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11332 * features/i386/amd64-avx-linux.c: Regenerated.
11333 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11334 * features/i386/amd64-avx-mpx.c: Regenerated.
11335 * features/i386/amd64-avx512-linux.c: Regenerated.
11336 * features/i386/amd64-linux.c: Regenerated.
11337 * features/i386/amd64-mpx-linux.c: Regenerated.
11338 * features/i386/i386-avx-mpx-linux.c: Regenerated.
11339 * features/i386/i386-avx-mpx.c: Regenerated.
11340 * features/i386/x32-avx-linux.c: Regenerated.
11341 * features/i386/x32-avx512-linux.c: Regenerated.
11342 * regformats/i386/amd64-avx-linux.dat: Regenerated.
11343 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11344 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11345 * regformats/i386/amd64-linux.dat: Regenerated.
11346 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11347 * regformats/i386/x32-avx-linux.dat: Regenerated.
11348 * regformats/i386/x32-avx512-linux.dat: Regenerated.
11349 * regformats/i386/x32-linux.dat: Regenerated.
11350
8884e97e
WT
113512017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11352
11353 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11354 Set to AMD64_NUM_REGS.
11355
7005d26a
WT
113562017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11357
11358 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11359 that checks validity of a register number.
11360
4bd2e1b2
KC
113612017-01-27 Kees Cook <keescook@google.com>
11362
11363 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11364 fetch_fpregs if target has fpa registers.
11365 (arm_linux_store_inferior_registers): Call store_fpregs if target
11366 has fpa registers.
11367
7cf1de6c
AA
113682017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
11369
11370 * cris-tdep.c (cris_gdbarch_init): Remove check for
11371 info.byte_order and force it to BFD_ENDIAN_LITTLE.
11372
874a1c8c
AT
113732017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
11374
11375 * corelow.c (get_core_register_section): Check for regset
11376 existence before checking for REGSET_VARIABLE_SIZE.
11377
d8b49cf0
YQ
113782017-01-26 Yao Qi <yao.qi@linaro.org>
11379 Pedro Alves <palves@redhat.com>
11380
11381 PR gdb/20939
11382 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11383 call memory_error, save memaddr instead.
11384 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11385 negative, cal memory_error.
11386 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11387
658ca58c
YQ
113882017-01-26 Yao Qi <yao.qi@linaro.org>
11389
11390 * disasm-selftests.c (memory_error_test): New function.
11391 (_initialize_disasm_selftests): Register memory_error_test.
11392
79843d45
YQ
113932017-01-26 Yao Qi <yao.qi@linaro.org>
11394
11395 * Makefile.in (SFILES): Add disasm-selftests.c and
11396 selftest-arch.c.
11397 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11398 * disasm-selftests.c: New file.
11399 * selftest-arch.c: New file.
11400 * selftest-arch.h: New file.
11401
8cafda32
YQ
114022017-01-26 Yao Qi <yao.qi@linaro.org>
11403
11404 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11405 to bfd_arch_mep. Don't return 0 if section is not
11406 found. Call print_insn_mep.
11407
e47ad6c0
YQ
114082017-01-26 Pedro Alves <palves@redhat.com>
11409 Yao Qi <yao.qi@linaro.org>
11410
11411 * arm-tdep.c: Include "disasm.h".
11412 (gdb_print_insn_arm): Update code to get gdbarch.
11413 * disasm.c (dis_asm_read_memory): Change it to
11414 gdb_disassembler::dis_asm_read_memory.
11415 (dis_asm_memory_error): Likewise.
11416 (dis_asm_print_address): Likewise.
11417 (gdb_pretty_print_insn): Change it to
11418 gdb_disassembler::pretty_print_insn.
11419 (dump_insns): Add one argument gdb_disassemlber. All
11420 callers updated.
11421 (do_mixed_source_and_assembly_deprecated): Likewise.
11422 (do_mixed_source_and_assembly): Likewise.
11423 (do_assembly_only): Likewise.
11424 (gdb_disassembler::gdb_disassembler): New.
11425 (gdb_disassembler::print_insn): New.
11426 * disasm.h (class gdb_disassembler): New.
11427 (gdb_pretty_print_insn): Remove declaration.
11428 (gdb_disassemble_info): Likewise.
11429 * guile/scm-disasm.c (class gdbscm_disassembler): New.
11430 (gdbscm_disasm_read_memory_worker): Update.
11431 (gdbscm_disasm_read_memory): Update.
11432 (gdbscm_disasm_memory_error): Remove.
11433 (gdbscm_disasm_print_address): Remove.
11434 (gdbscm_disassembler::gdbscm_disassembler): New.
11435 (gdbscm_print_insn_from_port): Update.
11436 * mips-tdep.c: Include disasm.h.
11437 (gdb_print_insn_mips): Update code to get gdbarch.
11438 * record-btrace.c (btrace_insn_history): Update.
11439 * spu-tdep.c: Include disasm.h.
11440 (struct spu_dis_asm_data): Remove.
11441 (struct spu_dis_asm_info): New.
11442 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11443 SPU id.
11444 (gdb_print_insn_spu): Cast disassemble_info to
11445 spu_dis_asm_info.
11446
80d75874
YQ
114472017-01-26 Yao Qi <yao.qi@linaro.org>
11448
11449 * disasm.c (do_ui_file_delete): Delete.
11450 (gdb_insn_length): Move code creating stream to ...
11451 * utils.c (null_stream): ... here. New function.
11452 * utils.h (null_stream): Declare.
11453
60685cd0
SM
114542017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
11455
11456 * python/py-inferior.c (find_thread_object): Return directly
11457 from the loop. Remove "found" variable.
11458
eb1cdb62
JB
114592017-01-21 Joel Brobecker <brobecker@adacore.com>
11460
11461 GDB 7.12.1 released.
11462
b1ce6568
SM
114632017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11464
11465 * python/py-function.c (fnpy_call): Reorder declarations to have
11466 the gdbpy_enter object declared first.
11467 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11468
6f8b0407
SM
114692017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11470
fec93fb1 11471 PR python/21068
6f8b0407
SM
11472 * python/python-internal.h (PyMem_RawMalloc): Define for
11473 Python < 3.4.
11474 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11475 PyMem_RawMalloc instead of PyMem_Malloc.
11476
78cbbba8
LM
114772017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
11478 Luis Machado <lgustavo@codesourcery.com>
11479
11480 * NEWS (New commands): Mention flash-erase.
11481 (New MI commands): Mention target-flash-erase.
11482 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11483 command.
11484 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11485 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11486 * target.c (flash_erase_command): New function.
11487 (initialize_targets): Add new flash-erase command.
11488 * target.h (flash_erase_command): New declaration.
11489
2132fe85
JB
114902017-01-20 Joel Brobecker <brobecker@adacore.com>
11491
11492 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11493 HAVE_SYS_PROCFS_H is defined.
11494
d1dff226
AH
114952017-01-18 Alan Hayward <alan.hayward@arm.com>
11496
11497 * remote.c (struct cached_reg): Change data into a pointer.
11498 * (stop_reply_dtr): Free data pointers before deleting vector.
11499 (process_stop_reply): Likewise.
11500 (remote_parse_stop_reply): Allocate space for data
11501
9890e433
AH
115022017-01-18 Alan Hayward <alan.hayward@arm.com>
11503
11504 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11505 MAX_REGISTER_SIZE.
11506 (amd64_pseudo_register_read_value): Likewise.
11507 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11508 (store_register_using_P): Likewise.
11509 * regcache.c (regcache_xfer_part): Likewise.
11510
7a36499a
IR
115112017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
11512
11513 Split real and pseudo registers.
11514 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11515 (sparc32_pseudo_regnum): New enum.
11516 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11517 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11518 (SPARC32_CP0_REGISTERS): New macro.
11519 (sparc32_pseudo_register_name): New function.
11520 (sparc32_register_name): Use sparc32_pseudo_register_name.
11521 (sparc32_pseudo_register_type): New function.
11522 (sparc32_register_type): Use sparc32_pseudo_register_type.
11523 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11524 pseudo register numbers.
11525 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11526 (SPARC64_CP0_REGISTERS): New macro.
11527 (sparc64_pseudo_register_name): New function.
11528 (sparc64_register_name): Use sparc64_pseudo_register_name.
11529 (sparc64_pseudo_register_type): New function.
11530 (sparc64_register_type): Use sparc64_pseudo_register_type.
11531 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11532 pseudo register numbers.
11533 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11534 sparc64_store_arguments): Handle pseudo register numbers.
11535
6f8976bf
YQ
115362017-01-13 Yao Qi <yao.qi@linaro.org>
11537
11538 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11539 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11540 output.
11541 (getpkt_or_notif_sane_1): Likewise.
11542
e4241ace
YQ
115432017-01-13 Yao Qi <yao.qi@linaro.org>
11544
11545 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11546 of CC. Pass "-x c++-header" instead of "-x c".
11547
3015c064
SM
115482017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11549
11550 * remote.c (remote_can_async_p): Update comment.
11551
fde1b17d
SM
115522017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11553
11554 * linux-nat.c (linux_nat_can_async_p): Update comment.
11555
ca1ca08b
SM
115562017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11557
11558 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11559
4ad2da73
SM
115602017-01-11 Simon Marchi <simon.marchi@ericsson.com>
11561
11562 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11563
c8b23b3f
TT
115642017-01-10 Tom Tromey <tom@tromey.com>
11565
11566 * python/py-type.c (typy_legacy_template_argument): Update.
11567 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11568 ~demangle_parse_info): Declare new members.
11569 (cp_demangled_name_to_comp): Return unique_ptr.
11570 (cp_demangled_name_parse_free)
11571 (make_cleanup_cp_demangled_name_parse_free)
11572 (cp_new_demangle_parse_info): Remove.
11573 * cp-support.c (do_demangled_name_parse_free_cleanup)
11574 (make_cleanup_cp_demangled_name_parse_free): Remove.
11575 (inspect_type, cp_canonicalize_string_full)
11576 (cp_canonicalize_string): Update.
11577 (mangled_name_to_comp): Change return type.
11578 (cp_class_name_from_physname, method_name_from_physname)
11579 (cp_func_name, cp_remove_params): Update.
11580 * cp-name-parser.y (demangle_parse_info): New constructor, from
11581 cp_new_demangle_parse_info.
11582 (~demangle_parse_info): New destructor, from
11583 cp_demangled_name_parse_free.
11584 (cp_merge_demangle_parse_infos): Update.
11585 (cp_demangled_name_to_comp): Change return type.
11586
1ac32117
TT
115872017-01-10 Tom Tromey <tom@tromey.com>
11588
11589 * top.c (prevent_dont_repeat): Change return type.
11590 * python/python.c (execute_gdb_command): Use std::string.
11591 Update.
11592 * guile/guile.c (gdbscm_execute_gdb_command): Update.
11593 * command.h (prevent_dont_repeat): Change return type.
11594 * breakpoint.c (bpstat_do_actions_1): Update.
11595
0cf08227
TT
115962017-01-10 Tom Tromey <tom@tromey.com>
11597
11598 * value.h (scoped_value_mark::~scoped_value_mark): Call
11599 free_to_mark.
11600 (scoped_value_mark::free_to_mark): New method.
11601 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11602 scoped_value_mark.
11603
eb115069
TT
116042017-01-10 Tom Tromey <tom@tromey.com>
11605
11606 * python/py-value.c (valpy_dereference, valpy_referenced_value)
11607 (valpy_reference_value, valpy_const_value, valpy_get_address)
11608 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11609 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11610 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11611 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11612 scoped_value_mark.
11613 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11614 * value.h (scoped_value_mark): New class.
11615
906768f9
TT
116162017-01-10 Tom Tromey <tom@tromey.com>
11617
11618 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11619 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11620 * psymtab.c (discard_psymtabs_upto): Remove.
11621 (make_cleanup_discard_psymtabs): Remove.
11622 (struct psymtab_state): Remove.
11623
bef155c3
TT
116242017-01-10 Tom Tromey <tom@tromey.com>
11625
11626 * record-full.c (record_full_save_cleanups): Remove.
11627 (record_full_save): Use gdb::unlinker.
11628 * gcore.c (do_bfd_delete_cleanup): Remove.
11629 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
11630 cleanups.
11631 * dwarf2read.c (unlink_if_set): Remove.
11632 (write_psymtabs_to_index): Use gdb::unlinker.
11633 * common/gdb_unlinker.h: New file.
11634
192b62ce
TT
116352017-01-10 Tom Tromey <tom@tromey.com>
11636
11637 * windows-tdep.c (windows_xfer_shared_library): Update.
11638 * windows-nat.c (windows_make_so): Update.
11639 * utils.h (make_cleanup_bfd_unref): Remove.
11640 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11641 * symfile.h (symfile_bfd_open)
11642 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11643 * symfile.c (read_symbols, symbol_file_add)
11644 (separate_debug_file_exists): Update.
11645 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11646 (generic_load, reread_symbols): Update.
11647 * symfile-mem.c (symbol_file_add_from_memory): Update.
11648 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11649 (spu_symbol_file_add_from_memory): Update.
11650 * solist.h (struct target_so_ops) <bfd_open>: Return
11651 gdb_bfd_ref_ptr.
11652 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11653 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11654 gdb_bfd_ref_ptr.
11655 (solib_map_sections, reload_shared_libraries_1): Update.
11656 * solib-svr4.c (enable_break): Update.
11657 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11658 * solib-frv.c (enable_break2): Update.
11659 * solib-dsbt.c (enable_break): Update.
11660 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11661 gdb_bfd_ref_ptr.
11662 (darwin_solib_get_all_image_info_addr_at_init): Update.
11663 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11664 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11665 * record-full.c (record_full_save): Update.
11666 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11667 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11668 * minidebug.c (find_separate_debug_file_in_section): Return
11669 gdb_bfd_ref_ptr.
11670 * machoread.c (macho_add_oso_symfile): Change abfd to
11671 gdb_bfd_ref_ptr.
11672 (macho_symfile_read_all_oso): Update.
11673 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11674 (macho_symfile_read): Update.
11675 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11676 (jit_bfd_try_read_symtab): Update.
11677 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11678 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11679 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11680 gdb_bfd_ref_ptr.
11681 (gdb_bfd_ref_policy): New struct.
11682 (gdb_bfd_ref_ptr): New typedef.
11683 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11684 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11685 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11686 gdb_bfd_ref_ptr.
11687 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11688 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11689 (gcore_command): Update.
11690 * exec.c (exec_file_attach): Update.
11691 * elfread.c (elf_symfile_read): Update.
11692 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11693 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11694 (open_and_init_dwo_file): Update.
11695 (open_dwp_file): Return gdb_bfd_ref_ptr.
11696 (open_and_init_dwp_file): Update.
11697 * corelow.c (core_open): Update.
11698 * compile/compile-object-load.c (compile_object_load): Update.
11699 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11700 * coffread.c (coff_symfile_read): Update.
11701 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11702 gdb_bfd_ref_ptr. Rename.
11703 (dump_bfd_file, restore_command): Update.
11704 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11705 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11706 (find_separate_debug_file_by_buildid): Update.
11707
50315b21
TT
117082017-01-10 Tom Tromey <tom@tromey.com>
11709
11710 * common/gdb_ref_ptr.h: New file.
11711 * python/py-ref.h (struct gdbpy_ref_policy): New.
11712 (gdbpy_ref): Now a typedef.
11713
fc4007c9
TT
117142017-01-10 Tom Tromey <tom@tromey.com>
11715
11716 * utils.h (make_cleanup_htab_delete): Don't declare.
11717 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11718 Remove.
11719 * linespec.c (decode_compound_collector): Add constructor,
11720 destructor.
11721 (lookup_prefix_sym): Remove cleanup.
11722 (symtab_collector): Add constructor, destructor.
11723 (collect_symtabs_from_filename): Remove cleanup.
11724 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11725 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11726 Use htab_up.
11727 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11728 * dwarf2read.c (dw2_expand_symtabs_matching)
11729 (dw2_map_symbol_filenames, dwarf_decode_macros)
11730 (write_psymtabs_to_index): Use htab_up.
11731 * dwarf2loc.c (func_verify_no_selftailcall)
11732 (call_site_find_chain_1, func_verify_no_selftailcall)
11733 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11734 std::vector, gdb::unique_xmalloc_ptr.
11735 (call_sitep): Remove typedef.
11736 (dwarf2_locexpr_baton_eval): Remove unused variable.
11737
8dbcee67
TT
117382017-01-10 Tom Tromey <tom@tromey.com>
11739
11740 * python/python-internal.h (make_cleanup_py_decref)
11741 (make_cleanup_py_xdecref): Don't declare.
11742 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11743 (py_xdecref, make_cleanup_py_xdecref): Remove.
11744
13df46cc
TT
117452017-01-10 Tom Tromey <tom@tromey.com>
11746
11747 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11748 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11749
06fc9bf7
TT
117502017-01-10 Tom Tromey <tom@tromey.com>
11751
11752 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11753
830a4934
TT
117542017-01-10 Tom Tromey <tom@tromey.com>
11755
11756 * python/py-utils.c (unicode_to_encoded_string)
11757 (python_string_to_target_string)
11758 (python_string_to_target_python_string)
11759 (python_string_to_host_string, gdbpy_obj_to_string)
11760 (get_addr_from_python): Use gdbpy_ref.
11761
4586d543
TT
117622017-01-10 Tom Tromey <tom@tromey.com>
11763
11764 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11765 gdbpy_ref.
11766
59876f8f
TT
117672017-01-10 Tom Tromey <tom@tromey.com>
11768
11769 * python/python.c (eval_python_command, gdbpy_decode_line)
11770 (gdbpy_run_events, gdbpy_start_type_printers)
11771 (gdbpy_apply_type_printers): Use gdbpy_ref.
11772
97d83487
TT
117732017-01-10 Tom Tromey <tom@tromey.com>
11774
11775 * python/py-param.c (get_doc_string, compute_enum_values): Use
11776 gdbpy_ref.
11777
9205649a
TT
117782017-01-10 Tom Tromey <tom@tromey.com>
11779
11780 * python/py-inferior.c (find_thread_object, build_inferior_list):
11781 Use gdbpy_ref.
11782
74c49d45
TT
117832017-01-10 Tom Tromey <tom@tromey.com>
11784
11785 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11786
16361ffb
TT
117872017-01-10 Tom Tromey <tom@tromey.com>
11788
11789 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11790 gdbpy_ref.
11791
905f2cca
TT
117922017-01-10 Tom Tromey <tom@tromey.com>
11793
11794 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11795 extra incref.
11796 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11797 Use gdbpy_ref.
11798
64081434
TT
117992017-01-10 Tom Tromey <tom@tromey.com>
11800
11801 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11802 gdbpy_ref.
11803
59e9e831
TT
118042017-01-10 Tom Tromey <tom@tromey.com>
11805
11806 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11807 decref results of PyArg_ParseTupleAndKeywords.
11808
9de10f6d
TT
118092017-01-10 Tom Tromey <tom@tromey.com>
11810
11811 * python/python.c (python_run_simple_file): Use
11812 unique_xmalloc_ptr, gdbpy_ref.
11813
2bd5759d
TT
118142017-01-10 Tom Tromey <tom@tromey.com>
11815
11816 * python/py-prettyprint.c (print_stack_unless_memory_error)
11817 (print_string_repr, print_children): Use gdbpy_ref.
11818 (dummy_python_frame): New class.
11819 (dummy_python_frame::dummy_python_frame): Rename from
11820 push_dummy_python_frame.
11821 (py_restore_tstate): Remove.
11822
3b4e0e01
TT
118232017-01-10 Tom Tromey <tom@tromey.com>
11824
11825 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11826
17a22718
TT
118272017-01-10 Tom Tromey <tom@tromey.com>
11828
11829 * python/python.c (ensure_python_env, restore_python_env):
11830 Remove.
11831 * python/python-internal.h (ensure_python_env): Don't declare.
11832 * varobj.h (varobj_ensure_python_env): Don't declare.
11833 * varobj.c (varobj_ensure_python_env): Remove.
11834
68cdc557
TT
118352017-01-10 Tom Tromey <tom@tromey.com>
11836
11837 * varobj.c (varobj_value_get_print_value): Use
11838 gdbpy_enter_varobj.
11839
1eba6383
TT
118402017-01-10 Tom Tromey <tom@tromey.com>
11841
11842 * python/py-prettyprint.c (print_string_repr, print_children):
11843 Update.
11844 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11845 of "encoding".
11846 * varobj.c (varobj_value_get_print_value): Update.
11847 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11848
bde7b3e3
TT
118492017-01-10 Tom Tromey <tom@tromey.com>
11850
11851 * varobj.c (varobj_get_display_hint)
11852 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11853 (varobj_set_visualizer, free_variable): Use
11854 gdbpy_enter_varobj.
11855
a7785f8c
TT
118562017-01-10 Tom Tromey <tom@tromey.com>
11857
11858 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11859 (do_finish_initialization): New function. Use gdbpy_ref.
11860 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11861 do_finish_initialization.
11862
2865bfce
TT
118632017-01-10 Tom Tromey <tom@tromey.com>
11864
11865 * python/py-param.c (get_set_value, get_show_value): Use
11866 gdbpy_enter, gdbpy_ref.
11867
0e9dcc75
TT
118682017-01-10 Tom Tromey <tom@tromey.com>
11869
11870 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11871
12a5cedd
TT
118722017-01-10 Tom Tromey <tom@tromey.com>
11873
11874 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11875
788f2586
TT
118762017-01-10 Tom Tromey <tom@tromey.com>
11877
11878 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11879 Use gdbpy_enter_varobj.
11880
6cd67bea
TT
118812017-01-10 Tom Tromey <tom@tromey.com>
11882
11883 * varobj.c (gdbpy_enter_varobj): New constructor.
11884 * python/python-internal.h (gdbpy_enter_varobj): New class.
11885 * python/py-varobj.c (py_varobj_get_iterator): Use
11886 gdbpy_enter_varobj.
11887
14b122bf
TT
118882017-01-10 Tom Tromey <tom@tromey.com>
11889
11890 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11891 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11892 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11893 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11894 unique_xmalloc_ptr.
11895 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11896
bf1ca3b9
TT
118972017-01-10 Tom Tromey <tom@tromey.com>
11898
11899 * python/py-xmethods.c (invoke_match_method): Use
11900 gdbpy_ref.
11901
572a5524
TT
119022017-01-10 Tom Tromey <tom@tromey.com>
11903
11904 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11905 gdbpy_enter, gdbpy_ref.
11906
396a78b6
TT
119072017-01-10 Tom Tromey <tom@tromey.com>
11908
11909 * python/python.c (python_interactive_command): Use gdbpy_enter.
11910
a88b13c7
TT
119112017-01-10 Tom Tromey <tom@tromey.com>
11912
11913 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11914 gdbpy_ref.
11915
e9f0c363
TT
119162017-01-10 Tom Tromey <tom@tromey.com>
11917
11918 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11919 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11920
6349f452
TT
119212017-01-10 Tom Tromey <tom@tromey.com>
11922
11923 * utils.h (htab_deleter): New struct.
11924 (htab_up): New typedef.
11925 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11926 gdbpy_enter, gdbpy_ref, htab_up.
11927
c0171de6
TT
119282017-01-10 Tom Tromey <tom@tromey.com>
11929
11930 * python/py-unwind.c (pending_frame_invalidate): Remove.
11931 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11932
f18e226f
TT
119332017-01-10 Tom Tromey <tom@tromey.com>
11934
11935 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11936 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11937
c57af3f1
TT
119382017-01-10 Tom Tromey <tom@tromey.com>
11939
11940 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11941
60e600ec
TT
119422017-01-10 Tom Tromey <tom@tromey.com>
11943
11944 * python/python.c (gdbpy_eval_from_control_command)
11945 (gdbpy_source_script, gdbpy_run_events)
11946 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11947 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11948 gdbpy_enter.
11949
bf7da5b0
TT
119502017-01-10 Tom Tromey <tom@tromey.com>
11951
11952 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11953
2d38bced
TT
119542017-01-10 Tom Tromey <tom@tromey.com>
11955
11956 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11957
07bc7329
TT
119582017-01-10 Tom Tromey <tom@tromey.com>
11959
11960 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11961 (python_on_inferior_call_pre, python_on_inferior_call_post)
11962 (python_on_memory_change, python_on_register_change)
11963 (python_inferior_exit, python_new_objfile, add_thread_object)
11964 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11965
6e7c365e
TT
119662017-01-10 Tom Tromey <tom@tromey.com>
11967
11968 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11969 (bpfinishpy_handle_exit): Use gdbpy_enter.
11970
6ba0cd40
TT
119712017-01-10 Tom Tromey <tom@tromey.com>
11972
11973 * python/py-cmd.c (cmdpy_destroyer)
11974 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11975 gdbpy_enter.
11976
de2dc875
TT
119772017-01-10 Tom Tromey <tom@tromey.com>
11978
11979 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11980 gdbpy_enter.
11981 (gdbpy_breakpoint_has_cond): Likewise.
11982
4ecee2c4
TT
119832017-01-10 Tom Tromey <tom@tromey.com>
11984
11985 * python/python.c (gdbpy_enter): New constructor.
11986 (~gdbpy_enter): New destructor.
11987 (restore_python_env, ensure_python_env): Rewrite.
11988 * python/python-internal.h (gdbpy_enter): New class.
11989
37fce74f
TT
119902017-01-10 Tom Tromey <tom@tromey.com>
11991
11992 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11993
53a0cca3
TT
119942017-01-10 Tom Tromey <tom@tromey.com>
11995
11996 * python/py-value.c (value_has_field, get_field_flag)
11997 (get_field_type, valpy_getitem, convert_value_from_python): Use
11998 gdbpy_ref.
11999
ff3724f5
TT
120002017-01-10 Tom Tromey <tom@tromey.com>
12001
12002 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12003 gdbpy_ref.
12004
0700aea5
TT
120052017-01-10 Tom Tromey <tom@tromey.com>
12006
12007 * python/py-prettyprint.c (search_pp_list)
12008 (find_pretty_printer_from_objfiles)
12009 (find_pretty_printer_from_progspace)
12010 (find_pretty_printer_from_gdb, find_pretty_printer)
12011 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12012 gdbpy_ref.
12013
1bb44c9f
TT
120142017-01-10 Tom Tromey <tom@tromey.com>
12015
12016 * python/py-param.c (call_doc_function): Use gdbpy_ref.
12017
87ce03fd
TT
120182017-01-10 Tom Tromey <tom@tromey.com>
12019
12020 * python/py-linetable.c (build_line_table_tuple_from_pcs)
12021 (ltpy_get_all_source_lines): Use gdbpy_ref.
12022
ee0a3fb8
TT
120232017-01-10 Tom Tromey <tom@tromey.com>
12024
12025 * python/py-framefilter.c (extract_sym, extract_value)
12026 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12027 gdbpy_ref.
12028
bf2a52fa
TT
120292017-01-10 Tom Tromey <tom@tromey.com>
12030
12031 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12032
f59fe7f8
TT
120332017-01-10 Tom Tromey <tom@tromey.com>
12034
12035 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12036
80bd970a
TT
120372017-01-10 Tom Tromey <tom@tromey.com>
12038
12039 * python/py-function.c (convert_values_to_python, fnpy_init): Use
12040 gdbpy_ref.
12041
d1b3de2e
TT
120422017-01-10 Tom Tromey <tom@tromey.com>
12043
12044 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12045
3bb43384
TT
120462017-01-10 Tom Tromey <tom@tromey.com>
12047
12048 * python/py-type.c (convert_field, make_fielditem, typy_fields)
12049 (typy_range): Use gdbpy_ref.
12050
abf5651e
TT
120512017-01-10 Tom Tromey <tom@tromey.com>
12052
12053 * python/py-threadevent.c (create_thread_event_object): Use
12054 gdbpy_ref.
12055 * python/py-stopevent.c (create_stop_event_object): Simplify.
12056 (emit_stop_event): Use gdbpy_ref.
12057 * python/py-signalevent.c (create_signal_event_object): Use
12058 gdbpy_ref.
12059 * python/py-newobjfileevent.c (create_new_objfile_event_object)
12060 (emit_new_objfile_event, create_clear_objfiles_event_object)
12061 (emit_clear_objfiles_event): Use gdbpy_ref.
12062 * python/py-infevents.c (create_inferior_call_event_object)
12063 (create_register_changed_event_object)
12064 (create_memory_changed_event_object, emit_inferior_call_event)
12065 (emit_memory_changed_event, emit_register_changed_event): Use
12066 gdbpy_ref.
12067 * python/py-exitedevent.c (create_exited_event_object)
12068 (emit_exited_event): Use gdbpy_ref.
12069 * python/py-event.h (evpy_emit_event): Remove
12070 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12071 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12072 * python/py-continueevent.c (emit_continue_event): Use
12073 gdbpy_ref.
12074 * python/py-breakpoint.c (gdbpy_breakpoint_created)
12075 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12076 gdbpy_ref.
12077 * python/py-bpevent.c (create_breakpoint_event_object): Use
12078 gdbpy_ref.
12079
a68ff33e
TT
120802017-01-10 Tom Tromey <tom@tromey.com>
12081
12082 * python/py-ref.h: New file.
12083
7becfd03
SM
120842017-01-10 Simon Marchi <simon.marchi@ericsson.com>
12085
12086 * cli-out.c (cli_ui_out::do_redirect): Change return type to
12087 void.
12088 * cli-out.h (cli_ui_out::do_redirect): Likewise.
12089 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12090 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12091 * ui-out.c (ui_out::redirect): Likewise.
12092 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12093 * cli/cli-logging.c (set_logging_redirect): Update call site of
12094 ui_out::redirect.
12095 (handle_redirections): Likewise.
12096 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12097 * top.c (execute_command_to_string): Likewise.
12098 * utils.c (do_ui_out_redirect_pop): Likewise.
12099
df294654
SM
121002017-01-10 Simon Marchi <simon.marchi@ericsson.com>
12101
12102 * stack.c (_initialize_stack): Update "frame" command help message.
12103
f5e6296e
IB
121042017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
12105
12106 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12107
0e2d6fa6
YQ
121082017-01-06 Yao Qi <yao.qi@linaro.org>
12109
12110 * x86-linux-nat.h: Include gdb_proc_service.h.
12111
44d6d3f9
YQ
121122017-01-06 Yao Qi <yao.qi@linaro.org>
12113
12114 * ser-base.h: Include serial.h.
12115
656731fe
YQ
121162017-01-06 Yao Qi <yao.qi@linaro.org>
12117
12118 * ppc-linux-tdep.h: Include ppc-tdep.h.
12119
1ca8f924
YQ
121202017-01-06 Yao Qi <yao.qi@linaro.org>
12121
12122 * nat/amd64-linux-siginfo.h: Include signal.h.
12123
bc3008c4
YQ
121242017-01-06 Yao Qi <yao.qi@linaro.org>
12125
12126 * nat/aarch64-linux-hw-point.h: Include break-common.h.
12127
66c80d03
YQ
121282017-01-06 Yao Qi <yao.qi@linaro.org>
12129
12130 * mi/mi-parse.h: Include mi-cmds.h.
12131
051d2dda
YQ
121322017-01-06 Yao Qi <yao.qi@linaro.org>
12133
12134 * inf-loop.c: Don't include "target.h".
12135 * inf-loop.h: Include it here.
12136
8018d34f
YQ
121372017-01-06 Yao Qi <yao.qi@linaro.org>
12138
12139 * dfp.h: Include "dboulest.h" and "expression.h".
12140
c0b8369c
YQ
121412017-01-06 Yao Qi <yao.qi@linaro.org>
12142
12143 * ax-gdb.h: Include "ax.h".
12144
ad5cba2a
YQ
121452017-01-06 Yao Qi <yao.qi@linaro.org>
12146
12147 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12148 with nat/gdb_ptrace.h.
12149
1c33cd7f
YQ
121502017-01-05 Yao Qi <yao.qi@linaro.org>
12151
12152 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12153 new line.
12154 (mips64_fbsd_sigframe_init): Likewise.
12155
c988ac1d
JB
121562017-01-04 John Baldwin <jhb@FreeBSD.org>
12157
12158 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12159 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12160
b268007c
JB
121612017-01-04 John Baldwin <jhb@FreeBSD.org>
12162
12163 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12164 * NEWS: Mention new FreeBSD/mips native configuration.
12165 * config/mips/fbsd.mh: New file.
12166 * configure.host: Add mips*-*-freebsd*.
12167 * mips-fbsd-nat.c: New file.
12168
387360da
JB
121692017-01-04 John Baldwin <jhb@FreeBSD.org>
12170
12171 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12172 (ALLDEPFILES): Add mips-fbsd-tdep.c.
12173 * NEWS: Mention new FreeBSD/mips target.
12174 * configure.tgt: Add mips*-*-freebsd*.
12175 * mips-fbsd-tdep.c: New file.
12176 * mips-fbsd-tdep.h: New file.
12177
2aaaf250
YQ
121782017-01-04 Yao Qi <yao.qi@linaro.org>
12179
12180 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12181 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12182
61baf725
JB
121832017-01-01 Joel Brobecker <brobecker@adacore.com>
12184
6dbb839a 12185 Update copyright year range in all GDB files.
61baf725 12186
c113e7ff 121872017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 12188
c113e7ff 12189 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 12190
c113e7ff 12191For older changes see ChangeLog-2016.
c906108c
SS
12192\f
12193Local Variables:
12194mode: change-log
12195left-margin: 8
12196fill-column: 74
12197version-control: never
57da7796 12198coding: utf-8
c906108c 12199End: